From f17288f0b9462b52c8907d4b2feb0a7a683e1adf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lytek?= Date: Wed, 7 Aug 2024 15:27:53 +0200 Subject: [PATCH] Upgrade Prisma to 5.18.0 --- .github/workflows/main.yml | 2 +- .nvmrc | 2 +- docs/basics/usage.md | 1 + experiments/mongodb/generated-schema.graphql | 40 +- experiments/mongodb/package-lock.json | 729 +-- experiments/mongodb/package.json | 26 +- .../prisma/generated/client/default.d.ts | 1 + .../prisma/generated/client/default.js | 1 + .../mongodb/prisma/generated/client/edge.d.ts | 2 +- .../mongodb/prisma/generated/client/edge.js | 22 +- .../prisma/generated/client/index-browser.js | 94 +- .../prisma/generated/client/index.d.ts | 681 +-- .../mongodb/prisma/generated/client/index.js | 24 +- .../prisma/generated/client/package.json | 79 +- .../generated/client/runtime/edge-esm.js | 54 +- .../prisma/generated/client/runtime/edge.js | 54 +- .../client/runtime/index-browser.d.ts | 31 +- .../generated/client/runtime/index-browser.js | 2 +- .../generated/client/runtime/library.d.ts | 829 ++- .../generated/client/runtime/library.js | 120 +- .../generated/client/runtime/react-native.js | 80 + .../prisma/generated/client/runtime/wasm.js | 32 + .../mongodb/prisma/generated/client/wasm.d.ts | 1 + .../mongodb/prisma/generated/client/wasm.js | 181 + .../prisma/generated/type-graphql/dmmf.json | 52 + .../prisma/generated/type-graphql/enhance.ts | 2 +- .../type-graphql/prisma-client-dmmf.json | 52 + experiments/postgres/generated-schema.graphql | 172 +- experiments/postgres/package-lock.json | 729 +-- experiments/postgres/package.json | 26 +- .../prisma/generated/client/default.d.ts | 1 + .../prisma/generated/client/default.js | 1 + .../prisma/generated/client/edge.d.ts | 2 +- .../postgres/prisma/generated/client/edge.js | 24 +- .../prisma/generated/client/index-browser.js | 94 +- .../prisma/generated/client/index.d.ts | 2672 +++++----- .../postgres/prisma/generated/client/index.js | 26 +- .../prisma/generated/client/package.json | 79 +- .../generated/client/runtime/edge-esm.js | 54 +- .../prisma/generated/client/runtime/edge.js | 54 +- .../client/runtime/index-browser.d.ts | 31 +- .../generated/client/runtime/index-browser.js | 2 +- .../generated/client/runtime/library.d.ts | 829 ++- .../generated/client/runtime/library.js | 120 +- .../generated/client/runtime/react-native.js | 80 + .../prisma/generated/client/runtime/wasm.js | 32 + .../prisma/generated/client/wasm.d.ts | 1 + .../postgres/prisma/generated/client/wasm.js | 329 ++ .../prisma/generated/type-graphql/dmmf.json | 1958 +++++-- .../prisma/generated/type-graphql/enhance.ts | 81 +- .../type-graphql/prisma-client-dmmf.json | 1958 +++++-- .../crud/Category/CategoryCrudResolver.ts | 13 + .../CreateManyAndReturnCategoryResolver.ts | 20 + .../Category/args/AggregateCategoryArgs.ts | 6 +- .../args/CreateManyAndReturnCategoryArgs.ts | 16 + .../Category/args/FindFirstCategoryArgs.ts | 6 +- .../args/FindFirstCategoryOrThrowArgs.ts | 6 +- .../Category/args/FindManyCategoryArgs.ts | 6 +- .../resolvers/crud/Category/args/index.ts | 1 + .../CreateManyAndReturnCreatorResolver.ts | 20 + .../crud/Creator/CreatorCrudResolver.ts | 13 + .../crud/Creator/args/AggregateCreatorArgs.ts | 6 +- .../args/CreateManyAndReturnCreatorArgs.ts | 16 + .../crud/Creator/args/FindFirstCreatorArgs.ts | 6 +- .../args/FindFirstCreatorOrThrowArgs.ts | 6 +- .../crud/Creator/args/FindManyCreatorArgs.ts | 6 +- .../resolvers/crud/Creator/args/index.ts | 1 + .../CreateManyAndReturnDirectorResolver.ts | 20 + .../crud/Director/DirectorCrudResolver.ts | 13 + .../Director/args/AggregateDirectorArgs.ts | 6 +- .../args/CreateManyAndReturnDirectorArgs.ts | 16 + .../Director/args/FindFirstDirectorArgs.ts | 6 +- .../args/FindFirstDirectorOrThrowArgs.ts | 6 +- .../Director/args/FindManyDirectorArgs.ts | 6 +- .../resolvers/crud/Director/args/index.ts | 1 + .../CreateManyAndReturnEquipmentResolver.ts | 20 + .../crud/Equipment/EquipmentCrudResolver.ts | 13 + .../Equipment/args/AggregateEquipmentArgs.ts | 6 +- .../args/CreateManyAndReturnEquipmentArgs.ts | 16 + .../Equipment/args/FindFirstEquipmentArgs.ts | 6 +- .../args/FindFirstEquipmentOrThrowArgs.ts | 6 +- .../Equipment/args/FindManyEquipmentArgs.ts | 6 +- .../resolvers/crud/Equipment/args/index.ts | 1 + .../CreateManyAndReturnHiddenResolver.ts | 20 + .../crud/Hidden/HiddenCrudResolver.ts | 13 + .../crud/Hidden/args/AggregateHiddenArgs.ts | 6 +- .../args/CreateManyAndReturnHiddenArgs.ts | 16 + .../crud/Hidden/args/FindFirstHiddenArgs.ts | 6 +- .../Hidden/args/FindFirstHiddenOrThrowArgs.ts | 6 +- .../crud/Hidden/args/FindManyHiddenArgs.ts | 6 +- .../resolvers/crud/Hidden/args/index.ts | 1 + .../CreateManyAndReturnMainUserResolver.ts | 20 + .../crud/MainUser/MainUserCrudResolver.ts | 13 + .../MainUser/args/AggregateMainUserArgs.ts | 6 +- .../args/CreateManyAndReturnMainUserArgs.ts | 16 + .../MainUser/args/FindFirstMainUserArgs.ts | 6 +- .../args/FindFirstMainUserOrThrowArgs.ts | 6 +- .../MainUser/args/FindManyMainUserArgs.ts | 6 +- .../resolvers/crud/MainUser/args/index.ts | 1 + .../Movie/CreateManyAndReturnMovieResolver.ts | 20 + .../resolvers/crud/Movie/MovieCrudResolver.ts | 13 + .../crud/Movie/args/AggregateMovieArgs.ts | 6 +- .../args/CreateManyAndReturnMovieArgs.ts | 16 + .../crud/Movie/args/FindFirstMovieArgs.ts | 6 +- .../Movie/args/FindFirstMovieOrThrowArgs.ts | 6 +- .../crud/Movie/args/FindManyMovieArgs.ts | 6 +- .../resolvers/crud/Movie/args/index.ts | 1 + ...ateManyAndReturnNativeTypeModelResolver.ts | 20 + .../NativeTypeModelCrudResolver.ts | 13 + .../args/AggregateNativeTypeModelArgs.ts | 6 +- .../CreateManyAndReturnNativeTypeModelArgs.ts | 16 + .../args/FindFirstNativeTypeModelArgs.ts | 6 +- .../FindFirstNativeTypeModelOrThrowArgs.ts | 6 +- .../args/FindManyNativeTypeModelArgs.ts | 6 +- .../crud/NativeTypeModel/args/index.ts | 1 + .../CreateManyAndReturnPatientResolver.ts | 20 + .../crud/Patient/PatientCrudResolver.ts | 13 + .../crud/Patient/args/AggregatePatientArgs.ts | 6 +- .../args/CreateManyAndReturnPatientArgs.ts | 16 + .../crud/Patient/args/FindFirstPatientArgs.ts | 6 +- .../args/FindFirstPatientOrThrowArgs.ts | 6 +- .../crud/Patient/args/FindManyPatientArgs.ts | 6 +- .../resolvers/crud/Patient/args/index.ts | 1 + .../Post/CreateManyAndReturnPostResolver.ts | 20 + .../resolvers/crud/Post/PostCrudResolver.ts | 13 + .../crud/Post/args/AggregatePostArgs.ts | 6 +- .../Post/args/CreateManyAndReturnPostArgs.ts | 16 + .../crud/Post/args/FindFirstPostArgs.ts | 6 +- .../Post/args/FindFirstPostOrThrowArgs.ts | 6 +- .../crud/Post/args/FindManyPostArgs.ts | 6 +- .../resolvers/crud/Post/args/index.ts | 1 + .../CreateManyAndReturnProblemResolver.ts | 20 + .../crud/Problem/ProblemCrudResolver.ts | 13 + .../crud/Problem/args/AggregateProblemArgs.ts | 6 +- .../args/CreateManyAndReturnProblemArgs.ts | 16 + .../crud/Problem/args/FindFirstProblemArgs.ts | 6 +- .../args/FindFirstProblemOrThrowArgs.ts | 6 +- .../crud/Problem/args/FindManyProblemArgs.ts | 6 +- .../resolvers/crud/Problem/args/index.ts | 1 + .../resolvers/crud/resolvers-actions.index.ts | 11 + ...ts => CategoryOrderByWithRelationInput.ts} | 4 +- ....ts => CreatorOrderByWithRelationInput.ts} | 4 +- ...ts => DirectorOrderByWithRelationInput.ts} | 4 +- ...s => EquipmentOrderByWithRelationInput.ts} | 4 +- ...t.ts => HiddenOrderByWithRelationInput.ts} | 4 +- ...ts => MainUserOrderByWithRelationInput.ts} | 4 +- ...ut.ts => MovieOrderByWithRelationInput.ts} | 10 +- ...ativeTypeModelOrderByWithRelationInput.ts} | 4 +- ....ts => PatientOrderByWithRelationInput.ts} | 4 +- ...put.ts => PostOrderByWithRelationInput.ts} | 14 +- ....ts => ProblemOrderByWithRelationInput.ts} | 10 +- .../type-graphql/resolvers/inputs/index.ts | 22 +- .../outputs/CreateManyAndReturnCategory.ts | 22 + .../outputs/CreateManyAndReturnCreator.ts | 17 + .../outputs/CreateManyAndReturnDirector.ts | 17 + .../outputs/CreateManyAndReturnEquipment.ts | 17 + .../outputs/CreateManyAndReturnHidden.ts | 17 + .../outputs/CreateManyAndReturnMainUser.ts | 53 + .../outputs/CreateManyAndReturnMovie.ts | 28 + .../CreateManyAndReturnNativeTypeModel.ts | 27 + .../outputs/CreateManyAndReturnPatient.ts | 22 + .../outputs/CreateManyAndReturnPost.ts | 80 + .../outputs/CreateManyAndReturnProblem.ts | 34 + .../args/CreateManyAndReturnPostEditorArgs.ts | 11 + .../CreateManyAndReturnProblemCreatorArgs.ts | 11 + .../resolvers/outputs/args/index.ts | 2 + .../type-graphql/resolvers/outputs/index.ts | 11 + .../Creator/args/CreatorLikesArgs.ts | 6 +- .../Creator/args/CreatorProblemsArgs.ts | 6 +- .../Director/args/DirectorMoviesArgs.ts | 6 +- .../MainUser/args/MainUserPostsArgs.ts | 6 +- .../Problem/args/ProblemLikedByArgs.ts | 6 +- experiments/postgres/query.graphql | 73 +- package-lock.json | 4521 +++++------------ package.json | 66 +- src/generator/args-class.ts | 2 +- src/generator/config.ts | 1 + src/generator/dmmf/transform.ts | 44 +- src/generator/dmmf/types.ts | 112 +- src/generator/generate-enhance.ts | 10 +- src/generator/type-class.ts | 17 +- .../__snapshots__/integration.ts.snap | 21 + tests/regression/__snapshots__/crud.ts.snap | 235 + .../__snapshots__/emit-only.ts.snap | 46 +- .../regression/__snapshots__/enhance.ts.snap | 23 +- tests/regression/__snapshots__/inputs.ts.snap | 10 +- .../regression/__snapshots__/outputs.ts.snap | 120 + .../__snapshots__/relations.ts.snap | 6 +- .../__snapshots__/structure.ts.snap | 24 + tests/regression/crud.ts | 24 + tests/regression/inputs.ts | 11 +- tests/regression/outputs.ts | 18 + 192 files changed, 11421 insertions(+), 7824 deletions(-) create mode 100644 experiments/mongodb/prisma/generated/client/default.d.ts create mode 100644 experiments/mongodb/prisma/generated/client/default.js create mode 100644 experiments/mongodb/prisma/generated/client/runtime/react-native.js create mode 100644 experiments/mongodb/prisma/generated/client/runtime/wasm.js create mode 100644 experiments/mongodb/prisma/generated/client/wasm.d.ts create mode 100644 experiments/mongodb/prisma/generated/client/wasm.js create mode 100644 experiments/postgres/prisma/generated/client/default.d.ts create mode 100644 experiments/postgres/prisma/generated/client/default.js create mode 100644 experiments/postgres/prisma/generated/client/runtime/react-native.js create mode 100644 experiments/postgres/prisma/generated/client/runtime/wasm.js create mode 100644 experiments/postgres/prisma/generated/client/wasm.d.ts create mode 100644 experiments/postgres/prisma/generated/client/wasm.js create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/CreateManyAndReturnCategoryResolver.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/CreateManyAndReturnCategoryArgs.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/CreateManyAndReturnCreatorResolver.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/CreateManyAndReturnCreatorArgs.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/CreateManyAndReturnDirectorResolver.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/CreateManyAndReturnDirectorArgs.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/CreateManyAndReturnEquipmentResolver.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/CreateManyAndReturnEquipmentArgs.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/CreateManyAndReturnHiddenResolver.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/CreateManyAndReturnHiddenArgs.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/CreateManyAndReturnMainUserResolver.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/CreateManyAndReturnMainUserArgs.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/CreateManyAndReturnMovieResolver.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/CreateManyAndReturnMovieArgs.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/CreateManyAndReturnNativeTypeModelResolver.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/CreateManyAndReturnNativeTypeModelArgs.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/CreateManyAndReturnPatientResolver.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/CreateManyAndReturnPatientArgs.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/CreateManyAndReturnPostResolver.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/CreateManyAndReturnPostArgs.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/CreateManyAndReturnProblemResolver.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/CreateManyAndReturnProblemArgs.ts rename experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/{CategoryOrderByWithRelationAndSearchRelevanceInput.ts => CategoryOrderByWithRelationInput.ts} (84%) rename experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/{CreatorOrderByWithRelationAndSearchRelevanceInput.ts => CreatorOrderByWithRelationInput.ts} (88%) rename experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/{DirectorOrderByWithRelationAndSearchRelevanceInput.ts => DirectorOrderByWithRelationInput.ts} (86%) rename experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/{EquipmentOrderByWithRelationAndSearchRelevanceInput.ts => EquipmentOrderByWithRelationInput.ts} (83%) rename experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/{HiddenOrderByWithRelationAndSearchRelevanceInput.ts => HiddenOrderByWithRelationInput.ts} (83%) rename experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/{MainUserOrderByWithRelationAndSearchRelevanceInput.ts => MainUserOrderByWithRelationInput.ts} (94%) rename experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/{MovieOrderByWithRelationAndSearchRelevanceInput.ts => MovieOrderByWithRelationInput.ts} (65%) rename experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/{NativeTypeModelOrderByWithRelationAndSearchRelevanceInput.ts => NativeTypeModelOrderByWithRelationInput.ts} (82%) rename experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/{PatientOrderByWithRelationAndSearchRelevanceInput.ts => PatientOrderByWithRelationInput.ts} (84%) rename experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/{PostOrderByWithRelationAndSearchRelevanceInput.ts => PostOrderByWithRelationInput.ts} (73%) rename experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/{ProblemOrderByWithRelationAndSearchRelevanceInput.ts => ProblemOrderByWithRelationInput.ts} (72%) create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnCategory.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnCreator.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnDirector.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnEquipment.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnHidden.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnMainUser.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnMovie.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnNativeTypeModel.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnPatient.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnPost.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnProblem.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/args/CreateManyAndReturnPostEditorArgs.ts create mode 100644 experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/args/CreateManyAndReturnProblemCreatorArgs.ts diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 854836fc2..cbd67d453 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - node-version: [18.x, 19.x, 20.x, 21.x] + node-version: [20.x, 21.x, 22.x] services: db: diff --git a/.nvmrc b/.nvmrc index 3c032078a..2bd5a0a98 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18 +22 diff --git a/docs/basics/usage.md b/docs/basics/usage.md index 0b8325e02..859e89632 100644 --- a/docs/basics/usage.md +++ b/docs/basics/usage.md @@ -108,6 +108,7 @@ However, it can also generate some resolvers which might be handy especially on - findMany - create - createMany +- createManyAndReturn - update - updateMany - delete diff --git a/experiments/mongodb/generated-schema.graphql b/experiments/mongodb/generated-schema.graphql index f0f0b4b26..cd321fe89 100644 --- a/experiments/mongodb/generated-schema.graphql +++ b/experiments/mongodb/generated-schema.graphql @@ -222,7 +222,13 @@ input CommentWhereInput { } input CommentWhereUniqueInput { + AND: [CommentWhereInput!] + NOT: [CommentWhereInput!] + OR: [CommentWhereInput!] + comment: StringFilter id: String + post: PostRelationFilter + postId: StringFilter } input IntNullableFilter { @@ -373,7 +379,7 @@ type Post { } type PostCount { - comments: Int! + comments(where: CommentWhereInput): Int! } type PostCountAggregate { @@ -606,10 +612,15 @@ input PostUpdateOneRequiredWithoutCommentsNestedInput { connect: PostWhereUniqueInput connectOrCreate: PostCreateOrConnectWithoutCommentsInput create: PostCreateWithoutCommentsInput - update: PostUpdateWithoutCommentsInput + update: PostUpdateToOneWithWhereWithoutCommentsInput upsert: PostUpsertWithoutCommentsInput } +input PostUpdateToOneWithWhereWithoutCommentsInput { + data: PostUpdateWithoutCommentsInput! + where: PostWhereInput +} + input PostUpdateWithWhereUniqueWithoutAuthorInput { data: PostUpdateWithoutAuthorInput! where: PostWhereUniqueInput! @@ -638,6 +649,7 @@ input PostUpsertWithWhereUniqueWithoutAuthorInput { input PostUpsertWithoutCommentsInput { create: PostCreateWithoutCommentsInput! update: PostUpdateWithoutCommentsInput! + where: PostWhereInput } input PostWhereInput { @@ -654,8 +666,16 @@ input PostWhereInput { } input PostWhereUniqueInput { + AND: [PostWhereInput!] + NOT: [PostWhereInput!] + OR: [PostWhereInput!] + author: UserRelationFilter + authorId: StringFilter + body: StringFilter + comments: CommentListRelationFilter id: String slug: String + title: StringFilter } type Query { @@ -782,7 +802,7 @@ input UserAvgOrderByAggregateInput { } type UserCount { - posts: Int! + posts(where: PostWhereInput): Int! } type UserCountAggregate { @@ -930,10 +950,15 @@ input UserUpdateOneRequiredWithoutPostsNestedInput { connect: UserWhereUniqueInput connectOrCreate: UserCreateOrConnectWithoutPostsInput create: UserCreateWithoutPostsInput - update: UserUpdateWithoutPostsInput + update: UserUpdateToOneWithWhereWithoutPostsInput upsert: UserUpsertWithoutPostsInput } +input UserUpdateToOneWithWhereWithoutPostsInput { + data: UserUpdateWithoutPostsInput! + where: UserWhereInput +} + input UserUpdateWithoutPostsInput { address: UserAddressCreateInput age: Int @@ -943,6 +968,7 @@ input UserUpdateWithoutPostsInput { input UserUpsertWithoutPostsInput { create: UserCreateWithoutPostsInput! update: UserUpdateWithoutPostsInput! + where: UserWhereInput } input UserWhereInput { @@ -957,6 +983,12 @@ input UserWhereInput { } input UserWhereUniqueInput { + AND: [UserWhereInput!] + NOT: [UserWhereInput!] + OR: [UserWhereInput!] + address: UserAddressCompositeFilter + age: IntNullableFilter email: String id: String + posts: PostListRelationFilter } \ No newline at end of file diff --git a/experiments/mongodb/package-lock.json b/experiments/mongodb/package-lock.json index 71867df88..c0576e08b 100644 --- a/experiments/mongodb/package-lock.json +++ b/experiments/mongodb/package-lock.json @@ -5,22 +5,22 @@ "packages": { "": { "dependencies": { - "@prisma/client": "^5.4.2", - "@types/graphql-fields": "^1.3.8", - "graphql": "^16.8.1", + "@prisma/client": "^5.18.0", + "@types/graphql-fields": "^1.3.9", + "graphql": "^16.9.0", "graphql-fields": "^2.0.3", - "graphql-scalars": "^1.22.4", - "graphql-yoga": "^5.0.0", - "reflect-metadata": "^0.1.13", - "tslib": "^2.6.2", - "type-graphql": "2.0.0-beta.3" + "graphql-scalars": "^1.23.0", + "graphql-yoga": "^5.6.3", + "reflect-metadata": "0.1.13", + "tslib": "^2.6.3", + "type-graphql": "2.0.0-rc.2" }, "devDependencies": { - "@types/node": "^20.8.7", - "class-validator": "^0.14.0", - "prisma": "^5.4.2", - "ts-node": "^10.9.1", - "typescript": "~5.2.2" + "@types/node": "^22.1.0", + "class-validator": "^0.14.1", + "prisma": "^5.18.0", + "ts-node": "^10.9.2", + "typescript": "~5.5.4" } }, "node_modules/@cspotcode/source-map-support": { @@ -36,9 +36,10 @@ } }, "node_modules/@envelop/core": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@envelop/core/-/core-5.0.0.tgz", - "integrity": "sha512-aJdnH/ptv+cvwfvciCBe7TSvccBwo9g0S5f6u35TBVzRVqIGkK03lFlIL+x1cnfZgN9EfR2b1PH2galrT1CdCQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@envelop/core/-/core-5.0.1.tgz", + "integrity": "sha512-wxA8EyE1fPnlbP0nC/SFI7uU8wSNf4YjxZhAPu0P63QbgIvqHtHsH4L3/u+rsTruzhk3OvNRgQyLsMfaR9uzAQ==", + "license": "MIT", "dependencies": { "@envelop/types": "5.0.0", "tslib": "^2.5.0" @@ -51,6 +52,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/@envelop/types/-/types-5.0.0.tgz", "integrity": "sha512-IPjmgSc4KpQRlO4qbEDnBEixvtb06WDmjKfi/7fkZaryh5HuOmTtixe1EupQI5XfXO8joc3d27uUZ0QdC++euA==", + "license": "MIT", "dependencies": { "tslib": "^2.5.0" }, @@ -59,11 +61,12 @@ } }, "node_modules/@graphql-tools/executor": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/executor/-/executor-1.1.0.tgz", - "integrity": "sha512-+1wmnaUHETSYxiK/ELsT60x584Rw3QKBB7F/7fJ83HKPnLifmE2Dm/K9Eyt6L0Ppekf1jNUbWBpmBGb8P5hAeg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor/-/executor-1.3.0.tgz", + "integrity": "sha512-e+rmEf/2EO4hDnbkO8mTS2FI+jGUNmYkSDKw5TgPVlO8VOKS+TXmJBK6E9v4Gc/39yVkZsffYfW/R8obJrA0mg==", + "license": "MIT", "dependencies": { - "@graphql-tools/utils": "^10.0.0", + "@graphql-tools/utils": "^10.2.3", "@graphql-typed-document-node/core": "3.2.0", "@repeaterjs/repeater": "^3.0.4", "tslib": "^2.4.0", @@ -77,11 +80,12 @@ } }, "node_modules/@graphql-tools/merge": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-9.0.0.tgz", - "integrity": "sha512-J7/xqjkGTTwOJmaJQJ2C+VDBDOWJL3lKrHJN4yMaRLAJH3PosB7GiPRaSDZdErs0+F77sH2MKs2haMMkywzx7Q==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-9.0.4.tgz", + "integrity": "sha512-MivbDLUQ+4Q8G/Hp/9V72hbn810IJDEZQ57F01sHnlrrijyadibfVhaQfW/pNH+9T/l8ySZpaR/DpL5i+ruZ+g==", + "license": "MIT", "dependencies": { - "@graphql-tools/utils": "^10.0.0", + "@graphql-tools/utils": "^10.0.13", "tslib": "^2.4.0" }, "engines": { @@ -92,12 +96,13 @@ } }, "node_modules/@graphql-tools/schema": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-10.0.0.tgz", - "integrity": "sha512-kf3qOXMFcMs2f/S8Y3A8fm/2w+GaHAkfr3Gnhh2LOug/JgpY/ywgFVxO3jOeSpSEdoYcDKLcXVjMigNbY4AdQg==", + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-10.0.4.tgz", + "integrity": "sha512-HuIwqbKxPaJujox25Ra4qwz0uQzlpsaBOzO6CVfzB/MemZdd+Gib8AIvfhQArK0YIN40aDran/yi+E5Xf0mQww==", + "license": "MIT", "dependencies": { - "@graphql-tools/merge": "^9.0.0", - "@graphql-tools/utils": "^10.0.0", + "@graphql-tools/merge": "^9.0.3", + "@graphql-tools/utils": "^10.2.1", "tslib": "^2.4.0", "value-or-promise": "^1.0.12" }, @@ -109,11 +114,14 @@ } }, "node_modules/@graphql-tools/utils": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-10.0.1.tgz", - "integrity": "sha512-i1FozbDGHgdsFA47V/JvQZ0FE8NAy0Eiz7HGCJO2MkNdZAKNnwei66gOq0JWYVFztwpwbVQ09GkKhq7Kjcq5Cw==", + "version": "10.3.3", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-10.3.3.tgz", + "integrity": "sha512-p0zCctE+kXsXb5FCJmA3DoucQmB5eSkrtyBAaEcjbnz8OVbriSJx2WNEyzttiHv2qanBe/AK/YiyHD/5Nsj76Q==", + "license": "MIT", "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", + "cross-inspect": "1.0.1", + "dset": "^3.1.2", "tslib": "^2.4.0" }, "engines": { @@ -127,6 +135,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", + "license": "MIT", "peerDependencies": { "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } @@ -143,9 +152,10 @@ } }, "node_modules/@graphql-yoga/subscription": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@graphql-yoga/subscription/-/subscription-5.0.0.tgz", - "integrity": "sha512-Ri7sK8hmxd/kwaEa0YT8uqQUb2wOLsmBMxI90QDyf96lzOMJRgBuNYoEkU1pSgsgmW2glceZ96sRYfaXqwVxUw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@graphql-yoga/subscription/-/subscription-5.0.1.tgz", + "integrity": "sha512-1wCB1DfAnaLzS+IdoOzELGGnx1ODEg9nzQXFh4u2j02vAnne6d+v4A7HIH9EqzVdPLoAaMKXCZUUdKs+j3z1fg==", + "license": "MIT", "dependencies": { "@graphql-yoga/typed-event-target": "^3.0.0", "@repeaterjs/repeater": "^3.0.4", @@ -160,6 +170,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@graphql-yoga/typed-event-target/-/typed-event-target-3.0.0.tgz", "integrity": "sha512-w+liuBySifrstuHbFrHoHAEyVnDFVib+073q8AeAJ/qqJfvFvAwUPLLtNohR/WDVRgSasfXtl3dcNuVJWN+rjg==", + "license": "MIT", "dependencies": { "@repeaterjs/repeater": "^3.0.4", "tslib": "^2.5.2" @@ -193,14 +204,18 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@kamilkisiela/fast-url-parser": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@kamilkisiela/fast-url-parser/-/fast-url-parser-1.1.4.tgz", + "integrity": "sha512-gbkePEBupNydxCelHCESvFSFM8XPh1Zs/OAVRW/rKpEqPAl5PbOM90Si8mv9bvnR53uPD2s/FiRxdvSejpRJew==", + "license": "MIT" + }, "node_modules/@prisma/client": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.4.2.tgz", - "integrity": "sha512-2xsPaz4EaMKj1WS9iW6MlPhmbqtBsXAOeVttSePp8vTFTtvzh2hZbDgswwBdSCgPzmmwF+tLB259QzggvCmJqA==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.18.0.tgz", + "integrity": "sha512-BWivkLh+af1kqC89zCJYkHsRcyWsM8/JHpsDMM76DjP3ZdEquJhXa4IeX+HkWPnwJ5FanxEJFZZDTWiDs/Kvyw==", "hasInstallScript": true, - "dependencies": { - "@prisma/engines-version": "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574" - }, + "license": "Apache-2.0", "engines": { "node": ">=16.13" }, @@ -213,22 +228,61 @@ } } }, + "node_modules/@prisma/debug": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.18.0.tgz", + "integrity": "sha512-f+ZvpTLidSo3LMJxQPVgAxdAjzv5OpzAo/eF8qZqbwvgi2F5cTOI9XCpdRzJYA0iGfajjwjOKKrVq64vkxEfUw==", + "devOptional": true, + "license": "Apache-2.0" + }, "node_modules/@prisma/engines": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.4.2.tgz", - "integrity": "sha512-fqeucJ3LH0e1eyFdT0zRx+oETLancu5+n4lhiYECyEz6H2RDskPJHJYHkVc0LhkU4Uv7fuEnppKU3nVKNzMh8g==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.18.0.tgz", + "integrity": "sha512-ofmpGLeJ2q2P0wa/XaEgTnX/IsLnvSp/gZts0zjgLNdBhfuj2lowOOPmDcfKljLQUXMvAek3lw5T01kHmCG8rg==", "devOptional": true, - "hasInstallScript": true + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "5.18.0", + "@prisma/engines-version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "@prisma/fetch-engine": "5.18.0", + "@prisma/get-platform": "5.18.0" + } }, "node_modules/@prisma/engines-version": { - "version": "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574.tgz", - "integrity": "sha512-wvupDL4AA1vf4TQNANg7kR7y98ITqPsk6aacfBxZKtrJKRIsWjURHkZCGcQliHdqCiW/hGreO6d6ZuSv9MhdAA==" + "version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169.tgz", + "integrity": "sha512-a/+LpJj8vYU3nmtkg+N3X51ddbt35yYrRe8wqHTJtYQt7l1f8kjIBcCs6sHJvodW/EK5XGvboOiwm47fmNrbgg==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/fetch-engine": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.18.0.tgz", + "integrity": "sha512-I/3u0x2n31rGaAuBRx2YK4eB7R/1zCuayo2DGwSpGyrJWsZesrV7QVw7ND0/Suxeo/vLkJ5OwuBqHoCxvTHpOg==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "5.18.0", + "@prisma/engines-version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "@prisma/get-platform": "5.18.0" + } + }, + "node_modules/@prisma/get-platform": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.18.0.tgz", + "integrity": "sha512-Tk+m7+uhqcKDgnMnFN0lRiH7Ewea0OEsZZs9pqXa7i3+7svS3FSCqDBCaM9x5fmhhkufiG0BtunJVDka+46DlA==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "5.18.0" + } }, "node_modules/@repeaterjs/repeater": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@repeaterjs/repeater/-/repeater-3.0.4.tgz", - "integrity": "sha512-AW8PKd6iX3vAZ0vA43nOUOnbq/X5ihgU+mSXXqunMkeQADGiqw/PY0JNeYtD5sr0PAy51YPgAPbDoeapv9r8WA==" + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@repeaterjs/repeater/-/repeater-3.0.6.tgz", + "integrity": "sha512-Javneu5lsuhwNCryN+pXH93VPQ8g0dBX7wItHFgYiwQmzE1sVdg5tWHiOgHywzL2W21XQopa7IwIEnNbmeUJYA==", + "license": "MIT" }, "node_modules/@tsconfig/node10": { "version": "1.0.8", @@ -255,77 +309,87 @@ "dev": true }, "node_modules/@types/graphql-fields": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/@types/graphql-fields/-/graphql-fields-1.3.8.tgz", - "integrity": "sha512-XA3QT8f1THR3t77YT4EpFV/qF3GatLFODwUHvSmF0EjDmjxZY09yWrp9Gw6ju3zpJHGZUwN/p/HID7CaKwGHtw==", + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/@types/graphql-fields/-/graphql-fields-1.3.9.tgz", + "integrity": "sha512-HynTnp1HrE58uYcFcAK5UOfdrHSOIHDLCjvMU4yCmQLMj21uo7ZiZqnDGrD27pgCgHH5a1e8GYNK98Ndmma7ig==", + "license": "MIT", "dependencies": { "graphql": "*" } }, "node_modules/@types/node": { - "version": "20.8.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.7.tgz", - "integrity": "sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", + "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", + "license": "MIT", "dependencies": { - "undici-types": "~5.25.1" + "undici-types": "~6.13.0" } }, "node_modules/@types/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==" + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "license": "MIT" }, "node_modules/@types/validator": { - "version": "13.7.10", - "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.10.tgz", - "integrity": "sha512-t1yxFAR2n0+VO6hd/FJ9F2uezAZVWHLmpmlJzm1eX03+H7+HsuTAp7L8QJs+2pQCfWkP1+EXsGK9Z9v7o/qPVQ==", - "devOptional": true + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.12.0.tgz", + "integrity": "sha512-nH45Lk7oPIJ1RVOF6JgFI6Dy0QpHEzq4QecZhvguxYPDwT8c93prCMqAtiIttm39voZ+DDR+qkNnMpJmMBRqag==", + "devOptional": true, + "license": "MIT" }, "node_modules/@whatwg-node/events": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.1.tgz", - "integrity": "sha512-AyQEn5hIPV7Ze+xFoXVU3QTHXVbWPrzaOkxtENMPMuNL6VVHrp4hHfDt9nrQpjO7BgvuM95dMtkycX5M/DZR3w==", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.2.tgz", + "integrity": "sha512-ApcWxkrs1WmEMS2CaLLFUEem/49erT3sxIVjpzU5f6zmVcnijtDSrhoK2zVobOIikZJdH63jdAXOrvjf6eOUNQ==", + "license": "MIT", + "dependencies": { + "tslib": "^2.6.3" + }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@whatwg-node/fetch": { - "version": "0.9.13", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.13.tgz", - "integrity": "sha512-PPtMwhjtS96XROnSpowCQM85gCUG2m7AXZFw0PZlGbhzx2GK7f2iOXilfgIJ0uSlCuuGbOIzfouISkA7C4FJOw==", + "version": "0.9.19", + "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.19.tgz", + "integrity": "sha512-J+zopRcUVOhkiQYlHpxOEZuOgZtqW9xMaNQFDjESm9vRcyATms+E2/p2mZiVQGllPqWflkA3SzoJC1MxV4Pf9g==", + "license": "MIT", "dependencies": { - "@whatwg-node/node-fetch": "^0.4.17", - "urlpattern-polyfill": "^9.0.0" + "@whatwg-node/node-fetch": "^0.5.16", + "urlpattern-polyfill": "^10.0.0" }, "engines": { "node": ">=16.0.0" } }, "node_modules/@whatwg-node/node-fetch": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.4.19.tgz", - "integrity": "sha512-AW7/m2AuweAoSXmESrYQr/KBafueScNbn2iNO0u6xFr2JZdPmYsSm5yvAXYk6yDLv+eDmSSKrf7JnFZ0CsJIdA==", + "version": "0.5.20", + "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.5.20.tgz", + "integrity": "sha512-DFLsOG//CrDdIO0x7Q7Ompxj3TZhB4iMDeXpQKY4toSbIbzsKmbwyOkzXMwvV1syxvAtPoHBzyGGtDrPV424FA==", + "license": "MIT", "dependencies": { - "@whatwg-node/events": "^0.1.0", + "@kamilkisiela/fast-url-parser": "^1.1.4", "busboy": "^1.6.0", "fast-querystring": "^1.1.1", - "fast-url-parser": "^1.1.3", - "tslib": "^2.3.1" + "tslib": "^2.6.3" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@whatwg-node/server": { - "version": "0.9.14", - "resolved": "https://registry.npmjs.org/@whatwg-node/server/-/server-0.9.14.tgz", - "integrity": "sha512-I8TT0NoCP+xThLBuGlU6dgq5wpExkphNMo2geZwQW0vAmEPtc3MNMZMIYqg5GyNmpv5Nf7fnxb8tVOIHbDvuDA==", + "version": "0.9.46", + "resolved": "https://registry.npmjs.org/@whatwg-node/server/-/server-0.9.46.tgz", + "integrity": "sha512-vUKCMPP6f2BLtOxnK2c98QmK0rb24RlmXb2enbEg8nXttQLvlKfMOfaY7uNAtaMXejjR2ku/ww9EEeiWXV3Q9A==", + "license": "MIT", "dependencies": { - "@whatwg-node/fetch": "^0.9.10", - "tslib": "^2.3.1" + "@whatwg-node/fetch": "^0.9.19", + "tslib": "^2.6.3" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/acorn": { @@ -367,14 +431,15 @@ } }, "node_modules/class-validator": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.0.tgz", - "integrity": "sha512-ct3ltplN8I9fOwUd8GrP8UQixwff129BkEtuWDKL5W45cQuLd19xqmTLu5ge78YDm/fdje6FMt0hGOhl0lii3A==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.1.tgz", + "integrity": "sha512-2VEG9JICxIqTpoK1eMzZqaV+u/EiwEJkMGzTrZf6sU/fwsnOITVgYJ8yojSy6CaXtO9V0Cc6ZQZ8h8m4UBuLwQ==", "devOptional": true, + "license": "MIT", "dependencies": { - "@types/validator": "^13.7.10", - "libphonenumber-js": "^1.10.14", - "validator": "^13.7.0" + "@types/validator": "^13.11.8", + "libphonenumber-js": "^1.10.53", + "validator": "^13.9.0" } }, "node_modules/create-require": { @@ -383,6 +448,18 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, + "node_modules/cross-inspect": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cross-inspect/-/cross-inspect-1.0.1.tgz", + "integrity": "sha512-Pcw1JTvZLSJH83iiGWt6fRcT+BjZlCDRVwYLbUcHzv/CRpB7r0MlSrGbIyQvVSNyGnbt7G4AXuyCiDR3POvZ1A==", + "license": "MIT", + "dependencies": { + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -403,28 +480,23 @@ "node_modules/fast-decode-uri-component": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/fast-decode-uri-component/-/fast-decode-uri-component-1.0.1.tgz", - "integrity": "sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==" + "integrity": "sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==", + "license": "MIT" }, "node_modules/fast-querystring": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/fast-querystring/-/fast-querystring-1.1.2.tgz", "integrity": "sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==", + "license": "MIT", "dependencies": { "fast-decode-uri-component": "^1.0.1" } }, - "node_modules/fast-url-parser": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", - "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", - "dependencies": { - "punycode": "^1.3.2" - } - }, "node_modules/graphql": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.8.1.tgz", - "integrity": "sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==", + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz", + "integrity": "sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==", + "license": "MIT", "engines": { "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } @@ -446,9 +518,10 @@ } }, "node_modules/graphql-scalars": { - "version": "1.22.4", - "resolved": "https://registry.npmjs.org/graphql-scalars/-/graphql-scalars-1.22.4.tgz", - "integrity": "sha512-ILnv7jq5VKHLUyoaTFX7lgYrjCd6vTee9i8/B+D4zJKJT5TguOl0KkpPEbXHjmeor8AZYrVsrYUHdqRBMX1pjA==", + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/graphql-scalars/-/graphql-scalars-1.23.0.tgz", + "integrity": "sha512-YTRNcwitkn8CqYcleKOx9IvedA8JIERn8BRq21nlKgOr4NEcTaWEG0sT+H92eF3ALTFbPgsqfft4cw+MGgv0Gg==", + "license": "MIT", "dependencies": { "tslib": "^2.5.0" }, @@ -459,30 +532,20 @@ "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" } }, - "node_modules/graphql-subscriptions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/graphql-subscriptions/-/graphql-subscriptions-2.0.0.tgz", - "integrity": "sha512-s6k2b8mmt9gF9pEfkxsaO1lTxaySfKoEJzEfmwguBbQ//Oq23hIXCfR1hm4kdh5hnR20RdwB+s3BCb+0duHSZA==", - "dependencies": { - "iterall": "^1.3.0" - }, - "peerDependencies": { - "graphql": "^15.7.2 || ^16.0.0" - } - }, "node_modules/graphql-yoga": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/graphql-yoga/-/graphql-yoga-5.0.0.tgz", - "integrity": "sha512-ZvZlO8MHMDWuLRoDhvJQnXg8SOJD0iDaCA+M/zWuD26AlhEugOEbpnhw/645oqXTYtvHsM91WyxtV7p5XJWYMg==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/graphql-yoga/-/graphql-yoga-5.6.3.tgz", + "integrity": "sha512-JtZ3r/QdkGpdi+8XfPuG+6Nb+V5wNMg2LYChSIATes5LhcIx3pbOkm/nWoGT/SA5LqlRyp+e0sxmVNEz8qN5TQ==", + "license": "MIT", "dependencies": { - "@envelop/core": "^5.0.0", - "@graphql-tools/executor": "^1.0.0", - "@graphql-tools/schema": "^10.0.0", - "@graphql-tools/utils": "^10.0.0", + "@envelop/core": "^5.0.1", + "@graphql-tools/executor": "^1.3.0", + "@graphql-tools/schema": "^10.0.4", + "@graphql-tools/utils": "^10.3.2", "@graphql-yoga/logger": "^2.0.0", - "@graphql-yoga/subscription": "^5.0.0", - "@whatwg-node/fetch": "^0.9.7", - "@whatwg-node/server": "^0.9.1", + "@graphql-yoga/subscription": "^5.0.1", + "@whatwg-node/fetch": "^0.9.18", + "@whatwg-node/server": "^0.9.41", "dset": "^3.1.1", "lru-cache": "^10.0.0", "tslib": "^2.5.2" @@ -502,16 +565,12 @@ "node": "14 || >=16.14" } }, - "node_modules/iterall": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz", - "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==" - }, "node_modules/libphonenumber-js": { - "version": "1.10.15", - "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.15.tgz", - "integrity": "sha512-sLeVLmWX17VCKKulc+aDIRHS95TxoTsKMRJi5s5gJdwlqNzMWcBCtSHHruVyXjqfi67daXM2SnLf2juSrdx5Sg==", - "devOptional": true + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.11.5.tgz", + "integrity": "sha512-TwHR5BZxGRODtAfz03szucAkjT5OArXr+94SMtAM2pYXIlQNVMrxvb6uSCbnaJJV6QXEyICk7+l6QPgn72WHhg==", + "devOptional": true, + "license": "MIT" }, "node_modules/lodash.get": { "version": "4.4.2", @@ -536,13 +595,14 @@ "dev": true }, "node_modules/prisma": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.4.2.tgz", - "integrity": "sha512-GDMZwZy7mysB2oXU+angQqJ90iaPFdD0rHaZNkn+dio5NRkGLmMqmXs31//tg/qXT3iB0cTQwnGGQNuirhSTZg==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.18.0.tgz", + "integrity": "sha512-+TrSIxZsh64OPOmaSgVPH7ALL9dfU0jceYaMJXsNrTkFHO7/3RANi5K2ZiPB1De9+KDxCWn7jvRq8y8pvk+o9g==", "devOptional": true, "hasInstallScript": true, + "license": "Apache-2.0", "dependencies": { - "@prisma/engines": "5.4.2" + "@prisma/engines": "5.18.0" }, "bin": { "prisma": "build/index.js" @@ -551,11 +611,6 @@ "node": ">=16.13" } }, - "node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==" - }, "node_modules/reflect-metadata": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", @@ -584,10 +639,11 @@ } }, "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, + "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -627,14 +683,15 @@ } }, "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", + "license": "0BSD" }, "node_modules/type-graphql": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/type-graphql/-/type-graphql-2.0.0-beta.3.tgz", - "integrity": "sha512-5HEiQaWHPYhPmbJuMmT+IZgjsnbNWsW37osUISwgr5EpcHZ4krLl8eBoOfjFya4mxAWYshlpSO1ahaucJQqM5g==", + "version": "2.0.0-rc.2", + "resolved": "https://registry.npmjs.org/type-graphql/-/type-graphql-2.0.0-rc.2.tgz", + "integrity": "sha512-DJ8erG1cmjteMrOhFIkBHOqRM+L+wCJxvNjbbj1Y+q2r4HZkB1qOSS4ZD4AaoAfRPAp1yU23gMtmzf0jen/FFA==", "funding": [ { "type": "github", @@ -645,21 +702,22 @@ "url": "https://opencollective.com/typegraphql" } ], + "license": "MIT", "dependencies": { + "@graphql-yoga/subscription": "^5.0.0", "@types/node": "*", - "@types/semver": "^7.5.0", + "@types/semver": "^7.5.6", "graphql-query-complexity": "^0.12.0", - "graphql-subscriptions": "^2.0.0", "semver": "^7.5.4", - "tslib": "^2.6.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">= 16.16.0" + "node": ">= 18.12.0" }, "peerDependencies": { "class-validator": ">=0.14.0", - "graphql": "^16.7.1", - "graphql-scalars": "^1.22.2" + "graphql": "^16.8.1", + "graphql-scalars": "^1.23.0" }, "peerDependenciesMeta": { "class-validator": { @@ -668,10 +726,11 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -681,14 +740,16 @@ } }, "node_modules/undici-types": { - "version": "5.25.3", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", - "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==" + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==", + "license": "MIT" }, "node_modules/urlpattern-polyfill": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-9.0.0.tgz", - "integrity": "sha512-WHN8KDQblxd32odxeIgo83rdVDE2bvdkb86it7bMhYZwWKJz0+O0RK/eZiHYnM+zgt/U7hAHOlCQGfjjvSkw2g==" + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", + "license": "MIT" }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", @@ -697,10 +758,11 @@ "dev": true }, "node_modules/validator": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", - "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.12.0.tgz", + "integrity": "sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==", "devOptional": true, + "license": "MIT", "engines": { "node": ">= 0.10" } @@ -709,6 +771,7 @@ "version": "1.0.12", "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.12.tgz", "integrity": "sha512-Z6Uz+TYwEqE7ZN50gwn+1LCVo9ZVrpxRPOhOLnncYkY1ZzOYtrX8Fwf/rFktZ8R5mJms6EZf5TqNOMeZmnPq9Q==", + "license": "MIT", "engines": { "node": ">=12" } @@ -739,9 +802,9 @@ } }, "@envelop/core": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@envelop/core/-/core-5.0.0.tgz", - "integrity": "sha512-aJdnH/ptv+cvwfvciCBe7TSvccBwo9g0S5f6u35TBVzRVqIGkK03lFlIL+x1cnfZgN9EfR2b1PH2galrT1CdCQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@envelop/core/-/core-5.0.1.tgz", + "integrity": "sha512-wxA8EyE1fPnlbP0nC/SFI7uU8wSNf4YjxZhAPu0P63QbgIvqHtHsH4L3/u+rsTruzhk3OvNRgQyLsMfaR9uzAQ==", "requires": { "@envelop/types": "5.0.0", "tslib": "^2.5.0" @@ -756,11 +819,11 @@ } }, "@graphql-tools/executor": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/executor/-/executor-1.1.0.tgz", - "integrity": "sha512-+1wmnaUHETSYxiK/ELsT60x584Rw3QKBB7F/7fJ83HKPnLifmE2Dm/K9Eyt6L0Ppekf1jNUbWBpmBGb8P5hAeg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor/-/executor-1.3.0.tgz", + "integrity": "sha512-e+rmEf/2EO4hDnbkO8mTS2FI+jGUNmYkSDKw5TgPVlO8VOKS+TXmJBK6E9v4Gc/39yVkZsffYfW/R8obJrA0mg==", "requires": { - "@graphql-tools/utils": "^10.0.0", + "@graphql-tools/utils": "^10.2.3", "@graphql-typed-document-node/core": "3.2.0", "@repeaterjs/repeater": "^3.0.4", "tslib": "^2.4.0", @@ -768,31 +831,33 @@ } }, "@graphql-tools/merge": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-9.0.0.tgz", - "integrity": "sha512-J7/xqjkGTTwOJmaJQJ2C+VDBDOWJL3lKrHJN4yMaRLAJH3PosB7GiPRaSDZdErs0+F77sH2MKs2haMMkywzx7Q==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-9.0.4.tgz", + "integrity": "sha512-MivbDLUQ+4Q8G/Hp/9V72hbn810IJDEZQ57F01sHnlrrijyadibfVhaQfW/pNH+9T/l8ySZpaR/DpL5i+ruZ+g==", "requires": { - "@graphql-tools/utils": "^10.0.0", + "@graphql-tools/utils": "^10.0.13", "tslib": "^2.4.0" } }, "@graphql-tools/schema": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-10.0.0.tgz", - "integrity": "sha512-kf3qOXMFcMs2f/S8Y3A8fm/2w+GaHAkfr3Gnhh2LOug/JgpY/ywgFVxO3jOeSpSEdoYcDKLcXVjMigNbY4AdQg==", + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-10.0.4.tgz", + "integrity": "sha512-HuIwqbKxPaJujox25Ra4qwz0uQzlpsaBOzO6CVfzB/MemZdd+Gib8AIvfhQArK0YIN40aDran/yi+E5Xf0mQww==", "requires": { - "@graphql-tools/merge": "^9.0.0", - "@graphql-tools/utils": "^10.0.0", + "@graphql-tools/merge": "^9.0.3", + "@graphql-tools/utils": "^10.2.1", "tslib": "^2.4.0", "value-or-promise": "^1.0.12" } }, "@graphql-tools/utils": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-10.0.1.tgz", - "integrity": "sha512-i1FozbDGHgdsFA47V/JvQZ0FE8NAy0Eiz7HGCJO2MkNdZAKNnwei66gOq0JWYVFztwpwbVQ09GkKhq7Kjcq5Cw==", + "version": "10.3.3", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-10.3.3.tgz", + "integrity": "sha512-p0zCctE+kXsXb5FCJmA3DoucQmB5eSkrtyBAaEcjbnz8OVbriSJx2WNEyzttiHv2qanBe/AK/YiyHD/5Nsj76Q==", "requires": { "@graphql-typed-document-node/core": "^3.1.1", + "cross-inspect": "1.0.1", + "dset": "^3.1.2", "tslib": "^2.4.0" } }, @@ -811,9 +876,9 @@ } }, "@graphql-yoga/subscription": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@graphql-yoga/subscription/-/subscription-5.0.0.tgz", - "integrity": "sha512-Ri7sK8hmxd/kwaEa0YT8uqQUb2wOLsmBMxI90QDyf96lzOMJRgBuNYoEkU1pSgsgmW2glceZ96sRYfaXqwVxUw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@graphql-yoga/subscription/-/subscription-5.0.1.tgz", + "integrity": "sha512-1wCB1DfAnaLzS+IdoOzELGGnx1ODEg9nzQXFh4u2j02vAnne6d+v4A7HIH9EqzVdPLoAaMKXCZUUdKs+j3z1fg==", "requires": { "@graphql-yoga/typed-event-target": "^3.0.0", "@repeaterjs/repeater": "^3.0.4", @@ -852,29 +917,65 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "@kamilkisiela/fast-url-parser": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@kamilkisiela/fast-url-parser/-/fast-url-parser-1.1.4.tgz", + "integrity": "sha512-gbkePEBupNydxCelHCESvFSFM8XPh1Zs/OAVRW/rKpEqPAl5PbOM90Si8mv9bvnR53uPD2s/FiRxdvSejpRJew==" + }, "@prisma/client": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.4.2.tgz", - "integrity": "sha512-2xsPaz4EaMKj1WS9iW6MlPhmbqtBsXAOeVttSePp8vTFTtvzh2hZbDgswwBdSCgPzmmwF+tLB259QzggvCmJqA==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.18.0.tgz", + "integrity": "sha512-BWivkLh+af1kqC89zCJYkHsRcyWsM8/JHpsDMM76DjP3ZdEquJhXa4IeX+HkWPnwJ5FanxEJFZZDTWiDs/Kvyw==", + "requires": {} + }, + "@prisma/debug": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.18.0.tgz", + "integrity": "sha512-f+ZvpTLidSo3LMJxQPVgAxdAjzv5OpzAo/eF8qZqbwvgi2F5cTOI9XCpdRzJYA0iGfajjwjOKKrVq64vkxEfUw==", + "devOptional": true + }, + "@prisma/engines": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.18.0.tgz", + "integrity": "sha512-ofmpGLeJ2q2P0wa/XaEgTnX/IsLnvSp/gZts0zjgLNdBhfuj2lowOOPmDcfKljLQUXMvAek3lw5T01kHmCG8rg==", + "devOptional": true, "requires": { - "@prisma/engines-version": "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574" + "@prisma/debug": "5.18.0", + "@prisma/engines-version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "@prisma/fetch-engine": "5.18.0", + "@prisma/get-platform": "5.18.0" } }, - "@prisma/engines": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.4.2.tgz", - "integrity": "sha512-fqeucJ3LH0e1eyFdT0zRx+oETLancu5+n4lhiYECyEz6H2RDskPJHJYHkVc0LhkU4Uv7fuEnppKU3nVKNzMh8g==", + "@prisma/engines-version": { + "version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169.tgz", + "integrity": "sha512-a/+LpJj8vYU3nmtkg+N3X51ddbt35yYrRe8wqHTJtYQt7l1f8kjIBcCs6sHJvodW/EK5XGvboOiwm47fmNrbgg==", "devOptional": true }, - "@prisma/engines-version": { - "version": "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574.tgz", - "integrity": "sha512-wvupDL4AA1vf4TQNANg7kR7y98ITqPsk6aacfBxZKtrJKRIsWjURHkZCGcQliHdqCiW/hGreO6d6ZuSv9MhdAA==" + "@prisma/fetch-engine": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.18.0.tgz", + "integrity": "sha512-I/3u0x2n31rGaAuBRx2YK4eB7R/1zCuayo2DGwSpGyrJWsZesrV7QVw7ND0/Suxeo/vLkJ5OwuBqHoCxvTHpOg==", + "devOptional": true, + "requires": { + "@prisma/debug": "5.18.0", + "@prisma/engines-version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "@prisma/get-platform": "5.18.0" + } + }, + "@prisma/get-platform": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.18.0.tgz", + "integrity": "sha512-Tk+m7+uhqcKDgnMnFN0lRiH7Ewea0OEsZZs9pqXa7i3+7svS3FSCqDBCaM9x5fmhhkufiG0BtunJVDka+46DlA==", + "devOptional": true, + "requires": { + "@prisma/debug": "5.18.0" + } }, "@repeaterjs/repeater": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@repeaterjs/repeater/-/repeater-3.0.4.tgz", - "integrity": "sha512-AW8PKd6iX3vAZ0vA43nOUOnbq/X5ihgU+mSXXqunMkeQADGiqw/PY0JNeYtD5sr0PAy51YPgAPbDoeapv9r8WA==" + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@repeaterjs/repeater/-/repeater-3.0.6.tgz", + "integrity": "sha512-Javneu5lsuhwNCryN+pXH93VPQ8g0dBX7wItHFgYiwQmzE1sVdg5tWHiOgHywzL2W21XQopa7IwIEnNbmeUJYA==" }, "@tsconfig/node10": { "version": "1.0.8", @@ -901,65 +1002,67 @@ "dev": true }, "@types/graphql-fields": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/@types/graphql-fields/-/graphql-fields-1.3.8.tgz", - "integrity": "sha512-XA3QT8f1THR3t77YT4EpFV/qF3GatLFODwUHvSmF0EjDmjxZY09yWrp9Gw6ju3zpJHGZUwN/p/HID7CaKwGHtw==", + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/@types/graphql-fields/-/graphql-fields-1.3.9.tgz", + "integrity": "sha512-HynTnp1HrE58uYcFcAK5UOfdrHSOIHDLCjvMU4yCmQLMj21uo7ZiZqnDGrD27pgCgHH5a1e8GYNK98Ndmma7ig==", "requires": { "graphql": "*" } }, "@types/node": { - "version": "20.8.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.7.tgz", - "integrity": "sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", + "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", "requires": { - "undici-types": "~5.25.1" + "undici-types": "~6.13.0" } }, "@types/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==" + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==" }, "@types/validator": { - "version": "13.7.10", - "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.10.tgz", - "integrity": "sha512-t1yxFAR2n0+VO6hd/FJ9F2uezAZVWHLmpmlJzm1eX03+H7+HsuTAp7L8QJs+2pQCfWkP1+EXsGK9Z9v7o/qPVQ==", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.12.0.tgz", + "integrity": "sha512-nH45Lk7oPIJ1RVOF6JgFI6Dy0QpHEzq4QecZhvguxYPDwT8c93prCMqAtiIttm39voZ+DDR+qkNnMpJmMBRqag==", "devOptional": true }, "@whatwg-node/events": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.1.tgz", - "integrity": "sha512-AyQEn5hIPV7Ze+xFoXVU3QTHXVbWPrzaOkxtENMPMuNL6VVHrp4hHfDt9nrQpjO7BgvuM95dMtkycX5M/DZR3w==" + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.2.tgz", + "integrity": "sha512-ApcWxkrs1WmEMS2CaLLFUEem/49erT3sxIVjpzU5f6zmVcnijtDSrhoK2zVobOIikZJdH63jdAXOrvjf6eOUNQ==", + "requires": { + "tslib": "^2.6.3" + } }, "@whatwg-node/fetch": { - "version": "0.9.13", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.13.tgz", - "integrity": "sha512-PPtMwhjtS96XROnSpowCQM85gCUG2m7AXZFw0PZlGbhzx2GK7f2iOXilfgIJ0uSlCuuGbOIzfouISkA7C4FJOw==", + "version": "0.9.19", + "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.19.tgz", + "integrity": "sha512-J+zopRcUVOhkiQYlHpxOEZuOgZtqW9xMaNQFDjESm9vRcyATms+E2/p2mZiVQGllPqWflkA3SzoJC1MxV4Pf9g==", "requires": { - "@whatwg-node/node-fetch": "^0.4.17", - "urlpattern-polyfill": "^9.0.0" + "@whatwg-node/node-fetch": "^0.5.16", + "urlpattern-polyfill": "^10.0.0" } }, "@whatwg-node/node-fetch": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.4.19.tgz", - "integrity": "sha512-AW7/m2AuweAoSXmESrYQr/KBafueScNbn2iNO0u6xFr2JZdPmYsSm5yvAXYk6yDLv+eDmSSKrf7JnFZ0CsJIdA==", + "version": "0.5.20", + "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.5.20.tgz", + "integrity": "sha512-DFLsOG//CrDdIO0x7Q7Ompxj3TZhB4iMDeXpQKY4toSbIbzsKmbwyOkzXMwvV1syxvAtPoHBzyGGtDrPV424FA==", "requires": { - "@whatwg-node/events": "^0.1.0", + "@kamilkisiela/fast-url-parser": "^1.1.4", "busboy": "^1.6.0", "fast-querystring": "^1.1.1", - "fast-url-parser": "^1.1.3", - "tslib": "^2.3.1" + "tslib": "^2.6.3" } }, "@whatwg-node/server": { - "version": "0.9.14", - "resolved": "https://registry.npmjs.org/@whatwg-node/server/-/server-0.9.14.tgz", - "integrity": "sha512-I8TT0NoCP+xThLBuGlU6dgq5wpExkphNMo2geZwQW0vAmEPtc3MNMZMIYqg5GyNmpv5Nf7fnxb8tVOIHbDvuDA==", + "version": "0.9.46", + "resolved": "https://registry.npmjs.org/@whatwg-node/server/-/server-0.9.46.tgz", + "integrity": "sha512-vUKCMPP6f2BLtOxnK2c98QmK0rb24RlmXb2enbEg8nXttQLvlKfMOfaY7uNAtaMXejjR2ku/ww9EEeiWXV3Q9A==", "requires": { - "@whatwg-node/fetch": "^0.9.10", - "tslib": "^2.3.1" + "@whatwg-node/fetch": "^0.9.19", + "tslib": "^2.6.3" } }, "acorn": { @@ -989,14 +1092,14 @@ } }, "class-validator": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.0.tgz", - "integrity": "sha512-ct3ltplN8I9fOwUd8GrP8UQixwff129BkEtuWDKL5W45cQuLd19xqmTLu5ge78YDm/fdje6FMt0hGOhl0lii3A==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.1.tgz", + "integrity": "sha512-2VEG9JICxIqTpoK1eMzZqaV+u/EiwEJkMGzTrZf6sU/fwsnOITVgYJ8yojSy6CaXtO9V0Cc6ZQZ8h8m4UBuLwQ==", "devOptional": true, "requires": { - "@types/validator": "^13.7.10", - "libphonenumber-js": "^1.10.14", - "validator": "^13.7.0" + "@types/validator": "^13.11.8", + "libphonenumber-js": "^1.10.53", + "validator": "^13.9.0" } }, "create-require": { @@ -1005,6 +1108,14 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, + "cross-inspect": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cross-inspect/-/cross-inspect-1.0.1.tgz", + "integrity": "sha512-Pcw1JTvZLSJH83iiGWt6fRcT+BjZlCDRVwYLbUcHzv/CRpB7r0MlSrGbIyQvVSNyGnbt7G4AXuyCiDR3POvZ1A==", + "requires": { + "tslib": "^2.4.0" + } + }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -1029,18 +1140,10 @@ "fast-decode-uri-component": "^1.0.1" } }, - "fast-url-parser": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", - "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", - "requires": { - "punycode": "^1.3.2" - } - }, "graphql": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.8.1.tgz", - "integrity": "sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==" + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz", + "integrity": "sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==" }, "graphql-fields": { "version": "2.0.3", @@ -1056,34 +1159,26 @@ } }, "graphql-scalars": { - "version": "1.22.4", - "resolved": "https://registry.npmjs.org/graphql-scalars/-/graphql-scalars-1.22.4.tgz", - "integrity": "sha512-ILnv7jq5VKHLUyoaTFX7lgYrjCd6vTee9i8/B+D4zJKJT5TguOl0KkpPEbXHjmeor8AZYrVsrYUHdqRBMX1pjA==", + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/graphql-scalars/-/graphql-scalars-1.23.0.tgz", + "integrity": "sha512-YTRNcwitkn8CqYcleKOx9IvedA8JIERn8BRq21nlKgOr4NEcTaWEG0sT+H92eF3ALTFbPgsqfft4cw+MGgv0Gg==", "requires": { "tslib": "^2.5.0" } }, - "graphql-subscriptions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/graphql-subscriptions/-/graphql-subscriptions-2.0.0.tgz", - "integrity": "sha512-s6k2b8mmt9gF9pEfkxsaO1lTxaySfKoEJzEfmwguBbQ//Oq23hIXCfR1hm4kdh5hnR20RdwB+s3BCb+0duHSZA==", - "requires": { - "iterall": "^1.3.0" - } - }, "graphql-yoga": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/graphql-yoga/-/graphql-yoga-5.0.0.tgz", - "integrity": "sha512-ZvZlO8MHMDWuLRoDhvJQnXg8SOJD0iDaCA+M/zWuD26AlhEugOEbpnhw/645oqXTYtvHsM91WyxtV7p5XJWYMg==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/graphql-yoga/-/graphql-yoga-5.6.3.tgz", + "integrity": "sha512-JtZ3r/QdkGpdi+8XfPuG+6Nb+V5wNMg2LYChSIATes5LhcIx3pbOkm/nWoGT/SA5LqlRyp+e0sxmVNEz8qN5TQ==", "requires": { - "@envelop/core": "^5.0.0", - "@graphql-tools/executor": "^1.0.0", - "@graphql-tools/schema": "^10.0.0", - "@graphql-tools/utils": "^10.0.0", + "@envelop/core": "^5.0.1", + "@graphql-tools/executor": "^1.3.0", + "@graphql-tools/schema": "^10.0.4", + "@graphql-tools/utils": "^10.3.2", "@graphql-yoga/logger": "^2.0.0", - "@graphql-yoga/subscription": "^5.0.0", - "@whatwg-node/fetch": "^0.9.7", - "@whatwg-node/server": "^0.9.1", + "@graphql-yoga/subscription": "^5.0.1", + "@whatwg-node/fetch": "^0.9.18", + "@whatwg-node/server": "^0.9.41", "dset": "^3.1.1", "lru-cache": "^10.0.0", "tslib": "^2.5.2" @@ -1096,15 +1191,10 @@ } } }, - "iterall": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz", - "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==" - }, "libphonenumber-js": { - "version": "1.10.15", - "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.15.tgz", - "integrity": "sha512-sLeVLmWX17VCKKulc+aDIRHS95TxoTsKMRJi5s5gJdwlqNzMWcBCtSHHruVyXjqfi67daXM2SnLf2juSrdx5Sg==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.11.5.tgz", + "integrity": "sha512-TwHR5BZxGRODtAfz03szucAkjT5OArXr+94SMtAM2pYXIlQNVMrxvb6uSCbnaJJV6QXEyICk7+l6QPgn72WHhg==", "devOptional": true }, "lodash.get": { @@ -1127,19 +1217,14 @@ "dev": true }, "prisma": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.4.2.tgz", - "integrity": "sha512-GDMZwZy7mysB2oXU+angQqJ90iaPFdD0rHaZNkn+dio5NRkGLmMqmXs31//tg/qXT3iB0cTQwnGGQNuirhSTZg==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.18.0.tgz", + "integrity": "sha512-+TrSIxZsh64OPOmaSgVPH7ALL9dfU0jceYaMJXsNrTkFHO7/3RANi5K2ZiPB1De9+KDxCWn7jvRq8y8pvk+o9g==", "devOptional": true, "requires": { - "@prisma/engines": "5.4.2" + "@prisma/engines": "5.18.0" } }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==" - }, "reflect-metadata": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", @@ -1159,9 +1244,9 @@ "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==" }, "ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "requires": { "@cspotcode/source-map-support": "^0.8.0", @@ -1180,38 +1265,38 @@ } }, "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" }, "type-graphql": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/type-graphql/-/type-graphql-2.0.0-beta.3.tgz", - "integrity": "sha512-5HEiQaWHPYhPmbJuMmT+IZgjsnbNWsW37osUISwgr5EpcHZ4krLl8eBoOfjFya4mxAWYshlpSO1ahaucJQqM5g==", + "version": "2.0.0-rc.2", + "resolved": "https://registry.npmjs.org/type-graphql/-/type-graphql-2.0.0-rc.2.tgz", + "integrity": "sha512-DJ8erG1cmjteMrOhFIkBHOqRM+L+wCJxvNjbbj1Y+q2r4HZkB1qOSS4ZD4AaoAfRPAp1yU23gMtmzf0jen/FFA==", "requires": { + "@graphql-yoga/subscription": "^5.0.0", "@types/node": "*", - "@types/semver": "^7.5.0", + "@types/semver": "^7.5.6", "graphql-query-complexity": "^0.12.0", - "graphql-subscriptions": "^2.0.0", "semver": "^7.5.4", - "tslib": "^2.6.0" + "tslib": "^2.6.2" } }, "typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "dev": true }, "undici-types": { - "version": "5.25.3", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", - "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==" + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==" }, "urlpattern-polyfill": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-9.0.0.tgz", - "integrity": "sha512-WHN8KDQblxd32odxeIgo83rdVDE2bvdkb86it7bMhYZwWKJz0+O0RK/eZiHYnM+zgt/U7hAHOlCQGfjjvSkw2g==" + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==" }, "v8-compile-cache-lib": { "version": "3.0.1", @@ -1220,9 +1305,9 @@ "dev": true }, "validator": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", - "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.12.0.tgz", + "integrity": "sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==", "devOptional": true }, "value-or-promise": { diff --git a/experiments/mongodb/package.json b/experiments/mongodb/package.json index 396b288be..b76f6d58a 100644 --- a/experiments/mongodb/package.json +++ b/experiments/mongodb/package.json @@ -6,22 +6,22 @@ "seed": "prisma db seed" }, "dependencies": { - "@prisma/client": "^5.4.2", - "@types/graphql-fields": "^1.3.8", - "graphql": "^16.8.1", + "@prisma/client": "^5.18.0", + "@types/graphql-fields": "^1.3.9", + "graphql": "^16.9.0", "graphql-fields": "^2.0.3", - "graphql-scalars": "^1.22.4", - "graphql-yoga": "^5.0.0", - "reflect-metadata": "^0.1.13", - "tslib": "^2.6.2", - "type-graphql": "2.0.0-beta.3" + "graphql-scalars": "^1.23.0", + "graphql-yoga": "^5.6.3", + "reflect-metadata": "0.1.13", + "tslib": "^2.6.3", + "type-graphql": "2.0.0-rc.2" }, "devDependencies": { - "@types/node": "^20.8.7", - "class-validator": "^0.14.0", - "prisma": "^5.4.2", - "ts-node": "^10.9.1", - "typescript": "~5.2.2" + "@types/node": "^22.1.0", + "class-validator": "^0.14.1", + "prisma": "^5.18.0", + "ts-node": "^10.9.2", + "typescript": "~5.5.4" }, "prisma": { "seed": "ts-node ./prisma/seed.ts" diff --git a/experiments/mongodb/prisma/generated/client/default.d.ts b/experiments/mongodb/prisma/generated/client/default.d.ts new file mode 100644 index 000000000..34c616106 --- /dev/null +++ b/experiments/mongodb/prisma/generated/client/default.d.ts @@ -0,0 +1 @@ +export * from './index' \ No newline at end of file diff --git a/experiments/mongodb/prisma/generated/client/default.js b/experiments/mongodb/prisma/generated/client/default.js new file mode 100644 index 000000000..fa52f0cd2 --- /dev/null +++ b/experiments/mongodb/prisma/generated/client/default.js @@ -0,0 +1 @@ +module.exports = { ...require('.') } \ No newline at end of file diff --git a/experiments/mongodb/prisma/generated/client/edge.d.ts b/experiments/mongodb/prisma/generated/client/edge.d.ts index 34c616106..479a9ab23 100644 --- a/experiments/mongodb/prisma/generated/client/edge.d.ts +++ b/experiments/mongodb/prisma/generated/client/edge.d.ts @@ -1 +1 @@ -export * from './index' \ No newline at end of file +export * from './default' \ No newline at end of file diff --git a/experiments/mongodb/prisma/generated/client/edge.js b/experiments/mongodb/prisma/generated/client/edge.js index 769fc6335..4fbcd3c0c 100644 --- a/experiments/mongodb/prisma/generated/client/edge.js +++ b/experiments/mongodb/prisma/generated/client/edge.js @@ -21,7 +21,8 @@ const { warnOnce, defineDmmfProperty, Public, -} = require('./runtime/edge') + getRuntime +} = require('./runtime/edge.js') const Prisma = {} @@ -30,12 +31,12 @@ exports.Prisma = Prisma exports.$Enums = {} /** - * Prisma Client JS version: 5.4.2 - * Query Engine version: ac9d7041ed77bcc8a8dbd2ab6616b39013829574 + * Prisma Client JS version: 5.18.0 + * Query Engine version: 4c784e32044a8a016d99474bd02a3b6123742169 */ Prisma.prismaVersion = { - client: "5.4.2", - engine: "ac9d7041ed77bcc8a8dbd2ab6616b39013829574" + client: "5.18.0", + engine: "4c784e32044a8a016d99474bd02a3b6123742169" } Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; @@ -140,6 +141,7 @@ const config = { } ], "previewFeatures": [], + "sourceFilePath": "/home/majkel/development/typegraphql-prisma/experiments/mongodb/prisma/schema.prisma", "isCustomOutput": true }, "relativeEnvPaths": { @@ -147,8 +149,8 @@ const config = { "schemaEnvPath": "../../.env" }, "relativePath": "../..", - "clientVersion": "5.4.2", - "engineVersion": "ac9d7041ed77bcc8a8dbd2ab6616b39013829574", + "clientVersion": "5.18.0", + "engineVersion": "4c784e32044a8a016d99474bd02a3b6123742169", "datasourceNames": [ "db" ], @@ -162,15 +164,15 @@ const config = { } } }, - "inlineSchema": "ZGF0YXNvdXJjZSBkYiB7CiAgcHJvdmlkZXIgPSAibW9uZ29kYiIKICB1cmwgICAgICA9IGVudigiREFUQUJBU0VfVVJMIikKfQoKZ2VuZXJhdG9yIGNsaWVudCB7CiAgcHJvdmlkZXIgPSAicHJpc21hLWNsaWVudC1qcyIKICAvLyBiaW5hcnlUYXJnZXRzICAgPSBbIndpbmRvd3MiLCAiZGViaWFuLW9wZW5zc2wtMS4xLngiXQogIG91dHB1dCAgID0gIi4uL3ByaXNtYS9nZW5lcmF0ZWQvY2xpZW50Igp9CgpnZW5lcmF0b3IgdHlwZWdyYXBocWwgewogIHByb3ZpZGVyICAgICAgICAgICAgICAgPSAibm9kZSAuLi8uLi9zcmMvY2xpL2Rldi50cyIKICBvdXRwdXQgICAgICAgICAgICAgICAgID0gIi4uL3ByaXNtYS9nZW5lcmF0ZWQvdHlwZS1ncmFwaHFsIgogIGVtaXRETU1GICAgICAgICAgICAgICAgPSB0cnVlCiAgLy8gZW1pdFRyYW5zcGlsZWRDb2RlICAgICAgID0gdHJ1ZQogIC8vIHNpbXBsZVJlc29sdmVycyAgICAgICAgICA9IGZhbHNlCiAgLy8gdXNlT3JpZ2luYWxNYXBwaW5nICAgICAgID0gdHJ1ZQogIC8vIHVzZVVuY2hlY2tlZFNjYWxhcklucHV0cyA9IGZhbHNlCiAgLy8gZW1pdElkQXNJRFR5cGUgICAgICAgICAgID0gdHJ1ZQogIGN1c3RvbVByaXNtYUltcG9ydFBhdGggPSAiLi4vY2xpZW50IgogIHVzZVNpbXBsZUlucHV0cyAgICAgICAgPSB0cnVlCn0KCm1vZGVsIFBvc3QgewogIGlkICAgICAgIFN0cmluZyAgICBAaWQgQGRlZmF1bHQoYXV0bygpKSBAbWFwKCJfaWQiKSBAZGIuT2JqZWN0SWQKICBzbHVnICAgICBTdHJpbmcgICAgQHVuaXF1ZQogIHRpdGxlICAgIFN0cmluZwogIGJvZHkgICAgIFN0cmluZwogIGNvbW1lbnRzIENvbW1lbnRbXQogIGF1dGhvciAgIFVzZXIgICAgICBAcmVsYXRpb24oZmllbGRzOiBbYXV0aG9ySWRdLCByZWZlcmVuY2VzOiBbaWRdKQogIGF1dGhvcklkIFN0cmluZyAgICBAZGIuT2JqZWN0SWQKfQoKbW9kZWwgQ29tbWVudCB7CiAgaWQgICAgICBTdHJpbmcgQGlkIEBkZWZhdWx0KGF1dG8oKSkgQG1hcCgiX2lkIikgQGRiLk9iamVjdElkCiAgcG9zdCAgICBQb3N0ICAgQHJlbGF0aW9uKGZpZWxkczogW3Bvc3RJZF0sIHJlZmVyZW5jZXM6IFtpZF0pCiAgcG9zdElkICBTdHJpbmcgQGRiLk9iamVjdElkCiAgY29tbWVudCBTdHJpbmcKfQoKbW9kZWwgVXNlciB7CiAgaWQgICAgICBTdHJpbmcgICAgICBAaWQgQGRlZmF1bHQoYXV0bygpKSBAbWFwKCJfaWQiKSBAZGIuT2JqZWN0SWQKICBlbWFpbCAgIFN0cmluZyAgICAgIEB1bmlxdWUKICBhZ2UgICAgIEludD8KICBhZGRyZXNzIFVzZXJBZGRyZXNzCiAgcG9zdHMgICBQb3N0W10KfQoKdHlwZSBVc2VyQWRkcmVzcyB7CiAgc3RyZWV0IFN0cmluZwogIG51bWJlciBJbnQ/CiAgY2l0eSAgIFN0cmluZwp9Cg==", + "inlineSchema": "datasource db {\n provider = \"mongodb\"\n url = env(\"DATABASE_URL\")\n}\n\ngenerator client {\n provider = \"prisma-client-js\"\n // binaryTargets = [\"windows\", \"debian-openssl-1.1.x\"]\n output = \"../prisma/generated/client\"\n}\n\ngenerator typegraphql {\n provider = \"node ../../src/cli/dev.ts\"\n output = \"../prisma/generated/type-graphql\"\n emitDMMF = true\n // emitTranspiledCode = true\n // simpleResolvers = false\n // useOriginalMapping = true\n // useUncheckedScalarInputs = false\n // emitIdAsIDType = true\n customPrismaImportPath = \"../client\"\n useSimpleInputs = true\n}\n\nmodel Post {\n id String @id @default(auto()) @map(\"_id\") @db.ObjectId\n slug String @unique\n title String\n body String\n comments Comment[]\n author User @relation(fields: [authorId], references: [id])\n authorId String @db.ObjectId\n}\n\nmodel Comment {\n id String @id @default(auto()) @map(\"_id\") @db.ObjectId\n post Post @relation(fields: [postId], references: [id])\n postId String @db.ObjectId\n comment String\n}\n\nmodel User {\n id String @id @default(auto()) @map(\"_id\") @db.ObjectId\n email String @unique\n age Int?\n address UserAddress\n posts Post[]\n}\n\ntype UserAddress {\n street String\n number Int?\n city String\n}\n", "inlineSchemaHash": "cc478790d691f8ff87571dc028545690a3fc9c07fcd87a4f5e05ef109e1825b9", - "noEngine": false + "copyEngine": true } config.dirname = '/' config.runtimeDataModel = JSON.parse("{\"models\":{\"Post\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"dbName\":\"_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"auto\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"slug\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"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\":\"body\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"comments\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Comment\",\"relationName\":\"CommentToPost\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"author\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"PostToUser\",\"relationFromFields\":[\"authorId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"authorId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Comment\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"dbName\":\"_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"auto\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"post\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Post\",\"relationName\":\"CommentToPost\",\"relationFromFields\":[\"postId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"comment\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"User\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"dbName\":\"_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"auto\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"age\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"address\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserAddress\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"posts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Post\",\"relationName\":\"PostToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{\"UserAddress\":{\"dbName\":null,\"fields\":[{\"name\":\"street\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\"},{\"name\":\"number\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\"},{\"name\":\"city\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\"}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[]}}}") defineDmmfProperty(exports.Prisma, config.runtimeDataModel) - +config.engineWasm = undefined config.injectableEdgeEnv = () => ({ parsed: { diff --git a/experiments/mongodb/prisma/generated/client/index-browser.js b/experiments/mongodb/prisma/generated/client/index-browser.js index 66226615d..fd1885a67 100644 --- a/experiments/mongodb/prisma/generated/client/index-browser.js +++ b/experiments/mongodb/prisma/generated/client/index-browser.js @@ -6,8 +6,8 @@ const { objectEnumValues, makeStrictEnum, Public, - detectRuntime, -} = require('./runtime/index-browser') + getRuntime, +} = require('./runtime/index-browser.js') const Prisma = {} @@ -16,37 +16,43 @@ exports.Prisma = Prisma exports.$Enums = {} /** - * Prisma Client JS version: 5.4.2 - * Query Engine version: ac9d7041ed77bcc8a8dbd2ab6616b39013829574 + * Prisma Client JS version: 5.18.0 + * Query Engine version: 4c784e32044a8a016d99474bd02a3b6123742169 */ Prisma.prismaVersion = { - client: "5.4.2", - engine: "ac9d7041ed77bcc8a8dbd2ab6616b39013829574" + client: "5.18.0", + engine: "4c784e32044a8a016d99474bd02a3b6123742169" } Prisma.PrismaClientKnownRequestError = () => { - throw new Error(`PrismaClientKnownRequestError is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 = () => { - throw new Error(`PrismaClientUnknownRequestError is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 = () => { - throw new Error(`PrismaClientRustPanicError is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 = () => { - throw new Error(`PrismaClientInitializationError is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 = () => { - throw new Error(`PrismaClientValidationError is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 = () => { - throw new Error(`NotFoundError is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 @@ -54,20 +60,24 @@ Prisma.Decimal = Decimal * Re-export of sql-template-tag */ Prisma.sql = () => { - throw new Error(`sqltag is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 = () => { - throw new Error(`empty is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 = () => { - throw new Error(`join is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 = () => { - throw new Error(`raw is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 @@ -75,12 +85,14 @@ Prisma.validator = Public.validator * Extensions */ Prisma.getExtensionContext = () => { - throw new Error(`Extensions.getExtensionContext is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 = () => { - throw new Error(`Extensions.defineExtension is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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`, )} /** @@ -144,23 +156,19 @@ class PrismaClient { constructor() { return new Proxy(this, { get(target, prop) { - const runtime = detectRuntime() - const edgeRuntimeName = { - 'workerd': 'Cloudflare Workers', - 'deno': 'Deno and Deno Deploy', - 'netlify': 'Netlify Edge Functions', - 'edge-light': 'Vercel Edge Functions', - }[runtime] - - let message = 'PrismaClient is unable to run in ' - if (edgeRuntimeName !== undefined) { - message += edgeRuntimeName + '. As an alternative, try Accelerate: https://pris.ly/d/accelerate.' + 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 += 'this browser environment, or has been bundled for the browser (running in `' + runtime + '`).' + 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://github.com/prisma/prisma/issues` +If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` throw new Error(message) } diff --git a/experiments/mongodb/prisma/generated/client/index.d.ts b/experiments/mongodb/prisma/generated/client/index.d.ts index 987224b33..a3a1368d0 100644 --- a/experiments/mongodb/prisma/generated/client/index.d.ts +++ b/experiments/mongodb/prisma/generated/client/index.d.ts @@ -3,7 +3,7 @@ * Client **/ -import * as runtime from './runtime/library'; +import * as runtime from './runtime/library.js'; import $Types = runtime.Types // general types import $Public = runtime.Types.Public import $Utils = runtime.Types.Utils @@ -49,8 +49,8 @@ export type User = $Result.DefaultSelection * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). */ export class PrismaClient< - T extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, - U = 'log' extends keyof T ? T['log'] extends Array ? Prisma.GetEvents : never : never, + 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'] } @@ -70,7 +70,7 @@ export class PrismaClient< * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). */ - constructor(optionsArg ?: Prisma.Subset); + constructor(optionsArg ?: Prisma.Subset); $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): void; /** @@ -122,7 +122,7 @@ export class PrismaClient< */ $runCommandRaw(command: Prisma.InputJsonObject): Prisma.PrismaPromise - $extends: $Extensions.ExtendsHook<'extends', Prisma.TypeMapCb, ExtArgs> + $extends: $Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs> /** * `prisma.post`: Exposes CRUD operations for the **Post** model. @@ -210,8 +210,8 @@ export namespace Prisma { export import Exact = $Public.Exact /** - * Prisma Client JS version: 5.4.2 - * Query Engine version: ac9d7041ed77bcc8a8dbd2ab6616b39013829574 + * Prisma Client JS version: 5.18.0 + * Query Engine version: 4c784e32044a8a016d99474bd02a3b6123742169 */ export type PrismaVersion = { client: string @@ -338,6 +338,11 @@ export namespace Prisma { include: any } + type SelectAndOmit = { + select: any + omit: any + } + /** * Get the type of the value, that the Promise holds. */ @@ -386,7 +391,9 @@ export namespace Prisma { } & (T extends SelectAndInclude ? 'Please either choose `select` or `include`.' - : {}) + : T extends SelectAndOmit + ? 'Please either choose `select` or `omit`.' + : {}) /** * Subset + Intersection @@ -635,87 +642,86 @@ export namespace Prisma { db?: Datasource } - - interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs}, $Utils.Record> { - returns: Prisma.TypeMap + interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs, clientOptions: PrismaClientOptions }, $Utils.Record> { + returns: Prisma.TypeMap } - export type TypeMap = { + export type TypeMap = { meta: { - modelProps: 'post' | 'comment' | 'user' + modelProps: "post" | "comment" | "user" txIsolationLevel: never - }, + } model: { Post: { payload: Prisma.$PostPayload fields: Prisma.PostFieldRefs operations: { findUnique: { - args: Prisma.PostFindUniqueArgs, + args: Prisma.PostFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.PostFindUniqueOrThrowArgs, + args: Prisma.PostFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { - args: Prisma.PostFindFirstArgs, + args: Prisma.PostFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.PostFindFirstOrThrowArgs, + args: Prisma.PostFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { - args: Prisma.PostFindManyArgs, + args: Prisma.PostFindManyArgs result: $Utils.PayloadToResult[] } create: { - args: Prisma.PostCreateArgs, + args: Prisma.PostCreateArgs result: $Utils.PayloadToResult } createMany: { - args: Prisma.PostCreateManyArgs, - result: Prisma.BatchPayload + args: Prisma.PostCreateManyArgs + result: BatchPayload } delete: { - args: Prisma.PostDeleteArgs, + args: Prisma.PostDeleteArgs result: $Utils.PayloadToResult } update: { - args: Prisma.PostUpdateArgs, + args: Prisma.PostUpdateArgs result: $Utils.PayloadToResult } deleteMany: { - args: Prisma.PostDeleteManyArgs, - result: Prisma.BatchPayload + args: Prisma.PostDeleteManyArgs + result: BatchPayload } updateMany: { - args: Prisma.PostUpdateManyArgs, - result: Prisma.BatchPayload + args: Prisma.PostUpdateManyArgs + result: BatchPayload } upsert: { - args: Prisma.PostUpsertArgs, + args: Prisma.PostUpsertArgs result: $Utils.PayloadToResult } aggregate: { - args: Prisma.PostAggregateArgs, + args: Prisma.PostAggregateArgs result: $Utils.Optional } groupBy: { - args: Prisma.PostGroupByArgs, + args: Prisma.PostGroupByArgs result: $Utils.Optional[] } findRaw: { - args: Prisma.PostFindRawArgs, - result: Prisma.JsonObject + args: Prisma.PostFindRawArgs + result: JsonObject } aggregateRaw: { - args: Prisma.PostAggregateRawArgs, - result: Prisma.JsonObject + args: Prisma.PostAggregateRawArgs + result: JsonObject } count: { - args: Prisma.PostCountArgs, + args: Prisma.PostCountArgs result: $Utils.Optional | number } } @@ -725,71 +731,71 @@ export namespace Prisma { fields: Prisma.CommentFieldRefs operations: { findUnique: { - args: Prisma.CommentFindUniqueArgs, + args: Prisma.CommentFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.CommentFindUniqueOrThrowArgs, + args: Prisma.CommentFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { - args: Prisma.CommentFindFirstArgs, + args: Prisma.CommentFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.CommentFindFirstOrThrowArgs, + args: Prisma.CommentFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { - args: Prisma.CommentFindManyArgs, + args: Prisma.CommentFindManyArgs result: $Utils.PayloadToResult[] } create: { - args: Prisma.CommentCreateArgs, + args: Prisma.CommentCreateArgs result: $Utils.PayloadToResult } createMany: { - args: Prisma.CommentCreateManyArgs, - result: Prisma.BatchPayload + args: Prisma.CommentCreateManyArgs + result: BatchPayload } delete: { - args: Prisma.CommentDeleteArgs, + args: Prisma.CommentDeleteArgs result: $Utils.PayloadToResult } update: { - args: Prisma.CommentUpdateArgs, + args: Prisma.CommentUpdateArgs result: $Utils.PayloadToResult } deleteMany: { - args: Prisma.CommentDeleteManyArgs, - result: Prisma.BatchPayload + args: Prisma.CommentDeleteManyArgs + result: BatchPayload } updateMany: { - args: Prisma.CommentUpdateManyArgs, - result: Prisma.BatchPayload + args: Prisma.CommentUpdateManyArgs + result: BatchPayload } upsert: { - args: Prisma.CommentUpsertArgs, + args: Prisma.CommentUpsertArgs result: $Utils.PayloadToResult } aggregate: { - args: Prisma.CommentAggregateArgs, + args: Prisma.CommentAggregateArgs result: $Utils.Optional } groupBy: { - args: Prisma.CommentGroupByArgs, + args: Prisma.CommentGroupByArgs result: $Utils.Optional[] } findRaw: { - args: Prisma.CommentFindRawArgs, - result: Prisma.JsonObject + args: Prisma.CommentFindRawArgs + result: JsonObject } aggregateRaw: { - args: Prisma.CommentAggregateRawArgs, - result: Prisma.JsonObject + args: Prisma.CommentAggregateRawArgs + result: JsonObject } count: { - args: Prisma.CommentCountArgs, + args: Prisma.CommentCountArgs result: $Utils.Optional | number } } @@ -799,71 +805,71 @@ export namespace Prisma { fields: Prisma.UserFieldRefs operations: { findUnique: { - args: Prisma.UserFindUniqueArgs, + args: Prisma.UserFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.UserFindUniqueOrThrowArgs, + args: Prisma.UserFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { - args: Prisma.UserFindFirstArgs, + args: Prisma.UserFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.UserFindFirstOrThrowArgs, + args: Prisma.UserFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { - args: Prisma.UserFindManyArgs, + args: Prisma.UserFindManyArgs result: $Utils.PayloadToResult[] } create: { - args: Prisma.UserCreateArgs, + args: Prisma.UserCreateArgs result: $Utils.PayloadToResult } createMany: { - args: Prisma.UserCreateManyArgs, - result: Prisma.BatchPayload + args: Prisma.UserCreateManyArgs + result: BatchPayload } delete: { - args: Prisma.UserDeleteArgs, + args: Prisma.UserDeleteArgs result: $Utils.PayloadToResult } update: { - args: Prisma.UserUpdateArgs, + args: Prisma.UserUpdateArgs result: $Utils.PayloadToResult } deleteMany: { - args: Prisma.UserDeleteManyArgs, - result: Prisma.BatchPayload + args: Prisma.UserDeleteManyArgs + result: BatchPayload } updateMany: { - args: Prisma.UserUpdateManyArgs, - result: Prisma.BatchPayload + args: Prisma.UserUpdateManyArgs + result: BatchPayload } upsert: { - args: Prisma.UserUpsertArgs, + args: Prisma.UserUpsertArgs result: $Utils.PayloadToResult } aggregate: { - args: Prisma.UserAggregateArgs, + args: Prisma.UserAggregateArgs result: $Utils.Optional } groupBy: { - args: Prisma.UserGroupByArgs, + args: Prisma.UserGroupByArgs result: $Utils.Optional[] } findRaw: { - args: Prisma.UserFindRawArgs, - result: Prisma.JsonObject + args: Prisma.UserFindRawArgs + result: JsonObject } aggregateRaw: { - args: Prisma.UserAggregateRawArgs, - result: Prisma.JsonObject + args: Prisma.UserAggregateRawArgs + result: JsonObject } count: { - args: Prisma.UserCountArgs, + args: Prisma.UserCountArgs result: $Utils.Optional | number } } @@ -880,7 +886,7 @@ export namespace Prisma { } } } - export const defineExtension: $Extensions.ExtendsHook<'define', Prisma.TypeMapCb, $Extensions.DefaultArgs> + export const defineExtension: $Extensions.ExtendsHook<"define", Prisma.TypeMapCb, $Extensions.DefaultArgs> export type DefaultPrismaClient = PrismaClient export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' export interface PrismaClientOptions { @@ -913,8 +919,18 @@ export namespace Prisma { * 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 + } } + /* Types for Logging */ export type LogLevel = 'info' | 'query' | 'warn' | 'error' export type LogDefinition = { @@ -951,6 +967,7 @@ export namespace Prisma { | 'findFirstOrThrow' | 'create' | 'createMany' + | 'createManyAndReturn' | 'update' | 'updateMany' | 'upsert' @@ -1013,7 +1030,6 @@ export namespace Prisma { } // Custom InputTypes - /** * PostCountOutputType without action */ @@ -1024,7 +1040,6 @@ export namespace Prisma { select?: PostCountOutputTypeSelect | null } - /** * PostCountOutputType without action */ @@ -1033,7 +1048,6 @@ export namespace Prisma { } - /** * Count Type UserCountOutputType */ @@ -1047,7 +1061,6 @@ export namespace Prisma { } // Custom InputTypes - /** * UserCountOutputType without action */ @@ -1058,7 +1071,6 @@ export namespace Prisma { select?: UserCountOutputTypeSelect | null } - /** * UserCountOutputType without action */ @@ -1067,7 +1079,6 @@ export namespace Prisma { } - /** * Models */ @@ -1086,6 +1097,7 @@ export namespace Prisma { city?: boolean }, ExtArgs["result"]["userAddress"]> + export type UserAddressSelectScalar = { street?: boolean number?: boolean @@ -1104,7 +1116,6 @@ export namespace Prisma { composites: {} } - type UserAddressGetPayload = $Result.GetResult @@ -1122,7 +1133,6 @@ export namespace Prisma { // Custom InputTypes - /** * UserAddress without action */ @@ -1134,7 +1144,6 @@ export namespace Prisma { } - /** * Model Post */ @@ -1304,6 +1313,7 @@ export namespace Prisma { _count?: boolean | PostCountOutputTypeDefaultArgs }, ExtArgs["result"]["post"]> + export type PostSelectScalar = { id?: boolean slug?: boolean @@ -1318,7 +1328,6 @@ export namespace Prisma { _count?: boolean | PostCountOutputTypeDefaultArgs } - export type $PostPayload = { name: "Post" objects: { @@ -1335,11 +1344,10 @@ export namespace Prisma { composites: {} } - type PostGetPayload = $Result.GetResult type PostCountArgs = - Omit & { + Omit & { select?: PostCountAggregateInputType | true } @@ -1355,14 +1363,12 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUnique>( - args: SelectSubset> - ): Prisma__PostClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> + */ + findUnique(args: SelectSubset>): Prisma__PostClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** - * Find one Post that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. + * Find one Post that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. * @param {PostFindUniqueOrThrowArgs} args - Arguments to find a Post * @example * // Get one Post @@ -1371,10 +1377,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__PostClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__PostClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first Post that matches the filter. @@ -1388,10 +1392,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirst>( - args?: SelectSubset> - ): Prisma__PostClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> + */ + findFirst(args?: SelectSubset>): Prisma__PostClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first Post that matches the filter or @@ -1406,16 +1408,14 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__PostClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__PostClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** * Find zero or more Posts 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 {PostFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {PostFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Posts * const posts = await prisma.post.findMany() @@ -1426,10 +1426,8 @@ export namespace Prisma { * // Only select the `id` * const postWithIdOnly = await prisma.post.findMany({ select: { id: true } }) * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a Post. @@ -1442,26 +1440,22 @@ export namespace Prisma { * } * }) * - **/ - create>( - args: SelectSubset> - ): Prisma__PostClient<$Result.GetResult, T, 'create'>, never, ExtArgs> + */ + create(args: SelectSubset>): Prisma__PostClient<$Result.GetResult, T, "create">, never, ExtArgs> /** * Create many Posts. - * @param {PostCreateManyArgs} args - Arguments to create many Posts. - * @example - * // Create many Posts - * const post = await prisma.post.createMany({ - * data: { - * // ... provide data here - * } - * }) + * @param {PostCreateManyArgs} args - Arguments to create many Posts. + * @example + * // Create many Posts + * const post = await prisma.post.createMany({ + * data: [ + * // ... provide data here + * ] + * }) * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Delete a Post. @@ -1474,10 +1468,8 @@ export namespace Prisma { * } * }) * - **/ - delete>( - args: SelectSubset> - ): Prisma__PostClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> + */ + delete(args: SelectSubset>): Prisma__PostClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one Post. @@ -1493,10 +1485,8 @@ export namespace Prisma { * } * }) * - **/ - update>( - args: SelectSubset> - ): Prisma__PostClient<$Result.GetResult, T, 'update'>, never, ExtArgs> + */ + update(args: SelectSubset>): Prisma__PostClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more Posts. @@ -1509,10 +1499,8 @@ export namespace Prisma { * } * }) * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Posts. @@ -1530,10 +1518,8 @@ export namespace Prisma { * } * }) * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one Post. @@ -1551,10 +1537,8 @@ export namespace Prisma { * // ... the filter for the Post we want to update * } * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__PostClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> + */ + upsert(args: SelectSubset>): Prisma__PostClient<$Result.GetResult, T, "upsert">, never, ExtArgs> /** * Find zero or more Posts that matches the filter. @@ -1563,10 +1547,8 @@ export namespace Prisma { * const post = await prisma.post.findRaw({ * filter: { age: { $gt: 25 } } * }) - **/ - findRaw( - args?: PostFindRawArgs - ): Prisma.PrismaPromise + */ + findRaw(args?: PostFindRawArgs): Prisma.PrismaPromise /** * Perform aggregation operations on a Post. @@ -1578,10 +1560,9 @@ export namespace Prisma { * { $group: { _id: "$country", total: { $sum: 1 } } } * ] * }) - **/ - aggregateRaw( - args?: PostAggregateRawArgs - ): Prisma.PrismaPromise + */ + aggregateRaw(args?: PostAggregateRawArgs): Prisma.PrismaPromise + /** * Count the number of Posts. @@ -1721,36 +1702,34 @@ export namespace Prisma { * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__PostClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - - comments = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; - - author = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, 'findUniqueOrThrow'> | Null, Null, ExtArgs>; - + readonly [Symbol.toStringTag]: "PrismaPromise" + comments = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + author = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; + 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; + 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; + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } + /** * Fields of the Post model */ @@ -1764,7 +1743,6 @@ export namespace Prisma { // Custom InputTypes - /** * Post findUnique */ @@ -1774,7 +1752,7 @@ export namespace Prisma { */ select?: PostSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: PostInclude | null /** @@ -1783,7 +1761,6 @@ export namespace Prisma { where: PostWhereUniqueInput } - /** * Post findUniqueOrThrow */ @@ -1793,7 +1770,7 @@ export namespace Prisma { */ select?: PostSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: PostInclude | null /** @@ -1802,7 +1779,6 @@ export namespace Prisma { where: PostWhereUniqueInput } - /** * Post findFirst */ @@ -1812,7 +1788,7 @@ export namespace Prisma { */ select?: PostSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: PostInclude | null /** @@ -1851,7 +1827,6 @@ export namespace Prisma { distinct?: PostScalarFieldEnum | PostScalarFieldEnum[] } - /** * Post findFirstOrThrow */ @@ -1861,7 +1836,7 @@ export namespace Prisma { */ select?: PostSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: PostInclude | null /** @@ -1900,7 +1875,6 @@ export namespace Prisma { distinct?: PostScalarFieldEnum | PostScalarFieldEnum[] } - /** * Post findMany */ @@ -1910,7 +1884,7 @@ export namespace Prisma { */ select?: PostSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: PostInclude | null /** @@ -1944,7 +1918,6 @@ export namespace Prisma { distinct?: PostScalarFieldEnum | PostScalarFieldEnum[] } - /** * Post create */ @@ -1954,7 +1927,7 @@ export namespace Prisma { */ select?: PostSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: PostInclude | null /** @@ -1963,7 +1936,6 @@ export namespace Prisma { data: XOR } - /** * Post createMany */ @@ -1974,7 +1946,6 @@ export namespace Prisma { data: PostCreateManyInput | PostCreateManyInput[] } - /** * Post update */ @@ -1984,7 +1955,7 @@ export namespace Prisma { */ select?: PostSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: PostInclude | null /** @@ -1997,7 +1968,6 @@ export namespace Prisma { where: PostWhereUniqueInput } - /** * Post updateMany */ @@ -2012,7 +1982,6 @@ export namespace Prisma { where?: PostWhereInput } - /** * Post upsert */ @@ -2022,7 +1991,7 @@ export namespace Prisma { */ select?: PostSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: PostInclude | null /** @@ -2039,7 +2008,6 @@ export namespace Prisma { update: XOR } - /** * Post delete */ @@ -2049,7 +2017,7 @@ export namespace Prisma { */ select?: PostSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: PostInclude | null /** @@ -2058,7 +2026,6 @@ export namespace Prisma { where: PostWhereUniqueInput } - /** * Post deleteMany */ @@ -2069,7 +2036,6 @@ export namespace Prisma { where?: PostWhereInput } - /** * Post findRaw */ @@ -2084,7 +2050,6 @@ export namespace Prisma { options?: InputJsonValue } - /** * Post aggregateRaw */ @@ -2099,7 +2064,6 @@ export namespace Prisma { options?: InputJsonValue } - /** * Post.comments */ @@ -2109,7 +2073,7 @@ export namespace Prisma { */ select?: CommentSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CommentInclude | null where?: CommentWhereInput @@ -2120,7 +2084,6 @@ export namespace Prisma { distinct?: CommentScalarFieldEnum | CommentScalarFieldEnum[] } - /** * Post without action */ @@ -2130,13 +2093,12 @@ export namespace Prisma { */ select?: PostSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: PostInclude | null } - /** * Model Comment */ @@ -2288,6 +2250,7 @@ export namespace Prisma { post?: boolean | PostDefaultArgs }, ExtArgs["result"]["comment"]> + export type CommentSelectScalar = { id?: boolean postId?: boolean @@ -2298,7 +2261,6 @@ export namespace Prisma { post?: boolean | PostDefaultArgs } - export type $CommentPayload = { name: "Comment" objects: { @@ -2312,11 +2274,10 @@ export namespace Prisma { composites: {} } - type CommentGetPayload = $Result.GetResult type CommentCountArgs = - Omit & { + Omit & { select?: CommentCountAggregateInputType | true } @@ -2332,14 +2293,12 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUnique>( - args: SelectSubset> - ): Prisma__CommentClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> + */ + findUnique(args: SelectSubset>): Prisma__CommentClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** - * Find one Comment that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. + * Find one Comment that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. * @param {CommentFindUniqueOrThrowArgs} args - Arguments to find a Comment * @example * // Get one Comment @@ -2348,10 +2307,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__CommentClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__CommentClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first Comment that matches the filter. @@ -2365,10 +2322,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirst>( - args?: SelectSubset> - ): Prisma__CommentClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> + */ + findFirst(args?: SelectSubset>): Prisma__CommentClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first Comment that matches the filter or @@ -2383,16 +2338,14 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__CommentClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__CommentClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** * Find zero or more Comments 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 {CommentFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {CommentFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Comments * const comments = await prisma.comment.findMany() @@ -2403,10 +2356,8 @@ export namespace Prisma { * // Only select the `id` * const commentWithIdOnly = await prisma.comment.findMany({ select: { id: true } }) * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a Comment. @@ -2419,26 +2370,22 @@ export namespace Prisma { * } * }) * - **/ - create>( - args: SelectSubset> - ): Prisma__CommentClient<$Result.GetResult, T, 'create'>, never, ExtArgs> + */ + create(args: SelectSubset>): Prisma__CommentClient<$Result.GetResult, T, "create">, never, ExtArgs> /** * Create many Comments. - * @param {CommentCreateManyArgs} args - Arguments to create many Comments. - * @example - * // Create many Comments - * const comment = await prisma.comment.createMany({ - * data: { - * // ... provide data here - * } - * }) + * @param {CommentCreateManyArgs} args - Arguments to create many Comments. + * @example + * // Create many Comments + * const comment = await prisma.comment.createMany({ + * data: [ + * // ... provide data here + * ] + * }) * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Delete a Comment. @@ -2451,10 +2398,8 @@ export namespace Prisma { * } * }) * - **/ - delete>( - args: SelectSubset> - ): Prisma__CommentClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> + */ + delete(args: SelectSubset>): Prisma__CommentClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one Comment. @@ -2470,10 +2415,8 @@ export namespace Prisma { * } * }) * - **/ - update>( - args: SelectSubset> - ): Prisma__CommentClient<$Result.GetResult, T, 'update'>, never, ExtArgs> + */ + update(args: SelectSubset>): Prisma__CommentClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more Comments. @@ -2486,10 +2429,8 @@ export namespace Prisma { * } * }) * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Comments. @@ -2507,10 +2448,8 @@ export namespace Prisma { * } * }) * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one Comment. @@ -2528,10 +2467,8 @@ export namespace Prisma { * // ... the filter for the Comment we want to update * } * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__CommentClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> + */ + upsert(args: SelectSubset>): Prisma__CommentClient<$Result.GetResult, T, "upsert">, never, ExtArgs> /** * Find zero or more Comments that matches the filter. @@ -2540,10 +2477,8 @@ export namespace Prisma { * const comment = await prisma.comment.findRaw({ * filter: { age: { $gt: 25 } } * }) - **/ - findRaw( - args?: CommentFindRawArgs - ): Prisma.PrismaPromise + */ + findRaw(args?: CommentFindRawArgs): Prisma.PrismaPromise /** * Perform aggregation operations on a Comment. @@ -2555,10 +2490,9 @@ export namespace Prisma { * { $group: { _id: "$country", total: { $sum: 1 } } } * ] * }) - **/ - aggregateRaw( - args?: CommentAggregateRawArgs - ): Prisma.PrismaPromise + */ + aggregateRaw(args?: CommentAggregateRawArgs): Prisma.PrismaPromise + /** * Count the number of Comments. @@ -2698,34 +2632,33 @@ export namespace Prisma { * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__CommentClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - - post = {}>(args?: Subset>): Prisma__PostClient<$Result.GetResult, T, 'findUniqueOrThrow'> | Null, Null, ExtArgs>; - + readonly [Symbol.toStringTag]: "PrismaPromise" + post = {}>(args?: Subset>): Prisma__PostClient<$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; + 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; + 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; + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } + /** * Fields of the Comment model */ @@ -2737,7 +2670,6 @@ export namespace Prisma { // Custom InputTypes - /** * Comment findUnique */ @@ -2747,7 +2679,7 @@ export namespace Prisma { */ select?: CommentSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CommentInclude | null /** @@ -2756,7 +2688,6 @@ export namespace Prisma { where: CommentWhereUniqueInput } - /** * Comment findUniqueOrThrow */ @@ -2766,7 +2697,7 @@ export namespace Prisma { */ select?: CommentSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CommentInclude | null /** @@ -2775,7 +2706,6 @@ export namespace Prisma { where: CommentWhereUniqueInput } - /** * Comment findFirst */ @@ -2785,7 +2715,7 @@ export namespace Prisma { */ select?: CommentSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CommentInclude | null /** @@ -2824,7 +2754,6 @@ export namespace Prisma { distinct?: CommentScalarFieldEnum | CommentScalarFieldEnum[] } - /** * Comment findFirstOrThrow */ @@ -2834,7 +2763,7 @@ export namespace Prisma { */ select?: CommentSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CommentInclude | null /** @@ -2873,7 +2802,6 @@ export namespace Prisma { distinct?: CommentScalarFieldEnum | CommentScalarFieldEnum[] } - /** * Comment findMany */ @@ -2883,7 +2811,7 @@ export namespace Prisma { */ select?: CommentSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CommentInclude | null /** @@ -2917,7 +2845,6 @@ export namespace Prisma { distinct?: CommentScalarFieldEnum | CommentScalarFieldEnum[] } - /** * Comment create */ @@ -2927,7 +2854,7 @@ export namespace Prisma { */ select?: CommentSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CommentInclude | null /** @@ -2936,7 +2863,6 @@ export namespace Prisma { data: XOR } - /** * Comment createMany */ @@ -2947,7 +2873,6 @@ export namespace Prisma { data: CommentCreateManyInput | CommentCreateManyInput[] } - /** * Comment update */ @@ -2957,7 +2882,7 @@ export namespace Prisma { */ select?: CommentSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CommentInclude | null /** @@ -2970,7 +2895,6 @@ export namespace Prisma { where: CommentWhereUniqueInput } - /** * Comment updateMany */ @@ -2985,7 +2909,6 @@ export namespace Prisma { where?: CommentWhereInput } - /** * Comment upsert */ @@ -2995,7 +2918,7 @@ export namespace Prisma { */ select?: CommentSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CommentInclude | null /** @@ -3012,7 +2935,6 @@ export namespace Prisma { update: XOR } - /** * Comment delete */ @@ -3022,7 +2944,7 @@ export namespace Prisma { */ select?: CommentSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CommentInclude | null /** @@ -3031,7 +2953,6 @@ export namespace Prisma { where: CommentWhereUniqueInput } - /** * Comment deleteMany */ @@ -3042,7 +2963,6 @@ export namespace Prisma { where?: CommentWhereInput } - /** * Comment findRaw */ @@ -3057,7 +2977,6 @@ export namespace Prisma { options?: InputJsonValue } - /** * Comment aggregateRaw */ @@ -3072,7 +2991,6 @@ export namespace Prisma { options?: InputJsonValue } - /** * Comment without action */ @@ -3082,13 +3000,12 @@ export namespace Prisma { */ select?: CommentSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CommentInclude | null } - /** * Model User */ @@ -3276,6 +3193,7 @@ export namespace Prisma { _count?: boolean | UserCountOutputTypeDefaultArgs }, ExtArgs["result"]["user"]> + export type UserSelectScalar = { id?: boolean email?: boolean @@ -3287,7 +3205,6 @@ export namespace Prisma { _count?: boolean | UserCountOutputTypeDefaultArgs } - export type $UserPayload = { name: "User" objects: { @@ -3303,11 +3220,10 @@ export namespace Prisma { } } - type UserGetPayload = $Result.GetResult type UserCountArgs = - Omit & { + Omit & { select?: UserCountAggregateInputType | true } @@ -3323,14 +3239,12 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUnique>( - args: SelectSubset> - ): Prisma__UserClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> + */ + findUnique(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** - * Find one User that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. + * Find one User that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. * @param {UserFindUniqueOrThrowArgs} args - Arguments to find a User * @example * // Get one User @@ -3339,10 +3253,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__UserClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first User that matches the filter. @@ -3356,10 +3268,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirst>( - args?: SelectSubset> - ): Prisma__UserClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> + */ + findFirst(args?: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first User that matches the filter or @@ -3374,16 +3284,14 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__UserClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** * Find zero or more Users that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {UserFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {UserFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Users * const users = await prisma.user.findMany() @@ -3394,10 +3302,8 @@ export namespace Prisma { * // Only select the `id` * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } }) * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a User. @@ -3410,26 +3316,22 @@ export namespace Prisma { * } * }) * - **/ - create>( - args: SelectSubset> - ): Prisma__UserClient<$Result.GetResult, T, 'create'>, never, ExtArgs> + */ + create(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "create">, never, ExtArgs> /** * Create many Users. - * @param {UserCreateManyArgs} args - Arguments to create many Users. - * @example - * // Create many Users - * const user = await prisma.user.createMany({ - * data: { - * // ... provide data here - * } - * }) + * @param {UserCreateManyArgs} args - Arguments to create many Users. + * @example + * // Create many Users + * const user = await prisma.user.createMany({ + * data: [ + * // ... provide data here + * ] + * }) * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Delete a User. @@ -3442,10 +3344,8 @@ export namespace Prisma { * } * }) * - **/ - delete>( - args: SelectSubset> - ): Prisma__UserClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> + */ + delete(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one User. @@ -3461,10 +3361,8 @@ export namespace Prisma { * } * }) * - **/ - update>( - args: SelectSubset> - ): Prisma__UserClient<$Result.GetResult, T, 'update'>, never, ExtArgs> + */ + update(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more Users. @@ -3477,10 +3375,8 @@ export namespace Prisma { * } * }) * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Users. @@ -3498,10 +3394,8 @@ export namespace Prisma { * } * }) * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one User. @@ -3519,10 +3413,8 @@ export namespace Prisma { * // ... the filter for the User we want to update * } * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__UserClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> + */ + upsert(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "upsert">, never, ExtArgs> /** * Find zero or more Users that matches the filter. @@ -3531,10 +3423,8 @@ export namespace Prisma { * const user = await prisma.user.findRaw({ * filter: { age: { $gt: 25 } } * }) - **/ - findRaw( - args?: UserFindRawArgs - ): Prisma.PrismaPromise + */ + findRaw(args?: UserFindRawArgs): Prisma.PrismaPromise /** * Perform aggregation operations on a User. @@ -3546,10 +3436,9 @@ export namespace Prisma { * { $group: { _id: "$country", total: { $sum: 1 } } } * ] * }) - **/ - aggregateRaw( - args?: UserAggregateRawArgs - ): Prisma.PrismaPromise + */ + aggregateRaw(args?: UserAggregateRawArgs): Prisma.PrismaPromise + /** * Count the number of Users. @@ -3689,34 +3578,33 @@ export namespace Prisma { * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__UserClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - - posts = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; - + readonly [Symbol.toStringTag]: "PrismaPromise" + posts = {}>(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; + 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; + 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; + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } + /** * Fields of the User model */ @@ -3728,7 +3616,6 @@ export namespace Prisma { // Custom InputTypes - /** * User findUnique */ @@ -3738,7 +3625,7 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** @@ -3747,7 +3634,6 @@ export namespace Prisma { where: UserWhereUniqueInput } - /** * User findUniqueOrThrow */ @@ -3757,7 +3643,7 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** @@ -3766,7 +3652,6 @@ export namespace Prisma { where: UserWhereUniqueInput } - /** * User findFirst */ @@ -3776,7 +3661,7 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** @@ -3815,7 +3700,6 @@ export namespace Prisma { distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] } - /** * User findFirstOrThrow */ @@ -3825,7 +3709,7 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** @@ -3864,7 +3748,6 @@ export namespace Prisma { distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] } - /** * User findMany */ @@ -3874,7 +3757,7 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** @@ -3908,7 +3791,6 @@ export namespace Prisma { distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] } - /** * User create */ @@ -3918,7 +3800,7 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** @@ -3927,7 +3809,6 @@ export namespace Prisma { data: XOR } - /** * User createMany */ @@ -3938,7 +3819,6 @@ export namespace Prisma { data: UserCreateManyInput | UserCreateManyInput[] } - /** * User update */ @@ -3948,7 +3828,7 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** @@ -3961,7 +3841,6 @@ export namespace Prisma { where: UserWhereUniqueInput } - /** * User updateMany */ @@ -3976,7 +3855,6 @@ export namespace Prisma { where?: UserWhereInput } - /** * User upsert */ @@ -3986,7 +3864,7 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** @@ -4003,7 +3881,6 @@ export namespace Prisma { update: XOR } - /** * User delete */ @@ -4013,7 +3890,7 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** @@ -4022,7 +3899,6 @@ export namespace Prisma { where: UserWhereUniqueInput } - /** * User deleteMany */ @@ -4033,7 +3909,6 @@ export namespace Prisma { where?: UserWhereInput } - /** * User findRaw */ @@ -4048,7 +3923,6 @@ export namespace Prisma { options?: InputJsonValue } - /** * User aggregateRaw */ @@ -4063,7 +3937,6 @@ export namespace Prisma { options?: InputJsonValue } - /** * User.posts */ @@ -4073,7 +3946,7 @@ export namespace Prisma { */ select?: PostSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: PostInclude | null where?: PostWhereInput @@ -4084,7 +3957,6 @@ export namespace Prisma { distinct?: PostScalarFieldEnum | PostScalarFieldEnum[] } - /** * User without action */ @@ -4094,13 +3966,12 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null } - /** * Enums */ diff --git a/experiments/mongodb/prisma/generated/client/index.js b/experiments/mongodb/prisma/generated/client/index.js index 7087550f5..7e76efde5 100644 --- a/experiments/mongodb/prisma/generated/client/index.js +++ b/experiments/mongodb/prisma/generated/client/index.js @@ -21,7 +21,8 @@ const { warnOnce, defineDmmfProperty, Public, -} = require('./runtime/library') + getRuntime +} = require('./runtime/library.js') const Prisma = {} @@ -30,12 +31,12 @@ exports.Prisma = Prisma exports.$Enums = {} /** - * Prisma Client JS version: 5.4.2 - * Query Engine version: ac9d7041ed77bcc8a8dbd2ab6616b39013829574 + * Prisma Client JS version: 5.18.0 + * Query Engine version: 4c784e32044a8a016d99474bd02a3b6123742169 */ Prisma.prismaVersion = { - client: "5.4.2", - engine: "ac9d7041ed77bcc8a8dbd2ab6616b39013829574" + client: "5.18.0", + engine: "4c784e32044a8a016d99474bd02a3b6123742169" } Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; @@ -141,6 +142,7 @@ const config = { } ], "previewFeatures": [], + "sourceFilePath": "/home/majkel/development/typegraphql-prisma/experiments/mongodb/prisma/schema.prisma", "isCustomOutput": true }, "relativeEnvPaths": { @@ -148,8 +150,8 @@ const config = { "schemaEnvPath": "../../.env" }, "relativePath": "../..", - "clientVersion": "5.4.2", - "engineVersion": "ac9d7041ed77bcc8a8dbd2ab6616b39013829574", + "clientVersion": "5.18.0", + "engineVersion": "4c784e32044a8a016d99474bd02a3b6123742169", "datasourceNames": [ "db" ], @@ -163,9 +165,9 @@ const config = { } } }, - "inlineSchema": "ZGF0YXNvdXJjZSBkYiB7CiAgcHJvdmlkZXIgPSAibW9uZ29kYiIKICB1cmwgICAgICA9IGVudigiREFUQUJBU0VfVVJMIikKfQoKZ2VuZXJhdG9yIGNsaWVudCB7CiAgcHJvdmlkZXIgPSAicHJpc21hLWNsaWVudC1qcyIKICAvLyBiaW5hcnlUYXJnZXRzICAgPSBbIndpbmRvd3MiLCAiZGViaWFuLW9wZW5zc2wtMS4xLngiXQogIG91dHB1dCAgID0gIi4uL3ByaXNtYS9nZW5lcmF0ZWQvY2xpZW50Igp9CgpnZW5lcmF0b3IgdHlwZWdyYXBocWwgewogIHByb3ZpZGVyICAgICAgICAgICAgICAgPSAibm9kZSAuLi8uLi9zcmMvY2xpL2Rldi50cyIKICBvdXRwdXQgICAgICAgICAgICAgICAgID0gIi4uL3ByaXNtYS9nZW5lcmF0ZWQvdHlwZS1ncmFwaHFsIgogIGVtaXRETU1GICAgICAgICAgICAgICAgPSB0cnVlCiAgLy8gZW1pdFRyYW5zcGlsZWRDb2RlICAgICAgID0gdHJ1ZQogIC8vIHNpbXBsZVJlc29sdmVycyAgICAgICAgICA9IGZhbHNlCiAgLy8gdXNlT3JpZ2luYWxNYXBwaW5nICAgICAgID0gdHJ1ZQogIC8vIHVzZVVuY2hlY2tlZFNjYWxhcklucHV0cyA9IGZhbHNlCiAgLy8gZW1pdElkQXNJRFR5cGUgICAgICAgICAgID0gdHJ1ZQogIGN1c3RvbVByaXNtYUltcG9ydFBhdGggPSAiLi4vY2xpZW50IgogIHVzZVNpbXBsZUlucHV0cyAgICAgICAgPSB0cnVlCn0KCm1vZGVsIFBvc3QgewogIGlkICAgICAgIFN0cmluZyAgICBAaWQgQGRlZmF1bHQoYXV0bygpKSBAbWFwKCJfaWQiKSBAZGIuT2JqZWN0SWQKICBzbHVnICAgICBTdHJpbmcgICAgQHVuaXF1ZQogIHRpdGxlICAgIFN0cmluZwogIGJvZHkgICAgIFN0cmluZwogIGNvbW1lbnRzIENvbW1lbnRbXQogIGF1dGhvciAgIFVzZXIgICAgICBAcmVsYXRpb24oZmllbGRzOiBbYXV0aG9ySWRdLCByZWZlcmVuY2VzOiBbaWRdKQogIGF1dGhvcklkIFN0cmluZyAgICBAZGIuT2JqZWN0SWQKfQoKbW9kZWwgQ29tbWVudCB7CiAgaWQgICAgICBTdHJpbmcgQGlkIEBkZWZhdWx0KGF1dG8oKSkgQG1hcCgiX2lkIikgQGRiLk9iamVjdElkCiAgcG9zdCAgICBQb3N0ICAgQHJlbGF0aW9uKGZpZWxkczogW3Bvc3RJZF0sIHJlZmVyZW5jZXM6IFtpZF0pCiAgcG9zdElkICBTdHJpbmcgQGRiLk9iamVjdElkCiAgY29tbWVudCBTdHJpbmcKfQoKbW9kZWwgVXNlciB7CiAgaWQgICAgICBTdHJpbmcgICAgICBAaWQgQGRlZmF1bHQoYXV0bygpKSBAbWFwKCJfaWQiKSBAZGIuT2JqZWN0SWQKICBlbWFpbCAgIFN0cmluZyAgICAgIEB1bmlxdWUKICBhZ2UgICAgIEludD8KICBhZGRyZXNzIFVzZXJBZGRyZXNzCiAgcG9zdHMgICBQb3N0W10KfQoKdHlwZSBVc2VyQWRkcmVzcyB7CiAgc3RyZWV0IFN0cmluZwogIG51bWJlciBJbnQ/CiAgY2l0eSAgIFN0cmluZwp9Cg==", + "inlineSchema": "datasource db {\n provider = \"mongodb\"\n url = env(\"DATABASE_URL\")\n}\n\ngenerator client {\n provider = \"prisma-client-js\"\n // binaryTargets = [\"windows\", \"debian-openssl-1.1.x\"]\n output = \"../prisma/generated/client\"\n}\n\ngenerator typegraphql {\n provider = \"node ../../src/cli/dev.ts\"\n output = \"../prisma/generated/type-graphql\"\n emitDMMF = true\n // emitTranspiledCode = true\n // simpleResolvers = false\n // useOriginalMapping = true\n // useUncheckedScalarInputs = false\n // emitIdAsIDType = true\n customPrismaImportPath = \"../client\"\n useSimpleInputs = true\n}\n\nmodel Post {\n id String @id @default(auto()) @map(\"_id\") @db.ObjectId\n slug String @unique\n title String\n body String\n comments Comment[]\n author User @relation(fields: [authorId], references: [id])\n authorId String @db.ObjectId\n}\n\nmodel Comment {\n id String @id @default(auto()) @map(\"_id\") @db.ObjectId\n post Post @relation(fields: [postId], references: [id])\n postId String @db.ObjectId\n comment String\n}\n\nmodel User {\n id String @id @default(auto()) @map(\"_id\") @db.ObjectId\n email String @unique\n age Int?\n address UserAddress\n posts Post[]\n}\n\ntype UserAddress {\n street String\n number Int?\n city String\n}\n", "inlineSchemaHash": "cc478790d691f8ff87571dc028545690a3fc9c07fcd87a4f5e05ef109e1825b9", - "noEngine": false + "copyEngine": true } const fs = require('fs') @@ -187,10 +189,10 @@ if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { config.runtimeDataModel = JSON.parse("{\"models\":{\"Post\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"dbName\":\"_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"auto\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"slug\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"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\":\"body\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"comments\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Comment\",\"relationName\":\"CommentToPost\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"author\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"PostToUser\",\"relationFromFields\":[\"authorId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"authorId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Comment\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"dbName\":\"_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"auto\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"post\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Post\",\"relationName\":\"CommentToPost\",\"relationFromFields\":[\"postId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"comment\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"User\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"dbName\":\"_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"auto\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"age\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"address\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserAddress\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"posts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Post\",\"relationName\":\"PostToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{\"UserAddress\":{\"dbName\":null,\"fields\":[{\"name\":\"street\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\"},{\"name\":\"number\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\"},{\"name\":\"city\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\"}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[]}}}") defineDmmfProperty(exports.Prisma, config.runtimeDataModel) +config.engineWasm = undefined - -const { warnEnvConflicts } = require('./runtime/library') +const { warnEnvConflicts } = require('./runtime/library.js') warnEnvConflicts({ rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.rootEnvPath), diff --git a/experiments/mongodb/prisma/generated/client/package.json b/experiments/mongodb/prisma/generated/client/package.json index da6bb21c0..37d362ca4 100644 --- a/experiments/mongodb/prisma/generated/client/package.json +++ b/experiments/mongodb/prisma/generated/client/package.json @@ -1,7 +1,84 @@ { - "name": ".prisma/client", + "name": "prisma-client-01227320fe3157f0de527349b10968d57b79ffd4b68965571735629f8cb5afa8", "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" + }, + "./*": "./*" + }, + "version": "5.18.0", "sideEffects": false } \ No newline at end of file diff --git a/experiments/mongodb/prisma/generated/client/runtime/edge-esm.js b/experiments/mongodb/prisma/generated/client/runtime/edge-esm.js index c71aead5e..f13526bd0 100644 --- a/experiments/mongodb/prisma/generated/client/runtime/edge-esm.js +++ b/experiments/mongodb/prisma/generated/client/runtime/edge-esm.js @@ -1,43 +1,31 @@ -var Xu=Object.create;var _r=Object.defineProperty;var el=Object.getOwnPropertyDescriptor;var tl=Object.getOwnPropertyNames;var rl=Object.getPrototypeOf,nl=Object.prototype.hasOwnProperty;var ol=(e,t,r)=>t in e?_r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Qn=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Nr=(e,t)=>()=>(e&&(t=e(e=0)),t);var Z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Lr=(e,t)=>{for(var r in t)_r(e,r,{get:t[r],enumerable:!0})},il=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of tl(t))!nl.call(e,o)&&o!==r&&_r(e,o,{get:()=>t[o],enumerable:!(n=el(t,o))||n.enumerable});return e};var Pe=(e,t,r)=>(r=e!=null?Xu(rl(e)):{},il(t||!e||!e.__esModule?_r(r,"default",{value:e,enumerable:!0}):r,e));var hi=(e,t,r)=>(ol(e,typeof t!="symbol"?t+"":t,r),r);function B(e){return()=>e}function Ie(){return y}var y,p=Nr(()=>{"use strict";y={abort:B(void 0),addListener:B(Ie()),allowedNodeEnvironmentFlags:new Set,arch:"x64",argv:["/bin/node"],argv0:"node",chdir:B(void 0),config:{target_defaults:{cflags:[],default_configuration:"",defines:[],include_dirs:[],libraries:[]},variables:{clang:0,host_arch:"x64",node_install_npm:!1,node_install_waf:!1,node_prefix:"",node_shared_openssl:!1,node_shared_v8:!1,node_shared_zlib:!1,node_use_dtrace:!1,node_use_etw:!1,node_use_openssl:!1,target_arch:"x64",v8_no_strict_aliasing:0,v8_use_snapshot:!1,visibility:""}},connected:!1,cpuUsage:()=>({user:0,system:0}),cwd:()=>"/",debugPort:0,disconnect:B(void 0),constrainedMemory:()=>{},emit:B(Ie()),emitWarning:B(void 0),env:{},eventNames:()=>[],execArgv:[],execPath:"/",exit:B(void 0),features:{inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1},getMaxListeners:B(0),getegid:B(0),geteuid:B(0),getgid:B(0),getgroups:B([]),getuid:B(0),hasUncaughtExceptionCaptureCallback:B(!1),hrtime:B([0,0]),platform:"linux",kill:B(!0),listenerCount:B(0),listeners:B([]),memoryUsage:B({arrayBuffers:0,external:0,heapTotal:0,heapUsed:0,rss:0}),nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},off:B(Ie()),on:B(Ie()),once:B(Ie()),openStdin:B({}),pid:0,ppid:0,prependListener:B(Ie()),prependOnceListener:B(Ie()),rawListeners:B([]),release:{name:"node"},removeAllListeners:B(Ie()),removeListener:B(Ie()),resourceUsage:B({fsRead:0,fsWrite:0,involuntaryContextSwitches:0,ipcReceived:0,ipcSent:0,majorPageFault:0,maxRSS:0,minorPageFault:0,sharedMemorySize:0,signalsCount:0,swappedOut:0,systemCPUTime:0,unsharedDataSize:0,unsharedStackSize:0,userCPUTime:0,voluntaryContextSwitches:0}),setMaxListeners:B(Ie()),setUncaughtExceptionCaptureCallback:B(void 0),setegid:B(void 0),seteuid:B(void 0),setgid:B(void 0),setgroups:B(void 0),setuid:B(void 0),stderr:{fd:2},stdin:{fd:0},stdout:{fd:1},title:"node",traceDeprecation:!1,umask:B(0),uptime:B(0),version:"",versions:{http_parser:"",node:"",v8:"",ares:"",uv:"",zlib:"",modules:"",openssl:""}}});var h,f=Nr(()=>{"use strict";h=()=>{};h.prototype=h});var Ni=Z(Ot=>{"use strict";d();p();f();var Pi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),sl=Pi(e=>{"use strict";e.byteLength=u,e.toByteArray=c,e.fromByteArray=w;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(i=0,s=o.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var T=E.indexOf("=");T===-1&&(T=b);var S=T===b?0:4-T%4;return[T,S]}function u(E){var b=a(E),T=b[0],S=b[1];return(T+S)*3/4-S}function l(E,b,T){return(b+T)*3/4-T}function c(E){var b,T=a(E),S=T[0],R=T[1],C=new n(l(E,S,R)),M=0,N=R>0?S-4:S,L;for(L=0;L>16&255,C[M++]=b>>8&255,C[M++]=b&255;return R===2&&(b=r[E.charCodeAt(L)]<<2|r[E.charCodeAt(L+1)]>>4,C[M++]=b&255),R===1&&(b=r[E.charCodeAt(L)]<<10|r[E.charCodeAt(L+1)]<<4|r[E.charCodeAt(L+2)]>>2,C[M++]=b>>8&255,C[M++]=b&255),C}function m(E){return t[E>>18&63]+t[E>>12&63]+t[E>>6&63]+t[E&63]}function g(E,b,T){for(var S,R=[],C=b;CN?N:M+C));return S===1?(b=E[T-1],R.push(t[b>>2]+t[b<<4&63]+"==")):S===2&&(b=(E[T-2]<<8)+E[T-1],R.push(t[b>>10]+t[b>>4&63]+t[b<<2&63]+"=")),R.join("")}}),al=Pi(e=>{e.read=function(t,r,n,o,i){var s,a,u=i*8-o-1,l=(1<>1,m=-7,g=n?i-1:0,w=n?-1:1,E=t[r+g];for(g+=w,s=E&(1<<-m)-1,E>>=-m,m+=u;m>0;s=s*256+t[r+g],g+=w,m-=8);for(a=s&(1<<-m)-1,s>>=-m,m+=o;m>0;a=a*256+t[r+g],g+=w,m-=8);if(s===0)s=1-c;else{if(s===l)return a?NaN:(E?-1:1)*(1/0);a=a+Math.pow(2,o),s=s-c}return(E?-1:1)*a*Math.pow(2,s-o)},e.write=function(t,r,n,o,i,s){var a,u,l,c=s*8-i-1,m=(1<>1,w=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=o?0:s-1,b=o?1:-1,T=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,a=m):(a=Math.floor(Math.log(r)/Math.LN2),r*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+g>=1?r+=w/l:r+=w*Math.pow(2,1-g),r*l>=2&&(a++,l/=2),a+g>=m?(u=0,a=m):a+g>=1?(u=(r*l-1)*Math.pow(2,i),a=a+g):(u=r*Math.pow(2,g-1)*Math.pow(2,i),a=0));i>=8;t[n+E]=u&255,E+=b,u/=256,i-=8);for(a=a<0;t[n+E]=a&255,E+=b,a/=256,c-=8);t[n+E-b]|=T*128}}),Wn=sl(),St=al(),xi=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ot.Buffer=P;Ot.SlowBuffer=dl;Ot.INSPECT_MAX_BYTES=50;var Br=2147483647;Ot.kMaxLength=Br;P.TYPED_ARRAY_SUPPORT=ul();!P.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 ul(){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(e){return!1}}Object.defineProperty(P.prototype,"parent",{enumerable:!0,get:function(){if(P.isBuffer(this))return this.buffer}});Object.defineProperty(P.prototype,"offset",{enumerable:!0,get:function(){if(P.isBuffer(this))return this.byteOffset}});function $e(e){if(e>Br)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,P.prototype),t}function P(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 Zn(e)}return vi(e,t,r)}P.poolSize=8192;function vi(e,t,r){if(typeof e=="string")return cl(e,t);if(ArrayBuffer.isView(e))return pl(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(ke(e,ArrayBuffer)||e&&ke(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ke(e,SharedArrayBuffer)||e&&ke(e.buffer,SharedArrayBuffer)))return Ti(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 P.from(n,t,r);let o=fl(e);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return P.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)}P.from=function(e,t,r){return vi(e,t,r)};Object.setPrototypeOf(P.prototype,Uint8Array.prototype);Object.setPrototypeOf(P,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 ll(e,t,r){return Ai(e),e<=0?$e(e):t!==void 0?typeof r=="string"?$e(e).fill(t,r):$e(e).fill(t):$e(e)}P.alloc=function(e,t,r){return ll(e,t,r)};function Zn(e){return Ai(e),$e(e<0?0:Yn(e)|0)}P.allocUnsafe=function(e){return Zn(e)};P.allocUnsafeSlow=function(e){return Zn(e)};function cl(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!P.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=Ci(e,t)|0,n=$e(r),o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}function Hn(e){let t=e.length<0?0:Yn(e.length)|0,r=$e(t);for(let n=0;n=Br)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Br.toString(16)+" bytes");return e|0}function dl(e){return+e!=e&&(e=0),P.alloc(+e)}P.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==P.prototype};P.compare=function(e,t){if(ke(e,Uint8Array)&&(e=P.from(e,e.offset,e.byteLength)),ke(t,Uint8Array)&&(t=P.from(t,t.offset,t.byteLength)),!P.isBuffer(e)||!P.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 o=0,i=Math.min(r,n);on.length?(P.isBuffer(i)||(i=P.from(i)),i.copy(n,o)):Uint8Array.prototype.set.call(n,i,o);else if(P.isBuffer(i))i.copy(n,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=i.length}return n};function Ci(e,t){if(P.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ke(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 o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return zn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return _i(e).length;default:if(o)return n?-1:zn(e).length;t=(""+t).toLowerCase(),o=!0}}P.byteLength=Ci;function ml(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 Al(this,t,r);case"utf8":case"utf-8":return Si(this,t,r);case"ascii":return Pl(this,t,r);case"latin1":case"binary":return vl(this,t,r);case"base64":return wl(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Tl(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}P.prototype._isBuffer=!0;function mt(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}P.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+=" ... "),""};xi&&(P.prototype[xi]=P.prototype.inspect);P.prototype.compare=function(e,t,r,n,o){if(ke(e,Uint8Array)&&(e=P.from(e,e.offset,e.byteLength)),!P.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),o===void 0&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;let i=o-n,s=r-t,a=Math.min(i,s),u=this.slice(n,o),l=e.slice(t,r);for(let c=0;c2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,eo(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0)if(o)r=0;else return-1;if(typeof t=="string"&&(t=P.from(t,n)),P.isBuffer(t))return t.length===0?-1:bi(e,t,r,n,o);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):bi(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function bi(e,t,r,n,o){let i=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;i=2,s/=2,a/=2,r/=2}function u(c,m){return i===1?c[m]:c.readUInt16BE(m*i)}let l;if(o){let c=-1;for(l=r;ls&&(r=s-a),l=r;l>=0;l--){let c=!0;for(let m=0;mo&&(n=o)):n=o;let i=t.length;n>i/2&&(n=i/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 o=this.length-t;if((r===void 0||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return gl(this,e,t,r);case"utf8":case"utf-8":return yl(this,e,t,r);case"ascii":case"latin1":case"binary":return hl(this,e,t,r);case"base64":return xl(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return bl(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}};P.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function wl(e,t,r){return t===0&&r===e.length?Wn.fromByteArray(e):Wn.fromByteArray(e.slice(t,r))}function Si(e,t,r){r=Math.min(e.length,r);let n=[],o=t;for(;o239?4:i>223?3:i>191?2:1;if(o+a<=r){let u,l,c,m;switch(a){case 1:i<128&&(s=i);break;case 2:u=e[o+1],(u&192)===128&&(m=(i&31)<<6|u&63,m>127&&(s=m));break;case 3:u=e[o+1],l=e[o+2],(u&192)===128&&(l&192)===128&&(m=(i&15)<<12|(u&63)<<6|l&63,m>2047&&(m<55296||m>57343)&&(s=m));break;case 4:u=e[o+1],l=e[o+2],c=e[o+3],(u&192)===128&&(l&192)===128&&(c&192)===128&&(m=(i&15)<<18|(u&63)<<12|(l&63)<<6|c&63,m>65535&&m<1114112&&(s=m))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),o+=a}return El(n)}var wi=4096;function El(e){let t=e.length;if(t<=wi)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let o="";for(let i=t;ir&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}P.prototype.readUintLE=P.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||ee(e,t,this.length);let n=this[e],o=1,i=0;for(;++i>>0,t=t>>>0,r||ee(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n};P.prototype.readUint8=P.prototype.readUInt8=function(e,t){return e=e>>>0,t||ee(e,1,this.length),this[e]};P.prototype.readUint16LE=P.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||ee(e,2,this.length),this[e]|this[e+1]<<8};P.prototype.readUint16BE=P.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||ee(e,2,this.length),this[e]<<8|this[e+1]};P.prototype.readUint32LE=P.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};P.prototype.readUint32BE=P.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};P.prototype.readBigUInt64LE=He(function(e){e=e>>>0,Rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&er(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,o=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(o)<>>0,Rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&er(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],o=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||ee(e,t,this.length);let n=this[e],o=1,i=0;for(;++i=o&&(n-=Math.pow(2,8*t)),n};P.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||ee(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i};P.prototype.readInt8=function(e,t){return e=e>>>0,t||ee(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};P.prototype.readInt16LE=function(e,t){e=e>>>0,t||ee(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};P.prototype.readInt16BE=function(e,t){e=e>>>0,t||ee(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};P.prototype.readInt32LE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};P.prototype.readInt32BE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};P.prototype.readBigInt64LE=He(function(e){e=e>>>0,Rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&er(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,Rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&er(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||ee(e,4,this.length),St.read(this,e,!0,23,4)};P.prototype.readFloatBE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),St.read(this,e,!1,23,4)};P.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||ee(e,8,this.length),St.read(this,e,!0,52,8)};P.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||ee(e,8,this.length),St.read(this,e,!1,52,8)};function ye(e,t,r,n,o,i){if(!P.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}P.prototype.writeUintLE=P.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;ye(this,e,t,r,s,0)}let o=1,i=0;for(this[t]=e&255;++i>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;ye(this,e,t,r,s,0)}let o=r-1,i=1;for(this[t+o]=e&255;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r};P.prototype.writeUint8=P.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,1,255,0),this[t]=e&255,t+1};P.prototype.writeUint16LE=P.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};P.prototype.writeUint16BE=P.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};P.prototype.writeUint32LE=P.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ye(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};P.prototype.writeUint32BE=P.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ye(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 Ri(e,t,r,n,o){Di(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i;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 Oi(e,t,r,n,o){Di(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i=i>>8,e[r+6]=i,i=i>>8,e[r+5]=i,i=i>>8,e[r+4]=i;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}P.prototype.writeBigUInt64LE=He(function(e,t=0){return Ri(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});P.prototype.writeBigUInt64BE=He(function(e,t=0){return Oi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});P.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ye(this,e,t,r,a-1,-a)}let o=0,i=1,s=0;for(this[t]=e&255;++o>0)-s&255;return t+r};P.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ye(this,e,t,r,a-1,-a)}let o=r-1,i=1,s=0;for(this[t+o]=e&255;--o>=0&&(i*=256);)e<0&&s===0&&this[t+o+1]!==0&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+r};P.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};P.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};P.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};P.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ye(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};P.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ye(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};P.prototype.writeBigInt64LE=He(function(e,t=0){return Ri(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});P.prototype.writeBigInt64BE=He(function(e,t=0){return Oi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Fi(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Ii(e,t,r,n,o){return t=+t,r=r>>>0,o||Fi(e,t,r,4,34028234663852886e22,-34028234663852886e22),St.write(e,t,r,n,23,4),r+4}P.prototype.writeFloatLE=function(e,t,r){return Ii(this,e,t,!0,r)};P.prototype.writeFloatBE=function(e,t,r){return Ii(this,e,t,!1,r)};function ki(e,t,r,n,o){return t=+t,r=r>>>0,o||Fi(e,t,r,8,17976931348623157e292,-17976931348623157e292),St.write(e,t,r,n,52,8),r+8}P.prototype.writeDoubleLE=function(e,t,r){return ki(this,e,t,!0,r)};P.prototype.writeDoubleBE=function(e,t,r){return ki(this,e,t,!1,r)};P.prototype.copy=function(e,t,r,n){if(!P.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 o;if(typeof e=="number")for(o=t;o2**32?o=Ei(String(r)):typeof r=="bigint"&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=Ei(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n},RangeError);function Ei(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 Cl(e,t,r){Rt(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&er(t,e.length-(r+1))}function Di(e,t,r,n,o,i){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(i+1)*8}${s}`:a=`>= -(2${s} ** ${(i+1)*8-1}${s}) and < 2 ** ${(i+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Mt.ERR_OUT_OF_RANGE("value",a,e)}Cl(n,o,i)}function Rt(e,t){if(typeof e!="number")throw new Mt.ERR_INVALID_ARG_TYPE(t,"number",e)}function er(e,t,r){throw Math.floor(e)!==e?(Rt(e,r),new Mt.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Mt.ERR_BUFFER_OUT_OF_BOUNDS:new Mt.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Ml=/[^+/0-9A-Za-z-_]/g;function Sl(e){if(e=e.split("=")[0],e=e.trim().replace(Ml,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function zn(e,t){t=t||1/0;let r,n=e.length,o=null,i=[];for(let s=0;s55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function Rl(e){let t=[];for(let r=0;r>8,o=r%256,i.push(o),i.push(n);return i}function _i(e){return Wn.toByteArray(Sl(e))}function jr(e,t,r,n){let o;for(o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function ke(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function eo(e){return e!==e}var Fl=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function He(e){return typeof BigInt>"u"?Il:e}function Il(){throw new Error("BigInt not supported")}});var x,d=Nr(()=>{"use strict";x=Pe(Ni())});var po=Z(j=>{"use strict";d();p();f();var W=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wi=W((e,t)=>{"use strict";t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var i=42;r[n]=i;for(n in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var s=Object.getOwnPropertySymbols(r);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(r,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(r,n);if(a.value!==i||a.enumerable!==!0)return!1}return!0}}),Gr=W((e,t)=>{"use strict";var r=Wi();t.exports=function(){return r()&&!!Symbol.toStringTag}}),kl=W((e,t)=>{"use strict";var r=typeof Symbol<"u"&&Symbol,n=Wi();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}),Dl=W((e,t)=>{"use strict";var r={foo:{}},n=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof n)}}),_l=W((e,t)=>{"use strict";var r="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,o=Object.prototype.toString,i="[object Function]";t.exports=function(s){var a=this;if(typeof a!="function"||o.call(a)!==i)throw new TypeError(r+a);for(var u=n.call(arguments,1),l,c=function(){if(this instanceof l){var b=a.apply(this,u.concat(n.call(arguments)));return Object(b)===b?b:this}else return a.apply(s,u.concat(n.call(arguments)))},m=Math.max(0,a.length-u.length),g=[],w=0;w{"use strict";var r=_l();t.exports=h.prototype.bind||r}),Nl=W((e,t)=>{"use strict";var r=so();t.exports=r.call(h.call,Object.prototype.hasOwnProperty)}),ao=W((e,t)=>{"use strict";var r,n=SyntaxError,o=h,i=TypeError,s=function($){try{return o('"use strict"; return ('+$+").constructor;")()}catch(U){}},a=Object.getOwnPropertyDescriptor;if(a)try{a({},"")}catch($){a=null}var u=function(){throw new i},l=a?function(){try{return arguments.callee,u}catch($){try{return a(arguments,"callee").get}catch(U){return u}}}():u,c=kl()(),m=Dl()(),g=Object.getPrototypeOf||(m?function($){return $.__proto__}:null),w={},E=typeof Uint8Array>"u"||!g?r:g(Uint8Array),b={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":c&&g?g([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":w,"%AsyncGenerator%":w,"%AsyncGeneratorFunction%":w,"%AsyncIteratorPrototype%":w,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":void 0,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":w,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c&&g?g(g([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!c||!g?r:g(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!c||!g?r:g(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c&&g?g(""[Symbol.iterator]()):r,"%Symbol%":c?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":l,"%TypedArray%":E,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(g)try{null.error}catch($){T=g(g($)),b["%Error.prototype%"]=T}var T,S=function $(U){var O;if(U==="%AsyncFunction%")O=s("async function () {}");else if(U==="%GeneratorFunction%")O=s("function* () {}");else if(U==="%AsyncGeneratorFunction%")O=s("async function* () {}");else if(U==="%AsyncGenerator%"){var oe=$("%AsyncGeneratorFunction%");oe&&(O=oe.prototype)}else if(U==="%AsyncIteratorPrototype%"){var ie=$("%AsyncGenerator%");ie&&g&&(O=g(ie.prototype))}return b[U]=O,O},R={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=so(),M=Nl(),N=C.call(h.call,Array.prototype.concat),L=C.call(h.apply,Array.prototype.splice),Te=C.call(h.call,String.prototype.replace),V=C.call(h.call,String.prototype.slice),H=C.call(h.call,RegExp.prototype.exec),we=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,z=/\\(\\)?/g,Ee=function($){var U=V($,0,1),O=V($,-1);if(U==="%"&&O!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(O==="%"&&U!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var oe=[];return Te($,we,function(ie,Qe,Y,pt){oe[oe.length]=Y?Te(pt,z,"$1"):Qe||ie}),oe},Je=function($,U){var O=$,oe;if(M(R,O)&&(oe=R[O],O="%"+oe[0]+"%"),M(b,O)){var ie=b[O];if(ie===w&&(ie=S(O)),typeof ie>"u"&&!U)throw new i("intrinsic "+$+" exists, but is not available. Please file an issue!");return{alias:oe,name:O,value:ie}}throw new n("intrinsic "+$+" does not exist!")};t.exports=function($,U){if(typeof $!="string"||$.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof U!="boolean")throw new i('"allowMissing" argument must be a boolean');if(H(/^%?[^%]*%?$/,$)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var O=Ee($),oe=O.length>0?O[0]:"",ie=Je("%"+oe+"%",U),Qe=ie.name,Y=ie.value,pt=!1,We=ie.alias;We&&(oe=We[0],L(O,N([0,1],We)));for(var ft=1,Ue=!0;ft=O.length){var Ct=a(Y,pe);Ue=!!Ct,Ue&&"get"in Ct&&!("originalValue"in Ct.get)?Y=Ct.get:Y=Y[pe]}else Ue=M(Y,pe),Y=Y[pe];Ue&&!pt&&(b[Qe]=Y)}}return Y}}),Ll=W((e,t)=>{"use strict";var r=so(),n=ao(),o=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||r.call(i,o),a=n("%Object.getOwnPropertyDescriptor%",!0),u=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(u)try{u({},"a",{value:1})}catch(m){u=null}t.exports=function(m){var g=s(r,i,arguments);if(a&&u){var w=a(g,"length");w.configurable&&u(g,"length",{value:1+l(0,m.length-(arguments.length-1))})}return g};var c=function(){return s(r,o,arguments)};u?u(t.exports,"apply",{value:c}):t.exports.apply=c}),uo=W((e,t)=>{"use strict";var r=ao(),n=Ll(),o=n(r("String.prototype.indexOf"));t.exports=function(i,s){var a=r(i,!!s);return typeof a=="function"&&o(i,".prototype.")>-1?n(a):a}}),Bl=W((e,t)=>{"use strict";var r=Gr()(),n=uo(),o=n("Object.prototype.toString"),i=function(u){return r&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:o(u)==="[object Arguments]"},s=function(u){return i(u)?!0:u!==null&&typeof u=="object"&&typeof u.length=="number"&&u.length>=0&&o(u)!=="[object Array]"&&o(u.callee)==="[object Function]"},a=function(){return i(arguments)}();i.isLegacyArguments=s,t.exports=a?i:s}),jl=W((e,t)=>{"use strict";var r=Object.prototype.toString,n=h.prototype.toString,o=/^\s*(?:function)?\*/,i=Gr()(),s=Object.getPrototypeOf,a=function(){if(!i)return!1;try{return h("return function*() {}")()}catch(l){}},u;t.exports=function(l){if(typeof l!="function")return!1;if(o.test(n.call(l)))return!0;if(!i){var c=r.call(l);return c==="[object GeneratorFunction]"}if(!s)return!1;if(typeof u>"u"){var m=a();u=m?s(m):!1}return s(l)===u}}),Ul=W((e,t)=>{"use strict";var r=h.prototype.toString,n=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,o,i;if(typeof n=="function"&&typeof Object.defineProperty=="function")try{o=Object.defineProperty({},"length",{get:function(){throw i}}),i={},n(function(){throw 42},null,o)}catch(M){M!==i&&(n=null)}else n=null;var s=/^\s*class\b/,a=function(M){try{var N=r.call(M);return s.test(N)}catch(L){return!1}},u=function(M){try{return a(M)?!1:(r.call(M),!0)}catch(N){return!1}},l=Object.prototype.toString,c="[object Object]",m="[object Function]",g="[object GeneratorFunction]",w="[object HTMLAllCollection]",E="[object HTML document.all class]",b="[object HTMLCollection]",T=typeof Symbol=="function"&&!!Symbol.toStringTag,S=!(0 in[,]),R=function(){return!1};typeof document=="object"&&(C=document.all,l.call(C)===l.call(document.all)&&(R=function(M){if((S||!M)&&(typeof M>"u"||typeof M=="object"))try{var N=l.call(M);return(N===w||N===E||N===b||N===c)&&M("")==null}catch(L){}return!1}));var C;t.exports=n?function(M){if(R(M))return!0;if(!M||typeof M!="function"&&typeof M!="object")return!1;try{n(M,null,o)}catch(N){if(N!==i)return!1}return!a(M)&&u(M)}:function(M){if(R(M))return!0;if(!M||typeof M!="function"&&typeof M!="object")return!1;if(T)return u(M);if(a(M))return!1;var N=l.call(M);return N!==m&&N!==g&&!/^\[object HTML/.test(N)?!1:u(M)}}),Hi=W((e,t)=>{"use strict";var r=Ul(),n=Object.prototype.toString,o=Object.prototype.hasOwnProperty,i=function(l,c,m){for(var g=0,w=l.length;g=3&&(g=m),n.call(l)==="[object Array]"?i(l,c,g):typeof l=="string"?s(l,c,g):a(l,c,g)};t.exports=u}),zi=W((e,t)=>{"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],n=typeof globalThis>"u"?global:globalThis;t.exports=function(){for(var o=[],i=0;i{"use strict";var r=ao(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(o){n=null}t.exports=n}),Yi=W((e,t)=>{"use strict";var r=Hi(),n=zi(),o=uo(),i=o("Object.prototype.toString"),s=Gr()(),a=Zi(),u=typeof globalThis>"u"?global:globalThis,l=n(),c=o("Array.prototype.indexOf",!0)||function(b,T){for(var S=0;S-1}return a?E(b):!1}}),$l=W((e,t)=>{"use strict";var r=Hi(),n=zi(),o=uo(),i=Zi(),s=o("Object.prototype.toString"),a=Gr()(),u=typeof globalThis>"u"?global:globalThis,l=n(),c=o("String.prototype.slice"),m={},g=Object.getPrototypeOf;a&&i&&g&&r(l,function(b){if(typeof u[b]=="function"){var T=new u[b];if(Symbol.toStringTag in T){var S=g(T),R=i(S,Symbol.toStringTag);if(!R){var C=g(S);R=i(C,Symbol.toStringTag)}m[b]=R.get}}});var w=function(b){var T=!1;return r(m,function(S,R){if(!T)try{var C=S.call(b);C===R&&(T=C)}catch(M){}}),T},E=Yi();t.exports=function(b){return E(b)?!a||!(Symbol.toStringTag in b)?c(s(b),8,-1):w(b):!1}}),ql=W(e=>{"use strict";var t=Bl(),r=jl(),n=$l(),o=Yi();function i(A){return A.call.bind(A)}var s=typeof BigInt<"u",a=typeof Symbol<"u",u=i(Object.prototype.toString),l=i(Number.prototype.valueOf),c=i(String.prototype.valueOf),m=i(Boolean.prototype.valueOf);s&&(g=i(BigInt.prototype.valueOf));var g;a&&(w=i(Symbol.prototype.valueOf));var w;function E(A,Yu){if(typeof A!="object")return!1;try{return Yu(A),!0}catch(Qd){return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=o;function b(A){return typeof Promise<"u"&&A instanceof Promise||A!==null&&typeof A=="object"&&typeof A.then=="function"&&typeof A.catch=="function"}e.isPromise=b;function T(A){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(A):o(A)||ft(A)}e.isArrayBufferView=T;function S(A){return n(A)==="Uint8Array"}e.isUint8Array=S;function R(A){return n(A)==="Uint8ClampedArray"}e.isUint8ClampedArray=R;function C(A){return n(A)==="Uint16Array"}e.isUint16Array=C;function M(A){return n(A)==="Uint32Array"}e.isUint32Array=M;function N(A){return n(A)==="Int8Array"}e.isInt8Array=N;function L(A){return n(A)==="Int16Array"}e.isInt16Array=L;function Te(A){return n(A)==="Int32Array"}e.isInt32Array=Te;function V(A){return n(A)==="Float32Array"}e.isFloat32Array=V;function H(A){return n(A)==="Float64Array"}e.isFloat64Array=H;function we(A){return n(A)==="BigInt64Array"}e.isBigInt64Array=we;function z(A){return n(A)==="BigUint64Array"}e.isBigUint64Array=z;function Ee(A){return u(A)==="[object Map]"}Ee.working=typeof Map<"u"&&Ee(new Map);function Je(A){return typeof Map>"u"?!1:Ee.working?Ee(A):A instanceof Map}e.isMap=Je;function $(A){return u(A)==="[object Set]"}$.working=typeof Set<"u"&&$(new Set);function U(A){return typeof Set>"u"?!1:$.working?$(A):A instanceof Set}e.isSet=U;function O(A){return u(A)==="[object WeakMap]"}O.working=typeof WeakMap<"u"&&O(new WeakMap);function oe(A){return typeof WeakMap>"u"?!1:O.working?O(A):A instanceof WeakMap}e.isWeakMap=oe;function ie(A){return u(A)==="[object WeakSet]"}ie.working=typeof WeakSet<"u"&&ie(new WeakSet);function Qe(A){return ie(A)}e.isWeakSet=Qe;function Y(A){return u(A)==="[object ArrayBuffer]"}Y.working=typeof ArrayBuffer<"u"&&Y(new ArrayBuffer);function pt(A){return typeof ArrayBuffer>"u"?!1:Y.working?Y(A):A instanceof ArrayBuffer}e.isArrayBuffer=pt;function We(A){return u(A)==="[object DataView]"}We.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&We(new DataView(new ArrayBuffer(1),0,1));function ft(A){return typeof DataView>"u"?!1:We.working?We(A):A instanceof DataView}e.isDataView=ft;var Ue=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function pe(A){return u(A)==="[object SharedArrayBuffer]"}function dt(A){return typeof Ue>"u"?!1:(typeof pe.working>"u"&&(pe.working=pe(new Ue)),pe.working?pe(A):A instanceof Ue)}e.isSharedArrayBuffer=dt;function Tt(A){return u(A)==="[object AsyncFunction]"}e.isAsyncFunction=Tt;function Ct(A){return u(A)==="[object Map Iterator]"}e.isMapIterator=Ct;function Qu(A){return u(A)==="[object Set Iterator]"}e.isSetIterator=Qu;function Wu(A){return u(A)==="[object Generator]"}e.isGeneratorObject=Wu;function Hu(A){return u(A)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=Hu;function fi(A){return E(A,l)}e.isNumberObject=fi;function di(A){return E(A,c)}e.isStringObject=di;function mi(A){return E(A,m)}e.isBooleanObject=mi;function gi(A){return s&&E(A,g)}e.isBigIntObject=gi;function yi(A){return a&&E(A,w)}e.isSymbolObject=yi;function zu(A){return fi(A)||di(A)||mi(A)||gi(A)||yi(A)}e.isBoxedPrimitive=zu;function Zu(A){return typeof Uint8Array<"u"&&(pt(A)||dt(A))}e.isAnyArrayBuffer=Zu,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(A){Object.defineProperty(e,A,{enumerable:!1,value:function(){throw new Error(A+" is not supported in userland")}})})}),Vl=W((e,t)=>{t.exports=function(r){return r instanceof x.Buffer}}),Kl=W((e,t)=>{typeof Object.create=="function"?t.exports=function(r,n){n&&(r.super_=n,r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(r,n){if(n){r.super_=n;var o=function(){};o.prototype=n.prototype,r.prototype=new o,r.prototype.constructor=r}}}),Xi=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=o)return u;switch(u){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return u}}),s=n[r];r"u")return function(){return j.deprecate(e,t).apply(this,arguments)};var r=!1;function n(){if(!r){if(y.throwDeprecation)throw new Error(t);y.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}return n};var Ur={},es=/^$/;y.env.NODE_DEBUG&&($r=y.env.NODE_DEBUG,$r=$r.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),es=new RegExp("^"+$r+"$","i"));var $r;j.debuglog=function(e){if(e=e.toUpperCase(),!Ur[e])if(es.test(e)){var t=y.pid;Ur[e]=function(){var r=j.format.apply(j,arguments);console.error("%s %d: %s",e,t,r)}}else Ur[e]=function(){};return Ur[e]};function Ze(e,t){var r={seen:[],stylize:Ql};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),lo(t)?r.showHidden=t:t&&j._extend(r,t),yt(r.showHidden)&&(r.showHidden=!1),yt(r.depth)&&(r.depth=2),yt(r.colors)&&(r.colors=!1),yt(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Jl),Vr(r,e,r.depth)}j.inspect=Ze;Ze.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};Ze.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Jl(e,t){var r=Ze.styles[t];return r?"\x1B["+Ze.colors[r][0]+"m"+e+"\x1B["+Ze.colors[r][1]+"m":e}function Ql(e,t){return e}function Wl(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function Vr(e,t,r){if(e.customInspect&&t&&qr(t.inspect)&&t.inspect!==j.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return Qr(n)||(n=Vr(e,n,r)),n}var o=Hl(e,t);if(o)return o;var i=Object.keys(t),s=Wl(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),rr(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return no(t);if(i.length===0){if(qr(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(tr(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Kr(t))return e.stylize(Date.prototype.toString.call(t),"date");if(rr(t))return no(t)}var u="",l=!1,c=["{","}"];if(ts(t)&&(l=!0,c=["[","]"]),qr(t)){var m=t.name?": "+t.name:"";u=" [Function"+m+"]"}if(tr(t)&&(u=" "+RegExp.prototype.toString.call(t)),Kr(t)&&(u=" "+Date.prototype.toUTCString.call(t)),rr(t)&&(u=" "+no(t)),i.length===0&&(!l||t.length==0))return c[0]+u+c[1];if(r<0)return tr(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var g;return l?g=zl(e,t,r,s,i):g=i.map(function(w){return io(e,t,r,s,w,l)}),e.seen.pop(),Zl(g,u,c)}function Hl(e,t){if(yt(t))return e.stylize("undefined","undefined");if(Qr(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(rs(t))return e.stylize(""+t,"number");if(lo(t))return e.stylize(""+t,"boolean");if(Jr(t))return e.stylize("null","null")}function no(e){return"["+Error.prototype.toString.call(e)+"]"}function zl(e,t,r,n,o){for(var i=[],s=0,a=t.length;s-1&&(i?a=a.split(` -`).map(function(l){return" "+l}).join(` -`).slice(2):a=` -`+a.split(` -`).map(function(l){return" "+l}).join(` -`))):a=e.stylize("[Circular]","special")),yt(s)){if(i&&o.match(/^\d+$/))return a;s=JSON.stringify(""+o),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.slice(1,-1),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function Zl(e,t,r){var n=0,o=e.reduce(function(i,s){return n++,s.indexOf(` -`)>=0&&n++,i+s.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?r[0]+(t===""?"":t+` - `)+" "+e.join(`, - `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}j.types=ql();function ts(e){return Array.isArray(e)}j.isArray=ts;function lo(e){return typeof e=="boolean"}j.isBoolean=lo;function Jr(e){return e===null}j.isNull=Jr;function Yl(e){return e==null}j.isNullOrUndefined=Yl;function rs(e){return typeof e=="number"}j.isNumber=rs;function Qr(e){return typeof e=="string"}j.isString=Qr;function Xl(e){return typeof e=="symbol"}j.isSymbol=Xl;function yt(e){return e===void 0}j.isUndefined=yt;function tr(e){return Ft(e)&&co(e)==="[object RegExp]"}j.isRegExp=tr;j.types.isRegExp=tr;function Ft(e){return typeof e=="object"&&e!==null}j.isObject=Ft;function Kr(e){return Ft(e)&&co(e)==="[object Date]"}j.isDate=Kr;j.types.isDate=Kr;function rr(e){return Ft(e)&&(co(e)==="[object Error]"||e instanceof Error)}j.isError=rr;j.types.isNativeError=rr;function qr(e){return typeof e=="function"}j.isFunction=qr;function ec(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}j.isPrimitive=ec;j.isBuffer=Vl();function co(e){return Object.prototype.toString.call(e)}function oo(e){return e<10?"0"+e.toString(10):e.toString(10)}var tc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function rc(){var e=new Date,t=[oo(e.getHours()),oo(e.getMinutes()),oo(e.getSeconds())].join(":");return[e.getDate(),tc[e.getMonth()],t].join(" ")}j.log=function(){console.log("%s - %s",rc(),j.format.apply(j,arguments))};j.inherits=Kl();j._extend=function(e,t){if(!t||!Ft(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function ns(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var gt=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;j.promisify=function(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');if(gt&&e[gt]){var t=e[gt];if(typeof t!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,gt,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var r,n,o=new Promise(function(a,u){r=a,n=u}),i=[],s=0;s{"use strict";d();p();f();var It=1e3,kt=It*60,Dt=kt*60,ht=Dt*24,ic=ht*7,sc=ht*365.25;os.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return ac(e);if(r==="number"&&isFinite(e))return t.long?lc(e):uc(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function ac(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*sc;case"weeks":case"week":case"w":return r*ic;case"days":case"day":case"d":return r*ht;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Dt;case"minutes":case"minute":case"mins":case"min":case"m":return r*kt;case"seconds":case"second":case"secs":case"sec":case"s":return r*It;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function uc(e){var t=Math.abs(e);return t>=ht?Math.round(e/ht)+"d":t>=Dt?Math.round(e/Dt)+"h":t>=kt?Math.round(e/kt)+"m":t>=It?Math.round(e/It)+"s":e+"ms"}function lc(e){var t=Math.abs(e);return t>=ht?Wr(e,t,ht,"day"):t>=Dt?Wr(e,t,Dt,"hour"):t>=kt?Wr(e,t,kt,"minute"):t>=It?Wr(e,t,It,"second"):e+" ms"}function Wr(e,t,r,n){var o=t>=r*1.5;return Math.round(e/r)+" "+n+(o?"s":"")}});var fo=Z((sg,ss)=>{"use strict";d();p();f();function cc(e){r.debug=r,r.default=r,r.coerce=u,r.disable=i,r.enable=o,r.enabled=s,r.humanize=is(),r.destroy=l,Object.keys(e).forEach(c=>{r[c]=e[c]}),r.names=[],r.skips=[],r.formatters={};function t(c){let m=0;for(let g=0;g{if(L==="%%")return"%";M++;let V=r.formatters[Te];if(typeof V=="function"){let H=T[M];L=V.call(S,H),T.splice(M,1),M--}return L}),r.formatArgs.call(S,T),(S.log||r.log).apply(S,T)}return b.namespace=c,b.useColors=r.useColors(),b.color=r.selectColor(c),b.extend=n,b.destroy=r.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(w!==r.namespaces&&(w=r.namespaces,E=r.enabled(c)),E),set:T=>{g=T}}),typeof r.init=="function"&&r.init(b),b}function n(c,m){let g=r(this.namespace+(typeof m=="undefined"?":":m)+c);return g.log=this.log,g}function o(c){r.save(c),r.namespaces=c,r.names=[],r.skips=[];let m,g=(typeof c=="string"?c:"").split(/[\s,]+/),w=g.length;for(m=0;m"-"+m)].join(",");return r.enable(""),c}function s(c){if(c[c.length-1]==="*")return!0;let m,g;for(m=0,g=r.skips.length;m{"use strict";d();p();f();ve.formatArgs=fc;ve.save=dc;ve.load=mc;ve.useColors=pc;ve.storage=gc();ve.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();ve.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function pc(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function fc(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Hr.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),e.splice(n,0,t)}ve.log=console.debug||console.log||(()=>{});function dc(e){try{e?ve.storage.setItem("debug",e):ve.storage.removeItem("debug")}catch(t){}}function mc(){let e;try{e=ve.storage.getItem("debug")}catch(t){}return!e&&typeof y!="undefined"&&"env"in y&&(e=y.env.DEBUG),e}function gc(){try{return localStorage}catch(e){}}Hr.exports=fo()(ve);var{formatters:yc}=Hr.exports;yc.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var mo=Z(zr=>{"use strict";d();p();f();zr.isatty=function(){return!1};function hc(){throw new Error("tty.ReadStream is not implemented")}zr.ReadStream=hc;function xc(){throw new Error("tty.WriteStream is not implemented")}zr.WriteStream=xc});var us=Z(()=>{"use strict";d();p();f()});var cs=Z((Pg,ls)=>{"use strict";d();p();f();ls.exports=(e,t=y.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return n!==-1&&(o===-1||n{"use strict";d();p();f();var bc=us(),ps=mo(),Ce=cs(),{env:te}=y,Ye;Ce("no-color")||Ce("no-colors")||Ce("color=false")||Ce("color=never")?Ye=0:(Ce("color")||Ce("colors")||Ce("color=true")||Ce("color=always"))&&(Ye=1);"FORCE_COLOR"in te&&(te.FORCE_COLOR==="true"?Ye=1:te.FORCE_COLOR==="false"?Ye=0:Ye=te.FORCE_COLOR.length===0?1:Math.min(parseInt(te.FORCE_COLOR,10),3));function go(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function yo(e,t){if(Ye===0)return 0;if(Ce("color=16m")||Ce("color=full")||Ce("color=truecolor"))return 3;if(Ce("color=256"))return 2;if(e&&!t&&Ye===void 0)return 0;let r=Ye||0;if(te.TERM==="dumb")return r;if(y.platform==="win32"){let n=bc.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in te)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in te)||te.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in te)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(te.TEAMCITY_VERSION)?1:0;if(te.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in te){let n=parseInt((te.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(te.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(te.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(te.TERM)||"COLORTERM"in te?1:r}function wc(e){let t=yo(e,e&&e.isTTY);return go(t)}fs.exports={supportsColor:wc,stdout:go(yo(!0,ps.isatty(1))),stderr:go(yo(!0,ps.isatty(2)))}});var gs=Z((se,Yr)=>{"use strict";d();p();f();var Ec=mo(),Zr=po();se.init=Sc;se.log=Tc;se.formatArgs=vc;se.save=Cc;se.load=Mc;se.useColors=Pc;se.destroy=Zr.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");se.colors=[6,2,3,4,5,1];try{let e=ds();e&&(e.stderr||e).level>=2&&(se.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}se.inspectOpts=Object.keys(y.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),n=y.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function Pc(){return"colors"in se.inspectOpts?!!se.inspectOpts.colors:Ec.isatty(y.stderr.fd)}function vc(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),i=` ${o};1m${t} \x1B[0m`;e[0]=i+e[0].split(` -`).join(` -`+i),e.push(o+"m+"+Yr.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Ac()+t+" "+e[0]}function Ac(){return se.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Tc(...e){return y.stderr.write(Zr.format(...e)+` -`)}function Cc(e){e?y.env.DEBUG=e:delete y.env.DEBUG}function Mc(){return y.env.DEBUG}function Sc(e){e.inspectOpts={};let t=Object.keys(se.inspectOpts);for(let r=0;rt.trim()).join(" ")};ms.O=function(e){return this.inspectOpts.colors=this.useColors,Zr.inspect(e,this.inspectOpts)}});var xo=Z((kg,ho)=>{"use strict";d();p();f();typeof y=="undefined"||y.type==="renderer"||y.browser===!0||y.__nwjs?ho.exports=as():ho.exports=gs()});function Ic(){return!1}var kc,Dc,sn,wo=Nr(()=>{"use strict";d();p();f();kc={},Dc={existsSync:Ic,promises:kc},sn=Dc});var Eo=Z((wy,Cs)=>{"use strict";d();p();f();function De(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function Ts(e,t){for(var r="",n=0,o=-1,i=0,s,a=0;a<=e.length;++a){if(a2){var u=r.lastIndexOf("/");if(u!==r.length-1){u===-1?(r="",n=0):(r=r.slice(0,u),n=r.length-1-r.lastIndexOf("/")),o=a,i=0;continue}}else if(r.length===2||r.length===1){r="",n=0,o=a,i=0;continue}}t&&(r.length>0?r+="/..":r="..",n=2)}else r.length>0?r+="/"+e.slice(o+1,a):r=e.slice(o+1,a),n=a-o-1;o=a,i=0}else s===46&&i!==-1?++i:i=-1}return r}function _c(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+e+n:n}var Lt={resolve:function(){for(var e="",t=!1,r,n=arguments.length-1;n>=-1&&!t;n--){var o;n>=0?o=arguments[n]:(r===void 0&&(r=y.cwd()),o=r),De(o),o.length!==0&&(e=o+"/"+e,t=o.charCodeAt(0)===47)}return e=Ts(e,!t),t?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(De(e),e.length===0)return".";var t=e.charCodeAt(0)===47,r=e.charCodeAt(e.length-1)===47;return e=Ts(e,!t),e.length===0&&!t&&(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return De(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t0&&(e===void 0?e=r:e+="/"+r)}return e===void 0?".":Lt.normalize(e)},relative:function(e,t){if(De(e),De(t),e===t||(e=Lt.resolve(e),t=Lt.resolve(t),e===t))return"";for(var r=1;ru){if(t.charCodeAt(i+c)===47)return t.slice(i+c+1);if(c===0)return t.slice(i+c)}else o>u&&(e.charCodeAt(r+c)===47?l=c:c===0&&(l=0));break}var m=e.charCodeAt(r+c),g=t.charCodeAt(i+c);if(m!==g)break;m===47&&(l=c)}var w="";for(c=r+l+1;c<=n;++c)(c===n||e.charCodeAt(c)===47)&&(w.length===0?w+="..":w+="/..");return w.length>0?w+t.slice(i+l):(i+=l,t.charCodeAt(i)===47&&++i,t.slice(i))},_makeLong:function(e){return e},dirname:function(e){if(De(e),e.length===0)return".";for(var t=e.charCodeAt(0),r=t===47,n=-1,o=!0,i=e.length-1;i>=1;--i)if(t=e.charCodeAt(i),t===47){if(!o){n=i;break}}else o=!1;return n===-1?r?"/":".":r&&n===1?"//":e.slice(0,n)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');De(e);var r=0,n=-1,o=!0,i;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){var u=e.charCodeAt(i);if(u===47){if(!o){r=i+1;break}}else a===-1&&(o=!1,a=i+1),s>=0&&(u===t.charCodeAt(s)?--s===-1&&(n=i):(s=-1,n=a))}return r===n?n=a:n===-1&&(n=e.length),e.slice(r,n)}else{for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===47){if(!o){r=i+1;break}}else n===-1&&(o=!1,n=i+1);return n===-1?"":e.slice(r,n)}},extname:function(e){De(e);for(var t=-1,r=0,n=-1,o=!0,i=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(a===47){if(!o){r=s+1;break}continue}n===-1&&(o=!1,n=s+1),a===46?t===-1?t=s:i!==1&&(i=1):t!==-1&&(i=-1)}return t===-1||n===-1||i===0||i===1&&t===n-1&&t===r+1?"":e.slice(t,n)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return _c("/",e)},parse:function(e){De(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var r=e.charCodeAt(0),n=r===47,o;n?(t.root="/",o=1):o=0;for(var i=-1,s=0,a=-1,u=!0,l=e.length-1,c=0;l>=o;--l){if(r=e.charCodeAt(l),r===47){if(!u){s=l+1;break}continue}a===-1&&(u=!1,a=l+1),r===46?i===-1?i=l:c!==1&&(c=1):i!==-1&&(c=-1)}return i===-1||a===-1||c===0||c===1&&i===a-1&&i===s+1?a!==-1&&(s===0&&n?t.base=t.name=e.slice(1,a):t.base=t.name=e.slice(s,a)):(s===0&&n?(t.name=e.slice(1,i),t.base=e.slice(1,a)):(t.name=e.slice(s,i),t.base=e.slice(s,a)),t.ext=e.slice(i,a)),s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};Lt.posix=Lt;Cs.exports=Lt});var Rs=Z((Sy,Ss)=>{"use strict";d();p();f();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 Fs=Z((Iy,Os)=>{"use strict";d();p();f();var Lc=Rs();Os.exports=e=>{let t=Lc(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var ks=Z((Uy,Ao)=>{"use strict";d();p();f();var Bc=Object.prototype.hasOwnProperty,fe="~";function or(){}Object.create&&(or.prototype=Object.create(null),new or().__proto__||(fe=!1));function jc(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function Is(e,t,r,n,o){if(typeof r!="function")throw new TypeError("The listener must be a function");var i=new jc(r,n||e,o),s=fe?fe+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],i]:e._events[s].push(i):(e._events[s]=i,e._eventsCount++),e}function an(e,t){--e._eventsCount===0?e._events=new or:delete e._events[t]}function le(){this._events=new or,this._eventsCount=0}le.prototype.eventNames=function(){var e=[],t,r;if(this._eventsCount===0)return e;for(r in t=this._events)Bc.call(t,r)&&e.push(fe?r.slice(1):r);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e};le.prototype.listeners=function(e){var t=fe?fe+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,o=r.length,i=new Array(o);n{"use strict";d();p();f();Ds.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 Bs=Z((Yy,Ls)=>{"use strict";d();p();f();Ls.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 Us=Z((rh,js)=>{"use strict";d();p();f();var Kc=Bs();js.exports=e=>typeof e=="string"?e.replace(Kc(),""):e});var Ks=Z(()=>{"use strict";d();p();f()});var ni=Z((AM,ou)=>{"use strict";d();p();f();ou.exports=function(){function e(t,r,n,o,i){return tn?n+1:t+1:o===i?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 o=t.length,i=r.length;o>0&&t.charCodeAt(o-1)===r.charCodeAt(i-1);)o--,i--;for(var s=0;sLi,getExtensionContext:()=>Bi});d();p();f();d();p();f();function Li(e){return typeof e=="function"?e:t=>t.$extends(e)}d();p();f();function Bi(e){return e}var $i={};Lr($i,{validator:()=>Ui});d();p();f();d();p();f();function Ui(...e){return t=>t}var Ji={};Lr(Ji,{Extensions:()=>qi,Public:()=>Vi,Result:()=>Ki,Utils:()=>Gi});d();p();f();var qi={};d();p();f();var Vi={};d();p();f();var Ki={};d();p();f();var Gi={};d();p();f();d();p();f();d();p();f();var ze=(e,t)=>{let r={};for(let n of e){let o=n[t];r[o]=n}return r};function Qi(e){return e.substring(0,1).toLowerCase()+e.substring(1)}var ro=class{constructor(t){this.document=t;this.compositeNames=new Set(this.datamodel.types.map(r=>r.name)),this.typeAndModelMap=this.buildTypeModelMap(),this.mappingsMap=this.buildMappingsMap(),this.outputTypeMap=this.buildMergedOutputTypeMap(),this.rootFieldMap=this.buildRootFieldMap(),this.inputTypesByName=this.buildInputTypesMap()}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(t){return this.compositeNames.has(t)}getOtherOperationNames(){return[Object.values(this.mappings.otherOperations.write),Object.values(this.mappings.otherOperations.read)].flat()}hasEnumInNamespace(t,r){var n;return((n=this.schema.enumTypes[r])==null?void 0:n.find(o=>o.name===t))!==void 0}resolveInputObjectType(t){return this.inputTypesByName.get(to(t.type,t.namespace))}resolveOutputObjectType(t){var r;if(t.location==="outputObjectTypes")return this.outputObjectTypes[(r=t.namespace)!=null?r:"prisma"].find(n=>n.name===t.type)}buildModelMap(){return ze(this.datamodel.models,"name")}buildTypeMap(){return ze(this.datamodel.types,"name")}buildTypeModelMap(){return{...this.buildTypeMap(),...this.buildModelMap()}}buildMappingsMap(){return ze(this.mappings.modelOperations,"model")}buildMergedOutputTypeMap(){return{model:ze(this.schema.outputObjectTypes.model,"name"),prisma:ze(this.schema.outputObjectTypes.prisma,"name")}}buildRootFieldMap(){return{...ze(this.outputTypeMap.prisma.Query.fields,"name"),...ze(this.outputTypeMap.prisma.Mutation.fields,"name")}}buildInputTypesMap(){let t=new Map;for(let r of this.inputObjectTypes.prisma)t.set(to(r.name,"prisma"),r);if(!this.inputObjectTypes.model)return t;for(let r of this.inputObjectTypes.model)t.set(to(r.name,"model"),r);return t}};function to(e,t){return t?`${t}.${e}`:e}d();p();f();d();p();f();var Me;(t=>{let e;(C=>(C.findUnique="findUnique",C.findUniqueOrThrow="findUniqueOrThrow",C.findFirst="findFirst",C.findFirstOrThrow="findFirstOrThrow",C.findMany="findMany",C.create="create",C.createMany="createMany",C.update="update",C.updateMany="updateMany",C.upsert="upsert",C.delete="delete",C.deleteMany="deleteMany",C.groupBy="groupBy",C.count="count",C.aggregate="aggregate",C.findRaw="findRaw",C.aggregateRaw="aggregateRaw"))(e=t.ModelAction||(t.ModelAction={}))})(Me||(Me={}));d();p();f();var en=Pe(xo()),Rc=100,Xr=[],ys,hs;typeof y!="undefined"&&typeof((ys=y.stderr)==null?void 0:ys.write)!="function"&&(en.default.log=(hs=console.debug)!=null?hs:console.log);function Oc(e){let t=(0,en.default)(e),r=Object.assign((...n)=>(t.log=r.log,n.length!==0&&Xr.push([e,...n]),Xr.length>Rc&&Xr.shift(),t("",...n)),t);return r}var xs=Object.assign(Oc,en.default);function bs(){Xr.length=0}var he=xs;d();p();f();var bo,ws,Es,Ps,vs=!0;typeof y!="undefined"&&({FORCE_COLOR:bo,NODE_DISABLE_COLORS:ws,NO_COLOR:Es,TERM:Ps}=y.env||{},vs=y.stdout&&y.stdout.isTTY);var Fc={enabled:!ws&&Es==null&&Ps!=="dumb"&&(bo!=null&&bo!=="0"||vs)};function G(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,o=`\x1B[${t}m`;return function(i){return!Fc.enabled||i==null?i:n+(~(""+i).indexOf(o)?i.replace(r,o+n):i)+o}}var $g=G(0,0),Xe=G(1,22),tn=G(2,22),qg=G(3,23),As=G(4,24),Vg=G(7,27),Kg=G(8,28),Gg=G(9,29),Jg=G(30,39),_t=G(31,39),rn=G(32,39),nn=G(33,39),Nt=G(34,39),Qg=G(35,39),et=G(36,39),Wg=G(37,39),on=G(90,39),Hg=G(90,39),zg=G(40,49),Zg=G(41,49),Yg=G(42,49),Xg=G(43,49),ey=G(44,49),ty=G(45,49),ry=G(46,49),ny=G(47,49);d();p();f();d();p();f();d();p();f();d();p();f();var Ms="library";function Po(e){let t=Nc();return t||((e==null?void 0:e.config.engineType)==="library"?"library":(e==null?void 0:e.config.engineType)==="binary"?"binary":Ms)}function Nc(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}d();p();f();var nr=Pe(Eo());function vo(e){return nr.default.sep===nr.default.posix.sep?e:e.split(nr.default.sep).join(nr.default.posix.sep)}var Bt={};Lr(Bt,{error:()=>qc,info:()=>$c,log:()=>Uc,query:()=>Vc,should:()=>Ns,tags:()=>ir,warn:()=>To});d();p();f();var ir={error:_t("prisma:error"),warn:nn("prisma:warn"),info:et("prisma:info"),query:Nt("prisma:query")},Ns={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Uc(...e){console.log(...e)}function To(e,...t){Ns.warn()&&console.warn(`${ir.warn} ${e}`,...t)}function $c(e,...t){console.info(`${ir.info} ${e}`,...t)}function qc(e,...t){console.error(`${ir.error} ${e}`,...t)}function Vc(e,...t){console.log(`${ir.query} ${e}`,...t)}d();p();f();function xt(e,t){throw new Error(t)}d();p();f();function Co(e,t){return Object.prototype.hasOwnProperty.call(e,t)}d();p();f();var Mo=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});d();p();f();function jt(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}d();p();f();function So(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{$s.has(e)||($s.add(e),To(t,...r))};d();p();f();var de=class extends Error{constructor(r,{code:n,clientVersion:o,meta:i,batchRequestIdx:s}){super(r);this.name="PrismaClientKnownRequestError",this.code=n,this.clientVersion=o,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:s,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};k(de,"PrismaClientKnownRequestError");var tt=class extends de{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};k(tt,"NotFoundError");d();p();f();var ae=class e extends Error{constructor(r,n,o){super(r);this.name="PrismaClientInitializationError",this.clientVersion=n,this.errorCode=o,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};k(ae,"PrismaClientInitializationError");d();p();f();var rt=class extends Error{constructor(r,n){super(r);this.name="PrismaClientRustPanicError",this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};k(rt,"PrismaClientRustPanicError");d();p();f();var Se=class extends Error{constructor(r,{clientVersion:n,batchRequestIdx:o}){super(r);this.name="PrismaClientUnknownRequestError",this.clientVersion=n,Object.defineProperty(this,"batchRequestIdx",{value:o,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};k(Se,"PrismaClientUnknownRequestError");d();p();f();var me=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};k(me,"PrismaClientValidationError");d();p();f();var sr=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};d();p();f();d();p();f();function ar(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Gc(e,t){let r=ar(()=>Jc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Jc(e){return{datamodel:{models:Ro(e.models),enums:Ro(e.enums),types:Ro(e.types)}}}function Ro(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}d();p();f();var V0=["JsonNullValueInput","NullableJsonNullValueInput","JsonNullValueFilter"],ln=Symbol(),Oo=new WeakMap,qe=class{constructor(t){t===ln?Oo.set(this,`Prisma.${this._getName()}`):Oo.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Oo.get(this)}},ur=class extends qe{_getNamespace(){return"NullTypes"}},lr=class extends ur{};Io(lr,"DbNull");var cr=class extends ur{};Io(cr,"JsonNull");var pr=class extends ur{};Io(pr,"AnyNull");var Fo={classes:{DbNull:lr,JsonNull:cr,AnyNull:pr},instances:{DbNull:new lr(ln),JsonNull:new cr(ln),AnyNull:new pr(ln)}};function Io(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}d();p();f();d();p();f();var zc=Pe(xo(),1);function cn(e){return{ok:!1,error:e,map(){return cn(e)},flatMap(){return cn(e)}}}var Qc=class{constructor(){hi(this,"registeredErrors",[])}consumeError(e){return this.registeredErrors[e]}registerNewError(e){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:e},t}},Vs=e=>{let t=new Qc,r=nt(t,e.startTransaction.bind(e));return{errorRegistry:t,queryRaw:nt(t,e.queryRaw.bind(e)),executeRaw:nt(t,e.executeRaw.bind(e)),flavour:e.flavour,startTransaction:async(...n)=>(await r(...n)).map(i=>Wc(t,i)),close:nt(t,e.close.bind(e))}},Wc=(e,t)=>({flavour:t.flavour,options:t.options,queryRaw:nt(e,t.queryRaw.bind(t)),executeRaw:nt(e,t.executeRaw.bind(t)),commit:nt(e,t.commit.bind(t)),rollback:nt(e,t.rollback.bind(t)),dispose:Hc(e,t.dispose.bind(t))});function nt(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let o=e.registerNewError(n);return cn({kind:"GenericJsError",id:o})}}}function Hc(e,t){return(...r)=>{try{return t(...r)}catch(n){let o=e.registerNewError(n);return cn({kind:"GenericJsError",id:o})}}}var O2=Pe(Ks()),Ju=Pe(ks());wo();var Dr=Pe(Eo());d();p();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 o=0,i=0;for(;oe.getPropertyValue(r))},getPropertyDescriptor(r){var n;return(n=e.getPropertyDescriptor)==null?void 0:n.call(e,r)}}}d();p();f();var Hs=Pe(po());d();p();f();var pn={enumerable:!0,configurable:!0,writable:!0};function fn(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>pn,has:(r,n)=>t.has(n),set:(r,n,o)=>t.add(n)&&Reflect.set(r,n,o),ownKeys:()=>[...t]}}var Qs=Symbol.for("nodejs.util.inspect.custom");function Ne(e,t){let r=Xc(t),n=new Set,o=new Proxy(e,{get(i,s){if(n.has(s))return i[s];let a=r.get(s);return a?a.getPropertyValue(s):i[s]},has(i,s){var u,l;if(n.has(s))return!0;let a=r.get(s);return a?(l=(u=a.has)==null?void 0:u.call(a,s))!=null?l:!0:Reflect.has(i,s)},ownKeys(i){let s=Ws(Reflect.ownKeys(i),r),a=Ws(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(i,s,a){var l,c;let u=r.get(s);return((c=(l=u==null?void 0:u.getPropertyDescriptor)==null?void 0:l.call(u,s))==null?void 0:c.writable)===!1?!1:(n.add(s),Reflect.set(i,s,a))},getOwnPropertyDescriptor(i,s){let a=Reflect.getOwnPropertyDescriptor(i,s);if(a&&!a.configurable)return a;let u=r.get(s);return u?u.getPropertyDescriptor?{...pn,...u==null?void 0:u.getPropertyDescriptor(s)}:pn:a},defineProperty(i,s,a){return n.add(s),Reflect.defineProperty(i,s,a)}});return o[Qs]=function(i,s,a=Hs.inspect){let u={...this};return delete u[Qs],a(u,s)},o}function Xc(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let o of n)t.set(o,r)}return t}function Ws(e,t){return e.filter(r=>{var o,i;let n=t.get(r);return(i=(o=n==null?void 0:n.has)==null?void 0:o.call(n,r))!=null?i:!0})}d();p();f();function dr(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}d();p();f();d();p();f();var Ut=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){let n=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}};d();p();f();d();p();f();function $t(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function dn(e){return e.toString()!=="Invalid Date"}d();p();f();d();p();f();var qt=9e15,at=1e9,ko="0123456789abcdef",gn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",yn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Do={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-qt,maxE:qt,crypto:!1},Xs,Ve,D=!0,xn="[DecimalError] ",st=xn+"Invalid argument: ",ea=xn+"Precision limit exceeded",ta=xn+"crypto unavailable",ra="[object Decimal]",ce=Math.floor,X=Math.pow,ep=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,tp=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,rp=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,na=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Oe=1e7,I=7,np=9007199254740991,op=gn.length-1,_o=yn.length-1,v={toStringTag:ra};v.absoluteValue=v.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),F(e)};v.ceil=function(){return F(new this.constructor(this),this.e+1,2)};v.clampedTo=v.clamp=function(e,t){var r,n=this,o=n.constructor;if(e=new o(e),t=new o(t),!e.s||!t.s)return new o(NaN);if(e.gt(t))throw Error(st+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new o(n)};v.comparedTo=v.cmp=function(e){var t,r,n,o,i=this,s=i.d,a=(e=new i.constructor(e)).d,u=i.s,l=e.s;if(!s||!a)return!u||!l?NaN:u!==l?u:s===a?0:!s^u<0?1:-1;if(!s[0]||!a[0])return s[0]?u:a[0]?-l:0;if(u!==l)return u;if(i.e!==e.e)return i.e>e.e^u<0?1:-1;for(n=s.length,o=a.length,t=0,r=na[t]^u<0?1:-1;return n===o?0:n>o^u<0?1:-1};v.cosine=v.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=ip(n,ua(n,r)),n.precision=e,n.rounding=t,F(Ve==2||Ve==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};v.cubeRoot=v.cbrt=function(){var e,t,r,n,o,i,s,a,u,l,c=this,m=c.constructor;if(!c.isFinite()||c.isZero())return new m(c);for(D=!1,i=c.s*X(c.s*c,1/3),!i||Math.abs(i)==1/0?(r=ue(c.d),e=c.e,(i=(e-r.length+1)%3)&&(r+=i==1||i==-2?"0":"00"),i=X(r,1/3),e=ce((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?r="5e"+e:(r=i.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new m(r),n.s=c.s):n=new m(i.toString()),s=(e=m.precision)+3;;)if(a=n,u=a.times(a).times(a),l=u.plus(c),n=K(l.plus(c).times(a),l.plus(u),s+2,1),ue(a.d).slice(0,s)===(r=ue(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!o&&r=="4999"){if(!o&&(F(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}s+=4,o=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(F(n,e+1,1),t=!n.times(n).times(n).eq(c));break}return D=!0,F(n,e,m.rounding,t)};v.decimalPlaces=v.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-ce(this.e/I))*I,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};v.dividedBy=v.div=function(e){return K(this,new this.constructor(e))};v.dividedToIntegerBy=v.divToInt=function(e){var t=this,r=t.constructor;return F(K(t,new r(e),0,1,1),r.precision,r.rounding)};v.equals=v.eq=function(e){return this.cmp(e)===0};v.floor=function(){return F(new this.constructor(this),this.e+1,3)};v.greaterThan=v.gt=function(e){return this.cmp(e)>0};v.greaterThanOrEqualTo=v.gte=function(e){var t=this.cmp(e);return t==1||t===0};v.hyperbolicCosine=v.cosh=function(){var e,t,r,n,o,i=this,s=i.constructor,a=new s(1);if(!i.isFinite())return new s(i.s?1/0:NaN);if(i.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(i.e,i.sd())+4,s.rounding=1,o=i.d.length,o<32?(e=Math.ceil(o/3),t=(1/wn(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),i=Vt(s,1,i.times(t),new s(1),!0);for(var u,l=e,c=new s(8);l--;)u=i.times(i),i=a.minus(u.times(c.minus(u.times(c))));return F(i,s.precision=r,s.rounding=n,!0)};v.hyperbolicSine=v.sinh=function(){var e,t,r,n,o=this,i=o.constructor;if(!o.isFinite()||o.isZero())return new i(o);if(t=i.precision,r=i.rounding,i.precision=t+Math.max(o.e,o.sd())+4,i.rounding=1,n=o.d.length,n<3)o=Vt(i,2,o,o,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,o=o.times(1/wn(5,e)),o=Vt(i,2,o,o,!0);for(var s,a=new i(5),u=new i(16),l=new i(20);e--;)s=o.times(o),o=o.times(a.plus(s.times(u.times(s).plus(l))))}return i.precision=t,i.rounding=r,F(o,t,r,!0)};v.hyperbolicTangent=v.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,K(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};v.inverseCosine=v.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),o=r.precision,i=r.rounding;return n!==-1?n===0?t.isNeg()?Re(r,o,i):new r(0):new r(NaN):t.isZero()?Re(r,o+4,i).times(.5):(r.precision=o+6,r.rounding=1,t=t.asin(),e=Re(r,o+4,i).times(.5),r.precision=o,r.rounding=i,e.minus(t))};v.inverseHyperbolicCosine=v.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,D=!1,r=r.times(r).minus(1).sqrt().plus(r),D=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};v.inverseHyperbolicSine=v.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,D=!1,r=r.times(r).plus(1).sqrt().plus(r),D=!0,n.precision=e,n.rounding=t,r.ln())};v.inverseHyperbolicTangent=v.atanh=function(){var e,t,r,n,o=this,i=o.constructor;return o.isFinite()?o.e>=0?new i(o.abs().eq(1)?o.s/0:o.isZero()?o:NaN):(e=i.precision,t=i.rounding,n=o.sd(),Math.max(n,e)<2*-o.e-1?F(new i(o),e,t,!0):(i.precision=r=n-o.e,o=K(o.plus(1),new i(1).minus(o),r+e,1),i.precision=e+4,i.rounding=1,o=o.ln(),i.precision=e,i.rounding=t,o.times(.5))):new i(NaN)};v.inverseSine=v.asin=function(){var e,t,r,n,o=this,i=o.constructor;return o.isZero()?new i(o):(t=o.abs().cmp(1),r=i.precision,n=i.rounding,t!==-1?t===0?(e=Re(i,r+4,n).times(.5),e.s=o.s,e):new i(NaN):(i.precision=r+6,i.rounding=1,o=o.div(new i(1).minus(o.times(o)).sqrt().plus(1)).atan(),i.precision=r,i.rounding=n,o.times(2)))};v.inverseTangent=v.atan=function(){var e,t,r,n,o,i,s,a,u,l=this,c=l.constructor,m=c.precision,g=c.rounding;if(l.isFinite()){if(l.isZero())return new c(l);if(l.abs().eq(1)&&m+4<=_o)return s=Re(c,m+4,g).times(.25),s.s=l.s,s}else{if(!l.s)return new c(NaN);if(m+4<=_o)return s=Re(c,m+4,g).times(.5),s.s=l.s,s}for(c.precision=a=m+10,c.rounding=1,r=Math.min(28,a/I+2|0),e=r;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(D=!1,t=Math.ceil(a/I),n=1,u=l.times(l),s=new c(l),o=l;e!==-1;)if(o=o.times(u),i=s.minus(o.div(n+=2)),o=o.times(u),s=i.plus(o.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===i.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};v.isNaN=function(){return!this.s};v.isNegative=v.isNeg=function(){return this.s<0};v.isPositive=v.isPos=function(){return this.s>0};v.isZero=function(){return!!this.d&&this.d[0]===0};v.lessThan=v.lt=function(e){return this.cmp(e)<0};v.lessThanOrEqualTo=v.lte=function(e){return this.cmp(e)<1};v.logarithm=v.log=function(e){var t,r,n,o,i,s,a,u,l=this,c=l.constructor,m=c.precision,g=c.rounding,w=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=l.d,l.s<0||!r||!r[0]||l.eq(1))return new c(r&&!r[0]?-1/0:l.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)i=!0;else{for(o=r[0];o%10===0;)o/=10;i=o!==1}if(D=!1,a=m+w,s=it(l,a),n=t?hn(c,a+10):it(e,a),u=K(s,n,a,1),mr(u.d,o=m,g))do if(a+=10,s=it(l,a),n=t?hn(c,a+10):it(e,a),u=K(s,n,a,1),!i){+ue(u.d).slice(o+1,o+15)+1==1e14&&(u=F(u,m+1,0));break}while(mr(u.d,o+=10,g));return D=!0,F(u,m,g)};v.minus=v.sub=function(e){var t,r,n,o,i,s,a,u,l,c,m,g,w=this,E=w.constructor;if(e=new E(e),!w.d||!e.d)return!w.s||!e.s?e=new E(NaN):w.d?e.s=-e.s:e=new E(e.d||w.s!==e.s?w:NaN),e;if(w.s!=e.s)return e.s=-e.s,w.plus(e);if(l=w.d,g=e.d,a=E.precision,u=E.rounding,!l[0]||!g[0]){if(g[0])e.s=-e.s;else if(l[0])e=new E(w);else return new E(u===3?-0:0);return D?F(e,a,u):e}if(r=ce(e.e/I),c=ce(w.e/I),l=l.slice(),i=c-r,i){for(m=i<0,m?(t=l,i=-i,s=g.length):(t=g,r=c,s=l.length),n=Math.max(Math.ceil(a/I),s)+2,i>n&&(i=n,t.length=1),t.reverse(),n=i;n--;)t.push(0);t.reverse()}else{for(n=l.length,s=g.length,m=n0;--n)l[s++]=0;for(n=g.length;n>i;){if(l[--n]s?i+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=l.length,o=c.length,s-o<0&&(o=s,r=c,c=l,l=r),t=0;o;)t=(l[--o]=l[o]+c[o]+t)/Oe|0,l[o]%=Oe;for(t&&(l.unshift(t),++n),s=l.length;l[--s]==0;)l.pop();return e.d=l,e.e=bn(l,n),D?F(e,a,u):e};v.precision=v.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(st+e);return r.d?(t=oa(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};v.round=function(){var e=this,t=e.constructor;return F(new t(e),e.e+1,t.rounding)};v.sine=v.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=ap(n,ua(n,r)),n.precision=e,n.rounding=t,F(Ve>2?r.neg():r,e,t,!0)):new n(NaN)};v.squareRoot=v.sqrt=function(){var e,t,r,n,o,i,s=this,a=s.d,u=s.e,l=s.s,c=s.constructor;if(l!==1||!a||!a[0])return new c(!l||l<0&&(!a||a[0])?NaN:a?s:1/0);for(D=!1,l=Math.sqrt(+s),l==0||l==1/0?(t=ue(a),(t.length+u)%2==0&&(t+="0"),l=Math.sqrt(t),u=ce((u+1)/2)-(u<0||u%2),l==1/0?t="5e"+u:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),n=new c(t)):n=new c(l.toString()),r=(u=c.precision)+3;;)if(i=n,n=i.plus(K(s,i,r+2,1)).times(.5),ue(i.d).slice(0,r)===(t=ue(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!o&&t=="4999"){if(!o&&(F(i,u+1,0),i.times(i).eq(s))){n=i;break}r+=4,o=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(F(n,u+1,1),e=!n.times(n).eq(s));break}return D=!0,F(n,u,c.rounding,e)};v.tangent=v.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=K(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,F(Ve==2||Ve==4?r.neg():r,e,t,!0)):new n(NaN)};v.times=v.mul=function(e){var t,r,n,o,i,s,a,u,l,c=this,m=c.constructor,g=c.d,w=(e=new m(e)).d;if(e.s*=c.s,!g||!g[0]||!w||!w[0])return new m(!e.s||g&&!g[0]&&!w||w&&!w[0]&&!g?NaN:!g||!w?e.s/0:e.s*0);for(r=ce(c.e/I)+ce(e.e/I),u=g.length,l=w.length,u=0;){for(t=0,o=u+n;o>n;)a=i[o]+w[n]*g[o-n-1]+t,i[o--]=a%Oe|0,t=a/Oe|0;i[o]=(i[o]+t)%Oe|0}for(;!i[--s];)i.pop();return t?++r:i.shift(),e.d=i,e.e=bn(i,r),D?F(e,m.precision,m.rounding):e};v.toBinary=function(e,t){return Bo(this,2,e,t)};v.toDecimalPlaces=v.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(xe(e,0,at),t===void 0?t=n.rounding:xe(t,0,8),F(r,e+r.e+1,t))};v.toExponential=function(e,t){var r,n=this,o=n.constructor;return e===void 0?r=Le(n,!0):(xe(e,0,at),t===void 0?t=o.rounding:xe(t,0,8),n=F(new o(n),e+1,t),r=Le(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};v.toFixed=function(e,t){var r,n,o=this,i=o.constructor;return e===void 0?r=Le(o):(xe(e,0,at),t===void 0?t=i.rounding:xe(t,0,8),n=F(new i(o),e+o.e+1,t),r=Le(n,!1,e+n.e+1)),o.isNeg()&&!o.isZero()?"-"+r:r};v.toFraction=function(e){var t,r,n,o,i,s,a,u,l,c,m,g,w=this,E=w.d,b=w.constructor;if(!E)return new b(w);if(l=r=new b(1),n=u=new b(0),t=new b(n),i=t.e=oa(E)-w.e-1,s=i%I,t.d[0]=X(10,s<0?I+s:s),e==null)e=i>0?t:l;else{if(a=new b(e),!a.isInt()||a.lt(l))throw Error(st+a);e=a.gt(t)?i>0?t:l:a}for(D=!1,a=new b(ue(E)),c=b.precision,b.precision=i=E.length*I*2;m=K(a,t,0,1,1),o=r.plus(m.times(n)),o.cmp(e)!=1;)r=n,n=o,o=l,l=u.plus(m.times(o)),u=o,o=t,t=a.minus(m.times(o)),a=o;return o=K(e.minus(r),n,0,1,1),u=u.plus(o.times(l)),r=r.plus(o.times(n)),u.s=l.s=w.s,g=K(l,n,i,1).minus(w).abs().cmp(K(u,r,i,1).minus(w).abs())<1?[l,n]:[u,r],b.precision=c,D=!0,g};v.toHexadecimal=v.toHex=function(e,t){return Bo(this,16,e,t)};v.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:xe(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]?(D=!1,r=K(r,e,0,t,1).times(e),D=!0,F(r)):(e.s=r.s,r=e),r};v.toNumber=function(){return+this};v.toOctal=function(e,t){return Bo(this,8,e,t)};v.toPower=v.pow=function(e){var t,r,n,o,i,s,a=this,u=a.constructor,l=+(e=new u(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new u(X(+a,l));if(a=new u(a),a.eq(1))return a;if(n=u.precision,i=u.rounding,e.eq(1))return F(a,n,i);if(t=ce(e.e/I),t>=e.d.length-1&&(r=l<0?-l:l)<=np)return o=ia(u,a,r,n),e.s<0?new u(1).div(o):F(o,n,i);if(s=a.s,s<0){if(tu.maxE+1||t0?s/0:0):(D=!1,u.rounding=a.s=1,r=Math.min(12,(t+"").length),o=No(e.times(it(a,n+r)),n),o.d&&(o=F(o,n+5,1),mr(o.d,n,i)&&(t=n+10,o=F(No(e.times(it(a,t+r)),t),t+5,1),+ue(o.d).slice(n+1,n+15)+1==1e14&&(o=F(o,n+1,0)))),o.s=s,D=!0,u.rounding=i,F(o,n,i))};v.toPrecision=function(e,t){var r,n=this,o=n.constructor;return e===void 0?r=Le(n,n.e<=o.toExpNeg||n.e>=o.toExpPos):(xe(e,1,at),t===void 0?t=o.rounding:xe(t,0,8),n=F(new o(n),e,t),r=Le(n,e<=n.e||n.e<=o.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};v.toSignificantDigits=v.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(xe(e,1,at),t===void 0?t=n.rounding:xe(t,0,8)),F(new n(r),e,t)};v.toString=function(){var e=this,t=e.constructor,r=Le(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};v.truncated=v.trunc=function(){return F(new this.constructor(this),this.e+1,1)};v.valueOf=v.toJSON=function(){var e=this,t=e.constructor,r=Le(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function ue(e){var t,r,n,o=e.length-1,i="",s=e[0];if(o>0){for(i+=s,t=1;tr)throw Error(st+e)}function mr(e,t,r,n){var o,i,s,a;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=I,o=0):(o=Math.ceil((t+1)/I),t%=I),i=X(10,I-t),a=e[o]%i|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==i||r>3&&a+1==i/2)&&(e[o+1]/i/100|0)==X(10,t-2)-1||(a==i/2||a==0)&&(e[o+1]/i/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==i||!n&&r>3&&a+1==i/2)&&(e[o+1]/i/1e3|0)==X(10,t-3)-1,s}function mn(e,t,r){for(var n,o=[0],i,s=0,a=e.length;sr-1&&(o[n+1]===void 0&&(o[n+1]=0),o[n+1]+=o[n]/r|0,o[n]%=r)}return o.reverse()}function ip(e,t){var r,n,o;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),o=(1/wn(4,r)).toString()):(r=16,o="2.3283064365386962890625e-10"),e.precision+=r,t=Vt(e,1,t.times(o),new e(1));for(var i=r;i--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var K=function(){function e(n,o,i){var s,a=0,u=n.length;for(n=n.slice();u--;)s=n[u]*o+a,n[u]=s%i|0,a=s/i|0;return a&&n.unshift(a),n}function t(n,o,i,s){var a,u;if(i!=s)u=i>s?1:-1;else for(a=u=0;ao[a]?1:-1;break}return u}function r(n,o,i,s){for(var a=0;i--;)n[i]-=a,a=n[i]1;)n.shift()}return function(n,o,i,s,a,u){var l,c,m,g,w,E,b,T,S,R,C,M,N,L,Te,V,H,we,z,Ee,Je=n.constructor,$=n.s==o.s?1:-1,U=n.d,O=o.d;if(!U||!U[0]||!O||!O[0])return new Je(!n.s||!o.s||(U?O&&U[0]==O[0]:!O)?NaN:U&&U[0]==0||!O?$*0:$/0);for(u?(w=1,c=n.e-o.e):(u=Oe,w=I,c=ce(n.e/w)-ce(o.e/w)),z=O.length,H=U.length,S=new Je($),R=S.d=[],m=0;O[m]==(U[m]||0);m++);if(O[m]>(U[m]||0)&&c--,i==null?(L=i=Je.precision,s=Je.rounding):a?L=i+(n.e-o.e)+1:L=i,L<0)R.push(1),E=!0;else{if(L=L/w+2|0,m=0,z==1){for(g=0,O=O[0],L++;(m1&&(O=e(O,g,u),U=e(U,g,u),z=O.length,H=U.length),V=z,C=U.slice(0,z),M=C.length;M=u/2&&++we;do g=0,l=t(O,C,z,M),l<0?(N=C[0],z!=M&&(N=N*u+(C[1]||0)),g=N/we|0,g>1?(g>=u&&(g=u-1),b=e(O,g,u),T=b.length,M=C.length,l=t(b,C,T,M),l==1&&(g--,r(b,z=10;g/=10)m++;S.e=m+c*w-1,F(S,a?i+S.e+1:i,s,E)}return S}}();function F(e,t,r,n){var o,i,s,a,u,l,c,m,g,w=e.constructor;e:if(t!=null){if(m=e.d,!m)return e;for(o=1,a=m[0];a>=10;a/=10)o++;if(i=t-o,i<0)i+=I,s=t,c=m[g=0],u=c/X(10,o-s-1)%10|0;else if(g=Math.ceil((i+1)/I),a=m.length,g>=a)if(n){for(;a++<=g;)m.push(0);c=u=0,o=1,i%=I,s=i-I+1}else break e;else{for(c=a=m[g],o=1;a>=10;a/=10)o++;i%=I,s=i-I+o,u=s<0?0:c/X(10,o-s-1)%10|0}if(n=n||t<0||m[g+1]!==void 0||(s<0?c:c%X(10,o-s-1)),l=r<4?(u||n)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||n||r==6&&(i>0?s>0?c/X(10,o-s):0:m[g-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,l?(t-=e.e+1,m[0]=X(10,(I-t%I)%I),e.e=-t||0):m[0]=e.e=0,e;if(i==0?(m.length=g,a=1,g--):(m.length=g+1,a=X(10,I-i),m[g]=s>0?(c/X(10,o-s)%X(10,s)|0)*a:0),l)for(;;)if(g==0){for(i=1,s=m[0];s>=10;s/=10)i++;for(s=m[0]+=a,a=1;s>=10;s/=10)a++;i!=a&&(e.e++,m[0]==Oe&&(m[0]=1));break}else{if(m[g]+=a,m[g]!=Oe)break;m[g--]=0,a=1}for(i=m.length;m[--i]===0;)m.pop()}return D&&(e.e>w.maxE?(e.d=null,e.e=NaN):e.e0?i=i.charAt(0)+"."+i.slice(1)+ot(n):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):o<0?(i="0."+ot(-o-1)+i,r&&(n=r-s)>0&&(i+=ot(n))):o>=s?(i+=ot(o+1-s),r&&(n=r-o-1)>0&&(i=i+"."+ot(n))):((n=o+1)0&&(o+1===s&&(i+="."),i+=ot(n))),i}function bn(e,t){var r=e[0];for(t*=I;r>=10;r/=10)t++;return t}function hn(e,t,r){if(t>op)throw D=!0,r&&(e.precision=r),Error(ea);return F(new e(gn),t,1,!0)}function Re(e,t,r){if(t>_o)throw Error(ea);return F(new e(yn),t,r,!0)}function oa(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 ot(e){for(var t="";e--;)t+="0";return t}function ia(e,t,r,n){var o,i=new e(1),s=Math.ceil(n/I+4);for(D=!1;;){if(r%2&&(i=i.times(t),Zs(i.d,s)&&(o=!0)),r=ce(r/2),r===0){r=i.d.length-1,o&&i.d[r]===0&&++i.d[r];break}t=t.times(t),Zs(t.d,s)}return D=!0,i}function zs(e){return e.d[e.d.length-1]&1}function sa(e,t,r){for(var n,o=new e(t[0]),i=0;++i17)return new g(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:0/0);for(t==null?(D=!1,u=E):u=t,a=new g(.03125);e.e>-2;)e=e.times(a),m+=5;for(n=Math.log(X(2,m))/Math.LN10*2+5|0,u+=n,r=i=s=new g(1),g.precision=u;;){if(i=F(i.times(e),u,1),r=r.times(++c),a=s.plus(K(i,r,u,1)),ue(a.d).slice(0,u)===ue(s.d).slice(0,u)){for(o=m;o--;)s=F(s.times(s),u,1);if(t==null)if(l<3&&mr(s.d,u-n,w,l))g.precision=u+=10,r=i=a=new g(1),c=0,l++;else return F(s,g.precision=E,w,D=!0);else return g.precision=E,s}s=a}}function it(e,t){var r,n,o,i,s,a,u,l,c,m,g,w=1,E=10,b=e,T=b.d,S=b.constructor,R=S.rounding,C=S.precision;if(b.s<0||!T||!T[0]||!b.e&&T[0]==1&&T.length==1)return new S(T&&!T[0]?-1/0:b.s!=1?NaN:T?0:b);if(t==null?(D=!1,c=C):c=t,S.precision=c+=E,r=ue(T),n=r.charAt(0),Math.abs(i=b.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=ue(b.d),n=r.charAt(0),w++;i=b.e,n>1?(b=new S("0."+r),i++):b=new S(n+"."+r.slice(1))}else return l=hn(S,c+2,C).times(i+""),b=it(new S(n+"."+r.slice(1)),c-E).plus(l),S.precision=C,t==null?F(b,C,R,D=!0):b;for(m=b,u=s=b=K(b.minus(1),b.plus(1),c,1),g=F(b.times(b),c,1),o=3;;){if(s=F(s.times(g),c,1),l=u.plus(K(s,new S(o),c,1)),ue(l.d).slice(0,c)===ue(u.d).slice(0,c))if(u=u.times(2),i!==0&&(u=u.plus(hn(S,c+2,C).times(i+""))),u=K(u,new S(w),c,1),t==null)if(mr(u.d,c-E,R,a))S.precision=c+=E,l=s=b=K(m.minus(1),m.plus(1),c,1),g=F(b.times(b),c,1),o=a=1;else return F(u,S.precision=C,R,D=!0);else return S.precision=C,u;u=l,o+=2}}function aa(e){return String(e.s*e.s/0)}function Lo(e,t){var r,n,o;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(o=t.length;t.charCodeAt(o-1)===48;--o);if(t=t.slice(n,o),t){if(o-=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"),na.test(t))return Lo(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(tp.test(t))r=16,t=t.toLowerCase();else if(ep.test(t))r=2;else if(rp.test(t))r=8;else throw Error(st+t);for(i=t.search(/p/i),i>0?(u=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),i=t.indexOf("."),s=i>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,i=a-i,o=ia(n,new n(r),i,i*2)),l=mn(t,r,Oe),c=l.length-1,i=c;l[i]===0;--i)l.pop();return i<0?new n(e.s*0):(e.e=bn(l,c),e.d=l,D=!1,s&&(e=K(e,o,a*4)),u&&(e=e.times(Math.abs(u)<54?X(2,u):wt.pow(2,u))),D=!0,e)}function ap(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:Vt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/wn(5,r)),t=Vt(e,2,t,t);for(var o,i=new e(5),s=new e(16),a=new e(20);r--;)o=t.times(t),t=t.times(i.plus(o.times(s.times(o).minus(a))));return t}function Vt(e,t,r,n,o){var i,s,a,u,l=1,c=e.precision,m=Math.ceil(c/I);for(D=!1,u=r.times(r),a=new e(n);;){if(s=K(a.times(u),new e(t++*t++),c,1),a=o?n.plus(s):n.minus(s),n=K(s.times(u),new e(t++*t++),c,1),s=a.plus(n),s.d[m]!==void 0){for(i=m;s.d[i]===a.d[i]&&i--;);if(i==-1)break}i=a,a=n,n=s,s=i,l++}return D=!0,s.d.length=m+1,s}function wn(e,t){for(var r=e;--t;)r*=e;return r}function ua(e,t){var r,n=t.s<0,o=Re(e,e.precision,1),i=o.times(.5);if(t=t.abs(),t.lte(i))return Ve=n?4:1,t;if(r=t.divToInt(o),r.isZero())Ve=n?3:2;else{if(t=t.minus(r.times(o)),t.lte(i))return Ve=zs(r)?n?2:3:n?4:1,t;Ve=zs(r)?n?1:4:n?3:2}return t.minus(o).abs()}function Bo(e,t,r,n){var o,i,s,a,u,l,c,m,g,w=e.constructor,E=r!==void 0;if(E?(xe(r,1,at),n===void 0?n=w.rounding:xe(n,0,8)):(r=w.precision,n=w.rounding),!e.isFinite())c=aa(e);else{for(c=Le(e),s=c.indexOf("."),E?(o=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):o=t,s>=0&&(c=c.replace(".",""),g=new w(1),g.e=c.length-s,g.d=mn(Le(g),10,o),g.e=g.d.length),m=mn(c,10,o),i=u=m.length;m[--u]==0;)m.pop();if(!m[0])c=E?"0p+0":"0";else{if(s<0?i--:(e=new w(e),e.d=m,e.e=i,e=K(e,g,r,n,0,o),m=e.d,i=e.e,l=Xs),s=m[r],a=o/2,l=l||m[r+1]!==void 0,l=n<4?(s!==void 0||l)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||l||n===6&&m[r-1]&1||n===(e.s<0?8:7)),m.length=r,l)for(;++m[--r]>o-1;)m[r]=0,r||(++i,m.unshift(1));for(u=m.length;!m[u-1];--u);for(s=0,c="";s1)if(t==16||t==8){for(s=t==16?4:3,--u;u%s;u++)c+="0";for(m=mn(c,o,t),u=m.length;!m[u-1];--u);for(s=1,c="1.";su)for(i-=u;i--;)c+="0";else it)return e.length=t,!0}function up(e){return new this(e).abs()}function lp(e){return new this(e).acos()}function cp(e){return new this(e).acosh()}function pp(e,t){return new this(e).plus(t)}function fp(e){return new this(e).asin()}function dp(e){return new this(e).asinh()}function mp(e){return new this(e).atan()}function gp(e){return new this(e).atanh()}function yp(e,t){e=new this(e),t=new this(t);var r,n=this.precision,o=this.rounding,i=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=Re(this,i,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?Re(this,n,o):new this(0),r.s=e.s):!e.d||t.isZero()?(r=Re(this,i,1).times(.5),r.s=e.s):t.s<0?(this.precision=i,this.rounding=1,r=this.atan(K(e,t,i,1)),t=Re(this,i,1),this.precision=n,this.rounding=o,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(K(e,t,i,1)),r}function hp(e){return new this(e).cbrt()}function xp(e){return F(e=new this(e),e.e+1,2)}function bp(e,t,r){return new this(e).clamp(t,r)}function wp(e){if(!e||typeof e!="object")throw Error(xn+"Object expected");var t,r,n,o=e.defaults===!0,i=["precision",1,at,"rounding",0,8,"toExpNeg",-qt,0,"toExpPos",0,qt,"maxE",0,qt,"minE",-qt,0,"modulo",0,9];for(t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(st+r+": "+n);if(r="crypto",o&&(this[r]=Do[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(ta);else this[r]=!1;else throw Error(st+r+": "+n);return this}function Ep(e){return new this(e).cos()}function Pp(e){return new this(e).cosh()}function la(e){var t,r,n;function o(i){var s,a,u,l=this;if(!(l instanceof o))return new o(i);if(l.constructor=o,Ys(i)){l.s=i.s,D?!i.d||i.e>o.maxE?(l.e=NaN,l.d=null):i.e=10;a/=10)s++;D?s>o.maxE?(l.e=NaN,l.d=null):s=429e7?t[i]=crypto.getRandomValues(new Uint32Array(1))[0]:a[i++]=o%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);i=214e7?crypto.randomBytes(4).copy(t,i):(a.push(o%1e7),i+=4);i=n/4}else throw Error(ta);else for(;i=10;o/=10)n++;n`}};function Gt(e){return e instanceof gr}d();p();f();d();p();f();var En=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};d();p();f();var Pn=e=>e,vn={bold:Pn,red:Pn,green:Pn,dim:Pn,enabled:!1},ca={bold:Xe,red:_t,green:rn,dim:tn,enabled:!0},Jt={write(e){e.writeLine(",")}};d();p();f();var Be=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)))})}};d();p();f();var ut=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Qt=class extends ut{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new En(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 Be("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Jt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}};d();p();f();var pa=": ",An=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()+pa.length}write(t){let r=new Be(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(pa).write(this.value)}};d();p();f();var re=class e extends ut{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,...o]=r,i=this.getField(n);if(!i)return;let s=i;for(let a of o){let u;if(s.value instanceof e?u=s.value.getField(a):s.value instanceof Qt&&(u=s.value.getField(Number(a))),!u)return;s=u}return s}getDeepFieldValue(r){var n;return r.length===0?this:(n=this.getDeepField(r))==null?void 0:n.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){var n;return(n=this.getField(r))==null?void 0:n.value}getDeepSubSelectionValue(r){let n=this;for(let o of r){if(!(n instanceof e))return;let i=n.getSubSelectionValue(o);if(!i)return;n=i}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let o=n;for(let i of r){let s=o.value.getFieldValue(i);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;o=a}return o}getSelectionParent(){let r=this.getField("select");if((r==null?void 0:r.value)instanceof e)return{kind:"select",value:r.value};let n=this.getField("include");if((n==null?void 0:n.value)instanceof e)return{kind:"include",value:n.value}}getSubSelectionValue(r){var n;return(n=this.getSelectionParent())==null?void 0:n.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(o=>o.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)}writeEmpty(r){let n=new Be("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(Jt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};d();p();f();var ne=class extends ut{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Be(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}};var jo=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 Tn(e){return new jo(fa(e))}function fa(e){let t=new re;for(let[r,n]of Object.entries(e)){let o=new An(r,da(n));t.addField(o)}return t}function da(e){if(typeof e=="string")return new ne(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new ne(String(e));if(typeof e=="bigint")return new ne(`${e}n`);if(e===null)return new ne("null");if(e===void 0)return new ne("undefined");if(Kt(e))return new ne(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return x.Buffer.isBuffer(e)?new ne(`Buffer.alloc(${e.byteLength})`):new ne(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=dn(e)?e.toISOString():"Invalid Date";return new ne(`new Date("${t}")`)}return e instanceof qe?new ne(`Prisma.${e._getName()}`):Gt(e)?new ne(`prisma.${Qi(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Wp(e):typeof e=="object"?fa(e):new ne(Object.prototype.toString.call(e))}function Wp(e){let t=new Qt;for(let r of e)t.addItem(da(r));return t}function ma(e){if(e===void 0)return"";let t=Tn(e);return new Ut(0,{colors:vn}).write(t).toString()}d();p();f();d();p();f();d();p();f();d();p();f();d();p();f();var yr="";function ga(e){var t=e.split(` -`);return t.reduce(function(r,n){var o=Zp(n)||Xp(n)||rf(n)||af(n)||of(n);return o&&r.push(o),r},[])}var Hp=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,zp=/\((\S*)(?::(\d+))(?::(\d+))\)/;function Zp(e){var t=Hp.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,o=zp.exec(t[2]);return n&&o!=null&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]),{file:r?null:t[2],methodName:t[1]||yr,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var Yp=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Xp(e){var t=Yp.exec(e);return t?{file:t[2],methodName:t[1]||yr,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var ef=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,tf=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function rf(e){var t=ef.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=tf.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||yr,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var nf=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function of(e){var t=nf.exec(e);return t?{file:t[3],methodName:t[1]||yr,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var sf=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function af(e){var t=sf.exec(e);return t?{file:t[2],methodName:t[1]||yr,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Uo=class{getLocation(){return null}},$o=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=ga(t).find(o=>{if(!o.file)return!1;let i=vo(o.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/")&&!o.methodName.includes("new ")&&!o.methodName.includes("getCallSite")&&!o.methodName.includes("Proxy.")&&o.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function lt(e){return e==="minimal"?new Uo:new $o}d();p();f();d();p();f();d();p();f();var ya={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Wt(e={}){let t=lf(e);return Object.entries(t).reduce((n,[o,i])=>(ya[o]!==void 0?n.select[o]={select:i}:n[o]=i,n),{select:{}})}function lf(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Cn(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ha(e,t){let r=Cn(e);return t({action:"aggregate",unpacker:r,argsMapper:Wt})(e)}d();p();f();function cf(e={}){let{select:t,...r}=e;return typeof t=="object"?Wt({...r,_count:t}):Wt({...r,_count:{_all:!0}})}function pf(e={}){return typeof e.select=="object"?t=>Cn(e)(t)._count:t=>Cn(e)(t)._count._all}function xa(e,t){return t({action:"count",unpacker:pf(e),argsMapper:cf})(e)}d();p();f();function ff(e={}){let t=Wt(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 df(e={}){return t=>(typeof(e==null?void 0:e._count)=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function ba(e,t){return t({action:"groupBy",unpacker:df(e),argsMapper:ff})(e)}function wa(e,t,r){if(t==="aggregate")return n=>ha(n,r);if(t==="count")return n=>xa(n,r);if(t==="groupBy")return n=>ba(n,r)}d();p();f();function Ea(e,t){let r=t.fields.filter(o=>!o.relationName),n=Mo(r,o=>o.name);return new Proxy({},{get(o,i){if(i in o||typeof i=="symbol")return o[i];let s=n[i];if(s)return new gr(e,i,s.type,s.isList,s.kind==="enum")},...fn(Object.keys(n))})}d();p();f();d();p();f();var Pa=e=>Array.isArray(e)?e:e.split("."),qo=(e,t)=>Pa(t).reduce((r,n)=>r&&r[n],e),va=(e,t,r)=>Pa(t).reduceRight((n,o,i,s)=>Object.assign({},qo(e,s.slice(0,i)),{[o]:n}),r);function mf(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function gf(e,t,r){return t===void 0?e!=null?e:{}:va(t,r,e||!0)}function Vo(e,t,r,n,o,i){let a=e._runtimeDataModel.models[t].fields.reduce((u,l)=>({...u,[l.name]:l}),{});return u=>{let l=lt(e._errorFormat),c=mf(n,o),m=gf(u,i,c),g=r({dataPath:c,callsite:l})(m),w=yf(e,t);return new Proxy(g,{get(E,b){if(!w.includes(b))return E[b];let S=[a[b].type,r,b],R=[c,m];return Vo(e,...S,...R)},...fn([...w,...Object.getOwnPropertyNames(g)])})}}function yf(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}d();p();f();d();p();f();var Sa=Pe(_s());d();p();f();wo();d();p();f();d();p();f();d();p();f();var Aa={keyword:et,entity:et,value:e=>Xe(Nt(e)),punctuation:Nt,directive:et,function:et,variable:e=>Xe(Nt(e)),string:e=>Xe(rn(e)),boolean:nn,number:et,comment:on};var hf=e=>e,Mn={},xf=0,_={manual:Mn.Prism&&Mn.Prism.manual,disableWorkerMessageHandler:Mn.Prism&&Mn.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof Fe){let t=e;return new Fe(t.type,_.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(_.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(we instanceof Fe)continue;if(N&&V!=t.length-1){R.lastIndex=H;var m=R.exec(e);if(!m)break;var c=m.index+(M?m[1].length:0),g=m.index+m[0].length,a=V,u=H;for(let O=t.length;a=u&&(++V,H=u);if(t[V]instanceof Fe)continue;l=a-V,we=e.slice(H,u),m.index-=H}else{R.lastIndex=0;var m=R.exec(we),l=1}if(!m){if(i)break;continue}M&&(L=m[1]?m[1].length:0);var c=m.index+L,m=m[0].slice(L),g=c+m.length,w=we.slice(0,c),E=we.slice(g);let z=[V,l];w&&(++V,H+=w.length,z.push(w));let Ee=new Fe(b,C?_.tokenize(m,C):m,Te,m,N);if(z.push(Ee),E&&z.push(E),Array.prototype.splice.apply(t,z),l!=1&&_.matchGrammar(e,t,r,V,H,!0,b),i)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let o in n)t[o]=n[o];delete t.rest}return _.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=_.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=_.hooks.all[e];if(!(!r||!r.length))for(var n=0,o;o=r[n++];)o(t)}},Token:Fe};_.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:/[{}[\];(),.:]/};_.languages.javascript=_.languages.extend("clike",{"class-name":[_.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}/});_.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;_.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:_.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:_.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:_.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:_.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});_.languages.markup&&_.languages.markup.tag.addInlined("script","javascript");_.languages.js=_.languages.javascript;_.languages.typescript=_.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/});_.languages.ts=_.languages.typescript;function Fe(e,t,r,n,o){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!o}Fe.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return Fe.stringify(r,t)}).join(""):bf(e.type)(e.content)};function bf(e){return Aa[e]||hf}function Ta(e){return wf(e,_.languages.javascript)}function wf(e,t){return _.tokenize(e,t).map(n=>Fe.stringify(n)).join("")}d();p();f();var Ca=Pe(Fs());function Ma(e){return(0,Ca.default)(e)}var Sn=class e{static read(t){let r;try{r=sn.readFileSync(t,"utf-8")}catch(n){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,o=[...this.lines];return o[n]=r(o[n]),new e(this.firstLineNumber,o)}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,o)=>o===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` -`);return new e(t,Ma(n).split(` -`))}highlight(){let t=Ta(this.toString());return new e(this.firstLineNumber,t.split(` -`))}toString(){return this.lines.join(` -`)}};var Ef={red:_t,gray:on,dim:tn,bold:Xe,underline:As,highlightSource:e=>e.highlight()},Pf={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function vf({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:o},i){var m;let s={functionName:`prisma.${r}()`,message:t,isPanic:n!=null?n:!1,callArguments:o};if(!e||typeof window!="undefined"||y.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let u=Math.max(1,a.lineNumber-3),l=(m=Sn.read(a.fileName))==null?void 0:m.slice(u,a.lineNumber),c=l==null?void 0:l.lineAt(a.lineNumber);if(l&&c){let g=Tf(c),w=Af(c);if(!w)return s;s.functionName=`${w.code})`,s.location=a,n||(l=l.mapLineAt(a.lineNumber,b=>b.slice(0,w.openingBraceIndex))),l=i.highlightSource(l);let E=String(l.lastLineNumber).length;if(s.contextLines=l.mapLines((b,T)=>i.gray(String(T).padStart(E))+" "+b).mapLines(b=>i.dim(b)).prependSymbolAt(a.lineNumber,i.bold(i.red("\u2192"))),o){let b=g+E+1;b+=2,s.callArguments=(0,Sa.default)(o,b).slice(b)}}return s}function Af(e){let t=Object.keys(Me.ModelAction).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let o=n.index+n[0].length,i=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(i,o),openingBraceIndex:o}}return null}function Tf(e){let t=0;for(let r=0;r{if("rejectOnNotFound"in n.args){let i=Ht({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new me(i,{clientVersion:t})}return await r(n).catch(i=>{throw i instanceof de&&i.code==="P2025"?new tt(`No ${e} found`,t):i})}}d();p();f();function je(e){return e.replace(/^./,t=>t.toLowerCase())}var Rf=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Of=["aggregate","count","groupBy"];function Ko(e,t){var o;let r=(o=e._extensions.getAllModelExtensions(t))!=null?o:{},n=[Ff(e,t),kf(e,t),fr(r),ge("name",()=>t),ge("$name",()=>t),ge("$parent",()=>e._appliedParent)];return Ne({},n)}function Ff(e,t){let r=je(t),n=Object.keys(Me.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(o){let i=o,s=u=>e._request(u);s=Ra(i,t,e._clientVersion,s);let a=u=>l=>{let c=lt(e._errorFormat);return e._createPrismaPromise(m=>{let g={args:l,dataPath:[],action:i,model:t,clientMethod:`${r}.${o}`,jsModelName:r,transaction:m,callsite:c};return s({...g,...u})})};return Rf.includes(i)?Vo(e,t,a):If(o)?wa(e,o,a):a({})}}}function If(e){return Of.includes(e)}function kf(e,t){return bt(ge("fields",()=>{let r=e._runtimeDataModel.models[t];return Ea(t,r)}))}d();p();f();function Oa(e){return e.replace(/^./,t=>t.toUpperCase())}var Go=Symbol();function hr(e){let t=[Df(e),ge(Go,()=>e),ge("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(fr(r)),Ne(e,t)}function Df(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(je),n=[...new Set(t.concat(r))];return bt({getKeys(){return n},getPropertyValue(o){let i=Oa(o);if(e._runtimeDataModel.models[i]!==void 0)return Ko(e,i);if(e._runtimeDataModel.models[o]!==void 0)return Ko(e,o)},getPropertyDescriptor(o){if(!r.includes(o))return{enumerable:!1}}})}function Rn(e){return e[Go]?e[Go]:e}function Fa(e){if(typeof e=="function")return e(this);let t=Rn(this),r=Object.create(t,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return hr(r)}d();p();f();d();p();f();function Ia({result:e,modelName:t,select:r,extensions:n}){let o=n.getAllComputedFields(t);if(!o)return e;let i=[],s=[];for(let a of Object.values(o)){if(r){if(!r[a.name])continue;let u=a.needs.filter(l=>!r[l]);u.length>0&&s.push(dr(u))}_f(e,a.needs)&&i.push(Nf(a,Ne(e,i)))}return i.length>0||s.length>0?Ne(e,[...i,...s]):e}function _f(e,t){return t.every(r=>Co(e,r))}function Nf(e,t){return bt(ge(e.name,()=>e.compute(t)))}d();p();f();function On({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:o}){var s;if(Array.isArray(t)){for(let a=0;ac.name===i);if(!u||u.kind!=="object"||!u.relationName)continue;let l=typeof s=="object"?s:{};t[i]=On({visitor:o,result:t[i],args:l,modelName:u.type,runtimeDataModel:n})}}function Da({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:o}){return n.isEmpty()||e==null||typeof e!="object"||!o.models[t]?e:On({result:e,args:r!=null?r:{},modelName:t,runtimeDataModel:o,visitor:(s,a,u)=>Ia({result:s,modelName:je(a),select:u.select,extensions:n})})}d();p();f();d();p();f();function _a(e){if(e instanceof Ae)return Lf(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{var s,a;let i=t.customDataProxyFetch;return"transaction"in t&&o!==void 0&&(((s=t.transaction)==null?void 0:s.kind)==="batch"&&t.transaction.lock.then(),t.transaction=o),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:_a((a=t.args)!=null?a:{}),__internalParams:t,query:(u,l=t)=>{let c=l.customDataProxyFetch;return l.customDataProxyFetch=$a(i,c),l.args=u,La(e,l,r,n+1)}})})}function Ba(e,t){let{jsModelName:r,action:n,clientMethod:o}=t,i=r?n:o;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r!=null?r:"$none",i);return La(e,t,s)}function ja(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Ua(r,n,0,e):e(r)}}function Ua(e,t,r,n){if(r===t.length)return n(e);let o=e.customDataProxyFetch,i=e.requests[0].transaction;return t[r]({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,a=e){let u=a.customDataProxyFetch;return a.customDataProxyFetch=$a(o,u),Ua(a,t,r+1,n)}})}var Na=e=>e;function $a(e=Na,t=Na){return r=>e(t(r))}d();p();f();d();p();f();function Va(e,t,r){let n=je(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Bf({...e,...qa(t.name,e,t.result.$allModels),...qa(t.name,e,t.result[n])})}function Bf(e){let t=new _e,r=(n,o)=>t.getOrCreate(n,()=>o.has(n)?[n]:(o.add(n),e[n]?e[n].needs.flatMap(i=>r(i,o)):[n]));return jt(e,n=>({...n,needs:r(n.name,new Set)}))}function qa(e,t,r){return r?jt(r,({needs:n,compute:o},i)=>({name:i,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:jf(t,i,o)})):{}}function jf(e,t,r){var o;let n=(o=e==null?void 0:e[t])==null?void 0:o.compute;return n?i=>r({...i,[t]:n(i)}):r}function Ka(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let o of n.needs)r[o]=!0;return r}var Fn=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new _e;this.modelExtensionsCache=new _e;this.queryCallbacksCache=new _e;this.clientExtensions=ar(()=>{var t,r;return this.extension.client?{...(r=this.previous)==null?void 0:r.getAllClientExtensions(),...this.extension.client}:(t=this.previous)==null?void 0:t.getAllClientExtensions()});this.batchCallbacks=ar(()=>{var n,o,i;let t=(o=(n=this.previous)==null?void 0:n.getAllBatchQueryCallbacks())!=null?o:[],r=(i=this.extension.query)==null?void 0:i.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>{var r;return Va((r=this.previous)==null?void 0:r.getAllComputedFields(t),this.extension,t)})}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{var n,o;let r=je(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?(n=this.previous)==null?void 0:n.getAllModelExtensions(t):{...(o=this.previous)==null?void 0:o.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{var s,a;let n=(a=(s=this.previous)==null?void 0:s.getAllQueryCallbacks(t,r))!=null?a:[],o=[],i=this.extension.query;return!i||!(i[t]||i.$allModels||i[r]||i.$allOperations)?n:(i[t]!==void 0&&(i[t][r]!==void 0&&o.push(i[t][r]),i[t].$allOperations!==void 0&&o.push(i[t].$allOperations)),t!=="$none"&&i.$allModels!==void 0&&(i.$allModels[r]!==void 0&&o.push(i.$allModels[r]),i.$allModels.$allOperations!==void 0&&o.push(i.$allModels.$allOperations)),i[r]!==void 0&&o.push(i[r]),i.$allOperations!==void 0&&o.push(i.$allOperations),n.concat(o))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},In=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Fn(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Fn(t,this.head))}getAllComputedFields(t){var r;return(r=this.head)==null?void 0:r.getAllComputedFields(t)}getAllClientExtensions(){var t;return(t=this.head)==null?void 0:t.getAllClientExtensions()}getAllModelExtensions(t){var r;return(r=this.head)==null?void 0:r.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){var n,o;return(o=(n=this.head)==null?void 0:n.getAllQueryCallbacks(t,r))!=null?o:[]}getAllBatchQueryCallbacks(){var t,r;return(r=(t=this.head)==null?void 0:t.getAllBatchQueryCallbacks())!=null?r:[]}};d();p();f();var Ga=he("prisma:client"),Ja={Vercel:"vercel","Netlify CI":"netlify"};function Qa({postinstall:e,ciName:t,clientVersion:r}){if(Ga("checkPlatformCaching:postinstall",e),Ga("checkPlatformCaching:ciName",t),e===!0&&t&&t in Ja){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. +var Hs=Object.create;var Qr=Object.defineProperty;var Ws=Object.getOwnPropertyDescriptor;var Ks=Object.getOwnPropertyNames;var zs=Object.getPrototypeOf,Ys=Object.prototype.hasOwnProperty;var Hr=(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 Te=(e,t)=>()=>(e&&(t=e(e=0)),t);var Fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wr=(e,t)=>{for(var r in t)Qr(e,r,{get:t[r],enumerable:!0})},Zs=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ks(t))!Ys.call(e,i)&&i!==r&&Qr(e,i,{get:()=>t[i],enumerable:!(n=Ws(t,i))||n.enumerable});return e};var _e=(e,t,r)=>(r=e!=null?Hs(zs(e)):{},Zs(t||!e||!e.__esModule?Qr(r,"default",{value:e,enumerable:!0}):r,e));var y,c=Te(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var b,p=Te(()=>{"use strict";b=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,m=Te(()=>{"use strict";E=()=>{};E.prototype=E});var d=Te(()=>{"use strict"});var ci=Fe(ze=>{"use strict";f();c();p();m();d();var zn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Xs=zn(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=C.indexOf("=");M===-1&&(M=R);var F=M===R?0:4-M%4;return[M,F]}function l(C){var R=a(C),M=R[0],F=R[1];return(M+F)*3/4-F}function u(C,R,M){return(R+M)*3/4-M}function g(C){var R,M=a(C),F=M[0],B=M[1],D=new n(u(C,F,B)),O=0,oe=B>0?F-4:F,G;for(G=0;G>16&255,D[O++]=R>>8&255,D[O++]=R&255;return B===2&&(R=r[C.charCodeAt(G)]<<2|r[C.charCodeAt(G+1)]>>4,D[O++]=R&255),B===1&&(R=r[C.charCodeAt(G)]<<10|r[C.charCodeAt(G+1)]<<4|r[C.charCodeAt(G+2)]>>2,D[O++]=R>>8&255,D[O++]=R&255),D}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function v(C,R,M){for(var F,B=[],D=R;Doe?oe:O+D));return F===1?(R=C[M-1],B.push(t[R>>2]+t[R<<4&63]+"==")):F===2&&(R=(C[M-2]<<8)+C[M-1],B.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),B.join("")}}),ea=zn(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,C=t[r+v];for(v+=S,s=C&(1<<-h)-1,C>>=-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:(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,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+C]=l&255,C+=R,l/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=R,a/=256,g-=8);t[n+C-R]|=M*128}}),Kr=Xs(),We=ea(),Qn=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.Buffer=T;ze.SlowBuffer=sa;ze.INSPECT_MAX_BYTES=50;var or=2147483647;ze.kMaxLength=or;T.TYPED_ARRAY_SUPPORT=ta();!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 ta(){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 we(e){if(e>or)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 Zr(e)}return Yn(e,t,r)}T.poolSize=8192;function Yn(e,t,r){if(typeof e=="string")return na(e,t);if(ArrayBuffer.isView(e))return ia(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(me(e,ArrayBuffer)||e&&me(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(e,SharedArrayBuffer)||e&&me(e.buffer,SharedArrayBuffer)))return Xn(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=oa(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 Yn(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function Zn(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 ra(e,t,r){return Zn(e),e<=0?we(e):t!==void 0?typeof r=="string"?we(e).fill(t,r):we(e).fill(t):we(e)}T.alloc=function(e,t,r){return ra(e,t,r)};function Zr(e){return Zn(e),we(e<0?0:Xr(e)|0)}T.allocUnsafe=function(e){return Zr(e)};T.allocUnsafeSlow=function(e){return Zr(e)};function na(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=ei(e,t)|0,n=we(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function zr(e){let t=e.length<0?0:Xr(e.length)|0,r=we(t);for(let n=0;n=or)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+or.toString(16)+" bytes");return e|0}function sa(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(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),me(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 ei(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||me(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 Yr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return ui(e).length;default:if(i)return n?-1:Yr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=ei;function aa(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 ya(this,t,r);case"utf8":case"utf-8":return ri(this,t,r);case"ascii":return ga(this,t,r);case"latin1":case"binary":return ha(this,t,r);case"base64":return da(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wa(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Le(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+=" ... "),""};Qn&&(T.prototype[Qn]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(me(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,tn(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:Hn(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):Hn(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Hn(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 la(this,e,t,r);case"utf8":case"utf-8":return ua(this,e,t,r);case"ascii":case"latin1":case"binary":return ca(this,e,t,r);case"base64":return pa(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 da(e,t,r){return t===0&&r===e.length?Kr.fromByteArray(e):Kr.fromByteArray(e.slice(t,r))}function ri(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 Wn=4096;function fa(e){let t=e.length;if(t<=Wn)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=Ae(function(e){e=e>>>0,Ke(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(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,Ke(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(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=Ae(function(e){e=e>>>0,Ke(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(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,Ke(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(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),We.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||H(e,4,this.length),We.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||H(e,8,this.length),We.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||H(e,8,this.length),We.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 ni(e,t,r,n,i){li(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 ii(e,t,r,n,i){li(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=Ae(function(e,t=0){return ni(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Ae(function(e,t=0){return ii(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=Ae(function(e,t=0){return ni(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Ae(function(e,t=0){return ii(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function oi(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 si(e,t,r,n,i){return t=+t,r=r>>>0,i||oi(e,t,r,4,34028234663852886e22,-34028234663852886e22),We.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return si(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return si(this,e,t,!1,r)};function ai(e,t,r,n,i){return t=+t,r=r>>>0,i||oi(e,t,r,8,17976931348623157e292,-17976931348623157e292),We.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return ai(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return ai(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=Kn(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Kn(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function Kn(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 Ea(e,t,r){Ke(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Et(t,e.length-(r+1))}function li(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 He.ERR_OUT_OF_RANGE("value",a,e)}Ea(n,i,o)}function Ke(e,t){if(typeof e!="number")throw new He.ERR_INVALID_ARG_TYPE(t,"number",e)}function Et(e,t,r){throw Math.floor(e)!==e?(Ke(e,r),new He.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new He.ERR_BUFFER_OUT_OF_BOUNDS:new He.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var ba=/[^+/0-9A-Za-z-_]/g;function xa(e){if(e=e.split("=")[0],e=e.trim().replace(ba,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Yr(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 Pa(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function ui(e){return Kr.toByteArray(xa(e))}function sr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function me(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function tn(e){return e!==e}var Ta=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 Ae(e){return typeof BigInt>"u"?Aa:e}function Aa(){throw new Error("BigInt not supported")}});var w,f=Te(()=>{"use strict";w=_e(ci())});function Ca(){return!1}var Ra,Sa,hi,yi=Te(()=>{"use strict";f();c();p();m();d();Ra={},Sa={existsSync:Ca,promises:Ra},hi=Sa});function Na(...e){return e.join("/")}function Fa(...e){return e.join("/")}var Di,_a,La,xt,Mi=Te(()=>{"use strict";f();c();p();m();d();Di="/",_a={sep:Di},La={resolve:Na,posix:_a,join:Fa,sep:Di},xt=La});var cr,Fi=Te(()=>{"use strict";f();c();p();m();d();cr=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=Fe((Xm,_i)=>{"use strict";f();c();p();m();d();_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=Fe((pd,Ui)=>{"use strict";f();c();p();m();d();Ui.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 Vi=Fe((yd,qi)=>{"use strict";f();c();p();m();d();var ja=$i();qi.exports=e=>typeof e=="string"?e.replace(ja(),""):e});var Ji=Fe((yh,Wa)=>{Wa.exports={name:"@prisma/engines-version",version:"5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4c784e32044a8a016d99474bd02a3b6123742169"},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 Qi=Fe(()=>{"use strict";f();c();p();m();d()});var Bn=Fe((i2,is)=>{"use strict";f();c();p();m();d();is.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;spi,getExtensionContext:()=>mi});f();c();p();m();d();f();c();p();m();d();function pi(e){return typeof e=="function"?e:t=>t.$extends(e)}f();c();p();m();d();function mi(e){return e}var gi={};Wr(gi,{validator:()=>fi});f();c();p();m();d();f();c();p();m();d();function fi(...e){return t=>t}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();var rn,wi,Ei,bi,xi=!0;typeof y<"u"&&({FORCE_COLOR:rn,NODE_DISABLE_COLORS:wi,NO_COLOR:Ei,TERM:bi}=y.env||{},xi=y.stdout&&y.stdout.isTTY);var Oa={enabled:!wi&&Ei==null&&bi!=="dumb"&&(rn!=null&&rn!=="0"||xi)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Oa.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var _p=V(0,0),ar=V(1,22),lr=V(2,22),Lp=V(3,23),Pi=V(4,24),Bp=V(7,27),Up=V(8,28),$p=V(9,29),qp=V(30,39),Ye=V(31,39),vi=V(32,39),Ti=V(33,39),Ai=V(34,39),Vp=V(35,39),Ci=V(36,39),jp=V(37,39),Ri=V(90,39),Gp=V(90,39),Jp=V(40,49),Qp=V(41,49),Hp=V(42,49),Wp=V(43,49),Kp=V(44,49),zp=V(45,49),Yp=V(46,49),Zp=V(47,49);f();c();p();m();d();var Ia=100,Si=["green","yellow","blue","magenta","cyan","red"],ur=[],Oi=Date.now(),ka=0,nn=typeof y<"u"?y.env:{};globalThis.DEBUG??=nn.DEBUG??"";globalThis.DEBUG_COLORS??=nn.DEBUG_COLORS?nn.DEBUG_COLORS==="true":!0;var bt={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 Da(e){let t={color:Si[ka++%Si.length],enabled:bt.enabled(e),namespace:e,log:bt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&ur.push([o,...n]),ur.length>Ia&&ur.shift(),bt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:Ma(g)),u=`+${Date.now()-Oi}ms`;Oi=Date.now(),a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Ii=new Proxy(Da,{get:(e,t)=>bt[t],set:(e,t,r)=>bt[t]=r});function Ma(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 ki(){ur.length=0}var ee=Ii;f();c();p();m();d();f();c();p();m();d();var Ni="library";function Pt(e){let t=Ba();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":Ni)}function Ba(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}f();c();p();m();d();f();c();p();m();d();var Be;(t=>{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||={})})(Be||={});var Tt={};Wr(Tt,{error:()=>qa,info:()=>$a,log:()=>Ua,query:()=>Va,should:()=>Bi,tags:()=>vt,warn:()=>on});f();c();p();m();d();var vt={error:Ye("prisma:error"),warn:Ti("prisma:warn"),info:Ci("prisma:info"),query:Ai("prisma:query")},Bi={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Ua(...e){console.log(...e)}function on(e,...t){Bi.warn()&&console.warn(`${vt.warn} ${e}`,...t)}function $a(e,...t){console.info(`${vt.info} ${e}`,...t)}function qa(e,...t){console.error(`${vt.error} ${e}`,...t)}function Va(e,...t){console.log(`${vt.query} ${e}`,...t)}f();c();p();m();d();function Ee(e,t){throw new Error(t)}f();c();p();m();d();function sn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();c();p();m();d();var an=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});f();c();p();m();d();function Ze(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();c();p();m();d();function ln(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{ji.has(e)||(ji.add(e),on(t,...r))};f();c();p();m();d();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 Ce=class extends K{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};N(Ce,"NotFoundError");f();c();p();m();d();var J=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(J,"PrismaClientInitializationError");f();c();p();m();d();var Re=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(Re,"PrismaClientRustPanicError");f();c();p();m();d();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();m();d();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();m();d();var At=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();m();d();f();c();p();m();d();function Ct(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Ga(e,t){let r=Ct(()=>Ja(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Ja(e){return{datamodel:{models:un(e.models),enums:un(e.enums),types:un(e.types)}}}function un(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}f();c();p();m();d();var mr=Symbol(),cn=new WeakMap,be=class{constructor(t){t===mr?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)}},Rt=class extends be{_getNamespace(){return"NullTypes"}},St=class extends Rt{};mn(St,"DbNull");var Ot=class extends Rt{};mn(Ot,"JsonNull");var It=class extends Rt{};mn(It,"AnyNull");var pn={classes:{DbNull:St,JsonNull:Ot,AnyNull:It},instances:{DbNull:new St(mr),JsonNull:new Ot(mr),AnyNull:new It(mr)}};function mn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();function kt(e){return{ok:!1,error:e,map(){return kt(e)},flatMap(){return kt(e)}}}var dn=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 dn,r=Ue(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ue(t,e.queryRaw.bind(e)),executeRaw:Ue(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>Qa(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=Ha(t,e.getConnectionInfo.bind(e))),n},Qa=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ue(e,t.queryRaw.bind(t)),executeRaw:Ue(e,t.executeRaw.bind(t)),commit:Ue(e,t.commit.bind(t)),rollback:Ue(e,t.rollback.bind(t))});function Ue(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return kt({kind:"GenericJs",id:i})}}}function Ha(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return kt({kind:"GenericJs",id:i})}}}var Qs=_e(Ji());var wk=_e(Qi());Fi();yi();Mi();f();c();p();m();d();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)}}}f();c();p();m();d();f();c();p();m();d();var dr={enumerable:!0,configurable:!0,writable:!0};function fr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>dr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Ki=Symbol.for("nodejs.util.inspect.custom");function fe(e,t){let r=Ya(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=zi(Reflect.ownKeys(o),r),a=zi(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?{...dr,...l?.getPropertyDescriptor(s)}:dr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[Ki]=function(){let o={...this};return delete o[Ki],o},i}function Ya(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 zi(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}f();c();p();m();d();function Xe(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}f();c();p();m();d();function gr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}f();c();p();m();d();f();c();p();m();d();var et=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();m();d();f();c();p();m();d();function Yi(e){return e.substring(0,1).toLowerCase()+e.substring(1)}f();c();p();m();d();function tt(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function hr(e){return e.toString()!=="Invalid Date"}f();c();p();m();d();f();c();p();m();d();var rt=9e15,ke=1e9,gn="0123456789abcdef",wr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Er="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",hn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-rt,maxE:rt,crypto:!1},to,xe,_=!0,xr="[DecimalError] ",Ie=xr+"Invalid argument: ",ro=xr+"Precision limit exceeded",no=xr+"crypto unavailable",io="[object Decimal]",X=Math.floor,Q=Math.pow,Za=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Xa=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,el=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,oo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,k=7,tl=9007199254740991,rl=wr.length-1,yn=Er.length-1,A={toStringTag:io};A.absoluteValue=A.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),I(e)};A.ceil=function(){return I(new this.constructor(this),this.e+1,2)};A.clampedTo=A.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(Ie+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};A.comparedTo=A.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};A.cosine=A.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=nl(n,co(n,r)),n.precision=e,n.rounding=t,I(xe==2||xe==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};A.cubeRoot=A.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=z(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.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&&(I(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")&&(I(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return _=!0,I(n,e,h.rounding,t)};A.decimalPlaces=A.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};A.dividedBy=A.div=function(e){return $(this,new this.constructor(e))};A.dividedToIntegerBy=A.divToInt=function(e){var t=this,r=t.constructor;return I($(t,new r(e),0,1,1),r.precision,r.rounding)};A.equals=A.eq=function(e){return this.cmp(e)===0};A.floor=function(){return I(new this.constructor(this),this.e+1,3)};A.greaterThan=A.gt=function(e){return this.cmp(e)>0};A.greaterThanOrEqualTo=A.gte=function(e){var t=this.cmp(e);return t==1||t===0};A.hyperbolicCosine=A.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/vr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=nt(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 I(o,s.precision=r,s.rounding=n,!0)};A.hyperbolicSine=A.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=nt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/vr(5,e)),i=nt(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,I(i,t,r,!0)};A.hyperbolicTangent=A.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,$(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};A.inverseCosine=A.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))};A.inverseHyperbolicCosine=A.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)};A.inverseHyperbolicSine=A.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())};A.inverseHyperbolicTangent=A.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?I(new o(i),e,t,!0):(o.precision=r=n-i.e,i=$(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)};A.inverseSine=A.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)))};A.inverseTangent=A.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<=yn)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<=yn)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};A.isNaN=function(){return!this.s};A.isNegative=A.isNeg=function(){return this.s<0};A.isPositive=A.isPos=function(){return this.s>0};A.isZero=function(){return!!this.d&&this.d[0]===0};A.lessThan=A.lt=function(e){return this.cmp(e)<0};A.lessThanOrEqualTo=A.lte=function(e){return this.cmp(e)<1};A.logarithm=A.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=Oe(u,a),n=t?br(g,a+10):Oe(e,a),l=$(s,n,a,1),Mt(l.d,i=h,v))do if(a+=10,s=Oe(u,a),n=t?br(g,a+10):Oe(e,a),l=$(s,n,a,1),!o){+z(l.d).slice(i+1,i+15)+1==1e14&&(l=I(l,h+1,0));break}while(Mt(l.d,i+=10,v));return _=!0,I(l,h,v)};A.minus=A.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,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,v=e.d,a=C.precision,l=C.rounding,!u[0]||!v[0]){if(v[0])e.s=-e.s;else if(u[0])e=new C(S);else return new C(l===3?-0:0);return _?I(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=Pr(u,n),_?I(e,a,l):e};A.precision=A.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ie+e);return r.d?(t=so(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};A.round=function(){var e=this,t=e.constructor;return I(new t(e),e.e+1,t.rounding)};A.sine=A.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=ol(n,co(n,r)),n.precision=e,n.rounding=t,I(xe>2?r.neg():r,e,t,!0)):new n(NaN)};A.squareRoot=A.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=z(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($(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&&(I(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")&&(I(n,l+1,1),e=!n.times(n).eq(s));break}return _=!0,I(n,l,g.rounding,e)};A.tangent=A.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=$(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,I(xe==2||xe==4?r.neg():r,e,t,!0)):new n(NaN)};A.times=A.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=Pr(o,r),_?I(e,h.precision,h.rounding):e};A.toBinary=function(e,t){return bn(this,2,e,t)};A.toDecimalPlaces=A.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ne(e,0,ke),t===void 0?t=n.rounding:ne(t,0,8),I(r,e+r.e+1,t))};A.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ge(n,!0):(ne(e,0,ke),t===void 0?t=i.rounding:ne(t,0,8),n=I(new i(n),e+1,t),r=ge(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};A.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=ge(i):(ne(e,0,ke),t===void 0?t=o.rounding:ne(t,0,8),n=I(new o(i),e+i.e+1,t),r=ge(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};A.toFraction=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,S=this,C=S.d,R=S.constructor;if(!C)return new R(S);if(u=r=new R(1),n=l=new R(0),t=new R(n),o=t.e=so(C)-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(Ie+a);e=a.gt(t)?o>0?t:u:a}for(_=!1,a=new R(z(C)),g=R.precision,R.precision=o=C.length*k*2;h=$(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=$(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,n,o,1).minus(S).abs().cmp($(l,r,o,1).minus(S).abs())<1?[u,n]:[l,r],R.precision=g,_=!0,v};A.toHexadecimal=A.toHex=function(e,t){return bn(this,16,e,t)};A.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=$(r,e,0,t,1).times(e),_=!0,I(r)):(e.s=r.s,r=e),r};A.toNumber=function(){return+this};A.toOctal=function(e,t){return bn(this,8,e,t)};A.toPower=A.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 I(a,n,o);if(t=X(e.e/k),t>=e.d.length-1&&(r=u<0?-u:u)<=tl)return i=ao(l,a,r,n),e.s<0?new l(1).div(i):I(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=wn(e.times(Oe(a,n+r)),n),i.d&&(i=I(i,n+5,1),Mt(i.d,n,o)&&(t=n+10,i=I(wn(e.times(Oe(a,t+r)),t),t+5,1),+z(i.d).slice(n+1,n+15)+1==1e14&&(i=I(i,n+1,0)))),i.s=s,_=!0,l.rounding=o,I(i,n,o))};A.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ge(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ne(e,1,ke),t===void 0?t=i.rounding:ne(t,0,8),n=I(new i(n),e,t),r=ge(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};A.toSignificantDigits=A.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ne(e,1,ke),t===void 0?t=n.rounding:ne(t,0,8)),I(new n(r),e,t)};A.toString=function(){var e=this,t=e.constructor,r=ge(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};A.truncated=A.trunc=function(){return I(new this.constructor(this),this.e+1,1)};A.valueOf=A.toJSON=function(){var e=this,t=e.constructor,r=ge(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(Ie+e)}function Mt(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 yr(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 nl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/vr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=nt(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 $=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,C,R,M,F,B,D,O,oe,G,jr,rr,wt,Gr,ue,nr,ir=n.constructor,Jr=n.s==i.s?1:-1,Y=n.d,q=i.d;if(!Y||!Y[0]||!q||!q[0])return new ir(!n.s||!i.s||(Y?q&&Y[0]==q[0]:!q)?NaN:Y&&Y[0]==0||!q?Jr*0:Jr/0);for(l?(S=1,g=n.e-i.e):(l=pe,S=k,g=X(n.e/S)-X(i.e/S)),ue=q.length,wt=Y.length,F=new ir(Jr),B=F.d=[],h=0;q[h]==(Y[h]||0);h++);if(q[h]>(Y[h]||0)&&g--,o==null?(G=o=ir.precision,s=ir.rounding):a?G=o+(n.e-i.e)+1:G=o,G<0)B.push(1),C=!0;else{if(G=G/S+2|0,h=0,ue==1){for(v=0,q=q[0],G++;(h1&&(q=e(q,v,l),Y=e(Y,v,l),ue=q.length,wt=Y.length),rr=ue,D=Y.slice(0,ue),O=D.length;O=l/2&&++Gr;do v=0,u=t(q,D,ue,O),u<0?(oe=D[0],ue!=O&&(oe=oe*l+(D[1]||0)),v=oe/Gr|0,v>1?(v>=l&&(v=l-1),R=e(q,v,l),M=R.length,O=D.length,u=t(R,D,M,O),u==1&&(v--,r(R,ue=10;v/=10)h++;F.e=h+g*S-1,I(F,a?o+F.e+1:o,s,C)}return F}}();function I(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)+Se(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Se(-i-1)+o,r&&(n=r-s)>0&&(o+=Se(n))):i>=s?(o+=Se(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Se(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Se(n))),o}function Pr(e,t){var r=e[0];for(t*=k;r>=10;r/=10)t++;return t}function br(e,t,r){if(t>rl)throw _=!0,r&&(e.precision=r),Error(ro);return I(new e(wr),t,1,!0)}function ce(e,t,r){if(t>yn)throw Error(ro);return I(new e(Er),t,r,!0)}function so(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 Se(e){for(var t="";e--;)t+="0";return t}function ao(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),Xi(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),Xi(t.d,s)}return _=!0,o}function Zi(e){return e.d[e.d.length-1]&1}function lo(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=C):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=I(o.times(e),l,1),r=r.times(++g),a=s.plus($(o,r,l,1)),z(a.d).slice(0,l)===z(s.d).slice(0,l)){for(i=h;i--;)s=I(s.times(s),l,1);if(t==null)if(u<3&&Mt(s.d,l-n,S,u))v.precision=l+=10,r=o=a=new v(1),g=0,u++;else return I(s,v.precision=C,S,_=!0);else return v.precision=C,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,l,u,g,h,v,S=1,C=10,R=e,M=R.d,F=R.constructor,B=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+=C,r=z(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=z(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=br(F,g+2,D).times(o+""),R=Oe(new F(n+"."+r.slice(1)),g-C).plus(u),F.precision=D,t==null?I(R,D,B,_=!0):R;for(h=R,l=s=R=$(R.minus(1),R.plus(1),g,1),v=I(R.times(R),g,1),i=3;;){if(s=I(s.times(v),g,1),u=l.plus($(s,new F(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(br(F,g+2,D).times(o+""))),l=$(l,new F(S),g,1),t==null)if(Mt(l.d,g-C,B,a))F.precision=g+=C,u=s=R=$(h.minus(1),h.plus(1),g,1),v=I(R.times(R),g,1),i=a=1;else return I(l,F.precision=D,B,_=!0);else return F.precision=D,l;l=u,i+=2}}function uo(e){return String(e.s*e.s/0)}function En(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"),oo.test(t))return En(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Xa.test(t))r=16,t=t.toLowerCase();else if(Za.test(t))r=2;else if(el.test(t))r=8;else throw Error(Ie+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=ao(n,new n(r),o,o*2)),u=yr(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=Pr(u,g),e.d=u,_=!1,s&&(e=$(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?Q(2,l):qe.pow(2,l))),_=!0,e)}function ol(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:nt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/vr(5,r)),t=nt(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 nt(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=$(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=$(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 vr(e,t){for(var r=e;--t;)r*=e;return r}function co(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 xe=n?4:1,t;if(r=t.divToInt(i),r.isZero())xe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return xe=Zi(r)?n?2:3:n?4:1,t;xe=Zi(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,v,S=e.constructor,C=r!==void 0;if(C?(ne(r,1,ke),n===void 0?n=S.rounding:ne(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=uo(e);else{for(g=ge(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(".",""),v=new S(1),v.e=g.length-s,v.d=yr(ge(v),10,i),v.e=v.d.length),h=yr(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=$(e,v,r,n,0,i),h=e.d,o=e.e,u=to),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=yr(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 sl(e){return new this(e).abs()}function al(e){return new this(e).acos()}function ll(e){return new this(e).acosh()}function ul(e,t){return new this(e).plus(t)}function cl(e){return new this(e).asin()}function pl(e){return new this(e).asinh()}function ml(e){return new this(e).atan()}function dl(e){return new this(e).atanh()}function fl(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($(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($(e,t,o,1)),r}function gl(e){return new this(e).cbrt()}function hl(e){return I(e=new this(e),e.e+1,2)}function yl(e,t,r){return new this(e).clamp(t,r)}function wl(e){if(!e||typeof e!="object")throw Error(xr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,ke,"rounding",0,8,"toExpNeg",-rt,0,"toExpPos",0,rt,"maxE",0,rt,"minE",-rt,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Ie+r+": "+n);if(r="crypto",i&&(this[r]=hn[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(no);else this[r]=!1;else throw Error(Ie+r+": "+n);return this}function El(e){return new this(e).cos()}function bl(e){return new this(e).cosh()}function po(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,eo(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(no);else for(;o=10;i/=10)n++;n`}};function ot(e){return e instanceof Nt}f();c();p();m();d();f();c();p();m();d();var Tr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};f();c();p();m();d();var Ar=e=>e,Cr={bold:Ar,red:Ar,green:Ar,dim:Ar,enabled:!1},mo={bold:ar,red:Ye,green:vi,dim:lr,enabled:!0},st={write(e){e.writeLine(",")}};f();c();p();m();d();var he=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();m();d();var De=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var at=class extends De{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new Tr(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 he("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(st,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};f();c();p();m();d();var fo=": ",Rr=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()+fo.length}write(t){let r=new he(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(fo).write(this.value)}};f();c();p();m();d();var lt=class e extends De{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 at&&(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 he("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(st,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};f();c();p();m();d();var W=class extends De{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new he(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var xn=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 ut(e){return new xn(go(e))}function go(e){let t=new lt;for(let[r,n]of Object.entries(e)){let i=new Rr(r,ho(n));t.addField(i)}return t}function ho(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=hr(e)?e.toISOString():"Invalid Date";return new W(`new Date("${t}")`)}return e instanceof be?new W(`Prisma.${e._getName()}`):ot(e)?new W(`prisma.${Yi(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Ql(e):typeof e=="object"?go(e):new W(Object.prototype.toString.call(e))}function Ql(e){let t=new at;for(let r of e)t.addItem(ho(r));return t}function Sr(e,t){let r=t==="pretty"?mo:Cr,n=e.renderAllMessages(r),i=new et(0,{colors:r}).write(e).toString();return{message:n,args:i}}function yo(e){if(e===void 0)return"";let t=ut(e);return new et(0,{colors:Cr}).write(t).toString()}f();c();p();m();d();var Hl="P2037";function Ft({error:e,user_facing_error:t},r,n){return t.error_code?new K(Wl(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 Wl(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Hl&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();var Pn=class{getLocation(){return null}};function Me(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Pn}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();var wo={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function ct(e={}){let t=zl(e);return Object.entries(t).reduce((n,[i,o])=>(wo[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function zl(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 Eo(e,t){let r=Or(e);return t({action:"aggregate",unpacker:r,argsMapper:ct})(e)}f();c();p();m();d();function Yl(e={}){let{select:t,...r}=e;return typeof t=="object"?ct({...r,_count:t}):ct({...r,_count:{_all:!0}})}function Zl(e={}){return typeof e.select=="object"?t=>Or(e)(t)._count:t=>Or(e)(t)._count._all}function bo(e,t){return t({action:"count",unpacker:Zl(e),argsMapper:Yl})(e)}f();c();p();m();d();function Xl(e={}){let t=ct(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 eu(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function xo(e,t){return t({action:"groupBy",unpacker:eu(e),argsMapper:Xl})(e)}function Po(e,t,r){if(t==="aggregate")return n=>Eo(n,r);if(t==="count")return n=>bo(n,r);if(t==="groupBy")return n=>xo(n,r)}f();c();p();m();d();function vo(e,t){let r=t.fields.filter(i=>!i.relationName),n=an(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 Nt(e,o,s.type,s.isList,s.kind==="enum")},...fr(Object.keys(n))})}f();c();p();m();d();f();c();p();m();d();var To=e=>Array.isArray(e)?e:e.split("."),vn=(e,t)=>To(t).reduce((r,n)=>r&&r[n],e),Ao=(e,t,r)=>To(t).reduceRight((n,i,o,s)=>Object.assign({},vn(e,s.slice(0,o)),{[i]:n}),r);function tu(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function ru(e,t,r){return t===void 0?e??{}:Ao(t,r,e||!0)}function Tn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Me(e._errorFormat),g=tu(n,i),h=ru(l,o,g),v=r({dataPath:g,callsite:u})(h),S=nu(e,t);return new Proxy(v,{get(C,R){if(!S.includes(R))return C[R];let F=[a[R].type,r,R],B=[g,h];return Tn(e,...F,...B)},...fr([...S,...Object.getOwnPropertyNames(v)])})}}function nu(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}f();c();p();m();d();f();c();p();m();d();var iu=_e(Li());var ou={red:Ye,gray:Ri,dim:lr,bold:ar,underline:Pi,highlightSource:e=>e.highlight()},su={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function au({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function lu({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(uu(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 uu(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function pt(e){let t=e.showColors?ou:su,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=au(e),lu(r,t)}function Co(e,t,r,n){return e===Be.ModelAction.findFirstOrThrow||e===Be.ModelAction.findUniqueOrThrow?cu(t,r,n):n}function cu(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=pt({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 Ce(`No ${e} found`,t):o})}}f();c();p();m();d();function ye(e){return e.replace(/^./,t=>t.toLowerCase())}var pu=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],mu=["aggregate","count","groupBy"];function An(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[du(e,t),gu(e,t),Dt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return fe({},n)}function du(e,t){let r=ye(t),n=Object.keys(Be.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=Co(o,t,e._clientVersion,s);let a=l=>u=>{let g=Me(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 pu.includes(o)?Tn(e,t,a):fu(i)?Po(e,i,a):a({})}}}function fu(e){return mu.includes(e)}function gu(e,t){return $e(te("fields",()=>{let r=e._runtimeDataModel.models[t];return vo(t,r)}))}f();c();p();m();d();function Ro(e){return e.replace(/^./,t=>t.toUpperCase())}var Cn=Symbol();function _t(e){let t=[hu(e),te(Cn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Dt(r)),fe(e,t)}function hu(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(ye),n=[...new Set(t.concat(r))];return $e({getKeys(){return n},getPropertyValue(i){let o=Ro(i);if(e._runtimeDataModel.models[o]!==void 0)return An(e,o);if(e._runtimeDataModel.models[i]!==void 0)return An(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function So(e){return e[Cn]?e[Cn]:e}function Oo(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 _t(t)}f();c();p();m();d();f();c();p();m();d();function Io({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(Xe(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(Xe(u))}yu(e,l.needs)&&s.push(wu(l,fe(e,s)))}return s.length>0||a.length>0?fe(e,[...s,...a]):e}function yu(e,t){return t.every(r=>sn(e,r))}function wu(e,t){return $e(te(e.name,()=>e.compute(t)))}f();c();p();m();d();function Ir({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]=Ir({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Do({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Ir({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=ye(l);return Io({result:a,modelName:g,select:u.select,omit:u.select?void 0:{...o?.[g],...u.omit},extensions:n})}})}f();c();p();m();d();f();c();p();m();d();function Mo(e){if(e instanceof ae)return Eu(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:Mo(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Uo(o,l),a.args=s,Fo(e,a,r,n+1)}})})}function _o(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 Fo(e,t,s)}function Lo(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Bo(r,n,0,e):e(r)}}function Bo(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=Uo(i,l),Bo(a,t,r+1,n)}})}var No=e=>e;function Uo(e=No,t=No){return r=>e(t(r))}f();c();p();m();d();f();c();p();m();d();function qo(e,t,r){let n=ye(r);return!t.result||!(t.result.$allModels||t.result[n])?e:bu({...e,...$o(t.name,e,t.result.$allModels),...$o(t.name,e,t.result[n])})}function bu(e){let t=new de,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 Ze(e,n=>({...n,needs:r(n.name,new Set)}))}function $o(e,t,r){return r?Ze(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:xu(t,o,i)})):{}}function xu(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Vo(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 jo(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 kr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new de;this.modelExtensionsCache=new de;this.queryCallbacksCache=new de;this.clientExtensions=Ct(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Ct(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>qo(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()}},Dr=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new kr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new kr(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();m();d();var Go=ee("prisma:client"),Jo={Vercel:"vercel","Netlify CI":"netlify"};function Qo({postinstall:e,ciName:t,clientVersion:r}){if(Go("checkPlatformCaching:postinstall",e),Go("checkPlatformCaching:ciName",t),e===!0&&t&&t in Jo){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/${Ja[t]}-build`;throw console.error(n),new ae(n,r)}}d();p();f();function Wa(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}d();p();f();d();p();f();d();p();f();function Jo({error:e,user_facing_error:t},r){return t.error_code?new de(t.message,{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new Se(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}d();p();f();var kn=class{};d();p();f();function Ha(e,t){return{batch:e,transaction:(t==null?void 0:t.kind)==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}d();p();f();d();p();f();d();p();f();var Uf="Cloudflare-Workers",$f="node";function za(){var e,t,r;return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":((e=globalThis.navigator)==null?void 0:e.userAgent)===Uf?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":((r=(t=globalThis.process)==null?void 0:t.release)==null?void 0:r.name)===$f?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}function Dn({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){var u,l;let o,i=Object.keys(e)[0],s=(u=e[i])==null?void 0:u.url,a=(l=t[i])==null?void 0:l.url;if(i===void 0?o=void 0:a?o=a:s!=null&&s.value?o=s.value:s!=null&&s.fromEnvVar&&(o=r[s.fromEnvVar]),(s==null?void 0:s.fromEnvVar)!==void 0&&o===void 0)throw za()==="workerd"?new ae(`error: Environment variable not found: ${s.fromEnvVar}. +Learn how: https://pris.ly/d/${Jo[t]}-build`;throw console.error(n),new J(n,r)}}f();c();p();m();d();function Ho(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();var Pu="Cloudflare-Workers",vu="node";function Wo(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Pu?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===vu?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Tu={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 Rn(){let e=Wo();return{id:e,prettyName:Tu[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();function mt({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 Rn().id==="workerd"?new J(`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 ae(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(o===void 0)throw new ae("error: Missing URL environment variable, value, or override.",n);return o}d();p();f();d();p();f();var _n=class extends Error{constructor(r,n){super(r);this.clientVersion=n.clientVersion,this.cause=n.cause}get[Symbol.toStringTag](){return this.name}};var be=class extends _n{constructor(r,n){var o;super(r,n);this.isRetryable=(o=n.isRetryable)!=null?o:!0}};d();p();f();d();p();f();function q(e,t){return{...e,isRetryable:t}}var zt=class extends be{constructor(r){super("This request must be retried",q(r,!0));this.name="ForcedRetryError";this.code="P5001"}};k(zt,"ForcedRetryError");d();p();f();var Et=class extends be{constructor(r,n){super(r,q(n,!1));this.name="InvalidDatasourceError";this.code="P5002"}};k(Et,"InvalidDatasourceError");d();p();f();var Pt=class extends be{constructor(r,n){super(r,q(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};k(Pt,"NotImplementedYetError");d();p();f();d();p();f();var J=class extends be{constructor(r,n){super(r,n);this.response=n.response;let o=this.response.headers.get("prisma-request-id");if(o){let i=`(The request id was: ${o})`;this.message=this.message+" "+i}}};var vt=class extends J{constructor(r){super("Schema needs to be uploaded",q(r,!0));this.name="SchemaMissingError";this.code="P5005"}};k(vt,"SchemaMissingError");d();p();f();d();p();f();var Qo="This request could not be understood by the server",br=class extends J{constructor(r,n,o){super(n||Qo,q(r,!1));this.name="BadRequestError";this.code="P5000";o&&(this.code=o)}};k(br,"BadRequestError");d();p();f();var wr=class extends J{constructor(r,n){super("Engine not started: healthcheck timeout",q(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};k(wr,"HealthcheckTimeoutError");d();p();f();var Er=class extends J{constructor(r,n,o){super(n,q(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=o}};k(Er,"EngineStartupError");d();p();f();var Pr=class extends J{constructor(r){super("Engine version is not supported",q(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};k(Pr,"EngineVersionNotSupportedError");d();p();f();var Wo="Request timed out",vr=class extends J{constructor(r,n=Wo){super(n,q(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};k(vr,"GatewayTimeoutError");d();p();f();var qf="Interactive transaction error",Ar=class extends J{constructor(r,n=qf){super(n,q(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};k(Ar,"InteractiveTransactionError");d();p();f();var Vf="Request parameters are invalid",Tr=class extends J{constructor(r,n=Vf){super(n,q(r,!1));this.name="InvalidRequestError";this.code="P5011"}};k(Tr,"InvalidRequestError");d();p();f();var Ho="Requested resource does not exist",Cr=class extends J{constructor(r,n=Ho){super(n,q(r,!1));this.name="NotFoundError";this.code="P5003"}};k(Cr,"NotFoundError");d();p();f();var zo="Unknown server error",Zt=class extends J{constructor(r,n,o){super(n||zo,q(r,!0));this.name="ServerError";this.code="P5006";this.logs=o}};k(Zt,"ServerError");d();p();f();var Zo="Unauthorized, check your connection string",Mr=class extends J{constructor(r,n=Zo){super(n,q(r,!1));this.name="UnauthorizedError";this.code="P5007"}};k(Mr,"UnauthorizedError");d();p();f();var Yo="Usage exceeded, retry again later",Sr=class extends J{constructor(r,n=Yo){super(n,q(r,!0));this.name="UsageExceededError";this.code="P5008"}};k(Sr,"UsageExceededError");async function Kf(e){let t;try{t=await e.text()}catch(r){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(r){return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function Rr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await Kf(e);if(n.type==="QueryEngineError")throw new de(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Zt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new vt(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Pr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:o,logs:i}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Er(r,o,i)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:o,error_code:i}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new ae(o,t,i)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:o}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new wr(r,o)}}if("InteractiveTransactionMisrouted"in n.body){let o={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 Ar(r,o[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Tr(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Mr(r,Yt(Zo,n));if(e.status===404)return new Cr(r,Yt(Ho,n));if(e.status===429)throw new Sr(r,Yt(Yo,n));if(e.status===504)throw new vr(r,Yt(Wo,n));if(e.status>=500)throw new Zt(r,Yt(zo,n));if(e.status>=400)throw new br(r,Yt(Qo,n))}function Yt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}d();p();f();function Za(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(o=>setTimeout(()=>o(n),n))}d();p();f();function Ya(e){var r;if(!!((r=e.generator)!=null&&r.previewFeatures.some(n=>n.toLowerCase().includes("metrics"))))throw new ae("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)}d();p();f();var Xa={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*","@swc/core":"1.3.75","@swc/jest":"0.2.29","@types/jest":"29.5.5","@types/node":"18.18.0",execa:"5.1.1",jest:"29.7.0",typescript:"5.2.2"};d();p();f();d();p();f();var Or=class extends be{constructor(r,n){super(`Cannot fetch data from service: -${r}`,q(n,!0));this.name="RequestError";this.code="P5010"}};k(Or,"RequestError");async function At(e,t,r=n=>n){var o;let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(Xo)(e,t)}catch(i){console.log(e);let s=(o=i.message)!=null?o:"Unknown error";throw new Or(s,{clientVersion:n})}}function Jf(e){return{...e.headers,"Content-Type":"application/json"}}function Qf(e){return{method:e.method,headers:Jf(e)}}function Wf(e,t){return{text:()=>Promise.resolve(x.Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(x.Buffer.concat(e).toString())),ok:t.statusCode>=200&&t.statusCode<=299,status:t.statusCode,url:t.url,headers:new ei(t.headers)}}async function Xo(e,t={}){let r=Hf("https"),n=Qf(t),o=[],{origin:i}=new URL(e);return new Promise((s,a)=>{var l;let u=r.request(e,n,c=>{let{statusCode:m,headers:{location:g}}=c;m>=301&&m<=399&&g&&(g.startsWith("http")===!1?s(Xo(`${i}${g}`,t)):s(Xo(g,t))),c.on("data",w=>o.push(w)),c.on("end",()=>s(Wf(o,c))),c.on("error",a)});u.on("error",a),u.end((l=t.body)!=null?l:"")})}var Hf=typeof Qn!="undefined"?Qn:()=>{},ei=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 o of n)this.headers.set(r,o)}append(t,r){this.headers.set(t,r)}delete(t){this.headers.delete(t)}get(t){var r;return(r=this.headers.get(t))!=null?r:null}has(t){return this.headers.has(t)}set(t,r){this.headers.set(t,r)}forEach(t,r){for(let[n,o]of this.headers)t.call(r,o,n,this)}};var zf=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,eu=he("prisma:client:dataproxyEngine");async function Zf(e,t){var s,a,u;let r=Xa["@prisma/engines-version"],n=(s=t.clientVersion)!=null?s:"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[o,i]=(a=n==null?void 0:n.split("-"))!=null?a:[];if(i===void 0&&zf.test(o))return o;if(i!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[l]=(u=r.split("-"))!=null?u:[],[c,m,g]=l.split("."),w=Yf(`<=${c}.${m}.${g}`),E=await At(w,{clientVersion:n});if(!E.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${E.status} ${E.statusText}, response body: ${await E.text()||""}`);let b=await E.text();eu("length of body fetched from unpkg.com",b.length);let T;try{T=JSON.parse(b)}catch(S){throw console.error("JSON.parse error: body fetched from unpkg.com: ",b),S}return T.version}throw new Pt("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function tu(e,t){let r=await Zf(e,t);return eu("version",r),r}function Yf(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var ru=3,ti=he("prisma:client:dataproxyEngine"),ri=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`};this.tracingHelper.isEnabled()&&(n.traceparent=t!=null?t:this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let o=this.buildCaptureSettings();return o.length>0&&(n["X-capture-telemetry"]=o.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},Fr=class extends kn{constructor(r){var n,o,i,s;super();Ya(r),this.config=r,this.env={...this.config.env,...y.env},this.inlineSchema=(n=r.inlineSchema)!=null?n:"",this.inlineDatasources=(o=r.inlineDatasources)!=null?o:{},this.inlineSchemaHash=(i=r.inlineSchemaHash)!=null?i:"",this.clientVersion=(s=r.clientVersion)!=null?s:"unknown",this.logEmitter=r.logEmitter,this.tracingHelper=this.config.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return"unknown"}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[r,n]=this.extractHostAndApiKey();this.host=r,this.headerBuilder=new ri({apiKey:n,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries}),this.remoteClientVersion=await tu(r,this.config),ti("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(r){var n,o;(n=r==null?void 0:r.logs)!=null&&n.length&&r.logs.forEach(i=>{switch(i.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let s=typeof i.attributes.query=="string"?i.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[a]=s.split("/* traceparent");s=a}this.logEmitter.emit("query",{query:s,timestamp:i.timestamp,duration:i.attributes.duration_ms,params:i.attributes.params,target:i.attributes.target})}}}),(o=r==null?void 0:r.traces)!=null&&o.length&&this.tracingHelper.createEngineSpan({span:!0,spans:r.traces})}on(r,n){if(r==="beforeExit")throw new Error('"beforeExit" hook is not applicable to the remote query engine');this.logEmitter.on(r,n)}async url(r){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${r}`}async uploadSchema(){let r={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(r,async()=>{let n=await At(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});n.ok||ti("schema response status",n.status);let o=await Rr(n,this.clientVersion);if(o)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${o.message}`}),o;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`})})}request(r,{traceparent:n,interactiveTransaction:o,customDataProxyFetch:i}){return this.requestInternal({body:r,traceparent:n,interactiveTransaction:o,customDataProxyFetch:i})}async requestBatch(r,{traceparent:n,transaction:o,customDataProxyFetch:i}){let s=(o==null?void 0:o.kind)==="itx"?o.options:void 0,a=Ha(r,o),{batchResult:u,elapsed:l}=await this.requestInternal({body:a,customDataProxyFetch:i,interactiveTransaction:s,traceparent:n});return u.map(c=>"errors"in c&&c.errors.length>0?Jo(c.errors[0],this.clientVersion):{data:c,elapsed:l})}requestInternal({body:r,traceparent:n,customDataProxyFetch:o,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:s})=>{let a=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");s(a);let u=await At(a,{method:"POST",headers:this.headerBuilder.build({traceparent:n,interactiveTransaction:i}),body:JSON.stringify(r),clientVersion:this.clientVersion},o);u.ok||ti("graphql response status",u.status),await this.handleError(await Rr(u,this.clientVersion));let l=await u.json(),c=l.extensions;if(c&&this.propagateResponseExtensions(c),l.errors)throw l.errors.length===1?Jo(l.errors[0],this.config.clientVersion):new Se(l.errors,{clientVersion:this.config.clientVersion});return l}})}async transaction(r,n,o){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[r]} transaction`,callback:async({logHttpCall:s})=>{var a,u;if(r==="start"){let l=JSON.stringify({max_wait:(a=o==null?void 0:o.maxWait)!=null?a:2e3,timeout:(u=o==null?void 0:o.timeout)!=null?u:5e3,isolation_level:o==null?void 0:o.isolationLevel}),c=await this.url("transaction/start");s(c);let m=await At(c,{method:"POST",headers:this.headerBuilder.build({traceparent:n.traceparent}),body:l,clientVersion:this.clientVersion});await this.handleError(await Rr(m,this.clientVersion));let g=await m.json(),w=g.extensions;w&&this.propagateResponseExtensions(w);let E=g.id,b=g["data-proxy"].endpoint;return{id:E,payload:{endpoint:b}}}else{let l=`${o.payload.endpoint}/${r}`;s(l);let c=await At(l,{method:"POST",headers:this.headerBuilder.build({traceparent:n.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Rr(c,this.clientVersion));let g=(await c.json()).extensions;g&&this.propagateResponseExtensions(g);return}}})}extractHostAndApiKey(){let r={clientVersion:this.clientVersion},n=Object.keys(this.inlineDatasources)[0],o=Dn({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(o)}catch(c){throw new Et(`Error validating datasource \`${n}\`: the URL must start with the protocol \`prisma://\``,r)}let{protocol:s,host:a,searchParams:u}=i;if(s!=="prisma:")throw new Et(`Error validating datasource \`${n}\`: the URL must start with the protocol \`prisma://\``,r);let l=u.get("api_key");if(l===null||l.length<1)throw new Et(`Error validating datasource \`${n}\`: the URL must contain a valid API key`,r);return[a,l]}metrics(){throw new Pt("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(r){var n;for(let o=0;;o++){let i=s=>{this.logEmitter.emit("info",{message:`Calling ${s} (n=${o})`})};try{return await r.callback({logHttpCall:i})}catch(s){if(!(s instanceof be)||!s.isRetryable)throw s;if(o>=ru)throw s instanceof zt?s.cause:s;this.logEmitter.emit("warn",{message:`Attempt ${o+1}/${ru} failed for ${r.actionGerund}: ${(n=s.message)!=null?n:"(unknown)"}`});let a=await Za(o);this.logEmitter.emit("warn",{message:`Retrying after ${a}ms`})}}}async handleError(r){if(r instanceof vt)throw await this.uploadSchema(),new zt({clientVersion:this.clientVersion,cause:r});if(r)throw r}};function nu(e,t){let r;try{r=Dn({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch(o){}e.noEngine!==!0&&(r!=null&&r.startsWith("prisma://"))&&un("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=Po(t.generator);return r!=null&&r.startsWith("prisma://")||e.noEngine,new Fr(t);throw new me("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}d();p();f();function Nn({generator:e}){var t;return(t=e==null?void 0:e.previewFeatures)!=null?t:[]}d();p();f();d();p();f();d();p();f();var lu=Pe(ni());d();p();f();function au(e,t){let r=uu(e),n=Xf(r),o=td(n);o?Ln(o,t):t.addErrorMessage(()=>"Unknown error")}function uu(e){return e.errors.flatMap(t=>t.kind==="Union"?uu(t):[t])}function Xf(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let o=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,i=t.get(o);i?t.set(o,{...n,argument:{...n.argument,typeNames:ed(i.argument.typeNames,n.argument.typeNames)}}):t.set(o,n)}return r.push(...t.values()),r}function ed(e,t){return[...new Set(e.concat(t))]}function td(e){return So(e,(t,r)=>{let n=iu(t),o=iu(r);return n!==o?n-o:su(t)-su(r)})}function iu(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function su(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}d();p();f();var Ge=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)}};d();p();f();var Bn=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:o,dim:i}=n.context.colors;n.write(o(i(`${t}: ${r}`))).addMarginSymbol(o(i("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(Jt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Ln(e,t){switch(e.kind){case"IncludeAndSelect":rd(e,t);break;case"IncludeOnScalar":nd(e,t);break;case"EmptySelection":od(e,t);break;case"UnknownSelectionField":id(e,t);break;case"UnknownArgument":sd(e,t);break;case"UnknownInputField":ad(e,t);break;case"RequiredArgumentMissing":ud(e,t);break;case"InvalidArgumentType":ld(e,t);break;case"InvalidArgumentValue":cd(e,t);break;case"ValueTooLarge":pd(e,t);break;case"SomeFieldsMissing":fd(e,t);break;case"TooManyFieldsGiven":dd(e,t);break;case"Union":au(e,t);break;default:throw new Error("not implemented: "+e.kind)}}function rd(e,t){var n,o;let r=t.arguments.getDeepSubSelectionValue(e.selectionPath);r&&r instanceof re&&((n=r.getField("include"))==null||n.markAsError(),(o=r.getField("select"))==null||o.markAsError()),t.addErrorMessage(i=>`Please ${i.bold("either")} use ${i.green("`include`")} or ${i.green("`select`")}, but ${i.red("not both")} at the same time.`)}function nd(e,t){var s,a;let[r,n]=jn(e.selectionPath),o=e.outputType,i=(s=t.arguments.getDeepSelectionParent(r))==null?void 0:s.value;if(i&&((a=i.getField(n))==null||a.markAsError(),o))for(let u of o.fields)u.isRelation&&i.addSuggestion(new Ge(u.name,"true"));t.addErrorMessage(u=>{let l=`Invalid scalar field ${u.red(`\`${n}\``)} for ${u.bold("include")} statement`;return o?l+=` on model ${u.bold(o.name)}. ${Ir(u)}`:l+=".",l+=` -Note that ${u.bold("include")} statements only accept relation fields.`,l})}function od(e,t){var i,s;let r=e.outputType,n=(i=t.arguments.getDeepSelectionParent(e.selectionPath))==null?void 0:i.value,o=(s=n==null?void 0:n.isEmpty())!=null?s:!1;n&&(n.removeAllFields(),fu(n,r)),t.addErrorMessage(a=>o?`The ${a.red("`select`")} statement for type ${a.bold(r.name)} must not be empty. ${Ir(a)}`:`The ${a.red("`select`")} statement for type ${a.bold(r.name)} needs ${a.bold("at least one truthy value")}.`)}function id(e,t){var i;let[r,n]=jn(e.selectionPath),o=t.arguments.getDeepSelectionParent(r);o&&((i=o.value.getField(n))==null||i.markAsError(),fu(o.value,e.outputType)),t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o.kind)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(Ir(s)),a.join(" ")})}function sd(e,t){var o;let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof re&&((o=n.getField(r))==null||o.markAsError(),md(n,e.arguments)),t.addErrorMessage(i=>cu(i,r,e.arguments.map(s=>s.name)))}function ad(e,t){var i;let[r,n]=jn(e.argumentPath),o=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(o instanceof re){(i=o.getDeepField(e.argumentPath))==null||i.markAsError();let s=o.getDeepFieldValue(r);s instanceof re&&du(s,e.inputType)}t.addErrorMessage(s=>cu(s,n,e.inputType.fields.map(a=>a.name)))}function cu(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],o=yd(t,r);return o&&n.push(`Did you mean \`${e.green(o)}\`?`),r.length>0&&n.push(Ir(e)),n.join(" ")}function ud(e,t){let r;t.addErrorMessage(u=>(r==null?void 0:r.value)instanceof ne&&r.value.text==="null"?`Argument \`${u.green(i)}\` must not be ${u.red("null")}.`:`Argument \`${u.green(i)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(!(n instanceof re))return;let[o,i]=jn(e.argumentPath),s=new Bn,a=n.getDeepFieldValue(o);if(a instanceof re)if(r=a.getField(i),r&&a.removeField(i),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 Ge(i,s).makeRequired())}else{let u=e.inputTypes.map(pu).join(" | ");a.addSuggestion(new Ge(i,u).makeRequired())}}function pu(e){return e.kind==="list"?`${pu(e.elementType)}[]`:e.name}function ld(e,t){var o;let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof re&&((o=n.getDeepFieldValue(e.argumentPath))==null||o.markAsError()),t.addErrorMessage(i=>{let s=Un("or",e.argument.typeNames.map(a=>i.green(a)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${s}, provided ${i.red(e.inferredType)}.`})}function cd(e,t){var o;let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof re&&((o=n.getDeepFieldValue(e.argumentPath))==null||o.markAsError()),t.addErrorMessage(i=>{let s=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&s.push(`: ${e.underlyingError}`),s.push("."),e.argument.typeNames.length>0){let a=Un("or",e.argument.typeNames.map(u=>i.green(u)));s.push(` Expected ${a}.`)}return s.join("")})}function pd(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath),o;if(n instanceof re){let i=n.getDeepField(e.argumentPath),s=i==null?void 0:i.value;s==null||s.markAsError(),s instanceof ne&&(o=s.text)}t.addErrorMessage(i=>{let s=["Unable to fit value"];return o&&s.push(i.red(o)),s.push(`into a 64-bit signed integer for field \`${i.bold(r)}\``),s.join(" ")})}function fd(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(n instanceof re){let o=n.getDeepFieldValue(e.argumentPath);o instanceof re&&du(o,e.inputType)}t.addErrorMessage(o=>{let i=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?i.push(`${o.green("at least one of")} ${Un("or",e.constraints.requiredFields.map(s=>`\`${o.bold(s)}\``))} arguments.`):i.push(`${o.green("at least one")} argument.`):i.push(`${o.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),i.push(Ir(o)),i.join(" ")})}function dd(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath),o=[];if(n instanceof re){let i=n.getDeepFieldValue(e.argumentPath);i instanceof re&&(i.markAsError(),o=Object.keys(i.getFields()))}t.addErrorMessage(i=>{let s=[`Argument \`${i.bold(r)}\` 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 ${Un("and",o.map(a=>i.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function fu(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new Ge(r.name,"true"))}function md(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new Ge(r.name,r.typeNames.join(" | ")))}function du(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new Ge(r.name,r.typeNames.join(" | ")))}function jn(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Ir({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Un(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var gd=3;function yd(e,t){let r=1/0,n;for(let o of t){let i=(0,lu.default)(e,o);i>gd||i({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){var r;return(r=this.model)==null?void 0:r.fields.find(n=>n.name===t)}nestSelection(t){let r=this.findField(t),n=(r==null?void 0:r.kind)==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};d();p();f();var hu=e=>({command:e});d();p();f();d();p();f();var xu=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);d();p();f();function kr(e){try{return bu(e,"fast")}catch(t){return bu(e,"slow")}}function bu(e,t){return JSON.stringify(e.map(r=>Td(r,t)))}function Td(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:$t(e)?{prisma__type:"date",prisma__value:e.toJSON()}:Ke.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:x.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Cd(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:x.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Eu(e):e}function Cd(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Eu(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(wu);let t={};for(let r of Object.keys(e))t[r]=wu(e[r]);return t}function wu(e){return typeof e=="bigint"?e.toString():Eu(e)}var Md=/^(\s*alter\s)/i,Pu=he("prisma:client");function si(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Md.exec(t))throw new Error(`Running ALTER using ${n} is not supported +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new J(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new J("error: Missing URL environment variable, value, or override.",n);return i}f();c();p();m();d();f();c();p();m();d();var Mr=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 Mr{constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};f();c();p();m();d();f();c();p();m();d();function L(e,t){return{...e,isRetryable:t}}var dt=class extends ie{constructor(r){super("This request must be retried",L(r,!0));this.name="ForcedRetryError";this.code="P5001"}};N(dt,"ForcedRetryError");f();c();p();m();d();var Ve=class extends ie{constructor(r,n){super(r,L(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};N(Ve,"InvalidDatasourceError");f();c();p();m();d();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();m();d();f();c();p();m();d();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();m();d();f();c();p();m();d();var Sn="This request could not be understood by the server",Bt=class extends j{constructor(r,n,i){super(n||Sn,L(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};N(Bt,"BadRequestError");f();c();p();m();d();var Ut=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(Ut,"HealthcheckTimeoutError");f();c();p();m();d();var $t=class extends j{constructor(r,n,i){super(n,L(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};N($t,"EngineStartupError");f();c();p();m();d();var qt=class extends j{constructor(r){super("Engine version is not supported",L(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};N(qt,"EngineVersionNotSupportedError");f();c();p();m();d();var On="Request timed out",Vt=class extends j{constructor(r,n=On){super(n,L(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};N(Vt,"GatewayTimeoutError");f();c();p();m();d();var Au="Interactive transaction error",jt=class extends j{constructor(r,n=Au){super(n,L(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};N(jt,"InteractiveTransactionError");f();c();p();m();d();var Cu="Request parameters are invalid",Gt=class extends j{constructor(r,n=Cu){super(n,L(r,!1));this.name="InvalidRequestError";this.code="P5011"}};N(Gt,"InvalidRequestError");f();c();p();m();d();var In="Requested resource does not exist",Jt=class extends j{constructor(r,n=In){super(n,L(r,!1));this.name="NotFoundError";this.code="P5003"}};N(Jt,"NotFoundError");f();c();p();m();d();var kn="Unknown server error",ft=class extends j{constructor(r,n,i){super(n||kn,L(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};N(ft,"ServerError");f();c();p();m();d();var Dn="Unauthorized, check your connection string",Qt=class extends j{constructor(r,n=Dn){super(n,L(r,!1));this.name="UnauthorizedError";this.code="P5007"}};N(Qt,"UnauthorizedError");f();c();p();m();d();var Mn="Usage exceeded, retry again later",Ht=class extends j{constructor(r,n=Mn){super(n,L(r,!0));this.name="UsageExceededError";this.code="P5008"}};N(Ht,"UsageExceededError");async function Ru(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 Wt(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await Ru(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 ft(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 qt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new $t(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new J(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Ut(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 jt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Gt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Qt(r,gt(Dn,n));if(e.status===404)return new Jt(r,gt(In,n));if(e.status===429)throw new Ht(r,gt(Mn,n));if(e.status===504)throw new Vt(r,gt(On,n));if(e.status>=500)throw new ft(r,gt(kn,n));if(e.status>=400)throw new Bt(r,gt(Sn,n))}function gt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}f();c();p();m();d();function Ko(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();m();d();var ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function zo(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+=ve[s]+ve[a]+ve[l]+ve[u];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=ve[s]+ve[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=ve[s]+ve[a]+ve[l]+"="),r}f();c();p();m();d();function Yo(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new J("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();m();d();function Su(e){return e[0]*1e3+e[1]/1e6}function Zo(e){return new Date(Su(e))}f();c();p();m();d();var Xo={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};f();c();p();m();d();f();c();p();m();d();var Kt=class extends ie{constructor(r,n){super(`Cannot fetch data from service: +${r}`,L(n,!0));this.name="RequestError";this.code="P5010"}};N(Kt,"RequestError");async function Je(e,t,r=n=>n){let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(Nn)(e,t)}catch(i){let o=i.message??"Unknown error";throw new Kt(o,{clientVersion:n})}}function Iu(e){return{...e.headers,"Content-Type":"application/json"}}function ku(e){return{method:e.method,headers:Iu(e)}}function Du(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 Fn(t.headers)}}async function Nn(e,t={}){let r=Mu("https"),n=ku(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(Nn(`${o}${h}`,t)):s(Nn(h,t))),u.on("data",v=>i.push(v)),u.on("end",()=>s(Du(i,u))),u.on("error",a)});l.on("error",a),l.end(t.body??"")})}var Mu=typeof Hr<"u"?Hr:()=>{},Fn=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 Nu=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,es=ee("prisma:client:dataproxyEngine");async function Fu(e,t){let r=Xo["@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&&Nu.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=_u(`<=${a}.${l}.${u}`),h=await Je(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();es("length of body fetched from unpkg.com",v.length);let S;try{S=JSON.parse(v)}catch(C){throw console.error("JSON.parse error: body fetched from unpkg.com: ",v),C}return S.version}throw new je("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function ts(e,t){let r=await Fu(e,t);return es("version",r),r}function _u(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var rs=3,_n=ee("prisma:client:dataproxyEngine"),Ln=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}},zt=class{constructor(t){this.name="DataProxyEngine";Yo(t),this.config=t,this.env={...t.env,...typeof y<"u"?y.env:{}},this.inlineSchema=zo(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 Ln({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await ts(t,this.config),_n("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:Zo(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 Je(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||_n("schema response status",r.status);let n=await Wt(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=gr(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?Ft(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 Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||_n("graphql response status",a.status),await this.handleError(await Wt(a,this.clientVersion));let l=await a.json(),u=l.extensions;if(u&&this.propagateResponseExtensions(u),l.errors)throw l.errors.length===1?Ft(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 Je(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Wt(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 Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Wt(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=mt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new Ve(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:")throw new Ve(`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 Ve(`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 dt?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 Ko(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 dt({clientVersion:this.clientVersion,cause:t});if(t)throw t}applyPendingMigrations(){throw new Error("Method not implemented.")}};function ns({copyEngine:e=!0},t){let r;try{r=mt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}e&&r?.startsWith("prisma://")&&pr("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=Pt(t.generator),i=!!(r?.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o){let l;throw l=["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(l.join(` +`),{clientVersion:t.clientVersion})}if(i)return new zt(t);throw new Z("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}f();c();p();m();d();function Nr({generator:e}){return e?.previewFeatures??[]}f();c();p();m();d();f();c();p();m();d();function ht(e){return e.substring(0,1).toLowerCase()+e.substring(1)}f();c();p();m();d();f();c();p();m();d();var us=_e(Bn());f();c();p();m();d();function as(e,t,r){let n=ls(e),i=Lu(n),o=Uu(i);o?Fr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function ls(e){return e.errors.flatMap(t=>t.kind==="Union"?ls(t):[t])}function Lu(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:Bu(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Bu(e,t){return[...new Set(e.concat(t))]}function Uu(e){return ln(e,(t,r)=>{let n=os(t),i=os(r);return n!==i?n-i:ss(t)-ss(r)})}function os(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function ss(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}f();c();p();m();d();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();m();d();var Yt=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(st,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Fr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":$u(e,t);break;case"IncludeOnScalar":qu(e,t);break;case"EmptySelection":Vu(e,t,r);break;case"UnknownSelectionField":Qu(e,t);break;case"UnknownArgument":Hu(e,t);break;case"UnknownInputField":Wu(e,t);break;case"RequiredArgumentMissing":Ku(e,t);break;case"InvalidArgumentType":zu(e,t);break;case"InvalidArgumentValue":Yu(e,t);break;case"ValueTooLarge":Zu(e,t);break;case"SomeFieldsMissing":Xu(e,t);break;case"TooManyFieldsGiven":ec(e,t);break;case"Union":as(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function $u(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 qu(e,t){let[r,n]=Zt(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)}. ${Xt(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Vu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){ju(e,t,i);return}if(n.hasField("select")){Gu(e,t);return}}if(r?.[ht(e.outputType.name)]){Ju(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function ju(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 Gu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),ms(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Xt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Ju(e,t){let r=new Yt;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]=Zt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new lt;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 Qu(e,t){let[r,n]=Zt(e.selectionPath),i=t.arguments.getDeepSubSelectionValue(r)?.asObject(),o;if(i){let s=i.getFieldValue("select")?.asObject(),a=i.getFieldValue("include")?.asObject(),l=i.getFieldValue("omit")?.asObject();s?.hasField(n)?(o="select",s.getField(n)?.markAsError(),ms(s,e.outputType)):a?.hasField(n)?(o="include",a.getField(n)?.markAsError(),tc(a,e.outputType)):l?.hasField(n)&&(o="omit",l.getField(n)?.markAsError(),rc(l,e.outputType))}t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(Xt(s)),a.join(" ")})}function Hu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),nc(n,e.arguments)),t.addErrorMessage(i=>cs(i,r,e.arguments.map(o=>o.name)))}function Wu(e,t){let[r,n]=Zt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&ds(o,e.inputType)}t.addErrorMessage(o=>cs(o,n,e.inputType.fields.map(s=>s.name)))}function cs(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=oc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Xt(e)),n.join(" ")}function Ku(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]=Zt(e.argumentPath),s=new Yt,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(ps).join(" | ");a.addSuggestion(new le(o,l).makeRequired())}}function ps(e){return e.kind==="list"?`${ps(e.elementType)}[]`:e.name}function zu(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=_r("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 Yu(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=_r("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Zu(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 Xu(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&&ds(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")} ${_r("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(Xt(i)),o.join(" ")})}function ec(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 ${_r("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function ms(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,"true"))}function tc(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new le(r.name,"true"))}function rc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new le(r.name,"true"))}function nc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function ds(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 Zt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Xt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function _r(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var ic=3;function oc(e,t){let r=1/0,n;for(let i of t){let o=(0,us.default)(e,i);o>ic||o({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?.[ht(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:Ee(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};f();c();p();m();d();var ys=e=>({command:e});f();c();p();m();d();f();c();p();m();d();var ws=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);f();c();p();m();d();function tr(e){try{return Es(e,"fast")}catch{return Es(e,"slow")}}function Es(e,t){return JSON.stringify(e.map(r=>gc(r,t)))}function gc(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:tt(e)?{prisma__type:"date",prisma__value:e.toJSON()}:Pe.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:w.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:hc(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?xs(e):e}function hc(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function xs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(bs);let t={};for(let r of Object.keys(e))t[r]=bs(e[r]);return t}function bs(e){return typeof e=="bigint"?e.toString():xs(e)}var yc=/^(\s*alter\s)/i,Ps=ee("prisma:client");function $n(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&yc.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 ai=({clientMethod:e,activeProvider:t,activeProviderFlavour:r})=>n=>{r!==void 0&&(t=r);let o="",i;if(Array.isArray(n)){let[s,...a]=n;o=s,i={values:kr(a||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{o=n.sql,i={values:kr(n.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{o=n.text,i={values:kr(n.values),__prismaRawParameters__:!0};break}case"sqlserver":{o=xu(n),i={values:kr(n.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i!=null&&i.values?Pu(`prisma.${e}(${o}, ${i.values})`):Pu(`prisma.${e}(${o})`),{query:o,parameters:i}},vu={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new Ae(t,r)}},Au={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};d();p();f();function ui(e){return function(r){let n,o=(i=e)=>{try{return i===void 0||(i==null?void 0:i.kind)==="itx"?n!=null?n:n=Tu(r(i)):Tu(r(i))}catch(s){return Promise.reject(s)}};return{then(i,s){return o().then(i,s)},catch(i){return o().catch(i)},finally(i){return o().finally(i)},requestTransaction(i){let s=o(i);return s.requestTransaction?s.requestTransaction(i):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Tu(e){return typeof e.then=="function"?e:Promise.resolve(e)}d();p();f();var Cu={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},li=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(){var t,r;return(r=(t=globalThis.PRISMA_INSTRUMENTATION)==null?void 0:t.helper)!=null?r:Cu}};function Mu(e){return e.includes("tracing")?new li:Cu}d();p();f();function Su(e,t=()=>{}){let r,n=new Promise(o=>r=o);return{then(o){return--e===0&&r(t()),o==null?void 0:o(n)}}}d();p();f();var Sd=["$connect","$disconnect","$on","$transaction","$use","$extends"],Ru=Sd;d();p();f();function Ou(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)}d();p();f();var qn=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}};d();p();f();var Iu=Pe(Us());d();p();f();function Vn(e){return typeof e.batchRequestIdx=="number"}d();p();f();function Kn(e){return e===null?e:Array.isArray(e)?e.map(Kn):typeof e=="object"?Rd(e)?Od(e):jt(e,Kn):e}function Rd(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Od({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return x.Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new Ke(t);case"Json":return JSON.parse(t);default:xt(t,"Unknown tagged value")}}d();p();f();function Fu(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(ci(e.query.arguments)),t.push(ci(e.query.selection)),t.join("")}function ci(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${ci(n)})`:r}).join(" ")})`}d();p();f();var Fd={aggregate:!1,aggregateRaw:!1,createMany:!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 pi(e){return Fd[e]}d();p();f();var Gn=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,o)=>{this.batches[r].push({request:t,resolve:n,reject:o})})):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,o)=>this.options.batchOrder(n.request,o.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let o=0;o{for(let o=0;o{let{transaction:i,otelParentCtx:s}=n[0],a=n.map(m=>m.protocolQuery),u=this.client._tracingHelper.getTraceParent(s),l=n.some(m=>pi(m.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:u,transaction:kd(i),containsWrite:l,customDataProxyFetch:o})).map((m,g)=>{if(m instanceof Error)return m;try{return this.mapQueryEngineResult(n[g],m)}catch(w){return w}})}),singleLoader:async n=>{var s;let o=((s=n.transaction)==null?void 0:s.kind)==="itx"?ku(n.transaction):void 0,i=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:o,isWrite:pi(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,i)},batchBy:n=>{var o;return(o=n.transaction)!=null&&o.id?`transaction-${n.transaction.id}`:Fu(n.protocolQuery)},batchOrder(n,o){var i,s;return((i=n.transaction)==null?void 0:i.kind)==="batch"&&((s=o.transaction)==null?void 0:s.kind)==="batch"?n.transaction.index-o.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:o,transaction:i,args:s}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:o,transaction:i,args:s})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let o=n==null?void 0:n.data,i=n==null?void 0:n.elapsed,s=this.unpack(o,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:i}: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:o,args:i}){if(Id(t),Dd(t,o)||t instanceof tt)throw t;if(t instanceof de&&_d(t)){let a=Du(t.meta);$n({args:i,errors:[a],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion})}let s=t.message;throw n&&(s=Ht({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:s})),s=this.sanitizeMessage(s),t.code?new de(s,{code:t.code,clientVersion:this.client._clientVersion,meta:t.meta,batchRequestIdx:t.batchRequestIdx}):t.isPanic?new rt(s,this.client._clientVersion):t instanceof Se?new Se(s,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx}):t instanceof ae?new ae(s,this.client._clientVersion):t instanceof rt?new rt(s,this.client._clientVersion):(t.clientVersion=this.client._clientVersion,t)}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Iu.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let o=Object.values(t)[0],i=r.filter(a=>a!=="select"&&a!=="include"),s=Kn(qo(o,i));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function kd(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:ku(e)};xt(e,"Unknown transaction kind")}}function ku(e){return{id:e.id,payload:e.payload}}function Dd(e,t){return Vn(e)&&(t==null?void 0:t.kind)==="batch"&&e.batchRequestIdx!==t.index}function _d(e){return e.code==="P2009"||e.code==="P2012"}function Du(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Du)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}d();p();f();var _u="5.4.2";var Nu=_u;d();p();f();function Lu(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=Bu(t[n]);return r})}function Bu({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return x.Buffer.from(t,"base64");case"decimal":return new Ke(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map(Bu);default:return t}}d();p();f();var qu=Pe(ni());d();p();f();var Q=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(Q,"PrismaClientConstructorValidationError");var ju=["datasources","datasourceUrl","errorFormat","adapter","log","__internal"],Uu=["pretty","colorless","minimal"],$u=["info","query","warn","error"],Ld={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new Q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let o=Xt(r,t)||` Available datasources: ${t.join(", ")}`;throw new Q(`Unknown datasource ${r} provided to PrismaClient constructor.${o}`)}if(typeof n!="object"||Array.isArray(n))throw new Q(`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[o,i]of Object.entries(n)){if(o!=="url")throw new Q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof i!="string")throw new Q(`Invalid value ${JSON.stringify(i)} 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 Q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Nn(t).includes("driverAdapters"))throw new Q('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.')},datasourceUrl:e=>{if(typeof e!="undefined"&&typeof e!="string")throw new Q(`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 Q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Uu.includes(e)){let t=Xt(e,Uu);throw new Q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new Q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!$u.includes(r)){let n=Xt(r,$u);throw new Q(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:o=>{let i=["stdout","event"];if(!i.includes(o)){let s=Xt(o,i);throw new Q(`Invalid value ${JSON.stringify(o)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[o,i]of Object.entries(r))if(n[o])n[o](i);else throw new Q(`Invalid property ${o} for "log" provided to PrismaClient constructor`)}},__internal:e=>{if(!e)return;let t=["debug","hooks","engine","measurePerformance"];if(typeof e!="object")throw new Q(`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 Q(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Vu(e,t){for(let[r,n]of Object.entries(e)){if(!ju.includes(r)){let o=Xt(r,ju);throw new Q(`Unknown property ${r} provided to PrismaClient constructor.${o}`)}Ld[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new Q('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=Bd(e,t);return r?` Did you mean "${r}"?`:""}function Bd(e,t){if(t.length===0)return null;let r=t.map(o=>({value:o,distance:(0,qu.default)(e,o)}));r.sort((o,i)=>o.distance{let n=new Array(e.length),o=null,i=!1,s=0,a=()=>{i||(s++,s===e.length&&(i=!0,o?r(o):t(n)))},u=l=>{i||(i=!0,r(l))};for(let l=0;l{n[l]=c,a()},c=>{if(!Vn(c)){u(c);return}c.batchRequestIdx===l?u(c):(o||(o=c),a())})})}var ct=he("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var jd={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Ud=Symbol.for("prisma.client.transaction.id"),$d={id:0,nextId(){return++this.id}};function qd(e){class t{constructor(n){this._middlewares=new qn;this._createPrismaPromise=ui();this.$extends=Fa;var u,l,c,m,g,w;Qa(e),n&&Vu(n,e);let o=n!=null&&n.adapter?Vs(n.adapter):void 0,i=new Ju.EventEmitter().on("error",()=>{});this._extensions=In.empty(),this._previewFeatures=Nn(e),this._clientVersion=(u=e.clientVersion)!=null?u:Nu,this._activeProvider=e.activeProvider,this._tracingHelper=Mu(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Dr.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Dr.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=(l=e.injectableEdgeEnv)==null?void 0:l.call(e);try{let E=n!=null?n:{},b=(c=E.__internal)!=null?c:{},T=b.debug===!0;T&&he.enable("prisma:client");let S=Dr.default.resolve(e.dirname,e.relativePath);sn.existsSync(S)||(S=e.dirname),ct("dirname",e.dirname),ct("relativePath",e.relativePath),ct("cwd",S);let R=b.engine||{};if(E.errorFormat?this._errorFormat=E.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:S,dirname:e.dirname,enableDebugLogs:T,allowTriggerPanic:R.allowTriggerPanic,datamodelPath:Dr.default.join(e.dirname,(m=e.filename)!=null?m:"schema.prisma"),prismaPath:(g=R.binaryPath)!=null?g:void 0,engineEndpoint:R.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:E.log&&Ou(E.log),logQueries:E.log&&!!(typeof E.log=="string"?E.log==="query":E.log.find(C=>typeof C=="string"?C==="query":C.level==="query")),env:(w=a==null?void 0:a.parsed)!=null?w:{},flags:[],clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Wa(E,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,logEmitter:i,isBundled:e.isBundled,adapter:o},ct("clientVersion",e.clientVersion),this._engine=nu(e,this._engineConfig),this._requestHandler=new Jn(this,i),E.log)for(let C of E.log){let M=typeof C=="string"?C:C.emit==="stdout"?C.level:null;M&&this.$on(M,N=>{var L;Bt.log(`${(L=Bt.tags[M])!=null?L:""}`,N.message||N.query)})}this._metrics=new sr(this._engine)}catch(E){throw E.clientVersion=this._clientVersion,E}return this._appliedParent=hr(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,o){n==="beforeExit"?this._engine.on("beforeExit",o):this._engine.on(n,i=>{var a,u,l,c;let s=i.fields;return o(n==="query"?{timestamp:i.timestamp,query:(a=s==null?void 0:s.query)!=null?a:i.query,params:(u=s==null?void 0:s.params)!=null?u:i.params,duration:(l=s==null?void 0:s.duration_ms)!=null?l:i.duration,target:i.target}:{timestamp:i.timestamp,message:(c=s==null?void 0:s.message)!=null?c:i.message,target:i.target})})}$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{bs()}}$executeRawInternal(n,o,i,s){var l;let a=this._activeProvider,u=(l=this._engineConfig.adapter)==null?void 0:l.flavour;return this._request({action:"executeRaw",args:i,transaction:n,clientMethod:o,argsMapper:ai({clientMethod:o,activeProvider:a,activeProviderFlavour:u}),callsite:lt(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...o){return this._createPrismaPromise(i=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Gu(n,o);return si(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(i,"$executeRaw",s,a)}throw new me("`$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,...o){return this._createPrismaPromise(i=>(si(this._activeProvider,n,o,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(i,"$executeRawUnsafe",[n,...o])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new me(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(o=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:hu,callsite:lt(this._errorFormat),transaction:o}))}async $queryRawInternal(n,o,i,s){var l;let a=this._activeProvider,u=(l=this._engineConfig.adapter)==null?void 0:l.flavour;return this._request({action:"queryRaw",args:i,transaction:n,clientMethod:o,argsMapper:ai({clientMethod:o,activeProvider:a,activeProviderFlavour:u}),callsite:lt(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(Lu)}$queryRaw(n,...o){return this._createPrismaPromise(i=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(i,"$queryRaw",...Gu(n,o));throw new me("`$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})})}$queryRawUnsafe(n,...o){return this._createPrismaPromise(i=>this.$queryRawInternal(i,"$queryRawUnsafe",[n,...o]))}_transactionWithArray({promises:n,options:o}){let i=$d.nextId(),s=Su(n.length),a=n.map((u,l)=>{var g,w;if((u==null?void 0: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 c=o==null?void 0:o.isolationLevel,m={kind:"batch",id:i,index:l,isolationLevel:c,lock:s};return(w=(g=u.requestTransaction)==null?void 0:g.call(u,m))!=null?w:u});return Ku(a)}async _transactionWithCallback({callback:n,options:o}){let i={traceparent:this._tracingHelper.getTraceParent()},s=await this._engine.transaction("start",i,o),a;try{let u={kind:"itx",...s};a=await n(this._createItxClient(u)),await this._engine.transaction("commit",i,s)}catch(u){throw await this._engine.transaction("rollback",i,s).catch(()=>{}),u}return a}_createItxClient(n){return hr(Ne(Rn(this),[ge("_appliedParent",()=>this._appliedParent._createItxClient(n)),ge("_createPrismaPromise",()=>ui(n)),ge(Ud,()=>n.id),dr(Ru)]))}$transaction(n,o){let i;typeof n=="function"?i=()=>this._transactionWithCallback({callback:n,options:o}):i=()=>this._transactionWithArray({promises:n,options:o});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,i)}_request(n){var l;n.otelParentCtx=this._tracingHelper.getActiveContext();let o=(l=n.middlewareArgsMapper)!=null?l:jd,i={args:o.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:i.action,model:i.model,name:i.model?`${i.model}.${i.action}`:i.action}}},a=-1,u=async c=>{let m=this._middlewares.get(++a);if(m)return this._tracingHelper.runInChildSpan(s.middleware,S=>m(c,R=>(S==null||S.end(),u(R))));let{runInTransaction:g,args:w,...E}=c,b={...n,...E};w&&(b.args=o.middlewareArgsToRequestArgs(w)),n.transaction!==void 0&&g===!1&&delete b.transaction;let T=await Ba(this,b);return b.model?Da({result:T,modelName:b.model,args:b.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):T};return this._tracingHelper.runInChildSpan(s.operation,()=>u(i))}async _executeRequest({args:n,clientMethod:o,dataPath:i,callsite:s,action:a,model:u,argsMapper:l,transaction:c,unpacker:m,otelParentCtx:g,customDataProxyFetch:w}){try{n=l?l(n):n;let E={name:"serialize"},b=this._tracingHelper.runInChildSpan(E,()=>mu({modelName:u,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:o,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion}));return he.enabled("prisma:client")&&(ct("Prisma Client call:"),ct(`prisma.${o}(${ma(n)})`),ct("Generated request:"),ct(JSON.stringify(b,null,2)+` -`)),(c==null?void 0:c.kind)==="batch"&&await c.lock,this._requestHandler.request({protocolQuery:b,modelName:u,action:a,clientMethod:o,dataPath:i,callsite:s,args:n,extensions:this._extensions,transaction:c,unpacker:m,otelParentCtx:g,otelChildCtx:this._tracingHelper.getActiveContext(),customDataProxyFetch:w})}catch(E){throw E.clientVersion=this._clientVersion,E}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new me("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){var o;return!!((o=this._engineConfig.previewFeatures)!=null&&o.includes(n))}}return t}function Gu(e,t){return Vd(e)?[new Ae(e,t),vu]:[e,Au]}function Vd(e){return Array.isArray(e)&&Array.isArray(e.raw)}d();p();f();var Kd=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Gd(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Kd.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}d();p();f();var export_warnEnvConflicts=void 0;export{Me as DMMF,ro as DMMFClass,xs as Debug,Ke as Decimal,ji as Extensions,sr as MetricsClient,tt as NotFoundError,qe as ObjectEnumValue,ae as PrismaClientInitializationError,de as PrismaClientKnownRequestError,rt as PrismaClientRustPanicError,Se as PrismaClientUnknownRequestError,me as PrismaClientValidationError,$i as Public,Ae as Sql,Ji as Types,Gc as defineDmmfProperty,Yc as empty,qd as getPrismaClient,Ru as itxClientDenyList,Zc as join,Gd as makeStrictEnum,V0 as objectEnumNames,Fo as objectEnumValues,Gs as raw,Js as sqltag,export_warnEnvConflicts as warnEnvConflicts,un as warnOnce}; +`)}var qn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:tr(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:tr(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:tr(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=ws(r),i={values:tr(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Ps(`prisma.${e}(${n}, ${i.values})`):Ps(`prisma.${e}(${n})`),{query:n,parameters:i}},vs={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ae(t,r)}},Ts={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};f();c();p();m();d();function Vn(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=As(r(o)):As(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 As(e){return typeof e.then=="function"?e:Promise.resolve(e)}f();c();p();m();d();var Cs={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},jn=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??Cs}};function Rs(e){return e.includes("tracing")?new jn:Cs}f();c();p();m();d();function Ss(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}f();c();p();m();d();var wc=["$connect","$disconnect","$on","$transaction","$use","$extends"],Os=wc;f();c();p();m();d();function Is(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();m();d();var Br=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();m();d();var Ms=_e(Vi());f();c();p();m();d();function Ur(e){return typeof e.batchRequestIdx=="number"}f();c();p();m();d();function $r(e){return e===null?e:Array.isArray(e)?e.map($r):typeof e=="object"?Ec(e)?bc(e):Ze(e,$r):e}function Ec(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function bc({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return w.Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new Pe(t);case"Json":return JSON.parse(t);default:Ee(t,"Unknown tagged value")}}f();c();p();m();d();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(Gn(e.query.arguments)),t.push(Gn(e.query.selection)),t.join("")}function Gn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Gn(n)})`:r}).join(" ")})`}f();c();p();m();d();var xc={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 Jn(e){return xc[e]}f();c();p();m();d();var qr=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;iQe("bigint",r));case"bytes-array":return t.map(r=>Qe("bytes",r));case"decimal-array":return t.map(r=>Qe("decimal",r));case"datetime-array":return t.map(r=>Qe("datetime",r));case"date-array":return t.map(r=>Qe("date",r));case"time-array":return t.map(r=>Qe("time",r));default:return t}}function Ds(e){let t=[],r=Pc(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=>Jn(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Tc(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"?Ns(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Jn(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),Ac(t,i)||t instanceof Ce)throw t;if(t instanceof K&&Cc(t)){let u=Fs(t.meta);Lr({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=pt({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 Re(l,this.client._clientVersion);if(t instanceof se)throw new se(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof J)throw new J(l,this.client._clientVersion);if(t instanceof Re)throw new Re(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Ms.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=vn(o,s),l=i==="queryRaw"?Ds(a):$r(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Tc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Ns(e)};Ee(e,"Unknown transaction kind")}}function Ns(e){return{id:e.id,payload:e.payload}}function Ac(e,t){return Ur(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Cc(e){return e.code==="P2009"||e.code==="P2012"}function Fs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Fs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}f();c();p();m();d();var _s="5.18.0";var Ls=_s;f();c();p();m();d();var Vs=_e(Bn());f();c();p();m();d();var U=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(U,"PrismaClientConstructorValidationError");var Bs=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Us=["pretty","colorless","minimal"],$s=["info","query","warn","error"],Sc={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new U(`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=yt(r,t)||` Available datasources: ${t.join(", ")}`;throw new U(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new U(`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 U(`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 U(`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 U('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Nr(t).includes("driverAdapters"))throw new U('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Pt()==="binary")throw new U('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 U(`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 U(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Us.includes(e)){let t=yt(e,Us);throw new U(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new U(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!$s.includes(r)){let n=yt(r,$s);throw new U(`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=yt(i,o);throw new U(`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 U(`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 U(`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 U(`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 U('"omit" option is expected to be an object.');if(e===null)throw new U('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Ic(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 U(kc(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new U(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=yt(r,t);throw new U(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function js(e,t){for(let[r,n]of Object.entries(e)){if(!Bs.includes(r)){let i=yt(r,Bs);throw new U(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Sc[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new U('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function yt(e,t){if(t.length===0||typeof e!="string")return"";let r=Oc(e,t);return r?` Did you mean "${r}"?`:""}function Oc(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Vs.default)(e,i)}));r.sort((i,o)=>i.distanceht(n)===t);if(r)return e[r]}function kc(e,t){let r=ut(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}=Sr(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}f();c();p();m();d();function Gs(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 Ne=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Dc={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Mc=Symbol.for("prisma.client.transaction.id"),Nc={id:0,nextId(){return++this.id}};function Fc(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Br;this._createPrismaPromise=Vn();this.$extends=Oo;e=n?.__internal?.configOverride?.(e)??e,Qo(e),n&&js(n,e);let i=new cr().on("error",()=>{});this._extensions=Dr.empty(),this._previewFeatures=Nr(e),this._clientVersion=e.clientVersion??Ls,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Rs(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&xt.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&xt.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 J(`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 J("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=xt.resolve(e.dirname,e.relativePath);hi.existsSync(h)||(h=e.dirname),Ne("dirname",e.dirname),Ne("relativePath",e.relativePath),Ne("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:xt.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&&Is(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:Ho(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:mt,getBatchRequestPayload:gr,prismaGraphQLToJSError:Ft,PrismaClientUnknownRequestError:se,PrismaClientInitializationError:J,PrismaClientKnownRequestError:K,debug:ee("prisma:client:accelerateEngine"),engineVersion:Qs.version,clientVersion:e.clientVersion}},Ne("clientVersion",e.clientVersion),this._engine=ns(e,this._engineConfig),this._requestHandler=new Vr(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,R=>{Tt.log(`${Tt.tags[C]??""}`,R.message||R.query)})}this._metrics=new At(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=_t(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{ki()}}$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:Me(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Js(n,i);return $n(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=>($n(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:ys,callsite:Me(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:Me(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",...Js(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})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Nc.nextId(),s=Ss(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 Gs(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 _t(fe(So(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>Vn(n)),te(Mc,()=>n.id),Xe(Os)]))}$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??Dc,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,C={...n,...S};v&&(C.args=i.middlewareArgsToRequestArgs(v)),n.transaction!==void 0&&h===!1&&delete C.transaction;let R=await _o(this,C);return C.model?Do({result:R,modelName:C.model,args:C.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 C={name:"serialize"},R=this._tracingHelper.runInChildSpan(C,()=>fs({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")&&(Ne("Prisma Client call:"),Ne(`prisma.${i}(${yo(n)})`),Ne("Generated request:"),Ne(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(C){throw C.clientVersion=this._clientVersion,C}}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 Js(e,t){return _c(e)?[new ae(e,t),vs]:[e,Ts]}function _c(e){return Array.isArray(e)&&Array.isArray(e.raw)}f();c();p();m();d();var Lc=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Bc(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Lc.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}f();c();p();m();d();var export_warnEnvConflicts=void 0;export{Ii as Debug,Pe as Decimal,di as Extensions,At as MetricsClient,Ce as NotFoundError,J as PrismaClientInitializationError,K as PrismaClientKnownRequestError,Re as PrismaClientRustPanicError,se as PrismaClientUnknownRequestError,Z as PrismaClientValidationError,gi as Public,ae as Sql,Ga as defineDmmfProperty,za as empty,Fc as getPrismaClient,Rn as getRuntime,Ka as join,Bc as makeStrictEnum,pn as objectEnumValues,Hi as raw,Wi as sqltag,export_warnEnvConflicts as warnEnvConflicts,pr as warnOnce}; //# sourceMappingURL=edge-esm.js.map diff --git a/experiments/mongodb/prisma/generated/client/runtime/edge.js b/experiments/mongodb/prisma/generated/client/runtime/edge.js index 2488a0be3..2f1ccd190 100644 --- a/experiments/mongodb/prisma/generated/client/runtime/edge.js +++ b/experiments/mongodb/prisma/generated/client/runtime/edge.js @@ -1,43 +1,31 @@ -"use strict";var il=Object.create;var tr=Object.defineProperty;var sl=Object.getOwnPropertyDescriptor;var al=Object.getOwnPropertyNames;var ul=Object.getPrototypeOf,ll=Object.prototype.hasOwnProperty;var cl=(e,t,r)=>t in e?tr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Br=(e,t)=>()=>(e&&(t=e(e=0)),t);var Z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),rr=(e,t)=>{for(var r in t)tr(e,r,{get:t[r],enumerable:!0})},vi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of al(t))!ll.call(e,o)&&o!==r&&tr(e,o,{get:()=>t[o],enumerable:!(n=sl(t,o))||n.enumerable});return e};var ve=(e,t,r)=>(r=e!=null?il(ul(e)):{},vi(t||!e||!e.__esModule?tr(r,"default",{value:e,enumerable:!0}):r,e)),pl=e=>vi(tr({},"__esModule",{value:!0}),e);var Ai=(e,t,r)=>(cl(e,typeof t!="symbol"?t+"":t,r),r);function B(e){return()=>e}function Ie(){return y}var y,p=Br(()=>{"use strict";y={abort:B(void 0),addListener:B(Ie()),allowedNodeEnvironmentFlags:new Set,arch:"x64",argv:["/bin/node"],argv0:"node",chdir:B(void 0),config:{target_defaults:{cflags:[],default_configuration:"",defines:[],include_dirs:[],libraries:[]},variables:{clang:0,host_arch:"x64",node_install_npm:!1,node_install_waf:!1,node_prefix:"",node_shared_openssl:!1,node_shared_v8:!1,node_shared_zlib:!1,node_use_dtrace:!1,node_use_etw:!1,node_use_openssl:!1,target_arch:"x64",v8_no_strict_aliasing:0,v8_use_snapshot:!1,visibility:""}},connected:!1,cpuUsage:()=>({user:0,system:0}),cwd:()=>"/",debugPort:0,disconnect:B(void 0),constrainedMemory:()=>{},emit:B(Ie()),emitWarning:B(void 0),env:{},eventNames:()=>[],execArgv:[],execPath:"/",exit:B(void 0),features:{inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1},getMaxListeners:B(0),getegid:B(0),geteuid:B(0),getgid:B(0),getgroups:B([]),getuid:B(0),hasUncaughtExceptionCaptureCallback:B(!1),hrtime:B([0,0]),platform:"linux",kill:B(!0),listenerCount:B(0),listeners:B([]),memoryUsage:B({arrayBuffers:0,external:0,heapTotal:0,heapUsed:0,rss:0}),nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},off:B(Ie()),on:B(Ie()),once:B(Ie()),openStdin:B({}),pid:0,ppid:0,prependListener:B(Ie()),prependOnceListener:B(Ie()),rawListeners:B([]),release:{name:"node"},removeAllListeners:B(Ie()),removeListener:B(Ie()),resourceUsage:B({fsRead:0,fsWrite:0,involuntaryContextSwitches:0,ipcReceived:0,ipcSent:0,majorPageFault:0,maxRSS:0,minorPageFault:0,sharedMemorySize:0,signalsCount:0,swappedOut:0,systemCPUTime:0,unsharedDataSize:0,unsharedStackSize:0,userCPUTime:0,voluntaryContextSwitches:0}),setMaxListeners:B(Ie()),setUncaughtExceptionCaptureCallback:B(void 0),setegid:B(void 0),seteuid:B(void 0),setgid:B(void 0),setgroups:B(void 0),setuid:B(void 0),stderr:{fd:2},stdin:{fd:0},stdout:{fd:1},title:"node",traceDeprecation:!1,umask:B(0),uptime:B(0),version:"",versions:{http_parser:"",node:"",v8:"",ares:"",uv:"",zlib:"",modules:"",openssl:""}}});var h,f=Br(()=>{"use strict";h=()=>{};h.prototype=h});var Vi=Z(Ot=>{"use strict";d();p();f();var Ri=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fl=Ri(e=>{"use strict";e.byteLength=u,e.toByteArray=c,e.fromByteArray=w;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(i=0,s=o.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var T=E.indexOf("=");T===-1&&(T=b);var S=T===b?0:4-T%4;return[T,S]}function u(E){var b=a(E),T=b[0],S=b[1];return(T+S)*3/4-S}function l(E,b,T){return(b+T)*3/4-T}function c(E){var b,T=a(E),S=T[0],R=T[1],C=new n(l(E,S,R)),M=0,N=R>0?S-4:S,L;for(L=0;L>16&255,C[M++]=b>>8&255,C[M++]=b&255;return R===2&&(b=r[E.charCodeAt(L)]<<2|r[E.charCodeAt(L+1)]>>4,C[M++]=b&255),R===1&&(b=r[E.charCodeAt(L)]<<10|r[E.charCodeAt(L+1)]<<4|r[E.charCodeAt(L+2)]>>2,C[M++]=b>>8&255,C[M++]=b&255),C}function m(E){return t[E>>18&63]+t[E>>12&63]+t[E>>6&63]+t[E&63]}function g(E,b,T){for(var S,R=[],C=b;CN?N:M+C));return S===1?(b=E[T-1],R.push(t[b>>2]+t[b<<4&63]+"==")):S===2&&(b=(E[T-2]<<8)+E[T-1],R.push(t[b>>10]+t[b>>4&63]+t[b<<2&63]+"=")),R.join("")}}),dl=Ri(e=>{e.read=function(t,r,n,o,i){var s,a,u=i*8-o-1,l=(1<>1,m=-7,g=n?i-1:0,w=n?-1:1,E=t[r+g];for(g+=w,s=E&(1<<-m)-1,E>>=-m,m+=u;m>0;s=s*256+t[r+g],g+=w,m-=8);for(a=s&(1<<-m)-1,s>>=-m,m+=o;m>0;a=a*256+t[r+g],g+=w,m-=8);if(s===0)s=1-c;else{if(s===l)return a?NaN:(E?-1:1)*(1/0);a=a+Math.pow(2,o),s=s-c}return(E?-1:1)*a*Math.pow(2,s-o)},e.write=function(t,r,n,o,i,s){var a,u,l,c=s*8-i-1,m=(1<>1,w=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=o?0:s-1,b=o?1:-1,T=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,a=m):(a=Math.floor(Math.log(r)/Math.LN2),r*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+g>=1?r+=w/l:r+=w*Math.pow(2,1-g),r*l>=2&&(a++,l/=2),a+g>=m?(u=0,a=m):a+g>=1?(u=(r*l-1)*Math.pow(2,i),a=a+g):(u=r*Math.pow(2,g-1)*Math.pow(2,i),a=0));i>=8;t[n+E]=u&255,E+=b,u/=256,i-=8);for(a=a<0;t[n+E]=a&255,E+=b,a/=256,c-=8);t[n+E-b]|=T*128}}),Hn=fl(),St=dl(),Ti=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ot.Buffer=P;Ot.SlowBuffer=bl;Ot.INSPECT_MAX_BYTES=50;var jr=2147483647;Ot.kMaxLength=jr;P.TYPED_ARRAY_SUPPORT=ml();!P.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 ml(){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(e){return!1}}Object.defineProperty(P.prototype,"parent",{enumerable:!0,get:function(){if(P.isBuffer(this))return this.buffer}});Object.defineProperty(P.prototype,"offset",{enumerable:!0,get:function(){if(P.isBuffer(this))return this.byteOffset}});function Ve(e){if(e>jr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,P.prototype),t}function P(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 Yn(e)}return Oi(e,t,r)}P.poolSize=8192;function Oi(e,t,r){if(typeof e=="string")return yl(e,t);if(ArrayBuffer.isView(e))return hl(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(ke(e,ArrayBuffer)||e&&ke(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ke(e,SharedArrayBuffer)||e&&ke(e.buffer,SharedArrayBuffer)))return Ii(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 P.from(n,t,r);let o=xl(e);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return P.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)}P.from=function(e,t,r){return Oi(e,t,r)};Object.setPrototypeOf(P.prototype,Uint8Array.prototype);Object.setPrototypeOf(P,Uint8Array);function Fi(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 gl(e,t,r){return Fi(e),e<=0?Ve(e):t!==void 0?typeof r=="string"?Ve(e).fill(t,r):Ve(e).fill(t):Ve(e)}P.alloc=function(e,t,r){return gl(e,t,r)};function Yn(e){return Fi(e),Ve(e<0?0:Xn(e)|0)}P.allocUnsafe=function(e){return Yn(e)};P.allocUnsafeSlow=function(e){return Yn(e)};function yl(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!P.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=ki(e,t)|0,n=Ve(r),o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}function zn(e){let t=e.length<0?0:Xn(e.length)|0,r=Ve(t);for(let n=0;n=jr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+jr.toString(16)+" bytes");return e|0}function bl(e){return+e!=e&&(e=0),P.alloc(+e)}P.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==P.prototype};P.compare=function(e,t){if(ke(e,Uint8Array)&&(e=P.from(e,e.offset,e.byteLength)),ke(t,Uint8Array)&&(t=P.from(t,t.offset,t.byteLength)),!P.isBuffer(e)||!P.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 o=0,i=Math.min(r,n);on.length?(P.isBuffer(i)||(i=P.from(i)),i.copy(n,o)):Uint8Array.prototype.set.call(n,i,o);else if(P.isBuffer(i))i.copy(n,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=i.length}return n};function ki(e,t){if(P.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ke(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 o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Zn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return qi(e).length;default:if(o)return n?-1:Zn(e).length;t=(""+t).toLowerCase(),o=!0}}P.byteLength=ki;function wl(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 Ol(this,t,r);case"utf8":case"utf-8":return _i(this,t,r);case"ascii":return Sl(this,t,r);case"latin1":case"binary":return Rl(this,t,r);case"base64":return Cl(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Fl(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}P.prototype._isBuffer=!0;function mt(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}P.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&&(P.prototype[Ti]=P.prototype.inspect);P.prototype.compare=function(e,t,r,n,o){if(ke(e,Uint8Array)&&(e=P.from(e,e.offset,e.byteLength)),!P.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),o===void 0&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;let i=o-n,s=r-t,a=Math.min(i,s),u=this.slice(n,o),l=e.slice(t,r);for(let c=0;c2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,to(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0)if(o)r=0;else return-1;if(typeof t=="string"&&(t=P.from(t,n)),P.isBuffer(t))return t.length===0?-1:Ci(e,t,r,n,o);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Ci(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function Ci(e,t,r,n,o){let i=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;i=2,s/=2,a/=2,r/=2}function u(c,m){return i===1?c[m]:c.readUInt16BE(m*i)}let l;if(o){let c=-1;for(l=r;ls&&(r=s-a),l=r;l>=0;l--){let c=!0;for(let m=0;mo&&(n=o)):n=o;let i=t.length;n>i/2&&(n=i/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 o=this.length-t;if((r===void 0||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return El(this,e,t,r);case"utf8":case"utf-8":return Pl(this,e,t,r);case"ascii":case"latin1":case"binary":return vl(this,e,t,r);case"base64":return Al(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Tl(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}};P.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Cl(e,t,r){return t===0&&r===e.length?Hn.fromByteArray(e):Hn.fromByteArray(e.slice(t,r))}function _i(e,t,r){r=Math.min(e.length,r);let n=[],o=t;for(;o239?4:i>223?3:i>191?2:1;if(o+a<=r){let u,l,c,m;switch(a){case 1:i<128&&(s=i);break;case 2:u=e[o+1],(u&192)===128&&(m=(i&31)<<6|u&63,m>127&&(s=m));break;case 3:u=e[o+1],l=e[o+2],(u&192)===128&&(l&192)===128&&(m=(i&15)<<12|(u&63)<<6|l&63,m>2047&&(m<55296||m>57343)&&(s=m));break;case 4:u=e[o+1],l=e[o+2],c=e[o+3],(u&192)===128&&(l&192)===128&&(c&192)===128&&(m=(i&15)<<18|(u&63)<<12|(l&63)<<6|c&63,m>65535&&m<1114112&&(s=m))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),o+=a}return Ml(n)}var Mi=4096;function Ml(e){let t=e.length;if(t<=Mi)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let o="";for(let i=t;ir&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}P.prototype.readUintLE=P.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||ee(e,t,this.length);let n=this[e],o=1,i=0;for(;++i>>0,t=t>>>0,r||ee(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n};P.prototype.readUint8=P.prototype.readUInt8=function(e,t){return e=e>>>0,t||ee(e,1,this.length),this[e]};P.prototype.readUint16LE=P.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||ee(e,2,this.length),this[e]|this[e+1]<<8};P.prototype.readUint16BE=P.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||ee(e,2,this.length),this[e]<<8|this[e+1]};P.prototype.readUint32LE=P.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};P.prototype.readUint32BE=P.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};P.prototype.readBigUInt64LE=Ze(function(e){e=e>>>0,Rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&nr(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,o=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(o)<>>0,Rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&nr(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],o=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||ee(e,t,this.length);let n=this[e],o=1,i=0;for(;++i=o&&(n-=Math.pow(2,8*t)),n};P.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||ee(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i};P.prototype.readInt8=function(e,t){return e=e>>>0,t||ee(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};P.prototype.readInt16LE=function(e,t){e=e>>>0,t||ee(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};P.prototype.readInt16BE=function(e,t){e=e>>>0,t||ee(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};P.prototype.readInt32LE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};P.prototype.readInt32BE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};P.prototype.readBigInt64LE=Ze(function(e){e=e>>>0,Rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&nr(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,Rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&nr(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||ee(e,4,this.length),St.read(this,e,!0,23,4)};P.prototype.readFloatBE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),St.read(this,e,!1,23,4)};P.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||ee(e,8,this.length),St.read(this,e,!0,52,8)};P.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||ee(e,8,this.length),St.read(this,e,!1,52,8)};function ye(e,t,r,n,o,i){if(!P.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}P.prototype.writeUintLE=P.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;ye(this,e,t,r,s,0)}let o=1,i=0;for(this[t]=e&255;++i>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;ye(this,e,t,r,s,0)}let o=r-1,i=1;for(this[t+o]=e&255;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r};P.prototype.writeUint8=P.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,1,255,0),this[t]=e&255,t+1};P.prototype.writeUint16LE=P.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};P.prototype.writeUint16BE=P.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};P.prototype.writeUint32LE=P.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ye(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};P.prototype.writeUint32BE=P.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ye(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 Ni(e,t,r,n,o){$i(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i;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,o){$i(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i=i>>8,e[r+6]=i,i=i>>8,e[r+5]=i,i=i>>8,e[r+4]=i;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}P.prototype.writeBigUInt64LE=Ze(function(e,t=0){return Ni(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});P.prototype.writeBigUInt64BE=Ze(function(e,t=0){return Li(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});P.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ye(this,e,t,r,a-1,-a)}let o=0,i=1,s=0;for(this[t]=e&255;++o>0)-s&255;return t+r};P.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ye(this,e,t,r,a-1,-a)}let o=r-1,i=1,s=0;for(this[t+o]=e&255;--o>=0&&(i*=256);)e<0&&s===0&&this[t+o+1]!==0&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+r};P.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};P.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};P.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};P.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ye(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};P.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ye(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};P.prototype.writeBigInt64LE=Ze(function(e,t=0){return Ni(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});P.prototype.writeBigInt64BE=Ze(function(e,t=0){return Li(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Bi(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ji(e,t,r,n,o){return t=+t,r=r>>>0,o||Bi(e,t,r,4,34028234663852886e22,-34028234663852886e22),St.write(e,t,r,n,23,4),r+4}P.prototype.writeFloatLE=function(e,t,r){return ji(this,e,t,!0,r)};P.prototype.writeFloatBE=function(e,t,r){return ji(this,e,t,!1,r)};function Ui(e,t,r,n,o){return t=+t,r=r>>>0,o||Bi(e,t,r,8,17976931348623157e292,-17976931348623157e292),St.write(e,t,r,n,52,8),r+8}P.prototype.writeDoubleLE=function(e,t,r){return Ui(this,e,t,!0,r)};P.prototype.writeDoubleBE=function(e,t,r){return Ui(this,e,t,!1,r)};P.prototype.copy=function(e,t,r,n){if(!P.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 o;if(typeof e=="number")for(o=t;o2**32?o=Si(String(r)):typeof r=="bigint"&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=Si(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n},RangeError);function Si(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 Il(e,t,r){Rt(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&nr(t,e.length-(r+1))}function $i(e,t,r,n,o,i){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(i+1)*8}${s}`:a=`>= -(2${s} ** ${(i+1)*8-1}${s}) and < 2 ** ${(i+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Mt.ERR_OUT_OF_RANGE("value",a,e)}Il(n,o,i)}function Rt(e,t){if(typeof e!="number")throw new Mt.ERR_INVALID_ARG_TYPE(t,"number",e)}function nr(e,t,r){throw Math.floor(e)!==e?(Rt(e,r),new Mt.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Mt.ERR_BUFFER_OUT_OF_BOUNDS:new Mt.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var kl=/[^+/0-9A-Za-z-_]/g;function Dl(e){if(e=e.split("=")[0],e=e.trim().replace(kl,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Zn(e,t){t=t||1/0;let r,n=e.length,o=null,i=[];for(let s=0;s55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function _l(e){let t=[];for(let r=0;r>8,o=r%256,i.push(o),i.push(n);return i}function qi(e){return Hn.toByteArray(Dl(e))}function Ur(e,t,r,n){let o;for(o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function ke(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function to(e){return e!==e}var Ll=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function Ze(e){return typeof BigInt>"u"?Bl:e}function Bl(){throw new Error("BigInt not supported")}});var x,d=Br(()=>{"use strict";x=ve(Vi())});var go=Z(j=>{"use strict";d();p();f();var W=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Yi=W((e,t)=>{"use strict";t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var i=42;r[n]=i;for(n in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var s=Object.getOwnPropertySymbols(r);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(r,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(r,n);if(a.value!==i||a.enumerable!==!0)return!1}return!0}}),Qr=W((e,t)=>{"use strict";var r=Yi();t.exports=function(){return r()&&!!Symbol.toStringTag}}),jl=W((e,t)=>{"use strict";var r=typeof Symbol<"u"&&Symbol,n=Yi();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}),Ul=W((e,t)=>{"use strict";var r={foo:{}},n=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof n)}}),$l=W((e,t)=>{"use strict";var r="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,o=Object.prototype.toString,i="[object Function]";t.exports=function(s){var a=this;if(typeof a!="function"||o.call(a)!==i)throw new TypeError(r+a);for(var u=n.call(arguments,1),l,c=function(){if(this instanceof l){var b=a.apply(this,u.concat(n.call(arguments)));return Object(b)===b?b:this}else return a.apply(s,u.concat(n.call(arguments)))},m=Math.max(0,a.length-u.length),g=[],w=0;w{"use strict";var r=$l();t.exports=h.prototype.bind||r}),ql=W((e,t)=>{"use strict";var r=lo();t.exports=r.call(h.call,Object.prototype.hasOwnProperty)}),co=W((e,t)=>{"use strict";var r,n=SyntaxError,o=h,i=TypeError,s=function($){try{return o('"use strict"; return ('+$+").constructor;")()}catch(U){}},a=Object.getOwnPropertyDescriptor;if(a)try{a({},"")}catch($){a=null}var u=function(){throw new i},l=a?function(){try{return arguments.callee,u}catch($){try{return a(arguments,"callee").get}catch(U){return u}}}():u,c=jl()(),m=Ul()(),g=Object.getPrototypeOf||(m?function($){return $.__proto__}:null),w={},E=typeof Uint8Array>"u"||!g?r:g(Uint8Array),b={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":c&&g?g([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":w,"%AsyncGenerator%":w,"%AsyncGeneratorFunction%":w,"%AsyncIteratorPrototype%":w,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":void 0,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":w,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c&&g?g(g([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!c||!g?r:g(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!c||!g?r:g(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c&&g?g(""[Symbol.iterator]()):r,"%Symbol%":c?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":l,"%TypedArray%":E,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(g)try{null.error}catch($){T=g(g($)),b["%Error.prototype%"]=T}var T,S=function $(U){var O;if(U==="%AsyncFunction%")O=s("async function () {}");else if(U==="%GeneratorFunction%")O=s("function* () {}");else if(U==="%AsyncGeneratorFunction%")O=s("async function* () {}");else if(U==="%AsyncGenerator%"){var ie=$("%AsyncGeneratorFunction%");ie&&(O=ie.prototype)}else if(U==="%AsyncIteratorPrototype%"){var se=$("%AsyncGenerator%");se&&g&&(O=g(se.prototype))}return b[U]=O,O},R={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=lo(),M=ql(),N=C.call(h.call,Array.prototype.concat),L=C.call(h.apply,Array.prototype.splice),Te=C.call(h.call,String.prototype.replace),V=C.call(h.call,String.prototype.slice),H=C.call(h.call,RegExp.prototype.exec),Ee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,z=/\\(\\)?/g,Pe=function($){var U=V($,0,1),O=V($,-1);if(U==="%"&&O!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(O==="%"&&U!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var ie=[];return Te($,Ee,function(se,He,Y,pt){ie[ie.length]=Y?Te(pt,z,"$1"):He||se}),ie},We=function($,U){var O=$,ie;if(M(R,O)&&(ie=R[O],O="%"+ie[0]+"%"),M(b,O)){var se=b[O];if(se===w&&(se=S(O)),typeof se>"u"&&!U)throw new i("intrinsic "+$+" exists, but is not available. Please file an issue!");return{alias:ie,name:O,value:se}}throw new n("intrinsic "+$+" does not exist!")};t.exports=function($,U){if(typeof $!="string"||$.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof U!="boolean")throw new i('"allowMissing" argument must be a boolean');if(H(/^%?[^%]*%?$/,$)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var O=Pe($),ie=O.length>0?O[0]:"",se=We("%"+ie+"%",U),He=se.name,Y=se.value,pt=!1,ze=se.alias;ze&&(ie=ze[0],L(O,N([0,1],ze)));for(var ft=1,qe=!0;ft=O.length){var Ct=a(Y,de);qe=!!Ct,qe&&"get"in Ct&&!("originalValue"in Ct.get)?Y=Ct.get:Y=Y[de]}else qe=M(Y,de),Y=Y[de];qe&&!pt&&(b[He]=Y)}}return Y}}),Vl=W((e,t)=>{"use strict";var r=lo(),n=co(),o=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||r.call(i,o),a=n("%Object.getOwnPropertyDescriptor%",!0),u=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(u)try{u({},"a",{value:1})}catch(m){u=null}t.exports=function(m){var g=s(r,i,arguments);if(a&&u){var w=a(g,"length");w.configurable&&u(g,"length",{value:1+l(0,m.length-(arguments.length-1))})}return g};var c=function(){return s(r,o,arguments)};u?u(t.exports,"apply",{value:c}):t.exports.apply=c}),po=W((e,t)=>{"use strict";var r=co(),n=Vl(),o=n(r("String.prototype.indexOf"));t.exports=function(i,s){var a=r(i,!!s);return typeof a=="function"&&o(i,".prototype.")>-1?n(a):a}}),Kl=W((e,t)=>{"use strict";var r=Qr()(),n=po(),o=n("Object.prototype.toString"),i=function(u){return r&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:o(u)==="[object Arguments]"},s=function(u){return i(u)?!0:u!==null&&typeof u=="object"&&typeof u.length=="number"&&u.length>=0&&o(u)!=="[object Array]"&&o(u.callee)==="[object Function]"},a=function(){return i(arguments)}();i.isLegacyArguments=s,t.exports=a?i:s}),Gl=W((e,t)=>{"use strict";var r=Object.prototype.toString,n=h.prototype.toString,o=/^\s*(?:function)?\*/,i=Qr()(),s=Object.getPrototypeOf,a=function(){if(!i)return!1;try{return h("return function*() {}")()}catch(l){}},u;t.exports=function(l){if(typeof l!="function")return!1;if(o.test(n.call(l)))return!0;if(!i){var c=r.call(l);return c==="[object GeneratorFunction]"}if(!s)return!1;if(typeof u>"u"){var m=a();u=m?s(m):!1}return s(l)===u}}),Jl=W((e,t)=>{"use strict";var r=h.prototype.toString,n=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,o,i;if(typeof n=="function"&&typeof Object.defineProperty=="function")try{o=Object.defineProperty({},"length",{get:function(){throw i}}),i={},n(function(){throw 42},null,o)}catch(M){M!==i&&(n=null)}else n=null;var s=/^\s*class\b/,a=function(M){try{var N=r.call(M);return s.test(N)}catch(L){return!1}},u=function(M){try{return a(M)?!1:(r.call(M),!0)}catch(N){return!1}},l=Object.prototype.toString,c="[object Object]",m="[object Function]",g="[object GeneratorFunction]",w="[object HTMLAllCollection]",E="[object HTML document.all class]",b="[object HTMLCollection]",T=typeof Symbol=="function"&&!!Symbol.toStringTag,S=!(0 in[,]),R=function(){return!1};typeof document=="object"&&(C=document.all,l.call(C)===l.call(document.all)&&(R=function(M){if((S||!M)&&(typeof M>"u"||typeof M=="object"))try{var N=l.call(M);return(N===w||N===E||N===b||N===c)&&M("")==null}catch(L){}return!1}));var C;t.exports=n?function(M){if(R(M))return!0;if(!M||typeof M!="function"&&typeof M!="object")return!1;try{n(M,null,o)}catch(N){if(N!==i)return!1}return!a(M)&&u(M)}:function(M){if(R(M))return!0;if(!M||typeof M!="function"&&typeof M!="object")return!1;if(T)return u(M);if(a(M))return!1;var N=l.call(M);return N!==m&&N!==g&&!/^\[object HTML/.test(N)?!1:u(M)}}),Xi=W((e,t)=>{"use strict";var r=Jl(),n=Object.prototype.toString,o=Object.prototype.hasOwnProperty,i=function(l,c,m){for(var g=0,w=l.length;g=3&&(g=m),n.call(l)==="[object Array]"?i(l,c,g):typeof l=="string"?s(l,c,g):a(l,c,g)};t.exports=u}),es=W((e,t)=>{"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],n=typeof globalThis>"u"?global:globalThis;t.exports=function(){for(var o=[],i=0;i{"use strict";var r=co(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(o){n=null}t.exports=n}),rs=W((e,t)=>{"use strict";var r=Xi(),n=es(),o=po(),i=o("Object.prototype.toString"),s=Qr()(),a=ts(),u=typeof globalThis>"u"?global:globalThis,l=n(),c=o("Array.prototype.indexOf",!0)||function(b,T){for(var S=0;S-1}return a?E(b):!1}}),Ql=W((e,t)=>{"use strict";var r=Xi(),n=es(),o=po(),i=ts(),s=o("Object.prototype.toString"),a=Qr()(),u=typeof globalThis>"u"?global:globalThis,l=n(),c=o("String.prototype.slice"),m={},g=Object.getPrototypeOf;a&&i&&g&&r(l,function(b){if(typeof u[b]=="function"){var T=new u[b];if(Symbol.toStringTag in T){var S=g(T),R=i(S,Symbol.toStringTag);if(!R){var C=g(S);R=i(C,Symbol.toStringTag)}m[b]=R.get}}});var w=function(b){var T=!1;return r(m,function(S,R){if(!T)try{var C=S.call(b);C===R&&(T=C)}catch(M){}}),T},E=rs();t.exports=function(b){return E(b)?!a||!(Symbol.toStringTag in b)?c(s(b),8,-1):w(b):!1}}),Wl=W(e=>{"use strict";var t=Kl(),r=Gl(),n=Ql(),o=rs();function i(A){return A.call.bind(A)}var s=typeof BigInt<"u",a=typeof Symbol<"u",u=i(Object.prototype.toString),l=i(Number.prototype.valueOf),c=i(String.prototype.valueOf),m=i(Boolean.prototype.valueOf);s&&(g=i(BigInt.prototype.valueOf));var g;a&&(w=i(Symbol.prototype.valueOf));var w;function E(A,ol){if(typeof A!="object")return!1;try{return ol(A),!0}catch(Hd){return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=o;function b(A){return typeof Promise<"u"&&A instanceof Promise||A!==null&&typeof A=="object"&&typeof A.then=="function"&&typeof A.catch=="function"}e.isPromise=b;function T(A){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(A):o(A)||ft(A)}e.isArrayBufferView=T;function S(A){return n(A)==="Uint8Array"}e.isUint8Array=S;function R(A){return n(A)==="Uint8ClampedArray"}e.isUint8ClampedArray=R;function C(A){return n(A)==="Uint16Array"}e.isUint16Array=C;function M(A){return n(A)==="Uint32Array"}e.isUint32Array=M;function N(A){return n(A)==="Int8Array"}e.isInt8Array=N;function L(A){return n(A)==="Int16Array"}e.isInt16Array=L;function Te(A){return n(A)==="Int32Array"}e.isInt32Array=Te;function V(A){return n(A)==="Float32Array"}e.isFloat32Array=V;function H(A){return n(A)==="Float64Array"}e.isFloat64Array=H;function Ee(A){return n(A)==="BigInt64Array"}e.isBigInt64Array=Ee;function z(A){return n(A)==="BigUint64Array"}e.isBigUint64Array=z;function Pe(A){return u(A)==="[object Map]"}Pe.working=typeof Map<"u"&&Pe(new Map);function We(A){return typeof Map>"u"?!1:Pe.working?Pe(A):A instanceof Map}e.isMap=We;function $(A){return u(A)==="[object Set]"}$.working=typeof Set<"u"&&$(new Set);function U(A){return typeof Set>"u"?!1:$.working?$(A):A instanceof Set}e.isSet=U;function O(A){return u(A)==="[object WeakMap]"}O.working=typeof WeakMap<"u"&&O(new WeakMap);function ie(A){return typeof WeakMap>"u"?!1:O.working?O(A):A instanceof WeakMap}e.isWeakMap=ie;function se(A){return u(A)==="[object WeakSet]"}se.working=typeof WeakSet<"u"&&se(new WeakSet);function He(A){return se(A)}e.isWeakSet=He;function Y(A){return u(A)==="[object ArrayBuffer]"}Y.working=typeof ArrayBuffer<"u"&&Y(new ArrayBuffer);function pt(A){return typeof ArrayBuffer>"u"?!1:Y.working?Y(A):A instanceof ArrayBuffer}e.isArrayBuffer=pt;function ze(A){return u(A)==="[object DataView]"}ze.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&ze(new DataView(new ArrayBuffer(1),0,1));function ft(A){return typeof DataView>"u"?!1:ze.working?ze(A):A instanceof DataView}e.isDataView=ft;var qe=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function de(A){return u(A)==="[object SharedArrayBuffer]"}function dt(A){return typeof qe>"u"?!1:(typeof de.working>"u"&&(de.working=de(new qe)),de.working?de(A):A instanceof qe)}e.isSharedArrayBuffer=dt;function Tt(A){return u(A)==="[object AsyncFunction]"}e.isAsyncFunction=Tt;function Ct(A){return u(A)==="[object Map Iterator]"}e.isMapIterator=Ct;function Xu(A){return u(A)==="[object Set Iterator]"}e.isSetIterator=Xu;function el(A){return u(A)==="[object Generator]"}e.isGeneratorObject=el;function tl(A){return u(A)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=tl;function xi(A){return E(A,l)}e.isNumberObject=xi;function bi(A){return E(A,c)}e.isStringObject=bi;function wi(A){return E(A,m)}e.isBooleanObject=wi;function Ei(A){return s&&E(A,g)}e.isBigIntObject=Ei;function Pi(A){return a&&E(A,w)}e.isSymbolObject=Pi;function rl(A){return xi(A)||bi(A)||wi(A)||Ei(A)||Pi(A)}e.isBoxedPrimitive=rl;function nl(A){return typeof Uint8Array<"u"&&(pt(A)||dt(A))}e.isAnyArrayBuffer=nl,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(A){Object.defineProperty(e,A,{enumerable:!1,value:function(){throw new Error(A+" is not supported in userland")}})})}),Hl=W((e,t)=>{t.exports=function(r){return r instanceof x.Buffer}}),zl=W((e,t)=>{typeof Object.create=="function"?t.exports=function(r,n){n&&(r.super_=n,r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(r,n){if(n){r.super_=n;var o=function(){};o.prototype=n.prototype,r.prototype=new o,r.prototype.constructor=r}}}),ns=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=o)return u;switch(u){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return u}}),s=n[r];r"u")return function(){return j.deprecate(e,t).apply(this,arguments)};var r=!1;function n(){if(!r){if(y.throwDeprecation)throw new Error(t);y.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}return n};var qr={},os=/^$/;y.env.NODE_DEBUG&&(Vr=y.env.NODE_DEBUG,Vr=Vr.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),os=new RegExp("^"+Vr+"$","i"));var Vr;j.debuglog=function(e){if(e=e.toUpperCase(),!qr[e])if(os.test(e)){var t=y.pid;qr[e]=function(){var r=j.format.apply(j,arguments);console.error("%s %d: %s",e,t,r)}}else qr[e]=function(){};return qr[e]};function Xe(e,t){var r={seen:[],stylize:Xl};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),fo(t)?r.showHidden=t:t&&j._extend(r,t),yt(r.showHidden)&&(r.showHidden=!1),yt(r.depth)&&(r.depth=2),yt(r.colors)&&(r.colors=!1),yt(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Yl),Gr(r,e,r.depth)}j.inspect=Xe;Xe.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};Xe.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Yl(e,t){var r=Xe.styles[t];return r?"\x1B["+Xe.colors[r][0]+"m"+e+"\x1B["+Xe.colors[r][1]+"m":e}function Xl(e,t){return e}function ec(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function Gr(e,t,r){if(e.customInspect&&t&&Kr(t.inspect)&&t.inspect!==j.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return Hr(n)||(n=Gr(e,n,r)),n}var o=tc(e,t);if(o)return o;var i=Object.keys(t),s=ec(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),ir(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return so(t);if(i.length===0){if(Kr(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(or(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Jr(t))return e.stylize(Date.prototype.toString.call(t),"date");if(ir(t))return so(t)}var u="",l=!1,c=["{","}"];if(is(t)&&(l=!0,c=["[","]"]),Kr(t)){var m=t.name?": "+t.name:"";u=" [Function"+m+"]"}if(or(t)&&(u=" "+RegExp.prototype.toString.call(t)),Jr(t)&&(u=" "+Date.prototype.toUTCString.call(t)),ir(t)&&(u=" "+so(t)),i.length===0&&(!l||t.length==0))return c[0]+u+c[1];if(r<0)return or(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var g;return l?g=rc(e,t,r,s,i):g=i.map(function(w){return uo(e,t,r,s,w,l)}),e.seen.pop(),nc(g,u,c)}function tc(e,t){if(yt(t))return e.stylize("undefined","undefined");if(Hr(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(ss(t))return e.stylize(""+t,"number");if(fo(t))return e.stylize(""+t,"boolean");if(Wr(t))return e.stylize("null","null")}function so(e){return"["+Error.prototype.toString.call(e)+"]"}function rc(e,t,r,n,o){for(var i=[],s=0,a=t.length;s-1&&(i?a=a.split(` -`).map(function(l){return" "+l}).join(` -`).slice(2):a=` -`+a.split(` -`).map(function(l){return" "+l}).join(` -`))):a=e.stylize("[Circular]","special")),yt(s)){if(i&&o.match(/^\d+$/))return a;s=JSON.stringify(""+o),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.slice(1,-1),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function nc(e,t,r){var n=0,o=e.reduce(function(i,s){return n++,s.indexOf(` -`)>=0&&n++,i+s.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?r[0]+(t===""?"":t+` - `)+" "+e.join(`, - `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}j.types=Wl();function is(e){return Array.isArray(e)}j.isArray=is;function fo(e){return typeof e=="boolean"}j.isBoolean=fo;function Wr(e){return e===null}j.isNull=Wr;function oc(e){return e==null}j.isNullOrUndefined=oc;function ss(e){return typeof e=="number"}j.isNumber=ss;function Hr(e){return typeof e=="string"}j.isString=Hr;function ic(e){return typeof e=="symbol"}j.isSymbol=ic;function yt(e){return e===void 0}j.isUndefined=yt;function or(e){return Ft(e)&&mo(e)==="[object RegExp]"}j.isRegExp=or;j.types.isRegExp=or;function Ft(e){return typeof e=="object"&&e!==null}j.isObject=Ft;function Jr(e){return Ft(e)&&mo(e)==="[object Date]"}j.isDate=Jr;j.types.isDate=Jr;function ir(e){return Ft(e)&&(mo(e)==="[object Error]"||e instanceof Error)}j.isError=ir;j.types.isNativeError=ir;function Kr(e){return typeof e=="function"}j.isFunction=Kr;function sc(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}j.isPrimitive=sc;j.isBuffer=Hl();function mo(e){return Object.prototype.toString.call(e)}function ao(e){return e<10?"0"+e.toString(10):e.toString(10)}var ac=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function uc(){var e=new Date,t=[ao(e.getHours()),ao(e.getMinutes()),ao(e.getSeconds())].join(":");return[e.getDate(),ac[e.getMonth()],t].join(" ")}j.log=function(){console.log("%s - %s",uc(),j.format.apply(j,arguments))};j.inherits=zl();j._extend=function(e,t){if(!t||!Ft(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function as(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var gt=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;j.promisify=function(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');if(gt&&e[gt]){var t=e[gt];if(typeof t!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,gt,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var r,n,o=new Promise(function(a,u){r=a,n=u}),i=[],s=0;s{"use strict";d();p();f();var It=1e3,kt=It*60,Dt=kt*60,ht=Dt*24,pc=ht*7,fc=ht*365.25;us.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return dc(e);if(r==="number"&&isFinite(e))return t.long?gc(e):mc(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function dc(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*fc;case"weeks":case"week":case"w":return r*pc;case"days":case"day":case"d":return r*ht;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Dt;case"minutes":case"minute":case"mins":case"min":case"m":return r*kt;case"seconds":case"second":case"secs":case"sec":case"s":return r*It;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function mc(e){var t=Math.abs(e);return t>=ht?Math.round(e/ht)+"d":t>=Dt?Math.round(e/Dt)+"h":t>=kt?Math.round(e/kt)+"m":t>=It?Math.round(e/It)+"s":e+"ms"}function gc(e){var t=Math.abs(e);return t>=ht?zr(e,t,ht,"day"):t>=Dt?zr(e,t,Dt,"hour"):t>=kt?zr(e,t,kt,"minute"):t>=It?zr(e,t,It,"second"):e+" ms"}function zr(e,t,r,n){var o=t>=r*1.5;return Math.round(e/r)+" "+n+(o?"s":"")}});var yo=Z((ug,cs)=>{"use strict";d();p();f();function yc(e){r.debug=r,r.default=r,r.coerce=u,r.disable=i,r.enable=o,r.enabled=s,r.humanize=ls(),r.destroy=l,Object.keys(e).forEach(c=>{r[c]=e[c]}),r.names=[],r.skips=[],r.formatters={};function t(c){let m=0;for(let g=0;g{if(L==="%%")return"%";M++;let V=r.formatters[Te];if(typeof V=="function"){let H=T[M];L=V.call(S,H),T.splice(M,1),M--}return L}),r.formatArgs.call(S,T),(S.log||r.log).apply(S,T)}return b.namespace=c,b.useColors=r.useColors(),b.color=r.selectColor(c),b.extend=n,b.destroy=r.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(w!==r.namespaces&&(w=r.namespaces,E=r.enabled(c)),E),set:T=>{g=T}}),typeof r.init=="function"&&r.init(b),b}function n(c,m){let g=r(this.namespace+(typeof m=="undefined"?":":m)+c);return g.log=this.log,g}function o(c){r.save(c),r.namespaces=c,r.names=[],r.skips=[];let m,g=(typeof c=="string"?c:"").split(/[\s,]+/),w=g.length;for(m=0;m"-"+m)].join(",");return r.enable(""),c}function s(c){if(c[c.length-1]==="*")return!0;let m,g;for(m=0,g=r.skips.length;m{"use strict";d();p();f();Ae.formatArgs=xc;Ae.save=bc;Ae.load=wc;Ae.useColors=hc;Ae.storage=Ec();Ae.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ae.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function hc(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function xc(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Zr.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),e.splice(n,0,t)}Ae.log=console.debug||console.log||(()=>{});function bc(e){try{e?Ae.storage.setItem("debug",e):Ae.storage.removeItem("debug")}catch(t){}}function wc(){let e;try{e=Ae.storage.getItem("debug")}catch(t){}return!e&&typeof y!="undefined"&&"env"in y&&(e=y.env.DEBUG),e}function Ec(){try{return localStorage}catch(e){}}Zr.exports=yo()(Ae);var{formatters:Pc}=Zr.exports;Pc.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var ho=Z(Yr=>{"use strict";d();p();f();Yr.isatty=function(){return!1};function vc(){throw new Error("tty.ReadStream is not implemented")}Yr.ReadStream=vc;function Ac(){throw new Error("tty.WriteStream is not implemented")}Yr.WriteStream=Ac});var fs=Z(()=>{"use strict";d();p();f()});var ms=Z((Ag,ds)=>{"use strict";d();p();f();ds.exports=(e,t=y.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return n!==-1&&(o===-1||n{"use strict";d();p();f();var Tc=fs(),gs=ho(),Me=ms(),{env:te}=y,et;Me("no-color")||Me("no-colors")||Me("color=false")||Me("color=never")?et=0:(Me("color")||Me("colors")||Me("color=true")||Me("color=always"))&&(et=1);"FORCE_COLOR"in te&&(te.FORCE_COLOR==="true"?et=1:te.FORCE_COLOR==="false"?et=0:et=te.FORCE_COLOR.length===0?1:Math.min(parseInt(te.FORCE_COLOR,10),3));function xo(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function bo(e,t){if(et===0)return 0;if(Me("color=16m")||Me("color=full")||Me("color=truecolor"))return 3;if(Me("color=256"))return 2;if(e&&!t&&et===void 0)return 0;let r=et||0;if(te.TERM==="dumb")return r;if(y.platform==="win32"){let n=Tc.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in te)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in te)||te.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in te)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(te.TEAMCITY_VERSION)?1:0;if(te.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in te){let n=parseInt((te.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(te.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(te.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(te.TERM)||"COLORTERM"in te?1:r}function Cc(e){let t=bo(e,e&&e.isTTY);return xo(t)}ys.exports={supportsColor:Cc,stdout:xo(bo(!0,gs.isatty(1))),stderr:xo(bo(!0,gs.isatty(2)))}});var bs=Z((ae,en)=>{"use strict";d();p();f();var Mc=ho(),Xr=go();ae.init=Dc;ae.log=Fc;ae.formatArgs=Rc;ae.save=Ic;ae.load=kc;ae.useColors=Sc;ae.destroy=Xr.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ae.colors=[6,2,3,4,5,1];try{let e=hs();e&&(e.stderr||e).level>=2&&(ae.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}ae.inspectOpts=Object.keys(y.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),n=y.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function Sc(){return"colors"in ae.inspectOpts?!!ae.inspectOpts.colors:Mc.isatty(y.stderr.fd)}function Rc(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),i=` ${o};1m${t} \x1B[0m`;e[0]=i+e[0].split(` -`).join(` -`+i),e.push(o+"m+"+en.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Oc()+t+" "+e[0]}function Oc(){return ae.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Fc(...e){return y.stderr.write(Xr.format(...e)+` -`)}function Ic(e){e?y.env.DEBUG=e:delete y.env.DEBUG}function kc(){return y.env.DEBUG}function Dc(e){e.inspectOpts={};let t=Object.keys(ae.inspectOpts);for(let r=0;rt.trim()).join(" ")};xs.O=function(e){return this.inspectOpts.colors=this.useColors,Xr.inspect(e,this.inspectOpts)}});var Eo=Z((_g,wo)=>{"use strict";d();p();f();typeof y=="undefined"||y.type==="renderer"||y.browser===!0||y.__nwjs?wo.exports=ps():wo.exports=bs()});function Bc(){return!1}var jc,Uc,un,Ao=Br(()=>{"use strict";d();p();f();jc={},Uc={existsSync:Bc,promises:jc},un=Uc});var To=Z((Py,Rs)=>{"use strict";d();p();f();function De(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function Ss(e,t){for(var r="",n=0,o=-1,i=0,s,a=0;a<=e.length;++a){if(a2){var u=r.lastIndexOf("/");if(u!==r.length-1){u===-1?(r="",n=0):(r=r.slice(0,u),n=r.length-1-r.lastIndexOf("/")),o=a,i=0;continue}}else if(r.length===2||r.length===1){r="",n=0,o=a,i=0;continue}}t&&(r.length>0?r+="/..":r="..",n=2)}else r.length>0?r+="/"+e.slice(o+1,a):r=e.slice(o+1,a),n=a-o-1;o=a,i=0}else s===46&&i!==-1?++i:i=-1}return r}function $c(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+e+n:n}var Lt={resolve:function(){for(var e="",t=!1,r,n=arguments.length-1;n>=-1&&!t;n--){var o;n>=0?o=arguments[n]:(r===void 0&&(r=y.cwd()),o=r),De(o),o.length!==0&&(e=o+"/"+e,t=o.charCodeAt(0)===47)}return e=Ss(e,!t),t?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(De(e),e.length===0)return".";var t=e.charCodeAt(0)===47,r=e.charCodeAt(e.length-1)===47;return e=Ss(e,!t),e.length===0&&!t&&(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return De(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t0&&(e===void 0?e=r:e+="/"+r)}return e===void 0?".":Lt.normalize(e)},relative:function(e,t){if(De(e),De(t),e===t||(e=Lt.resolve(e),t=Lt.resolve(t),e===t))return"";for(var r=1;ru){if(t.charCodeAt(i+c)===47)return t.slice(i+c+1);if(c===0)return t.slice(i+c)}else o>u&&(e.charCodeAt(r+c)===47?l=c:c===0&&(l=0));break}var m=e.charCodeAt(r+c),g=t.charCodeAt(i+c);if(m!==g)break;m===47&&(l=c)}var w="";for(c=r+l+1;c<=n;++c)(c===n||e.charCodeAt(c)===47)&&(w.length===0?w+="..":w+="/..");return w.length>0?w+t.slice(i+l):(i+=l,t.charCodeAt(i)===47&&++i,t.slice(i))},_makeLong:function(e){return e},dirname:function(e){if(De(e),e.length===0)return".";for(var t=e.charCodeAt(0),r=t===47,n=-1,o=!0,i=e.length-1;i>=1;--i)if(t=e.charCodeAt(i),t===47){if(!o){n=i;break}}else o=!1;return n===-1?r?"/":".":r&&n===1?"//":e.slice(0,n)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');De(e);var r=0,n=-1,o=!0,i;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){var u=e.charCodeAt(i);if(u===47){if(!o){r=i+1;break}}else a===-1&&(o=!1,a=i+1),s>=0&&(u===t.charCodeAt(s)?--s===-1&&(n=i):(s=-1,n=a))}return r===n?n=a:n===-1&&(n=e.length),e.slice(r,n)}else{for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===47){if(!o){r=i+1;break}}else n===-1&&(o=!1,n=i+1);return n===-1?"":e.slice(r,n)}},extname:function(e){De(e);for(var t=-1,r=0,n=-1,o=!0,i=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(a===47){if(!o){r=s+1;break}continue}n===-1&&(o=!1,n=s+1),a===46?t===-1?t=s:i!==1&&(i=1):t!==-1&&(i=-1)}return t===-1||n===-1||i===0||i===1&&t===n-1&&t===r+1?"":e.slice(t,n)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return $c("/",e)},parse:function(e){De(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var r=e.charCodeAt(0),n=r===47,o;n?(t.root="/",o=1):o=0;for(var i=-1,s=0,a=-1,u=!0,l=e.length-1,c=0;l>=o;--l){if(r=e.charCodeAt(l),r===47){if(!u){s=l+1;break}continue}a===-1&&(u=!1,a=l+1),r===46?i===-1?i=l:c!==1&&(c=1):i!==-1&&(c=-1)}return i===-1||a===-1||c===0||c===1&&i===a-1&&i===s+1?a!==-1&&(s===0&&n?t.base=t.name=e.slice(1,a):t.base=t.name=e.slice(s,a)):(s===0&&n?(t.name=e.slice(1,i),t.base=e.slice(1,a)):(t.name=e.slice(s,i),t.base=e.slice(s,a)),t.ext=e.slice(i,a)),s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};Lt.posix=Lt;Rs.exports=Lt});var Is=Z((Oy,Fs)=>{"use strict";d();p();f();Fs.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Ds=Z((Dy,ks)=>{"use strict";d();p();f();var Vc=Is();ks.exports=e=>{let t=Vc(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var Ns=Z((qy,So)=>{"use strict";d();p();f();var Kc=Object.prototype.hasOwnProperty,me="~";function ar(){}Object.create&&(ar.prototype=Object.create(null),new ar().__proto__||(me=!1));function Gc(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function _s(e,t,r,n,o){if(typeof r!="function")throw new TypeError("The listener must be a function");var i=new Gc(r,n||e,o),s=me?me+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],i]:e._events[s].push(i):(e._events[s]=i,e._eventsCount++),e}function ln(e,t){--e._eventsCount===0?e._events=new ar:delete e._events[t]}function le(){this._events=new ar,this._eventsCount=0}le.prototype.eventNames=function(){var e=[],t,r;if(this._eventsCount===0)return e;for(r in t=this._events)Kc.call(t,r)&&e.push(me?r.slice(1):r);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e};le.prototype.listeners=function(e){var t=me?me+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,o=r.length,i=new Array(o);n{"use strict";d();p();f();Ls.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 $s=Z((eh,Us)=>{"use strict";d();p();f();Us.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 Vs=Z((oh,qs)=>{"use strict";d();p();f();var zc=$s();qs.exports=e=>typeof e=="string"?e.replace(zc(),""):e});var Ws=Z(()=>{"use strict";d();p();f()});var ui=Z((AM,uu)=>{"use strict";d();p();f();uu.exports=function(){function e(t,r,n,o,i){return tn?n+1:t+1:o===i?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 o=t.length,i=r.length;o>0&&t.charCodeAt(o-1)===r.charCodeAt(i-1);)o--,i--;for(var s=0;sCe,DMMFClass:()=>$r,Debug:()=>Po,Decimal:()=>je,Extensions:()=>ro,MetricsClient:()=>Ut,NotFoundError:()=>Ke,ObjectEnumValue:()=>_e,PrismaClientInitializationError:()=>re,PrismaClientKnownRequestError:()=>ce,PrismaClientRustPanicError:()=>Ge,PrismaClientUnknownRequestError:()=>Se,PrismaClientValidationError:()=>pe,Public:()=>no,Sql:()=>xe,Types:()=>oo,defineDmmfProperty:()=>Js,empty:()=>zs,getPrismaClient:()=>zu,itxClientDenyList:()=>gi,join:()=>Hs,makeStrictEnum:()=>Zu,objectEnumNames:()=>Yc,objectEnumValues:()=>pn,raw:()=>No,sqltag:()=>Lo,warnEnvConflicts:()=>void 0,warnOnce:()=>lr});module.exports=pl(Wd);d();p();f();var ro={};rr(ro,{defineExtension:()=>Ki,getExtensionContext:()=>Gi});d();p();f();d();p();f();function Ki(e){return typeof e=="function"?e:t=>t.$extends(e)}d();p();f();function Gi(e){return e}var no={};rr(no,{validator:()=>Ji});d();p();f();d();p();f();function Ji(...e){return t=>t}var oo={};rr(oo,{Extensions:()=>Qi,Public:()=>Wi,Result:()=>Hi,Utils:()=>zi});d();p();f();var Qi={};d();p();f();var Wi={};d();p();f();var Hi={};d();p();f();var zi={};d();p();f();d();p();f();d();p();f();var Ye=(e,t)=>{let r={};for(let n of e){let o=n[t];r[o]=n}return r};function Zi(e){return e.substring(0,1).toLowerCase()+e.substring(1)}var $r=class{constructor(t){this.document=t;this.compositeNames=new Set(this.datamodel.types.map(r=>r.name)),this.typeAndModelMap=this.buildTypeModelMap(),this.mappingsMap=this.buildMappingsMap(),this.outputTypeMap=this.buildMergedOutputTypeMap(),this.rootFieldMap=this.buildRootFieldMap(),this.inputTypesByName=this.buildInputTypesMap()}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(t){return this.compositeNames.has(t)}getOtherOperationNames(){return[Object.values(this.mappings.otherOperations.write),Object.values(this.mappings.otherOperations.read)].flat()}hasEnumInNamespace(t,r){var n;return((n=this.schema.enumTypes[r])==null?void 0:n.find(o=>o.name===t))!==void 0}resolveInputObjectType(t){return this.inputTypesByName.get(io(t.type,t.namespace))}resolveOutputObjectType(t){var r;if(t.location==="outputObjectTypes")return this.outputObjectTypes[(r=t.namespace)!=null?r:"prisma"].find(n=>n.name===t.type)}buildModelMap(){return Ye(this.datamodel.models,"name")}buildTypeMap(){return Ye(this.datamodel.types,"name")}buildTypeModelMap(){return{...this.buildTypeMap(),...this.buildModelMap()}}buildMappingsMap(){return Ye(this.mappings.modelOperations,"model")}buildMergedOutputTypeMap(){return{model:Ye(this.schema.outputObjectTypes.model,"name"),prisma:Ye(this.schema.outputObjectTypes.prisma,"name")}}buildRootFieldMap(){return{...Ye(this.outputTypeMap.prisma.Query.fields,"name"),...Ye(this.outputTypeMap.prisma.Mutation.fields,"name")}}buildInputTypesMap(){let t=new Map;for(let r of this.inputObjectTypes.prisma)t.set(io(r.name,"prisma"),r);if(!this.inputObjectTypes.model)return t;for(let r of this.inputObjectTypes.model)t.set(io(r.name,"model"),r);return t}};function io(e,t){return t?`${t}.${e}`:e}d();p();f();d();p();f();var Ce;(t=>{let e;(C=>(C.findUnique="findUnique",C.findUniqueOrThrow="findUniqueOrThrow",C.findFirst="findFirst",C.findFirstOrThrow="findFirstOrThrow",C.findMany="findMany",C.create="create",C.createMany="createMany",C.update="update",C.updateMany="updateMany",C.upsert="upsert",C.delete="delete",C.deleteMany="deleteMany",C.groupBy="groupBy",C.count="count",C.aggregate="aggregate",C.findRaw="findRaw",C.aggregateRaw="aggregateRaw"))(e=t.ModelAction||(t.ModelAction={}))})(Ce||(Ce={}));d();p();f();var rn=ve(Eo()),_c=100,tn=[],ws,Es;typeof y!="undefined"&&typeof((ws=y.stderr)==null?void 0:ws.write)!="function"&&(rn.default.log=(Es=console.debug)!=null?Es:console.log);function Nc(e){let t=(0,rn.default)(e),r=Object.assign((...n)=>(t.log=r.log,n.length!==0&&tn.push([e,...n]),tn.length>_c&&tn.shift(),t("",...n)),t);return r}var Po=Object.assign(Nc,rn.default);function Ps(){tn.length=0}var he=Po;d();p();f();var vo,vs,As,Ts,Cs=!0;typeof y!="undefined"&&({FORCE_COLOR:vo,NODE_DISABLE_COLORS:vs,NO_COLOR:As,TERM:Ts}=y.env||{},Cs=y.stdout&&y.stdout.isTTY);var Lc={enabled:!vs&&As==null&&Ts!=="dumb"&&(vo!=null&&vo!=="0"||Cs)};function G(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,o=`\x1B[${t}m`;return function(i){return!Lc.enabled||i==null?i:n+(~(""+i).indexOf(o)?i.replace(r,o+n):i)+o}}var Vg=G(0,0),tt=G(1,22),nn=G(2,22),Kg=G(3,23),Ms=G(4,24),Gg=G(7,27),Jg=G(8,28),Qg=G(9,29),Wg=G(30,39),_t=G(31,39),on=G(32,39),sn=G(33,39),Nt=G(34,39),Hg=G(35,39),rt=G(36,39),zg=G(37,39),an=G(90,39),Zg=G(90,39),Yg=G(40,49),Xg=G(41,49),ey=G(42,49),ty=G(43,49),ry=G(44,49),ny=G(45,49),oy=G(46,49),iy=G(47,49);d();p();f();d();p();f();d();p();f();d();p();f();var Os="library";function Co(e){let t=qc();return t||((e==null?void 0:e.config.engineType)==="library"?"library":(e==null?void 0:e.config.engineType)==="binary"?"binary":Os)}function qc(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}d();p();f();var sr=ve(To());function Mo(e){return sr.default.sep===sr.default.posix.sep?e:e.split(sr.default.sep).join(sr.default.posix.sep)}var Bt={};rr(Bt,{error:()=>Wc,info:()=>Qc,log:()=>Jc,query:()=>Hc,should:()=>js,tags:()=>ur,warn:()=>Ro});d();p();f();var ur={error:_t("prisma:error"),warn:sn("prisma:warn"),info:rt("prisma:info"),query:Nt("prisma:query")},js={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Jc(...e){console.log(...e)}function Ro(e,...t){js.warn()&&console.warn(`${ur.warn} ${e}`,...t)}function Qc(e,...t){console.info(`${ur.info} ${e}`,...t)}function Wc(e,...t){console.error(`${ur.error} ${e}`,...t)}function Hc(e,...t){console.log(`${ur.query} ${e}`,...t)}d();p();f();function xt(e,t){throw new Error(t)}d();p();f();function Oo(e,t){return Object.prototype.hasOwnProperty.call(e,t)}d();p();f();var Fo=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});d();p();f();function jt(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}d();p();f();function Io(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Ks.has(e)||(Ks.add(e),Ro(t,...r))};d();p();f();var ce=class extends Error{constructor(r,{code:n,clientVersion:o,meta:i,batchRequestIdx:s}){super(r);this.name="PrismaClientKnownRequestError",this.code=n,this.clientVersion=o,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:s,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};k(ce,"PrismaClientKnownRequestError");var Ke=class extends ce{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};k(Ke,"NotFoundError");d();p();f();var re=class e extends Error{constructor(r,n,o){super(r);this.name="PrismaClientInitializationError",this.clientVersion=n,this.errorCode=o,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};k(re,"PrismaClientInitializationError");d();p();f();var Ge=class extends Error{constructor(r,n){super(r);this.name="PrismaClientRustPanicError",this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};k(Ge,"PrismaClientRustPanicError");d();p();f();var Se=class extends Error{constructor(r,{clientVersion:n,batchRequestIdx:o}){super(r);this.name="PrismaClientUnknownRequestError",this.clientVersion=n,Object.defineProperty(this,"batchRequestIdx",{value:o,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};k(Se,"PrismaClientUnknownRequestError");d();p();f();var pe=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};k(pe,"PrismaClientValidationError");d();p();f();var Ut=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};d();p();f();d();p();f();function cr(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Js(e,t){let r=cr(()=>Zc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Zc(e){return{datamodel:{models:ko(e.models),enums:ko(e.enums),types:ko(e.types)}}}function ko(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}d();p();f();var Yc=["JsonNullValueInput","NullableJsonNullValueInput","JsonNullValueFilter"],cn=Symbol(),Do=new WeakMap,_e=class{constructor(t){t===cn?Do.set(this,`Prisma.${this._getName()}`):Do.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Do.get(this)}},pr=class extends _e{_getNamespace(){return"NullTypes"}},fr=class extends pr{};_o(fr,"DbNull");var dr=class extends pr{};_o(dr,"JsonNull");var mr=class extends pr{};_o(mr,"AnyNull");var pn={classes:{DbNull:fr,JsonNull:dr,AnyNull:mr},instances:{DbNull:new fr(cn),JsonNull:new dr(cn),AnyNull:new mr(cn)}};function _o(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}d();p();f();d();p();f();var rp=ve(Eo(),1);function fn(e){return{ok:!1,error:e,map(){return fn(e)},flatMap(){return fn(e)}}}var Xc=class{constructor(){Ai(this,"registeredErrors",[])}consumeError(e){return this.registeredErrors[e]}registerNewError(e){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:e},t}},Qs=e=>{let t=new Xc,r=nt(t,e.startTransaction.bind(e));return{errorRegistry:t,queryRaw:nt(t,e.queryRaw.bind(e)),executeRaw:nt(t,e.executeRaw.bind(e)),flavour:e.flavour,startTransaction:async(...n)=>(await r(...n)).map(i=>ep(t,i)),close:nt(t,e.close.bind(e))}},ep=(e,t)=>({flavour:t.flavour,options:t.options,queryRaw:nt(e,t.queryRaw.bind(t)),executeRaw:nt(e,t.executeRaw.bind(t)),commit:nt(e,t.commit.bind(t)),rollback:nt(e,t.rollback.bind(t)),dispose:tp(e,t.dispose.bind(t))});function nt(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let o=e.registerNewError(n);return fn({kind:"GenericJsError",id:o})}}}function tp(e,t){return(...r)=>{try{return t(...r)}catch(n){let o=e.registerNewError(n);return fn({kind:"GenericJsError",id:o})}}}var O2=ve(Ws()),Hu=ve(Ns());Ao();var Lr=ve(To());d();p();f();var xe=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 o=0,i=0;for(;oe.getPropertyValue(r))},getPropertyDescriptor(r){var n;return(n=e.getPropertyDescriptor)==null?void 0:n.call(e,r)}}}d();p();f();var Xs=ve(go());d();p();f();var dn={enumerable:!0,configurable:!0,writable:!0};function mn(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>dn,has:(r,n)=>t.has(n),set:(r,n,o)=>t.add(n)&&Reflect.set(r,n,o),ownKeys:()=>[...t]}}var Zs=Symbol.for("nodejs.util.inspect.custom");function Le(e,t){let r=np(t),n=new Set,o=new Proxy(e,{get(i,s){if(n.has(s))return i[s];let a=r.get(s);return a?a.getPropertyValue(s):i[s]},has(i,s){var u,l;if(n.has(s))return!0;let a=r.get(s);return a?(l=(u=a.has)==null?void 0:u.call(a,s))!=null?l:!0:Reflect.has(i,s)},ownKeys(i){let s=Ys(Reflect.ownKeys(i),r),a=Ys(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(i,s,a){var l,c;let u=r.get(s);return((c=(l=u==null?void 0:u.getPropertyDescriptor)==null?void 0:l.call(u,s))==null?void 0:c.writable)===!1?!1:(n.add(s),Reflect.set(i,s,a))},getOwnPropertyDescriptor(i,s){let a=Reflect.getOwnPropertyDescriptor(i,s);if(a&&!a.configurable)return a;let u=r.get(s);return u?u.getPropertyDescriptor?{...dn,...u==null?void 0:u.getPropertyDescriptor(s)}:dn:a},defineProperty(i,s,a){return n.add(s),Reflect.defineProperty(i,s,a)}});return o[Zs]=function(i,s,a=Xs.inspect){let u={...this};return delete u[Zs],a(u,s)},o}function np(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let o of n)t.set(o,r)}return t}function Ys(e,t){return e.filter(r=>{var o,i;let n=t.get(r);return(i=(o=n==null?void 0:n.has)==null?void 0:o.call(n,r))!=null?i:!0})}d();p();f();function yr(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}d();p();f();d();p();f();var $t=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){let n=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}};d();p();f();d();p();f();function qt(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function gn(e){return e.toString()!=="Invalid Date"}d();p();f();d();p();f();var Vt=9e15,at=1e9,Bo="0123456789abcdef",hn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",xn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",jo={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Vt,maxE:Vt,crypto:!1},na,Je,D=!0,wn="[DecimalError] ",st=wn+"Invalid argument: ",oa=wn+"Precision limit exceeded",ia=wn+"crypto unavailable",sa="[object Decimal]",fe=Math.floor,X=Math.pow,op=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,ip=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,sp=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,aa=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Oe=1e7,I=7,ap=9007199254740991,up=hn.length-1,Uo=xn.length-1,v={toStringTag:sa};v.absoluteValue=v.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),F(e)};v.ceil=function(){return F(new this.constructor(this),this.e+1,2)};v.clampedTo=v.clamp=function(e,t){var r,n=this,o=n.constructor;if(e=new o(e),t=new o(t),!e.s||!t.s)return new o(NaN);if(e.gt(t))throw Error(st+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new o(n)};v.comparedTo=v.cmp=function(e){var t,r,n,o,i=this,s=i.d,a=(e=new i.constructor(e)).d,u=i.s,l=e.s;if(!s||!a)return!u||!l?NaN:u!==l?u:s===a?0:!s^u<0?1:-1;if(!s[0]||!a[0])return s[0]?u:a[0]?-l:0;if(u!==l)return u;if(i.e!==e.e)return i.e>e.e^u<0?1:-1;for(n=s.length,o=a.length,t=0,r=na[t]^u<0?1:-1;return n===o?0:n>o^u<0?1:-1};v.cosine=v.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=lp(n,fa(n,r)),n.precision=e,n.rounding=t,F(Je==2||Je==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};v.cubeRoot=v.cbrt=function(){var e,t,r,n,o,i,s,a,u,l,c=this,m=c.constructor;if(!c.isFinite()||c.isZero())return new m(c);for(D=!1,i=c.s*X(c.s*c,1/3),!i||Math.abs(i)==1/0?(r=ue(c.d),e=c.e,(i=(e-r.length+1)%3)&&(r+=i==1||i==-2?"0":"00"),i=X(r,1/3),e=fe((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?r="5e"+e:(r=i.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new m(r),n.s=c.s):n=new m(i.toString()),s=(e=m.precision)+3;;)if(a=n,u=a.times(a).times(a),l=u.plus(c),n=K(l.plus(c).times(a),l.plus(u),s+2,1),ue(a.d).slice(0,s)===(r=ue(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!o&&r=="4999"){if(!o&&(F(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}s+=4,o=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(F(n,e+1,1),t=!n.times(n).times(n).eq(c));break}return D=!0,F(n,e,m.rounding,t)};v.decimalPlaces=v.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-fe(this.e/I))*I,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};v.dividedBy=v.div=function(e){return K(this,new this.constructor(e))};v.dividedToIntegerBy=v.divToInt=function(e){var t=this,r=t.constructor;return F(K(t,new r(e),0,1,1),r.precision,r.rounding)};v.equals=v.eq=function(e){return this.cmp(e)===0};v.floor=function(){return F(new this.constructor(this),this.e+1,3)};v.greaterThan=v.gt=function(e){return this.cmp(e)>0};v.greaterThanOrEqualTo=v.gte=function(e){var t=this.cmp(e);return t==1||t===0};v.hyperbolicCosine=v.cosh=function(){var e,t,r,n,o,i=this,s=i.constructor,a=new s(1);if(!i.isFinite())return new s(i.s?1/0:NaN);if(i.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(i.e,i.sd())+4,s.rounding=1,o=i.d.length,o<32?(e=Math.ceil(o/3),t=(1/Pn(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),i=Kt(s,1,i.times(t),new s(1),!0);for(var u,l=e,c=new s(8);l--;)u=i.times(i),i=a.minus(u.times(c.minus(u.times(c))));return F(i,s.precision=r,s.rounding=n,!0)};v.hyperbolicSine=v.sinh=function(){var e,t,r,n,o=this,i=o.constructor;if(!o.isFinite()||o.isZero())return new i(o);if(t=i.precision,r=i.rounding,i.precision=t+Math.max(o.e,o.sd())+4,i.rounding=1,n=o.d.length,n<3)o=Kt(i,2,o,o,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,o=o.times(1/Pn(5,e)),o=Kt(i,2,o,o,!0);for(var s,a=new i(5),u=new i(16),l=new i(20);e--;)s=o.times(o),o=o.times(a.plus(s.times(u.times(s).plus(l))))}return i.precision=t,i.rounding=r,F(o,t,r,!0)};v.hyperbolicTangent=v.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,K(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};v.inverseCosine=v.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),o=r.precision,i=r.rounding;return n!==-1?n===0?t.isNeg()?Re(r,o,i):new r(0):new r(NaN):t.isZero()?Re(r,o+4,i).times(.5):(r.precision=o+6,r.rounding=1,t=t.asin(),e=Re(r,o+4,i).times(.5),r.precision=o,r.rounding=i,e.minus(t))};v.inverseHyperbolicCosine=v.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,D=!1,r=r.times(r).minus(1).sqrt().plus(r),D=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};v.inverseHyperbolicSine=v.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,D=!1,r=r.times(r).plus(1).sqrt().plus(r),D=!0,n.precision=e,n.rounding=t,r.ln())};v.inverseHyperbolicTangent=v.atanh=function(){var e,t,r,n,o=this,i=o.constructor;return o.isFinite()?o.e>=0?new i(o.abs().eq(1)?o.s/0:o.isZero()?o:NaN):(e=i.precision,t=i.rounding,n=o.sd(),Math.max(n,e)<2*-o.e-1?F(new i(o),e,t,!0):(i.precision=r=n-o.e,o=K(o.plus(1),new i(1).minus(o),r+e,1),i.precision=e+4,i.rounding=1,o=o.ln(),i.precision=e,i.rounding=t,o.times(.5))):new i(NaN)};v.inverseSine=v.asin=function(){var e,t,r,n,o=this,i=o.constructor;return o.isZero()?new i(o):(t=o.abs().cmp(1),r=i.precision,n=i.rounding,t!==-1?t===0?(e=Re(i,r+4,n).times(.5),e.s=o.s,e):new i(NaN):(i.precision=r+6,i.rounding=1,o=o.div(new i(1).minus(o.times(o)).sqrt().plus(1)).atan(),i.precision=r,i.rounding=n,o.times(2)))};v.inverseTangent=v.atan=function(){var e,t,r,n,o,i,s,a,u,l=this,c=l.constructor,m=c.precision,g=c.rounding;if(l.isFinite()){if(l.isZero())return new c(l);if(l.abs().eq(1)&&m+4<=Uo)return s=Re(c,m+4,g).times(.25),s.s=l.s,s}else{if(!l.s)return new c(NaN);if(m+4<=Uo)return s=Re(c,m+4,g).times(.5),s.s=l.s,s}for(c.precision=a=m+10,c.rounding=1,r=Math.min(28,a/I+2|0),e=r;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(D=!1,t=Math.ceil(a/I),n=1,u=l.times(l),s=new c(l),o=l;e!==-1;)if(o=o.times(u),i=s.minus(o.div(n+=2)),o=o.times(u),s=i.plus(o.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===i.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};v.isNaN=function(){return!this.s};v.isNegative=v.isNeg=function(){return this.s<0};v.isPositive=v.isPos=function(){return this.s>0};v.isZero=function(){return!!this.d&&this.d[0]===0};v.lessThan=v.lt=function(e){return this.cmp(e)<0};v.lessThanOrEqualTo=v.lte=function(e){return this.cmp(e)<1};v.logarithm=v.log=function(e){var t,r,n,o,i,s,a,u,l=this,c=l.constructor,m=c.precision,g=c.rounding,w=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=l.d,l.s<0||!r||!r[0]||l.eq(1))return new c(r&&!r[0]?-1/0:l.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)i=!0;else{for(o=r[0];o%10===0;)o/=10;i=o!==1}if(D=!1,a=m+w,s=it(l,a),n=t?bn(c,a+10):it(e,a),u=K(s,n,a,1),hr(u.d,o=m,g))do if(a+=10,s=it(l,a),n=t?bn(c,a+10):it(e,a),u=K(s,n,a,1),!i){+ue(u.d).slice(o+1,o+15)+1==1e14&&(u=F(u,m+1,0));break}while(hr(u.d,o+=10,g));return D=!0,F(u,m,g)};v.minus=v.sub=function(e){var t,r,n,o,i,s,a,u,l,c,m,g,w=this,E=w.constructor;if(e=new E(e),!w.d||!e.d)return!w.s||!e.s?e=new E(NaN):w.d?e.s=-e.s:e=new E(e.d||w.s!==e.s?w:NaN),e;if(w.s!=e.s)return e.s=-e.s,w.plus(e);if(l=w.d,g=e.d,a=E.precision,u=E.rounding,!l[0]||!g[0]){if(g[0])e.s=-e.s;else if(l[0])e=new E(w);else return new E(u===3?-0:0);return D?F(e,a,u):e}if(r=fe(e.e/I),c=fe(w.e/I),l=l.slice(),i=c-r,i){for(m=i<0,m?(t=l,i=-i,s=g.length):(t=g,r=c,s=l.length),n=Math.max(Math.ceil(a/I),s)+2,i>n&&(i=n,t.length=1),t.reverse(),n=i;n--;)t.push(0);t.reverse()}else{for(n=l.length,s=g.length,m=n0;--n)l[s++]=0;for(n=g.length;n>i;){if(l[--n]s?i+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=l.length,o=c.length,s-o<0&&(o=s,r=c,c=l,l=r),t=0;o;)t=(l[--o]=l[o]+c[o]+t)/Oe|0,l[o]%=Oe;for(t&&(l.unshift(t),++n),s=l.length;l[--s]==0;)l.pop();return e.d=l,e.e=En(l,n),D?F(e,a,u):e};v.precision=v.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(st+e);return r.d?(t=ua(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};v.round=function(){var e=this,t=e.constructor;return F(new t(e),e.e+1,t.rounding)};v.sine=v.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=pp(n,fa(n,r)),n.precision=e,n.rounding=t,F(Je>2?r.neg():r,e,t,!0)):new n(NaN)};v.squareRoot=v.sqrt=function(){var e,t,r,n,o,i,s=this,a=s.d,u=s.e,l=s.s,c=s.constructor;if(l!==1||!a||!a[0])return new c(!l||l<0&&(!a||a[0])?NaN:a?s:1/0);for(D=!1,l=Math.sqrt(+s),l==0||l==1/0?(t=ue(a),(t.length+u)%2==0&&(t+="0"),l=Math.sqrt(t),u=fe((u+1)/2)-(u<0||u%2),l==1/0?t="5e"+u:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),n=new c(t)):n=new c(l.toString()),r=(u=c.precision)+3;;)if(i=n,n=i.plus(K(s,i,r+2,1)).times(.5),ue(i.d).slice(0,r)===(t=ue(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!o&&t=="4999"){if(!o&&(F(i,u+1,0),i.times(i).eq(s))){n=i;break}r+=4,o=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(F(n,u+1,1),e=!n.times(n).eq(s));break}return D=!0,F(n,u,c.rounding,e)};v.tangent=v.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=K(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,F(Je==2||Je==4?r.neg():r,e,t,!0)):new n(NaN)};v.times=v.mul=function(e){var t,r,n,o,i,s,a,u,l,c=this,m=c.constructor,g=c.d,w=(e=new m(e)).d;if(e.s*=c.s,!g||!g[0]||!w||!w[0])return new m(!e.s||g&&!g[0]&&!w||w&&!w[0]&&!g?NaN:!g||!w?e.s/0:e.s*0);for(r=fe(c.e/I)+fe(e.e/I),u=g.length,l=w.length,u=0;){for(t=0,o=u+n;o>n;)a=i[o]+w[n]*g[o-n-1]+t,i[o--]=a%Oe|0,t=a/Oe|0;i[o]=(i[o]+t)%Oe|0}for(;!i[--s];)i.pop();return t?++r:i.shift(),e.d=i,e.e=En(i,r),D?F(e,m.precision,m.rounding):e};v.toBinary=function(e,t){return Vo(this,2,e,t)};v.toDecimalPlaces=v.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(be(e,0,at),t===void 0?t=n.rounding:be(t,0,8),F(r,e+r.e+1,t))};v.toExponential=function(e,t){var r,n=this,o=n.constructor;return e===void 0?r=Be(n,!0):(be(e,0,at),t===void 0?t=o.rounding:be(t,0,8),n=F(new o(n),e+1,t),r=Be(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};v.toFixed=function(e,t){var r,n,o=this,i=o.constructor;return e===void 0?r=Be(o):(be(e,0,at),t===void 0?t=i.rounding:be(t,0,8),n=F(new i(o),e+o.e+1,t),r=Be(n,!1,e+n.e+1)),o.isNeg()&&!o.isZero()?"-"+r:r};v.toFraction=function(e){var t,r,n,o,i,s,a,u,l,c,m,g,w=this,E=w.d,b=w.constructor;if(!E)return new b(w);if(l=r=new b(1),n=u=new b(0),t=new b(n),i=t.e=ua(E)-w.e-1,s=i%I,t.d[0]=X(10,s<0?I+s:s),e==null)e=i>0?t:l;else{if(a=new b(e),!a.isInt()||a.lt(l))throw Error(st+a);e=a.gt(t)?i>0?t:l:a}for(D=!1,a=new b(ue(E)),c=b.precision,b.precision=i=E.length*I*2;m=K(a,t,0,1,1),o=r.plus(m.times(n)),o.cmp(e)!=1;)r=n,n=o,o=l,l=u.plus(m.times(o)),u=o,o=t,t=a.minus(m.times(o)),a=o;return o=K(e.minus(r),n,0,1,1),u=u.plus(o.times(l)),r=r.plus(o.times(n)),u.s=l.s=w.s,g=K(l,n,i,1).minus(w).abs().cmp(K(u,r,i,1).minus(w).abs())<1?[l,n]:[u,r],b.precision=c,D=!0,g};v.toHexadecimal=v.toHex=function(e,t){return Vo(this,16,e,t)};v.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:be(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]?(D=!1,r=K(r,e,0,t,1).times(e),D=!0,F(r)):(e.s=r.s,r=e),r};v.toNumber=function(){return+this};v.toOctal=function(e,t){return Vo(this,8,e,t)};v.toPower=v.pow=function(e){var t,r,n,o,i,s,a=this,u=a.constructor,l=+(e=new u(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new u(X(+a,l));if(a=new u(a),a.eq(1))return a;if(n=u.precision,i=u.rounding,e.eq(1))return F(a,n,i);if(t=fe(e.e/I),t>=e.d.length-1&&(r=l<0?-l:l)<=ap)return o=la(u,a,r,n),e.s<0?new u(1).div(o):F(o,n,i);if(s=a.s,s<0){if(tu.maxE+1||t0?s/0:0):(D=!1,u.rounding=a.s=1,r=Math.min(12,(t+"").length),o=$o(e.times(it(a,n+r)),n),o.d&&(o=F(o,n+5,1),hr(o.d,n,i)&&(t=n+10,o=F($o(e.times(it(a,t+r)),t),t+5,1),+ue(o.d).slice(n+1,n+15)+1==1e14&&(o=F(o,n+1,0)))),o.s=s,D=!0,u.rounding=i,F(o,n,i))};v.toPrecision=function(e,t){var r,n=this,o=n.constructor;return e===void 0?r=Be(n,n.e<=o.toExpNeg||n.e>=o.toExpPos):(be(e,1,at),t===void 0?t=o.rounding:be(t,0,8),n=F(new o(n),e,t),r=Be(n,e<=n.e||n.e<=o.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};v.toSignificantDigits=v.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(be(e,1,at),t===void 0?t=n.rounding:be(t,0,8)),F(new n(r),e,t)};v.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};v.truncated=v.trunc=function(){return F(new this.constructor(this),this.e+1,1)};v.valueOf=v.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 ue(e){var t,r,n,o=e.length-1,i="",s=e[0];if(o>0){for(i+=s,t=1;tr)throw Error(st+e)}function hr(e,t,r,n){var o,i,s,a;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=I,o=0):(o=Math.ceil((t+1)/I),t%=I),i=X(10,I-t),a=e[o]%i|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==i||r>3&&a+1==i/2)&&(e[o+1]/i/100|0)==X(10,t-2)-1||(a==i/2||a==0)&&(e[o+1]/i/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==i||!n&&r>3&&a+1==i/2)&&(e[o+1]/i/1e3|0)==X(10,t-3)-1,s}function yn(e,t,r){for(var n,o=[0],i,s=0,a=e.length;sr-1&&(o[n+1]===void 0&&(o[n+1]=0),o[n+1]+=o[n]/r|0,o[n]%=r)}return o.reverse()}function lp(e,t){var r,n,o;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),o=(1/Pn(4,r)).toString()):(r=16,o="2.3283064365386962890625e-10"),e.precision+=r,t=Kt(e,1,t.times(o),new e(1));for(var i=r;i--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var K=function(){function e(n,o,i){var s,a=0,u=n.length;for(n=n.slice();u--;)s=n[u]*o+a,n[u]=s%i|0,a=s/i|0;return a&&n.unshift(a),n}function t(n,o,i,s){var a,u;if(i!=s)u=i>s?1:-1;else for(a=u=0;ao[a]?1:-1;break}return u}function r(n,o,i,s){for(var a=0;i--;)n[i]-=a,a=n[i]1;)n.shift()}return function(n,o,i,s,a,u){var l,c,m,g,w,E,b,T,S,R,C,M,N,L,Te,V,H,Ee,z,Pe,We=n.constructor,$=n.s==o.s?1:-1,U=n.d,O=o.d;if(!U||!U[0]||!O||!O[0])return new We(!n.s||!o.s||(U?O&&U[0]==O[0]:!O)?NaN:U&&U[0]==0||!O?$*0:$/0);for(u?(w=1,c=n.e-o.e):(u=Oe,w=I,c=fe(n.e/w)-fe(o.e/w)),z=O.length,H=U.length,S=new We($),R=S.d=[],m=0;O[m]==(U[m]||0);m++);if(O[m]>(U[m]||0)&&c--,i==null?(L=i=We.precision,s=We.rounding):a?L=i+(n.e-o.e)+1:L=i,L<0)R.push(1),E=!0;else{if(L=L/w+2|0,m=0,z==1){for(g=0,O=O[0],L++;(m1&&(O=e(O,g,u),U=e(U,g,u),z=O.length,H=U.length),V=z,C=U.slice(0,z),M=C.length;M=u/2&&++Ee;do g=0,l=t(O,C,z,M),l<0?(N=C[0],z!=M&&(N=N*u+(C[1]||0)),g=N/Ee|0,g>1?(g>=u&&(g=u-1),b=e(O,g,u),T=b.length,M=C.length,l=t(b,C,T,M),l==1&&(g--,r(b,z=10;g/=10)m++;S.e=m+c*w-1,F(S,a?i+S.e+1:i,s,E)}return S}}();function F(e,t,r,n){var o,i,s,a,u,l,c,m,g,w=e.constructor;e:if(t!=null){if(m=e.d,!m)return e;for(o=1,a=m[0];a>=10;a/=10)o++;if(i=t-o,i<0)i+=I,s=t,c=m[g=0],u=c/X(10,o-s-1)%10|0;else if(g=Math.ceil((i+1)/I),a=m.length,g>=a)if(n){for(;a++<=g;)m.push(0);c=u=0,o=1,i%=I,s=i-I+1}else break e;else{for(c=a=m[g],o=1;a>=10;a/=10)o++;i%=I,s=i-I+o,u=s<0?0:c/X(10,o-s-1)%10|0}if(n=n||t<0||m[g+1]!==void 0||(s<0?c:c%X(10,o-s-1)),l=r<4?(u||n)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||n||r==6&&(i>0?s>0?c/X(10,o-s):0:m[g-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,l?(t-=e.e+1,m[0]=X(10,(I-t%I)%I),e.e=-t||0):m[0]=e.e=0,e;if(i==0?(m.length=g,a=1,g--):(m.length=g+1,a=X(10,I-i),m[g]=s>0?(c/X(10,o-s)%X(10,s)|0)*a:0),l)for(;;)if(g==0){for(i=1,s=m[0];s>=10;s/=10)i++;for(s=m[0]+=a,a=1;s>=10;s/=10)a++;i!=a&&(e.e++,m[0]==Oe&&(m[0]=1));break}else{if(m[g]+=a,m[g]!=Oe)break;m[g--]=0,a=1}for(i=m.length;m[--i]===0;)m.pop()}return D&&(e.e>w.maxE?(e.d=null,e.e=NaN):e.e0?i=i.charAt(0)+"."+i.slice(1)+ot(n):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):o<0?(i="0."+ot(-o-1)+i,r&&(n=r-s)>0&&(i+=ot(n))):o>=s?(i+=ot(o+1-s),r&&(n=r-o-1)>0&&(i=i+"."+ot(n))):((n=o+1)0&&(o+1===s&&(i+="."),i+=ot(n))),i}function En(e,t){var r=e[0];for(t*=I;r>=10;r/=10)t++;return t}function bn(e,t,r){if(t>up)throw D=!0,r&&(e.precision=r),Error(oa);return F(new e(hn),t,1,!0)}function Re(e,t,r){if(t>Uo)throw Error(oa);return F(new e(xn),t,r,!0)}function ua(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 ot(e){for(var t="";e--;)t+="0";return t}function la(e,t,r,n){var o,i=new e(1),s=Math.ceil(n/I+4);for(D=!1;;){if(r%2&&(i=i.times(t),ta(i.d,s)&&(o=!0)),r=fe(r/2),r===0){r=i.d.length-1,o&&i.d[r]===0&&++i.d[r];break}t=t.times(t),ta(t.d,s)}return D=!0,i}function ea(e){return e.d[e.d.length-1]&1}function ca(e,t,r){for(var n,o=new e(t[0]),i=0;++i17)return new g(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:0/0);for(t==null?(D=!1,u=E):u=t,a=new g(.03125);e.e>-2;)e=e.times(a),m+=5;for(n=Math.log(X(2,m))/Math.LN10*2+5|0,u+=n,r=i=s=new g(1),g.precision=u;;){if(i=F(i.times(e),u,1),r=r.times(++c),a=s.plus(K(i,r,u,1)),ue(a.d).slice(0,u)===ue(s.d).slice(0,u)){for(o=m;o--;)s=F(s.times(s),u,1);if(t==null)if(l<3&&hr(s.d,u-n,w,l))g.precision=u+=10,r=i=a=new g(1),c=0,l++;else return F(s,g.precision=E,w,D=!0);else return g.precision=E,s}s=a}}function it(e,t){var r,n,o,i,s,a,u,l,c,m,g,w=1,E=10,b=e,T=b.d,S=b.constructor,R=S.rounding,C=S.precision;if(b.s<0||!T||!T[0]||!b.e&&T[0]==1&&T.length==1)return new S(T&&!T[0]?-1/0:b.s!=1?NaN:T?0:b);if(t==null?(D=!1,c=C):c=t,S.precision=c+=E,r=ue(T),n=r.charAt(0),Math.abs(i=b.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=ue(b.d),n=r.charAt(0),w++;i=b.e,n>1?(b=new S("0."+r),i++):b=new S(n+"."+r.slice(1))}else return l=bn(S,c+2,C).times(i+""),b=it(new S(n+"."+r.slice(1)),c-E).plus(l),S.precision=C,t==null?F(b,C,R,D=!0):b;for(m=b,u=s=b=K(b.minus(1),b.plus(1),c,1),g=F(b.times(b),c,1),o=3;;){if(s=F(s.times(g),c,1),l=u.plus(K(s,new S(o),c,1)),ue(l.d).slice(0,c)===ue(u.d).slice(0,c))if(u=u.times(2),i!==0&&(u=u.plus(bn(S,c+2,C).times(i+""))),u=K(u,new S(w),c,1),t==null)if(hr(u.d,c-E,R,a))S.precision=c+=E,l=s=b=K(m.minus(1),m.plus(1),c,1),g=F(b.times(b),c,1),o=a=1;else return F(u,S.precision=C,R,D=!0);else return S.precision=C,u;u=l,o+=2}}function pa(e){return String(e.s*e.s/0)}function qo(e,t){var r,n,o;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(o=t.length;t.charCodeAt(o-1)===48;--o);if(t=t.slice(n,o),t){if(o-=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"),aa.test(t))return qo(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(ip.test(t))r=16,t=t.toLowerCase();else if(op.test(t))r=2;else if(sp.test(t))r=8;else throw Error(st+t);for(i=t.search(/p/i),i>0?(u=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),i=t.indexOf("."),s=i>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,i=a-i,o=la(n,new n(r),i,i*2)),l=yn(t,r,Oe),c=l.length-1,i=c;l[i]===0;--i)l.pop();return i<0?new n(e.s*0):(e.e=En(l,c),e.d=l,D=!1,s&&(e=K(e,o,a*4)),u&&(e=e.times(Math.abs(u)<54?X(2,u):wt.pow(2,u))),D=!0,e)}function pp(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:Kt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Pn(5,r)),t=Kt(e,2,t,t);for(var o,i=new e(5),s=new e(16),a=new e(20);r--;)o=t.times(t),t=t.times(i.plus(o.times(s.times(o).minus(a))));return t}function Kt(e,t,r,n,o){var i,s,a,u,l=1,c=e.precision,m=Math.ceil(c/I);for(D=!1,u=r.times(r),a=new e(n);;){if(s=K(a.times(u),new e(t++*t++),c,1),a=o?n.plus(s):n.minus(s),n=K(s.times(u),new e(t++*t++),c,1),s=a.plus(n),s.d[m]!==void 0){for(i=m;s.d[i]===a.d[i]&&i--;);if(i==-1)break}i=a,a=n,n=s,s=i,l++}return D=!0,s.d.length=m+1,s}function Pn(e,t){for(var r=e;--t;)r*=e;return r}function fa(e,t){var r,n=t.s<0,o=Re(e,e.precision,1),i=o.times(.5);if(t=t.abs(),t.lte(i))return Je=n?4:1,t;if(r=t.divToInt(o),r.isZero())Je=n?3:2;else{if(t=t.minus(r.times(o)),t.lte(i))return Je=ea(r)?n?2:3:n?4:1,t;Je=ea(r)?n?1:4:n?3:2}return t.minus(o).abs()}function Vo(e,t,r,n){var o,i,s,a,u,l,c,m,g,w=e.constructor,E=r!==void 0;if(E?(be(r,1,at),n===void 0?n=w.rounding:be(n,0,8)):(r=w.precision,n=w.rounding),!e.isFinite())c=pa(e);else{for(c=Be(e),s=c.indexOf("."),E?(o=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):o=t,s>=0&&(c=c.replace(".",""),g=new w(1),g.e=c.length-s,g.d=yn(Be(g),10,o),g.e=g.d.length),m=yn(c,10,o),i=u=m.length;m[--u]==0;)m.pop();if(!m[0])c=E?"0p+0":"0";else{if(s<0?i--:(e=new w(e),e.d=m,e.e=i,e=K(e,g,r,n,0,o),m=e.d,i=e.e,l=na),s=m[r],a=o/2,l=l||m[r+1]!==void 0,l=n<4?(s!==void 0||l)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||l||n===6&&m[r-1]&1||n===(e.s<0?8:7)),m.length=r,l)for(;++m[--r]>o-1;)m[r]=0,r||(++i,m.unshift(1));for(u=m.length;!m[u-1];--u);for(s=0,c="";s1)if(t==16||t==8){for(s=t==16?4:3,--u;u%s;u++)c+="0";for(m=yn(c,o,t),u=m.length;!m[u-1];--u);for(s=1,c="1.";su)for(i-=u;i--;)c+="0";else it)return e.length=t,!0}function fp(e){return new this(e).abs()}function dp(e){return new this(e).acos()}function mp(e){return new this(e).acosh()}function gp(e,t){return new this(e).plus(t)}function yp(e){return new this(e).asin()}function hp(e){return new this(e).asinh()}function xp(e){return new this(e).atan()}function bp(e){return new this(e).atanh()}function wp(e,t){e=new this(e),t=new this(t);var r,n=this.precision,o=this.rounding,i=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=Re(this,i,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?Re(this,n,o):new this(0),r.s=e.s):!e.d||t.isZero()?(r=Re(this,i,1).times(.5),r.s=e.s):t.s<0?(this.precision=i,this.rounding=1,r=this.atan(K(e,t,i,1)),t=Re(this,i,1),this.precision=n,this.rounding=o,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(K(e,t,i,1)),r}function Ep(e){return new this(e).cbrt()}function Pp(e){return F(e=new this(e),e.e+1,2)}function vp(e,t,r){return new this(e).clamp(t,r)}function Ap(e){if(!e||typeof e!="object")throw Error(wn+"Object expected");var t,r,n,o=e.defaults===!0,i=["precision",1,at,"rounding",0,8,"toExpNeg",-Vt,0,"toExpPos",0,Vt,"maxE",0,Vt,"minE",-Vt,0,"modulo",0,9];for(t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(st+r+": "+n);if(r="crypto",o&&(this[r]=jo[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(ia);else this[r]=!1;else throw Error(st+r+": "+n);return this}function Tp(e){return new this(e).cos()}function Cp(e){return new this(e).cosh()}function da(e){var t,r,n;function o(i){var s,a,u,l=this;if(!(l instanceof o))return new o(i);if(l.constructor=o,ra(i)){l.s=i.s,D?!i.d||i.e>o.maxE?(l.e=NaN,l.d=null):i.e=10;a/=10)s++;D?s>o.maxE?(l.e=NaN,l.d=null):s=429e7?t[i]=crypto.getRandomValues(new Uint32Array(1))[0]:a[i++]=o%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);i=214e7?crypto.randomBytes(4).copy(t,i):(a.push(o%1e7),i+=4);i=n/4}else throw Error(ia);else for(;i=10;o/=10)n++;n`}};function Jt(e){return e instanceof xr}d();p();f();d();p();f();var vn=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};d();p();f();var An=e=>e,Tn={bold:An,red:An,green:An,dim:An,enabled:!1},ma={bold:tt,red:_t,green:on,dim:nn,enabled:!0},Qt={write(e){e.writeLine(",")}};d();p();f();var Ue=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)))})}};d();p();f();var ut=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Wt=class extends ut{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new vn(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 Ue("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Qt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}};d();p();f();var ga=": ",Cn=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()+ga.length}write(t){let r=new Ue(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(ga).write(this.value)}};d();p();f();var ne=class e extends ut{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,...o]=r,i=this.getField(n);if(!i)return;let s=i;for(let a of o){let u;if(s.value instanceof e?u=s.value.getField(a):s.value instanceof Wt&&(u=s.value.getField(Number(a))),!u)return;s=u}return s}getDeepFieldValue(r){var n;return r.length===0?this:(n=this.getDeepField(r))==null?void 0:n.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){var n;return(n=this.getField(r))==null?void 0:n.value}getDeepSubSelectionValue(r){let n=this;for(let o of r){if(!(n instanceof e))return;let i=n.getSubSelectionValue(o);if(!i)return;n=i}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let o=n;for(let i of r){let s=o.value.getFieldValue(i);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;o=a}return o}getSelectionParent(){let r=this.getField("select");if((r==null?void 0:r.value)instanceof e)return{kind:"select",value:r.value};let n=this.getField("include");if((n==null?void 0:n.value)instanceof e)return{kind:"include",value:n.value}}getSubSelectionValue(r){var n;return(n=this.getSelectionParent())==null?void 0:n.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(o=>o.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)}writeEmpty(r){let n=new Ue("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(Qt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};d();p();f();var oe=class extends ut{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Ue(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}};var Ko=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 Mn(e){return new Ko(ya(e))}function ya(e){let t=new ne;for(let[r,n]of Object.entries(e)){let o=new Cn(r,ha(n));t.addField(o)}return t}function ha(e){if(typeof e=="string")return new oe(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new oe(String(e));if(typeof e=="bigint")return new oe(`${e}n`);if(e===null)return new oe("null");if(e===void 0)return new oe("undefined");if(Gt(e))return new oe(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return x.Buffer.isBuffer(e)?new oe(`Buffer.alloc(${e.byteLength})`):new oe(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=gn(e)?e.toISOString():"Invalid Date";return new oe(`new Date("${t}")`)}return e instanceof _e?new oe(`Prisma.${e._getName()}`):Jt(e)?new oe(`prisma.${Zi(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Yp(e):typeof e=="object"?ya(e):new oe(Object.prototype.toString.call(e))}function Yp(e){let t=new Wt;for(let r of e)t.addItem(ha(r));return t}function xa(e){if(e===void 0)return"";let t=Mn(e);return new $t(0,{colors:Tn}).write(t).toString()}d();p();f();d();p();f();d();p();f();d();p();f();d();p();f();var br="";function ba(e){var t=e.split(` -`);return t.reduce(function(r,n){var o=tf(n)||nf(n)||af(n)||pf(n)||lf(n);return o&&r.push(o),r},[])}var Xp=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ef=/\((\S*)(?::(\d+))(?::(\d+))\)/;function tf(e){var t=Xp.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,o=ef.exec(t[2]);return n&&o!=null&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]),{file:r?null:t[2],methodName:t[1]||br,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var rf=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function nf(e){var t=rf.exec(e);return t?{file:t[2],methodName:t[1]||br,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var of=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,sf=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function af(e){var t=of.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=sf.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||br,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var uf=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function lf(e){var t=uf.exec(e);return t?{file:t[3],methodName:t[1]||br,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var cf=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function pf(e){var t=cf.exec(e);return t?{file:t[2],methodName:t[1]||br,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Go=class{getLocation(){return null}},Jo=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=ba(t).find(o=>{if(!o.file)return!1;let i=Mo(o.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/")&&!o.methodName.includes("new ")&&!o.methodName.includes("getCallSite")&&!o.methodName.includes("Proxy.")&&o.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function lt(e){return e==="minimal"?new Go:new Jo}d();p();f();d();p();f();d();p();f();var wa={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Ht(e={}){let t=df(e);return Object.entries(t).reduce((n,[o,i])=>(wa[o]!==void 0?n.select[o]={select:i}:n[o]=i,n),{select:{}})}function df(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:Ht})(e)}d();p();f();function mf(e={}){let{select:t,...r}=e;return typeof t=="object"?Ht({...r,_count:t}):Ht({...r,_count:{_all:!0}})}function gf(e={}){return typeof e.select=="object"?t=>Sn(e)(t)._count:t=>Sn(e)(t)._count._all}function Pa(e,t){return t({action:"count",unpacker:gf(e),argsMapper:mf})(e)}d();p();f();function yf(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 hf(e={}){return t=>(typeof(e==null?void 0:e._count)=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function va(e,t){return t({action:"groupBy",unpacker:hf(e),argsMapper:yf})(e)}function Aa(e,t,r){if(t==="aggregate")return n=>Ea(n,r);if(t==="count")return n=>Pa(n,r);if(t==="groupBy")return n=>va(n,r)}d();p();f();function Ta(e,t){let r=t.fields.filter(o=>!o.relationName),n=Fo(r,o=>o.name);return new Proxy({},{get(o,i){if(i in o||typeof i=="symbol")return o[i];let s=n[i];if(s)return new xr(e,i,s.type,s.isList,s.kind==="enum")},...mn(Object.keys(n))})}d();p();f();d();p();f();var Ca=e=>Array.isArray(e)?e:e.split("."),Qo=(e,t)=>Ca(t).reduce((r,n)=>r&&r[n],e),Ma=(e,t,r)=>Ca(t).reduceRight((n,o,i,s)=>Object.assign({},Qo(e,s.slice(0,i)),{[o]:n}),r);function xf(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function bf(e,t,r){return t===void 0?e!=null?e:{}:Ma(t,r,e||!0)}function Wo(e,t,r,n,o,i){let a=e._runtimeDataModel.models[t].fields.reduce((u,l)=>({...u,[l.name]:l}),{});return u=>{let l=lt(e._errorFormat),c=xf(n,o),m=bf(u,i,c),g=r({dataPath:c,callsite:l})(m),w=wf(e,t);return new Proxy(g,{get(E,b){if(!w.includes(b))return E[b];let S=[a[b].type,r,b],R=[c,m];return Wo(e,...S,...R)},...mn([...w,...Object.getOwnPropertyNames(g)])})}}function wf(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}d();p();f();d();p();f();var Ia=ve(Bs());d();p();f();Ao();d();p();f();d();p();f();d();p();f();var Sa={keyword:rt,entity:rt,value:e=>tt(Nt(e)),punctuation:Nt,directive:rt,function:rt,variable:e=>tt(Nt(e)),string:e=>tt(on(e)),boolean:sn,number:rt,comment:an};var Ef=e=>e,Rn={},Pf=0,_={manual:Rn.Prism&&Rn.Prism.manual,disableWorkerMessageHandler:Rn.Prism&&Rn.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof Fe){let t=e;return new Fe(t.type,_.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(_.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ee instanceof Fe)continue;if(N&&V!=t.length-1){R.lastIndex=H;var m=R.exec(e);if(!m)break;var c=m.index+(M?m[1].length:0),g=m.index+m[0].length,a=V,u=H;for(let O=t.length;a=u&&(++V,H=u);if(t[V]instanceof Fe)continue;l=a-V,Ee=e.slice(H,u),m.index-=H}else{R.lastIndex=0;var m=R.exec(Ee),l=1}if(!m){if(i)break;continue}M&&(L=m[1]?m[1].length:0);var c=m.index+L,m=m[0].slice(L),g=c+m.length,w=Ee.slice(0,c),E=Ee.slice(g);let z=[V,l];w&&(++V,H+=w.length,z.push(w));let Pe=new Fe(b,C?_.tokenize(m,C):m,Te,m,N);if(z.push(Pe),E&&z.push(E),Array.prototype.splice.apply(t,z),l!=1&&_.matchGrammar(e,t,r,V,H,!0,b),i)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let o in n)t[o]=n[o];delete t.rest}return _.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=_.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=_.hooks.all[e];if(!(!r||!r.length))for(var n=0,o;o=r[n++];)o(t)}},Token:Fe};_.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:/[{}[\];(),.:]/};_.languages.javascript=_.languages.extend("clike",{"class-name":[_.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}/});_.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;_.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:_.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:_.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:_.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:_.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});_.languages.markup&&_.languages.markup.tag.addInlined("script","javascript");_.languages.js=_.languages.javascript;_.languages.typescript=_.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/});_.languages.ts=_.languages.typescript;function Fe(e,t,r,n,o){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!o}Fe.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return Fe.stringify(r,t)}).join(""):vf(e.type)(e.content)};function vf(e){return Sa[e]||Ef}function Ra(e){return Af(e,_.languages.javascript)}function Af(e,t){return _.tokenize(e,t).map(n=>Fe.stringify(n)).join("")}d();p();f();var Oa=ve(Ds());function Fa(e){return(0,Oa.default)(e)}var On=class e{static read(t){let r;try{r=un.readFileSync(t,"utf-8")}catch(n){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,o=[...this.lines];return o[n]=r(o[n]),new e(this.firstLineNumber,o)}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,o)=>o===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` -`);return new e(t,Fa(n).split(` -`))}highlight(){let t=Ra(this.toString());return new e(this.firstLineNumber,t.split(` -`))}toString(){return this.lines.join(` -`)}};var Tf={red:_t,gray:an,dim:nn,bold:tt,underline:Ms,highlightSource:e=>e.highlight()},Cf={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Mf({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:o},i){var m;let s={functionName:`prisma.${r}()`,message:t,isPanic:n!=null?n:!1,callArguments:o};if(!e||typeof window!="undefined"||y.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let u=Math.max(1,a.lineNumber-3),l=(m=On.read(a.fileName))==null?void 0:m.slice(u,a.lineNumber),c=l==null?void 0:l.lineAt(a.lineNumber);if(l&&c){let g=Rf(c),w=Sf(c);if(!w)return s;s.functionName=`${w.code})`,s.location=a,n||(l=l.mapLineAt(a.lineNumber,b=>b.slice(0,w.openingBraceIndex))),l=i.highlightSource(l);let E=String(l.lastLineNumber).length;if(s.contextLines=l.mapLines((b,T)=>i.gray(String(T).padStart(E))+" "+b).mapLines(b=>i.dim(b)).prependSymbolAt(a.lineNumber,i.bold(i.red("\u2192"))),o){let b=g+E+1;b+=2,s.callArguments=(0,Ia.default)(o,b).slice(b)}}return s}function Sf(e){let t=Object.keys(Ce.ModelAction).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let o=n.index+n[0].length,i=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(i,o),openingBraceIndex:o}}return null}function Rf(e){let t=0;for(let r=0;r{if("rejectOnNotFound"in n.args){let i=zt({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new pe(i,{clientVersion:t})}return await r(n).catch(i=>{throw i instanceof ce&&i.code==="P2025"?new Ke(`No ${e} found`,t):i})}}d();p();f();function $e(e){return e.replace(/^./,t=>t.toLowerCase())}var kf=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Df=["aggregate","count","groupBy"];function Ho(e,t){var o;let r=(o=e._extensions.getAllModelExtensions(t))!=null?o:{},n=[_f(e,t),Lf(e,t),gr(r),ge("name",()=>t),ge("$name",()=>t),ge("$parent",()=>e._appliedParent)];return Le({},n)}function _f(e,t){let r=$e(t),n=Object.keys(Ce.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(o){let i=o,s=u=>e._request(u);s=ka(i,t,e._clientVersion,s);let a=u=>l=>{let c=lt(e._errorFormat);return e._createPrismaPromise(m=>{let g={args:l,dataPath:[],action:i,model:t,clientMethod:`${r}.${o}`,jsModelName:r,transaction:m,callsite:c};return s({...g,...u})})};return kf.includes(i)?Wo(e,t,a):Nf(o)?Aa(e,o,a):a({})}}}function Nf(e){return Df.includes(e)}function Lf(e,t){return bt(ge("fields",()=>{let r=e._runtimeDataModel.models[t];return Ta(t,r)}))}d();p();f();function Da(e){return e.replace(/^./,t=>t.toUpperCase())}var zo=Symbol();function wr(e){let t=[Bf(e),ge(zo,()=>e),ge("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(gr(r)),Le(e,t)}function Bf(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map($e),n=[...new Set(t.concat(r))];return bt({getKeys(){return n},getPropertyValue(o){let i=Da(o);if(e._runtimeDataModel.models[i]!==void 0)return Ho(e,i);if(e._runtimeDataModel.models[o]!==void 0)return Ho(e,o)},getPropertyDescriptor(o){if(!r.includes(o))return{enumerable:!1}}})}function Fn(e){return e[zo]?e[zo]:e}function _a(e){if(typeof e=="function")return e(this);let t=Fn(this),r=Object.create(t,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return wr(r)}d();p();f();d();p();f();function Na({result:e,modelName:t,select:r,extensions:n}){let o=n.getAllComputedFields(t);if(!o)return e;let i=[],s=[];for(let a of Object.values(o)){if(r){if(!r[a.name])continue;let u=a.needs.filter(l=>!r[l]);u.length>0&&s.push(yr(u))}jf(e,a.needs)&&i.push(Uf(a,Le(e,i)))}return i.length>0||s.length>0?Le(e,[...i,...s]):e}function jf(e,t){return t.every(r=>Oo(e,r))}function Uf(e,t){return bt(ge(e.name,()=>e.compute(t)))}d();p();f();function In({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:o}){var s;if(Array.isArray(t)){for(let a=0;ac.name===i);if(!u||u.kind!=="object"||!u.relationName)continue;let l=typeof s=="object"?s:{};t[i]=In({visitor:o,result:t[i],args:l,modelName:u.type,runtimeDataModel:n})}}function Ba({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:o}){return n.isEmpty()||e==null||typeof e!="object"||!o.models[t]?e:In({result:e,args:r!=null?r:{},modelName:t,runtimeDataModel:o,visitor:(s,a,u)=>Na({result:s,modelName:$e(a),select:u.select,extensions:n})})}d();p();f();d();p();f();function ja(e){if(e instanceof xe)return $f(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{var s,a;let i=t.customDataProxyFetch;return"transaction"in t&&o!==void 0&&(((s=t.transaction)==null?void 0:s.kind)==="batch"&&t.transaction.lock.then(),t.transaction=o),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:ja((a=t.args)!=null?a:{}),__internalParams:t,query:(u,l=t)=>{let c=l.customDataProxyFetch;return l.customDataProxyFetch=Ga(i,c),l.args=u,$a(e,l,r,n+1)}})})}function qa(e,t){let{jsModelName:r,action:n,clientMethod:o}=t,i=r?n:o;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r!=null?r:"$none",i);return $a(e,t,s)}function Va(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Ka(r,n,0,e):e(r)}}function Ka(e,t,r,n){if(r===t.length)return n(e);let o=e.customDataProxyFetch,i=e.requests[0].transaction;return t[r]({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,a=e){let u=a.customDataProxyFetch;return a.customDataProxyFetch=Ga(o,u),Ka(a,t,r+1,n)}})}var Ua=e=>e;function Ga(e=Ua,t=Ua){return r=>e(t(r))}d();p();f();d();p();f();function Qa(e,t,r){let n=$e(r);return!t.result||!(t.result.$allModels||t.result[n])?e:qf({...e,...Ja(t.name,e,t.result.$allModels),...Ja(t.name,e,t.result[n])})}function qf(e){let t=new Ne,r=(n,o)=>t.getOrCreate(n,()=>o.has(n)?[n]:(o.add(n),e[n]?e[n].needs.flatMap(i=>r(i,o)):[n]));return jt(e,n=>({...n,needs:r(n.name,new Set)}))}function Ja(e,t,r){return r?jt(r,({needs:n,compute:o},i)=>({name:i,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Vf(t,i,o)})):{}}function Vf(e,t,r){var o;let n=(o=e==null?void 0:e[t])==null?void 0:o.compute;return n?i=>r({...i,[t]:n(i)}):r}function Wa(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let o of n.needs)r[o]=!0;return r}var kn=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new Ne;this.modelExtensionsCache=new Ne;this.queryCallbacksCache=new Ne;this.clientExtensions=cr(()=>{var t,r;return this.extension.client?{...(r=this.previous)==null?void 0:r.getAllClientExtensions(),...this.extension.client}:(t=this.previous)==null?void 0:t.getAllClientExtensions()});this.batchCallbacks=cr(()=>{var n,o,i;let t=(o=(n=this.previous)==null?void 0:n.getAllBatchQueryCallbacks())!=null?o:[],r=(i=this.extension.query)==null?void 0:i.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>{var r;return Qa((r=this.previous)==null?void 0:r.getAllComputedFields(t),this.extension,t)})}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{var n,o;let r=$e(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?(n=this.previous)==null?void 0:n.getAllModelExtensions(t):{...(o=this.previous)==null?void 0:o.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{var s,a;let n=(a=(s=this.previous)==null?void 0:s.getAllQueryCallbacks(t,r))!=null?a:[],o=[],i=this.extension.query;return!i||!(i[t]||i.$allModels||i[r]||i.$allOperations)?n:(i[t]!==void 0&&(i[t][r]!==void 0&&o.push(i[t][r]),i[t].$allOperations!==void 0&&o.push(i[t].$allOperations)),t!=="$none"&&i.$allModels!==void 0&&(i.$allModels[r]!==void 0&&o.push(i.$allModels[r]),i.$allModels.$allOperations!==void 0&&o.push(i.$allModels.$allOperations)),i[r]!==void 0&&o.push(i[r]),i.$allOperations!==void 0&&o.push(i.$allOperations),n.concat(o))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Dn=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new kn(t))}isEmpty(){return this.head===void 0}append(t){return new e(new kn(t,this.head))}getAllComputedFields(t){var r;return(r=this.head)==null?void 0:r.getAllComputedFields(t)}getAllClientExtensions(){var t;return(t=this.head)==null?void 0:t.getAllClientExtensions()}getAllModelExtensions(t){var r;return(r=this.head)==null?void 0:r.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){var n,o;return(o=(n=this.head)==null?void 0:n.getAllQueryCallbacks(t,r))!=null?o:[]}getAllBatchQueryCallbacks(){var t,r;return(r=(t=this.head)==null?void 0:t.getAllBatchQueryCallbacks())!=null?r:[]}};d();p();f();var Ha=he("prisma:client"),za={Vercel:"vercel","Netlify CI":"netlify"};function Za({postinstall:e,ciName:t,clientVersion:r}){if(Ha("checkPlatformCaching:postinstall",e),Ha("checkPlatformCaching:ciName",t),e===!0&&t&&t in za){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. +"use strict";var Xs=Object.create;var sr=Object.defineProperty;var ea=Object.getOwnPropertyDescriptor;var ta=Object.getOwnPropertyNames;var ra=Object.getPrototypeOf,na=Object.prototype.hasOwnProperty;var Ce=(e,t)=>()=>(e&&(t=e(e=0)),t);var Fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ar=(e,t)=>{for(var r in t)sr(e,r,{get:t[r],enumerable:!0})},zn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ta(t))!na.call(e,i)&&i!==r&&sr(e,i,{get:()=>t[i],enumerable:!(n=ea(t,i))||n.enumerable});return e};var _e=(e,t,r)=>(r=e!=null?Xs(ra(e)):{},zn(t||!e||!e.__esModule?sr(r,"default",{value:e,enumerable:!0}):r,e)),ia=e=>zn(sr({},"__esModule",{value:!0}),e);var y,c=Ce(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var b,p=Ce(()=>{"use strict";b=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,m=Ce(()=>{"use strict";E=()=>{};E.prototype=E});var d=Ce(()=>{"use strict"});var gi=Fe(ze=>{"use strict";f();c();p();m();d();var ti=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),oa=ti(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=C.indexOf("=");M===-1&&(M=R);var F=M===R?0:4-M%4;return[M,F]}function l(C){var R=a(C),M=R[0],F=R[1];return(M+F)*3/4-F}function u(C,R,M){return(R+M)*3/4-M}function g(C){var R,M=a(C),F=M[0],B=M[1],D=new n(u(C,F,B)),O=0,ae=B>0?F-4:F,G;for(G=0;G>16&255,D[O++]=R>>8&255,D[O++]=R&255;return B===2&&(R=r[C.charCodeAt(G)]<<2|r[C.charCodeAt(G+1)]>>4,D[O++]=R&255),B===1&&(R=r[C.charCodeAt(G)]<<10|r[C.charCodeAt(G+1)]<<4|r[C.charCodeAt(G+2)]>>2,D[O++]=R>>8&255,D[O++]=R&255),D}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function v(C,R,M){for(var F,B=[],D=R;Dae?ae:O+D));return F===1?(R=C[M-1],B.push(t[R>>2]+t[R<<4&63]+"==")):F===2&&(R=(C[M-2]<<8)+C[M-1],B.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),B.join("")}}),sa=ti(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,C=t[r+v];for(v+=S,s=C&(1<<-h)-1,C>>=-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:(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,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+C]=l&255,C+=R,l/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=R,a/=256,g-=8);t[n+C-R]|=M*128}}),zr=oa(),We=sa(),Yn=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.Buffer=T;ze.SlowBuffer=ma;ze.INSPECT_MAX_BYTES=50;var lr=2147483647;ze.kMaxLength=lr;T.TYPED_ARRAY_SUPPORT=aa();!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 aa(){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 Ee(e){if(e>lr)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 Xr(e)}return ri(e,t,r)}T.poolSize=8192;function ri(e,t,r){if(typeof e=="string")return ua(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(me(e,ArrayBuffer)||e&&me(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(e,SharedArrayBuffer)||e&&me(e.buffer,SharedArrayBuffer)))return ii(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=pa(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 ri(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function ni(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 la(e,t,r){return ni(e),e<=0?Ee(e):t!==void 0?typeof r=="string"?Ee(e).fill(t,r):Ee(e).fill(t):Ee(e)}T.alloc=function(e,t,r){return la(e,t,r)};function Xr(e){return ni(e),Ee(e<0?0:en(e)|0)}T.allocUnsafe=function(e){return Xr(e)};T.allocUnsafeSlow=function(e){return Xr(e)};function ua(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=oi(e,t)|0,n=Ee(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function Yr(e){let t=e.length<0?0:en(e.length)|0,r=Ee(t);for(let n=0;n=lr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+lr.toString(16)+" bytes");return e|0}function ma(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(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),me(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 oi(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||me(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 Zr(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:Zr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=oi;function da(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 va(this,t,r);case"utf8":case"utf-8":return ai(this,t,r);case"ascii":return xa(this,t,r);case"latin1":case"binary":return Pa(this,t,r);case"base64":return Ea(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ta(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Le(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+=" ... "),""};Yn&&(T.prototype[Yn]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(me(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,rn(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:Zn(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):Zn(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Zn(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 fa(this,e,t,r);case"utf8":case"utf-8":return ga(this,e,t,r);case"ascii":case"latin1":case"binary":return ha(this,e,t,r);case"base64":return ya(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wa(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 Ea(e,t,r){return t===0&&r===e.length?zr.fromByteArray(e):zr.fromByteArray(e.slice(t,r))}function ai(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 ba(n)}var Xn=4096;function ba(e){let t=e.length;if(t<=Xn)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,Ke(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&bt(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,Ke(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&bt(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,Ke(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&bt(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,Ke(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&bt(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),We.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||H(e,4,this.length),We.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||H(e,8,this.length),We.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||H(e,8,this.length),We.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 li(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 ui(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=Re(function(e,t=0){return li(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Re(function(e,t=0){return ui(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 li(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Re(function(e,t=0){return ui(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ci(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 pi(e,t,r,n,i){return t=+t,r=r>>>0,i||ci(e,t,r,4,34028234663852886e22,-34028234663852886e22),We.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return pi(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return pi(this,e,t,!1,r)};function mi(e,t,r,n,i){return t=+t,r=r>>>0,i||ci(e,t,r,8,17976931348623157e292,-17976931348623157e292),We.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return mi(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return mi(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=ei(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ei(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ei(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 Aa(e,t,r){Ke(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&bt(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 He.ERR_OUT_OF_RANGE("value",a,e)}Aa(n,i,o)}function Ke(e,t){if(typeof e!="number")throw new He.ERR_INVALID_ARG_TYPE(t,"number",e)}function bt(e,t,r){throw Math.floor(e)!==e?(Ke(e,r),new He.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new He.ERR_BUFFER_OUT_OF_BOUNDS:new He.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Ca=/[^+/0-9A-Za-z-_]/g;function Ra(e){if(e=e.split("=")[0],e=e.trim().replace(Ca,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Zr(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 Sa(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function fi(e){return zr.toByteArray(Ra(e))}function ur(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function me(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function rn(e){return e!==e}var Ia=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"?ka:e}function ka(){throw new Error("BigInt not supported")}});var w,f=Ce(()=>{"use strict";w=_e(gi())});function Da(){return!1}var Ma,Na,Ei,bi=Ce(()=>{"use strict";f();c();p();m();d();Ma={},Na={existsSync:Da,promises:Ma},Ei=Na});function $a(...e){return e.join("/")}function qa(...e){return e.join("/")}var Ni,Va,ja,Pt,Fi=Ce(()=>{"use strict";f();c();p();m();d();Ni="/",Va={sep:Ni},ja={resolve:$a,posix:Va,join:qa,sep:Ni},Pt=ja});var dr,Li=Ce(()=>{"use strict";f();c();p();m();d();dr=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 Ui=Fe((ed,Bi)=>{"use strict";f();c();p();m();d();Bi.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 Vi=Fe((md,qi)=>{"use strict";f();c();p();m();d();qi.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 Gi=Fe((wd,ji)=>{"use strict";f();c();p();m();d();var Ka=Vi();ji.exports=e=>typeof e=="string"?e.replace(Ka(),""):e});var Wi=Fe((wh,Xa)=>{Xa.exports={name:"@prisma/engines-version",version:"5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4c784e32044a8a016d99474bd02a3b6123742169"},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 Ki=Fe(()=>{"use strict";f();c();p();m();d()});var Vn=Fe((i2,as)=>{"use strict";f();c();p();m();d();as.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;sln,Decimal:()=>he,Extensions:()=>nn,MetricsClient:()=>Xe,NotFoundError:()=>xe,PrismaClientInitializationError:()=>J,PrismaClientKnownRequestError:()=>W,PrismaClientRustPanicError:()=>Pe,PrismaClientUnknownRequestError:()=>ne,PrismaClientValidationError:()=>z,Public:()=>on,Sql:()=>ie,defineDmmfProperty:()=>Hi,empty:()=>Yi,getPrismaClient:()=>zs,getRuntime:()=>_r,join:()=>zi,makeStrictEnum:()=>Ys,objectEnumValues:()=>gr,raw:()=>wn,sqltag:()=>En,warnEnvConflicts:()=>void 0,warnOnce:()=>Ct});module.exports=ia($c);f();c();p();m();d();var nn={};ar(nn,{defineExtension:()=>hi,getExtensionContext:()=>yi});f();c();p();m();d();f();c();p();m();d();function hi(e){return typeof e=="function"?e:t=>t.$extends(e)}f();c();p();m();d();function yi(e){return e}var on={};ar(on,{validator:()=>wi});f();c();p();m();d();f();c();p();m();d();function wi(...e){return t=>t}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();var sn,xi,Pi,vi,Ti=!0;typeof y<"u"&&({FORCE_COLOR:sn,NODE_DISABLE_COLORS:xi,NO_COLOR:Pi,TERM:vi}=y.env||{},Ti=y.stdout&&y.stdout.isTTY);var Fa={enabled:!xi&&Pi==null&&vi!=="dumb"&&(sn!=null&&sn!=="0"||Ti)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Fa.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Lp=V(0,0),cr=V(1,22),pr=V(2,22),Bp=V(3,23),Ai=V(4,24),Up=V(7,27),$p=V(8,28),qp=V(9,29),Vp=V(30,39),Ye=V(31,39),Ci=V(32,39),Ri=V(33,39),Si=V(34,39),jp=V(35,39),Oi=V(36,39),Gp=V(37,39),Ii=V(90,39),Jp=V(90,39),Qp=V(40,49),Hp=V(41,49),Wp=V(42,49),Kp=V(43,49),zp=V(44,49),Yp=V(45,49),Zp=V(46,49),Xp=V(47,49);f();c();p();m();d();var _a=100,ki=["green","yellow","blue","magenta","cyan","red"],mr=[],Di=Date.now(),La=0,an=typeof y<"u"?y.env:{};globalThis.DEBUG??=an.DEBUG??"";globalThis.DEBUG_COLORS??=an.DEBUG_COLORS?an.DEBUG_COLORS==="true":!0;var xt={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 Ba(e){let t={color:ki[La++%ki.length],enabled:xt.enabled(e),namespace:e,log:xt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&mr.push([o,...n]),mr.length>_a&&mr.shift(),xt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:Ua(g)),u=`+${Date.now()-Di}ms`;Di=Date.now(),a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var ln=new Proxy(Ba,{get:(e,t)=>xt[t],set:(e,t,r)=>xt[t]=r});function Ua(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 Mi(){mr.length=0}var ee=ln;f();c();p();m();d();f();c();p();m();d();var _i="library";function vt(e){let t=Ga();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":_i)}function Ga(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}f();c();p();m();d();f();c();p();m();d();var Be;(t=>{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||={})})(Be||={});var At={};ar(At,{error:()=>Ha,info:()=>Qa,log:()=>Ja,query:()=>Wa,should:()=>$i,tags:()=>Tt,warn:()=>un});f();c();p();m();d();var Tt={error:Ye("prisma:error"),warn:Ri("prisma:warn"),info:Oi("prisma:info"),query:Si("prisma:query")},$i={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Ja(...e){console.log(...e)}function un(e,...t){$i.warn()&&console.warn(`${Tt.warn} ${e}`,...t)}function Qa(e,...t){console.info(`${Tt.info} ${e}`,...t)}function Ha(e,...t){console.error(`${Tt.error} ${e}`,...t)}function Wa(e,...t){console.log(`${Tt.query} ${e}`,...t)}f();c();p();m();d();function be(e,t){throw new Error(t)}f();c();p();m();d();function cn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();c();p();m();d();var pn=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});f();c();p();m();d();function Ze(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();c();p();m();d();function mn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Ji.has(e)||(Ji.add(e),un(t,...r))};f();c();p();m();d();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 xe=class extends W{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};N(xe,"NotFoundError");f();c();p();m();d();var J=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(J,"PrismaClientInitializationError");f();c();p();m();d();var Pe=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(Pe,"PrismaClientRustPanicError");f();c();p();m();d();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();m();d();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();m();d();var Xe=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();m();d();f();c();p();m();d();function Rt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Hi(e,t){let r=Rt(()=>za(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function za(e){return{datamodel:{models:dn(e.models),enums:dn(e.enums),types:dn(e.types)}}}function dn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}f();c();p();m();d();var fr=Symbol(),fn=new WeakMap,ve=class{constructor(t){t===fr?fn.set(this,`Prisma.${this._getName()}`):fn.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return fn.get(this)}},St=class extends ve{_getNamespace(){return"NullTypes"}},Ot=class extends St{};gn(Ot,"DbNull");var It=class extends St{};gn(It,"JsonNull");var kt=class extends St{};gn(kt,"AnyNull");var gr={classes:{DbNull:Ot,JsonNull:It,AnyNull:kt},instances:{DbNull:new Ot(fr),JsonNull:new It(fr),AnyNull:new kt(fr)}};function gn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();function Dt(e){return{ok:!1,error:e,map(){return Dt(e)},flatMap(){return Dt(e)}}}var hn=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}},yn=e=>{let t=new hn,r=Ue(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ue(t,e.queryRaw.bind(e)),executeRaw:Ue(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>Ya(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=Za(t,e.getConnectionInfo.bind(e))),n},Ya=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ue(e,t.queryRaw.bind(t)),executeRaw:Ue(e,t.executeRaw.bind(t)),commit:Ue(e,t.commit.bind(t)),rollback:Ue(e,t.rollback.bind(t))});function Ue(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return Dt({kind:"GenericJs",id:i})}}}function Za(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return Dt({kind:"GenericJs",id:i})}}}var Ks=_e(Wi());var wk=_e(Ki());Li();bi();Fi();f();c();p();m();d();var ie=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();m();d();f();c();p();m();d();var hr={enumerable:!0,configurable:!0,writable:!0};function yr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>hr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Zi=Symbol.for("nodejs.util.inspect.custom");function fe(e,t){let r=el(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=Xi(Reflect.ownKeys(o),r),a=Xi(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?{...hr,...l?.getPropertyDescriptor(s)}:hr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[Zi]=function(){let o={...this};return delete o[Zi],o},i}function el(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 Xi(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}f();c();p();m();d();function et(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}f();c();p();m();d();function wr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}f();c();p();m();d();f();c();p();m();d();var tt=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();m();d();f();c();p();m();d();function eo(e){return e.substring(0,1).toLowerCase()+e.substring(1)}f();c();p();m();d();function rt(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Er(e){return e.toString()!=="Invalid Date"}f();c();p();m();d();f();c();p();m();d();var nt=9e15,ke=1e9,bn="0123456789abcdef",xr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Pr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",xn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-nt,maxE:nt,crypto:!1},io,Te,_=!0,Tr="[DecimalError] ",Ie=Tr+"Invalid argument: ",oo=Tr+"Precision limit exceeded",so=Tr+"crypto unavailable",ao="[object Decimal]",X=Math.floor,Q=Math.pow,tl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,rl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,nl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,lo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,k=7,il=9007199254740991,ol=xr.length-1,Pn=Pr.length-1,A={toStringTag:ao};A.absoluteValue=A.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),I(e)};A.ceil=function(){return I(new this.constructor(this),this.e+1,2)};A.clampedTo=A.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(Ie+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};A.comparedTo=A.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};A.cosine=A.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=sl(n,fo(n,r)),n.precision=e,n.rounding=t,I(Te==2||Te==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};A.cubeRoot=A.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.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&&(I(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")&&(I(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return _=!0,I(n,e,h.rounding,t)};A.decimalPlaces=A.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};A.dividedBy=A.div=function(e){return $(this,new this.constructor(e))};A.dividedToIntegerBy=A.divToInt=function(e){var t=this,r=t.constructor;return I($(t,new r(e),0,1,1),r.precision,r.rounding)};A.equals=A.eq=function(e){return this.cmp(e)===0};A.floor=function(){return I(new this.constructor(this),this.e+1,3)};A.greaterThan=A.gt=function(e){return this.cmp(e)>0};A.greaterThanOrEqualTo=A.gte=function(e){var t=this.cmp(e);return t==1||t===0};A.hyperbolicCosine=A.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/Cr(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 I(o,s.precision=r,s.rounding=n,!0)};A.hyperbolicSine=A.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/Cr(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,I(i,t,r,!0)};A.hyperbolicTangent=A.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,$(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};A.inverseCosine=A.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))};A.inverseHyperbolicCosine=A.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)};A.inverseHyperbolicSine=A.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())};A.inverseHyperbolicTangent=A.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?I(new o(i),e,t,!0):(o.precision=r=n-i.e,i=$(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)};A.inverseSine=A.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)))};A.inverseTangent=A.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<=Pn)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<=Pn)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};A.isNaN=function(){return!this.s};A.isNegative=A.isNeg=function(){return this.s<0};A.isPositive=A.isPos=function(){return this.s>0};A.isZero=function(){return!!this.d&&this.d[0]===0};A.lessThan=A.lt=function(e){return this.cmp(e)<0};A.lessThanOrEqualTo=A.lte=function(e){return this.cmp(e)<1};A.logarithm=A.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=Oe(u,a),n=t?vr(g,a+10):Oe(e,a),l=$(s,n,a,1),Nt(l.d,i=h,v))do if(a+=10,s=Oe(u,a),n=t?vr(g,a+10):Oe(e,a),l=$(s,n,a,1),!o){+Y(l.d).slice(i+1,i+15)+1==1e14&&(l=I(l,h+1,0));break}while(Nt(l.d,i+=10,v));return _=!0,I(l,h,v)};A.minus=A.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,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,v=e.d,a=C.precision,l=C.rounding,!u[0]||!v[0]){if(v[0])e.s=-e.s;else if(u[0])e=new C(S);else return new C(l===3?-0:0);return _?I(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=Ar(u,n),_?I(e,a,l):e};A.precision=A.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ie+e);return r.d?(t=uo(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};A.round=function(){var e=this,t=e.constructor;return I(new t(e),e.e+1,t.rounding)};A.sine=A.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=ll(n,fo(n,r)),n.precision=e,n.rounding=t,I(Te>2?r.neg():r,e,t,!0)):new n(NaN)};A.squareRoot=A.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($(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&&(I(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")&&(I(n,l+1,1),e=!n.times(n).eq(s));break}return _=!0,I(n,l,g.rounding,e)};A.tangent=A.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=$(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,I(Te==2||Te==4?r.neg():r,e,t,!0)):new n(NaN)};A.times=A.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=Ar(o,r),_?I(e,h.precision,h.rounding):e};A.toBinary=function(e,t){return An(this,2,e,t)};A.toDecimalPlaces=A.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(oe(e,0,ke),t===void 0?t=n.rounding:oe(t,0,8),I(r,e+r.e+1,t))};A.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ge(n,!0):(oe(e,0,ke),t===void 0?t=i.rounding:oe(t,0,8),n=I(new i(n),e+1,t),r=ge(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};A.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=ge(i):(oe(e,0,ke),t===void 0?t=o.rounding:oe(t,0,8),n=I(new o(i),e+i.e+1,t),r=ge(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};A.toFraction=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,S=this,C=S.d,R=S.constructor;if(!C)return new R(S);if(u=r=new R(1),n=l=new R(0),t=new R(n),o=t.e=uo(C)-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(Ie+a);e=a.gt(t)?o>0?t:u:a}for(_=!1,a=new R(Y(C)),g=R.precision,R.precision=o=C.length*k*2;h=$(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=$(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,n,o,1).minus(S).abs().cmp($(l,r,o,1).minus(S).abs())<1?[u,n]:[l,r],R.precision=g,_=!0,v};A.toHexadecimal=A.toHex=function(e,t){return An(this,16,e,t)};A.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:oe(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=$(r,e,0,t,1).times(e),_=!0,I(r)):(e.s=r.s,r=e),r};A.toNumber=function(){return+this};A.toOctal=function(e,t){return An(this,8,e,t)};A.toPower=A.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 I(a,n,o);if(t=X(e.e/k),t>=e.d.length-1&&(r=u<0?-u:u)<=il)return i=co(l,a,r,n),e.s<0?new l(1).div(i):I(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=vn(e.times(Oe(a,n+r)),n),i.d&&(i=I(i,n+5,1),Nt(i.d,n,o)&&(t=n+10,i=I(vn(e.times(Oe(a,t+r)),t),t+5,1),+Y(i.d).slice(n+1,n+15)+1==1e14&&(i=I(i,n+1,0)))),i.s=s,_=!0,l.rounding=o,I(i,n,o))};A.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ge(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(oe(e,1,ke),t===void 0?t=i.rounding:oe(t,0,8),n=I(new i(n),e,t),r=ge(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};A.toSignificantDigits=A.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(oe(e,1,ke),t===void 0?t=n.rounding:oe(t,0,8)),I(new n(r),e,t)};A.toString=function(){var e=this,t=e.constructor,r=ge(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};A.truncated=A.trunc=function(){return I(new this.constructor(this),this.e+1,1)};A.valueOf=A.toJSON=function(){var e=this,t=e.constructor,r=ge(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(Ie+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+=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 br(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 sl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Cr(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 $=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,C,R,M,F,B,D,O,ae,G,Hr,nr,Et,Wr,ue,ir,or=n.constructor,Kr=n.s==i.s?1:-1,Z=n.d,q=i.d;if(!Z||!Z[0]||!q||!q[0])return new or(!n.s||!i.s||(Z?q&&Z[0]==q[0]:!q)?NaN:Z&&Z[0]==0||!q?Kr*0:Kr/0);for(l?(S=1,g=n.e-i.e):(l=pe,S=k,g=X(n.e/S)-X(i.e/S)),ue=q.length,Et=Z.length,F=new or(Kr),B=F.d=[],h=0;q[h]==(Z[h]||0);h++);if(q[h]>(Z[h]||0)&&g--,o==null?(G=o=or.precision,s=or.rounding):a?G=o+(n.e-i.e)+1:G=o,G<0)B.push(1),C=!0;else{if(G=G/S+2|0,h=0,ue==1){for(v=0,q=q[0],G++;(h1&&(q=e(q,v,l),Z=e(Z,v,l),ue=q.length,Et=Z.length),nr=ue,D=Z.slice(0,ue),O=D.length;O=l/2&&++Wr;do v=0,u=t(q,D,ue,O),u<0?(ae=D[0],ue!=O&&(ae=ae*l+(D[1]||0)),v=ae/Wr|0,v>1?(v>=l&&(v=l-1),R=e(q,v,l),M=R.length,O=D.length,u=t(R,D,M,O),u==1&&(v--,r(R,ue=10;v/=10)h++;F.e=h+g*S-1,I(F,a?o+F.e+1:o,s,C)}return F}}();function I(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)+Se(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Se(-i-1)+o,r&&(n=r-s)>0&&(o+=Se(n))):i>=s?(o+=Se(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Se(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Se(n))),o}function Ar(e,t){var r=e[0];for(t*=k;r>=10;r/=10)t++;return t}function vr(e,t,r){if(t>ol)throw _=!0,r&&(e.precision=r),Error(oo);return I(new e(xr),t,1,!0)}function ce(e,t,r){if(t>Pn)throw Error(oo);return I(new e(Pr),t,r,!0)}function uo(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 Se(e){for(var t="";e--;)t+="0";return t}function co(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),ro(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),ro(t.d,s)}return _=!0,o}function to(e){return e.d[e.d.length-1]&1}function po(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=C):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=I(o.times(e),l,1),r=r.times(++g),a=s.plus($(o,r,l,1)),Y(a.d).slice(0,l)===Y(s.d).slice(0,l)){for(i=h;i--;)s=I(s.times(s),l,1);if(t==null)if(u<3&&Nt(s.d,l-n,S,u))v.precision=l+=10,r=o=a=new v(1),g=0,u++;else return I(s,v.precision=C,S,_=!0);else return v.precision=C,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,l,u,g,h,v,S=1,C=10,R=e,M=R.d,F=R.constructor,B=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+=C,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=vr(F,g+2,D).times(o+""),R=Oe(new F(n+"."+r.slice(1)),g-C).plus(u),F.precision=D,t==null?I(R,D,B,_=!0):R;for(h=R,l=s=R=$(R.minus(1),R.plus(1),g,1),v=I(R.times(R),g,1),i=3;;){if(s=I(s.times(v),g,1),u=l.plus($(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(vr(F,g+2,D).times(o+""))),l=$(l,new F(S),g,1),t==null)if(Nt(l.d,g-C,B,a))F.precision=g+=C,u=s=R=$(h.minus(1),h.plus(1),g,1),v=I(R.times(R),g,1),i=a=1;else return I(l,F.precision=D,B,_=!0);else return F.precision=D,l;l=u,i+=2}}function mo(e){return String(e.s*e.s/0)}function Tn(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"),lo.test(t))return Tn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(rl.test(t))r=16,t=t.toLowerCase();else if(tl.test(t))r=2;else if(nl.test(t))r=8;else throw Error(Ie+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=co(n,new n(r),o,o*2)),u=br(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=Ar(u,g),e.d=u,_=!1,s&&(e=$(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?Q(2,l):qe.pow(2,l))),_=!0,e)}function ll(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/Cr(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/k);for(_=!1,l=r.times(r),a=new e(n);;){if(s=$(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=$(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 Cr(e,t){for(var r=e;--t;)r*=e;return r}function fo(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 Te=n?4:1,t;if(r=t.divToInt(i),r.isZero())Te=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Te=to(r)?n?2:3:n?4:1,t;Te=to(r)?n?1:4:n?3:2}return t.minus(i).abs()}function An(e,t,r,n){var i,o,s,a,l,u,g,h,v,S=e.constructor,C=r!==void 0;if(C?(oe(r,1,ke),n===void 0?n=S.rounding:oe(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=mo(e);else{for(g=ge(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(".",""),v=new S(1),v.e=g.length-s,v.d=br(ge(v),10,i),v.e=v.d.length),h=br(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=$(e,v,r,n,0,i),h=e.d,o=e.e,u=io),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=br(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 ul(e){return new this(e).abs()}function cl(e){return new this(e).acos()}function pl(e){return new this(e).acosh()}function ml(e,t){return new this(e).plus(t)}function dl(e){return new this(e).asin()}function fl(e){return new this(e).asinh()}function gl(e){return new this(e).atan()}function hl(e){return new this(e).atanh()}function yl(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($(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($(e,t,o,1)),r}function wl(e){return new this(e).cbrt()}function El(e){return I(e=new this(e),e.e+1,2)}function bl(e,t,r){return new this(e).clamp(t,r)}function xl(e){if(!e||typeof e!="object")throw Error(Tr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,ke,"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(Ie+r+": "+n);if(r="crypto",i&&(this[r]=xn[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(so);else this[r]=!1;else throw Error(Ie+r+": "+n);return this}function Pl(e){return new this(e).cos()}function vl(e){return new this(e).cosh()}function go(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,no(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(so);else for(;o=10;i/=10)n++;n`}};function st(e){return e instanceof Ft}f();c();p();m();d();f();c();p();m();d();var Rr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};f();c();p();m();d();var Sr=e=>e,Or={bold:Sr,red:Sr,green:Sr,dim:Sr,enabled:!1},ho={bold:cr,red:Ye,green:Ci,dim:pr,enabled:!0},at={write(e){e.writeLine(",")}};f();c();p();m();d();var ye=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();m();d();var De=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var lt=class extends De{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 ye("[]");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(){}};f();c();p();m();d();var yo=": ",Ir=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()+yo.length}write(t){let r=new ye(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(yo).write(this.value)}};f();c();p();m();d();var ut=class e extends De{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 ye("{}");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();m();d();var K=class extends De{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new ye(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var Cn=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 ct(e){return new Cn(wo(e))}function wo(e){let t=new ut;for(let[r,n]of Object.entries(e)){let i=new Ir(r,Eo(n));t.addField(i)}return t}function Eo(e){if(typeof e=="string")return new K(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new K(String(e));if(typeof e=="bigint")return new K(`${e}n`);if(e===null)return new K("null");if(e===void 0)return new K("undefined");if(ot(e))return new K(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new K(`Buffer.alloc(${e.byteLength})`):new K(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Er(e)?e.toISOString():"Invalid Date";return new K(`new Date("${t}")`)}return e instanceof ve?new K(`Prisma.${e._getName()}`):st(e)?new K(`prisma.${eo(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Kl(e):typeof e=="object"?wo(e):new K(Object.prototype.toString.call(e))}function Kl(e){let t=new lt;for(let r of e)t.addItem(Eo(r));return t}function kr(e,t){let r=t==="pretty"?ho:Or,n=e.renderAllMessages(r),i=new tt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function bo(e){if(e===void 0)return"";let t=ct(e);return new tt(0,{colors:Or}).write(t).toString()}f();c();p();m();d();var zl="P2037";function _t({error:e,user_facing_error:t},r,n){return t.error_code?new W(Yl(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 Yl(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===zl&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();var Rn=class{getLocation(){return null}};function Me(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Rn}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();var xo={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function pt(e={}){let t=Xl(e);return Object.entries(t).reduce((n,[i,o])=>(xo[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Xl(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 Po(e,t){let r=Dr(e);return t({action:"aggregate",unpacker:r,argsMapper:pt})(e)}f();c();p();m();d();function eu(e={}){let{select:t,...r}=e;return typeof t=="object"?pt({...r,_count:t}):pt({...r,_count:{_all:!0}})}function tu(e={}){return typeof e.select=="object"?t=>Dr(e)(t)._count:t=>Dr(e)(t)._count._all}function vo(e,t){return t({action:"count",unpacker:tu(e),argsMapper:eu})(e)}f();c();p();m();d();function ru(e={}){let t=pt(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 nu(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function To(e,t){return t({action:"groupBy",unpacker:nu(e),argsMapper:ru})(e)}function Ao(e,t,r){if(t==="aggregate")return n=>Po(n,r);if(t==="count")return n=>vo(n,r);if(t==="groupBy")return n=>To(n,r)}f();c();p();m();d();function Co(e,t){let r=t.fields.filter(i=>!i.relationName),n=pn(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")},...yr(Object.keys(n))})}f();c();p();m();d();f();c();p();m();d();var Ro=e=>Array.isArray(e)?e:e.split("."),Sn=(e,t)=>Ro(t).reduce((r,n)=>r&&r[n],e),So=(e,t,r)=>Ro(t).reduceRight((n,i,o,s)=>Object.assign({},Sn(e,s.slice(0,o)),{[i]:n}),r);function iu(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function ou(e,t,r){return t===void 0?e??{}:So(t,r,e||!0)}function On(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Me(e._errorFormat),g=iu(n,i),h=ou(l,o,g),v=r({dataPath:g,callsite:u})(h),S=su(e,t);return new Proxy(v,{get(C,R){if(!S.includes(R))return C[R];let F=[a[R].type,r,R],B=[g,h];return On(e,...F,...B)},...yr([...S,...Object.getOwnPropertyNames(v)])})}}function su(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}f();c();p();m();d();f();c();p();m();d();var au=_e(Ui());var lu={red:Ye,gray:Ii,dim:pr,bold:cr,underline:Ai,highlightSource:e=>e.highlight()},uu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function cu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function pu({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(mu(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 mu(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function mt(e){let t=e.showColors?lu:uu,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=cu(e),pu(r,t)}function Oo(e,t,r,n){return e===Be.ModelAction.findFirstOrThrow||e===Be.ModelAction.findUniqueOrThrow?du(t,r,n):n}function du(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=mt({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 W&&o.code==="P2025"?new xe(`No ${e} found`,t):o})}}f();c();p();m();d();function we(e){return e.replace(/^./,t=>t.toLowerCase())}var fu=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],gu=["aggregate","count","groupBy"];function In(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[hu(e,t),wu(e,t),Mt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return fe({},n)}function hu(e,t){let r=we(t),n=Object.keys(Be.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=Oo(o,t,e._clientVersion,s);let a=l=>u=>{let g=Me(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 fu.includes(o)?On(e,t,a):yu(i)?Ao(e,i,a):a({})}}}function yu(e){return gu.includes(e)}function wu(e,t){return $e(te("fields",()=>{let r=e._runtimeDataModel.models[t];return Co(t,r)}))}f();c();p();m();d();function Io(e){return e.replace(/^./,t=>t.toUpperCase())}var kn=Symbol();function Lt(e){let t=[Eu(e),te(kn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Mt(r)),fe(e,t)}function Eu(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(we),n=[...new Set(t.concat(r))];return $e({getKeys(){return n},getPropertyValue(i){let o=Io(i);if(e._runtimeDataModel.models[o]!==void 0)return In(e,o);if(e._runtimeDataModel.models[i]!==void 0)return In(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ko(e){return e[kn]?e[kn]:e}function Do(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 Lt(t)}f();c();p();m();d();f();c();p();m();d();function Mo({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(et(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(et(u))}bu(e,l.needs)&&s.push(xu(l,fe(e,s)))}return s.length>0||a.length>0?fe(e,[...s,...a]):e}function bu(e,t){return t.every(r=>cn(e,r))}function xu(e,t){return $e(te(e.name,()=>e.compute(t)))}f();c();p();m();d();function Mr({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]=Mr({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Fo({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Mr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=we(l);return Mo({result:a,modelName:g,select:u.select,omit:u.select?void 0:{...o?.[g],...u.omit},extensions:n})}})}f();c();p();m();d();f();c();p();m();d();function _o(e){if(e instanceof ie)return Pu(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:_o(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Vo(o,l),a.args=s,Bo(e,a,r,n+1)}})})}function Uo(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 Bo(e,t,s)}function $o(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?qo(r,n,0,e):e(r)}}function qo(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=Vo(i,l),qo(a,t,r+1,n)}})}var Lo=e=>e;function Vo(e=Lo,t=Lo){return r=>e(t(r))}f();c();p();m();d();f();c();p();m();d();function Go(e,t,r){let n=we(r);return!t.result||!(t.result.$allModels||t.result[n])?e:vu({...e,...jo(t.name,e,t.result.$allModels),...jo(t.name,e,t.result[n])})}function vu(e){let t=new de,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 Ze(e,n=>({...n,needs:r(n.name,new Set)}))}function jo(e,t,r){return r?Ze(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Tu(t,o,i)})):{}}function Tu(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Jo(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 Qo(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 Nr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new de;this.modelExtensionsCache=new de;this.queryCallbacksCache=new de;this.clientExtensions=Rt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Rt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Go(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=we(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()}},Fr=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Nr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Nr(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();m();d();var Ho=ee("prisma:client"),Wo={Vercel:"vercel","Netlify CI":"netlify"};function Ko({postinstall:e,ciName:t,clientVersion:r}){if(Ho("checkPlatformCaching:postinstall",e),Ho("checkPlatformCaching:ciName",t),e===!0&&t&&t in Wo){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/${za[t]}-build`;throw console.error(n),new re(n,r)}}d();p();f();function Ya(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}d();p();f();d();p();f();d();p();f();function Zo({error:e,user_facing_error:t},r){return t.error_code?new ce(t.message,{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new Se(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}d();p();f();var _n=class{};d();p();f();function Xa(e,t){return{batch:e,transaction:(t==null?void 0:t.kind)==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}d();p();f();d();p();f();d();p();f();var Kf="Cloudflare-Workers",Gf="node";function eu(){var e,t,r;return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":((e=globalThis.navigator)==null?void 0:e.userAgent)===Kf?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":((r=(t=globalThis.process)==null?void 0:t.release)==null?void 0:r.name)===Gf?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}function Nn({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){var u,l;let o,i=Object.keys(e)[0],s=(u=e[i])==null?void 0:u.url,a=(l=t[i])==null?void 0:l.url;if(i===void 0?o=void 0:a?o=a:s!=null&&s.value?o=s.value:s!=null&&s.fromEnvVar&&(o=r[s.fromEnvVar]),(s==null?void 0:s.fromEnvVar)!==void 0&&o===void 0)throw eu()==="workerd"?new re(`error: Environment variable not found: ${s.fromEnvVar}. +Learn how: https://pris.ly/d/${Wo[t]}-build`;throw console.error(n),new J(n,r)}}f();c();p();m();d();function zo(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();var Au="Cloudflare-Workers",Cu="node";function Yo(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Au?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Cu?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Ru={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 _r(){let e=Yo();return{id:e,prettyName:Ru[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();function dt({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 _r().id==="workerd"?new J(`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 re(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(o===void 0)throw new re("error: Missing URL environment variable, value, or override.",n);return o}d();p();f();d();p();f();var Ln=class extends Error{constructor(r,n){super(r);this.clientVersion=n.clientVersion,this.cause=n.cause}get[Symbol.toStringTag](){return this.name}};var we=class extends Ln{constructor(r,n){var o;super(r,n);this.isRetryable=(o=n.isRetryable)!=null?o:!0}};d();p();f();d();p();f();function q(e,t){return{...e,isRetryable:t}}var Zt=class extends we{constructor(r){super("This request must be retried",q(r,!0));this.name="ForcedRetryError";this.code="P5001"}};k(Zt,"ForcedRetryError");d();p();f();var Et=class extends we{constructor(r,n){super(r,q(n,!1));this.name="InvalidDatasourceError";this.code="P5002"}};k(Et,"InvalidDatasourceError");d();p();f();var Pt=class extends we{constructor(r,n){super(r,q(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};k(Pt,"NotImplementedYetError");d();p();f();d();p();f();var J=class extends we{constructor(r,n){super(r,n);this.response=n.response;let o=this.response.headers.get("prisma-request-id");if(o){let i=`(The request id was: ${o})`;this.message=this.message+" "+i}}};var vt=class extends J{constructor(r){super("Schema needs to be uploaded",q(r,!0));this.name="SchemaMissingError";this.code="P5005"}};k(vt,"SchemaMissingError");d();p();f();d();p();f();var Yo="This request could not be understood by the server",Pr=class extends J{constructor(r,n,o){super(n||Yo,q(r,!1));this.name="BadRequestError";this.code="P5000";o&&(this.code=o)}};k(Pr,"BadRequestError");d();p();f();var vr=class extends J{constructor(r,n){super("Engine not started: healthcheck timeout",q(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};k(vr,"HealthcheckTimeoutError");d();p();f();var Ar=class extends J{constructor(r,n,o){super(n,q(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=o}};k(Ar,"EngineStartupError");d();p();f();var Tr=class extends J{constructor(r){super("Engine version is not supported",q(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};k(Tr,"EngineVersionNotSupportedError");d();p();f();var Xo="Request timed out",Cr=class extends J{constructor(r,n=Xo){super(n,q(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};k(Cr,"GatewayTimeoutError");d();p();f();var Jf="Interactive transaction error",Mr=class extends J{constructor(r,n=Jf){super(n,q(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};k(Mr,"InteractiveTransactionError");d();p();f();var Qf="Request parameters are invalid",Sr=class extends J{constructor(r,n=Qf){super(n,q(r,!1));this.name="InvalidRequestError";this.code="P5011"}};k(Sr,"InvalidRequestError");d();p();f();var ei="Requested resource does not exist",Rr=class extends J{constructor(r,n=ei){super(n,q(r,!1));this.name="NotFoundError";this.code="P5003"}};k(Rr,"NotFoundError");d();p();f();var ti="Unknown server error",Yt=class extends J{constructor(r,n,o){super(n||ti,q(r,!0));this.name="ServerError";this.code="P5006";this.logs=o}};k(Yt,"ServerError");d();p();f();var ri="Unauthorized, check your connection string",Or=class extends J{constructor(r,n=ri){super(n,q(r,!1));this.name="UnauthorizedError";this.code="P5007"}};k(Or,"UnauthorizedError");d();p();f();var ni="Usage exceeded, retry again later",Fr=class extends J{constructor(r,n=ni){super(n,q(r,!0));this.name="UsageExceededError";this.code="P5008"}};k(Fr,"UsageExceededError");async function Wf(e){let t;try{t=await e.text()}catch(r){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(r){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 Wf(e);if(n.type==="QueryEngineError")throw new ce(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 vt(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Tr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:o,logs:i}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Ar(r,o,i)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:o,error_code:i}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new re(o,t,i)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:o}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new vr(r,o)}}if("InteractiveTransactionMisrouted"in n.body){let o={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 Mr(r,o[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Sr(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Or(r,Xt(ri,n));if(e.status===404)return new Rr(r,Xt(ei,n));if(e.status===429)throw new Fr(r,Xt(ni,n));if(e.status===504)throw new Cr(r,Xt(Xo,n));if(e.status>=500)throw new Yt(r,Xt(ti,n));if(e.status>=400)throw new Pr(r,Xt(Yo,n))}function Xt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}d();p();f();function tu(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(o=>setTimeout(()=>o(n),n))}d();p();f();function ru(e){var r;if(!!((r=e.generator)!=null&&r.previewFeatures.some(n=>n.toLowerCase().includes("metrics"))))throw new re("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)}d();p();f();var nu={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*","@swc/core":"1.3.75","@swc/jest":"0.2.29","@types/jest":"29.5.5","@types/node":"18.18.0",execa:"5.1.1",jest:"29.7.0",typescript:"5.2.2"};d();p();f();d();p();f();var kr=class extends we{constructor(r,n){super(`Cannot fetch data from service: -${r}`,q(n,!0));this.name="RequestError";this.code="P5010"}};k(kr,"RequestError");async function At(e,t,r=n=>n){var o;let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(oi)(e,t)}catch(i){console.log(e);let s=(o=i.message)!=null?o:"Unknown error";throw new kr(s,{clientVersion:n})}}function zf(e){return{...e.headers,"Content-Type":"application/json"}}function Zf(e){return{method:e.method,headers:zf(e)}}function Yf(e,t){return{text:()=>Promise.resolve(x.Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(x.Buffer.concat(e).toString())),ok:t.statusCode>=200&&t.statusCode<=299,status:t.statusCode,url:t.url,headers:new ii(t.headers)}}async function oi(e,t={}){let r=Xf("https"),n=Zf(t),o=[],{origin:i}=new URL(e);return new Promise((s,a)=>{var l;let u=r.request(e,n,c=>{let{statusCode:m,headers:{location:g}}=c;m>=301&&m<=399&&g&&(g.startsWith("http")===!1?s(oi(`${i}${g}`,t)):s(oi(g,t))),c.on("data",w=>o.push(w)),c.on("end",()=>s(Yf(o,c))),c.on("error",a)});u.on("error",a),u.end((l=t.body)!=null?l:"")})}var Xf=typeof require!="undefined"?require:()=>{},ii=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 o of n)this.headers.set(r,o)}append(t,r){this.headers.set(t,r)}delete(t){this.headers.delete(t)}get(t){var r;return(r=this.headers.get(t))!=null?r:null}has(t){return this.headers.has(t)}set(t,r){this.headers.set(t,r)}forEach(t,r){for(let[n,o]of this.headers)t.call(r,o,n,this)}};var ed=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,ou=he("prisma:client:dataproxyEngine");async function td(e,t){var s,a,u;let r=nu["@prisma/engines-version"],n=(s=t.clientVersion)!=null?s:"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[o,i]=(a=n==null?void 0:n.split("-"))!=null?a:[];if(i===void 0&&ed.test(o))return o;if(i!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[l]=(u=r.split("-"))!=null?u:[],[c,m,g]=l.split("."),w=rd(`<=${c}.${m}.${g}`),E=await At(w,{clientVersion:n});if(!E.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${E.status} ${E.statusText}, response body: ${await E.text()||""}`);let b=await E.text();ou("length of body fetched from unpkg.com",b.length);let T;try{T=JSON.parse(b)}catch(S){throw console.error("JSON.parse error: body fetched from unpkg.com: ",b),S}return T.version}throw new Pt("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function iu(e,t){let r=await td(e,t);return ou("version",r),r}function rd(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var su=3,si=he("prisma:client:dataproxyEngine"),ai=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`};this.tracingHelper.isEnabled()&&(n.traceparent=t!=null?t:this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let o=this.buildCaptureSettings();return o.length>0&&(n["X-capture-telemetry"]=o.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 extends _n{constructor(r){var n,o,i,s;super();ru(r),this.config=r,this.env={...this.config.env,...y.env},this.inlineSchema=(n=r.inlineSchema)!=null?n:"",this.inlineDatasources=(o=r.inlineDatasources)!=null?o:{},this.inlineSchemaHash=(i=r.inlineSchemaHash)!=null?i:"",this.clientVersion=(s=r.clientVersion)!=null?s:"unknown",this.logEmitter=r.logEmitter,this.tracingHelper=this.config.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return"unknown"}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[r,n]=this.extractHostAndApiKey();this.host=r,this.headerBuilder=new ai({apiKey:n,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries}),this.remoteClientVersion=await iu(r,this.config),si("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(r){var n,o;(n=r==null?void 0:r.logs)!=null&&n.length&&r.logs.forEach(i=>{switch(i.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let s=typeof i.attributes.query=="string"?i.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[a]=s.split("/* traceparent");s=a}this.logEmitter.emit("query",{query:s,timestamp:i.timestamp,duration:i.attributes.duration_ms,params:i.attributes.params,target:i.attributes.target})}}}),(o=r==null?void 0:r.traces)!=null&&o.length&&this.tracingHelper.createEngineSpan({span:!0,spans:r.traces})}on(r,n){if(r==="beforeExit")throw new Error('"beforeExit" hook is not applicable to the remote query engine');this.logEmitter.on(r,n)}async url(r){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${r}`}async uploadSchema(){let r={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(r,async()=>{let n=await At(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});n.ok||si("schema response status",n.status);let o=await Ir(n,this.clientVersion);if(o)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${o.message}`}),o;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`})})}request(r,{traceparent:n,interactiveTransaction:o,customDataProxyFetch:i}){return this.requestInternal({body:r,traceparent:n,interactiveTransaction:o,customDataProxyFetch:i})}async requestBatch(r,{traceparent:n,transaction:o,customDataProxyFetch:i}){let s=(o==null?void 0:o.kind)==="itx"?o.options:void 0,a=Xa(r,o),{batchResult:u,elapsed:l}=await this.requestInternal({body:a,customDataProxyFetch:i,interactiveTransaction:s,traceparent:n});return u.map(c=>"errors"in c&&c.errors.length>0?Zo(c.errors[0],this.clientVersion):{data:c,elapsed:l})}requestInternal({body:r,traceparent:n,customDataProxyFetch:o,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:s})=>{let a=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");s(a);let u=await At(a,{method:"POST",headers:this.headerBuilder.build({traceparent:n,interactiveTransaction:i}),body:JSON.stringify(r),clientVersion:this.clientVersion},o);u.ok||si("graphql response status",u.status),await this.handleError(await Ir(u,this.clientVersion));let l=await u.json(),c=l.extensions;if(c&&this.propagateResponseExtensions(c),l.errors)throw l.errors.length===1?Zo(l.errors[0],this.config.clientVersion):new Se(l.errors,{clientVersion:this.config.clientVersion});return l}})}async transaction(r,n,o){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[r]} transaction`,callback:async({logHttpCall:s})=>{var a,u;if(r==="start"){let l=JSON.stringify({max_wait:(a=o==null?void 0:o.maxWait)!=null?a:2e3,timeout:(u=o==null?void 0:o.timeout)!=null?u:5e3,isolation_level:o==null?void 0:o.isolationLevel}),c=await this.url("transaction/start");s(c);let m=await At(c,{method:"POST",headers:this.headerBuilder.build({traceparent:n.traceparent}),body:l,clientVersion:this.clientVersion});await this.handleError(await Ir(m,this.clientVersion));let g=await m.json(),w=g.extensions;w&&this.propagateResponseExtensions(w);let E=g.id,b=g["data-proxy"].endpoint;return{id:E,payload:{endpoint:b}}}else{let l=`${o.payload.endpoint}/${r}`;s(l);let c=await At(l,{method:"POST",headers:this.headerBuilder.build({traceparent:n.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Ir(c,this.clientVersion));let g=(await c.json()).extensions;g&&this.propagateResponseExtensions(g);return}}})}extractHostAndApiKey(){let r={clientVersion:this.clientVersion},n=Object.keys(this.inlineDatasources)[0],o=Nn({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(o)}catch(c){throw new Et(`Error validating datasource \`${n}\`: the URL must start with the protocol \`prisma://\``,r)}let{protocol:s,host:a,searchParams:u}=i;if(s!=="prisma:")throw new Et(`Error validating datasource \`${n}\`: the URL must start with the protocol \`prisma://\``,r);let l=u.get("api_key");if(l===null||l.length<1)throw new Et(`Error validating datasource \`${n}\`: the URL must contain a valid API key`,r);return[a,l]}metrics(){throw new Pt("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(r){var n;for(let o=0;;o++){let i=s=>{this.logEmitter.emit("info",{message:`Calling ${s} (n=${o})`})};try{return await r.callback({logHttpCall:i})}catch(s){if(!(s instanceof we)||!s.isRetryable)throw s;if(o>=su)throw s instanceof Zt?s.cause:s;this.logEmitter.emit("warn",{message:`Attempt ${o+1}/${su} failed for ${r.actionGerund}: ${(n=s.message)!=null?n:"(unknown)"}`});let a=await tu(o);this.logEmitter.emit("warn",{message:`Retrying after ${a}ms`})}}}async handleError(r){if(r instanceof vt)throw await this.uploadSchema(),new Zt({clientVersion:this.clientVersion,cause:r});if(r)throw r}};function au(e,t){let r;try{r=Nn({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch(o){}e.noEngine!==!0&&(r!=null&&r.startsWith("prisma://"))&&lr("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=Co(t.generator);return r!=null&&r.startsWith("prisma://")||e.noEngine,new Dr(t);throw new pe("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}d();p();f();function Bn({generator:e}){var t;return(t=e==null?void 0:e.previewFeatures)!=null?t:[]}d();p();f();d();p();f();d();p();f();var du=ve(ui());d();p();f();function pu(e,t){let r=fu(e),n=nd(r),o=id(n);o?jn(o,t):t.addErrorMessage(()=>"Unknown error")}function fu(e){return e.errors.flatMap(t=>t.kind==="Union"?fu(t):[t])}function nd(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let o=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,i=t.get(o);i?t.set(o,{...n,argument:{...n.argument,typeNames:od(i.argument.typeNames,n.argument.typeNames)}}):t.set(o,n)}return r.push(...t.values()),r}function od(e,t){return[...new Set(e.concat(t))]}function id(e){return Io(e,(t,r)=>{let n=lu(t),o=lu(r);return n!==o?n-o:cu(t)-cu(r)})}function lu(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function cu(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}d();p();f();var Qe=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)}};d();p();f();var Un=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:o,dim:i}=n.context.colors;n.write(o(i(`${t}: ${r}`))).addMarginSymbol(o(i("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(Qt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function jn(e,t){switch(e.kind){case"IncludeAndSelect":sd(e,t);break;case"IncludeOnScalar":ad(e,t);break;case"EmptySelection":ud(e,t);break;case"UnknownSelectionField":ld(e,t);break;case"UnknownArgument":cd(e,t);break;case"UnknownInputField":pd(e,t);break;case"RequiredArgumentMissing":fd(e,t);break;case"InvalidArgumentType":dd(e,t);break;case"InvalidArgumentValue":md(e,t);break;case"ValueTooLarge":gd(e,t);break;case"SomeFieldsMissing":yd(e,t);break;case"TooManyFieldsGiven":hd(e,t);break;case"Union":pu(e,t);break;default:throw new Error("not implemented: "+e.kind)}}function sd(e,t){var n,o;let r=t.arguments.getDeepSubSelectionValue(e.selectionPath);r&&r instanceof ne&&((n=r.getField("include"))==null||n.markAsError(),(o=r.getField("select"))==null||o.markAsError()),t.addErrorMessage(i=>`Please ${i.bold("either")} use ${i.green("`include`")} or ${i.green("`select`")}, but ${i.red("not both")} at the same time.`)}function ad(e,t){var s,a;let[r,n]=$n(e.selectionPath),o=e.outputType,i=(s=t.arguments.getDeepSelectionParent(r))==null?void 0:s.value;if(i&&((a=i.getField(n))==null||a.markAsError(),o))for(let u of o.fields)u.isRelation&&i.addSuggestion(new Qe(u.name,"true"));t.addErrorMessage(u=>{let l=`Invalid scalar field ${u.red(`\`${n}\``)} for ${u.bold("include")} statement`;return o?l+=` on model ${u.bold(o.name)}. ${_r(u)}`:l+=".",l+=` -Note that ${u.bold("include")} statements only accept relation fields.`,l})}function ud(e,t){var i,s;let r=e.outputType,n=(i=t.arguments.getDeepSelectionParent(e.selectionPath))==null?void 0:i.value,o=(s=n==null?void 0:n.isEmpty())!=null?s:!1;n&&(n.removeAllFields(),yu(n,r)),t.addErrorMessage(a=>o?`The ${a.red("`select`")} statement for type ${a.bold(r.name)} must not be empty. ${_r(a)}`:`The ${a.red("`select`")} statement for type ${a.bold(r.name)} needs ${a.bold("at least one truthy value")}.`)}function ld(e,t){var i;let[r,n]=$n(e.selectionPath),o=t.arguments.getDeepSelectionParent(r);o&&((i=o.value.getField(n))==null||i.markAsError(),yu(o.value,e.outputType)),t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o.kind)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(_r(s)),a.join(" ")})}function cd(e,t){var o;let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof ne&&((o=n.getField(r))==null||o.markAsError(),xd(n,e.arguments)),t.addErrorMessage(i=>mu(i,r,e.arguments.map(s=>s.name)))}function pd(e,t){var i;let[r,n]=$n(e.argumentPath),o=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(o instanceof ne){(i=o.getDeepField(e.argumentPath))==null||i.markAsError();let s=o.getDeepFieldValue(r);s instanceof ne&&hu(s,e.inputType)}t.addErrorMessage(s=>mu(s,n,e.inputType.fields.map(a=>a.name)))}function mu(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],o=wd(t,r);return o&&n.push(`Did you mean \`${e.green(o)}\`?`),r.length>0&&n.push(_r(e)),n.join(" ")}function fd(e,t){let r;t.addErrorMessage(u=>(r==null?void 0:r.value)instanceof oe&&r.value.text==="null"?`Argument \`${u.green(i)}\` must not be ${u.red("null")}.`:`Argument \`${u.green(i)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(!(n instanceof ne))return;let[o,i]=$n(e.argumentPath),s=new Un,a=n.getDeepFieldValue(o);if(a instanceof ne)if(r=a.getField(i),r&&a.removeField(i),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 Qe(i,s).makeRequired())}else{let u=e.inputTypes.map(gu).join(" | ");a.addSuggestion(new Qe(i,u).makeRequired())}}function gu(e){return e.kind==="list"?`${gu(e.elementType)}[]`:e.name}function dd(e,t){var o;let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof ne&&((o=n.getDeepFieldValue(e.argumentPath))==null||o.markAsError()),t.addErrorMessage(i=>{let s=qn("or",e.argument.typeNames.map(a=>i.green(a)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${s}, provided ${i.red(e.inferredType)}.`})}function md(e,t){var o;let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof ne&&((o=n.getDeepFieldValue(e.argumentPath))==null||o.markAsError()),t.addErrorMessage(i=>{let s=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&s.push(`: ${e.underlyingError}`),s.push("."),e.argument.typeNames.length>0){let a=qn("or",e.argument.typeNames.map(u=>i.green(u)));s.push(` Expected ${a}.`)}return s.join("")})}function gd(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath),o;if(n instanceof ne){let i=n.getDeepField(e.argumentPath),s=i==null?void 0:i.value;s==null||s.markAsError(),s instanceof oe&&(o=s.text)}t.addErrorMessage(i=>{let s=["Unable to fit value"];return o&&s.push(i.red(o)),s.push(`into a 64-bit signed integer for field \`${i.bold(r)}\``),s.join(" ")})}function yd(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(n instanceof ne){let o=n.getDeepFieldValue(e.argumentPath);o instanceof ne&&hu(o,e.inputType)}t.addErrorMessage(o=>{let i=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?i.push(`${o.green("at least one of")} ${qn("or",e.constraints.requiredFields.map(s=>`\`${o.bold(s)}\``))} arguments.`):i.push(`${o.green("at least one")} argument.`):i.push(`${o.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),i.push(_r(o)),i.join(" ")})}function hd(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath),o=[];if(n instanceof ne){let i=n.getDeepFieldValue(e.argumentPath);i instanceof ne&&(i.markAsError(),o=Object.keys(i.getFields()))}t.addErrorMessage(i=>{let s=[`Argument \`${i.bold(r)}\` 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 ${qn("and",o.map(a=>i.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function yu(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new Qe(r.name,"true"))}function xd(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new Qe(r.name,r.typeNames.join(" | ")))}function hu(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new Qe(r.name,r.typeNames.join(" | ")))}function $n(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function _r({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function qn(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var bd=3;function wd(e,t){let r=1/0,n;for(let o of t){let i=(0,du.default)(e,o);i>bd||i({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){var r;return(r=this.model)==null?void 0:r.fields.find(n=>n.name===t)}nestSelection(t){let r=this.findField(t),n=(r==null?void 0:r.kind)==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};d();p();f();var Eu=e=>({command:e});d();p();f();d();p();f();var Pu=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);d();p();f();function Nr(e){try{return vu(e,"fast")}catch(t){return vu(e,"slow")}}function vu(e,t){return JSON.stringify(e.map(r=>Rd(r,t)))}function Rd(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:qt(e)?{prisma__type:"date",prisma__value:e.toJSON()}:je.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:x.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Od(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:x.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Tu(e):e}function Od(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Tu(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Au);let t={};for(let r of Object.keys(e))t[r]=Au(e[r]);return t}function Au(e){return typeof e=="bigint"?e.toString():Tu(e)}var Fd=/^(\s*alter\s)/i,Cu=he("prisma:client");function pi(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Fd.exec(t))throw new Error(`Running ALTER using ${n} is not supported +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new J(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new J("error: Missing URL environment variable, value, or override.",n);return i}f();c();p();m();d();f();c();p();m();d();var Lr=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 Lr{constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};f();c();p();m();d();f();c();p();m();d();function L(e,t){return{...e,isRetryable:t}}var ft=class extends se{constructor(r){super("This request must be retried",L(r,!0));this.name="ForcedRetryError";this.code="P5001"}};N(ft,"ForcedRetryError");f();c();p();m();d();var Ve=class extends se{constructor(r,n){super(r,L(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};N(Ve,"InvalidDatasourceError");f();c();p();m();d();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();m();d();f();c();p();m();d();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();m();d();f();c();p();m();d();var Dn="This request could not be understood by the server",Ut=class extends j{constructor(r,n,i){super(n||Dn,L(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};N(Ut,"BadRequestError");f();c();p();m();d();var $t=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($t,"HealthcheckTimeoutError");f();c();p();m();d();var qt=class extends j{constructor(r,n,i){super(n,L(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};N(qt,"EngineStartupError");f();c();p();m();d();var Vt=class extends j{constructor(r){super("Engine version is not supported",L(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};N(Vt,"EngineVersionNotSupportedError");f();c();p();m();d();var Mn="Request timed out",jt=class extends j{constructor(r,n=Mn){super(n,L(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};N(jt,"GatewayTimeoutError");f();c();p();m();d();var Su="Interactive transaction error",Gt=class extends j{constructor(r,n=Su){super(n,L(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};N(Gt,"InteractiveTransactionError");f();c();p();m();d();var Ou="Request parameters are invalid",Jt=class extends j{constructor(r,n=Ou){super(n,L(r,!1));this.name="InvalidRequestError";this.code="P5011"}};N(Jt,"InvalidRequestError");f();c();p();m();d();var Nn="Requested resource does not exist",Qt=class extends j{constructor(r,n=Nn){super(n,L(r,!1));this.name="NotFoundError";this.code="P5003"}};N(Qt,"NotFoundError");f();c();p();m();d();var Fn="Unknown server error",gt=class extends j{constructor(r,n,i){super(n||Fn,L(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};N(gt,"ServerError");f();c();p();m();d();var _n="Unauthorized, check your connection string",Ht=class extends j{constructor(r,n=_n){super(n,L(r,!1));this.name="UnauthorizedError";this.code="P5007"}};N(Ht,"UnauthorizedError");f();c();p();m();d();var Ln="Usage exceeded, retry again later",Wt=class extends j{constructor(r,n=Ln){super(n,L(r,!0));this.name="UsageExceededError";this.code="P5008"}};N(Wt,"UsageExceededError");async function Iu(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 Kt(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await Iu(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 gt(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 Vt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new qt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new J(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new $t(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 Gt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Jt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Ht(r,ht(_n,n));if(e.status===404)return new Qt(r,ht(Nn,n));if(e.status===429)throw new Wt(r,ht(Ln,n));if(e.status===504)throw new jt(r,ht(Mn,n));if(e.status>=500)throw new gt(r,ht(Fn,n));if(e.status>=400)throw new Ut(r,ht(Dn,n))}function ht(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}f();c();p();m();d();function Zo(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();m();d();var Ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Xo(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+=Ae[s]+Ae[a]+Ae[l]+Ae[u];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Ae[s]+Ae[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Ae[s]+Ae[a]+Ae[l]+"="),r}f();c();p();m();d();function es(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new J("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();m();d();function ku(e){return e[0]*1e3+e[1]/1e6}function ts(e){return new Date(ku(e))}f();c();p();m();d();var rs={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};f();c();p();m();d();f();c();p();m();d();var zt=class extends se{constructor(r,n){super(`Cannot fetch data from service: +${r}`,L(n,!0));this.name="RequestError";this.code="P5010"}};N(zt,"RequestError");async function Je(e,t,r=n=>n){let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(Bn)(e,t)}catch(i){let o=i.message??"Unknown error";throw new zt(o,{clientVersion:n})}}function Mu(e){return{...e.headers,"Content-Type":"application/json"}}function Nu(e){return{method:e.method,headers:Mu(e)}}function Fu(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 Un(t.headers)}}async function Bn(e,t={}){let r=_u("https"),n=Nu(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(Bn(`${o}${h}`,t)):s(Bn(h,t))),u.on("data",v=>i.push(v)),u.on("end",()=>s(Fu(i,u))),u.on("error",a)});l.on("error",a),l.end(t.body??"")})}var _u=typeof require<"u"?require:()=>{},Un=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 Lu=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,ns=ee("prisma:client:dataproxyEngine");async function Bu(e,t){let r=rs["@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&&Lu.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=Uu(`<=${a}.${l}.${u}`),h=await Je(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();ns("length of body fetched from unpkg.com",v.length);let S;try{S=JSON.parse(v)}catch(C){throw console.error("JSON.parse error: body fetched from unpkg.com: ",v),C}return S.version}throw new je("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function is(e,t){let r=await Bu(e,t);return ns("version",r),r}function Uu(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var os=3,$n=ee("prisma:client:dataproxyEngine"),qn=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}},Yt=class{constructor(t){this.name="DataProxyEngine";es(t),this.config=t,this.env={...t.env,...typeof y<"u"?y.env:{}},this.inlineSchema=Xo(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 qn({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await is(t,this.config),$n("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:ts(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 Je(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||$n("schema response status",r.status);let n=await Kt(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=wr(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?_t(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 Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||$n("graphql response status",a.status),await this.handleError(await Kt(a,this.clientVersion));let l=await a.json(),u=l.extensions;if(u&&this.propagateResponseExtensions(u),l.errors)throw l.errors.length===1?_t(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 Je(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Kt(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 Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Kt(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=dt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new Ve(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:")throw new Ve(`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 Ve(`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>=os)throw i instanceof ft?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${os} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Zo(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 ft({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=dt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}e&&r?.startsWith("prisma://")&&Ct("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=vt(t.generator),i=!!(r?.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o){let l;throw l=["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(l.join(` +`),{clientVersion:t.clientVersion})}if(i)return new Yt(t);throw new z("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}f();c();p();m();d();function Br({generator:e}){return e?.previewFeatures??[]}f();c();p();m();d();f();c();p();m();d();function yt(e){return e.substring(0,1).toLowerCase()+e.substring(1)}f();c();p();m();d();f();c();p();m();d();var ms=_e(Vn());f();c();p();m();d();function cs(e,t,r){let n=ps(e),i=$u(n),o=Vu(i);o?Ur(o,t,r):t.addErrorMessage(()=>"Unknown error")}function ps(e){return e.errors.flatMap(t=>t.kind==="Union"?ps(t):[t])}function $u(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:qu(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function qu(e,t){return[...new Set(e.concat(t))]}function Vu(e){return mn(e,(t,r)=>{let n=ls(t),i=ls(r);return n!==i?n-i:us(t)-us(r)})}function ls(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function us(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}f();c();p();m();d();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();m();d();var Zt=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 Ur(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":ju(e,t);break;case"IncludeOnScalar":Gu(e,t);break;case"EmptySelection":Ju(e,t,r);break;case"UnknownSelectionField":Ku(e,t);break;case"UnknownArgument":zu(e,t);break;case"UnknownInputField":Yu(e,t);break;case"RequiredArgumentMissing":Zu(e,t);break;case"InvalidArgumentType":Xu(e,t);break;case"InvalidArgumentValue":ec(e,t);break;case"ValueTooLarge":tc(e,t);break;case"SomeFieldsMissing":rc(e,t);break;case"TooManyFieldsGiven":nc(e,t);break;case"Union":cs(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function ju(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 Gu(e,t){let[r,n]=Xt(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)}. ${er(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Ju(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Qu(e,t,i);return}if(n.hasField("select")){Hu(e,t);return}}if(r?.[yt(e.outputType.name)]){Wu(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Qu(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 Hu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),gs(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${er(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Wu(e,t){let r=new Zt;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]=Xt(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 Ku(e,t){let[r,n]=Xt(e.selectionPath),i=t.arguments.getDeepSubSelectionValue(r)?.asObject(),o;if(i){let s=i.getFieldValue("select")?.asObject(),a=i.getFieldValue("include")?.asObject(),l=i.getFieldValue("omit")?.asObject();s?.hasField(n)?(o="select",s.getField(n)?.markAsError(),gs(s,e.outputType)):a?.hasField(n)?(o="include",a.getField(n)?.markAsError(),ic(a,e.outputType)):l?.hasField(n)&&(o="omit",l.getField(n)?.markAsError(),oc(l,e.outputType))}t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(er(s)),a.join(" ")})}function zu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),sc(n,e.arguments)),t.addErrorMessage(i=>ds(i,r,e.arguments.map(o=>o.name)))}function Yu(e,t){let[r,n]=Xt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&hs(o,e.inputType)}t.addErrorMessage(o=>ds(o,n,e.inputType.fields.map(s=>s.name)))}function ds(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=lc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(er(e)),n.join(" ")}function Zu(e,t){let r;t.addErrorMessage(l=>r?.value instanceof K&&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]=Xt(e.argumentPath),s=new Zt,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(fs).join(" | ");a.addSuggestion(new le(o,l).makeRequired())}}function fs(e){return e.kind==="list"?`${fs(e.elementType)}[]`:e.name}function Xu(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=$r("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 ec(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=$r("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function tc(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 K&&(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 rc(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&&hs(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")} ${$r("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(er(i)),o.join(" ")})}function nc(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 ${$r("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function gs(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,"true"))}function ic(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new le(r.name,"true"))}function oc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new le(r.name,"true"))}function sc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function hs(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 Xt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function er({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function $r(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var ac=3;function lc(e,t){let r=1/0,n;for(let i of t){let o=(0,ms.default)(e,i);o>ac||o({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?.[yt(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)})}};f();c();p();m();d();var bs=e=>({command:e});f();c();p();m();d();f();c();p();m();d();var xs=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);f();c();p();m();d();function rr(e){try{return Ps(e,"fast")}catch{return Ps(e,"slow")}}function Ps(e,t){return JSON.stringify(e.map(r=>wc(r,t)))}function wc(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:rt(e)?{prisma__type:"date",prisma__value:e.toJSON()}:he.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:w.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Ec(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Ts(e):e}function Ec(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Ts(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(vs);let t={};for(let r of Object.keys(e))t[r]=vs(e[r]);return t}function vs(e){return typeof e=="bigint"?e.toString():Ts(e)}var bc=/^(\s*alter\s)/i,As=ee("prisma:client");function Gn(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 fi=({clientMethod:e,activeProvider:t,activeProviderFlavour:r})=>n=>{r!==void 0&&(t=r);let o="",i;if(Array.isArray(n)){let[s,...a]=n;o=s,i={values:Nr(a||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{o=n.sql,i={values:Nr(n.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{o=n.text,i={values:Nr(n.values),__prismaRawParameters__:!0};break}case"sqlserver":{o=Pu(n),i={values:Nr(n.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i!=null&&i.values?Cu(`prisma.${e}(${o}, ${i.values})`):Cu(`prisma.${e}(${o})`),{query:o,parameters:i}},Mu={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new xe(t,r)}},Su={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};d();p();f();function di(e){return function(r){let n,o=(i=e)=>{try{return i===void 0||(i==null?void 0:i.kind)==="itx"?n!=null?n:n=Ru(r(i)):Ru(r(i))}catch(s){return Promise.reject(s)}};return{then(i,s){return o().then(i,s)},catch(i){return o().catch(i)},finally(i){return o().finally(i)},requestTransaction(i){let s=o(i);return s.requestTransaction?s.requestTransaction(i):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Ru(e){return typeof e.then=="function"?e:Promise.resolve(e)}d();p();f();var Ou={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},mi=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(){var t,r;return(r=(t=globalThis.PRISMA_INSTRUMENTATION)==null?void 0:t.helper)!=null?r:Ou}};function Fu(e){return e.includes("tracing")?new mi:Ou}d();p();f();function Iu(e,t=()=>{}){let r,n=new Promise(o=>r=o);return{then(o){return--e===0&&r(t()),o==null?void 0:o(n)}}}d();p();f();var Id=["$connect","$disconnect","$on","$transaction","$use","$extends"],gi=Id;d();p();f();function ku(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)}d();p();f();var Kn=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}};d();p();f();var _u=ve(Vs());d();p();f();function Gn(e){return typeof e.batchRequestIdx=="number"}d();p();f();function Jn(e){return e===null?e:Array.isArray(e)?e.map(Jn):typeof e=="object"?kd(e)?Dd(e):jt(e,Jn):e}function kd(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Dd({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return x.Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new je(t);case"Json":return JSON.parse(t);default:xt(t,"Unknown tagged value")}}d();p();f();function Du(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(yi(e.query.arguments)),t.push(yi(e.query.selection)),t.join("")}function yi(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${yi(n)})`:r}).join(" ")})`}d();p();f();var _d={aggregate:!1,aggregateRaw:!1,createMany:!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 hi(e){return _d[e]}d();p();f();var Qn=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,o)=>{this.batches[r].push({request:t,resolve:n,reject:o})})):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,o)=>this.options.batchOrder(n.request,o.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let o=0;o{for(let o=0;o{let{transaction:i,otelParentCtx:s}=n[0],a=n.map(m=>m.protocolQuery),u=this.client._tracingHelper.getTraceParent(s),l=n.some(m=>hi(m.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:u,transaction:Ld(i),containsWrite:l,customDataProxyFetch:o})).map((m,g)=>{if(m instanceof Error)return m;try{return this.mapQueryEngineResult(n[g],m)}catch(w){return w}})}),singleLoader:async n=>{var s;let o=((s=n.transaction)==null?void 0:s.kind)==="itx"?Nu(n.transaction):void 0,i=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:o,isWrite:hi(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,i)},batchBy:n=>{var o;return(o=n.transaction)!=null&&o.id?`transaction-${n.transaction.id}`:Du(n.protocolQuery)},batchOrder(n,o){var i,s;return((i=n.transaction)==null?void 0:i.kind)==="batch"&&((s=o.transaction)==null?void 0:s.kind)==="batch"?n.transaction.index-o.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:o,transaction:i,args:s}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:o,transaction:i,args:s})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let o=n==null?void 0:n.data,i=n==null?void 0:n.elapsed,s=this.unpack(o,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:i}: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:o,args:i}){if(Nd(t),Bd(t,o)||t instanceof Ke)throw t;if(t instanceof ce&&jd(t)){let a=Lu(t.meta);Vn({args:i,errors:[a],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion})}let s=t.message;throw n&&(s=zt({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:s})),s=this.sanitizeMessage(s),t.code?new ce(s,{code:t.code,clientVersion:this.client._clientVersion,meta:t.meta,batchRequestIdx:t.batchRequestIdx}):t.isPanic?new Ge(s,this.client._clientVersion):t instanceof Se?new Se(s,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx}):t instanceof re?new re(s,this.client._clientVersion):t instanceof Ge?new Ge(s,this.client._clientVersion):(t.clientVersion=this.client._clientVersion,t)}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,_u.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let o=Object.values(t)[0],i=r.filter(a=>a!=="select"&&a!=="include"),s=Jn(Qo(o,i));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function Ld(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Nu(e)};xt(e,"Unknown transaction kind")}}function Nu(e){return{id:e.id,payload:e.payload}}function Bd(e,t){return Gn(e)&&(t==null?void 0:t.kind)==="batch"&&e.batchRequestIdx!==t.index}function jd(e){return e.code==="P2009"||e.code==="P2012"}function Lu(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Lu)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}d();p();f();var Bu="5.4.2";var ju=Bu;d();p();f();function Uu(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=$u(t[n]);return r})}function $u({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return x.Buffer.from(t,"base64");case"decimal":return new je(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map($u);default:return t}}d();p();f();var Gu=ve(ui());d();p();f();var Q=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(Q,"PrismaClientConstructorValidationError");var qu=["datasources","datasourceUrl","errorFormat","adapter","log","__internal"],Vu=["pretty","colorless","minimal"],Ku=["info","query","warn","error"],$d={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new Q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let o=er(r,t)||` Available datasources: ${t.join(", ")}`;throw new Q(`Unknown datasource ${r} provided to PrismaClient constructor.${o}`)}if(typeof n!="object"||Array.isArray(n))throw new Q(`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[o,i]of Object.entries(n)){if(o!=="url")throw new Q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof i!="string")throw new Q(`Invalid value ${JSON.stringify(i)} 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 Q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Bn(t).includes("driverAdapters"))throw new Q('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.')},datasourceUrl:e=>{if(typeof e!="undefined"&&typeof e!="string")throw new Q(`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 Q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Vu.includes(e)){let t=er(e,Vu);throw new Q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new Q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Ku.includes(r)){let n=er(r,Ku);throw new Q(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:o=>{let i=["stdout","event"];if(!i.includes(o)){let s=er(o,i);throw new Q(`Invalid value ${JSON.stringify(o)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[o,i]of Object.entries(r))if(n[o])n[o](i);else throw new Q(`Invalid property ${o} for "log" provided to PrismaClient constructor`)}},__internal:e=>{if(!e)return;let t=["debug","hooks","engine","measurePerformance"];if(typeof e!="object")throw new Q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=er(r,t);throw new Q(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Ju(e,t){for(let[r,n]of Object.entries(e)){if(!qu.includes(r)){let o=er(r,qu);throw new Q(`Unknown property ${r} provided to PrismaClient constructor.${o}`)}$d[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new Q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function er(e,t){if(t.length===0||typeof e!="string")return"";let r=qd(e,t);return r?` Did you mean "${r}"?`:""}function qd(e,t){if(t.length===0)return null;let r=t.map(o=>({value:o,distance:(0,Gu.default)(e,o)}));r.sort((o,i)=>o.distance{let n=new Array(e.length),o=null,i=!1,s=0,a=()=>{i||(s++,s===e.length&&(i=!0,o?r(o):t(n)))},u=l=>{i||(i=!0,r(l))};for(let l=0;l{n[l]=c,a()},c=>{if(!Gn(c)){u(c);return}c.batchRequestIdx===l?u(c):(o||(o=c),a())})})}var ct=he("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Vd={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Kd=Symbol.for("prisma.client.transaction.id"),Gd={id:0,nextId(){return++this.id}};function zu(e){class t{constructor(n){this._middlewares=new Kn;this._createPrismaPromise=di();this.$extends=_a;var u,l,c,m,g,w;Za(e),n&&Ju(n,e);let o=n!=null&&n.adapter?Qs(n.adapter):void 0,i=new Hu.EventEmitter().on("error",()=>{});this._extensions=Dn.empty(),this._previewFeatures=Bn(e),this._clientVersion=(u=e.clientVersion)!=null?u:ju,this._activeProvider=e.activeProvider,this._tracingHelper=Fu(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Lr.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Lr.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=(l=e.injectableEdgeEnv)==null?void 0:l.call(e);try{let E=n!=null?n:{},b=(c=E.__internal)!=null?c:{},T=b.debug===!0;T&&he.enable("prisma:client");let S=Lr.default.resolve(e.dirname,e.relativePath);un.existsSync(S)||(S=e.dirname),ct("dirname",e.dirname),ct("relativePath",e.relativePath),ct("cwd",S);let R=b.engine||{};if(E.errorFormat?this._errorFormat=E.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:S,dirname:e.dirname,enableDebugLogs:T,allowTriggerPanic:R.allowTriggerPanic,datamodelPath:Lr.default.join(e.dirname,(m=e.filename)!=null?m:"schema.prisma"),prismaPath:(g=R.binaryPath)!=null?g:void 0,engineEndpoint:R.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:E.log&&ku(E.log),logQueries:E.log&&!!(typeof E.log=="string"?E.log==="query":E.log.find(C=>typeof C=="string"?C==="query":C.level==="query")),env:(w=a==null?void 0:a.parsed)!=null?w:{},flags:[],clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Ya(E,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,logEmitter:i,isBundled:e.isBundled,adapter:o},ct("clientVersion",e.clientVersion),this._engine=au(e,this._engineConfig),this._requestHandler=new Wn(this,i),E.log)for(let C of E.log){let M=typeof C=="string"?C:C.emit==="stdout"?C.level:null;M&&this.$on(M,N=>{var L;Bt.log(`${(L=Bt.tags[M])!=null?L:""}`,N.message||N.query)})}this._metrics=new Ut(this._engine)}catch(E){throw E.clientVersion=this._clientVersion,E}return this._appliedParent=wr(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,o){n==="beforeExit"?this._engine.on("beforeExit",o):this._engine.on(n,i=>{var a,u,l,c;let s=i.fields;return o(n==="query"?{timestamp:i.timestamp,query:(a=s==null?void 0:s.query)!=null?a:i.query,params:(u=s==null?void 0:s.params)!=null?u:i.params,duration:(l=s==null?void 0:s.duration_ms)!=null?l:i.duration,target:i.target}:{timestamp:i.timestamp,message:(c=s==null?void 0:s.message)!=null?c:i.message,target:i.target})})}$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{Ps()}}$executeRawInternal(n,o,i,s){var l;let a=this._activeProvider,u=(l=this._engineConfig.adapter)==null?void 0:l.flavour;return this._request({action:"executeRaw",args:i,transaction:n,clientMethod:o,argsMapper:fi({clientMethod:o,activeProvider:a,activeProviderFlavour:u}),callsite:lt(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...o){return this._createPrismaPromise(i=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Wu(n,o);return pi(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(i,"$executeRaw",s,a)}throw new pe("`$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,...o){return this._createPrismaPromise(i=>(pi(this._activeProvider,n,o,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(i,"$executeRawUnsafe",[n,...o])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new pe(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(o=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Eu,callsite:lt(this._errorFormat),transaction:o}))}async $queryRawInternal(n,o,i,s){var l;let a=this._activeProvider,u=(l=this._engineConfig.adapter)==null?void 0:l.flavour;return this._request({action:"queryRaw",args:i,transaction:n,clientMethod:o,argsMapper:fi({clientMethod:o,activeProvider:a,activeProviderFlavour:u}),callsite:lt(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(Uu)}$queryRaw(n,...o){return this._createPrismaPromise(i=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(i,"$queryRaw",...Wu(n,o));throw new pe("`$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})})}$queryRawUnsafe(n,...o){return this._createPrismaPromise(i=>this.$queryRawInternal(i,"$queryRawUnsafe",[n,...o]))}_transactionWithArray({promises:n,options:o}){let i=Gd.nextId(),s=Iu(n.length),a=n.map((u,l)=>{var g,w;if((u==null?void 0: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 c=o==null?void 0:o.isolationLevel,m={kind:"batch",id:i,index:l,isolationLevel:c,lock:s};return(w=(g=u.requestTransaction)==null?void 0:g.call(u,m))!=null?w:u});return Qu(a)}async _transactionWithCallback({callback:n,options:o}){let i={traceparent:this._tracingHelper.getTraceParent()},s=await this._engine.transaction("start",i,o),a;try{let u={kind:"itx",...s};a=await n(this._createItxClient(u)),await this._engine.transaction("commit",i,s)}catch(u){throw await this._engine.transaction("rollback",i,s).catch(()=>{}),u}return a}_createItxClient(n){return wr(Le(Fn(this),[ge("_appliedParent",()=>this._appliedParent._createItxClient(n)),ge("_createPrismaPromise",()=>di(n)),ge(Kd,()=>n.id),yr(gi)]))}$transaction(n,o){let i;typeof n=="function"?i=()=>this._transactionWithCallback({callback:n,options:o}):i=()=>this._transactionWithArray({promises:n,options:o});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,i)}_request(n){var l;n.otelParentCtx=this._tracingHelper.getActiveContext();let o=(l=n.middlewareArgsMapper)!=null?l:Vd,i={args:o.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:i.action,model:i.model,name:i.model?`${i.model}.${i.action}`:i.action}}},a=-1,u=async c=>{let m=this._middlewares.get(++a);if(m)return this._tracingHelper.runInChildSpan(s.middleware,S=>m(c,R=>(S==null||S.end(),u(R))));let{runInTransaction:g,args:w,...E}=c,b={...n,...E};w&&(b.args=o.middlewareArgsToRequestArgs(w)),n.transaction!==void 0&&g===!1&&delete b.transaction;let T=await qa(this,b);return b.model?Ba({result:T,modelName:b.model,args:b.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):T};return this._tracingHelper.runInChildSpan(s.operation,()=>u(i))}async _executeRequest({args:n,clientMethod:o,dataPath:i,callsite:s,action:a,model:u,argsMapper:l,transaction:c,unpacker:m,otelParentCtx:g,customDataProxyFetch:w}){try{n=l?l(n):n;let E={name:"serialize"},b=this._tracingHelper.runInChildSpan(E,()=>xu({modelName:u,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:o,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion}));return he.enabled("prisma:client")&&(ct("Prisma Client call:"),ct(`prisma.${o}(${xa(n)})`),ct("Generated request:"),ct(JSON.stringify(b,null,2)+` -`)),(c==null?void 0:c.kind)==="batch"&&await c.lock,this._requestHandler.request({protocolQuery:b,modelName:u,action:a,clientMethod:o,dataPath:i,callsite:s,args:n,extensions:this._extensions,transaction:c,unpacker:m,otelParentCtx:g,otelChildCtx:this._tracingHelper.getActiveContext(),customDataProxyFetch:w})}catch(E){throw E.clientVersion=this._clientVersion,E}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new pe("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){var o;return!!((o=this._engineConfig.previewFeatures)!=null&&o.includes(n))}}return t}function Wu(e,t){return Jd(e)?[new xe(e,t),Mu]:[e,Su]}function Jd(e){return Array.isArray(e)&&Array.isArray(e.raw)}d();p();f();var Qd=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Zu(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Qd.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}d();p();f();0&&(module.exports={DMMF,DMMFClass,Debug,Decimal,Extensions,MetricsClient,NotFoundError,ObjectEnumValue,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,Types,defineDmmfProperty,empty,getPrismaClient,itxClientDenyList,join,makeStrictEnum,objectEnumNames,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); +`)}var Jn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:rr(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:rr(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:rr(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=xs(r),i={values:rr(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?As(`prisma.${e}(${n}, ${i.values})`):As(`prisma.${e}(${n})`),{query:n,parameters:i}},Cs={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ie(t,r)}},Rs={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};f();c();p();m();d();function Qn(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=Ss(r(o)):Ss(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 Ss(e){return typeof e.then=="function"?e:Promise.resolve(e)}f();c();p();m();d();var Os={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Hn=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??Os}};function Is(e){return e.includes("tracing")?new Hn:Os}f();c();p();m();d();function ks(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}f();c();p();m();d();var xc=["$connect","$disconnect","$on","$transaction","$use","$extends"],Ds=xc;f();c();p();m();d();function Ms(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();m();d();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();m();d();var _s=_e(Gi());f();c();p();m();d();function jr(e){return typeof e.batchRequestIdx=="number"}f();c();p();m();d();function Gr(e){return e===null?e:Array.isArray(e)?e.map(Gr):typeof e=="object"?Pc(e)?vc(e):Ze(e,Gr):e}function Pc(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function vc({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return w.Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new he(t);case"Json":return JSON.parse(t);default:be(t,"Unknown tagged value")}}f();c();p();m();d();function Ns(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(" ")})`}f();c();p();m();d();var Tc={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 Tc[e]}f();c();p();m();d();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;iQe("bigint",r));case"bytes-array":return t.map(r=>Qe("bytes",r));case"decimal-array":return t.map(r=>Qe("decimal",r));case"datetime-array":return t.map(r=>Qe("datetime",r));case"date-array":return t.map(r=>Qe("date",r));case"time-array":return t.map(r=>Qe("time",r));default:return t}}function Fs(e){let t=[],r=Ac(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:Rc(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"?Ls(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}`:Ns(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(Cc(t),Sc(t,i)||t instanceof xe)throw t;if(t instanceof W&&Oc(t)){let u=Bs(t.meta);qr({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=mt({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 Pe(l,this.client._clientVersion);if(t instanceof ne)throw new ne(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof J)throw new J(l,this.client._clientVersion);if(t instanceof Pe)throw new Pe(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,_s.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=Sn(o,s),l=i==="queryRaw"?Fs(a):Gr(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Rc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Ls(e)};be(e,"Unknown transaction kind")}}function Ls(e){return{id:e.id,payload:e.payload}}function Sc(e,t){return jr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Oc(e){return e.code==="P2009"||e.code==="P2012"}function Bs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Bs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}f();c();p();m();d();var Us="5.18.0";var $s=Us;f();c();p();m();d();var Js=_e(Vn());f();c();p();m();d();var U=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(U,"PrismaClientConstructorValidationError");var qs=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Vs=["pretty","colorless","minimal"],js=["info","query","warn","error"],kc={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new U(`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=wt(r,t)||` Available datasources: ${t.join(", ")}`;throw new U(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new U(`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 U(`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 U(`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 U('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Br(t).includes("driverAdapters"))throw new U('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(vt()==="binary")throw new U('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 U(`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 U(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Vs.includes(e)){let t=wt(e,Vs);throw new U(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new U(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!js.includes(r)){let n=wt(r,js);throw new U(`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=wt(i,o);throw new U(`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 U(`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 U(`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 U(`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 U('"omit" option is expected to be an object.');if(e===null)throw new U('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Mc(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 U(Nc(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new U(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=wt(r,t);throw new U(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Qs(e,t){for(let[r,n]of Object.entries(e)){if(!qs.includes(r)){let i=wt(r,qs);throw new U(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}kc[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new U('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function wt(e,t){if(t.length===0||typeof e!="string")return"";let r=Dc(e,t);return r?` Did you mean "${r}"?`:""}function Dc(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Js.default)(e,i)}));r.sort((i,o)=>i.distanceyt(n)===t);if(r)return e[r]}function Nc(e,t){let r=ct(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();m();d();function Hs(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 Ne=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Fc={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},_c=Symbol.for("prisma.client.transaction.id"),Lc={id:0,nextId(){return++this.id}};function zs(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Vr;this._createPrismaPromise=Qn();this.$extends=Do;e=n?.__internal?.configOverride?.(e)??e,Ko(e),n&&Qs(n,e);let i=new dr().on("error",()=>{});this._extensions=Fr.empty(),this._previewFeatures=Br(e),this._clientVersion=e.clientVersion??$s,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Is(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Pt.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Pt.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=yn(n.adapter);let l=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==l)throw new J(`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 J("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=Pt.resolve(e.dirname,e.relativePath);Ei.existsSync(h)||(h=e.dirname),Ne("dirname",e.dirname),Ne("relativePath",e.relativePath),Ne("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:Pt.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&&Ms(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:zo(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:dt,getBatchRequestPayload:wr,prismaGraphQLToJSError:_t,PrismaClientUnknownRequestError:ne,PrismaClientInitializationError:J,PrismaClientKnownRequestError:W,debug:ee("prisma:client:accelerateEngine"),engineVersion:Ks.version,clientVersion:e.clientVersion}},Ne("clientVersion",e.clientVersion),this._engine=ss(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,R=>{At.log(`${At.tags[C]??""}`,R.message||R.query)})}this._metrics=new Xe(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Lt(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{Mi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Jn({clientMethod:i,activeProvider:a}),callsite:Me(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Ws(n,i);return Gn(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=>(Gn(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:bs,callsite:Me(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:Jn({clientMethod:i,activeProvider:a}),callsite:Me(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",...Ws(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})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Lc.nextId(),s=ks(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 Hs(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 Lt(fe(ko(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>Qn(n)),te(_c,()=>n.id),et(Ds)]))}$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??Fc,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,C={...n,...S};v&&(C.args=i.middlewareArgsToRequestArgs(v)),n.transaction!==void 0&&h===!1&&delete C.transaction;let R=await Uo(this,C);return C.model?Fo({result:R,modelName:C.model,args:C.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 C={name:"serialize"},R=this._tracingHelper.runInChildSpan(C,()=>ys({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")&&(Ne("Prisma Client call:"),Ne(`prisma.${i}(${bo(n)})`),Ne("Generated request:"),Ne(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(C){throw C.clientVersion=this._clientVersion,C}}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 Ws(e,t){return Bc(e)?[new ie(e,t),Cs]:[e,Rs]}function Bc(e){return Array.isArray(e)&&Array.isArray(e.raw)}f();c();p();m();d();var Uc=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Ys(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Uc.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}f();c();p();m();d();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); //# sourceMappingURL=edge.js.map diff --git a/experiments/mongodb/prisma/generated/client/runtime/index-browser.d.ts b/experiments/mongodb/prisma/generated/client/runtime/index-browser.d.ts index d0faecd24..fefa233b0 100644 --- a/experiments/mongodb/prisma/generated/client/runtime/index-browser.d.ts +++ b/experiments/mongodb/prisma/generated/client/runtime/index-browser.d.ts @@ -283,31 +283,18 @@ export declare class Decimal { static readonly EUCLID: 9; } -/** - * Detect the current JavaScript runtime following - * the WinterCG Runtime Keys proposal: - * - * - `edge-routine` Alibaba Cloud Edge Routine - * - `workerd` Cloudflare Workers - * - `deno` Deno and Deno Deploy - * - `lagon` Lagon - * - `react-native` React Native - * - `netlify` Netlify Edge Functions - * - `electron` Electron - * - `node` Node.js - * - `bun` Bun - * - `edge-light` Vercel Edge Functions - * - `fastly` Fastly Compute@Edge - * - * @see https://runtime-keys.proposal.wintercg.org/ - * @returns {Runtime} - */ -export declare function detectRuntime(): Runtime; - 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 { } @@ -358,7 +345,7 @@ export declare const objectEnumValues: { }; }; -declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; +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 { diff --git a/experiments/mongodb/prisma/generated/client/runtime/index-browser.js b/experiments/mongodb/prisma/generated/client/runtime/index-browser.js index 94566e221..8f0457df0 100644 --- a/experiments/mongodb/prisma/generated/client/runtime/index-browser.js +++ b/experiments/mongodb/prisma/generated/client/runtime/index-browser.js @@ -1,4 +1,4 @@ -"use strict";var he=Object.defineProperty;var Je=Object.getOwnPropertyDescriptor;var We=Object.getOwnPropertyNames;var je=Object.prototype.hasOwnProperty;var Ce=(e,n)=>{for(var i in n)he(e,i,{get:n[i],enumerable:!0})},Ge=(e,n,i,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of We(n))!je.call(e,t)&&t!==i&&he(e,t,{get:()=>n[t],enumerable:!(r=Je(n,t))||r.enumerable});return e};var Xe=e=>Ge(he({},"__esModule",{value:!0}),e);var jn={};Ce(jn,{Decimal:()=>Ve,Public:()=>de,detectRuntime:()=>He,makeStrictEnum:()=>Pe,objectEnumValues:()=>Oe});module.exports=Xe(jn);var de={};Ce(de,{validator:()=>Me});function Me(...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)}},j=class extends ge{_getNamespace(){return"NullTypes"}},G=class extends j{};me(G,"DbNull");var X=class extends j{};me(X,"JsonNull");var K=class extends j{};me(K,"AnyNull");var Oe={classes:{DbNull:G,JsonNull:X,AnyNull:K},instances:{DbNull:new G(ne),JsonNull:new X(ne),AnyNull:new K(ne)}};function me(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0})}var Ke=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(!Ke.has(i))throw new TypeError("Invalid enum value: ".concat(String(i)))}})}var H=9e15,V=1e9,we="0123456789abcdef",re="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",te="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ne={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-H,maxE:H,crypto:!1},qe,Z,w=!0,oe="[DecimalError] ",$=oe+"Invalid argument: ",Te=oe+"Precision limit exceeded",Le=oe+"crypto unavailable",Re="[object Decimal]",A=Math.floor,M=Math.pow,Qe=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Ye=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,xe=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Fe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,F=1e7,m=7,ze=9007199254740991,ye=re.length-1,ve=te.length-1,d={toStringTag:Re};d.absoluteValue=d.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),p(e)};d.ceil=function(){return p(new this.constructor(this),this.e+1,2)};d.clampedTo=d.clamp=function(e,n){var i,r=this,t=r.constructor;if(e=new t(e),n=new t(n),!e.s||!n.s)return new t(NaN);if(e.gt(n))throw Error($+n);return i=r.cmp(e),i<0?e:r.cmp(n)>0?n:new t(r)};d.comparedTo=d.cmp=function(e){var n,i,r,t,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(r=o.length,t=u.length,n=0,i=ru[n]^l<0?1:-1;return r===t?0:r>t^l<0?1:-1};d.cosine=d.cos=function(){var e,n,i=this,r=i.constructor;return i.d?i.d[0]?(e=r.precision,n=r.rounding,r.precision=e+Math.max(i.e,i.sd())+m,r.rounding=1,i=en(r,Be(r,i)),r.precision=e,r.rounding=n,p(Z==2||Z==3?i.neg():i,e,n,!0)):new r(1):new r(NaN)};d.cubeRoot=d.cbrt=function(){var e,n,i,r,t,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*M(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=M(i,1/3),e=A((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),r=new a(i),r.s=c.s):r=new a(s.toString()),o=(e=a.precision)+3;;)if(u=r,l=u.times(u).times(u),f=l.plus(c),r=S(f.plus(c).times(u),f.plus(l),o+2,1),O(u.d).slice(0,o)===(i=O(r.d)).slice(0,o))if(i=i.slice(o-3,o+1),i=="9999"||!t&&i=="4999"){if(!t&&(p(u,e+1,0),u.times(u).times(u).eq(c))){r=u;break}o+=4,t=1}else{(!+i||!+i.slice(1)&&i.charAt(0)=="5")&&(p(r,e+1,1),n=!r.times(r).times(r).eq(c));break}return w=!0,p(r,e,a.rounding,n)};d.decimalPlaces=d.dp=function(){var e,n=this.d,i=NaN;if(n){if(e=n.length-1,i=(e-A(this.e/m))*m,e=n[e],e)for(;e%10==0;e/=10)i--;i<0&&(i=0)}return i};d.dividedBy=d.div=function(e){return S(this,new this.constructor(e))};d.dividedToIntegerBy=d.divToInt=function(e){var n=this,i=n.constructor;return p(S(n,new i(e),0,1,1),i.precision,i.rounding)};d.equals=d.eq=function(e){return this.cmp(e)===0};d.floor=function(){return p(new this.constructor(this),this.e+1,3)};d.greaterThan=d.gt=function(e){return this.cmp(e)>0};d.greaterThanOrEqualTo=d.gte=function(e){var n=this.cmp(e);return n==1||n===0};d.hyperbolicCosine=d.cosh=function(){var e,n,i,r,t,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,r=o.rounding,o.precision=i+Math.max(s.e,s.sd())+4,o.rounding=1,t=s.d.length,t<32?(e=Math.ceil(t/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=r,!0)};d.hyperbolicSine=d.sinh=function(){var e,n,i,r,t=this,s=t.constructor;if(!t.isFinite()||t.isZero())return new s(t);if(n=s.precision,i=s.rounding,s.precision=n+Math.max(t.e,t.sd())+4,s.rounding=1,r=t.d.length,r<3)t=J(s,2,t,t,!0);else{e=1.4*Math.sqrt(r),e=e>16?16:e|0,t=t.times(1/fe(5,e)),t=J(s,2,t,t,!0);for(var o,u=new s(5),l=new s(16),f=new s(20);e--;)o=t.times(t),t=t.times(u.plus(o.times(l.times(o).plus(f))))}return s.precision=n,s.rounding=i,p(t,n,i,!0)};d.hyperbolicTangent=d.tanh=function(){var e,n,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(e=r.precision,n=r.rounding,r.precision=e+7,r.rounding=1,S(i.sinh(),i.cosh(),r.precision=e,r.rounding=n)):new r(i.s)};d.inverseCosine=d.acos=function(){var e,n=this,i=n.constructor,r=n.abs().cmp(1),t=i.precision,s=i.rounding;return r!==-1?r===0?n.isNeg()?R(i,t,s):new i(0):new i(NaN):n.isZero()?R(i,t+4,s).times(.5):(i.precision=t+6,i.rounding=1,n=n.asin(),e=R(i,t+4,s).times(.5),i.precision=t,i.rounding=s,e.minus(n))};d.inverseHyperbolicCosine=d.acosh=function(){var e,n,i=this,r=i.constructor;return i.lte(1)?new r(i.eq(1)?0:NaN):i.isFinite()?(e=r.precision,n=r.rounding,r.precision=e+Math.max(Math.abs(i.e),i.sd())+4,r.rounding=1,w=!1,i=i.times(i).minus(1).sqrt().plus(i),w=!0,r.precision=e,r.rounding=n,i.ln()):new r(i)};d.inverseHyperbolicSine=d.asinh=function(){var e,n,i=this,r=i.constructor;return!i.isFinite()||i.isZero()?new r(i):(e=r.precision,n=r.rounding,r.precision=e+2*Math.max(Math.abs(i.e),i.sd())+6,r.rounding=1,w=!1,i=i.times(i).plus(1).sqrt().plus(i),w=!0,r.precision=e,r.rounding=n,i.ln())};d.inverseHyperbolicTangent=d.atanh=function(){var e,n,i,r,t=this,s=t.constructor;return t.isFinite()?t.e>=0?new s(t.abs().eq(1)?t.s/0:t.isZero()?t:NaN):(e=s.precision,n=s.rounding,r=t.sd(),Math.max(r,e)<2*-t.e-1?p(new s(t),e,n,!0):(s.precision=i=r-t.e,t=S(t.plus(1),new s(1).minus(t),i+e,1),s.precision=e+4,s.rounding=1,t=t.ln(),s.precision=e,s.rounding=n,t.times(.5))):new s(NaN)};d.inverseSine=d.asin=function(){var e,n,i,r,t=this,s=t.constructor;return t.isZero()?new s(t):(n=t.abs().cmp(1),i=s.precision,r=s.rounding,n!==-1?n===0?(e=R(s,i+4,r).times(.5),e.s=t.s,e):new s(NaN):(s.precision=i+6,s.rounding=1,t=t.div(new s(1).minus(t.times(t)).sqrt().plus(1)).atan(),s.precision=i,s.rounding=r,t.times(2)))};d.inverseTangent=d.atan=function(){var e,n,i,r,t,s,o,u,l,f=this,c=f.constructor,a=c.precision,h=c.rounding;if(f.isFinite()){if(f.isZero())return new c(f);if(f.abs().eq(1)&&a+4<=ve)return o=R(c,a+4,h).times(.25),o.s=f.s,o}else{if(!f.s)return new c(NaN);if(a+4<=ve)return o=R(c,a+4,h).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),r=1,l=f.times(f),o=new c(f),t=f;e!==-1;)if(t=t.times(l),s=o.minus(t.div(r+=2)),t=t.times(l),o=s.plus(t.div(r+=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};d.isNaN=function(){return!this.s};d.isNegative=d.isNeg=function(){return this.s<0};d.isPositive=d.isPos=function(){return this.s>0};d.isZero=function(){return!!this.d&&this.d[0]===0};d.lessThan=d.lt=function(e){return this.cmp(e)<0};d.lessThanOrEqualTo=d.lte=function(e){return this.cmp(e)<1};d.logarithm=d.log=function(e){var n,i,r,t,s,o,u,l,f=this,c=f.constructor,a=c.precision,h=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(t=i[0];t%10===0;)t/=10;s=t!==1}if(w=!1,u=a+g,o=B(f,u),r=n?se(c,u+10):B(e,u),l=S(o,r,u,1),Q(l.d,t=a,h))do if(u+=10,o=B(f,u),r=n?se(c,u+10):B(e,u),l=S(o,r,u,1),!s){+O(l.d).slice(t+1,t+15)+1==1e14&&(l=p(l,a+1,0));break}while(Q(l.d,t+=10,h));return w=!0,p(l,a,h)};d.minus=d.sub=function(e){var n,i,r,t,s,o,u,l,f,c,a,h,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,h=e.d,u=v.precision,l=v.rounding,!f[0]||!h[0]){if(h[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=A(e.e/m),c=A(g.e/m),f=f.slice(),s=c-i,s){for(a=s<0,a?(n=f,s=-s,o=h.length):(n=h,i=c,o=f.length),r=Math.max(Math.ceil(u/m),o)+2,s>r&&(s=r,n.length=1),n.reverse(),r=s;r--;)n.push(0);n.reverse()}else{for(r=f.length,o=h.length,a=r0;--r)f[o++]=0;for(r=h.length;r>s;){if(f[--r]o?s+1:o+1,t>o&&(t=o,i.length=1),i.reverse();t--;)i.push(0);i.reverse()}for(o=f.length,t=c.length,o-t<0&&(t=o,i=c,c=f,f=i),n=0;t;)n=(f[--t]=f[t]+c[t]+n)/F|0,f[t]%=F;for(n&&(f.unshift(n),++r),o=f.length;f[--o]==0;)f.pop();return e.d=f,e.e=ue(f,r),w?p(e,u,l):e};d.precision=d.sd=function(e){var n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($+e);return i.d?(n=Ie(i.d),e&&i.e+1>n&&(n=i.e+1)):n=NaN,n};d.round=function(){var e=this,n=e.constructor;return p(new n(e),e.e+1,n.rounding)};d.sine=d.sin=function(){var e,n,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(e=r.precision,n=r.rounding,r.precision=e+Math.max(i.e,i.sd())+m,r.rounding=1,i=rn(r,Be(r,i)),r.precision=e,r.rounding=n,p(Z>2?i.neg():i,e,n,!0)):new r(NaN)};d.squareRoot=d.sqrt=function(){var e,n,i,r,t,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=A((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),r=new c(n)):r=new c(f.toString()),i=(l=c.precision)+3;;)if(s=r,r=s.plus(S(o,s,i+2,1)).times(.5),O(s.d).slice(0,i)===(n=O(r.d)).slice(0,i))if(n=n.slice(i-3,i+1),n=="9999"||!t&&n=="4999"){if(!t&&(p(s,l+1,0),s.times(s).eq(o))){r=s;break}i+=4,t=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(p(r,l+1,1),e=!r.times(r).eq(o));break}return w=!0,p(r,l,c.rounding,e)};d.tangent=d.tan=function(){var e,n,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(e=r.precision,n=r.rounding,r.precision=e+10,r.rounding=1,i=i.sin(),i.s=1,i=S(i,new r(1).minus(i.times(i)).sqrt(),e+10,0),r.precision=e,r.rounding=n,p(Z==2||Z==4?i.neg():i,e,n,!0)):new r(NaN)};d.times=d.mul=function(e){var n,i,r,t,s,o,u,l,f,c=this,a=c.constructor,h=c.d,g=(e=new a(e)).d;if(e.s*=c.s,!h||!h[0]||!g||!g[0])return new a(!e.s||h&&!h[0]&&!g||g&&!g[0]&&!h?NaN:!h||!g?e.s/0:e.s*0);for(i=A(c.e/m)+A(e.e/m),l=h.length,f=g.length,l=0;){for(n=0,t=l+r;t>r;)u=s[t]+g[r]*h[t-r-1]+n,s[t--]=u%F|0,n=u/F|0;s[t]=(s[t]+n)%F|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};d.toBinary=function(e,n){return ke(this,2,e,n)};d.toDecimalPlaces=d.toDP=function(e,n){var i=this,r=i.constructor;return i=new r(i),e===void 0?i:(q(e,0,V),n===void 0?n=r.rounding:q(n,0,8),p(i,e+i.e+1,n))};d.toExponential=function(e,n){var i,r=this,t=r.constructor;return e===void 0?i=I(r,!0):(q(e,0,V),n===void 0?n=t.rounding:q(n,0,8),r=p(new t(r),e+1,n),i=I(r,!0,e+1)),r.isNeg()&&!r.isZero()?"-"+i:i};d.toFixed=function(e,n){var i,r,t=this,s=t.constructor;return e===void 0?i=I(t):(q(e,0,V),n===void 0?n=s.rounding:q(n,0,8),r=p(new s(t),e+t.e+1,n),i=I(r,!1,e+r.e+1)),t.isNeg()&&!t.isZero()?"-"+i:i};d.toFraction=function(e){var n,i,r,t,s,o,u,l,f,c,a,h,g=this,v=g.d,N=g.constructor;if(!v)return new N(g);if(f=i=new N(1),r=l=new N(0),n=new N(r),s=n.e=Ie(v)-g.e-1,o=s%m,n.d[0]=M(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($+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),t=i.plus(a.times(r)),t.cmp(e)!=1;)i=r,r=t,t=f,f=l.plus(a.times(t)),l=t,t=n,n=u.minus(a.times(t)),u=t;return t=S(e.minus(i),r,0,1,1),l=l.plus(t.times(f)),i=i.plus(t.times(r)),l.s=f.s=g.s,h=S(f,r,s,1).minus(g).abs().cmp(S(l,i,s,1).minus(g).abs())<1?[f,r]:[l,i],N.precision=c,w=!0,h};d.toHexadecimal=d.toHex=function(e,n){return ke(this,16,e,n)};d.toNearest=function(e,n){var i=this,r=i.constructor;if(i=new r(i),e==null){if(!i.d)return i;e=new r(1),n=r.rounding}else{if(e=new r(e),n===void 0?n=r.rounding:q(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};d.toNumber=function(){return+this};d.toOctal=function(e,n){return ke(this,8,e,n)};d.toPower=d.pow=function(e){var n,i,r,t,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(M(+u,f));if(u=new l(u),u.eq(1))return u;if(r=l.precision,s=l.rounding,e.eq(1))return p(u,r,s);if(n=A(e.e/m),n>=e.d.length-1&&(i=f<0?-f:f)<=ze)return t=De(l,u,i,r),e.s<0?new l(1).div(t):p(t,r,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),t=Ee(e.times(B(u,r+i)),r),t.d&&(t=p(t,r+5,1),Q(t.d,r,s)&&(n=r+10,t=p(Ee(e.times(B(u,n+i)),n),n+5,1),+O(t.d).slice(r+1,r+15)+1==1e14&&(t=p(t,r+1,0)))),t.s=o,w=!0,l.rounding=s,p(t,r,s))};d.toPrecision=function(e,n){var i,r=this,t=r.constructor;return e===void 0?i=I(r,r.e<=t.toExpNeg||r.e>=t.toExpPos):(q(e,1,V),n===void 0?n=t.rounding:q(n,0,8),r=p(new t(r),e,n),i=I(r,e<=r.e||r.e<=t.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+i:i};d.toSignificantDigits=d.toSD=function(e,n){var i=this,r=i.constructor;return e===void 0?(e=r.precision,n=r.rounding):(q(e,1,V),n===void 0?n=r.rounding:q(n,0,8)),p(new r(i),e,n)};d.toString=function(){var e=this,n=e.constructor,i=I(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()&&!e.isZero()?"-"+i:i};d.truncated=d.trunc=function(){return p(new this.constructor(this),this.e+1,1)};d.valueOf=d.toJSON=function(){var e=this,n=e.constructor,i=I(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()?"-"+i:i};function O(e){var n,i,r,t=e.length-1,s="",o=e[0];if(t>0){for(s+=o,n=1;ni)throw Error($+e)}function Q(e,n,i,r){var t,s,o,u;for(s=e[0];s>=10;s/=10)--n;return--n<0?(n+=m,t=0):(t=Math.ceil((n+1)/m),n%=m),s=M(10,m-n),u=e[t]%s|0,r==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[t+1]/s/100|0)==M(10,n-2)-1||(u==s/2||u==0)&&(e[t+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=(r||i<4)&&u==9999||!r&&i>3&&u==4999):o=((r||i<4)&&u+1==s||!r&&i>3&&u+1==s/2)&&(e[t+1]/s/1e3|0)==M(10,n-3)-1,o}function ie(e,n,i){for(var r,t=[0],s,o=0,u=e.length;oi-1&&(t[r+1]===void 0&&(t[r+1]=0),t[r+1]+=t[r]/i|0,t[r]%=i)}return t.reverse()}function en(e,n){var i,r,t;if(n.isZero())return n;r=n.d.length,r<32?(i=Math.ceil(r/3),t=(1/fe(4,i)).toString()):(i=16,t="2.3283064365386962890625e-10"),e.precision+=i,n=J(e,1,n.times(t),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(r,t,s){var o,u=0,l=r.length;for(r=r.slice();l--;)o=r[l]*t+u,r[l]=o%s|0,u=o/s|0;return u&&r.unshift(u),r}function n(r,t,s,o){var u,l;if(s!=o)l=s>o?1:-1;else for(u=l=0;ut[u]?1:-1;break}return l}function i(r,t,s,o){for(var u=0;s--;)r[s]-=u,u=r[s]1;)r.shift()}return function(r,t,s,o,u,l){var f,c,a,h,g,v,N,_,C,T,E,P,x,D,le,z,W,ce,L,y,ee=r.constructor,ae=r.s==t.s?1:-1,b=r.d,k=t.d;if(!b||!b[0]||!k||!k[0])return new ee(!r.s||!t.s||(b?k&&b[0]==k[0]:!k)?NaN:b&&b[0]==0||!k?ae*0:ae/0);for(l?(g=1,c=r.e-t.e):(l=F,g=m,c=A(r.e/g)-A(t.e/g)),L=k.length,W=b.length,C=new ee(ae),T=C.d=[],a=0;k[a]==(b[a]||0);a++);if(k[a]>(b[a]||0)&&c--,s==null?(D=s=ee.precision,o=ee.rounding):u?D=s+(r.e-t.e)+1:D=s,D<0)T.push(1),v=!0;else{if(D=D/g+2|0,a=0,L==1){for(h=0,k=k[0],D++;(a1&&(k=e(k,h,l),b=e(b,h,l),L=k.length,W=b.length),z=L,E=b.slice(0,L),P=E.length;P=l/2&&++ce;do h=0,f=n(k,E,L,P),f<0?(x=E[0],L!=P&&(x=x*l+(E[1]||0)),h=x/ce|0,h>1?(h>=l&&(h=l-1),N=e(k,h,l),_=N.length,P=E.length,f=n(N,E,_,P),f==1&&(h--,i(N,L<_?y:k,_,l))):(h==0&&(f=h=1),N=k.slice()),_=N.length,_=10;h/=10)a++;C.e=a+c*g-1,p(C,u?s+C.e+1:s,o,v)}return C}}();function p(e,n,i,r){var t,s,o,u,l,f,c,a,h,g=e.constructor;e:if(n!=null){if(a=e.d,!a)return e;for(t=1,u=a[0];u>=10;u/=10)t++;if(s=n-t,s<0)s+=m,o=n,c=a[h=0],l=c/M(10,t-o-1)%10|0;else if(h=Math.ceil((s+1)/m),u=a.length,h>=u)if(r){for(;u++<=h;)a.push(0);c=l=0,t=1,s%=m,o=s-m+1}else break e;else{for(c=u=a[h],t=1;u>=10;u/=10)t++;s%=m,o=s-m+t,l=o<0?0:c/M(10,t-o-1)%10|0}if(r=r||n<0||a[h+1]!==void 0||(o<0?c:c%M(10,t-o-1)),f=i<4?(l||r)&&(i==0||i==(e.s<0?3:2)):l>5||l==5&&(i==4||r||i==6&&(s>0?o>0?c/M(10,t-o):0:a[h-1])%10&1||i==(e.s<0?8:7)),n<1||!a[0])return a.length=0,f?(n-=e.e+1,a[0]=M(10,(m-n%m)%m),e.e=-n||0):a[0]=e.e=0,e;if(s==0?(a.length=h,u=1,h--):(a.length=h+1,u=M(10,m-s),a[h]=o>0?(c/M(10,t-o)%M(10,o)|0)*u:0),f)for(;;)if(h==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]==F&&(a[0]=1));break}else{if(a[h]+=u,a[h]!=F)break;a[h--]=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(r):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):t<0?(s="0."+U(-t-1)+s,i&&(r=i-o)>0&&(s+=U(r))):t>=o?(s+=U(t+1-o),i&&(r=i-t-1)>0&&(s=s+"."+U(r))):((r=t+1)0&&(t+1===o&&(s+="."),s+=U(r))),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>ye)throw w=!0,i&&(e.precision=i),Error(Te);return p(new e(re),n,1,!0)}function R(e,n,i){if(n>ve)throw Error(Te);return p(new e(te),n,i,!0)}function Ie(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 De(e,n,i,r){var t,s=new e(1),o=Math.ceil(r/m+4);for(w=!1;;){if(i%2&&(s=s.times(n),Ae(s.d,o)&&(t=!0)),i=A(i/2),i===0){i=s.d.length-1,t&&s.d[i]===0&&++s.d[i];break}n=n.times(n),Ae(n.d,o)}return w=!0,s}function be(e){return e.d[e.d.length-1]&1}function Ze(e,n,i){for(var r,t=new e(n[0]),s=0;++s17)return new h(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:0/0);for(n==null?(w=!1,l=v):l=n,u=new h(.03125);e.e>-2;)e=e.times(u),a+=5;for(r=Math.log(M(2,a))/Math.LN10*2+5|0,l+=r,i=s=o=new h(1),h.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(t=a;t--;)o=p(o.times(o),l,1);if(n==null)if(f<3&&Q(o.d,l-r,g,f))h.precision=l+=10,i=s=u=new h(1),c=0,f++;else return p(o,h.precision=v,g,w=!0);else return h.precision=v,o}o=u}}function B(e,n){var i,r,t,s,o,u,l,f,c,a,h,g=1,v=10,N=e,_=N.d,C=N.constructor,T=C.rounding,E=C.precision;if(N.s<0||!_||!_[0]||!N.e&&_[0]==1&&_.length==1)return new C(_&&!_[0]?-1/0:N.s!=1?NaN:_?0:N);if(n==null?(w=!1,c=E):c=n,C.precision=c+=v,i=O(_),r=i.charAt(0),Math.abs(s=N.e)<15e14){for(;r<7&&r!=1||r==1&&i.charAt(1)>3;)N=N.times(e),i=O(N.d),r=i.charAt(0),g++;s=N.e,r>1?(N=new C("0."+i),s++):N=new C(r+"."+i.slice(1))}else return f=se(C,c+2,E).times(s+""),N=B(new C(r+"."+i.slice(1)),c-v).plus(f),C.precision=E,n==null?p(N,E,T,w=!0):N;for(a=N,l=o=N=S(N.minus(1),N.plus(1),c,1),h=p(N.times(N),c,1),t=3;;){if(o=p(o.times(h),c,1),f=l.plus(S(o,new C(t),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(C,c+2,E).times(s+""))),l=S(l,new C(g),c,1),n==null)if(Q(l.d,c-v,T,u))C.precision=c+=v,f=o=N=S(a.minus(1),a.plus(1),c,1),h=p(N.times(N),c,1),t=u=1;else return p(l,C.precision=E,T,w=!0);else return C.precision=E,l;l=f,t+=2}}function Ue(e){return String(e.s*e.s/0)}function Se(e,n){var i,r,t;for((i=n.indexOf("."))>-1&&(n=n.replace(".","")),(r=n.search(/e/i))>0?(i<0&&(i=r),i+=+n.slice(r+1),n=n.substring(0,r)):i<0&&(i=n.length),r=0;n.charCodeAt(r)===48;r++);for(t=n.length;n.charCodeAt(t-1)===48;--t);if(n=n.slice(r,t),n){if(t-=r,e.e=i=i-r-1,e.d=[],r=(i+1)%m,i<0&&(r+=m),re.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(n=n.replace(/(\d)_(?=\d)/g,"$1"),Fe.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(Ye.test(n))i=16,n=n.toLowerCase();else if(Qe.test(n))i=2;else if(xe.test(n))i=8;else throw Error($+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,r=e.constructor,o&&(n=n.replace(".",""),u=n.length,s=u-s,t=De(r,new r(i),s,s*2)),f=ie(n,i,F),c=f.length-1,s=c;f[s]===0;--s)f.pop();return s<0?new r(e.s*0):(e.e=ue(f,c),e.d=f,w=!1,o&&(e=S(e,t,u*4)),l&&(e=e.times(Math.abs(l)<54?M(2,l):Y.pow(2,l))),w=!0,e)}function rn(e,n){var i,r=n.d.length;if(r<3)return n.isZero()?n:J(e,2,n,n);i=1.4*Math.sqrt(r),i=i>16?16:i|0,n=n.times(1/fe(5,i)),n=J(e,2,n,n);for(var t,s=new e(5),o=new e(16),u=new e(20);i--;)t=n.times(n),n=n.times(s.plus(t.times(o.times(t).minus(u))));return n}function J(e,n,i,r,t){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(r);;){if(o=S(u.times(l),new e(n++*n++),c,1),u=t?r.plus(o):r.minus(o),r=S(o.times(l),new e(n++*n++),c,1),o=u.plus(r),o.d[a]!==void 0){for(s=a;o.d[s]===u.d[s]&&s--;);if(s==-1)break}s=u,u=r,r=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 Be(e,n){var i,r=n.s<0,t=R(e,e.precision,1),s=t.times(.5);if(n=n.abs(),n.lte(s))return Z=r?4:1,n;if(i=n.divToInt(t),i.isZero())Z=r?3:2;else{if(n=n.minus(i.times(t)),n.lte(s))return Z=be(i)?r?2:3:r?4:1,n;Z=be(i)?r?1:4:r?3:2}return n.minus(t).abs()}function ke(e,n,i,r){var t,s,o,u,l,f,c,a,h,g=e.constructor,v=i!==void 0;if(v?(q(i,1,V),r===void 0?r=g.rounding:q(r,0,8)):(i=g.precision,r=g.rounding),!e.isFinite())c=Ue(e);else{for(c=I(e),o=c.indexOf("."),v?(t=2,n==16?i=i*4-3:n==8&&(i=i*3-2)):t=n,o>=0&&(c=c.replace(".",""),h=new g(1),h.e=c.length-o,h.d=ie(I(h),10,t),h.e=h.d.length),a=ie(c,10,t),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,h,i,r,0,t),a=e.d,s=e.e,f=qe),o=a[i],u=t/2,f=f||a[i+1]!==void 0,f=r<4?(o!==void 0||f)&&(r===0||r===(e.s<0?3:2)):o>u||o===u&&(r===4||f||r===6&&a[i-1]&1||r===(e.s<0?8:7)),a.length=i,f)for(;++a[--i]>t-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,t,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 tn(e){return new this(e).abs()}function sn(e){return new this(e).acos()}function on(e){return new this(e).acosh()}function un(e,n){return new this(e).plus(n)}function fn(e){return new this(e).asin()}function ln(e){return new this(e).asinh()}function cn(e){return new this(e).atan()}function an(e){return new this(e).atanh()}function hn(e,n){e=new this(e),n=new this(n);var i,r=this.precision,t=this.rounding,s=r+4;return!e.s||!n.s?i=new this(NaN):!e.d&&!n.d?(i=R(this,s,1).times(n.s>0?.25:.75),i.s=e.s):!n.d||e.isZero()?(i=n.s<0?R(this,r,t):new this(0),i.s=e.s):!e.d||n.isZero()?(i=R(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=R(this,s,1),this.precision=r,this.rounding=t,i=e.s<0?i.minus(n):i.plus(n)):i=this.atan(S(e,n,s,1)),i}function dn(e){return new this(e).cbrt()}function pn(e){return p(e=new this(e),e.e+1,2)}function gn(e,n,i){return new this(e).clamp(n,i)}function mn(e){if(!e||typeof e!="object")throw Error(oe+"Object expected");var n,i,r,t=e.defaults===!0,s=["precision",1,V,"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]&&r<=s[n+2])this[i]=r;else throw Error($+i+": "+r);if(i="crypto",t&&(this[i]=Ne[i]),(r=e[i])!==void 0)if(r===!0||r===!1||r===0||r===1)if(r)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[i]=!0;else throw Error(Le);else this[i]=!1;else throw Error($+i+": "+r);return this}function wn(e){return new this(e).cos()}function Nn(e){return new this(e).cosh()}function $e(e){var n,i,r;function t(s){var o,u,l,f=this;if(!(f instanceof t))return new t(s);if(f.constructor=t,_e(s)){f.s=s.s,w?!s.d||s.e>t.maxE?(f.e=NaN,f.d=null):s.e=10;u/=10)o++;w?o>t.maxE?(f.e=NaN,f.d=null):o=429e7?n[s]=crypto.getRandomValues(new Uint32Array(1))[0]:u[s++]=t%1e7;else if(crypto.randomBytes){for(n=crypto.randomBytes(r*=4);s=214e7?crypto.randomBytes(4).copy(n,s):(u.push(t%1e7),s+=4);s=r/4}else throw Error(Le);else for(;s=10;t/=10)r++;r{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 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 { @@ -18,6 +38,10 @@ export declare type AllModelsToStringIndex = Compute<{ + [K in keyof T as OmitValue extends true ? never : K]: T[K]; +}>; + export declare type Args = T extends { [K: symbol]: { types: { @@ -48,7 +72,9 @@ declare interface Attributes { */ declare type AttributeValue = string | number | boolean | Array | Array | Array; -export declare type BaseDMMF = Pick; +export declare type BaseDMMF = { + readonly datamodel: Omit; +}; declare type BatchArgs = { queries: BatchQuery[]; @@ -79,7 +105,7 @@ declare type BatchQueryOptionsCbArgs = { }; declare type BatchTransactionOptions = { - isolationLevel?: Transaction.IsolationLevel; + isolationLevel?: Transaction_2.IsolationLevel; }; declare interface BinaryTargetsEnvValue { @@ -108,7 +134,11 @@ export declare type ClientArgs = { client: ClientArg; }; -export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin; +export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin; + +export declare type ClientOptionDef = undefined | { + [K in string]: any; +}; declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum]; @@ -119,7 +149,7 @@ declare const ColumnTypeEnum: { readonly Double: 3; readonly Numeric: 4; readonly Boolean: 5; - readonly Char: 6; + readonly Character: 6; readonly Text: 7; readonly Date: 8; readonly Time: 9; @@ -135,7 +165,7 @@ declare const ColumnTypeEnum: { readonly DoubleArray: 67; readonly NumericArray: 68; readonly BooleanArray: 69; - readonly CharArray: 70; + readonly CharacterArray: 70; readonly TextArray: 71; readonly DateArray: 72; readonly TimeArray: 73; @@ -165,6 +195,13 @@ 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. @@ -245,23 +282,31 @@ declare type Datasources = { declare class DbNull extends NullTypesEnumValue { } -export declare interface Debug { - (namespace: string): Debugger; - disable: () => string; - enable: (namespace: string) => void; - enabled: (namespace: string) => boolean; - log: (...args: any[]) => any; - formatters: Record string) | undefined>; -} +export declare const Debug: typeof debugCreate & { + enable(namespace: any): void; + disable(): any; + enabled(namespace: string): boolean; + log: (...args: string[]) => void; + formatters: {}; +}; -declare interface Debugger { - (format: any, ...args: any[]): void; - log: (...args: any[]) => any; - extend: (namespace: string, delimiter?: string) => Debugger; - color: string | number; +/** + * 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; @@ -544,9 +589,13 @@ export declare interface DecimalJsLike { export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>; -export declare type DefaultSelection

= UnwrapPayload<{ - default: P; -}>['default']; +export declare type DefaultSelection = Args extends { + omit: infer LocalOmit; +} ? ApplyOmit['default'], PatchFlat>>> : ApplyOmit['default'], ExtractGlobalOmit>>; export declare function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel): void; @@ -574,59 +623,52 @@ export declare type DevTypeMapFnDef = { payload: OperationPayload; }; -declare interface Dictionary { - [key: string]: T; -} - -declare type Dictionary_2 = { - [key: string]: T | undefined; -}; - export declare namespace DMMF { - export interface Document { + export type Document = ReadonlyDeep_2<{ datamodel: Datamodel; schema: Schema; mappings: Mappings; - } - export interface Mappings { + }>; + export type Mappings = ReadonlyDeep_2<{ modelOperations: ModelMapping[]; otherOperations: { read: string[]; write: string[]; }; - } - export interface OtherOperationMappings { + }>; + export type OtherOperationMappings = ReadonlyDeep_2<{ read: string[]; write: string[]; - } - export interface DatamodelEnum { + }>; + export type DatamodelEnum = ReadonlyDeep_2<{ name: string; values: EnumValue[]; dbName?: string | null; documentation?: string; - } - export interface SchemaEnum { + }>; + export type SchemaEnum = ReadonlyDeep_2<{ name: string; values: string[]; - } - export interface EnumValue { + }>; + export type EnumValue = ReadonlyDeep_2<{ name: string; dbName: string | null; - } - export interface Datamodel { + }>; + export type Datamodel = ReadonlyDeep_2<{ models: Model[]; enums: DatamodelEnum[]; types: Model[]; - } - export interface uniqueIndex { + indexes: Index[]; + }>; + export type uniqueIndex = ReadonlyDeep_2<{ name: string; fields: string[]; - } - export interface PrimaryKey { + }>; + export type PrimaryKey = ReadonlyDeep_2<{ name: string | null; fields: string[]; - } - export interface Model { + }>; + export type Model = ReadonlyDeep_2<{ name: string; dbName: string | null; fields: Field[]; @@ -635,11 +677,11 @@ export declare namespace DMMF { 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 interface Field { + export type Field = ReadonlyDeep_2<{ kind: FieldKind; name: string; isRequired: boolean; @@ -658,17 +700,35 @@ export declare namespace DMMF { hasDefaultValue: boolean; default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[]; relationFromFields?: string[]; - relationToFields?: any[]; + relationToFields?: string[]; relationOnDelete?: string; relationName?: string; documentation?: string; - } - export interface FieldDefault { + }>; + export type FieldDefault = ReadonlyDeep_2<{ name: string; args: any[]; - } + }>; export type FieldDefaultScalar = string | boolean | number; - export interface Schema { + 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: { @@ -686,17 +746,17 @@ export declare namespace DMMF { fieldRefTypes: { prisma?: FieldRefType[]; }; - } - export interface Query { + }>; + export type Query = ReadonlyDeep_2<{ name: string; args: SchemaArg[]; output: QueryOutput; - } - export interface QueryOutput { + }>; + export type QueryOutput = ReadonlyDeep_2<{ name: string; isRequired: boolean; isList: boolean; - } + }>; export type TypeRef = { isList: boolean; type: string; @@ -704,33 +764,33 @@ export declare namespace DMMF { namespace?: FieldNamespace; }; export type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>; - export interface SchemaArg { + export type SchemaArg = ReadonlyDeep_2<{ name: string; comment?: string; isNullable: boolean; isRequired: boolean; inputTypes: InputTypeRef[]; deprecation?: Deprecation; - } - export interface OutputType { + }>; + export type OutputType = ReadonlyDeep_2<{ name: string; fields: SchemaField[]; - } - export interface 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 interface Deprecation { + export type Deprecation = ReadonlyDeep_2<{ sinceVersion: string; reason: string; plannedRemovalVersion?: string; - } - export interface InputType { + }>; + export type InputType = ReadonlyDeep_2<{ name: string; constraints: { maxNumFields: number | null; @@ -741,14 +801,14 @@ export declare namespace DMMF { source?: string; }; fields: SchemaArg[]; - } - export interface FieldRefType { + }>; + export type FieldRefType = ReadonlyDeep_2<{ name: string; allowTypes: FieldRefAllowType[]; fields: SchemaArg[]; - } + }>; export type FieldRefAllowType = TypeRef<'scalar' | 'enumTypes'>; - export interface ModelMapping { + export type ModelMapping = ReadonlyDeep_2<{ model: string; plural: string; findUnique?: string | null; @@ -758,6 +818,7 @@ export declare namespace DMMF { findMany?: string | null; create?: string | null; createMany?: string | null; + createManyAndReturn?: string | null; update?: string | null; updateMany?: string | null; upsert?: string | null; @@ -768,7 +829,7 @@ export declare namespace DMMF { count?: string | null; findRaw?: string | null; aggregateRaw?: string | null; - } + }>; export enum ModelAction { findUnique = "findUnique", findUniqueOrThrow = "findUniqueOrThrow", @@ -777,95 +838,64 @@ export declare namespace DMMF { findMany = "findMany", create = "create", createMany = "createMany", + createManyAndReturn = "createManyAndReturn", update = "update", updateMany = "updateMany", upsert = "upsert", delete = "delete", deleteMany = "deleteMany", groupBy = "groupBy", - count = "count", + count = "count",// TODO: count does not actually exist, why? aggregate = "aggregate", findRaw = "findRaw", aggregateRaw = "aggregateRaw" } } -export declare class DMMFClass implements DMMF.Document { - document: DMMF.Document; - private compositeNames; - private inputTypesByName; - readonly typeAndModelMap: Dictionary; - readonly mappingsMap: Dictionary; - readonly outputTypeMap: NamespacedTypeMap; - readonly rootFieldMap: Dictionary; - constructor(document: DMMF.Document); - get datamodel(): DMMF.Datamodel; - get mappings(): DMMF.Mappings; - get schema(): DMMF.Schema; - get inputObjectTypes(): { - model?: DMMF.InputType[] | undefined; - prisma: DMMF.InputType[]; - }; - get outputObjectTypes(): { - model: DMMF.OutputType[]; - prisma: DMMF.OutputType[]; - }; - isComposite(modelOrTypeName: string): boolean; - getOtherOperationNames(): string[]; - hasEnumInNamespace(enumName: string, namespace: DMMF.FieldNamespace): boolean; - resolveInputObjectType(ref: DMMF.InputTypeRef): DMMF.InputType | undefined; - resolveOutputObjectType(ref: DMMF.OutputTypeRef): DMMF.OutputType | undefined; - private buildModelMap; - private buildTypeMap; - private buildTypeModelMap; - private buildMappingsMap; - private buildMergedOutputTypeMap; - private buildRootFieldMap; - private buildInputTypesMap; -} - export declare interface DriverAdapter extends Queryable { /** - * Starts new transation. + * Starts new transaction. */ - startTransaction(): Promise>; + startTransaction(): Promise>; /** - * Closes the connection to the database, if any. + * Optional method that returns extra connection info */ - close: () => Promise>; + getConnectionInfo?(): Result_4; } /** Client */ -export declare type DynamicClientExtensionArgs> = { +export declare type DynamicClientExtensionArgs, ClientOptions> = { [P in keyof C_]: unknown; } & { [K: symbol]: { - ctx: Optional, ITXClientDenyList> & { - $parent: Optional, ITXClientDenyList>; + ctx: Optional, ITXClientDenyList> & { + $parent: Optional, ITXClientDenyList>; }; }; }; -export declare type DynamicClientExtensionThis> = { +export declare type DynamicClientExtensionThis, ClientOptions> = { [P in keyof ExtArgs['client']]: Return; } & { - [P in Exclude]: DynamicModelExtensionThis, ExtArgs>; + [P in Exclude]: DynamicModelExtensionThis, ExtArgs, ClientOptions>; } & { - [P in Exclude]: >(...args: ToTuple) => PrismaPromise; + [P in Exclude]: >(...args: ToTuple) => PrismaPromise; } & { - [P in Exclude]: DynamicClientExtensionThisBuiltin[P]; + [P in Exclude]: DynamicClientExtensionThisBuiltin[P]; } & { [K: symbol]: { types: TypeMap['other']; }; }; -export declare type DynamicClientExtensionThisBuiltin> = { - $extends: ExtendsHook<'extends', TypeMapCb, ExtArgs>; +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?: { + $transaction(fn: (client: Omit, ITXClientDenyList>) => Promise, options?: { maxWait?: number; timeout?: number; isolationLevel?: TypeMap['meta']['txIsolationLevel']; @@ -875,7 +905,7 @@ export declare type DynamicClientExtensionThisBuiltin> = { +export declare type DynamicModelExtensionArgs, ClientOptions> = { [K in keyof M_]: K extends '$allModels' ? { [P in keyof M_[K]]?: unknown; } & { @@ -884,8 +914,8 @@ export declare type DynamicModelExtensionArgs, ExtArgs> & { - $parent: DynamicClientExtensionThis; + ctx: DynamicModelExtensionThis, ExtArgs, ClientOptions> & { + $parent: DynamicClientExtensionThis; } & { $name: ModelKey; } & { @@ -898,26 +928,26 @@ export declare type DynamicModelExtensionArgs = { +export declare type DynamicModelExtensionFluentApi = { [K in keyof TypeMap['model'][M]['payload']['objects']]: (args?: Exact>) => PrismaPromise, [K]> | Null> & DynamicModelExtensionFluentApi>; + }, P, ClientOptions>, [K]> | Null> & DynamicModelExtensionFluentApi, ClientOptions>; }; -export declare type DynamicModelExtensionFnResult> = P extends FluentOperation ? DynamicModelExtensionFluentApi & PrismaPromise | Null> : PrismaPromise>; +export declare type DynamicModelExtensionFnResult = P extends FluentOperation ? DynamicModelExtensionFluentApi & PrismaPromise | Null> : PrismaPromise>; -export declare type DynamicModelExtensionFnResultBase = GetResult; +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 : (args: Exact) => DynamicModelExtensionFnResult; +export declare type DynamicModelExtensionOperationFn = {} extends TypeMap['model'][M]['operations'][P]['args'] ? (args?: Exact) => DynamicModelExtensionFnResult, ClientOptions> : (args: Exact) => DynamicModelExtensionFnResult, ClientOptions>; -export declare type DynamicModelExtensionThis> = { +export declare type DynamicModelExtensionThis, ClientOptions> = { [P in keyof ExtArgs['model'][Uncapitalize]]: Return][P]>; } & { - [P in Exclude]>]: DynamicModelExtensionOperationFn; + [P in Exclude]>]: DynamicModelExtensionOperationFn; } & { [P in Exclude<'fields', keyof ExtArgs['model'][Uncapitalize]>]: TypeMap['model'][M]['fields']; } & { @@ -965,7 +995,7 @@ export declare type DynamicResultExtensionArgs = export declare type DynamicResultExtensionData = GetFindResult; +}, {}>; export declare type DynamicResultExtensionNeeds = { [K in keyof S]: K extends keyof TypeMap['model'][M]['payload']['scalars'] ? S[K] : never; @@ -980,18 +1010,21 @@ export declare const empty: Sql; export declare type EmptyToUnknown = T; -declare abstract class Engine { - abstract on(event: EngineEventType, listener: (args?: any) => any): void; - abstract start(): Promise; - abstract stop(): Promise; - abstract version(forceRun?: boolean): Promise | string; - abstract request(query: JsonQuery, options: RequestOptions): Promise>; - abstract requestBatch(queries: JsonQuery[], options: RequestBatchOptions): Promise[]>; - abstract transaction(action: 'start', headers: Transaction.TransactionHeaders, options?: Transaction.Options): Promise>; - abstract transaction(action: 'commit', headers: Transaction.TransactionHeaders, info: Transaction.InteractiveTransactionInfo): Promise; - abstract transaction(action: 'rollback', headers: Transaction.TransactionHeaders, info: Transaction.InteractiveTransactionInfo): Promise; - abstract metrics(options: MetricsOptionsJson): Promise; - abstract metrics(options: MetricsOptionsPrometheus): Promise; +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 { @@ -1013,26 +1046,28 @@ declare interface EngineConfig { previewFeatures?: string[]; engineEndpoint?: string; activeProvider?: string; - logEmitter: EventEmitter; + 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 for the purpose of data proxy + * @remarks only used by DataProxyEngine.ts */ inlineSchema: string; /** * The contents of the datasource url saved in a string - * @remarks only used for the purpose of data proxy + * @remarks only used by DataProxyEngine.ts */ inlineDatasources: GetPrismaClientConfig['inlineDatasources']; /** * The string hash that was produced for a given schema - * @remarks only used for the purpose of data proxy + * @remarks only used by DataProxyEngine.ts */ inlineSchemaHash: string; /** @@ -1046,9 +1081,32 @@ declare interface EngineConfig { * 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 EngineEventType = 'query' | 'info' | 'warn' | 'error' | 'beforeExit'; +declare type EngineEvent = E extends QueryEventType ? QueryEvent : LogEvent; + +declare type EngineEventType = QueryEventType | LogEventType; + +declare type EngineProtocol = 'graphql' | 'json'; declare type EngineSpan = { span: boolean; @@ -1070,6 +1128,11 @@ declare type EngineSpanEvent = { spans: EngineSpan[]; }; +declare type EnvPaths = { + rootEnvPath: string | null; + schemaEnvPath: string | undefined; +}; + declare interface EnvValue { fromEnvVar: null | string; value: null | string; @@ -1078,16 +1141,31 @@ declare interface EnvValue { export declare type Equals = (() => T extends A ? 1 : 2) extends (() => T extends B ? 1 : 2) ? 1 : 0; declare type Error_2 = { - kind: 'GenericJsError'; + kind: 'GenericJs'; id: number; } | { - kind: 'PostgresError'; + 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 { @@ -1108,10 +1186,7 @@ declare interface ErrorWithBatchIndex { batchRequestIdx?: number; } -declare interface EventEmitter { - on(event: string, listener: (...args: any[]) => void): unknown; - emit(event: string, args?: any): boolean; -} +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; @@ -1145,6 +1220,8 @@ declare interface ExceptionWithName { stack?: string; } +declare type ExtendedEventType = LogLevel | 'beforeExit'; + declare type ExtendedSpanOptions = SpanOptions & { /** The name of the span */ name: string; @@ -1159,7 +1236,7 @@ declare type ExtendedSpanOptions = SpanOptions & { /** $extends, defineExtension */ export declare interface ExtendsHook, TypeMap extends TypeMapDef = Call> { +}>, ClientOptions = {}> { extArgs: ExtArgs; , MergedArgs extends InternalArgs = MergeExtArgs>(extension: ((client: DynamicClientExtensionThis) => { + }, C, Args extends InternalArgs = InternalArgs, MergedArgs extends InternalArgs = MergeExtArgs>(extension: ((client: DynamicClientExtensionThis) => { $extends: { extArgs: Args; }; @@ -1177,12 +1254,12 @@ export declare interface ExtendsHook; result?: DynamicResultExtensionArgs & R; - model?: DynamicModelExtensionArgs & M; - client?: DynamicClientExtensionArgs & C; + model?: DynamicModelExtensionArgs & M; + client?: DynamicClientExtensionArgs & C; }): { extends: DynamicClientExtensionThis, TypeMapCb, MergedArgs>; + }>, TypeMapCb, MergedArgs, ClientOptions>; define: (client: any) => { $extends: { extArgs: Args; @@ -1207,6 +1284,7 @@ declare namespace Extensions_2 { DefaultArgs, GetPayloadResult, GetSelect, + GetOmit, DynamicQueryExtensionArgs, DynamicQueryExtensionCb, DynamicQueryExtensionCbArgs, @@ -1231,12 +1309,19 @@ declare namespace Extensions_2 { TypeMapDef, DevTypeMapDef, DevTypeMapFnDef, + ClientOptionDef, TypeMapCbDef, ModelKey, RequiredExtensionArgs as UserArgs } } +export declare type ExtractGlobalOmit = Options extends { + omit: { + [K in ModelName]: infer GlobalOmit; + }; +} ? GlobalOmit : {}; + declare type Fetch = typeof nodeFetch; /** @@ -1261,9 +1346,22 @@ declare interface GeneratorConfig { output: EnvValue | null; isCustomOutput?: boolean; provider: EnvValue; - config: Dictionary_2; + 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

= { @@ -1272,6 +1370,8 @@ export declare type GetAggregateResult

= { }; }; +declare function getBatchRequestPayload(batch: JsonQuery[], transaction?: TransactionOptions_2): QueryEngineBatchRequest; + export declare type GetBatchResult = { count: number; }; @@ -1282,19 +1382,19 @@ export declare type GetCountResult = A extends { declare function getExtensionContext(that: T): Context_2; -export declare type GetFindResult

= Equals extends 1 ? DefaultSelection

: A extends { +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 | 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 { + [K in keyof S | keyof I as (S & I)[K] extends false | undefined | 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

; +} & Record ? DefaultSelection : unknown) : DefaultSelection; export declare type GetGroupByResult

= A extends { by: string[]; @@ -1306,6 +1406,10 @@ export declare type GetGroupByResult

= A extends [K in A['by']]: P['scalars'][K]; }> : {}[]; +export declare type GetOmit = { + [K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean; +}; + export declare type GetPayloadResult, R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = unknown extends R ? Base : { [K in KR | keyof Base]: K extends KR ? R[K] extends () => { compute: (...args: any) => infer C; @@ -1314,11 +1418,13 @@ export declare type GetPayloadResult, R extends In 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; @@ -1326,6 +1432,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): { _middlewares: MiddlewareHandler; _previewFeatures: string[]; _activeProvider: string; + _globalOmit?: GlobalOmitOptions | undefined; _extensions: MergedExtensionsList; _engine: Engine; /** @@ -1339,7 +1446,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): { * @param middleware to hook */ $use(middleware: QueryMiddleware): void; - $on(eventType: EngineEventType, callback: (event: any) => void): void; + $on(eventType: E, callback: EventCallback): void; $connect(): Promise; /** * Disconnect from the database @@ -1377,7 +1484,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): { /** * Executes a raw query and returns selected data */ - $queryRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; + $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 @@ -1403,7 +1510,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): { */ _transactionWithArray({ promises, options, }: { promises: Array>; - options?: BatchTransactionOptions | undefined; + options?: BatchTransactionOptions; }): Promise; /** * Perform a long-running transaction @@ -1413,7 +1520,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): { */ _transactionWithCallback({ callback, options, }: { callback: (client: Client) => Promise; - options?: Options_2 | undefined; + options?: Options; }): Promise; _createItxClient(transaction: PrismaPromiseInteractiveTransaction): Client; /** @@ -1437,6 +1544,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): { * @returns */ _hasPreviewFlag(feature: string): boolean; + $applyPendingMigrations(): Promise; $extends: typeof $extends; readonly [Symbol.toStringTag]: string; }; @@ -1460,7 +1568,7 @@ declare type GetPrismaClientConfig = { clientVersion: string; engineVersion: string; datasourceNames: string[]; - activeProvider: string; + activeProvider: ActiveConnectorType; /** * The contents of the schema encoded into a string * @remarks only used for the purpose of data proxy @@ -1510,28 +1618,33 @@ declare type GetPrismaClientConfig = { */ isBundled?: boolean; /** - * A boolean that is `true` when the client was generated with --no-engine. At + * 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. */ - noEngine?: boolean; + 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; +export declare type GetResult = { + findUnique: GetFindResult | null; + findUniqueOrThrow: GetFindResult; + findFirst: GetFindResult | null; + findFirstOrThrow: GetFindResult; + findMany: GetFindResult[]; + create: GetFindResult; createMany: GetBatchResult; - update: GetFindResult; + createManyAndReturn: GetFindResult[]; + update: GetFindResult; updateMany: GetBatchResult; - upsert: GetFindResult; - delete: GetFindResult; + upsert: GetFindResult; + delete: GetFindResult; deleteMany: GetBatchResult; - aggregate: GetAggregateResult; - count: GetCountResult; - groupBy: GetGroupByResult; + aggregate: GetAggregateResult; + count: GetCountResult; + groupBy: GetGroupByResult; $queryRaw: unknown; $executeRaw: number; $queryRawUnsafe: unknown; @@ -1539,18 +1652,34 @@ export declare type GetResult

, 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; }; /** @@ -1580,7 +1709,7 @@ declare type InteractiveTransactionInfo = { payload: Payload; }; -declare type InteractiveTransactionOptions = Transaction.InteractiveTransactionInfo; +declare type InteractiveTransactionOptions = Transaction_2.InteractiveTransactionInfo; export declare type InternalArgs { } +declare type JsonBatchQuery = { + batch: JsonQuery[]; + transaction?: { + isolationLevel?: Transaction_2.IsolationLevel; + }; +}; + export declare interface JsonConvertible { toJSON(): unknown; } declare type JsonFieldSelection = { - arguments?: Record; + arguments?: Record | RawTaggedValue; selection: JsonSelectionSet; }; @@ -1704,7 +1841,7 @@ declare type JsonQuery = { query: JsonFieldSelection; }; -declare type JsonQueryAction = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'updateOne' | 'updateMany' | 'deleteOne' | 'deleteMany' | 'upsertOne' | 'aggregate' | 'groupBy' | 'executeRaw' | 'queryRaw' | 'runCommandRaw' | 'findRaw' | 'aggregateRaw'; +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; @@ -1713,11 +1850,6 @@ declare type JsonSelectionSet = { [fieldName: string]: boolean | JsonFieldSelection; }; -declare type JsonTaggedValue = { - $type: 'Json'; - value: string; -}; - export declare type JsonValue = string | number | boolean | JsonObject | JsonArray | null; export declare type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | { @@ -1775,6 +1907,26 @@ declare type LogDefinition = { 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'; /** @@ -1919,11 +2071,6 @@ export declare type NameArgs = { name?: string; }; -declare type NamespacedTypeMap = { - prisma: Record; - model: Record; -}; - export declare type Narrow = { [K in keyof A]: A[K] extends Function ? A[K] : Narrow; } | (A extends Narrowable ? A : never); @@ -1940,7 +2087,7 @@ export declare type NeverToUnknown = [T] extends [never] ? unknown : T; * @param options * @returns */ -declare function nodeFetch(url: string, options?: RequestOptions_2): Promise; +declare function nodeFetch(url: string, options?: RequestOptions): Promise; declare class NodeHeaders { readonly headers: Map; @@ -1995,14 +2142,21 @@ export declare const objectEnumValues: { }; }; +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 Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; +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; }; @@ -2029,19 +2183,15 @@ export declare type OptionalKeys = { }[keyof O]; declare type Options = { - clientVersion: string; -}; - -/** - * maxWait ?= 2000 - * timeout ?= 5000 - */ -declare type Options_2 = { maxWait?: number; timeout?: number; isolationLevel?: IsolationLevel; }; +declare type Options_2 = { + clientVersion: string; +}; + export declare type Or = { 0: { 0: 0; @@ -2099,7 +2249,7 @@ export declare type PrismaClientOptions = { /** * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale. */ - adapter?: DriverAdapter; + adapter?: DriverAdapter | null; /** * Overwrites the datasource url from your schema.prisma file */ @@ -2108,6 +2258,12 @@ export declare type PrismaClientOptions = { * @default "colorless" */ errorFormat?: ErrorFormat; + /** + * The default values for Transaction options + * maxWait ?= 2000 + * timeout ?= 5000 + */ + transactionOptions?: Transaction_2.Options; /** * @example * \`\`\` @@ -2124,6 +2280,7 @@ export declare type PrismaClientOptions = { * 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. @@ -2136,6 +2293,8 @@ export declare type PrismaClientOptions = { endpoint?: string; allowTriggerPanic?: boolean; }; + /** This can be used for testing purposes */ + configOverride?: (config: GetPrismaClientConfig) => GetPrismaClientConfig; }; }; @@ -2155,10 +2314,12 @@ export declare class PrismaClientUnknownRequestError extends Error implements Er export declare class PrismaClientValidationError extends Error { name: string; clientVersion: string; - constructor(message: string, { clientVersion }: Options); + 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'; } @@ -2248,14 +2409,15 @@ declare type Query = { }; declare interface Queryable { - readonly flavour: 'mysql' | 'postgres' | 'sqlite'; + 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>; + queryRaw(params: Query): Promise>; /** * Execute a query given as SQL, interpolating the given parameters, * and returning the number of affected rows. @@ -2263,14 +2425,77 @@ declare interface Queryable { * This is the preferred way of executing `INSERT`, `UPDATE`, `DELETE` queries, * as well as transactional queries. */ - executeRaw(params: Query): Promise>; + 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 = { @@ -2314,6 +2539,11 @@ export declare type RawParameters = { export declare type RawQueryArgs = Sql | [query: string, ...values: RawValue[]]; +declare type RawTaggedValue = { + $type: 'Raw'; + value: unknown; +}; + /** * Supported value or SQL instance. */ @@ -2323,6 +2553,10 @@ 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; }; @@ -2333,18 +2567,29 @@ export declare type RenameAndNestPayloadKeys

= { }; declare type RequestBatchOptions = { - transaction?: TransactionOptions; + 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?: EventEmitter); + constructor(client: Client, logEmitter?: LogEmitter); request(params: RequestParams): Promise; mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResult): any; /** @@ -2352,13 +2597,19 @@ declare class RequestHandler { * handlers to finish. */ handleAndLogRequestError(params: HandleErrorParams): never; - handleRequestError({ error, clientMethod, callsite, transaction, args }: 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 = { +declare type RequestOptions = { + method?: string; + headers?: Record; + body?: string; +}; + +declare type RequestOptions_2 = { traceparent?: string; numTry?: number; interactiveTransaction?: InteractiveTransactionOptions; @@ -2366,12 +2617,6 @@ declare type RequestOptions = { customDataProxyFetch?: (fetch: Fetch) => Fetch; }; -declare type RequestOptions_2 = { - method?: string; - headers?: Record; - body?: string; -}; - declare type RequestParams = { modelName?: string; action: Action; @@ -2386,6 +2631,7 @@ declare type RequestParams = { unpacker?: Unpacker; otelParentCtx?: Context; otelChildCtx?: Context; + globalOmit?: GlobalOmitOptions; customDataProxyFetch?: (fetch: Fetch) => Fetch; }; @@ -2407,6 +2653,13 @@ 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: { @@ -2417,22 +2670,12 @@ export declare type Result = T extends { composites: {}; objects: {}; scalars: {}; + name: ''; }, {}, F>; export declare type Result_2 = Result; -declare type Result_3 = { - map(fn: (value: T) => U): Result_3; - flatMap(fn: (value: T) => Result_3): Result_3; -} & ({ - readonly ok: true; - readonly value: T; -} | { - readonly ok: false; - readonly error: Error_2; -}); - -declare namespace Result_4 { +declare namespace Result_3 { export { Operation, FluentOperation, @@ -2442,15 +2685,29 @@ declare namespace Result_4 { SelectField, DefaultSelection, UnwrapPayload, + ApplyOmit, + OmitValue, GetCountResult, Aggregate, GetAggregateResult, GetBatchResult, GetGroupByResult, - GetResult + 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; }; @@ -2487,13 +2744,15 @@ declare interface ResultSet { rows: Array>; /** * The last ID of an `INSERT` statement, if any. - * This is required for `AUTO_INCREMENT` columns in MySQL and SQLite-flavoured databases. + * 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"; + declare type RuntimeDataModel = { readonly models: Record; readonly enums: Record; @@ -2573,6 +2832,24 @@ declare interface Span { * @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 @@ -2764,11 +3041,13 @@ export declare class Sql { readonly values: Value[]; readonly strings: string[]; constructor(rawStrings: readonly string[], rawValues: readonly RawValue[]); - get text(): string; get sql(): string; + get statement(): string; + get text(): string; inspect(): { - text: string; sql: string; + statement: string; + text: string; values: unknown[]; }; } @@ -2833,42 +3112,39 @@ declare interface TracingHelper { runInChildSpan(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback): R; } -declare namespace Transaction { - export { - IsolationLevel, - Options_2 as Options, - InteractiveTransactionInfo, - TransactionHeaders - } -} - -declare interface Transaction_2 extends Queryable { +declare interface Transaction extends Queryable { /** * Transaction options. */ - readonly options: TransactionOptions_2; + readonly options: TransactionOptions; /** * Commit the transaction. */ - commit(): Promise>; + commit(): Promise>; /** * Rolls back the transaction. */ - rollback(): Promise>; - /** - * Discards and closes the transaction which may or may not have been committed or rolled back. - * This operation must be synchronous. If the implementation requires calling creating new - * asynchronous tasks on the event loop, the driver is responsible for handling the errors - * appropriately to ensure they don't crash the application. - */ - dispose(): Result_3; + rollback(): Promise>; +} + +declare namespace Transaction_2 { + export { + IsolationLevel, + Options, + InteractiveTransactionInfo, + TransactionHeaders + } } declare type TransactionHeaders = { traceparent?: string; }; -declare type TransactionOptions = { +declare type TransactionOptions = { + usePhantomQuery: boolean; +}; + +declare type TransactionOptions_2 = { kind: 'itx'; options: InteractiveTransactionOptions; } | { @@ -2876,12 +3152,9 @@ declare type TransactionOptions = { options: BatchTransactionOptions; }; -declare type TransactionOptions_2 = { - usePhantomQuery: boolean; -}; - export declare type TypeMapCbDef = Fn<{ extArgs: InternalArgs; + clientOptions: ClientOptionDef; }, TypeMapDef>; /** Shared */ @@ -2889,7 +3162,7 @@ export declare type TypeMapDef = Record; declare namespace Types { export { - Result_4 as Result, + Result_3 as Result, Extensions_2 as Extensions, Utils, Public_2 as Public, @@ -2979,4 +3252,22 @@ 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/experiments/mongodb/prisma/generated/client/runtime/library.js b/experiments/mongodb/prisma/generated/client/runtime/library.js index 65b30894c..5cd4f3fe9 100644 --- a/experiments/mongodb/prisma/generated/client/runtime/library.js +++ b/experiments/mongodb/prisma/generated/client/runtime/library.js @@ -1,73 +1,71 @@ -"use strict";var Ll=Object.create;var Mt=Object.defineProperty;var $l=Object.getOwnPropertyDescriptor;var ql=Object.getOwnPropertyNames;var Vl=Object.getPrototypeOf,jl=Object.prototype.hasOwnProperty;var Bl=(e,t,r)=>t in e?Mt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var V=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),St=(e,t)=>{for(var r in t)Mt(e,r,{get:t[r],enumerable:!0})},Xi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ql(t))!jl.call(e,i)&&i!==r&&Mt(e,i,{get:()=>t[i],enumerable:!(n=$l(t,i))||n.enumerable});return e};var S=(e,t,r)=>(r=e!=null?Ll(Vl(e)):{},Xi(t||!e||!e.__esModule?Mt(r,"default",{value:e,enumerable:!0}):r,e)),Ul=e=>Xi(Mt({},"__esModule",{value:!0}),e);var eo=(e,t,r)=>(Bl(e,typeof t!="symbol"?t+"":t,r),r);var co=V((xm,uo)=>{"use strict";var rt=1e3,nt=rt*60,it=nt*60,Qe=it*24,Kl=Qe*7,Ql=Qe*365.25;uo.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return Gl(e);if(r==="number"&&isFinite(e))return t.long?Hl(e):Jl(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Gl(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Ql;case"weeks":case"week":case"w":return r*Kl;case"days":case"day":case"d":return r*Qe;case"hours":case"hour":case"hrs":case"hr":case"h":return r*it;case"minutes":case"minute":case"mins":case"min":case"m":return r*nt;case"seconds":case"second":case"secs":case"sec":case"s":return r*rt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Jl(e){var t=Math.abs(e);return t>=Qe?Math.round(e/Qe)+"d":t>=it?Math.round(e/it)+"h":t>=nt?Math.round(e/nt)+"m":t>=rt?Math.round(e/rt)+"s":e+"ms"}function Hl(e){var t=Math.abs(e);return t>=Qe?br(e,t,Qe,"day"):t>=it?br(e,t,it,"hour"):t>=nt?br(e,t,nt,"minute"):t>=rt?br(e,t,rt,"second"):e+" ms"}function br(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var kn=V((bm,po)=>{"use strict";function Wl(e){r.debug=r,r.default=r,r.coerce=l,r.disable=o,r.enable=i,r.enabled=s,r.humanize=co(),r.destroy=u,Object.keys(e).forEach(c=>{r[c]=e[c]}),r.names=[],r.skips=[],r.formatters={};function t(c){let p=0;for(let d=0;d{if(J==="%%")return"%";R++;let $=r.formatters[Ke];if(typeof $=="function"){let z=P[R];J=$.call(T,z),P.splice(R,1),R--}return J}),r.formatArgs.call(T,P),(T.log||r.log).apply(T,P)}return g.namespace=c,g.useColors=r.useColors(),g.color=r.selectColor(c),g.extend=n,g.destroy=r.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(f!==r.namespaces&&(f=r.namespaces,y=r.enabled(c)),y),set:P=>{d=P}}),typeof r.init=="function"&&r.init(g),g}function n(c,p){let d=r(this.namespace+(typeof p>"u"?":":p)+c);return d.log=this.log,d}function i(c){r.save(c),r.namespaces=c,r.names=[],r.skips=[];let p,d=(typeof c=="string"?c:"").split(/[\s,]+/),f=d.length;for(p=0;p"-"+p)].join(",");return r.enable(""),c}function s(c){if(c[c.length-1]==="*")return!0;let p,d;for(p=0,d=r.skips.length;p{"use strict";le.formatArgs=Yl;le.save=Zl;le.load=Xl;le.useColors=zl;le.storage=eu();le.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();le.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function zl(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Yl(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Er.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),e.splice(n,0,t)}le.log=console.debug||console.log||(()=>{});function Zl(e){try{e?le.storage.setItem("debug",e):le.storage.removeItem("debug")}catch{}}function Xl(){let e;try{e=le.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function eu(){try{return localStorage}catch{}}Er.exports=kn()(le);var{formatters:tu}=Er.exports;tu.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Fn=V((Em,fo)=>{"use strict";fo.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 ru=require("os"),go=require("tty"),de=Fn(),{env:B}=process,ke;de("no-color")||de("no-colors")||de("color=false")||de("color=never")?ke=0:(de("color")||de("colors")||de("color=true")||de("color=always"))&&(ke=1);"FORCE_COLOR"in B&&(B.FORCE_COLOR==="true"?ke=1:B.FORCE_COLOR==="false"?ke=0:ke=B.FORCE_COLOR.length===0?1:Math.min(parseInt(B.FORCE_COLOR,10),3));function On(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Dn(e,t){if(ke===0)return 0;if(de("color=16m")||de("color=full")||de("color=truecolor"))return 3;if(de("color=256"))return 2;if(e&&!t&&ke===void 0)return 0;let r=ke||0;if(B.TERM==="dumb")return r;if(process.platform==="win32"){let n=ru.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in B)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in B)||B.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in B)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(B.TEAMCITY_VERSION)?1:0;if(B.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in B){let n=parseInt((B.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(B.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(B.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(B.TERM)||"COLORTERM"in B?1:r}function nu(e){let t=Dn(e,e&&e.isTTY);return On(t)}yo.exports={supportsColor:nu,stdout:On(Dn(!0,go.isatty(1))),stderr:On(Dn(!0,go.isatty(2)))}});var xo=V((H,Pr)=>{"use strict";var iu=require("tty"),wr=require("util");H.init=pu;H.log=lu;H.formatArgs=su;H.save=uu;H.load=cu;H.useColors=ou;H.destroy=wr.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");H.colors=[6,2,3,4,5,1];try{let e=_n();e&&(e.stderr||e).level>=2&&(H.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}H.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(i,o)=>o.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function ou(){return"colors"in H.inspectOpts?!!H.inspectOpts.colors:iu.isatty(process.stderr.fd)}function su(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${i};1m${t} \x1B[0m`;e[0]=o+e[0].split(` -`).join(` -`+o),e.push(i+"m+"+Pr.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=au()+t+" "+e[0]}function au(){return H.inspectOpts.hideDate?"":new Date().toISOString()+" "}function lu(...e){return process.stderr.write(wr.format(...e)+` -`)}function uu(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function cu(){return process.env.DEBUG}function pu(e){e.inspectOpts={};let t=Object.keys(H.inspectOpts);for(let r=0;rt.trim()).join(" ")};ho.O=function(e){return this.inspectOpts.colors=this.useColors,wr.inspect(e,this.inspectOpts)}});var Ln=V((Pm,Nn)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Nn.exports=mo():Nn.exports=xo()});var So=V((ef,Un)=>{"use strict";var A=Un.exports;Un.exports.default=A;var I="\x1B[",kt="\x1B]",at="\x07",Rr=";",Mo=process.env.TERM_PROGRAM==="Apple_Terminal";A.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?I+(e+1)+"G":I+(t+1)+";"+(e+1)+"H"};A.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let r="";return e<0?r+=I+-e+"D":e>0&&(r+=I+e+"C"),t<0?r+=I+-t+"A":t>0&&(r+=I+t+"B"),r};A.cursorUp=(e=1)=>I+e+"A";A.cursorDown=(e=1)=>I+e+"B";A.cursorForward=(e=1)=>I+e+"C";A.cursorBackward=(e=1)=>I+e+"D";A.cursorLeft=I+"G";A.cursorSavePosition=Mo?"\x1B7":I+"s";A.cursorRestorePosition=Mo?"\x1B8":I+"u";A.cursorGetPosition=I+"6n";A.cursorNextLine=I+"E";A.cursorPrevLine=I+"F";A.cursorHide=I+"?25l";A.cursorShow=I+"?25h";A.eraseLines=e=>{let t="";for(let r=0;r[kt,"8",Rr,Rr,t,at,e,kt,"8",Rr,Rr,at].join("");A.image=(e,t={})=>{let r=`${kt}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")+at};A.iTerm={setCwd:(e=process.cwd())=>`${kt}50;CurrentDir=${e}${at}`,annotation:(e,t={})=>{let r=`${kt}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+at}}});var Fo=V((tf,ko)=>{"use strict";var hu=_n(),lt=Fn();function Io(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 Kn(e){let{env:t}=process;if("FORCE_HYPERLINK"in t)return!(t.FORCE_HYPERLINK.length>0&&parseInt(t.FORCE_HYPERLINK,10)===0);if(lt("no-hyperlink")||lt("no-hyperlinks")||lt("hyperlink=false")||lt("hyperlink=never"))return!1;if(lt("hyperlink=true")||lt("hyperlink=always")||"NETLIFY"in t)return!0;if(!hu.supportsColor(e)||e&&!e.isTTY||process.platform==="win32"||"CI"in t||"TEAMCITY_VERSION"in t)return!1;if("TERM_PROGRAM"in t){let r=Io(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=Io(t.VTE_VERSION);return r.major>0||r.minor>=50}return!1}ko.exports={supportsHyperlink:Kn,stdout:Kn(process.stdout),stderr:Kn(process.stderr)}});var Do=V((rf,Ft)=>{"use strict";var xu=So(),Qn=Fo(),Oo=(e,t,{target:r="stdout",...n}={})=>Qn[r]?xu.link(e,t):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,t):`${e} (\u200B${t}\u200B)`;Ft.exports=(e,t,r={})=>Oo(e,t,r);Ft.exports.stderr=(e,t,r={})=>Oo(e,t,{target:"stderr",...r});Ft.exports.isSupported=Qn.stdout;Ft.exports.stderr.isSupported=Qn.stderr});var Ko=V((wf,Ou)=>{Ou.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 Go=V((Pf,Fr)=>{"use strict";var Du=require("fs"),Qo=require("path"),_u=require("os"),Nu=Ko(),Lu=Nu.version,$u=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function qu(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,` -`);let n;for(;(n=$u.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 Wn(e){console.log(`[dotenv@${Lu}][DEBUG] ${e}`)}function Vu(e){return e[0]==="~"?Qo.join(_u.homedir(),e.slice(1)):e}function ju(e){let t=Qo.resolve(process.cwd(),".env"),r="utf8",n=!!(e&&e.debug),i=!!(e&&e.override);e&&(e.path!=null&&(t=Vu(e.path)),e.encoding!=null&&(r=e.encoding));try{let o=kr.parse(Du.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&&Wn(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&&Wn(`Failed to load ${t} ${o.message}`),{error:o}}}var kr={config:ju,parse:qu};Fr.exports.config=kr.config;Fr.exports.parse=kr.parse;Fr.exports=kr});var Zo=V((Sf,Yo)=>{"use strict";Yo.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var es=V((If,Xo)=>{"use strict";var Qu=Zo();Xo.exports=e=>{let t=Qu(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var ts=V((kf,Gu)=>{Gu.exports={name:"@prisma/engines-version",version:"5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"ac9d7041ed77bcc8a8dbd2ab6616b39013829574"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.18.4",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Xn=V(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.enginesVersion=void 0;Dr.enginesVersion=ts().prisma.enginesVersion});var ii=V((Kf,is)=>{"use strict";is.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 ls=V((Jf,as)=>{"use strict";as.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 li=V((Hf,us)=>{"use strict";var rc=ls();us.exports=e=>typeof e=="string"?e.replace(rc(),""):e});var cs=V((Yf,Nr)=>{"use strict";Nr.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()};Nr.exports.default=Nr.exports});var Ui=V((CP,Ka)=>{"use strict";Ka.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;spe,DMMFClass:()=>xr,Debug:()=>$n,Decimal:()=>Pe,Extensions:()=>Rn,MetricsClient:()=>dt,NotFoundError:()=>Re,ObjectEnumValue:()=>xe,PrismaClientInitializationError:()=>F,PrismaClientKnownRequestError:()=>U,PrismaClientRustPanicError:()=>ue,PrismaClientUnknownRequestError:()=>K,PrismaClientValidationError:()=>X,Public:()=>Mn,Sql:()=>oe,Types:()=>Sn,defineDmmfProperty:()=>ms,empty:()=>ys,getPrismaClient:()=>Dl,itxClientDenyList:()=>zi,join:()=>gs,makeStrictEnum:()=>_l,objectEnumNames:()=>ic,objectEnumValues:()=>$r,raw:()=>gi,sqltag:()=>yi,warnEnvConflicts:()=>Nl,warnOnce:()=>qt});module.exports=Ul(sm);var Rn={};St(Rn,{defineExtension:()=>to,getExtensionContext:()=>ro});function to(e){return typeof e=="function"?e:t=>t.$extends(e)}function ro(e){return e}var Mn={};St(Mn,{validator:()=>no});function no(...e){return t=>t}var Sn={};St(Sn,{Extensions:()=>io,Public:()=>oo,Result:()=>so,Utils:()=>ao});var io={};var oo={};var so={};var ao={};var Ie=(e,t)=>{let r={};for(let n of e){let i=n[t];r[i]=n}return r};function lo(e){return e.substring(0,1).toLowerCase()+e.substring(1)}var xr=class{constructor(t){this.document=t;this.compositeNames=new Set(this.datamodel.types.map(r=>r.name)),this.typeAndModelMap=this.buildTypeModelMap(),this.mappingsMap=this.buildMappingsMap(),this.outputTypeMap=this.buildMergedOutputTypeMap(),this.rootFieldMap=this.buildRootFieldMap(),this.inputTypesByName=this.buildInputTypesMap()}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(t){return this.compositeNames.has(t)}getOtherOperationNames(){return[Object.values(this.mappings.otherOperations.write),Object.values(this.mappings.otherOperations.read)].flat()}hasEnumInNamespace(t,r){return this.schema.enumTypes[r]?.find(n=>n.name===t)!==void 0}resolveInputObjectType(t){return this.inputTypesByName.get(In(t.type,t.namespace))}resolveOutputObjectType(t){if(t.location==="outputObjectTypes")return this.outputObjectTypes[t.namespace??"prisma"].find(r=>r.name===t.type)}buildModelMap(){return Ie(this.datamodel.models,"name")}buildTypeMap(){return Ie(this.datamodel.types,"name")}buildTypeModelMap(){return{...this.buildTypeMap(),...this.buildModelMap()}}buildMappingsMap(){return Ie(this.mappings.modelOperations,"model")}buildMergedOutputTypeMap(){return{model:Ie(this.schema.outputObjectTypes.model,"name"),prisma:Ie(this.schema.outputObjectTypes.prisma,"name")}}buildRootFieldMap(){return{...Ie(this.outputTypeMap.prisma.Query.fields,"name"),...Ie(this.outputTypeMap.prisma.Mutation.fields,"name")}}buildInputTypesMap(){let t=new Map;for(let r of this.inputObjectTypes.prisma)t.set(In(r.name,"prisma"),r);if(!this.inputObjectTypes.model)return t;for(let r of this.inputObjectTypes.model)t.set(In(r.name,"model"),r);return t}};function In(e,t){return t?`${t}.${e}`:e}var pe;(t=>{let e;(x=>(x.findUnique="findUnique",x.findUniqueOrThrow="findUniqueOrThrow",x.findFirst="findFirst",x.findFirstOrThrow="findFirstOrThrow",x.findMany="findMany",x.create="create",x.createMany="createMany",x.update="update",x.updateMany="updateMany",x.upsert="upsert",x.delete="delete",x.deleteMany="deleteMany",x.groupBy="groupBy",x.count="count",x.aggregate="aggregate",x.findRaw="findRaw",x.aggregateRaw="aggregateRaw"))(e=t.ModelAction||(t.ModelAction={}))})(pe||(pe={}));var vr=S(Ln()),du=100,It=[];typeof process<"u"&&typeof process.stderr?.write!="function"&&(vr.default.log=console.debug??console.log);function mu(e){let t=(0,vr.default)(e),r=Object.assign((...n)=>(t.log=r.log,n.length!==0&&It.push([e,...n]),It.length>du&&It.shift(),t("",...n)),t);return r}var $n=Object.assign(mu,vr.default);function bo(e=7500){let t=It.map(r=>r.map(n=>typeof n=="string"?n:JSON.stringify(n)).join(" ")).join(` -`);return t.length2&&i.push.apply(i,r.slice(1,r.length-1)),new e(this.value,this.cases.concat([{match:function(s){var a={},l=!!(i.some(function(u){return gu(u,s,function(c,p){a[c]=p})})&&o.every(function(u){return u(s)}));return{matched:l,value:l&&Object.keys(a).length?Ao in a?a[Ao]:a:s}},handler:n}]))},t.when=function(r,n){return new e(this.value,this.cases.concat([{match:function(i){return{matched:!!r(i),value:i}},handler:n}]))},t.otherwise=function(r){return new e(this.value,this.cases.concat([{match:function(n){return{matched:!0,value:n}},handler:r}])).run()},t.exhaustive=function(){return this.run()},t.run=function(){for(var r=this.value,n=void 0,i=0;i!process.env.PRISMA_DISABLE_WARNINGS};function Dt(e,...t){Eu.warn()&&console.warn(`${bu.warn} ${e}`,...t)}var wu=(0,qo.promisify)($o.default.exec),ie=D("prisma:get-platform"),Pu=["1.0.x","1.1.x","3.0.x"];async function Vo(){let e=Sr.default.platform(),t=process.arch;if(e==="freebsd"){let s=await Ir("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 Tu(),n=await Fu(),i=Au({arch:t,archFromUname:n,familyDistro:r.familyDistro}),{libssl:o}=await Ru(i);return{platform:"linux",libssl:o,arch:t,archFromUname:n,...r}}function vu(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=st({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 ie(`Found distro info: -${JSON.stringify(a,null,2)}`),a}async function Tu(){let e="/etc/os-release";try{let t=await Gn.default.readFile(e,{encoding:"utf-8"});return vu(t)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function Cu(e){let t=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(t){let r=`${t[1]}.x`;return jo(r)}}function No(e){let t=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(t){let r=`${t[1]}${t[2]??".0"}.x`;return jo(r)}}function jo(e){let t=(()=>{if(Uo(e))return e;let r=e.split(".");return r[1]="0",r.join(".")})();if(Pu.includes(t))return t}function Au(e){return st(e).with({familyDistro:"musl"},()=>(ie('Trying platform-specific paths for "alpine"'),["/lib"])).with({familyDistro:"debian"},({archFromUname:t})=>(ie('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${t}-linux-gnu`,`/lib/${t}-linux-gnu`])).with({familyDistro:"rhel"},()=>(ie('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:t,arch:r,archFromUname:n})=>(ie(`Don't know any platform-specific paths for "${t}" on ${r} (${n})`),[]))}async function Ru(e){let t='grep -v "libssl.so.0"',r=await Lo(e);if(r){ie(`Found libssl.so file using platform-specific paths: ${r}`);let o=No(r);if(ie(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"libssl-specific-path"}}ie('Falling back to "ldconfig" and other generic paths');let n=await Ir(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${t}`);if(n||(n=await Lo(["/lib64","/usr/lib64","/lib"])),n){ie(`Found libssl.so file using "ldconfig" or other generic paths: ${n}`);let o=No(n);if(ie(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"ldconfig"}}let i=await Ir("openssl version -v");if(i){ie(`Found openssl binary with version: ${i}`);let o=Cu(i);if(ie(`The parsed openssl version is: ${o}`),o)return{libssl:o,strategy:"openssl-binary"}}return ie("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function Lo(e){for(let t of e){let r=await Mu(t);if(r)return r}}async function Mu(e){try{return(await Gn.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 ut(){let{binaryTarget:e}=await Bo();return e}function Su(e){return e.binaryTarget!==void 0}async function Jn(){let{memoized:e,...t}=await Bo();return t}var Mr={};async function Bo(){if(Su(Mr))return Promise.resolve({...Mr,memoized:!0});let e=await Vo(),t=Iu(e);return Mr={...e,binaryTarget:t},{...Mr,memoized:!1}}function Iu(e){let{platform:t,arch:r,archFromUname:n,libssl:i,targetDistro:o,familyDistro:s,originalDistro:a}=e;t==="linux"&&!["x64","arm64"].includes(r)&&Dt(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures. 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=st({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.");Dt(`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&&Dt(`Prisma doesn't know which engines to download for the Linux distro "${a}". Falling back to Prisma engines built "${u}". -Please report your experience by creating an issue at ${Ot("https://github.com/prisma/prisma/issues")} so we can add your distro to the list of known supported distros.`),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||Uo(i)?c:`${c}-openssl-${i}`}return t==="linux"&&o&&i?`${o}-openssl-${i}`:(t!=="linux"&&Dt(`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 ku(e){try{return await e()}catch{return}}function Ir(e){return ku(async()=>{let t=await wu(e);return ie(`Command "${e}" successfully returned "${t.stdout}"`),t.stdout})}async function Fu(){return typeof Sr.default.machine=="function"?Sr.default.machine():(await Ir("uname -m"))?.trim()}function Uo(e){return e.startsWith("1.")}var Hn=["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","openbsd","netbsd","arm"];var Yn=S(Go()),Or=S(require("fs"));var ct=S(require("path"));function Jo(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 zn=D("prisma:tryLoadEnv");function _t({rootEnvPath:e,schemaEnvPath:t},r={conflictCheck:"none"}){let n=Ho(e);r.conflictCheck!=="none"&&Bu(n,t,r.conflictCheck);let i=null;return Wo(n?.path,t)||(i=Ho(t)),!n&&!i&&zn("No Environment variables loaded"),i?.dotenvResult.error?console.error(me(ne("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(` -`),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function Bu(e,t,r){let n=e?.dotenvResult.parsed,i=!Wo(e?.path,t);if(n&&t&&i&&Or.default.existsSync(t)){let o=Yn.default.parse(Or.default.readFileSync(t)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=ct.default.relative(process.cwd(),e.path),l=ct.default.relative(process.cwd(),t);if(r==="error"){let u=`There is a conflict between env var${s.length>1?"s":""} in ${te(a)} and ${te(l)} +"use strict";var ql=Object.create;var Dr=Object.defineProperty;var jl=Object.getOwnPropertyDescriptor;var Vl=Object.getOwnPropertyNames;var Bl=Object.getPrototypeOf,Ul=Object.prototype.hasOwnProperty;var Z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qt=(e,t)=>{for(var r in t)Dr(e,r,{get:t[r],enumerable:!0})},so=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Vl(t))!Ul.call(e,i)&&i!==r&&Dr(e,i,{get:()=>t[i],enumerable:!(n=jl(t,i))||n.enumerable});return e};var k=(e,t,r)=>(r=e!=null?ql(Bl(e)):{},so(t||!e||!e.__esModule?Dr(r,"default",{value:e,enumerable:!0}):r,e)),Gl=e=>so(Dr({},"__esModule",{value:!0}),e);var ko=Z((Hm,Wn)=>{"use strict";var v=Wn.exports;Wn.exports.default=v;var D="\x1B[",Gt="\x1B]",mt="\x07",Br=";",Oo=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=Oo?"\x1B7":D+"s";v.cursorRestorePosition=Oo?"\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[Gt,"8",Br,Br,t,mt,e,Gt,"8",Br,Br,mt].join("");v.image=(e,t={})=>{let r=`${Gt}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")+mt};v.iTerm={setCwd:(e=process.cwd())=>`${Gt}50;CurrentDir=${e}${mt}`,annotation:(e,t={})=>{let r=`${Gt}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+mt}}});var Hn=Z((Km,Do)=>{"use strict";Do.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 Iu=require("os"),_o=require("tty"),de=Hn(),{env:Q}=process,Ue;de("no-color")||de("no-colors")||de("color=false")||de("color=never")?Ue=0:(de("color")||de("colors")||de("color=true")||de("color=always"))&&(Ue=1);"FORCE_COLOR"in Q&&(Q.FORCE_COLOR==="true"?Ue=1:Q.FORCE_COLOR==="false"?Ue=0:Ue=Q.FORCE_COLOR.length===0?1:Math.min(parseInt(Q.FORCE_COLOR,10),3));function Kn(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function zn(e,t){if(Ue===0)return 0;if(de("color=16m")||de("color=full")||de("color=truecolor"))return 3;if(de("color=256"))return 2;if(e&&!t&&Ue===void 0)return 0;let r=Ue||0;if(Q.TERM==="dumb")return r;if(process.platform==="win32"){let n=Iu.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 Ou(e){let t=zn(e,e&&e.isTTY);return Kn(t)}Lo.exports={supportsColor:Ou,stdout:Kn(zn(!0,_o.isatty(1))),stderr:Kn(zn(!0,_o.isatty(2)))}});var $o=Z((Ym,Mo)=>{"use strict";var ku=Fo(),ft=Hn();function No(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 Yn(e){let{env:t}=process;if("FORCE_HYPERLINK"in t)return!(t.FORCE_HYPERLINK.length>0&&parseInt(t.FORCE_HYPERLINK,10)===0);if(ft("no-hyperlink")||ft("no-hyperlinks")||ft("hyperlink=false")||ft("hyperlink=never"))return!1;if(ft("hyperlink=true")||ft("hyperlink=always")||"NETLIFY"in t)return!0;if(!ku.supportsColor(e)||e&&!e.isTTY||process.platform==="win32"||"CI"in t||"TEAMCITY_VERSION"in t)return!1;if("TERM_PROGRAM"in t){let r=No(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=No(t.VTE_VERSION);return r.major>0||r.minor>=50}return!1}Mo.exports={supportsHyperlink:Yn,stdout:Yn(process.stdout),stderr:Yn(process.stderr)}});var jo=Z((Zm,Qt)=>{"use strict";var Du=ko(),Zn=$o(),qo=(e,t,{target:r="stdout",...n}={})=>Zn[r]?Du.link(e,t):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,t):`${e} (\u200B${t}\u200B)`;Qt.exports=(e,t,r={})=>qo(e,t,r);Qt.exports.stderr=(e,t,r={})=>qo(e,t,{target:"stderr",...r});Qt.exports.isSupported=Zn.stdout;Qt.exports.stderr.isSupported=Zn.stderr});var ei=Z((uf,_u)=>{_u.exports={name:"@prisma/engines-version",version:"5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4c784e32044a8a016d99474bd02a3b6123742169"},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 ti=Z(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.enginesVersion=void 0;Ur.enginesVersion=ei().prisma.enginesVersion});var Go=Z((Af,Nu)=>{Nu.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 Jo=Z((If,Qr)=>{"use strict";var Mu=require("fs"),Qo=require("path"),$u=require("os"),qu=Go(),ju=qu.version,Vu=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Bu(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,` +`);let n;for(;(n=Vu.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 oi(e){console.log(`[dotenv@${ju}][DEBUG] ${e}`)}function Uu(e){return e[0]==="~"?Qo.join($u.homedir(),e.slice(1)):e}function Gu(e){let t=Qo.resolve(process.cwd(),".env"),r="utf8",n=!!(e&&e.debug),i=!!(e&&e.override);e&&(e.path!=null&&(t=Uu(e.path)),e.encoding!=null&&(r=e.encoding));try{let o=Gr.parse(Mu.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&&oi(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&&oi(`Failed to load ${t} ${o.message}`),{error:o}}}var Gr={config:Gu,parse:Bu};Qr.exports.config=Gr.config;Qr.exports.parse=Gr.parse;Qr.exports=Gr});var Zo=Z((Nf,Yo)=>{"use strict";Yo.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var es=Z((Mf,Xo)=>{"use strict";var Hu=Zo();Xo.exports=e=>{let t=Hu(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var ui=Z((Uf,ts)=>{"use strict";ts.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 os=Z((Jf,is)=>{"use strict";is.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 mi=Z((Wf,ss)=>{"use strict";var rc=os();ss.exports=e=>typeof e=="string"?e.replace(rc(),""):e});var as=Z((zf,Hr)=>{"use strict";Hr.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()};Hr.exports.default=Hr.exports});var Zi=Z((GP,Ga)=>{"use strict";Ga.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;sqn,Decimal:()=>ve,Extensions:()=>Fn,MetricsClient:()=>yt,NotFoundError:()=>_e,PrismaClientInitializationError:()=>R,PrismaClientKnownRequestError:()=>V,PrismaClientRustPanicError:()=>le,PrismaClientUnknownRequestError:()=>B,PrismaClientValidationError:()=>H,Public:()=>Nn,Sql:()=>ie,defineDmmfProperty:()=>us,empty:()=>ps,getPrismaClient:()=>Nl,getRuntime:()=>wn,join:()=>cs,makeStrictEnum:()=>Ml,objectEnumValues:()=>Yr,raw:()=>Pi,sqltag:()=>vi,warnEnvConflicts:()=>$l,warnOnce:()=>Yt});module.exports=Gl(wm);var Fn={};qt(Fn,{defineExtension:()=>ao,getExtensionContext:()=>lo});function ao(e){return typeof e=="function"?e:t=>t.$extends(e)}function lo(e){return e}var Nn={};qt(Nn,{validator:()=>uo});function uo(...e){return t=>t}var _r={};qt(_r,{$:()=>go,bgBlack:()=>eu,bgBlue:()=>iu,bgCyan:()=>su,bgGreen:()=>ru,bgMagenta:()=>ou,bgRed:()=>tu,bgWhite:()=>au,bgYellow:()=>nu,black:()=>zl,blue:()=>et,bold:()=>W,cyan:()=>Oe,dim:()=>Ae,gray:()=>jt,green:()=>Me,grey:()=>Xl,hidden:()=>Hl,inverse:()=>Wl,italic:()=>Jl,magenta:()=>Yl,red:()=>ce,reset:()=>Ql,strikethrough:()=>Kl,underline:()=>X,white:()=>Zl,yellow:()=>Ie});var Mn,co,po,mo,fo=!0;typeof process<"u"&&({FORCE_COLOR:Mn,NODE_DISABLE_COLORS:co,NO_COLOR:po,TERM:mo}=process.env||{},fo=process.stdout&&process.stdout.isTTY);var go={enabled:!co&&po==null&&mo!=="dumb"&&(Mn!=null&&Mn!=="0"||fo)};function M(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!go.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Ql=M(0,0),W=M(1,22),Ae=M(2,22),Jl=M(3,23),X=M(4,24),Wl=M(7,27),Hl=M(8,28),Kl=M(9,29),zl=M(30,39),ce=M(31,39),Me=M(32,39),Ie=M(33,39),et=M(34,39),Yl=M(35,39),Oe=M(36,39),Zl=M(37,39),jt=M(90,39),Xl=M(90,39),eu=M(40,49),tu=M(41,49),ru=M(42,49),nu=M(43,49),iu=M(44,49),ou=M(45,49),su=M(46,49),au=M(47,49);var lu=100,ho=["green","yellow","blue","magenta","cyan","red"],Vt=[],yo=Date.now(),uu=0,$n=typeof process<"u"?process.env:{};globalThis.DEBUG??=$n.DEBUG??"";globalThis.DEBUG_COLORS??=$n.DEBUG_COLORS?$n.DEBUG_COLORS==="true":!0;var Bt={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 cu(e){let t={color:ho[uu++%ho.length],enabled:Bt.enabled(e),namespace:e,log:Bt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Vt.push([o,...n]),Vt.length>lu&&Vt.shift(),Bt.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:pu(c)),u=`+${Date.now()-yo}ms`;yo=Date.now(),globalThis.DEBUG_COLORS?a(_r[s](W(o)),...l,_r[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var qn=new Proxy(cu,{get:(e,t)=>Bt[t],set:(e,t,r)=>Bt[t]=r});function pu(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 bo(e=7500){let t=Vt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` +`);return t.length!!(e&&typeof e=="object"),Nr=e=>e&&!!e[ke],Ee=(e,t,r)=>{if(Nr(e)){let n=e[ke](),{matched:i,selections:o}=n.match(t);return i&&o&&Object.keys(o).forEach(s=>r(s,o[s])),i}if(Bn(e)){if(!Bn(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];Nr(a)&&a[du]?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||Nr(o=i)&&o[ke]().matcherType==="optional")&&Ee(i,t[n],r);var o})}return Object.is(t,e)},Be=e=>{var t,r,n;return Bn(e)?Nr(e)?(t=(r=(n=e[ke]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Ut(e,Be):Ut(Object.values(e),Be):[]},Ut=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function pe(e){return Object.assign(e,{optional:()=>mu(e),and:t=>j(e,t),or:t=>fu(e,t),select:t=>t===void 0?xo(e):xo(t,e)})}function mu(e){return pe({[ke]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return t===void 0?(Be(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:Ee(e,t,n),selections:r}},getSelectionKeys:()=>Be(e),matcherType:"optional"})})}function j(...e){return pe({[ke]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return{matched:e.every(i=>Ee(i,t,n)),selections:r}},getSelectionKeys:()=>Ut(e,Be),matcherType:"and"})})}function fu(...e){return pe({[ke]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return Ut(e,Be).forEach(i=>n(i,void 0)),{matched:e.some(i=>Ee(i,t,n)),selections:r}},getSelectionKeys:()=>Ut(e,Be),matcherType:"or"})})}function I(e){return{[ke]:()=>({match:t=>({matched:!!e(t)})})}}function xo(...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({[ke]:()=>({match:n=>{let i={[t??Mr]:n};return{matched:r===void 0||Ee(r,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[t??Mr].concat(r===void 0?[]:Be(r))})})}function ye(e){return typeof e=="number"}function $e(e){return typeof e=="string"}function qe(e){return typeof e=="bigint"}var _m=pe(I(function(e){return!0}));var je=e=>Object.assign(pe(e),{startsWith:t=>{return je(j(e,(r=t,I(n=>$e(n)&&n.startsWith(r)))));var r},endsWith:t=>{return je(j(e,(r=t,I(n=>$e(n)&&n.endsWith(r)))));var r},minLength:t=>je(j(e,(r=>I(n=>$e(n)&&n.length>=r))(t))),length:t=>je(j(e,(r=>I(n=>$e(n)&&n.length===r))(t))),maxLength:t=>je(j(e,(r=>I(n=>$e(n)&&n.length<=r))(t))),includes:t=>{return je(j(e,(r=t,I(n=>$e(n)&&n.includes(r)))));var r},regex:t=>{return je(j(e,(r=t,I(n=>$e(n)&&!!n.match(r)))));var r}}),Lm=je(I($e)),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)))}),Fm=be(I(ye)),Ve=e=>Object.assign(pe(e),{between:(t,r)=>Ve(j(e,((n,i)=>I(o=>qe(o)&&n<=o&&i>=o))(t,r))),lt:t=>Ve(j(e,(r=>I(n=>qe(n)&&nVe(j(e,(r=>I(n=>qe(n)&&n>r))(t))),lte:t=>Ve(j(e,(r=>I(n=>qe(n)&&n<=r))(t))),gte:t=>Ve(j(e,(r=>I(n=>qe(n)&&n>=r))(t))),positive:()=>Ve(j(e,I(t=>qe(t)&&t>0))),negative:()=>Ve(j(e,I(t=>qe(t)&&t<0)))}),Nm=Ve(I(qe)),Mm=pe(I(function(e){return typeof e=="boolean"})),$m=pe(I(function(e){return typeof e=="symbol"})),qm=pe(I(function(e){return e==null})),jm=pe(I(function(e){return e!=null}));var Un={matched:!1,value:void 0};function dt(e){return new Gn(e,Un)}var Gn=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)?Un:{matched:!0,value:r(o?Mr in s?s[Mr]: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)}:Un)}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 Ro=require("util");var gu={warn:Ie("prisma:warn")},hu={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function $r(e,...t){hu.warn()&&console.warn(`${gu.warn} ${e}`,...t)}var yu=(0,Ro.promisify)(To.default.exec),te=F("prisma:get-platform"),bu=["1.0.x","1.1.x","3.0.x"];async function Co(){let e=jr.default.platform(),t=process.arch;if(e==="freebsd"){let s=await Vr("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 wu(),n=await Au(),i=Pu({arch:t,archFromUname:n,familyDistro:r.familyDistro}),{libssl:o}=await vu(i);return{platform:"linux",libssl:o,arch:t,archFromUname:n,...r}}function Eu(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=dt({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 wu(){let e="/etc/os-release";try{let t=await Qn.default.readFile(e,{encoding:"utf-8"});return Eu(t)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function xu(e){let t=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(t){let r=`${t[1]}.x`;return So(r)}}function Po(e){let t=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(t){let r=`${t[1]}${t[2]??".0"}.x`;return So(r)}}function So(e){let t=(()=>{if(Io(e))return e;let r=e.split(".");return r[1]="0",r.join(".")})();if(bu.includes(t))return t}function Pu(e){return dt(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 vu(e){let t='grep -v "libssl.so.0"',r=await vo(e);if(r){te(`Found libssl.so file using platform-specific paths: ${r}`);let o=Po(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 Vr(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${t}`);if(n||(n=await vo(["/lib64","/usr/lib64","/lib"])),n){te(`Found libssl.so file using "ldconfig" or other generic paths: ${n}`);let o=Po(n);if(te(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"ldconfig"}}let i=await Vr("openssl version -v");if(i){te(`Found openssl binary with version: ${i}`);let o=xu(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 vo(e){for(let t of e){let r=await Tu(t);if(r)return r}}async function Tu(e){try{return(await Qn.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 tt(){let{binaryTarget:e}=await Ao();return e}function Ru(e){return e.binaryTarget!==void 0}async function Jn(){let{memoized:e,...t}=await Ao();return t}var qr={};async function Ao(){if(Ru(qr))return Promise.resolve({...qr,memoized:!0});let e=await Co(),t=Cu(e);return qr={...e,binaryTarget:t},{...qr,memoized:!1}}function Cu(e){let{platform:t,arch:r,archFromUname:n,libssl:i,targetDistro:o,familyDistro:s,originalDistro:a}=e;t==="linux"&&!["x64","arm64"].includes(r)&&$r(`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=dt({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.");$r(`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||Io(i)?c:`${c}-openssl-${i}`}return t==="linux"&&o&&i?`${o}-openssl-${i}`:(t!=="linux"&&$r(`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 Su(e){try{return await e()}catch{return}}function Vr(e){return Su(async()=>{let t=await yu(e);return te(`Command "${e}" successfully returned "${t.stdout}"`),t.stdout})}async function Au(){return typeof jr.default.machine=="function"?jr.default.machine():(await Vr("uname -m"))?.trim()}function Io(e){return e.startsWith("1.")}var Vo=k(jo());function Xn(e){return(0,Vo.default)(e,e,{fallback:X})}var Lu=k(ti());var $=k(require("path")),Fu=k(ti()),Ef=F("prisma:engines");function Bo(){return $.default.join(__dirname,"../")}var wf="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 ri=k(require("fs")),Uo=F("chmodPlusX");function ni(e){if(process.platform==="win32")return;let t=ri.default.statSync(e),r=t.mode|64|8|1;if(t.mode===r){Uo(`Execution permissions of ${e} are fine`);return}let n=r.toString(8).slice(-3);Uo(`Have to call chmodPlusX on ${e}`),ri.default.chmodSync(e,n)}function ii(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: ${Xn("https://pris.ly/d/system-requirements")}`,o=`Unable to require(\`${Ae(e.id)}\`).`,s=dt({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 ai=k(Jo()),Jr=k(require("fs"));var gt=k(require("path"));function Wo(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 si=F("prisma:tryLoadEnv");function Jt({rootEnvPath:e,schemaEnvPath:t},r={conflictCheck:"none"}){let n=Ho(e);r.conflictCheck!=="none"&&Qu(n,t,r.conflictCheck);let i=null;return Ko(n?.path,t)||(i=Ho(t)),!n&&!i&&si("No Environment variables loaded"),i?.dotenvResult.error?console.error(ce(W("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(` +`),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function Qu(e,t,r){let n=e?.dotenvResult.parsed,i=!Ko(e?.path,t);if(n&&t&&i&&Jr.default.existsSync(t)){let o=ai.default.parse(Jr.default.readFileSync(t)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=gt.default.relative(process.cwd(),e.path),l=gt.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=>` ${ne(c)}`).join(` +${s.map(c=>` ${W(c)}`).join(` `)} -We suggest to move the contents of ${te(l)} to ${te(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=>ne(c)).join(", ")} in ${te(a)} and ${te(l)} -Env vars from ${te(l)} overwrite the ones from ${te(a)} - `;console.warn(`${he("warn(prisma)")} ${u}`)}}}}function Ho(e){return Uu(e)?(zn(`Environment variables loaded from ${e}`),{dotenvResult:Jo(Yn.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0})),message:Fe(`Environment variables loaded from ${ct.default.relative(process.cwd(),e)}`),path:e}):(zn(`Environment variables not found at ${e}`),null)}function Wo(e,t){return e&&t&&ct.default.resolve(e)===ct.default.resolve(t)}function Uu(e){return!!(e&&Or.default.existsSync(e))}var zo="library";function Zn(e){let t=Ku();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":zo)}function Ku(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}var Ju=S(Xn());var N=S(require("path")),Hu=S(Xn()),Df=D("prisma:engines");function rs(){return N.default.join(__dirname,"../")}var _f="libquery-engine";N.default.join(__dirname,"../query-engine-darwin");N.default.join(__dirname,"../query-engine-darwin-arm64");N.default.join(__dirname,"../query-engine-debian-openssl-1.0.x");N.default.join(__dirname,"../query-engine-debian-openssl-1.1.x");N.default.join(__dirname,"../query-engine-debian-openssl-3.0.x");N.default.join(__dirname,"../query-engine-linux-static-x64");N.default.join(__dirname,"../query-engine-linux-static-arm64");N.default.join(__dirname,"../query-engine-rhel-openssl-1.0.x");N.default.join(__dirname,"../query-engine-rhel-openssl-1.1.x");N.default.join(__dirname,"../query-engine-rhel-openssl-3.0.x");N.default.join(__dirname,"../libquery_engine-darwin.dylib.node");N.default.join(__dirname,"../libquery_engine-darwin-arm64.dylib.node");N.default.join(__dirname,"../libquery_engine-debian-openssl-1.0.x.so.node");N.default.join(__dirname,"../libquery_engine-debian-openssl-1.1.x.so.node");N.default.join(__dirname,"../libquery_engine-debian-openssl-3.0.x.so.node");N.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.0.x.so.node");N.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.1.x.so.node");N.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-3.0.x.so.node");N.default.join(__dirname,"../libquery_engine-linux-musl.so.node");N.default.join(__dirname,"../libquery_engine-linux-musl-openssl-3.0.x.so.node");N.default.join(__dirname,"../libquery_engine-rhel-openssl-1.0.x.so.node");N.default.join(__dirname,"../libquery_engine-rhel-openssl-1.1.x.so.node");N.default.join(__dirname,"../libquery_engine-rhel-openssl-3.0.x.so.node");N.default.join(__dirname,"../query_engine-windows.dll.node");var ei=S(require("fs")),ns=D("chmodPlusX");function ti(e){if(process.platform==="win32")return;let t=ei.default.statSync(e),r=t.mode|64|8|1;if(t.mode===r){ns(`Execution permissions of ${e} are fine`);return}let n=r.toString(8).slice(-3);ns(`Have to call chmodPlusX on ${e}`),ei.default.chmodSync(e,n)}function ri(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: ${Ot("https://pris.ly/d/system-requirements")}`,o=`Unable to require(\`${Fe(e.id)}\`).`,s=st({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 Nt=S(require("path"));function ni(e){return Nt.default.sep===Nt.default.posix.sep?e:e.split(Nt.default.sep).join(Nt.default.posix.sep)}var os=S(ii());function si(e){return String(new oi(e))}var oi=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:Wu(t.binaryTargets)}));return`generator ${t.name} { -${(0,os.default)(zu(n),2)} -}`}};function Wu(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 zu(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)} = ${Yu(n)}`).join(` -`)}function Yu(e){return JSON.parse(JSON.stringify(e,(t,r)=>Array.isArray(r)?`[${r.map(n=>JSON.stringify(n)).join(", ")}]`:JSON.stringify(r)))}var $t={};St($t,{error:()=>ec,info:()=>Xu,log:()=>Zu,query:()=>tc,should:()=>ss,tags:()=>Lt,warn:()=>ai});var Lt={error:me("prisma:error"),warn:he("prisma:warn"),info:Oe("prisma:info"),query:ot("prisma:query")},ss={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Zu(...e){console.log(...e)}function ai(e,...t){ss.warn()&&console.warn(`${Lt.warn} ${e}`,...t)}function Xu(e,...t){console.info(`${Lt.info} ${e}`,...t)}function ec(e,...t){console.error(`${Lt.error} ${e}`,...t)}function tc(e,...t){console.log(`${Lt.query} ${e}`,...t)}function _r(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://github.com/prisma/prisma/issues/new?assignees=&labels=kind%2Fbug&projects=&template=bug_report.yml`)}function He(e,t){throw new Error(t)}function ui(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var ci=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});function pt(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function pi(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{ps.has(e)||(ps.add(e),ai(t,...r))};var U=class extends Error{constructor(r,{code:n,clientVersion:i,meta:o,batchRequestIdx:s}){super(r);this.name="PrismaClientKnownRequestError",this.code=n,this.clientVersion=i,this.meta=o,Object.defineProperty(this,"batchRequestIdx",{value:s,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};E(U,"PrismaClientKnownRequestError");var Re=class extends U{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};E(Re,"NotFoundError");var F=class e extends Error{constructor(r,n,i){super(r);this.name="PrismaClientInitializationError",this.clientVersion=n,this.errorCode=i,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};E(F,"PrismaClientInitializationError");var ue=class extends Error{constructor(r,n){super(r);this.name="PrismaClientRustPanicError",this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};E(ue,"PrismaClientRustPanicError");var K=class extends Error{constructor(r,{clientVersion:n,batchRequestIdx:i}){super(r);this.name="PrismaClientUnknownRequestError",this.clientVersion=n,Object.defineProperty(this,"batchRequestIdx",{value:i,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};E(K,"PrismaClientUnknownRequestError");var X=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};E(X,"PrismaClientValidationError");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 Vt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function ms(e,t){let r=Vt(()=>nc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function nc(e){return{datamodel:{models:di(e.models),enums:di(e.enums),types:di(e.types)}}}function di(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}var ic=["JsonNullValueInput","NullableJsonNullValueInput","JsonNullValueFilter"],Lr=Symbol(),mi=new WeakMap,xe=class{constructor(t){t===Lr?mi.set(this,`Prisma.${this._getName()}`):mi.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return mi.get(this)}},jt=class extends xe{_getNamespace(){return"NullTypes"}},Bt=class extends jt{};fi(Bt,"DbNull");var Ut=class extends jt{};fi(Ut,"JsonNull");var Kt=class extends jt{};fi(Kt,"AnyNull");var $r={classes:{DbNull:Bt,JsonNull:Ut,AnyNull:Kt},instances:{DbNull:new Bt(Lr),JsonNull:new Ut(Lr),AnyNull:new Kt(Lr)}};function fi(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}var lc=S(Ln(),1);function qr(e){return{ok:!1,error:e,map(){return qr(e)},flatMap(){return qr(e)}}}var oc=class{constructor(){eo(this,"registeredErrors",[])}consumeError(e){return this.registeredErrors[e]}registerNewError(e){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:e},t}},fs=e=>{let t=new oc,r=De(t,e.startTransaction.bind(e));return{errorRegistry:t,queryRaw:De(t,e.queryRaw.bind(e)),executeRaw:De(t,e.executeRaw.bind(e)),flavour:e.flavour,startTransaction:async(...n)=>(await r(...n)).map(o=>sc(t,o)),close:De(t,e.close.bind(e))}},sc=(e,t)=>({flavour:t.flavour,options:t.options,queryRaw:De(e,t.queryRaw.bind(t)),executeRaw:De(e,t.executeRaw.bind(t)),commit:De(e,t.commit.bind(t)),rollback:De(e,t.rollback.bind(t)),dispose:ac(e,t.dispose.bind(t))});function De(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return qr({kind:"GenericJsError",id:i})}}}function ac(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return qr({kind:"GenericJsError",id:i})}}}var kl=require("async_hooks"),Fl=require("events"),Ol=S(require("fs")),yr=S(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 bs=require("util");var Vr={enumerable:!0,configurable:!0,writable:!0};function jr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Vr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var hs=Symbol.for("nodejs.util.inspect.custom");function Ee(e,t){let r=uc(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=xs(Reflect.ownKeys(o),r),a=xs(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?{...Vr,...l?.getPropertyDescriptor(s)}:Vr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[hs]=function(o,s,a=bs.inspect){let l={...this};return delete l[hs],a(l,s)},i}function uc(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 xs(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}function Gt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}var mt=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){let n=r.length-1;for(let i=0;i0&&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}};function ft(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Br(e){return e.toString()!=="Invalid Date"}var gt=9e15,$e=1e9,hi="0123456789abcdef",Kr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Qr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",xi={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-gt,maxE:gt,crypto:!1},vs,Me,w=!0,Jr="[DecimalError] ",Le=Jr+"Invalid argument: ",Ts=Jr+"Precision limit exceeded",Cs=Jr+"crypto unavailable",As="[object Decimal]",ee=Math.floor,j=Math.pow,cc=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,pc=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,dc=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Rs=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ge=1e7,b=7,mc=9007199254740991,fc=Kr.length-1,bi=Qr.length-1,m={toStringTag:As};m.absoluteValue=m.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),h(e)};m.ceil=function(){return h(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(Le+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=gc(n,Fs(n,r)),n.precision=e,n.rounding=t,h(Me==2||Me==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(w=!1,o=c.s*j(c.s*c,1/3),!o||Math.abs(o)==1/0?(r=W(c.d),e=c.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=j(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=O(u.plus(c).times(a),u.plus(l),s+2,1),W(a.d).slice(0,s)===(r=W(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(h(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")&&(h(n,e+1,1),t=!n.times(n).times(n).eq(c));break}return w=!0,h(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 O(this,new this.constructor(e))};m.dividedToIntegerBy=m.divToInt=function(e){var t=this,r=t.constructor;return h(O(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 h(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/Wr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=yt(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 h(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=yt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Wr(5,e)),i=yt(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,h(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,O(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,w=!1,r=r.times(r).minus(1).sqrt().plus(r),w=!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,w=!1,r=r.times(r).plus(1).sqrt().plus(r),w=!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?h(new o(i),e,t,!0):(o.precision=r=n-i.e,i=O(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<=bi)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<=bi)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(w=!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(w=!1,a=p+f,s=Ne(u,a),n=t?Gr(c,a+10):Ne(e,a),l=O(s,n,a,1),Jt(l.d,i=p,d))do if(a+=10,s=Ne(u,a),n=t?Gr(c,a+10):Ne(e,a),l=O(s,n,a,1),!o){+W(l.d).slice(i+1,i+15)+1==1e14&&(l=h(l,p+1,0));break}while(Jt(l.d,i+=10,d));return w=!0,h(l,p,d)};m.minus=m.sub=function(e){var t,r,n,i,o,s,a,l,u,c,p,d,f=this,y=f.constructor;if(e=new y(e),!f.d||!e.d)return!f.s||!e.s?e=new y(NaN):f.d?e.s=-e.s:e=new y(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=y.precision,l=y.rounding,!u[0]||!d[0]){if(d[0])e.s=-e.s;else if(u[0])e=new y(f);else return new y(l===3?-0:0);return w?h(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=Hr(u,n),w?h(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(Le+e);return r.d?(t=Ms(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};m.round=function(){var e=this,t=e.constructor;return h(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=hc(n,Fs(n,r)),n.precision=e,n.rounding=t,h(Me>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(w=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=W(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(O(s,o,r+2,1)).times(.5),W(o.d).slice(0,r)===(t=W(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(h(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")&&(h(n,l+1,1),e=!n.times(n).eq(s));break}return w=!0,h(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=O(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,h(Me==2||Me==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=Hr(o,r),w?h(e,p.precision,p.rounding):e};m.toBinary=function(e,t){return Pi(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:(se(e,0,$e),t===void 0?t=n.rounding:se(t,0,8),h(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):(se(e,0,$e),t===void 0?t=i.rounding:se(t,0,8),n=h(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):(se(e,0,$e),t===void 0?t=o.rounding:se(t,0,8),n=h(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,y=f.d,g=f.constructor;if(!y)return new g(f);if(u=r=new g(1),n=l=new g(0),t=new g(n),o=t.e=Ms(y)-f.e-1,s=o%b,t.d[0]=j(10,s<0?b+s:s),e==null)e=o>0?t:u;else{if(a=new g(e),!a.isInt()||a.lt(u))throw Error(Le+a);e=a.gt(t)?o>0?t:u:a}for(w=!1,a=new g(W(y)),c=g.precision,g.precision=o=y.length*b*2;p=O(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=O(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=O(u,n,o,1).minus(f).abs().cmp(O(l,r,o,1).minus(f).abs())<1?[u,n]:[l,r],g.precision=c,w=!0,d};m.toHexadecimal=m.toHex=function(e,t){return Pi(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: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]?(w=!1,r=O(r,e,0,t,1).times(e),w=!0,h(r)):(e.s=r.s,r=e),r};m.toNumber=function(){return+this};m.toOctal=function(e,t){return Pi(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(j(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return h(a,n,o);if(t=ee(e.e/b),t>=e.d.length-1&&(r=u<0?-u:u)<=mc)return i=Ss(l,a,r,n),e.s<0?new l(1).div(i):h(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(w=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Ei(e.times(Ne(a,n+r)),n),i.d&&(i=h(i,n+5,1),Jt(i.d,n,o)&&(t=n+10,i=h(Ei(e.times(Ne(a,t+r)),t),t+5,1),+W(i.d).slice(n+1,n+15)+1==1e14&&(i=h(i,n+1,0)))),i.s=s,w=!0,l.rounding=o,h(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):(se(e,1,$e),t===void 0?t=i.rounding:se(t,0,8),n=h(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):(se(e,1,$e),t===void 0?t=n.rounding:se(t,0,8)),h(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 h(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 W(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(Le+e)}function Jt(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=j(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)==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 gc(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Wr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=yt(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 O=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,y,g,P,T,C,x,R,ce,J,Ke,$,z,Ae,Y,tt,hr=n.constructor,An=n.s==i.s?1:-1,Z=n.d,k=i.d;if(!Z||!Z[0]||!k||!k[0])return new hr(!n.s||!i.s||(Z?k&&Z[0]==k[0]:!k)?NaN:Z&&Z[0]==0||!k?An*0:An/0);for(l?(f=1,c=n.e-i.e):(l=ge,f=b,c=ee(n.e/f)-ee(i.e/f)),Y=k.length,z=Z.length,T=new hr(An),C=T.d=[],p=0;k[p]==(Z[p]||0);p++);if(k[p]>(Z[p]||0)&&c--,o==null?(J=o=hr.precision,s=hr.rounding):a?J=o+(n.e-i.e)+1:J=o,J<0)C.push(1),y=!0;else{if(J=J/f+2|0,p=0,Y==1){for(d=0,k=k[0],J++;(p1&&(k=e(k,d,l),Z=e(Z,d,l),Y=k.length,z=Z.length),$=Y,x=Z.slice(0,Y),R=x.length;R=l/2&&++Ae;do d=0,u=t(k,x,Y,R),u<0?(ce=x[0],Y!=R&&(ce=ce*l+(x[1]||0)),d=ce/Ae|0,d>1?(d>=l&&(d=l-1),g=e(k,d,l),P=g.length,R=x.length,u=t(g,x,P,R),u==1&&(d--,r(g,Y=10;d/=10)p++;T.e=p+c*f-1,h(T,a?o+T.e+1:o,s,y)}return T}}();function h(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/j(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/j(10,i-s-1)%10|0}if(n=n||t<0||p[d+1]!==void 0||(s<0?c:c%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?c/j(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]=j(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=j(10,b-o),p[d]=s>0?(c/j(10,i-s)%j(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 w&&(e.e>f.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 Hr(e,t){var r=e[0];for(t*=b;r>=10;r/=10)t++;return t}function Gr(e,t,r){if(t>fc)throw w=!0,r&&(e.precision=r),Error(Ts);return h(new e(Kr),t,1,!0)}function fe(e,t,r){if(t>bi)throw Error(Ts);return h(new e(Qr),t,r,!0)}function Ms(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 _e(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(w=!1;;){if(r%2&&(o=o.times(t),ws(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),ws(t.d,s)}return w=!0,o}function Es(e){return e.d[e.d.length-1]&1}function Is(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:0/0);for(t==null?(w=!1,l=y):l=t,a=new d(.03125);e.e>-2;)e=e.times(a),p+=5;for(n=Math.log(j(2,p))/Math.LN10*2+5|0,l+=n,r=o=s=new d(1),d.precision=l;;){if(o=h(o.times(e),l,1),r=r.times(++c),a=s.plus(O(o,r,l,1)),W(a.d).slice(0,l)===W(s.d).slice(0,l)){for(i=p;i--;)s=h(s.times(s),l,1);if(t==null)if(u<3&&Jt(s.d,l-n,f,u))d.precision=l+=10,r=o=a=new d(1),c=0,u++;else return h(s,d.precision=y,f,w=!0);else return d.precision=y,s}s=a}}function Ne(e,t){var r,n,i,o,s,a,l,u,c,p,d,f=1,y=10,g=e,P=g.d,T=g.constructor,C=T.rounding,x=T.precision;if(g.s<0||!P||!P[0]||!g.e&&P[0]==1&&P.length==1)return new T(P&&!P[0]?-1/0:g.s!=1?NaN:P?0:g);if(t==null?(w=!1,c=x):c=t,T.precision=c+=y,r=W(P),n=r.charAt(0),Math.abs(o=g.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)g=g.times(e),r=W(g.d),n=r.charAt(0),f++;o=g.e,n>1?(g=new T("0."+r),o++):g=new T(n+"."+r.slice(1))}else return u=Gr(T,c+2,x).times(o+""),g=Ne(new T(n+"."+r.slice(1)),c-y).plus(u),T.precision=x,t==null?h(g,x,C,w=!0):g;for(p=g,l=s=g=O(g.minus(1),g.plus(1),c,1),d=h(g.times(g),c,1),i=3;;){if(s=h(s.times(d),c,1),u=l.plus(O(s,new T(i),c,1)),W(u.d).slice(0,c)===W(l.d).slice(0,c))if(l=l.times(2),o!==0&&(l=l.plus(Gr(T,c+2,x).times(o+""))),l=O(l,new T(f),c,1),t==null)if(Jt(l.d,c-y,C,a))T.precision=c+=y,u=s=g=O(p.minus(1),p.plus(1),c,1),d=h(g.times(g),c,1),i=a=1;else return h(l,T.precision=x,C,w=!0);else return T.precision=x,l;l=u,i+=2}}function ks(e){return String(e.s*e.s/0)}function wi(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 wi(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(pc.test(t))r=16,t=t.toLowerCase();else if(cc.test(t))r=2;else if(dc.test(t))r=8;else throw Error(Le+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=Ur(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=Hr(u,c),e.d=u,w=!1,s&&(e=O(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?j(2,l):ze.pow(2,l))),w=!0,e)}function hc(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:yt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Wr(5,r)),t=yt(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 yt(e,t,r,n,i){var o,s,a,l,u=1,c=e.precision,p=Math.ceil(c/b);for(w=!1,l=r.times(r),a=new e(n);;){if(s=O(a.times(l),new e(t++*t++),c,1),a=i?n.plus(s):n.minus(s),n=O(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 w=!0,s.d.length=p+1,s}function Wr(e,t){for(var r=e;--t;)r*=e;return r}function Fs(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 Me=n?4:1,t;if(r=t.divToInt(i),r.isZero())Me=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Me=Es(r)?n?2:3:n?4:1,t;Me=Es(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Pi(e,t,r,n){var i,o,s,a,l,u,c,p,d,f=e.constructor,y=r!==void 0;if(y?(se(r,1,$e),n===void 0?n=f.rounding:se(n,0,8)):(r=f.precision,n=f.rounding),!e.isFinite())c=ks(e);else{for(c=we(e),s=c.indexOf("."),y?(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=Ur(we(d),10,i),d.e=d.d.length),p=Ur(c,10,i),o=l=p.length;p[--l]==0;)p.pop();if(!p[0])c=y?"0p+0":"0";else{if(s<0?o--:(e=new f(e),e.d=p,e.e=o,e=O(e,d,r,n,0,i),p=e.d,o=e.e,u=vs),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=Ur(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 xc(e){return new this(e).abs()}function bc(e){return new this(e).acos()}function Ec(e){return new this(e).acosh()}function wc(e,t){return new this(e).plus(t)}function Pc(e){return new this(e).asin()}function vc(e){return new this(e).asinh()}function Tc(e){return new this(e).atan()}function Cc(e){return new this(e).atanh()}function Ac(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(O(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(O(e,t,o,1)),r}function Rc(e){return new this(e).cbrt()}function Mc(e){return h(e=new this(e),e.e+1,2)}function Sc(e,t,r){return new this(e).clamp(t,r)}function Ic(e){if(!e||typeof e!="object")throw Error(Jr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,$e,"rounding",0,8,"toExpNeg",-gt,0,"toExpPos",0,gt,"maxE",0,gt,"minE",-gt,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Le+r+": "+n);if(r="crypto",i&&(this[r]=xi[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(Cs);else this[r]=!1;else throw Error(Le+r+": "+n);return this}function kc(e){return new this(e).cos()}function Fc(e){return new this(e).cosh()}function Os(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,Ps(o)){u.s=o.s,w?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;w?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(Cs);else for(;o=10;i/=10)n++;n`}};function xt(e){return e instanceof Ht}var zr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};var Yr=e=>e,Zr={bold:Yr,red:Yr,green:Yr,dim:Yr,enabled:!1},Ds={bold:ne,red:me,green:Ge,dim:Fe,enabled:!0},bt={write(e){e.writeLine(",")}};var ve=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 qe=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Et=class extends qe{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new zr(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 ve("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(bt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}};var _s=": ",Xr=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()+_s.length}write(t){let r=new ve(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(_s).write(this.value)}};var Q=class e extends qe{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 Et&&(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");if(r?.value instanceof e)return{kind:"select",value:r.value};let n=this.getField("include");if(n?.value instanceof e)return{kind:"include",value:n.value}}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)}writeEmpty(r){let n=new ve("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(bt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};var G=class extends qe{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new ve(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}};var vi=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 en(e){return new vi(Ns(e))}function Ns(e){let t=new Q;for(let[r,n]of Object.entries(e)){let i=new Xr(r,Ls(n));t.addField(i)}return t}function Ls(e){if(typeof e=="string")return new G(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new G(String(e));if(typeof e=="bigint")return new G(`${e}n`);if(e===null)return new G("null");if(e===void 0)return new G("undefined");if(ht(e))return new G(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new G(`Buffer.alloc(${e.byteLength})`):new G(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Br(e)?e.toISOString():"Invalid Date";return new G(`new Date("${t}")`)}return e instanceof xe?new G(`Prisma.${e._getName()}`):xt(e)?new G(`prisma.${lo(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?ip(e):typeof e=="object"?Ns(e):new G(Object.prototype.toString.call(e))}function ip(e){let t=new Et;for(let r of e)t.addItem(Ls(r));return t}function $s(e){if(e===void 0)return"";let t=en(e);return new mt(0,{colors:Zr}).write(t).toString()}var Wt="";function qs(e){var t=e.split(` -`);return t.reduce(function(r,n){var i=ap(n)||up(n)||dp(n)||yp(n)||fp(n);return i&&r.push(i),r},[])}var op=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,sp=/\((\S*)(?::(\d+))(?::(\d+))\)/;function ap(e){var t=op.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=sp.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]||Wt,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var lp=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function up(e){var t=lp.exec(e);return t?{file:t[2],methodName:t[1]||Wt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var cp=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,pp=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function dp(e){var t=cp.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=pp.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||Wt,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var mp=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function fp(e){var t=mp.exec(e);return t?{file:t[3],methodName:t[1]||Wt,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var gp=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function yp(e){var t=gp.exec(e);return t?{file:t[2],methodName:t[1]||Wt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Ti=class{getLocation(){return null}},Ci=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=qs(t).find(i=>{if(!i.file)return!1;let o=ni(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"?new Ti:new Ci}var Vs={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function wt(e={}){let t=xp(e);return Object.entries(t).reduce((n,[i,o])=>(Vs[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function xp(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function tn(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function js(e,t){let r=tn(e);return t({action:"aggregate",unpacker:r,argsMapper:wt})(e)}function bp(e={}){let{select:t,...r}=e;return typeof t=="object"?wt({...r,_count:t}):wt({...r,_count:{_all:!0}})}function Ep(e={}){return typeof e.select=="object"?t=>tn(e)(t)._count:t=>tn(e)(t)._count._all}function Bs(e,t){return t({action:"count",unpacker:Ep(e),argsMapper:bp})(e)}function wp(e={}){let t=wt(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 Pp(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Us(e,t){return t({action:"groupBy",unpacker:Pp(e),argsMapper:wp})(e)}function Ks(e,t,r){if(t==="aggregate")return n=>js(n,r);if(t==="count")return n=>Bs(n,r);if(t==="groupBy")return n=>Us(n,r)}function Qs(e,t){let r=t.fields.filter(i=>!i.relationName),n=ci(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 Ht(e,o,s.type,s.isList,s.kind==="enum")},...jr(Object.keys(n))})}var Gs=e=>Array.isArray(e)?e:e.split("."),Ai=(e,t)=>Gs(t).reduce((r,n)=>r&&r[n],e),Js=(e,t,r)=>Gs(t).reduceRight((n,i,o,s)=>Object.assign({},Ai(e,s.slice(0,o)),{[i]:n}),r);function vp(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Tp(e,t,r){return t===void 0?e??{}:Js(t,r,e||!0)}function Ri(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),c=vp(n,i),p=Tp(l,o,c),d=r({dataPath:c,callsite:u})(p),f=Cp(e,t);return new Proxy(d,{get(y,g){if(!f.includes(g))return y[g];let T=[a[g].type,r,g],C=[c,p];return Ri(e,...T,...C)},...jr([...f,...Object.getOwnPropertyNames(d)])})}}function Cp(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var Xs=S(ii());var Zs=S(require("fs"));var Hs={keyword:Oe,entity:Oe,value:e=>ne(ot(e)),punctuation:ot,directive:Oe,function:Oe,variable:e=>ne(ot(e)),string:e=>ne(Ge(e)),boolean:he,number:Oe,comment:Tr};var Ap=e=>e,rn={},Rp=0,v={manual:rn.Prism&&rn.Prism.manual,disableWorkerMessageHandler:rn.Prism&&rn.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof ye){let t=e;return new ye(t.type,v.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(v.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ae instanceof ye)continue;if(ce&&$!=t.length-1){C.lastIndex=z;var p=C.exec(e);if(!p)break;var c=p.index+(R?p[1].length:0),d=p.index+p[0].length,a=$,l=z;for(let k=t.length;a=l&&(++$,z=l);if(t[$]instanceof ye)continue;u=a-$,Ae=e.slice(z,l),p.index-=z}else{C.lastIndex=0;var p=C.exec(Ae),u=1}if(!p){if(o)break;continue}R&&(J=p[1]?p[1].length:0);var c=p.index+J,p=p[0].slice(J),d=c+p.length,f=Ae.slice(0,c),y=Ae.slice(d);let Y=[$,u];f&&(++$,z+=f.length,Y.push(f));let tt=new ye(g,x?v.tokenize(p,x):p,Ke,p,ce);if(Y.push(tt),y&&Y.push(y),Array.prototype.splice.apply(t,Y),u!=1&&v.matchGrammar(e,t,r,$,z,!0,g),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 v.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=v.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=v.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:ye};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 ye(e,t,r,n,i){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!i}ye.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return ye.stringify(r,t)}).join(""):Mp(e.type)(e.content)};function Mp(e){return Hs[e]||Ap}function Ws(e){return Sp(e,v.languages.javascript)}function Sp(e,t){return v.tokenize(e,t).map(n=>ye.stringify(n)).join("")}var zs=S(es());function Ys(e){return(0,zs.default)(e)}var nn=class e{static read(t){let r;try{r=Zs.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,Ys(n).split(` -`))}highlight(){let t=Ws(this.toString());return new e(this.firstLineNumber,t.split(` +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=>W(c)).join(", ")} in ${X(a)} and ${X(l)} +Env vars from ${X(l)} overwrite the ones from ${X(a)} + `;console.warn(`${Ie("warn(prisma)")} ${u}`)}}}}function Ho(e){if(Ju(e)){si(`Environment variables loaded from ${e}`);let t=ai.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:Wo(t),message:Ae(`Environment variables loaded from ${gt.default.relative(process.cwd(),e)}`),path:e}}else si(`Environment variables not found at ${e}`);return null}function Ko(e,t){return e&&t&>.default.resolve(e)===gt.default.resolve(t)}function Ju(e){return!!(e&&Jr.default.existsSync(e))}var zo="library";function Wt(e){let t=Wu();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":zo)}function Wu(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}var Ge;(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||={})})(Ge||={});var Ht=k(require("path"));function li(e){return Ht.default.sep===Ht.default.posix.sep?e:e.split(Ht.default.sep).join(Ht.default.posix.sep)}var rs=k(ui());function pi(e){return String(new ci(e))}var ci=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:Ku(t.binaryTargets)}));return`generator ${t.name} { +${(0,rs.default)(zu(n),2)} +}`}};function Ku(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 zu(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)} = ${Yu(n)}`).join(` +`)}function Yu(e){return JSON.parse(JSON.stringify(e,(t,r)=>Array.isArray(r)?`[${r.map(n=>JSON.stringify(n)).join(", ")}]`:JSON.stringify(r)))}var zt={};qt(zt,{error:()=>ec,info:()=>Xu,log:()=>Zu,query:()=>tc,should:()=>ns,tags:()=>Kt,warn:()=>di});var Kt={error:ce("prisma:error"),warn:Ie("prisma:warn"),info:Oe("prisma:info"),query:et("prisma:query")},ns={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Zu(...e){console.log(...e)}function di(e,...t){ns.warn()&&console.warn(`${Kt.warn} ${e}`,...t)}function Xu(e,...t){console.info(`${Kt.info} ${e}`,...t)}function ec(e,...t){console.error(`${Kt.error} ${e}`,...t)}function tc(e,...t){console.log(`${Kt.query} ${e}`,...t)}function Wr(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 De(e,t){throw new Error(t)}function fi(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var gi=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});function ht(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function hi(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{ls.has(e)||(ls.add(e),di(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 _e=class extends V{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};w(_e,"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 H=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};w(H,"PrismaClientValidationError");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})}};function Zt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function us(e,t){let r=Zt(()=>nc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function nc(e){return{datamodel:{models:yi(e.models),enums:yi(e.enums),types:yi(e.types)}}}function yi(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}var zr=Symbol(),bi=new WeakMap,Le=class{constructor(t){t===zr?bi.set(this,`Prisma.${this._getName()}`):bi.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return bi.get(this)}},Xt=class extends Le{_getNamespace(){return"NullTypes"}},er=class extends Xt{};Ei(er,"DbNull");var tr=class extends Xt{};Ei(tr,"JsonNull");var rr=class extends Xt{};Ei(rr,"AnyNull");var Yr={classes:{DbNull:er,JsonNull:tr,AnyNull:rr},instances:{DbNull:new er(zr),JsonNull:new tr(zr),AnyNull:new rr(zr)}};function Ei(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}function nr(e){return{ok:!1,error:e,map(){return nr(e)},flatMap(){return nr(e)}}}var wi=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}},xi=e=>{let t=new wi,r=rt(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:rt(t,e.queryRaw.bind(e)),executeRaw:rt(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>ic(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=oc(t,e.getConnectionInfo.bind(e))),n},ic=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:rt(e,t.queryRaw.bind(t)),executeRaw:rt(e,t.executeRaw.bind(t)),commit:rt(e,t.commit.bind(t)),rollback:rt(e,t.rollback.bind(t))});function rt(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return nr({kind:"GenericJs",id:i})}}}function oc(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return nr({kind:"GenericJs",id:i})}}}var Dl=k(ei());var _l=require("async_hooks"),Ll=require("events"),Fl=k(require("fs")),Or=k(require("path"));var ie=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 Zr={enumerable:!0,configurable:!0,writable:!0};function Xr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Zr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var ds=Symbol.for("nodejs.util.inspect.custom");function xe(e,t){let r=sc(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=ms(Reflect.ownKeys(o),r),a=ms(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?{...Zr,...l?.getPropertyDescriptor(s)}:Zr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[ds]=function(){let o={...this};return delete o[ds],o},i}function sc(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 ms(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}function bt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function Et(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}var wt=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}};function fs(e){return e.substring(0,1).toLowerCase()+e.substring(1)}function xt(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function en(e){return e.toString()!=="Invalid Date"}var Pt=9e15,He=1e9,Ti="0123456789abcdef",rn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",nn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ri={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Pt,maxE:Pt,crypto:!1},bs,Fe,x=!0,sn="[DecimalError] ",We=sn+"Invalid argument: ",Es=sn+"Precision limit exceeded",ws=sn+"crypto unavailable",xs="[object Decimal]",ee=Math.floor,G=Math.pow,ac=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,lc=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,uc=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ps=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ge=1e7,b=7,cc=9007199254740991,pc=rn.length-1,Ci=nn.length-1,m={toStringTag:xs};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(We+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=dc(n,Ss(n,r)),n.precision=e,n.rounding=t,y(Fe==2||Fe==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/ln(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=vt(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=vt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/ln(5,e)),i=vt(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<=Ci)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<=Ci)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=Je(u,a),n=t?on(c,a+10):Je(e,a),l=N(s,n,a,1),or(l.d,i=p,d))do if(a+=10,s=Je(u,a),n=t?on(c,a+10):Je(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(or(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=an(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(We+e);return r.d?(t=vs(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=fc(n,Ss(n,r)),n.precision=e,n.rounding=t,y(Fe>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(Fe==2||Fe==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=an(o,r),x?y(e,p.precision,p.rounding):e};m.toBinary=function(e,t){return Ii(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:(oe(e,0,He),t===void 0?t=n.rounding:oe(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=Pe(n,!0):(oe(e,0,He),t===void 0?t=i.rounding:oe(t,0,8),n=y(new i(n),e+1,t),r=Pe(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=Pe(i):(oe(e,0,He),t===void 0?t=o.rounding:oe(t,0,8),n=y(new o(i),e+i.e+1,t),r=Pe(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=vs(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(We+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 Ii(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:oe(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 Ii(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)<=cc)return i=Ts(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=Si(e.times(Je(a,n+r)),n),i.d&&(i=y(i,n+5,1),or(i.d,n,o)&&(t=n+10,i=y(Si(e.times(Je(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=Pe(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(oe(e,1,He),t===void 0?t=i.rounding:oe(t,0,8),n=y(new i(n),e,t),r=Pe(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):(oe(e,1,He),t===void 0?t=n.rounding:oe(t,0,8)),y(new n(r),e,t)};m.toString=function(){var e=this,t=e.constructor,r=Pe(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=Pe(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(We+e)}function or(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 tn(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 dc(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/ln(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=vt(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,$t,U,ne,Se,z,pt,kr=n.constructor,Ln=n.s==i.s?1:-1,Y=n.d,_=i.d;if(!Y||!Y[0]||!_||!_[0])return new kr(!n.s||!i.s||(Y?_&&Y[0]==_[0]:!_)?NaN:Y&&Y[0]==0||!_?Ln*0:Ln/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 kr(Ln),S=T.d=[],p=0;_[p]==(Y[p]||0);p++);if(_[p]>(Y[p]||0)&&c--,o==null?(ae=o=kr.precision,s=kr.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&&++Se;do d=0,u=t(_,C,z,E),u<0?(me=C[0],z!=E&&(me=me*l+(C[1]||0)),d=me/Se|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)+Qe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Qe(-i-1)+o,r&&(n=r-s)>0&&(o+=Qe(n))):i>=s?(o+=Qe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Qe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Qe(n))),o}function an(e,t){var r=e[0];for(t*=b;r>=10;r/=10)t++;return t}function on(e,t,r){if(t>pc)throw x=!0,r&&(e.precision=r),Error(Es);return y(new e(rn),t,1,!0)}function fe(e,t,r){if(t>Ci)throw Error(Es);return y(new e(nn),t,r,!0)}function vs(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 Qe(e){for(var t="";e--;)t+="0";return t}function Ts(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),hs(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),hs(t.d,s)}return x=!0,o}function gs(e){return e.d[e.d.length-1]&1}function Rs(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&&or(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 Je(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=on(T,c+2,C).times(o+""),h=Je(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(on(T,c+2,C).times(o+""))),l=N(l,new T(f),c,1),t==null)if(or(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 Cs(e){return String(e.s*e.s/0)}function Ai(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"),Ps.test(t))return Ai(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(lc.test(t))r=16,t=t.toLowerCase();else if(ac.test(t))r=2;else if(uc.test(t))r=8;else throw Error(We+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=Ts(n,new n(r),o,o*2)),u=tn(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=an(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 fc(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:vt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/ln(5,r)),t=vt(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 vt(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 ln(e,t){for(var r=e;--t;)r*=e;return r}function Ss(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 Fe=n?4:1,t;if(r=t.divToInt(i),r.isZero())Fe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Fe=gs(r)?n?2:3:n?4:1,t;Fe=gs(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Ii(e,t,r,n){var i,o,s,a,l,u,c,p,d,f=e.constructor,g=r!==void 0;if(g?(oe(r,1,He),n===void 0?n=f.rounding:oe(n,0,8)):(r=f.precision,n=f.rounding),!e.isFinite())c=Cs(e);else{for(c=Pe(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=tn(Pe(d),10,i),d.e=d.d.length),p=tn(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=bs),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=tn(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 gc(e){return new this(e).abs()}function hc(e){return new this(e).acos()}function yc(e){return new this(e).acosh()}function bc(e,t){return new this(e).plus(t)}function Ec(e){return new this(e).asin()}function wc(e){return new this(e).asinh()}function xc(e){return new this(e).atan()}function Pc(e){return new this(e).atanh()}function vc(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 Tc(e){return new this(e).cbrt()}function Rc(e){return y(e=new this(e),e.e+1,2)}function Cc(e,t,r){return new this(e).clamp(t,r)}function Sc(e){if(!e||typeof e!="object")throw Error(sn+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,He,"rounding",0,8,"toExpNeg",-Pt,0,"toExpPos",0,Pt,"maxE",0,Pt,"minE",-Pt,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(We+r+": "+n);if(r="crypto",i&&(this[r]=Ri[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(ws);else this[r]=!1;else throw Error(We+r+": "+n);return this}function Ac(e){return new this(e).cos()}function Ic(e){return new this(e).cosh()}function As(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,ys(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(ws);else for(;o=10;i/=10)n++;n`}};function Rt(e){return e instanceof sr}var un=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};var cn=e=>e,pn={bold:cn,red:cn,green:cn,dim:cn,enabled:!1},Is={bold:W,red:ce,green:Me,dim:Ae,enabled:!0},Ct={write(e){e.writeLine(",")}};var Te=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 Ke=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var St=class extends Ke{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new un(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 Te("[]");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 Os=": ",dn=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()+Os.length}write(t){let r=new Te(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Os).write(this.value)}};var At=class e extends Ke{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 Te("{}");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 J=class extends Ke{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Te(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var Oi=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 It(e){return new Oi(ks(e))}function ks(e){let t=new At;for(let[r,n]of Object.entries(e)){let i=new dn(r,Ds(n));t.addField(i)}return t}function Ds(e){if(typeof e=="string")return new J(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new J(String(e));if(typeof e=="bigint")return new J(`${e}n`);if(e===null)return new J("null");if(e===void 0)return new J("undefined");if(Tt(e))return new J(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new J(`Buffer.alloc(${e.byteLength})`):new J(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=en(e)?e.toISOString():"Invalid Date";return new J(`new Date("${t}")`)}return e instanceof Le?new J(`Prisma.${e._getName()}`):Rt(e)?new J(`prisma.${fs(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?tp(e):typeof e=="object"?ks(e):new J(Object.prototype.toString.call(e))}function tp(e){let t=new St;for(let r of e)t.addItem(Ds(r));return t}function mn(e,t){let r=t==="pretty"?Is:pn,n=e.renderAllMessages(r),i=new wt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function _s(e){if(e===void 0)return"";let t=It(e);return new wt(0,{colors:pn}).write(t).toString()}var rp="P2037";function ot({error:e,user_facing_error:t},r,n){return t.error_code?new V(np(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 np(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===rp&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}var ar="";function Ls(e){var t=e.split(` +`);return t.reduce(function(r,n){var i=sp(n)||lp(n)||pp(n)||gp(n)||mp(n);return i&&r.push(i),r},[])}var ip=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,op=/\((\S*)(?::(\d+))(?::(\d+))\)/;function sp(e){var t=ip.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=op.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]||ar,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var ap=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function lp(e){var t=ap.exec(e);return t?{file:t[2],methodName:t[1]||ar,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var up=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,cp=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function pp(e){var t=up.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=cp.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||ar,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var dp=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function mp(e){var t=dp.exec(e);return t?{file:t[3],methodName:t[1]||ar,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var fp=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function gp(e){var t=fp.exec(e);return t?{file:t[2],methodName:t[1]||ar,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var ki=class{getLocation(){return null}},Di=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=Ls(t).find(i=>{if(!i.file)return!1;let o=li(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 ki:new Di}var Fs={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Ot(e={}){let t=yp(e);return Object.entries(t).reduce((n,[i,o])=>(Fs[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function yp(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function fn(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Ns(e,t){let r=fn(e);return t({action:"aggregate",unpacker:r,argsMapper:Ot})(e)}function bp(e={}){let{select:t,...r}=e;return typeof t=="object"?Ot({...r,_count:t}):Ot({...r,_count:{_all:!0}})}function Ep(e={}){return typeof e.select=="object"?t=>fn(e)(t)._count:t=>fn(e)(t)._count._all}function Ms(e,t){return t({action:"count",unpacker:Ep(e),argsMapper:bp})(e)}function wp(e={}){let t=Ot(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 xp(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function $s(e,t){return t({action:"groupBy",unpacker:xp(e),argsMapper:wp})(e)}function qs(e,t,r){if(t==="aggregate")return n=>Ns(n,r);if(t==="count")return n=>Ms(n,r);if(t==="groupBy")return n=>$s(n,r)}function js(e,t){let r=t.fields.filter(i=>!i.relationName),n=gi(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")},...Xr(Object.keys(n))})}var Vs=e=>Array.isArray(e)?e:e.split("."),_i=(e,t)=>Vs(t).reduce((r,n)=>r&&r[n],e),Bs=(e,t,r)=>Vs(t).reduceRight((n,i,o,s)=>Object.assign({},_i(e,s.slice(0,o)),{[i]:n}),r);function Pp(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function vp(e,t,r){return t===void 0?e??{}:Bs(t,r,e||!0)}function Li(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=Pp(n,i),p=vp(l,o,c),d=r({dataPath:c,callsite:u})(p),f=Tp(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 Li(e,...T,...S)},...Xr([...f,...Object.getOwnPropertyNames(d)])})}}function Tp(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var Hs=k(ui());var Ws=k(require("fs"));var Us={keyword:Oe,entity:Oe,value:e=>W(et(e)),punctuation:et,directive:Oe,function:Oe,variable:e=>W(et(e)),string:e=>W(Me(e)),boolean:Ie,number:Oe,comment:jt};var Rp=e=>e,gn={},Cp=0,P={manual:gn.Prism&&gn.Prism.manual,disableWorkerMessageHandler:gn.Prism&&gn.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(Se 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,Se=e.slice(ne,l),p.index-=ne}else{S.lastIndex=0;var p=S.exec(Se),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=Se.slice(0,c),g=Se.slice(d);let z=[U,u];f&&(++U,ne+=f.length,z.push(f));let pt=new he(h,C?P.tokenize(p,C):p,$t,p,me);if(z.push(pt),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(""):Sp(e.type)(e.content)};function Sp(e){return Us[e]||Rp}function Gs(e){return Ap(e,P.languages.javascript)}function Ap(e,t){return P.tokenize(e,t).map(n=>he.stringify(n)).join("")}var Qs=k(es());function Js(e){return(0,Qs.default)(e)}var hn=class e{static read(t){let r;try{r=Ws.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,Js(n).split(` +`))}highlight(){let t=Gs(this.toString());return new e(this.firstLineNumber,t.split(` `))}toString(){return this.lines.join(` -`)}};var Ip={red:me,gray:Tr,dim:Fe,bold:ne,underline:te,highlightSource:e=>e.highlight()},kp={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Fp({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s={functionName:`prisma.${r}()`,message:t,isPanic:n??!1,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=nn.read(a.fileName)?.slice(l,a.lineNumber),c=u?.lineAt(a.lineNumber);if(u&&c){let p=Dp(c),d=Op(c);if(!d)return s;s.functionName=`${d.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,y=>y.slice(0,d.openingBraceIndex))),u=o.highlightSource(u);let f=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((y,g)=>o.gray(String(g).padStart(f))+" "+y).mapLines(y=>o.dim(y)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let y=p+f+1;y+=2,s.callArguments=(0,Xs.default)(i,y).slice(y)}}return s}function Op(e){let t=Object.keys(pe.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 Dp(e){let t=0;for(let r=0;r{if("rejectOnNotFound"in n.args){let o=Pt({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new X(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof U&&o.code==="P2025"?new Re(`No ${e} found`,t):o})}}function Te(e){return e.replace(/^./,t=>t.toLowerCase())}var $p=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],qp=["aggregate","count","groupBy"];function Mi(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Vp(e,t),Bp(e,t),Qt(r),re("name",()=>t),re("$name",()=>t),re("$parent",()=>e._appliedParent)];return Ee({},n)}function Vp(e,t){let r=Te(t),n=Object.keys(pe.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=ea(o,t,e._clientVersion,s);let a=l=>u=>{let c=Ve(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 $p.includes(o)?Ri(e,t,a):jp(i)?Ks(e,i,a):a({})}}}function jp(e){return qp.includes(e)}function Bp(e,t){return We(re("fields",()=>{let r=e._runtimeDataModel.models[t];return Qs(t,r)}))}function ta(e){return e.replace(/^./,t=>t.toUpperCase())}var Si=Symbol();function zt(e){let t=[Up(e),re(Si,()=>e),re("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Qt(r)),Ee(e,t)}function Up(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Te),n=[...new Set(t.concat(r))];return We({getKeys(){return n},getPropertyValue(i){let o=ta(i);if(e._runtimeDataModel.models[o]!==void 0)return Mi(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Mi(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function on(e){return e[Si]?e[Si]:e}function ra(e){if(typeof e=="function")return e(this);let t=on(this),r=Object.create(t,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return zt(r)}function na({result:e,modelName:t,select:r,extensions:n}){let i=n.getAllComputedFields(t);if(!i)return e;let o=[],s=[];for(let a of Object.values(i)){if(r){if(!r[a.name])continue;let l=a.needs.filter(u=>!r[u]);l.length>0&&s.push(Gt(l))}Kp(e,a.needs)&&o.push(Qp(a,Ee(e,o)))}return o.length>0||s.length>0?Ee(e,[...o,...s]):e}function Kp(e,t){return t.every(r=>ui(e,r))}function Qp(e,t){return We(re(e.name,()=>e.compute(t)))}function sn({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]=sn({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function oa({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:sn({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(s,a,l)=>na({result:s,modelName:Te(a),select:l.select,extensions:n})})}function sa(e){if(e instanceof oe)return Gp(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:sa(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=da(o,l),a.args=s,la(e,a,r,n+1)}})})}function ua(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 ca(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?pa(r,n,0,e):e(r)}}function pa(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=da(i,l),pa(a,t,r+1,n)}})}var aa=e=>e;function da(e=aa,t=aa){return r=>e(t(r))}function fa(e,t,r){let n=Te(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Jp({...e,...ma(t.name,e,t.result.$allModels),...ma(t.name,e,t.result[n])})}function Jp(e){let t=new be,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 pt(e,n=>({...n,needs:r(n.name,new Set)}))}function ma(e,t,r){return r?pt(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Hp(t,o,i)})):{}}function Hp(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function ga(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}var an=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new be;this.modelExtensionsCache=new be;this.queryCallbacksCache=new be;this.clientExtensions=Vt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Vt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>fa(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()}},ln=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new an(t))}isEmpty(){return this.head===void 0}append(t){return new e(new an(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 ya=D("prisma:client"),ha={Vercel:"vercel","Netlify CI":"netlify"};function xa({postinstall:e,ciName:t,clientVersion:r}){if(ya("checkPlatformCaching:postinstall",e),ya("checkPlatformCaching:ciName",t),e===!0&&t&&t in ha){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. +`)}};var Ip={red:ce,gray:jt,dim:Ae,bold:W,underline:X,highlightSource:e=>e.highlight()},Op={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function kp({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Dp({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=kp({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=hn.read(a.fileName)?.slice(l,a.lineNumber),c=u?.lineAt(a.lineNumber);if(u&&c){let p=Lp(c),d=_p(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,Hs.default)(i,g).slice(g)}}return s}function _p(e){let t=Object.keys(Ge.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 Lp(e){let t=0;for(let r=0;r{if("rejectOnNotFound"in n.args){let o=kt({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 V&&o.code==="P2025"?new _e(`No ${e} found`,t):o})}}function Re(e){return e.replace(/^./,t=>t.toLowerCase())}var $p=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],qp=["aggregate","count","groupBy"];function Fi(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[jp(e,t),Bp(e,t),ir(r),re("name",()=>t),re("$name",()=>t),re("$parent",()=>e._appliedParent)];return xe({},n)}function jp(e,t){let r=Re(t),n=Object.keys(Ge.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=Ks(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 $p.includes(o)?Li(e,t,a):Vp(i)?qs(e,i,a):a({})}}}function Vp(e){return qp.includes(e)}function Bp(e,t){return nt(re("fields",()=>{let r=e._runtimeDataModel.models[t];return js(t,r)}))}function zs(e){return e.replace(/^./,t=>t.toUpperCase())}var Ni=Symbol();function lr(e){let t=[Up(e),re(Ni,()=>e),re("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(ir(r)),xe(e,t)}function Up(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Re),n=[...new Set(t.concat(r))];return nt({getKeys(){return n},getPropertyValue(i){let o=zs(i);if(e._runtimeDataModel.models[o]!==void 0)return Fi(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Fi(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Ys(e){return e[Ni]?e[Ni]:e}function Zs(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 lr(t)}function Xs({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(bt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(c=>!r[c]);u.length>0&&a.push(bt(u))}Gp(e,l.needs)&&s.push(Qp(l,xe(e,s)))}return s.length>0||a.length>0?xe(e,[...s,...a]):e}function Gp(e,t){return t.every(r=>fi(e,r))}function Qp(e,t){return nt(re(e.name,()=>e.compute(t)))}function yn({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]=yn({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function ta({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:yn({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let c=Re(l);return Xs({result:a,modelName:c,select:u.select,omit:u.select?void 0:{...o?.[c],...u.omit},extensions:n})}})}function ra(e){if(e instanceof ie)return Jp(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:ra(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=la(o,l),a.args=s,ia(e,a,r,n+1)}})})}function oa(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 ia(e,t,s)}function sa(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?aa(r,n,0,e):e(r)}}function aa(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=la(i,l),aa(a,t,r+1,n)}})}var na=e=>e;function la(e=na,t=na){return r=>e(t(r))}function ca(e,t,r){let n=Re(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Wp({...e,...ua(t.name,e,t.result.$allModels),...ua(t.name,e,t.result[n])})}function Wp(e){let t=new we,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 ht(e,n=>({...n,needs:r(n.name,new Set)}))}function ua(e,t,r){return r?ht(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Hp(t,o,i)})):{}}function Hp(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function pa(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 da(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 bn=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new we;this.modelExtensionsCache=new we;this.queryCallbacksCache=new we;this.clientExtensions=Zt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Zt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>ca(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Re(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()}},En=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new bn(t))}isEmpty(){return this.head===void 0}append(t){return new e(new bn(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 ma=F("prisma:client"),fa={Vercel:"vercel","Netlify CI":"netlify"};function ga({postinstall:e,ciName:t,clientVersion:r}){if(ma("checkPlatformCaching:postinstall",e),ma("checkPlatformCaching:ciName",t),e===!0&&t&&t in fa){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/${ha[t]}-build`;throw console.error(n),new F(n,r)}}function ba(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}function Zt({error:e,user_facing_error:t},r){return t.error_code?new U(t.message,{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new K(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}var vt=class{};var Ta=S(require("fs")),Xt=S(require("path"));function un(e){let{runtimeBinaryTarget:t}=e;return`Add "${t}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: +Learn how: https://pris.ly/d/${fa[t]}-build`;throw console.error(n),new R(n,r)}}function ha(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}var Kp="Cloudflare-Workers",zp="node";function ya(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Kp?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===zp?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Yp={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 wn(){let e=ya();return{id:e,prettyName:Yp[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var Pa=k(require("fs")),cr=k(require("path"));function xn(e){let{runtimeBinaryTarget:t}=e;return`Add "${t}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: -${Wp(e)}`}function Wp(e){let{generator:t,generatorBinaryTargets:r,runtimeBinaryTarget:n}=e,i={fromEnvVar:null,value:n},o=[...r,i];return si({...t,binaryTargets:o})}function je(e){let{runtimeBinaryTarget:t}=e;return`Prisma Client could not locate the Query Engine for runtime "${t}".`}function Be(e){let{searchedLocations:t}=e;return`The following locations have been searched: +${Zp(e)}`}function Zp(e){let{generator:t,generatorBinaryTargets:r,runtimeBinaryTarget:n}=e,i={fromEnvVar:null,value:n},o=[...r,i];return pi({...t,binaryTargets:o})}function Ye(e){let{runtimeBinaryTarget:t}=e;return`Prisma Client could not locate the Query Engine for runtime "${t}".`}function Ze(e){let{searchedLocations:t}=e;return`The following locations have been searched: ${[...new Set(t)].map(i=>` ${i}`).join(` -`)}`}function Ea(e){let{runtimeBinaryTarget:t}=e;return`${je(e)} +`)}`}function ba(e){let{runtimeBinaryTarget:t}=e;return`${Ye(e)} This happened because \`binaryTargets\` have been pinned, but the actual deployment also required "${t}". -${un(e)} +${xn(e)} -${Be(e)}`}function cn(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 wa(e){let{queryEngineName:t}=e;return`${je(e)} +${Ze(e)}`}function Pn(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 vn(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 Ea(e){let{queryEngineName:t}=e;return`${Ye(e)}${vn(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}". -${cn("engine-not-found-bundler-investigation")} +${Pn("engine-not-found-bundler-investigation")} -${Be(e)}`}function Pa(e){let{runtimeBinaryTarget:t,generatorBinaryTargets:r}=e,n=r.find(i=>i.native);return`${je(e)} +${Ze(e)}`}function wa(e){let{runtimeBinaryTarget:t,generatorBinaryTargets:r}=e,n=r.find(i=>i.native);return`${Ye(e)} This happened because Prisma Client was generated for "${n?.value??"unknown"}", but the actual deployment required "${t}". -${un(e)} +${xn(e)} -${Be(e)}`}function va(e){let{queryEngineName:t}=e;return`${je(e)} +${Ze(e)}`}function xa(e){let{queryEngineName:t}=e;return`${Ye(e)}${vn(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}". -${cn("engine-not-found-tooling-investigation")} +${Pn("engine-not-found-tooling-investigation")} -${Be(e)}`}var zp=D("prisma:client:engines:resolveEnginePath"),Yp=()=>new RegExp("runtime[\\\\/]library\\.m?js$");async function Ca(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 Zp(e,t);if(zp("enginePath",n),n!==void 0&&e==="binary"&&ti(n),n!==void 0)return t.prismaPath=n;let o=await ut(),s=t.generator?.binaryTargets??[],a=s.some(d=>d.native),l=!s.some(d=>d.value===o),u=__filename.match(Yp())===null,c={searchedLocations:i,generatorBinaryTargets:s,generator:t.generator,runtimeBinaryTarget:o,queryEngineName:Aa(e,o),expectedLocation:Xt.default.relative(process.cwd(),t.dirname)},p;throw a&&l?p=Pa(c):l?p=Ea(c):u?p=wa(c):p=va(c),new F(p,t.clientVersion)}async function Zp(engineType,config){let binaryTarget=await ut(),searchedLocations=[],dirname=eval("__dirname"),searchLocations=[config.dirname,Xt.default.resolve(dirname,".."),config.generator?.output?.value??dirname,Xt.default.resolve(dirname,"../../../.prisma/client"),"/tmp/prisma-engines",config.cwd];__filename.includes("resolveEnginePath")&&searchLocations.push(rs());for(let e of searchLocations){let t=Aa(engineType,binaryTarget),r=Xt.default.join(e,t);if(searchedLocations.push(e),Ta.default.existsSync(r))return{enginePath:r,searchedLocations}}return{enginePath:void 0,searchedLocations}}function Aa(e,t){return e==="library"?jn(t,"fs"):`query-engine-${t}${t==="windows"?".exe":""}`}function pn(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}var Ii=S(li());function Ra(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}function Ma(e){return e.split(` +${Ze(e)}`}var Xp=F("prisma:client:engines:resolveEnginePath"),ed=()=>new RegExp("runtime[\\\\/]library\\.m?js$");async function va(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 td(e,t);if(Xp("enginePath",n),n!==void 0&&e==="binary"&&ni(n),n!==void 0)return t.prismaPath=n;let o=await tt(),s=t.generator?.binaryTargets??[],a=s.some(d=>d.native),l=!s.some(d=>d.value===o),u=__filename.match(ed())===null,c={searchedLocations:i,generatorBinaryTargets:s,generator:t.generator,runtimeBinaryTarget:o,queryEngineName:Ta(e,o),expectedLocation:cr.default.relative(process.cwd(),t.dirname),errorStack:new Error().stack},p;throw a&&l?p=wa(c):l?p=ba(c):u?p=Ea(c):p=xa(c),new R(p,t.clientVersion)}async function td(engineType,config){let binaryTarget=await tt(),searchedLocations=[],dirname=eval("__dirname"),searchLocations=[config.dirname,cr.default.resolve(dirname,".."),config.generator?.output?.value??dirname,cr.default.resolve(dirname,"../../../.prisma/client"),"/tmp/prisma-engines",config.cwd];__filename.includes("resolveEnginePath")&&searchLocations.push(Bo());for(let e of searchLocations){let t=Ta(engineType,binaryTarget),r=cr.default.join(e,t);if(searchedLocations.push(e),Pa.default.existsSync(r))return{enginePath:r,searchedLocations}}return{enginePath:void 0,searchedLocations}}function Ta(e,t){return e==="library"?Fr(t,"fs"):`query-engine-${t}${t==="windows"?".exe":""}`}var Mi=k(mi());function Ra(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}function Ca(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 Sa=S(cs());function Ia({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.md",body:i}){return(0,Sa.default)({user:t,repo:r,template:n,title:e,body:i})}function ka({version:e,platform:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=bo(6e3-(s?.length??0)),l=Ma((0,Ii.default)(a)),u=n?`# Description +`)}var Sa=k(as());function Aa({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,Sa.default)({user:t,repo:r,template:n,title:e,body:i})}function Ia({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=bo(6e3-(s?.length??0)),l=Ca((0,Mi.default)(a)),u=n?`# Description \`\`\` ${n} -\`\`\``:"",c=(0,Ii.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: +\`\`\``:"",c=(0,Mi.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: ## Versions | Name | Version | @@ -99,34 +97,38 @@ ${l} \`\`\` ${s?Ra(s):""} \`\`\` -`),p=Ia({title:r,body:c});return`${r} +`),p=Aa({title:r,body:c});return`${r} This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. -${te(p)} +${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 dn({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 F(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new F("error: Missing URL environment variable, value, or override.",n);return i}var mn=class extends Error{constructor(r,n){super(r);this.clientVersion=n.clientVersion,this.cause=n.cause}get[Symbol.toStringTag](){return this.name}};var ae=class extends mn{constructor(r,n){super(r,n);this.isRetryable=n.isRetryable??!0}};function M(e,t){return{...e,isRetryable:t}}var Tt=class extends ae{constructor(r){super("This request must be retried",M(r,!0));this.name="ForcedRetryError";this.code="P5001"}};E(Tt,"ForcedRetryError");var Ye=class extends ae{constructor(r,n){super(r,M(n,!1));this.name="InvalidDatasourceError";this.code="P5002"}};E(Ye,"InvalidDatasourceError");var Ze=class extends ae{constructor(r,n){super(r,M(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};E(Ze,"NotImplementedYetError");var L=class extends ae{constructor(r,n){super(r,n);this.response=n.response;let i=this.response.headers.get("prisma-request-id");if(i){let o=`(The request id was: ${i})`;this.message=this.message+" "+o}}};var Xe=class extends L{constructor(r){super("Schema needs to be uploaded",M(r,!0));this.name="SchemaMissingError";this.code="P5005"}};E(Xe,"SchemaMissingError");var ki="This request could not be understood by the server",er=class extends L{constructor(r,n,i){super(n||ki,M(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};E(er,"BadRequestError");var tr=class extends L{constructor(r,n){super("Engine not started: healthcheck timeout",M(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};E(tr,"HealthcheckTimeoutError");var rr=class extends L{constructor(r,n,i){super(n,M(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};E(rr,"EngineStartupError");var nr=class extends L{constructor(r){super("Engine version is not supported",M(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};E(nr,"EngineVersionNotSupportedError");var Fi="Request timed out",ir=class extends L{constructor(r,n=Fi){super(n,M(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};E(ir,"GatewayTimeoutError");var Xp="Interactive transaction error",or=class extends L{constructor(r,n=Xp){super(n,M(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};E(or,"InteractiveTransactionError");var ed="Request parameters are invalid",sr=class extends L{constructor(r,n=ed){super(n,M(r,!1));this.name="InvalidRequestError";this.code="P5011"}};E(sr,"InvalidRequestError");var Oi="Requested resource does not exist",ar=class extends L{constructor(r,n=Oi){super(n,M(r,!1));this.name="NotFoundError";this.code="P5003"}};E(ar,"NotFoundError");var Di="Unknown server error",Ct=class extends L{constructor(r,n,i){super(n||Di,M(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};E(Ct,"ServerError");var _i="Unauthorized, check your connection string",lr=class extends L{constructor(r,n=_i){super(n,M(r,!1));this.name="UnauthorizedError";this.code="P5007"}};E(lr,"UnauthorizedError");var Ni="Usage exceeded, retry again later",ur=class extends L{constructor(r,n=Ni){super(n,M(r,!0));this.name="UsageExceededError";this.code="P5008"}};E(ur,"UsageExceededError");async function td(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 cr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await td(e);if(n.type==="QueryEngineError")throw new U(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Ct(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Xe(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new nr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new rr(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new F(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new tr(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 or(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new sr(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new lr(r,At(_i,n));if(e.status===404)return new ar(r,At(Oi,n));if(e.status===429)throw new ur(r,At(Ni,n));if(e.status===504)throw new ir(r,At(Fi,n));if(e.status>=500)throw new Ct(r,At(Di,n));if(e.status>=400)throw new er(r,At(ki,n))}function At(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}function Fa(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))}function Oa(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new F("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)}var Da={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*","@swc/core":"1.3.75","@swc/jest":"0.2.29","@types/jest":"29.5.5","@types/node":"18.18.0",execa:"5.1.1",jest:"29.7.0",typescript:"5.2.2"};var pr=class extends ae{constructor(r,n){super(`Cannot fetch data from service: -${r}`,M(n,!0));this.name="RequestError";this.code="P5010"}};E(pr,"RequestError");async function et(e,t,r=n=>n){let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(Li)(e,t)}catch(i){console.log(e);let o=i.message??"Unknown error";throw new pr(o,{clientVersion:n})}}function nd(e){return{...e.headers,"Content-Type":"application/json"}}function id(e){return{method:e.method,headers:nd(e)}}function od(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 $i(t.headers)}}async function Li(e,t={}){let r=sd("https"),n=id(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(Li(`${o}${p}`,t)):s(Li(p,t))),u.on("data",d=>i.push(d)),u.on("end",()=>s(od(i,u))),u.on("error",a)});l.on("error",a),l.end(t.body??"")})}var sd=typeof require<"u"?require:()=>{},$i=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 ad=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,_a=D("prisma:client:dataproxyEngine");async function ld(e,t){let r=Da["@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&&ad.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=ud(`<=${a}.${l}.${u}`),p=await et(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();_a("length of body fetched from unpkg.com",d.length);let f;try{f=JSON.parse(d)}catch(y){throw console.error("JSON.parse error: body fetched from unpkg.com: ",d),y}return f.version}throw new Ze("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Na(e,t){let r=await ld(e,t);return _a("version",r),r}function ud(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var La=3,qi=D("prisma:client:dataproxyEngine"),Vi=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`};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 extends vt{constructor(r){super();Oa(r),this.config=r,this.env={...this.config.env,...process.env},this.inlineSchema=r.inlineSchema??"",this.inlineDatasources=r.inlineDatasources??{},this.inlineSchemaHash=r.inlineSchemaHash??"",this.clientVersion=r.clientVersion??"unknown",this.logEmitter=r.logEmitter,this.tracingHelper=this.config.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return"unknown"}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[r,n]=this.extractHostAndApiKey();this.host=r,this.headerBuilder=new Vi({apiKey:n,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries}),this.remoteClientVersion=await Na(r,this.config),qi("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(r){r?.logs?.length&&r.logs.forEach(n=>{switch(n.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let i=typeof n.attributes.query=="string"?n.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[o]=i.split("/* traceparent");i=o}this.logEmitter.emit("query",{query:i,timestamp:n.timestamp,duration:n.attributes.duration_ms,params:n.attributes.params,target:n.attributes.target})}}}),r?.traces?.length&&this.tracingHelper.createEngineSpan({span:!0,spans:r.traces})}on(r,n){if(r==="beforeExit")throw new Error('"beforeExit" hook is not applicable to the remote query engine');this.logEmitter.on(r,n)}async url(r){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${r}`}async uploadSchema(){let r={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(r,async()=>{let n=await et(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});n.ok||qi("schema response status",n.status);let i=await cr(n,this.clientVersion);if(i)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${i.message}`}),i;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`})})}request(r,{traceparent:n,interactiveTransaction:i,customDataProxyFetch:o}){return this.requestInternal({body:r,traceparent:n,interactiveTransaction:i,customDataProxyFetch:o})}async requestBatch(r,{traceparent:n,transaction:i,customDataProxyFetch:o}){let s=i?.kind==="itx"?i.options:void 0,a=pn(r,i),{batchResult:l,elapsed:u}=await this.requestInternal({body:a,customDataProxyFetch:o,interactiveTransaction:s,traceparent:n});return l.map(c=>"errors"in c&&c.errors.length>0?Zt(c.errors[0],this.clientVersion):{data:c,elapsed:u})}requestInternal({body:r,traceparent:n,customDataProxyFetch:i,interactiveTransaction:o}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:s})=>{let a=o?`${o.payload.endpoint}/graphql`:await this.url("graphql");s(a);let l=await et(a,{method:"POST",headers:this.headerBuilder.build({traceparent:n,interactiveTransaction:o}),body:JSON.stringify(r),clientVersion:this.clientVersion},i);l.ok||qi("graphql response status",l.status),await this.handleError(await cr(l,this.clientVersion));let u=await l.json(),c=u.extensions;if(c&&this.propagateResponseExtensions(c),u.errors)throw u.errors.length===1?Zt(u.errors[0],this.config.clientVersion):new K(u.errors,{clientVersion:this.config.clientVersion});return u}})}async transaction(r,n,i){let o={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${o[r]} transaction`,callback:async({logHttpCall:s})=>{if(r==="start"){let a=JSON.stringify({max_wait:i?.maxWait??2e3,timeout:i?.timeout??5e3,isolation_level:i?.isolationLevel}),l=await this.url("transaction/start");s(l);let u=await et(l,{method:"POST",headers:this.headerBuilder.build({traceparent:n.traceparent}),body:a,clientVersion:this.clientVersion});await this.handleError(await cr(u,this.clientVersion));let c=await u.json(),p=c.extensions;p&&this.propagateResponseExtensions(p);let d=c.id,f=c["data-proxy"].endpoint;return{id:d,payload:{endpoint:f}}}else{let a=`${i.payload.endpoint}/${r}`;s(a);let l=await et(a,{method:"POST",headers:this.headerBuilder.build({traceparent:n.traceparent}),clientVersion:this.clientVersion});await this.handleError(await cr(l,this.clientVersion));let c=(await l.json()).extensions;c&&this.propagateResponseExtensions(c);return}}})}extractHostAndApiKey(){let r={clientVersion:this.clientVersion},n=Object.keys(this.inlineDatasources)[0],i=dn({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),o;try{o=new URL(i)}catch{throw new Ye(`Error validating datasource \`${n}\`: the URL must start with the protocol \`prisma://\``,r)}let{protocol:s,host:a,searchParams:l}=o;if(s!=="prisma:")throw new Ye(`Error validating datasource \`${n}\`: the URL must start with the protocol \`prisma://\``,r);let u=l.get("api_key");if(u===null||u.length<1)throw new Ye(`Error validating datasource \`${n}\`: the URL must contain a valid API key`,r);return[a,u]}metrics(){throw new Ze("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(r){for(let n=0;;n++){let i=o=>{this.logEmitter.emit("info",{message:`Calling ${o} (n=${n})`})};try{return await r.callback({logHttpCall:i})}catch(o){if(!(o instanceof ae)||!o.isRetryable)throw o;if(n>=La)throw o instanceof Tt?o.cause:o;this.logEmitter.emit("warn",{message:`Attempt ${n+1}/${La} failed for ${r.actionGerund}: ${o.message??"(unknown)"}`});let s=await Fa(n);this.logEmitter.emit("warn",{message:`Retrying after ${s}ms`})}}}async handleError(r){if(r instanceof Xe)throw await this.uploadSchema(),new Tt({clientVersion:this.clientVersion,cause:r});if(r)throw r}};var Ba=S(require("fs"));function $a(e){if(e?.kind==="itx")return e.options.id}var Bi=S(require("os")),qa=S(require("path"));var ji=Symbol("PrismaLibraryEngineCache");function cd(){let e=globalThis;return e[ji]===void 0&&(e[ji]={}),e[ji]}function pd(e){let t=cd();if(t[e]!==void 0)return t[e];let r=qa.default.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=Bi.default.constants.dlopen.RTLD_LAZY|Bi.default.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,r,i),t[e]=n.exports,n.exports}var fn=class{constructor(t){this.config=t}async loadLibrary(){let t=await Jn(),r=await Ca("library",this.config);try{return this.config.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>pd(r))}catch(n){let i=ri({e:n,platformInfo:t,id:r});throw new F(i,this.config.clientVersion)}}};var dd="P2036",Ce=D("prisma:client:libraryEngine");function md(e){return e.item_type==="query"&&"query"in e}function fd(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var Va=[...Hn,"native"],ja=0,mr=class extends vt{constructor(r,n=new fn(r)){super();try{this.datamodel=Ba.default.readFileSync(r.datamodelPath,"utf-8")}catch(s){throw s.stack.match(/\/\.next|\/next@|\/next\//)?new F(`Your schema.prisma could not be found, and we detected that you are using Next.js. -Find out why and learn how to fix this: https://pris.ly/d/schema-not-found-nextjs`,r.clientVersion):r.isBundled===!0?new F("Prisma Client could not find its `schema.prisma`. This is likely caused by a bundling step, which leads to `schema.prisma` not being copied near the resulting bundle. We would appreciate if you could take the time to share some information with us.\nPlease help us by answering a few questions: https://pris.ly/bundler-investigation-error",r.clientVersion):s}this.config=r,this.libraryStarted=!1,this.logQueries=r.logQueries??!1,this.logLevel=r.logLevel??"error",this.libraryLoader=n,this.logEmitter=r.logEmitter,r.enableDebugLogs&&(this.logLevel="debug");let i=Object.keys(r.overrideDatasources)[0],o=r.overrideDatasources[i]?.url;i!==void 0&&o!==void 0&&(this.datasourceOverrides={[i]:o}),this.libraryInstantiationPromise=this.instantiateLibrary(),this.checkForTooManyEngines()}checkForTooManyEngines(){ja===10&&console.warn(`${he("warn(prisma-client)")} This is the 10th instance of Prisma Client being started. Make sure this is intentional.`)}async transaction(r,n,i){await this.start();let o=JSON.stringify(n),s;if(r==="start"){let l=JSON.stringify({max_wait:i?.maxWait??2e3,timeout:i?.timeout??5e3,isolation_level:i?.isolationLevel});s=await this.engine?.startTransaction(l,o)}else r==="commit"?s=await this.engine?.commitTransaction(i.id,o):r==="rollback"&&(s=await this.engine?.rollbackTransaction(i.id,o));let a=this.parseEngineResponse(s);if(a.error_code)throw new U(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta});return a}async instantiateLibrary(){if(Ce("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;Vn(),this.platform=await this.getPlatform(),await this.loadEngine(),this.version()}async getPlatform(){if(this.platform)return this.platform;let r=await ut();if(!Va.includes(r))throw new F(`Unknown ${me("PRISMA_QUERY_ENGINE_LIBRARY")} ${me(ne(r))}. Possible binaryTargets: ${Ge(Va.join(", "))} or a path to the query engine library. -You may have to run ${Ge("prisma generate")} for your changes to take effect.`,this.config.clientVersion);return r}parseEngineResponse(r){if(!r)throw new K("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(r)}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.QueryEngineConstructor=this.library.QueryEngine);try{let r=new WeakRef(this),{adapter:n}=this.config;n&&Ce("Using driver adapter: %O",n),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"},i=>{r.deref()?.logger(i)},n),ja++}catch(r){let n=r,i=this.parseInitError(n.message);throw typeof i=="string"?n:new F(i.message,this.config.clientVersion,i.error_code)}}}logger(r){let n=this.parseEngineResponse(r);if(n){if("span"in n){this.config.tracingHelper.createEngineSpan(n);return}n.level=n?.level.toLowerCase()??"unknown",md(n)?this.logEmitter.emit("query",{timestamp:new Date,query:n.query,params:n.params,duration:Number(n.duration_ms),target:n.module_path}):fd(n)?this.loggerRustPanic=new ue(this.getErrorMessageWithLink(`${n.message}: ${n.reason} in ${n.file}:${n.line}:${n.column}`),this.config.clientVersion):this.logEmitter.emit(n.level,{timestamp:new Date,message:n.message,target:n.module_path})}}getErrorMessageWithLink(r){return ka({platform:this.platform,title:r,version:this.config.clientVersion,engineVersion:this.versionInfo?.commit,database:this.config.activeProvider,query:this.lastQuery})}parseInitError(r){try{return JSON.parse(r)}catch{}return r}parseRequestError(r){try{return JSON.parse(r)}catch{}return r}on(r,n){if(r==="beforeExit")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.');this.logEmitter.on(r,n)}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Ce(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let r=async()=>{Ce("library starting");try{let n={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(n)),this.libraryStarted=!0,Ce("library started")}catch(n){let i=this.parseInitError(n.message);throw typeof i=="string"?n:new F(i.message,this.config.clientVersion,i.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.config.tracingHelper.runInChildSpan("connect",r),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Ce("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let r=async()=>{await new Promise(i=>setTimeout(i,5)),Ce("library stopping");let n={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(n)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Ce("library stopped")};return this.libraryStoppingPromise=this.config.tracingHelper.runInChildSpan("disconnect",r),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(r){return this.library?.debugPanic(r)}async request(r,{traceparent:n,interactiveTransaction:i}){Ce(`sending request, this.libraryStarted: ${this.libraryStarted}`);let o=JSON.stringify({traceparent:n}),s=JSON.stringify(r);try{await this.start(),this.executingQueryPromise=this.engine?.query(s,o,i?.id),this.lastQuery=s;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0]):new K(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a,elapsed:0}}catch(a){if(a instanceof F)throw a;if(a.code==="GenericFailure"&&a.message?.startsWith("PANIC:"))throw new ue(this.getErrorMessageWithLink(a.message),this.config.clientVersion);let l=this.parseRequestError(a.message);throw typeof l=="string"?a:new K(`${l.message} -${l.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(r,{transaction:n,traceparent:i}){Ce("requestBatch");let o=pn(r,n);await this.start(),this.lastQuery=JSON.stringify(o),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:i}),$a(n));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0]):new K(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:l,errors:u}=a;if(Array.isArray(l))return l.map(c=>c.errors&&c.errors.length>0?this.loggerRustPanic??this.buildQueryError(c.errors[0]):{data:c,elapsed:0});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(a))}buildQueryError(r){if(r.user_facing_error.is_panic)return new ue(this.getErrorMessageWithLink(r.user_facing_error.message),this.config.clientVersion);if(r.user_facing_error.error_code===dd&&this.config.adapter){let n=r.user_facing_error.meta?.id;_r(typeof n=="number","Malformed external JS error received from the engine");let i=this.config.adapter.errorRegistry.consumeError(n);return _r(i,"External error with reported id was not registered"),i.error}return Zt(r,this.config.clientVersion)}async metrics(r){await this.start();let n=await this.engine.metrics(JSON.stringify(r));return r.format==="prometheus"?n:this.parseEngineResponse(n)}};function Ua(e,t){let r;try{r=dn({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...process.env},clientVersion:t.clientVersion})}catch{}e.noEngine!==!0&&r?.startsWith("prisma://")&&qt("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=Zn(t.generator);if(r?.startsWith("prisma://")||e.noEngine)return new dr(t);if(n==="library")return new mr(t);throw"binary",new X("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}function gn({generator:e}){return e?.previewFeatures??[]}var Wa=S(Ui());function Ja(e,t){let r=Ha(e),n=gd(r),i=hd(n);i?yn(i,t):t.addErrorMessage(()=>"Unknown error")}function Ha(e){return e.errors.flatMap(t=>t.kind==="Union"?Ha(t):[t])}function gd(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:yd(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function yd(e,t){return[...new Set(e.concat(t))]}function hd(e){return pi(e,(t,r)=>{let n=Qa(t),i=Qa(r);return n!==i?n-i:Ga(t)-Ga(r)})}function Qa(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Ga(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}var Se=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 hn=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(bt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function yn(e,t){switch(e.kind){case"IncludeAndSelect":xd(e,t);break;case"IncludeOnScalar":bd(e,t);break;case"EmptySelection":Ed(e,t);break;case"UnknownSelectionField":wd(e,t);break;case"UnknownArgument":Pd(e,t);break;case"UnknownInputField":vd(e,t);break;case"RequiredArgumentMissing":Td(e,t);break;case"InvalidArgumentType":Cd(e,t);break;case"InvalidArgumentValue":Ad(e,t);break;case"ValueTooLarge":Rd(e,t);break;case"SomeFieldsMissing":Md(e,t);break;case"TooManyFieldsGiven":Sd(e,t);break;case"Union":Ja(e,t);break;default:throw new Error("not implemented: "+e.kind)}}function xd(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath);r&&r instanceof Q&&(r.getField("include")?.markAsError(),r.getField("select")?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green("`include`")} or ${n.green("`select`")}, but ${n.red("not both")} at the same time.`)}function bd(e,t){let[r,n]=xn(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 Se(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)}. ${fr(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Ed(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Za(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${fr(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function wd(e,t){let[r,n]=xn(e.selectionPath),i=t.arguments.getDeepSelectionParent(r);i&&(i.value.getField(n)?.markAsError(),Za(i.value,e.outputType)),t.addErrorMessage(o=>{let s=[`Unknown field ${o.red(`\`${n}\``)}`];return i&&s.push(`for ${o.bold(i.kind)} statement`),s.push(`on model ${o.bold(`\`${e.outputType.name}\``)}.`),s.push(fr(o)),s.join(" ")})}function Pd(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof Q&&(n.getField(r)?.markAsError(),Id(n,e.arguments)),t.addErrorMessage(i=>za(i,r,e.arguments.map(o=>o.name)))}function vd(e,t){let[r,n]=xn(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(i instanceof Q){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r);o instanceof Q&&Xa(o,e.inputType)}t.addErrorMessage(o=>za(o,n,e.inputType.fields.map(s=>s.name)))}function za(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Fd(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(fr(e)),n.join(" ")}function Td(e,t){let r;t.addErrorMessage(l=>r?.value instanceof G&&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);if(!(n instanceof Q))return;let[i,o]=xn(e.argumentPath),s=new hn,a=n.getDeepFieldValue(i);if(a instanceof Q)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 Se(o,s).makeRequired())}else{let l=e.inputTypes.map(Ya).join(" | ");a.addSuggestion(new Se(o,l).makeRequired())}}function Ya(e){return e.kind==="list"?`${Ya(e.elementType)}[]`:e.name}function Cd(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof Q&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=bn("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 Ad(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof Q&&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=bn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Rd(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath),i;if(n instanceof Q){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof G&&(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 Md(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(n instanceof Q){let i=n.getDeepFieldValue(e.argumentPath);i instanceof Q&&Xa(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")} ${bn("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(fr(i)),o.join(" ")})}function Sd(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath),i=[];if(n instanceof Q){let o=n.getDeepFieldValue(e.argumentPath);o instanceof Q&&(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 ${bn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Za(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new Se(r.name,"true"))}function Id(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new Se(r.name,r.typeNames.join(" | ")))}function Xa(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new Se(r.name,r.typeNames.join(" | ")))}function xn(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function fr({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function bn(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var kd=3;function Fd(e,t){let r=1/0,n;for(let i of t){let o=(0,Wa.default)(e,i);o>kd||o({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.model?.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)})}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};var nl=e=>({command:e});var il=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);function gr(e){try{return ol(e,"fast")}catch{return ol(e,"slow")}}function ol(e,t){return JSON.stringify(e.map(r=>jd(r,t)))}function jd(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:ft(e)?{prisma__type:"date",prisma__value:e.toJSON()}:Pe.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Bd(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?al(e):e}function Bd(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function al(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(sl);let t={};for(let r of Object.keys(e))t[r]=sl(e[r]);return t}function sl(e){return typeof e=="bigint"?e.toString():al(e)}var Ud=/^(\s*alter\s)/i,ll=D("prisma:client");function Gi(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Ud.exec(t))throw new Error(`Running ALTER using ${n} is not supported +`}function Dt({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 Tn=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 Tn{constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};function A(e,t){return{...e,isRetryable:t}}var _t=class extends se{constructor(r){super("This request must be retried",A(r,!0));this.name="ForcedRetryError";this.code="P5001"}};w(_t,"ForcedRetryError");var st=class extends se{constructor(r,n){super(r,A(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};w(st,"InvalidDatasourceError");var at=class extends se{constructor(r,n){super(r,A(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};w(at,"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 lt=class extends q{constructor(r){super("Schema needs to be uploaded",A(r,!0));this.name="SchemaMissingError";this.code="P5005"}};w(lt,"SchemaMissingError");var $i="This request could not be understood by the server",pr=class extends q{constructor(r,n,i){super(n||$i,A(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};w(pr,"BadRequestError");var dr=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(dr,"HealthcheckTimeoutError");var mr=class extends q{constructor(r,n,i){super(n,A(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};w(mr,"EngineStartupError");var fr=class extends q{constructor(r){super("Engine version is not supported",A(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};w(fr,"EngineVersionNotSupportedError");var qi="Request timed out",gr=class extends q{constructor(r,n=qi){super(n,A(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};w(gr,"GatewayTimeoutError");var rd="Interactive transaction error",hr=class extends q{constructor(r,n=rd){super(n,A(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};w(hr,"InteractiveTransactionError");var nd="Request parameters are invalid",yr=class extends q{constructor(r,n=nd){super(n,A(r,!1));this.name="InvalidRequestError";this.code="P5011"}};w(yr,"InvalidRequestError");var ji="Requested resource does not exist",br=class extends q{constructor(r,n=ji){super(n,A(r,!1));this.name="NotFoundError";this.code="P5003"}};w(br,"NotFoundError");var Vi="Unknown server error",Lt=class extends q{constructor(r,n,i){super(n||Vi,A(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};w(Lt,"ServerError");var Bi="Unauthorized, check your connection string",Er=class extends q{constructor(r,n=Bi){super(n,A(r,!1));this.name="UnauthorizedError";this.code="P5007"}};w(Er,"UnauthorizedError");var Ui="Usage exceeded, retry again later",wr=class extends q{constructor(r,n=Ui){super(n,A(r,!0));this.name="UsageExceededError";this.code="P5008"}};w(wr,"UsageExceededError");async function id(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 xr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await id(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 Lt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new lt(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new fr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new mr(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 dr(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 hr(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new yr(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Er(r,Ft(Bi,n));if(e.status===404)return new br(r,Ft(ji,n));if(e.status===429)throw new wr(r,Ft(Ui,n));if(e.status===504)throw new gr(r,Ft(qi,n));if(e.status>=500)throw new Lt(r,Ft(Vi,n));if(e.status>=400)throw new pr(r,Ft($i,n))}function Ft(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}function Oa(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 Ne="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function ka(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+=Ne[s]+Ne[a]+Ne[l]+Ne[u];return i==1?(c=t[o],s=(c&252)>>2,a=(c&3)<<4,r+=Ne[s]+Ne[a]+"=="):i==2&&(c=t[o]<<8|t[o+1],s=(c&64512)>>10,a=(c&1008)>>4,l=(c&15)<<2,r+=Ne[s]+Ne[a]+Ne[l]+"="),r}function Da(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 od(e){return e[0]*1e3+e[1]/1e6}function _a(e){return new Date(od(e))}var La={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var Pr=class extends se{constructor(r,n){super(`Cannot fetch data from service: +${r}`,A(n,!0));this.name="RequestError";this.code="P5010"}};w(Pr,"RequestError");async function ut(e,t,r=n=>n){let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(Gi)(e,t)}catch(i){let o=i.message??"Unknown error";throw new Pr(o,{clientVersion:n})}}function ad(e){return{...e.headers,"Content-Type":"application/json"}}function ld(e){return{method:e.method,headers:ad(e)}}function ud(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 Qi(t.headers)}}async function Gi(e,t={}){let r=cd("https"),n=ld(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(Gi(`${o}${p}`,t)):s(Gi(p,t))),u.on("data",d=>i.push(d)),u.on("end",()=>s(ud(i,u))),u.on("error",a)});l.on("error",a),l.end(t.body??"")})}var cd=typeof require<"u"?require:()=>{},Qi=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 pd=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Fa=F("prisma:client:dataproxyEngine");async function dd(e,t){let r=La["@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&&pd.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=md(`<=${a}.${l}.${u}`),p=await ut(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();Fa("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 at("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Na(e,t){let r=await dd(e,t);return Fa("version",r),r}function md(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Ma=3,Ji=F("prisma:client:dataproxyEngine"),Wi=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}},vr=class{constructor(t){this.name="DataProxyEngine";Da(t),this.config=t,this.env={...t.env,...typeof process<"u"?process.env:{}},this.inlineSchema=ka(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 Wi({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Na(t,this.config),Ji("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:_a(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 ut(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Ji("schema response status",r.status);let n=await xr(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=Et(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?ot(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 ut(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Ji("graphql response status",a.status),await this.handleError(await xr(a,this.clientVersion));let l=await a.json(),u=l.extensions;if(u&&this.propagateResponseExtensions(u),l.errors)throw l.errors.length===1?ot(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 ut(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await xr(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 ut(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await xr(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=Dt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new st(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:")throw new st(`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 st(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,l]}metrics(){throw new at("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>=Ma)throw i instanceof _t?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Ma} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Oa(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof lt)throw await this.uploadSchema(),new _t({clientVersion:this.clientVersion,cause:t});if(t)throw t}applyPendingMigrations(){throw new Error("Method not implemented.")}};function $a(e){if(e?.kind==="itx")return e.options.id}var Ki=k(require("os")),qa=k(require("path"));var Hi=Symbol("PrismaLibraryEngineCache");function fd(){let e=globalThis;return e[Hi]===void 0&&(e[Hi]={}),e[Hi]}function gd(e){let t=fd();if(t[e]!==void 0)return t[e];let r=qa.default.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=Ki.default.constants.dlopen.RTLD_LAZY|Ki.default.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,r,i),t[e]=n.exports,n.exports}var ja={async loadLibrary(e){let t=await Jn(),r=await va("library",e);try{return e.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>gd(r))}catch(n){let i=ii({e:n,platformInfo:t,id:r});throw new R(i,e.clientVersion)}}};var zi,Va={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 (${wn().prettyName})`,t);if(n===void 0)throw new R("WASM engine was unexpectedly `undefined`",t);zi===void 0&&(zi=(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 zi;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var hd="P2036",Ce=F("prisma:client:libraryEngine");function yd(e){return e.item_type==="query"&&"query"in e}function bd(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var Ba=[...Vn,"native"],Tr=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=r??ja,t.engineWasm!==void 0&&(this.libraryLoader=r??Va),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(Ed(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(Ce("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;jn(),this.binaryTarget=await this.getCurrentBinaryTarget(),await this.loadEngine(),this.version()}async getCurrentBinaryTarget(){{if(this.binaryTarget)return this.binaryTarget;let t=await tt();if(!Ba.includes(t))throw new R(`Unknown ${ce("PRISMA_QUERY_ENGINE_LIBRARY")} ${ce(W(t))}. Possible binaryTargets: ${Me(Ba.join(", "))} or a path to the query engine library. +You may have to run ${Me("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&&Ce("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",yd(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):bd(r)?this.loggerRustPanic=new le(Yi(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 Ce(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Ce("library starting");try{let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,Ce("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 Ce("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),Ce("library stopping");let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Ce("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}){Ce(`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(Yi(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}){Ce("requestBatch");let i=Et(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),$a(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(Yi(this,t.user_facing_error.message),this.config.clientVersion);let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:ot(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===hd&&this.config.adapter){let r=t.meta?.id;Wr(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return Wr(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 Ed(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function Yi(e,t){return Ia({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function Ua({copyEngine:e=!0},t){let r;try{r=Dt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...process.env},clientVersion:t.clientVersion})}catch{}e&&r?.startsWith("prisma://")&&Yt("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=Wt(t.generator),i=!!(r?.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o&&!1){let l;throw e?r?.startsWith("prisma://")?l=["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."]:l=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:l=["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(l.join(` +`),{clientVersion:t.clientVersion})}if(i)return new vr(t);if(s)return new Tr(t);throw new H("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}function Rn({generator:e}){return e?.previewFeatures??[]}function Nt(e){return e.substring(0,1).toLowerCase()+e.substring(1)}var Ka=k(Zi());function Wa(e,t,r){let n=Ha(e),i=wd(n),o=Pd(i);o?Cn(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Ha(e){return e.errors.flatMap(t=>t.kind==="Union"?Ha(t):[t])}function wd(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:xd(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function xd(e,t){return[...new Set(e.concat(t))]}function Pd(e){return hi(e,(t,r)=>{let n=Qa(t),i=Qa(r);return n!==i?n-i:Ja(t)-Ja(r)})}function Qa(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Ja(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 Rr=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 Cn(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":vd(e,t);break;case"IncludeOnScalar":Td(e,t);break;case"EmptySelection":Rd(e,t,r);break;case"UnknownSelectionField":Id(e,t);break;case"UnknownArgument":Od(e,t);break;case"UnknownInputField":kd(e,t);break;case"RequiredArgumentMissing":Dd(e,t);break;case"InvalidArgumentType":_d(e,t);break;case"InvalidArgumentValue":Ld(e,t);break;case"ValueTooLarge":Fd(e,t);break;case"SomeFieldsMissing":Nd(e,t);break;case"TooManyFieldsGiven":Md(e,t);break;case"Union":Wa(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function vd(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 Td(e,t){let[r,n]=Cr(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)}. ${Sr(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Rd(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Cd(e,t,i);return}if(n.hasField("select")){Sd(e,t);return}}if(r?.[Nt(e.outputType.name)]){Ad(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Cd(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 Sd(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Za(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Sr(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Ad(e,t){let r=new Rr;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]=Cr(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 Id(e,t){let[r,n]=Cr(e.selectionPath),i=t.arguments.getDeepSubSelectionValue(r)?.asObject(),o;if(i){let s=i.getFieldValue("select")?.asObject(),a=i.getFieldValue("include")?.asObject(),l=i.getFieldValue("omit")?.asObject();s?.hasField(n)?(o="select",s.getField(n)?.markAsError(),Za(s,e.outputType)):a?.hasField(n)?(o="include",a.getField(n)?.markAsError(),$d(a,e.outputType)):l?.hasField(n)&&(o="omit",l.getField(n)?.markAsError(),qd(l,e.outputType))}t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(Sr(s)),a.join(" ")})}function Od(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),jd(n,e.arguments)),t.addErrorMessage(i=>za(i,r,e.arguments.map(o=>o.name)))}function kd(e,t){let[r,n]=Cr(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Xa(o,e.inputType)}t.addErrorMessage(o=>za(o,n,e.inputType.fields.map(s=>s.name)))}function za(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Bd(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Sr(e)),n.join(" ")}function Dd(e,t){let r;t.addErrorMessage(l=>r?.value instanceof J&&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]=Cr(e.argumentPath),s=new Rr,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(Ya).join(" | ");a.addSuggestion(new ue(o,l).makeRequired())}}function Ya(e){return e.kind==="list"?`${Ya(e.elementType)}[]`:e.name}function _d(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=Sn("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 Ld(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=Sn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Fd(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 J&&(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 Nd(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&&Xa(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")} ${Sn("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(Sr(i)),o.join(" ")})}function Md(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 ${Sn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Za(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ue(r.name,"true"))}function $d(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ue(r.name,"true"))}function qd(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ue(r.name,"true"))}function jd(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ue(r.name,r.typeNames.join(" | ")))}function Xa(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 Cr(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Sr({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Sn(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Vd=3;function Bd(e,t){let r=1/0,n;for(let i of t){let o=(0,Ka.default)(e,i);o>Vd||o({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:De(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};var nl=e=>({command:e});var il=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);function Ir(e){try{return ol(e,"fast")}catch{return ol(e,"slow")}}function ol(e,t){return JSON.stringify(e.map(r=>Zd(r,t)))}function Zd(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:xt(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ve.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Xd(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?al(e):e}function Xd(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function al(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(sl);let t={};for(let r of Object.keys(e))t[r]=sl(e[r]);return t}function sl(e){return typeof e=="bigint"?e.toString():al(e)}var em=/^(\s*alter\s)/i,ll=F("prisma:client");function eo(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 Ji=({clientMethod:e,activeProvider:t,activeProviderFlavour:r})=>n=>{r!==void 0&&(t=r);let i="",o;if(Array.isArray(n)){let[s,...a]=n;i=s,o={values:gr(a||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{i=n.sql,o={values:gr(n.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{i=n.text,o={values:gr(n.values),__prismaRawParameters__:!0};break}case"sqlserver":{i=il(n),o={values:gr(n.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return o?.values?ll(`prisma.${e}(${i}, ${o.values})`):ll(`prisma.${e}(${i})`),{query:i,parameters:o}},ul={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 Hi(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??(n=pl(r(o))):pl(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 pl(e){return typeof e.then=="function"?e:Promise.resolve(e)}var dl={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Wi=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??dl}};function ml(e){return e.includes("tracing")?new Wi:dl}function fl(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}var Kd=["$connect","$disconnect","$on","$transaction","$use","$extends"],zi=Kd;function gl(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 wn=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 hl=S(li());function Pn(e){return typeof e.batchRequestIdx=="number"}function vn(e){return e===null?e:Array.isArray(e)?e.map(vn):typeof e=="object"?Qd(e)?Gd(e):pt(e,vn):e}function Qd(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Gd({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new Pe(t);case"Json":return JSON.parse(t);default:He(t,"Unknown tagged value")}}function yl(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Yi(e.query.arguments)),t.push(Yi(e.query.selection)),t.join("")}function Yi(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Yi(n)})`:r}).join(" ")})`}var Jd={aggregate:!1,aggregateRaw:!1,createMany:!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 Zi(e){return Jd[e]}var Tn=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;i{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(p=>p.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(p=>Zi(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Wd(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"?xl(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Zi(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:yl(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}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s})}}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}){if(Hd(t),zd(t,i)||t instanceof Re)throw t;if(t instanceof U&&Yd(t)){let a=bl(t.meta);En({args:o,errors:[a],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion})}let s=t.message;throw n&&(s=Pt({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:s})),s=this.sanitizeMessage(s),t.code?new U(s,{code:t.code,clientVersion:this.client._clientVersion,meta:t.meta,batchRequestIdx:t.batchRequestIdx}):t.isPanic?new ue(s,this.client._clientVersion):t instanceof K?new K(s,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx}):t instanceof F?new F(s,this.client._clientVersion):t instanceof ue?new ue(s,this.client._clientVersion):(t.clientVersion=this.client._clientVersion,t)}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,hl.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.values(t)[0],o=r.filter(a=>a!=="select"&&a!=="include"),s=vn(Ai(i,o));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function Wd(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:xl(e)};He(e,"Unknown transaction kind")}}function xl(e){return{id:e.id,payload:e.payload}}function zd(e,t){return Pn(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Yd(e){return e.code==="P2009"||e.code==="P2012"}function bl(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(bl)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}var El="5.4.2";var wl=El;function Pl(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=vl(t[n]);return r})}function vl({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return Buffer.from(t,"base64");case"decimal":return new Pe(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map(vl);default:return t}}var Rl=S(Ui());var q=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};E(q,"PrismaClientConstructorValidationError");var Tl=["datasources","datasourceUrl","errorFormat","adapter","log","__internal"],Cl=["pretty","colorless","minimal"],Al=["info","query","warn","error"],Xd={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new q(`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=Rt(r,t)||` Available datasources: ${t.join(", ")}`;throw new q(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new q(`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 q(`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 q(`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 q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!gn(t).includes("driverAdapters"))throw new q('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new q(`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 q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Cl.includes(e)){let t=Rt(e,Cl);throw new q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Al.includes(r)){let n=Rt(r,Al);throw new q(`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=Rt(i,o);throw new q(`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 q(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},__internal:e=>{if(!e)return;let t=["debug","hooks","engine","measurePerformance"];if(typeof e!="object")throw new q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Rt(r,t);throw new q(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Ml(e,t){for(let[r,n]of Object.entries(e)){if(!Tl.includes(r)){let i=Rt(r,Tl);throw new q(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Xd[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Rt(e,t){if(t.length===0||typeof e!="string")return"";let r=em(e,t);return r?` Did you mean "${r}"?`:""}function em(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Rl.default)(e,i)}));r.sort((i,o)=>i.distance{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(!Pn(c)){l(c);return}c.batchRequestIdx===u?l(c):(i||(i=c),a())})})}var Ue=D("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var tm={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},rm=Symbol.for("prisma.client.transaction.id"),nm={id:0,nextId(){return++this.id}};function Dl(e){class t{constructor(n){this._middlewares=new wn;this._createPrismaPromise=Hi();this.$extends=ra;xa(e),n&&Ml(n,e);let i=n?.adapter?fs(n.adapter):void 0,o=new Fl.EventEmitter().on("error",()=>{});this._extensions=ln.empty(),this._previewFeatures=gn(e),this._clientVersion=e.clientVersion??wl,this._activeProvider=e.activeProvider,this._tracingHelper=ml(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&yr.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&yr.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=!i&&_t(s,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},c=u.debug===!0;c&&D.enable("prisma:client");let p=yr.default.resolve(e.dirname,e.relativePath);Ol.default.existsSync(p)||(p=e.dirname),Ue("dirname",e.dirname),Ue("relativePath",e.relativePath),Ue("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:yr.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&&gl(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:[],clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:ba(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,logEmitter:o,isBundled:e.isBundled,adapter:i},Ue("clientVersion",e.clientVersion),this._engine=Ua(e,this._engineConfig),this._requestHandler=new Cn(this,o),l.log)for(let f of l.log){let y=typeof f=="string"?f:f.emit==="stdout"?f.level:null;y&&this.$on(y,g=>{$t.log(`${$t.tags[y]??""}`,g.message||g.query)})}this._metrics=new dt(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=zt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.on("beforeExit",i):this._engine.on(n,o=>{let s=o.fields;return i(n==="query"?{timestamp:o.timestamp,query:s?.query??o.query,params:s?.params??o.params,duration:s?.duration_ms??o.duration,target:o.target}:{timestamp:o.timestamp,message:s?.message??o.message,target:o.target})})}$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{Eo()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider,l=this._engineConfig.adapter?.flavour;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Ji({clientMethod:i,activeProvider:a,activeProviderFlavour:l}),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]=Il(n,i);return Gi(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new X("`$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=>(Gi(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new X(`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:nl,callsite:Ve(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider,l=this._engineConfig.adapter?.flavour;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Ji({clientMethod:i,activeProvider:a,activeProviderFlavour:l}),callsite:Ve(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(Pl)}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Il(n,i));throw new X("`$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})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=nm.nextId(),s=fl(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,p={kind:"batch",id:o,index:u,isolationLevel:c,lock:s};return l.requestTransaction?.(p)??l});return Sl(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s=await this._engine.transaction("start",o,i),a;try{let l={kind:"itx",...s};a=await n(this._createItxClient(l)),await this._engine.transaction("commit",o,s)}catch(l){throw await this._engine.transaction("rollback",o,s).catch(()=>{}),l}return a}_createItxClient(n){return zt(Ee(on(this),[re("_appliedParent",()=>this._appliedParent._createItxClient(n)),re("_createPrismaPromise",()=>Hi(n)),re(rm,()=>n.id),Gt(zi)]))}$transaction(n,i){let o;typeof n=="function"?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??tm,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,P=>c(u,T=>(P?.end(),l(T))));let{runInTransaction:p,args:d,...f}=u,y={...n,...f};d&&(y.args=i.middlewareArgsToRequestArgs(d)),n.transaction!==void 0&&p===!1&&delete y.transaction;let g=await ua(this,y);return y.model?oa({result:g,modelName:y.model,args:y.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):g};return this._tracingHelper.runInChildSpan(s.operation,()=>new kl.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 y={name:"serialize"},g=this._tracingHelper.runInChildSpan(y,()=>el({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion}));return D.enabled("prisma:client")&&(Ue("Prisma Client call:"),Ue(`prisma.${i}(${$s(n)})`),Ue("Generated request:"),Ue(JSON.stringify(g,null,2)+` -`)),c?.kind==="batch"&&await c.lock,this._requestHandler.request({protocolQuery:g,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(),customDataProxyFetch:f})}catch(y){throw y.clientVersion=this._clientVersion,y}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new X("`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)}}return t}function Il(e,t){return im(e)?[new oe(e,t),ul]:[e,cl]}function im(e){return Array.isArray(e)&&Array.isArray(e.raw)}var om=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function _l(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!om.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}function Nl(e){_t(e,{conflictCheck:"warn"})}0&&(module.exports={DMMF,DMMFClass,Debug,Decimal,Extensions,MetricsClient,NotFoundError,ObjectEnumValue,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,Types,defineDmmfProperty,empty,getPrismaClient,itxClientDenyList,join,makeStrictEnum,objectEnumNames,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); +`)}var to=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Ir(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Ir(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Ir(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=il(r),i={values:Ir(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?ll(`prisma.${e}(${n}, ${i.values})`):ll(`prisma.${e}(${n})`),{query:n,parameters:i}},ul={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ie(t,r)}},cl={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function ro(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=pl(r(o)):pl(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 pl(e){return typeof e.then=="function"?e:Promise.resolve(e)}var dl={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},no=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??dl}};function ml(e){return e.includes("tracing")?new no:dl}function fl(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}var tm=["$connect","$disconnect","$on","$transaction","$use","$extends"],gl=tm;function hl(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 In=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 El=k(mi());function On(e){return typeof e.batchRequestIdx=="number"}function kn(e){return e===null?e:Array.isArray(e)?e.map(kn):typeof e=="object"?rm(e)?nm(e):ht(e,kn):e}function rm(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function nm({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new ve(t);case"Json":return JSON.parse(t);default:De(t,"Unknown tagged value")}}function yl(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(io(e.query.arguments)),t.push(io(e.query.selection)),t.join("")}function io(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${io(n)})`:r}).join(" ")})`}var im={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 oo(e){return im[e]}var Dn=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;ict("bigint",r));case"bytes-array":return t.map(r=>ct("bytes",r));case"decimal-array":return t.map(r=>ct("decimal",r));case"datetime-array":return t.map(r=>ct("datetime",r));case"date-array":return t.map(r=>ct("date",r));case"time-array":return t.map(r=>ct("time",r));default:return t}}function bl(e){let t=[],r=om(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=>oo(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:am(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"?wl(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:oo(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:yl(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(sm(t),lm(t,i)||t instanceof _e)throw t;if(t instanceof V&&um(t)){let u=xl(t.meta);An({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=kt({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,El.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=_i(o,s),l=i==="queryRaw"?bl(a):kn(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function am(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:wl(e)};De(e,"Unknown transaction kind")}}function wl(e){return{id:e.id,payload:e.payload}}function lm(e,t){return On(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function um(e){return e.code==="P2009"||e.code==="P2012"}function xl(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(xl)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}var Pl="5.18.0";var vl=Pl;var Al=k(Zi());var L=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(L,"PrismaClientConstructorValidationError");var Tl=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Rl=["pretty","colorless","minimal"],Cl=["info","query","warn","error"],pm={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new L(`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=Mt(r,t)||` Available datasources: ${t.join(", ")}`;throw new L(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new L(`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 L(`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 L(`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 L('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Rn(t).includes("driverAdapters"))throw new L('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Wt()==="binary")throw new L('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 L(`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 L(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Rl.includes(e)){let t=Mt(e,Rl);throw new L(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new L(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Cl.includes(r)){let n=Mt(r,Cl);throw new L(`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=Mt(i,o);throw new L(`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 L(`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 L(`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 L(`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 L('"omit" option is expected to be an object.');if(e===null)throw new L('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=mm(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 L(fm(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new L(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Mt(r,t);throw new L(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Il(e,t){for(let[r,n]of Object.entries(e)){if(!Tl.includes(r)){let i=Mt(r,Tl);throw new L(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}pm[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new L('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Mt(e,t){if(t.length===0||typeof e!="string")return"";let r=dm(e,t);return r?` Did you mean "${r}"?`:""}function dm(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Al.default)(e,i)}));r.sort((i,o)=>i.distanceNt(n)===t);if(r)return e[r]}function fm(e,t){let r=It(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}=mn(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}function Ol(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(!On(c)){l(c);return}c.batchRequestIdx===u?l(c):(i||(i=c),a())})})}var Xe=F("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var gm={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},hm=Symbol.for("prisma.client.transaction.id"),ym={id:0,nextId(){return++this.id}};function Nl(e){class t{constructor(n){this._originalClient=this;this._middlewares=new In;this._createPrismaPromise=ro();this.$extends=Zs;e=n?.__internal?.configOverride?.(e)??e,ga(e),n&&Il(n,e);let i=new Ll.EventEmitter().on("error",()=>{});this._extensions=En.empty(),this._previewFeatures=Rn(e),this._clientVersion=e.clientVersion??vl,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=ml(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Or.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Or.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=xi(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&&Jt(o,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},c=u.debug===!0;c&&F.enable("prisma:client");let p=Or.default.resolve(e.dirname,e.relativePath);Fl.default.existsSync(p)||(p=e.dirname),Xe("dirname",e.dirname),Xe("relativePath",e.relativePath),Xe("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:Or.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&&hl(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:ha(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:Dt,getBatchRequestPayload:Et,prismaGraphQLToJSError:ot,PrismaClientUnknownRequestError:B,PrismaClientInitializationError:R,PrismaClientKnownRequestError:V,debug:F("prisma:client:accelerateEngine"),engineVersion:Dl.version,clientVersion:e.clientVersion}},Xe("clientVersion",e.clientVersion),this._engine=Ua(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=>{zt.log(`${zt.tags[g]??""}`,h.message||h.query)})}this._metrics=new yt(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=lr(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{Eo()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:to({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]=kl(n,i);return eo(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=>(eo(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:nl,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:to({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",...kl(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})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=ym.nextId(),s=fl(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 Ol(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 lr(xe(Ys(this),[re("_appliedParent",()=>this._appliedParent._createItxClient(n)),re("_createPrismaPromise",()=>ro(n)),re(hm,()=>n.id),bt(gl)]))}$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??gm,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 oa(this,g);return g.model?ta({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 _l.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,()=>el({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 F.enabled("prisma:client")&&(Xe("Prisma Client call:"),Xe(`prisma.${i}(${_s(n)})`),Xe("Generated request:"),Xe(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 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 kl(e,t){return bm(e)?[new ie(e,t),ul]:[e,cl]}function bm(e){return Array.isArray(e)&&Array.isArray(e.raw)}var Em=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Ml(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Em.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}function $l(e){Jt(e,{conflictCheck:"warn"})}0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); /*! Bundled license information: decimal.js/decimal.mjs: diff --git a/experiments/mongodb/prisma/generated/client/runtime/react-native.js b/experiments/mongodb/prisma/generated/client/runtime/react-native.js new file mode 100644 index 000000000..f9ef70c3f --- /dev/null +++ b/experiments/mongodb/prisma/generated/client/runtime/react-native.js @@ -0,0 +1,80 @@ +"use strict";var Gs=Object.create;var Yt=Object.defineProperty;var Ws=Object.getOwnPropertyDescriptor;var Ks=Object.getOwnPropertyNames;var Hs=Object.getPrototypeOf,zs=Object.prototype.hasOwnProperty;var _e=(e,t)=>()=>(e&&(t=e(e=0)),t);var ge=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),bt=(e,t)=>{for(var r in t)Yt(e,r,{get:t[r],enumerable:!0})},jn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ks(t))!zs.call(e,i)&&i!==r&&Yt(e,i,{get:()=>t[i],enumerable:!(n=Ws(t,i))||n.enumerable});return e};var he=(e,t,r)=>(r=e!=null?Gs(Hs(e)):{},jn(t||!e||!e.__esModule?Yt(r,"default",{value:e,enumerable:!0}):r,e)),Ys=e=>jn(Yt({},"__esModule",{value:!0}),e);var y,c=_e(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var v,p=_e(()=>{"use strict";v=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=_e(()=>{"use strict";E=()=>{};E.prototype=E});var b,f=_e(()=>{"use strict";b=class{constructor(t){this.value=t}deref(){return this.value}}});var oi=ge(et=>{"use strict";m();c();p();d();f();var Jn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Zs=Jn(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 L=F===A?0:4-F%4;return[F,L]}function l(C){var A=a(C),F=A[0],L=A[1];return(F+L)*3/4-L}function u(C,A,F){return(A+F)*3/4-F}function g(C){var A,F=a(C),L=F[0],N=F[1],M=new n(u(C,L,N)),O=0,z=N>0?L-4:L,U;for(U=0;U>16&255,M[O++]=A>>8&255,M[O++]=A&255;return N===2&&(A=r[C.charCodeAt(U)]<<2|r[C.charCodeAt(U+1)]>>4,M[O++]=A&255),N===1&&(A=r[C.charCodeAt(U)]<<10|r[C.charCodeAt(U+1)]<<4|r[C.charCodeAt(U+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 x(C,A,F){for(var L,N=[],M=A;Mz?z:O+M));return L===1?(A=C[F-1],N.push(t[A>>2]+t[A<<4&63]+"==")):L===2&&(A=(C[F-2]<<8)+C[F-1],N.push(t[A>>10]+t[A>>4&63]+t[A<<2&63]+"=")),N.join("")}}),Xs=Jn(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,u=(1<>1,h=-7,x=n?o-1:0,S=n?-1:1,C=t[r+x];for(x+=S,s=C&(1<<-h)-1,C>>=-h,h+=l;h>0;s=s*256+t[r+x],x+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+x],x+=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+x>=1?r+=S/u:r+=S*Math.pow(2,1-x),r*u>=2&&(a++,u/=2),a+x>=h?(l=0,a=h):a+x>=1?(l=(r*u-1)*Math.pow(2,o),a=a+x):(l=r*Math.pow(2,x-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}}),Ur=Zs(),Ze=Xs(),Un=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;et.Buffer=T;et.SlowBuffer=oa;et.INSPECT_MAX_BYTES=50;var Zt=2147483647;et.kMaxLength=Zt;T.TYPED_ARRAY_SUPPORT=ea();!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 ea(){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 Re(e){if(e>Zt)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 Qr(e)}return Gn(e,t,r)}T.poolSize=8192;function Gn(e,t,r){if(typeof e=="string")return ra(e,t);if(ArrayBuffer.isView(e))return na(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 Kn(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=ia(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 Gn(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function Wn(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 ta(e,t,r){return Wn(e),e<=0?Re(e):t!==void 0?typeof r=="string"?Re(e).fill(t,r):Re(e).fill(t):Re(e)}T.alloc=function(e,t,r){return ta(e,t,r)};function Qr(e){return Wn(e),Re(e<0?0:Jr(e)|0)}T.allocUnsafe=function(e){return Qr(e)};T.allocUnsafeSlow=function(e){return Qr(e)};function ra(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=Hn(e,t)|0,n=Re(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function qr(e){let t=e.length<0?0:Jr(e.length)|0,r=Re(t);for(let n=0;n=Zt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Zt.toString(16)+" bytes");return e|0}function oa(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 Hn(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 Vr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return ii(e).length;default:if(i)return n?-1:Vr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=Hn;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 ha(this,t,r);case"utf8":case"utf-8":return Yn(this,t,r);case"ascii":return ma(this,t,r);case"latin1":case"binary":return ga(this,t,r);case"base64":return da(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ya(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Ve(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+=" ... "),""};Un&&(T.prototype[Un]=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,Wr(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:qn(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):qn(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function qn(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 aa(this,e,t,r);case"utf8":case"utf-8":return la(this,e,t,r);case"ascii":case"latin1":case"binary":return ua(this,e,t,r);case"base64":return ca(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pa(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 da(e,t,r){return t===0&&r===e.length?Ur.fromByteArray(e):Ur.fromByteArray(e.slice(t,r))}function Yn(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 Vn=4096;function fa(e){let t=e.length;if(t<=Vn)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=Le(function(e){e=e>>>0,Xe(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(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,Xe(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(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=Le(function(e){e=e>>>0,Xe(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(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,Xe(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(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),Ze.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||G(e,4,this.length),Ze.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||G(e,8,this.length),Ze.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||G(e,8,this.length),Ze.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 Zn(e,t,r,n,i){ni(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 Xn(e,t,r,n,i){ni(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=Le(function(e,t=0){return Zn(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Le(function(e,t=0){return Xn(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=Le(function(e,t=0){return Zn(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Le(function(e,t=0){return Xn(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 ti(e,t,r,n,i){return t=+t,r=r>>>0,i||ei(e,t,r,4,34028234663852886e22,-34028234663852886e22),Ze.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return ti(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return ti(this,e,t,!1,r)};function ri(e,t,r,n,i){return t=+t,r=r>>>0,i||ei(e,t,r,8,17976931348623157e292,-17976931348623157e292),Ze.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return ri(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return ri(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=Qn(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Qn(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function Qn(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 wa(e,t,r){Xe(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Et(t,e.length-(r+1))}function ni(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 Ye.ERR_OUT_OF_RANGE("value",a,e)}wa(n,i,o)}function Xe(e,t){if(typeof e!="number")throw new Ye.ERR_INVALID_ARG_TYPE(t,"number",e)}function Et(e,t,r){throw Math.floor(e)!==e?(Xe(e,r),new Ye.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Ye.ERR_BUFFER_OUT_OF_BOUNDS:new Ye.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var ba=/[^+/0-9A-Za-z-_]/g;function Ea(e){if(e=e.split("=")[0],e=e.trim().replace(ba,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Vr(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 xa(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function ii(e){return Ur.toByteArray(Ea(e))}function Xt(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 Wr(e){return e!==e}var Pa=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 Le(e){return typeof BigInt>"u"?Ta:e}function Ta(){throw new Error("BigInt not supported")}});var w,m=_e(()=>{"use strict";w=he(oi())});function Ca(){return!1}var Aa,Ra,er,zr=_e(()=>{"use strict";m();c();p();d();f();Aa={},Ra={existsSync:Ca,promises:Aa},er=Ra});function Ha(...e){return e.join("/")}function za(...e){return e.join("/")}var wi,Ya,Za,we,tn=_e(()=>{"use strict";m();c();p();d();f();wi="/",Ya={sep:wi},Za={resolve:Ha,posix:Ya,join:za,sep:wi},we=Za});var xi=ge((Ud,Ei)=>{"use strict";m();c();p();d();f();Ei.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Pi=ge((Wd,vi)=>{"use strict";m();c();p();d();f();var el=xi();vi.exports=e=>{let t=el(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var rr,Ti=_e(()=>{"use strict";m();c();p();d();f();rr=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 Ai=ge((Rf,Ci)=>{"use strict";m();c();p();d();f();Ci.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 Oi=ge((Bf,Si)=>{"use strict";m();c();p();d();f();Si.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 on=ge((Jf,ki)=>{"use strict";m();c();p();d();f();var ol=Oi();ki.exports=e=>typeof e=="string"?e.replace(ol(),""):e});var Fi=ge((um,ir)=>{"use strict";m();c();p();d();f();ir.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()};ir.exports.default=ir.exports});var Ii=ge((oy,ul)=>{ul.exports={name:"@prisma/engines-version",version:"5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4c784e32044a8a016d99474bd02a3b6123742169"},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 Ni=ge(()=>{"use strict";m();c();p();d();f()});var Mn=ge((YC,es)=>{"use strict";m();c();p();d();f();es.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;sXr,Decimal:()=>ve,Extensions:()=>Kr,MetricsClient:()=>rt,NotFoundError:()=>ke,PrismaClientInitializationError:()=>V,PrismaClientKnownRequestError:()=>W,PrismaClientRustPanicError:()=>ue,PrismaClientUnknownRequestError:()=>K,PrismaClientValidationError:()=>Y,Public:()=>Hr,Sql:()=>se,defineDmmfProperty:()=>Li,empty:()=>$i,getPrismaClient:()=>Vs,getRuntime:()=>Jo,join:()=>Di,makeStrictEnum:()=>Qs,objectEnumValues:()=>sr,raw:()=>mn,sqltag:()=>gn,warnEnvConflicts:()=>void 0,warnOnce:()=>Ft});module.exports=Ys(sp);m();c();p();d();f();var Kr={};bt(Kr,{defineExtension:()=>si,getExtensionContext:()=>ai});m();c();p();d();f();m();c();p();d();f();function si(e){return typeof e=="function"?e:t=>t.$extends(e)}m();c();p();d();f();function ai(e){return e}var Hr={};bt(Hr,{validator:()=>li});m();c();p();d();f();m();c();p();d();f();function li(...e){return t=>t}m();c();p();d();f();m();c();p();d();f();var tr={};bt(tr,{$:()=>fi,bgBlack:()=>Da,bgBlue:()=>Ua,bgCyan:()=>Va,bgGreen:()=>Ba,bgMagenta:()=>qa,bgRed:()=>$a,bgWhite:()=>Qa,bgYellow:()=>ja,black:()=>_a,blue:()=>Je,bold:()=>pe,cyan:()=>Se,dim:()=>xt,gray:()=>Ct,green:()=>Pt,grey:()=>Na,hidden:()=>Fa,inverse:()=>ka,italic:()=>Oa,magenta:()=>La,red:()=>Qe,reset:()=>Sa,strikethrough:()=>Ma,underline:()=>vt,white:()=>Ia,yellow:()=>Tt});m();c();p();d();f();var Yr,ui,ci,pi,di=!0;typeof y<"u"&&({FORCE_COLOR:Yr,NODE_DISABLE_COLORS:ui,NO_COLOR:ci,TERM:pi}=y.env||{},di=y.stdout&&y.stdout.isTTY);var fi={enabled:!ui&&ci==null&&pi!=="dumb"&&(Yr!=null&&Yr!=="0"||di)};function q(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!fi.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Sa=q(0,0),pe=q(1,22),xt=q(2,22),Oa=q(3,23),vt=q(4,24),ka=q(7,27),Fa=q(8,28),Ma=q(9,29),_a=q(30,39),Qe=q(31,39),Pt=q(32,39),Tt=q(33,39),Je=q(34,39),La=q(35,39),Se=q(36,39),Ia=q(37,39),Ct=q(90,39),Na=q(90,39),Da=q(40,49),$a=q(41,49),Ba=q(42,49),ja=q(43,49),Ua=q(44,49),qa=q(45,49),Va=q(46,49),Qa=q(47,49);m();c();p();d();f();var Ja=100,mi=["green","yellow","blue","magenta","cyan","red"],At=[],gi=Date.now(),Ga=0,Zr=typeof y<"u"?y.env:{};globalThis.DEBUG??=Zr.DEBUG??"";globalThis.DEBUG_COLORS??=Zr.DEBUG_COLORS?Zr.DEBUG_COLORS==="true":!0;var Rt={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 Wa(e){let t={color:mi[Ga++%mi.length],enabled:Rt.enabled(e),namespace:e,log:Rt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&At.push([o,...n]),At.length>Ja&&At.shift(),Rt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:Ka(g)),u=`+${Date.now()-gi}ms`;gi=Date.now(),globalThis.DEBUG_COLORS?a(tr[s](pe(o)),...l,tr[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Xr=new Proxy(Wa,{get:(e,t)=>Rt[t],set:(e,t,r)=>Rt[t]=r});function Ka(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 hi(e=7500){let t=At.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||={})})(Ie||={});m();c();p();d();f();tn();function rn(e){return we.sep===we.posix.sep?e:e.split(we.sep).join(we.posix.sep)}var kt={};bt(kt,{error:()=>nl,info:()=>rl,log:()=>tl,query:()=>il,should:()=>Ri,tags:()=>Ot,warn:()=>nn});m();c();p();d();f();var Ot={error:Qe("prisma:error"),warn:Tt("prisma:warn"),info:Se("prisma:info"),query:Je("prisma:query")},Ri={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function tl(...e){console.log(...e)}function nn(e,...t){Ri.warn()&&console.warn(`${Ot.warn} ${e}`,...t)}function rl(e,...t){console.info(`${Ot.info} ${e}`,...t)}function nl(e,...t){console.error(`${Ot.error} ${e}`,...t)}function il(e,...t){console.log(`${Ot.query} ${e}`,...t)}m();c();p();d();f();function nr(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 Oe(e,t){throw new Error(t)}m();c();p();d();f();function sn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}m();c();p();d();f();var an=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});m();c();p();d();f();function tt(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 ln(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Mi.has(e)||(Mi.add(e),nn(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 ke=class extends W{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};re(ke,"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 Y=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};re(Y,"PrismaClientValidationError");m();c();p();d();f();var rt=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();m();c();p();d();f();function Mt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Li(e,t){let r=Mt(()=>sl(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function sl(e){return{datamodel:{models:un(e.models),enums:un(e.enums),types:un(e.types)}}}function un(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}m();c();p();d();f();var or=Symbol(),cn=new WeakMap,Fe=class{constructor(t){t===or?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 Fe{_getNamespace(){return"NullTypes"}},Lt=class extends _t{};pn(Lt,"DbNull");var It=class extends _t{};pn(It,"JsonNull");var Nt=class extends _t{};pn(Nt,"AnyNull");var sr={classes:{DbNull:Lt,JsonNull:It,AnyNull:Nt},instances:{DbNull:new Lt(or),JsonNull:new It(or),AnyNull:new Nt(or)}};function pn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();function Dt(e){return{ok:!1,error:e,map(){return Dt(e)},flatMap(){return Dt(e)}}}var dn=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 dn,r=Ge(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ge(t,e.queryRaw.bind(e)),executeRaw:Ge(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>al(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=ll(t,e.getConnectionInfo.bind(e))),n},al=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ge(e,t.queryRaw.bind(t)),executeRaw:Ge(e,t.executeRaw.bind(t)),commit:Ge(e,t.commit.bind(t)),rollback:Ge(e,t.rollback.bind(t))});function Ge(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return Dt({kind:"GenericJs",id:i})}}}function ll(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return Dt({kind:"GenericJs",id:i})}}}var qs=he(Ii());var pO=he(Ni());Ti();zr();tn();m();c();p();d();f();var se=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 ar={enumerable:!0,configurable:!0,writable:!0};function lr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>ar,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Bi=Symbol.for("nodejs.util.inspect.custom");function Ee(e,t){let r=cl(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=ji(Reflect.ownKeys(o),r),a=ji(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?{...ar,...l?.getPropertyDescriptor(s)}:ar:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[Bi]=function(){let o={...this};return delete o[Bi],o},i}function cl(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 ji(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}m();c();p();d();f();function nt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}m();c();p();d();f();function ur(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}m();c();p();d();f();m();c();p();d();f();var it=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();function Ui(e){return e.substring(0,1).toLowerCase()+e.substring(1)}m();c();p();d();f();function ot(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function cr(e){return e.toString()!=="Invalid Date"}m();c();p();d();f();m();c();p();d();f();var st=9e15,Be=1e9,hn="0123456789abcdef",dr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",fr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",yn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-st,maxE:st,crypto:!1},Ji,Me,I=!0,gr="[DecimalError] ",$e=gr+"Invalid argument: ",Gi=gr+"Precision limit exceeded",Wi=gr+"crypto unavailable",Ki="[object Decimal]",te=Math.floor,J=Math.pow,pl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,dl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,fl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Hi=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fe=1e7,_=7,ml=9007199254740991,gl=dr.length-1,wn=fr.length-1,R={toStringTag:Ki};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($e+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())+_,n.rounding=1,r=hl(n,eo(n,r)),n.precision=e,n.rounding=t,k(Me==2||Me==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(I=!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 I=!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/_))*_,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/yr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=at(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=at(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/yr(5,e)),i=at(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,I=!1,r=r.times(r).minus(1).sqrt().plus(r),I=!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,I=!1,r=r.times(r).plus(1).sqrt().plus(r),I=!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,x=g.rounding;if(u.isFinite()){if(u.isZero())return new g(u);if(u.abs().eq(1)&&h+4<=wn)return s=de(g,h+4,x).times(.25),s.s=u.s,s}else{if(!u.s)return new g(NaN);if(h+4<=wn)return s=de(g,h+4,x).times(.5),s.s=u.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/_+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(I=!1,t=Math.ceil(a/_),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,x=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(I=!1,a=h+S,s=De(u,a),n=t?mr(g,a+10):De(e,a),l=j(s,n,a,1),Bt(l.d,i=h,x))do if(a+=10,s=De(u,a),n=t?mr(g,a+10):De(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(Bt(l.d,i+=10,x));return I=!0,k(l,h,x)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,x,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,x=e.d,a=C.precision,l=C.rounding,!u[0]||!x[0]){if(x[0])e.s=-e.s;else if(u[0])e=new C(S);else return new C(l===3?-0:0);return I?k(e,a,l):e}if(r=te(e.e/_),g=te(S.e/_),u=u.slice(),o=g-r,o){for(h=o<0,h?(t=u,o=-o,s=x.length):(t=x,r=g,s=u.length),n=Math.max(Math.ceil(a/_),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=x.length,h=n0;--n)u[s++]=0;for(n=x.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=hr(u,n),I?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($e+e);return r.d?(t=zi(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())+_,n.rounding=1,r=wl(n,eo(n,r)),n.precision=e,n.rounding=t,k(Me>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(I=!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 I=!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(Me==2||Me==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,x=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!x||!x[0]||!S||!S[0])return new h(!e.s||x&&!x[0]&&!S||S&&!S[0]&&!x?NaN:!x||!S?e.s/0:e.s*0);for(r=te(g.e/_)+te(e.e/_),l=x.length,u=S.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+S[n]*x[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=hr(o,r),I?k(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return xn(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:(ae(e,0,Be),t===void 0?t=n.rounding:ae(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=xe(n,!0):(ae(e,0,Be),t===void 0?t=i.rounding:ae(t,0,8),n=k(new i(n),e+1,t),r=xe(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=xe(i):(ae(e,0,Be),t===void 0?t=o.rounding:ae(t,0,8),n=k(new o(i),e+i.e+1,t),r=xe(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,x,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=zi(C)-S.e-1,s=o%_,t.d[0]=J(10,s<0?_+s:s),e==null)e=o>0?t:u;else{if(a=new A(e),!a.isInt()||a.lt(u))throw Error($e+a);e=a.gt(t)?o>0?t:u:a}for(I=!1,a=new A(Z(C)),g=A.precision,A.precision=o=C.length*_*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,x=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,I=!0,x};R.toHexadecimal=R.toHex=function(e,t){return xn(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:ae(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]?(I=!1,r=j(r,e,0,t,1).times(e),I=!0,k(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return xn(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/_),t>=e.d.length-1&&(r=u<0?-u:u)<=ml)return i=Yi(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):(I=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=bn(e.times(De(a,n+r)),n),i.d&&(i=k(i,n+5,1),Bt(i.d,n,o)&&(t=n+10,i=k(bn(e.times(De(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,I=!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=xe(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ae(e,1,Be),t===void 0?t=i.rounding:ae(t,0,8),n=k(new i(n),e,t),r=xe(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):(ae(e,1,Be),t===void 0?t=n.rounding:ae(t,0,8)),k(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=xe(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=xe(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($e+e)}function Bt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=_,i=0):(i=Math.ceil((t+1)/_),t%=_),o=J(10,_-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 pr(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/yr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=at(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,x,S,C,A,F,L,N,M,O,z,U,wt,Q,ie,Ae,X,ze,zt=n.constructor,jr=n.s==i.s?1:-1,ee=n.d,$=i.d;if(!ee||!ee[0]||!$||!$[0])return new zt(!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=_,g=te(n.e/S)-te(i.e/S)),X=$.length,ie=ee.length,L=new zt(jr),N=L.d=[],h=0;$[h]==(ee[h]||0);h++);if($[h]>(ee[h]||0)&&g--,o==null?(U=o=zt.precision,s=zt.rounding):a?U=o+(n.e-i.e)+1:U=o,U<0)N.push(1),C=!0;else{if(U=U/S+2|0,h=0,X==1){for(x=0,$=$[0],U++;(h1&&($=e($,x,l),ee=e(ee,x,l),X=$.length,ie=ee.length),Q=X,M=ee.slice(0,X),O=M.length;O=l/2&&++Ae;do x=0,u=t($,M,X,O),u<0?(z=M[0],X!=O&&(z=z*l+(M[1]||0)),x=z/Ae|0,x>1?(x>=l&&(x=l-1),A=e($,x,l),F=A.length,O=M.length,u=t(A,M,F,O),u==1&&(x--,r(A,X=10;x/=10)h++;L.e=h+g*S-1,k(L,a?o+L.e+1:o,s,C)}return L}}();function k(e,t,r,n){var i,o,s,a,l,u,g,h,x,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+=_,s=t,g=h[x=0],l=g/J(10,i-s-1)%10|0;else if(x=Math.ceil((o+1)/_),a=h.length,x>=a)if(n){for(;a++<=x;)h.push(0);g=l=0,i=1,o%=_,s=o-_+1}else break e;else{for(g=a=h[x],i=1;a>=10;a/=10)i++;o%=_,s=o-_+i,l=s<0?0:g/J(10,i-s-1)%10|0}if(n=n||t<0||h[x+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[x-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,(_-t%_)%_),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=x,a=1,x--):(h.length=x+1,a=J(10,_-o),h[x]=s>0?(g/J(10,i-s)%J(10,s)|0)*a:0),u)for(;;)if(x==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[x]+=a,h[x]!=fe)break;h[x--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return I&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Ne(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ne(-i-1)+o,r&&(n=r-s)>0&&(o+=Ne(n))):i>=s?(o+=Ne(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ne(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ne(n))),o}function hr(e,t){var r=e[0];for(t*=_;r>=10;r/=10)t++;return t}function mr(e,t,r){if(t>gl)throw I=!0,r&&(e.precision=r),Error(Gi);return k(new e(dr),t,1,!0)}function de(e,t,r){if(t>wn)throw Error(Gi);return k(new e(fr),t,r,!0)}function zi(e){var t=e.length-1,r=t*_+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 Ne(e){for(var t="";e--;)t+="0";return t}function Yi(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/_+4);for(I=!1;;){if(r%2&&(o=o.times(t),Vi(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),Vi(t.d,s)}return I=!0,o}function qi(e){return e.d[e.d.length-1]&1}function Zi(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new x(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(I=!1,l=C):l=t,a=new x(.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 x(1),x.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&&Bt(s.d,l-n,S,u))x.precision=l+=10,r=o=a=new x(1),g=0,u++;else return k(s,x.precision=C,S,I=!0);else return x.precision=C,s}s=a}}function De(e,t){var r,n,i,o,s,a,l,u,g,h,x,S=1,C=10,A=e,F=A.d,L=A.constructor,N=L.rounding,M=L.precision;if(A.s<0||!F||!F[0]||!A.e&&F[0]==1&&F.length==1)return new L(F&&!F[0]?-1/0:A.s!=1?NaN:F?0:A);if(t==null?(I=!1,g=M):g=t,L.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 L("0."+r),o++):A=new L(n+"."+r.slice(1))}else return u=mr(L,g+2,M).times(o+""),A=De(new L(n+"."+r.slice(1)),g-C).plus(u),L.precision=M,t==null?k(A,M,N,I=!0):A;for(h=A,l=s=A=j(A.minus(1),A.plus(1),g,1),x=k(A.times(A),g,1),i=3;;){if(s=k(s.times(x),g,1),u=l.plus(j(s,new L(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(mr(L,g+2,M).times(o+""))),l=j(l,new L(S),g,1),t==null)if(Bt(l.d,g-C,N,a))L.precision=g+=C,u=s=A=j(h.minus(1),h.plus(1),g,1),x=k(A.times(A),g,1),i=a=1;else return k(l,L.precision=M,N,I=!0);else return L.precision=M,l;l=u,i+=2}}function Xi(e){return String(e.s*e.s/0)}function En(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)%_,r<0&&(n+=_),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Hi.test(t))return En(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(fl.test(t))r=8;else throw Error($e+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=Yi(n,new n(r),o,o*2)),u=pr(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=hr(u,g),e.d=u,I=!1,s&&(e=j(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?J(2,l):Ke.pow(2,l))),I=!0,e)}function wl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:at(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/yr(5,r)),t=at(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 at(e,t,r,n,i){var o,s,a,l,u=1,g=e.precision,h=Math.ceil(g/_);for(I=!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 I=!0,s.d.length=h+1,s}function yr(e,t){for(var r=e;--t;)r*=e;return r}function eo(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 Me=n?4:1,t;if(r=t.divToInt(i),r.isZero())Me=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Me=qi(r)?n?2:3:n?4:1,t;Me=qi(r)?n?1:4:n?3:2}return t.minus(i).abs()}function xn(e,t,r,n){var i,o,s,a,l,u,g,h,x,S=e.constructor,C=r!==void 0;if(C?(ae(r,1,Be),n===void 0?n=S.rounding:ae(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=Xi(e);else{for(g=xe(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(".",""),x=new S(1),x.e=g.length-s,x.d=pr(xe(x),10,i),x.e=x.d.length),h=pr(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,x,r,n,0,i),h=e.d,o=e.e,u=Ji),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=pr(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 bl(e){return new this(e).abs()}function El(e){return new this(e).acos()}function xl(e){return new this(e).acosh()}function vl(e,t){return new this(e).plus(t)}function Pl(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=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 Sl(e){return new this(e).cbrt()}function Ol(e){return k(e=new this(e),e.e+1,2)}function kl(e,t,r){return new this(e).clamp(t,r)}function Fl(e){if(!e||typeof e!="object")throw Error(gr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Be,"rounding",0,8,"toExpNeg",-st,0,"toExpPos",0,st,"maxE",0,st,"minE",-st,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error($e+r+": "+n);if(r="crypto",i&&(this[r]=yn[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(Wi);else this[r]=!1;else throw Error($e+r+": "+n);return this}function Ml(e){return new this(e).cos()}function _l(e){return new this(e).cosh()}function to(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,Qi(o)){u.s=o.s,I?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;I?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(Wi);else for(;o=10;i/=10)n++;n<_&&(r-=_-n)}return s.e=r,s.d=a,s}function Kl(e){return k(e=new this(e),e.e+1,this.rounding)}function Hl(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function zl(e){return new this(e).sin()}function Yl(e){return new this(e).sinh()}function Zl(e){return new this(e).sqrt()}function Xl(e,t){return new this(e).sub(t)}function eu(){var e=0,t=arguments,r=new this(t[e]);for(I=!1;r.s&&++e`}};function ut(e){return e instanceof jt}m();c();p();d();f();m();c();p();d();f();var wr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};m();c();p();d();f();var br=e=>e,Er={bold:br,red:br,green:br,dim:br,enabled:!1},ro={bold:pe,red:Qe,green:Pt,dim:xt,enabled:!0},ct={write(e){e.writeLine(",")}};m();c();p();d();f();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)))})}};m();c();p();d();f();var je=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var pt=class extends je{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new wr(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(){}};m();c();p();d();f();var no=": ",xr=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()+no.length}write(t){let r=new Pe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(no).write(this.value)}};m();c();p();d();f();var dt=class e extends je{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 pt&&(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())))})}};m();c();p();d();f();var H=class extends je{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 vn=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 ft(e){return new vn(io(e))}function io(e){let t=new dt;for(let[r,n]of Object.entries(e)){let i=new xr(r,oo(n));t.addField(i)}return t}function oo(e){if(typeof e=="string")return new H(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new H(String(e));if(typeof e=="bigint")return new H(`${e}n`);if(e===null)return new H("null");if(e===void 0)return new H("undefined");if(lt(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=cr(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof Fe?new H(`Prisma.${e._getName()}`):ut(e)?new H(`prisma.${Ui(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?ou(e):typeof e=="object"?io(e):new H(Object.prototype.toString.call(e))}function ou(e){let t=new pt;for(let r of e)t.addItem(oo(r));return t}function vr(e,t){let r=t==="pretty"?ro:Er,n=e.renderAllMessages(r),i=new it(0,{colors:r}).write(e).toString();return{message:n,args:i}}function so(e){if(e===void 0)return"";let t=ft(e);return new it(0,{colors:Er}).write(t).toString()}m();c();p();d();f();var su="P2037";function Pr({error:e,user_facing_error:t},r,n){return t.error_code?new W(au(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 au(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===su&&(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 Ut="";function ao(e){var t=e.split(` +`);return t.reduce(function(r,n){var i=cu(n)||du(n)||gu(n)||bu(n)||yu(n);return i&&r.push(i),r},[])}var lu=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,uu=/\((\S*)(?::(\d+))(?::(\d+))\)/;function cu(e){var t=lu.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=uu.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]||Ut,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var pu=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function du(e){var t=pu.exec(e);return t?{file:t[2],methodName:t[1]||Ut,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var fu=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,mu=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function gu(e){var t=fu.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=mu.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||Ut,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var hu=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function yu(e){var t=hu.exec(e);return t?{file:t[3],methodName:t[1]||Ut,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var wu=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function bu(e){var t=wu.exec(e);return t?{file:t[2],methodName:t[1]||Ut,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Pn=class{getLocation(){return null}},Tn=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=ao(t).find(i=>{if(!i.file)return!1;let o=rn(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 Ue(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Pn:new Tn}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var lo={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function mt(e={}){let t=xu(e);return Object.entries(t).reduce((n,[i,o])=>(lo[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function xu(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Tr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function uo(e,t){let r=Tr(e);return t({action:"aggregate",unpacker:r,argsMapper:mt})(e)}m();c();p();d();f();function vu(e={}){let{select:t,...r}=e;return typeof t=="object"?mt({...r,_count:t}):mt({...r,_count:{_all:!0}})}function Pu(e={}){return typeof e.select=="object"?t=>Tr(e)(t)._count:t=>Tr(e)(t)._count._all}function co(e,t){return t({action:"count",unpacker:Pu(e),argsMapper:vu})(e)}m();c();p();d();f();function Tu(e={}){let t=mt(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 Cu(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function po(e,t){return t({action:"groupBy",unpacker:Cu(e),argsMapper:Tu})(e)}function fo(e,t,r){if(t==="aggregate")return n=>uo(n,r);if(t==="count")return n=>co(n,r);if(t==="groupBy")return n=>po(n,r)}m();c();p();d();f();function mo(e,t){let r=t.fields.filter(i=>!i.relationName),n=an(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")},...lr(Object.keys(n))})}m();c();p();d();f();m();c();p();d();f();var go=e=>Array.isArray(e)?e:e.split("."),Cn=(e,t)=>go(t).reduce((r,n)=>r&&r[n],e),ho=(e,t,r)=>go(t).reduceRight((n,i,o,s)=>Object.assign({},Cn(e,s.slice(0,o)),{[i]:n}),r);function Au(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Ru(e,t,r){return t===void 0?e??{}:ho(t,r,e||!0)}function An(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ue(e._errorFormat),g=Au(n,i),h=Ru(l,o,g),x=r({dataPath:g,callsite:u})(h),S=Su(e,t);return new Proxy(x,{get(C,A){if(!S.includes(A))return C[A];let L=[a[A].type,r,A],N=[g,h];return An(e,...L,...N)},...lr([...S,...Object.getOwnPropertyNames(x)])})}}function Su(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}m();c();p();d();f();m();c();p();d();f();var xo=he(Ai());m();c();p();d();f();zr();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var yo={keyword:Se,entity:Se,value:e=>pe(Je(e)),punctuation:Je,directive:Se,function:Se,variable:e=>pe(Je(e)),string:e=>pe(Pt(e)),boolean:Tt,number:Se,comment:Ct};var Ou=e=>e,Cr={},ku=0,D={manual:Cr.Prism&&Cr.Prism.manual,disableWorkerMessageHandler:Cr.Prism&&Cr.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(Ae instanceof me)continue;if(z&&Q!=t.length-1){N.lastIndex=ie;var h=N.exec(e);if(!h)break;var g=h.index+(O?h[1].length:0),x=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,Ae=e.slice(ie,l),h.index-=ie}else{N.lastIndex=0;var h=N.exec(Ae),u=1}if(!h){if(o)break;continue}O&&(U=h[1]?h[1].length:0);var g=h.index+U,h=h[0].slice(U),x=g+h.length,S=Ae.slice(0,g),C=Ae.slice(x);let X=[Q,u];S&&(++Q,ie+=S.length,X.push(S));let ze=new me(A,M?D.tokenize(h,M):h,wt,h,z);if(X.push(ze),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(""):Fu(e.type)(e.content)};function Fu(e){return yo[e]||Ou}function wo(e){return Mu(e,D.languages.javascript)}function Mu(e,t){return D.tokenize(e,t).map(n=>me.stringify(n)).join("")}m();c();p();d();f();var bo=he(Pi());function Eo(e){return(0,bo.default)(e)}var Ar=class e{static read(t){let r;try{r=er.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,Eo(n).split(` +`))}highlight(){let t=wo(this.toString());return new e(this.firstLineNumber,t.split(` +`))}toString(){return this.lines.join(` +`)}};var _u={red:Qe,gray:Ct,dim:xt,bold:pe,underline:vt,highlightSource:e=>e.highlight()},Lu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Iu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Nu({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=Iu({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=Ar.read(a.fileName)?.slice(l,a.lineNumber),g=u?.lineAt(a.lineNumber);if(u&&g){let h=$u(g),x=Du(g);if(!x)return s;s.functionName=`${x.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,C=>C.slice(0,x.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,xo.default)(i,C).slice(C)}}return s}function Du(e){let t=Object.keys(Ie.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 $u(e){let t=0;for(let r=0;r{if("rejectOnNotFound"in n.args){let o=gt({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new Y(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof W&&o.code==="P2025"?new ke(`No ${e} found`,t):o})}}m();c();p();d();f();function Te(e){return e.replace(/^./,t=>t.toLowerCase())}var qu=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Vu=["aggregate","count","groupBy"];function Rn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Qu(e,t),Gu(e,t),$t(r),ne("name",()=>t),ne("$name",()=>t),ne("$parent",()=>e._appliedParent)];return Ee({},n)}function Qu(e,t){let r=Te(t),n=Object.keys(Ie.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=vo(o,t,e._clientVersion,s);let a=l=>u=>{let g=Ue(e._errorFormat);return e._createPrismaPromise(h=>{let x={args:u,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:h,callsite:g};return s({...x,...l})})};return qu.includes(o)?An(e,t,a):Ju(i)?fo(e,i,a):a({})}}}function Ju(e){return Vu.includes(e)}function Gu(e,t){return We(ne("fields",()=>{let r=e._runtimeDataModel.models[t];return mo(t,r)}))}m();c();p();d();f();function Po(e){return e.replace(/^./,t=>t.toUpperCase())}var Sn=Symbol();function qt(e){let t=[Wu(e),ne(Sn,()=>e),ne("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push($t(r)),Ee(e,t)}function Wu(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Te),n=[...new Set(t.concat(r))];return We({getKeys(){return n},getPropertyValue(i){let o=Po(i);if(e._runtimeDataModel.models[o]!==void 0)return Rn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Rn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function To(e){return e[Sn]?e[Sn]:e}function Co(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)}m();c();p();d();f();m();c();p();d();f();function Ao({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(nt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(nt(u))}Ku(e,l.needs)&&s.push(Hu(l,Ee(e,s)))}return s.length>0||a.length>0?Ee(e,[...s,...a]):e}function Ku(e,t){return t.every(r=>sn(e,r))}function Hu(e,t){return We(ne(e.name,()=>e.compute(t)))}m();c();p();d();f();function Rr({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]=Rr({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function So({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Rr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=Te(l);return Ao({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 Oo(e){if(e instanceof se)return zu(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:Oo(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Io(o,l),a.args=s,Fo(e,a,r,n+1)}})})}function Mo(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 Fo(e,t,s)}function _o(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Lo(r,n,0,e):e(r)}}function Lo(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=Io(i,l),Lo(a,t,r+1,n)}})}var ko=e=>e;function Io(e=ko,t=ko){return r=>e(t(r))}m();c();p();d();f();m();c();p();d();f();function Do(e,t,r){let n=Te(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Yu({...e,...No(t.name,e,t.result.$allModels),...No(t.name,e,t.result[n])})}function Yu(e){let t=new be,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 tt(e,n=>({...n,needs:r(n.name,new Set)}))}function No(e,t,r){return r?tt(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Zu(t,o,i)})):{}}function Zu(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):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)r[i]=!0;return r}function Bo(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 Sr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new be;this.modelExtensionsCache=new be;this.queryCallbacksCache=new be;this.clientExtensions=Mt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Mt(()=>{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=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()}},Or=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Sr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Sr(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();var jo=le("prisma:client"),Uo={Vercel:"vercel","Netlify CI":"netlify"};function qo({postinstall:e,ciName:t,clientVersion:r}){if(jo("checkPlatformCaching:postinstall",e),jo("checkPlatformCaching:ciName",t),e===!0&&t&&t in Uo){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/${Uo[t]}-build`;throw console.error(n),new V(n,r)}}m();c();p();d();f();function Vo(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 Xu="Cloudflare-Workers",ec="node";function Qo(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Xu?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===ec?"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 Jo(){let e=Qo();return{id:e,prettyName:tc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}m();c();p();d();f();m();c();p();d();f();var On=he(on());m();c();p();d();f();function Go(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}m();c();p();d();f();function Wo(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 Ko=he(Fi());function Ho({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,Ko.default)({user:t,repo:r,template:n,title:e,body:i})}function zo({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=hi(6e3-(s?.length??0)),l=Wo((0,On.default)(a)),u=n?`# Description +\`\`\` +${n} +\`\`\``:"",g=(0,On.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?Go(s):""} +\`\`\` +`),h=Ho({title:r,body:g});return`${r} + +This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. + +${vt(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 kr({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 Yo(e){if(e?.kind==="itx")return e.options.id}m();c();p();d();f();var kn=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)}},Zo={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:kn}}};var rc="P2036",Ce=le("prisma:client:libraryEngine");function nc(e){return e.item_type==="query"&&"query"in e}function ic(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var uC=[...en,"native"],Qt=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=Zo,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(oc(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(Ce("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&&Ce("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",nc(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):ic(r)?this.loggerRustPanic=new ue(Fn(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 Ce(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Ce("library starting");try{let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,Ce("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 Ce("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),Ce("library stopping");let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Ce("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}){Ce(`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(Fn(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}){Ce("requestBatch");let i=ur(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),Yo(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(Fn(this,t.user_facing_error.message),this.config.clientVersion);let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:Pr(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===rc&&this.config.adapter){let r=t.meta?.id;nr(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return nr(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 oc(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function Fn(e,t){return zo({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function Xo({copyEngine:e=!0},t){let r;try{r=kr({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}e&&r?.startsWith("prisma://")&&Ft("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=St(t.generator),i=!!(r?.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o&&!1){let l;throw e?r?.startsWith("prisma://")?l=["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."]:l=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:l=["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 Y(l.join(` +`),{clientVersion:t.clientVersion})}return new Qt(t)}m();c();p();d();f();function Fr({generator:e}){return e?.previewFeatures??[]}m();c();p();d();f();m();c();p();d();f();function ht(e){return e.substring(0,1).toLowerCase()+e.substring(1)}m();c();p();d();f();m();c();p();d();f();var os=he(Mn());m();c();p();d();f();function ns(e,t,r){let n=is(e),i=sc(n),o=lc(i);o?Mr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function is(e){return e.errors.flatMap(t=>t.kind==="Union"?is(t):[t])}function sc(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:ac(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function ac(e,t){return[...new Set(e.concat(t))]}function lc(e){return ln(e,(t,r)=>{let n=ts(t),i=ts(r);return n!==i?n-i:rs(t)-rs(r)})}function ts(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function rs(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();var Jt=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 Mr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":uc(e,t);break;case"IncludeOnScalar":cc(e,t);break;case"EmptySelection":pc(e,t,r);break;case"UnknownSelectionField":gc(e,t);break;case"UnknownArgument":hc(e,t);break;case"UnknownInputField":yc(e,t);break;case"RequiredArgumentMissing":wc(e,t);break;case"InvalidArgumentType":bc(e,t);break;case"InvalidArgumentValue":Ec(e,t);break;case"ValueTooLarge":xc(e,t);break;case"SomeFieldsMissing":vc(e,t);break;case"TooManyFieldsGiven":Pc(e,t);break;case"Union":ns(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function uc(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 cc(e,t){let[r,n]=Gt(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)}. ${Wt(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function pc(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){dc(e,t,i);return}if(n.hasField("select")){fc(e,t);return}}if(r?.[ht(e.outputType.name)]){mc(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function dc(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 fc(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),ls(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Wt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function mc(e,t){let r=new Jt;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]=Gt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new dt;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 gc(e,t){let[r,n]=Gt(e.selectionPath),i=t.arguments.getDeepSubSelectionValue(r)?.asObject(),o;if(i){let s=i.getFieldValue("select")?.asObject(),a=i.getFieldValue("include")?.asObject(),l=i.getFieldValue("omit")?.asObject();s?.hasField(n)?(o="select",s.getField(n)?.markAsError(),ls(s,e.outputType)):a?.hasField(n)?(o="include",a.getField(n)?.markAsError(),Tc(a,e.outputType)):l?.hasField(n)&&(o="omit",l.getField(n)?.markAsError(),Cc(l,e.outputType))}t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(Wt(s)),a.join(" ")})}function hc(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Ac(n,e.arguments)),t.addErrorMessage(i=>ss(i,r,e.arguments.map(o=>o.name)))}function yc(e,t){let[r,n]=Gt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&us(o,e.inputType)}t.addErrorMessage(o=>ss(o,n,e.inputType.fields.map(s=>s.name)))}function ss(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Sc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Wt(e)),n.join(" ")}function wc(e,t){let r;t.addErrorMessage(l=>r?.value instanceof H&&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]=Gt(e.argumentPath),s=new Jt,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(as).join(" | ");a.addSuggestion(new ce(o,l).makeRequired())}}function as(e){return e.kind==="list"?`${as(e.elementType)}[]`:e.name}function bc(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=_r("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 Ec(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=_r("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function xc(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 H&&(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 vc(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&&us(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")} ${_r("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(Wt(i)),o.join(" ")})}function Pc(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 ${_r("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function ls(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ce(r.name,"true"))}function Tc(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ce(r.name,"true"))}function Cc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ce(r.name,"true"))}function Ac(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ce(r.name,r.typeNames.join(" | ")))}function us(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 Gt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Wt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function _r(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Rc=3;function Sc(e,t){let r=1/0,n;for(let i of t){let o=(0,os.default)(e,i);o>Rc||o({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?.[ht(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:Oe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};m();c();p();d();f();var fs=e=>({command:e});m();c();p();d();f();m();c();p();d();f();var ms=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);m();c();p();d();f();function Ht(e){try{return gs(e,"fast")}catch{return gs(e,"slow")}}function gs(e,t){return JSON.stringify(e.map(r=>$c(r,t)))}function $c(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:ot(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")}:Bc(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?ys(e):e}function Bc(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function ys(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(hs);let t={};for(let r of Object.keys(e))t[r]=hs(e[r]);return t}function hs(e){return typeof e=="bigint"?e.toString():ys(e)}var jc=/^(\s*alter\s)/i,ws=le("prisma:client");function Ln(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&jc.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 In=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Ht(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Ht(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Ht(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=ms(r),i={values:Ht(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?ws(`prisma.${e}(${n}, ${i.values})`):ws(`prisma.${e}(${n})`),{query:n,parameters:i}},bs={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new se(t,r)}},Es={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};m();c();p();d();f();function Nn(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=xs(r(o)):xs(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 xs(e){return typeof e.then=="function"?e:Promise.resolve(e)}m();c();p();d();f();var vs={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Dn=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??vs}};function Ps(e){return e.includes("tracing")?new Dn:vs}m();c();p();d();f();function Ts(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();var Uc=["$connect","$disconnect","$on","$transaction","$use","$extends"],Cs=Uc;m();c();p();d();f();function As(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 Ir=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 Os=he(on());m();c();p();d();f();function Nr(e){return typeof e.batchRequestIdx=="number"}m();c();p();d();f();function Dr(e){return e===null?e:Array.isArray(e)?e.map(Dr):typeof e=="object"?qc(e)?Vc(e):tt(e,Dr):e}function qc(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Vc({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return w.Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new ve(t);case"Json":return JSON.parse(t);default:Oe(t,"Unknown tagged value")}}m();c();p();d();f();function Rs(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push($n(e.query.arguments)),t.push($n(e.query.selection)),t.join("")}function $n(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${$n(n)})`:r}).join(" ")})`}m();c();p();d();f();var Qc={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 Bn(e){return Qc[e]}m();c();p();d();f();var $r=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 Ss(e){let t=[],r=Jc(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=>Bn(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Wc(o),containsWrite:u,customDataProxyFetch:i})).map((h,x)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[x],h)}catch(S){return S}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?ks(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Bn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Rs(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(Gc(t),Kc(t,i)||t instanceof ke)throw t;if(t instanceof W&&Hc(t)){let u=Fs(t.meta);Lr({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=gt({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,Os.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=Cn(o,s),l=i==="queryRaw"?Ss(a):Dr(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Wc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:ks(e)};Oe(e,"Unknown transaction kind")}}function ks(e){return{id:e.id,payload:e.payload}}function Kc(e,t){return Nr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Hc(e){return e.code==="P2009"||e.code==="P2012"}function Fs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Fs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}m();c();p();d();f();var Ms="5.18.0";var _s=Ms;m();c();p();d();f();var $s=he(Mn());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 Ls=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Is=["pretty","colorless","minimal"],Ns=["info","query","warn","error"],Yc={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=yt(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(!Fr(t).includes("driverAdapters"))throw new B('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(St()==="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(!Is.includes(e)){let t=yt(e,Is);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"&&!Ns.includes(r)){let n=yt(r,Ns);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=yt(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=Xc(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(ep(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=yt(r,t);throw new B(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Bs(e,t){for(let[r,n]of Object.entries(e)){if(!Ls.includes(r)){let i=yt(r,Ls);throw new B(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Yc[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 yt(e,t){if(t.length===0||typeof e!="string")return"";let r=Zc(e,t);return r?` Did you mean "${r}"?`:""}function Zc(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,$s.default)(e,i)}));r.sort((i,o)=>i.distanceht(n)===t);if(r)return e[r]}function ep(e,t){let r=ft(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}=vr(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}m();c();p();d();f();function js(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(!Nr(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 tp={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},rp=Symbol.for("prisma.client.transaction.id"),np={id:0,nextId(){return++this.id}};function Vs(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Ir;this._createPrismaPromise=Nn();this.$extends=Co;e=n?.__internal?.configOverride?.(e)??e,qo(e),n&&Bs(n,e);let i=new rr().on("error",()=>{});this._extensions=Or.empty(),this._previewFeatures=Fr(e),this._clientVersion=e.clientVersion??_s,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Ps(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);er.existsSync(h)||(h=e.dirname),qe("dirname",e.dirname),qe("relativePath",e.relativePath),qe("cwd",h);let x=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:x.allowTriggerPanic,datamodelPath:we.join(e.dirname,e.filename??"schema.prisma"),prismaPath:x.binaryPath??void 0,engineEndpoint:x.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&As(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:Vo(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:kr,getBatchRequestPayload:ur,prismaGraphQLToJSError:Pr,PrismaClientUnknownRequestError:K,PrismaClientInitializationError:V,PrismaClientKnownRequestError:W,debug:le("prisma:client:accelerateEngine"),engineVersion:qs.version,clientVersion:e.clientVersion}},qe("clientVersion",e.clientVersion),this._engine=Xo(e,this._engineConfig),this._requestHandler=new Br(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=>{kt.log(`${kt.tags[C]??""}`,A.message||A.query)})}this._metrics=new rt(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{yi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:In({clientMethod:i,activeProvider:a}),callsite:Ue(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Us(n,i);return Ln(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new Y("`$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=>(Ln(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new Y(`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:fs,callsite:Ue(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:In({clientMethod:i,activeProvider:a}),callsite:Ue(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",...Us(n,i));throw new Y("`$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})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=np.nextId(),s=Ts(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 js(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(Ee(To(this),[ne("_appliedParent",()=>this._appliedParent._createItxClient(n)),ne("_createPrismaPromise",()=>Nn(n)),ne(rp,()=>n.id),nt(Cs)]))}$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??tp,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,L=>(F?.end(),l(L))));let{runInTransaction:h,args:x,...S}=u,C={...n,...S};x&&(C.args=i.middlewareArgsToRequestArgs(x)),n.transaction!==void 0&&h===!1&&delete C.transaction;let A=await Mo(this,C);return C.model?So({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:x,customDataProxyFetch:S}){try{n=u?u(n):n;let C={name:"serialize"},A=this._tracingHelper.runInChildSpan(C,()=>cs({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}(${so(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:x,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 Y("`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 Us(e,t){return ip(e)?[new se(e,t),bs]:[e,Es]}function ip(e){return Array.isArray(e)&&Array.isArray(e.raw)}m();c();p();d();f();var op=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Qs(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!op.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,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); +//# sourceMappingURL=react-native.js.map diff --git a/experiments/mongodb/prisma/generated/client/runtime/wasm.js b/experiments/mongodb/prisma/generated/client/runtime/wasm.js new file mode 100644 index 000000000..cbb208250 --- /dev/null +++ b/experiments/mongodb/prisma/generated/client/runtime/wasm.js @@ -0,0 +1,32 @@ +"use strict";var vo=Object.create;var Rt=Object.defineProperty;var To=Object.getOwnPropertyDescriptor;var Co=Object.getOwnPropertyNames;var Ro=Object.getPrototypeOf,Ao=Object.prototype.hasOwnProperty;var se=(e,t)=>()=>(e&&(t=e(e=0)),t);var _e=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),At=(e,t)=>{for(var r in t)Rt(e,r,{get:t[r],enumerable:!0})},Wr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Co(t))!Ao.call(e,i)&&i!==r&&Rt(e,i,{get:()=>t[i],enumerable:!(n=To(t,i))||n.enumerable});return e};var De=(e,t,r)=>(r=e!=null?vo(Ro(e)):{},Wr(t||!e||!e.__esModule?Rt(r,"default",{value:e,enumerable:!0}):r,e)),So=e=>Wr(Rt({},"__esModule",{value:!0}),e);function cr(e,t){if(t=t.toLowerCase(),t==="utf8"||t==="utf-8")return new h(Lo.encode(e));if(t==="base64"||t==="base64url")return e=e.replace(/-/g,"+").replace(/_/g,"/"),e=e.replace(/[^A-Za-z0-9+/]/g,""),new h([...atob(e)].map(r=>r.charCodeAt(0)));if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return new h([...e].map(r=>r.charCodeAt(0)));if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let r=new h(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(y=0){return $(y,"offset"),Y(y,"offset"),q(y,"offset",this.length-1),new DataView(this.buffer)[r[a]](y,u)},o=(a,u)=>function(y,T=0){let C=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),O=Mo[C];return $(T,"offset"),Y(T,"offset"),q(T,"offset",this.length-1),ko(y,"value",O[0],O[1]),new DataView(this.buffer)[r[a]](T,y,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 Hr(e){throw new Error(`Buffer polyfill does not implement "${e}"`)}function St(e,t){if(!(e instanceof Uint8Array))throw new TypeError(`The "${t}" argument must be an instance of Buffer or Uint8Array`)}function q(e,t,r=Do+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 $(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 ko(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 Kr(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 Fo(e,t="utf8"){return h.from(e,t)}var h,Mo,Lo,Io,_o,Do,b,mr,c=se(()=>{"use strict";h=class e extends Uint8Array{constructor(){super(...arguments);this._isBuffer=!0}get offset(){return this.byteOffset}static alloc(r,n=0,i="utf8"){return Kr(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 cr(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 _o.includes(r)}static compare(r,n){St(r,"buff1"),St(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 cr(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){$(r,"offset"),Y(r,"offset"),q(r,"offset",this.length-1),$(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){$(n,"offset"),Y(n,"offset"),q(n,"offset",this.length-1),$(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){q(n,"targetStart"),q(i,"sourceStart",this.length),q(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((y,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 Io.decode(this.slice(n,i));if(r==="base64"||r==="base64url"){let o=btoa(this.reduce((s,a)=>s+mr(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+mr(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"),"");Hr(`encoding "${r}"`)}toLocaleString(){return this.toString()}inspect(){return``}};Mo={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]},Lo=new TextEncoder,Io=new TextDecoder,_o=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],Do=4294967295;Oo(h.prototype);b=new Proxy(Fo,{construct(e,[t,r]){return h.from(t,r)},get(e,t){return h[t]}}),mr=String.fromCodePoint});var g,m=se(()=>{"use strict";g={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 Zr(e,t){var r,n,i,o,s,a,u,y,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,y=t.d,s=e.e,i=t.e,u=u.slice(),o=s-i,o){for(o<0?(n=u,o=-o,a=y.length):(n=y,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=y.length,a-o<0&&(o=a,n=y,y=u,u=n),r=0;o;)r=(u[--o]=u[o]+y[o]+r)/j|0,u[o]%=j;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(Ae+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(dr+V(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),y+=5;for(n=Math.log(Re(2,y))/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(ge(i,r,a)),ae(s.d).slice(0,a)===ae(o.d).slice(0,a)){for(;y--;)o=D(o.times(o),a);return T.precision=C,t==null?(U=!0,D(o,C)):o}o=s}}function V(e){for(var t=e.e*N,r=e.d[0];r>=10;r/=10)t++;return t}function pr(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 Ee(e){for(var t="";e--;)t+="0";return t}function et(e,t){var r,n,i,o,s,a,u,y,T,C=1,O=10,A=e,M=A.d,S=A.constructor,L=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,y=L):y=t,A.eq(10))return t==null&&(U=!0),pr(S,y);if(y+=O,S.precision=y,r=ae(M),n=r.charAt(0),o=V(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=V(A),n>1?(A=new S("0."+r),o++):A=new S(n+"."+r.slice(1))}else return u=pr(S,y+2,L).times(o+""),A=et(new S(n+"."+r.slice(1)),y-O).plus(u),S.precision=L,t==null?(U=!0,D(A,L)):A;for(a=s=A=ge(A.minus(Z),A.plus(Z),y),T=D(A.times(A),y),i=3;;){if(s=D(s.times(T),y),u=a.plus(ge(s,new S(i),y)),ae(u.d).slice(0,y)===ae(a.d).slice(0,y))return a=a.times(2),o!==0&&(a=a.plus(pr(S,y+2,L).times(o+""))),a=ge(a,new S(C),y),S.precision=L,t==null?(U=!0,D(a,L)):a;a=u,i+=2}}function zr(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=Ne(r/N),e.d=[],n=(r+1)%N,r<0&&(n+=N),nOt||e.e<-Ot))throw Error(dr+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,y,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,y=C[T=0];else{if(T=Math.ceil((n+1)/N),o=C.length,T>=o)return e;for(y=o=C[T],s=1;o>=10;o/=10)s++;n%=N,i=n-N+s}if(r!==void 0&&(o=Re(10,s-i-1),a=y/o%10|0,u=t<0||C[T+1]!==void 0||y%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?y/Re(10,s-i):0:C[T-1])%10&1||r==(e.s<0?8:7))),t<1||!C[0])return u?(o=V(e),C.length=1,t=t-o-1,C[0]=Re(10,(N-t%N)%N),e.e=Ne(-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=Re(10,N-n),C[T]=i>0?(y/Re(10,s-i)%Re(10,i)|0)*o:0),u)for(;;)if(T==0){(C[0]+=o)==j&&(C[0]=1,++e.e);break}else{if(C[T]+=o,C[T]!=j)break;C[T--]=0,o=1}for(n=C.length;C[--n]===0;)C.pop();if(U&&(e.e>Ot||e.e<-Ot))throw Error(dr+V(e));return e}function tn(e,t){var r,n,i,o,s,a,u,y,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,y=e.e,u=u.slice(),s=y-n,s){for(T=s<0,T?(r=u,s=-s,a=C.length):(r=C,n=y,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)+Ee(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ee(-i-1)+o,r&&(n=r-s)>0&&(o+=Ee(n))):i>=s?(o+=Ee(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ee(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ee(n))),e.s<0?"-"+o:o}function Yr(e,t){if(e.length>t)return e.length=t,!0}function rn(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(Ae+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 zr(s,o.toString())}else if(typeof o!="string")throw Error(Ae+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,Uo.test(o))zr(s,o);else throw Error(Ae+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=rn,i.config=i.set=Bo,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(Ae+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ae+r+": "+n);return this}var Fe,No,fr,U,re,Ae,dr,Ne,Re,Uo,Z,j,N,Xr,Ot,R,ge,fr,kt,nn=se(()=>{"use strict";c();m();p();d();f();l();Fe=1e9,No={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},U=!0,re="[DecimalError] ",Ae=re+"Invalid argument: ",dr=re+"Exponent out of range: ",Ne=Math.floor,Re=Math.pow,Uo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,j=1e7,N=7,Xr=9007199254740991,Ot=Ne(Xr/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 ge(this,new this.constructor(e))};R.dividedToIntegerBy=R.idiv=function(e){var t=this,r=t.constructor;return D(ge(t,new r(e),0,1),r.precision)};R.equals=R.eq=function(e){return!this.cmp(e)};R.exponent=function(){return V(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=ge(et(r,o),et(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?tn(t,e):Zr(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=ge(r,e,0,1).times(e),U=!0,r.minus(t)):D(new n(r),i)};R.naturalExponential=R.exp=function(){return en(this)};R.naturalLogarithm=R.ln=function(){return et(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?Zr(t,e):tn(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(Ae+e);if(t=V(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=V(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=Ne((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(ge(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,y,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,y=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%j|0,t=a/j|0;o[i]=(o[i]+t)%j|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,Fe),t===void 0?t=n.rounding:le(t,0,8),D(r,e+V(r)+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Se(n,!0):(le(e,0,Fe),t===void 0?t=i.rounding:le(t,0,8),n=D(new i(n),e+1,t),r=Se(n,!0,e+1)),r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Se(i):(le(e,0,Fe),t===void 0?t=o.rounding:le(t,0,8),n=D(new o(i),e+V(i)+1,t),r=Se(n.abs(),!1,e+V(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};R.toInteger=R.toint=function(){var e=this,t=e.constructor;return D(new t(e),V(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,y=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)<=Xr){for(i=new u(Z),t=Math.ceil(n/N+4),U=!1;r%2&&(i=i.times(a),Yr(i.d,t)),r=Ne(r/2),r!==0;)a=a.times(a),Yr(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(et(a,n+y)),U=!0,i=en(i),i.s=o,i};R.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=V(i),n=Se(i,r<=o.toExpNeg||r>=o.toExpPos)):(le(e,1,Fe),t===void 0?t=o.rounding:le(t,0,8),i=D(new o(i),e,t),r=V(i),n=Se(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,Fe),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=V(e),r=e.constructor;return Se(e,t<=r.toExpNeg||t>=r.toExpPos)};ge=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%j|0,s=o/j|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,y,T,C,O,A,M,S,L,ne,z,Ie,k,Ce,ur,ie,Tt,Ct=n.constructor,Po=n.s==i.s?1:-1,oe=n.d,B=i.d;if(!n.s)return new Ct(n);if(!i.s)throw Error(re+"Division by zero");for(u=n.e-i.e,ie=B.length,Ce=oe.length,A=new Ct(Po),M=A.d=[],y=0;B[y]==(oe[y]||0);)++y;if(B[y]>(oe[y]||0)&&--u,o==null?z=o=Ct.precision:s?z=o+(V(n)-V(i))+1:z=o,z<0)return new Ct(0);if(z=z/N+2|0,y=0,ie==1)for(T=0,B=B[0],z++;(y1&&(B=e(B,T),oe=e(oe,T),ie=B.length,Ce=oe.length),k=ie,S=oe.slice(0,ie),L=S.length;L=j/2&&++ur;do T=0,a=t(B,S,ie,L),a<0?(ne=S[0],ie!=L&&(ne=ne*j+(S[1]||0)),T=ne/ur|0,T>1?(T>=j&&(T=j-1),C=e(B,T),O=C.length,L=S.length,a=t(C,S,O,L),a==1&&(T--,r(C,ie{"use strict";nn();v=class extends kt{static isDecimal(t){return t instanceof kt}static random(t=20){{let n=crypto.getRandomValues(new Uint8Array(t)).reduce((i,o)=>i+o,"");return new kt(`0.${n.slice(0,t)}`)}}},ue=v});function $o(){return!1}var Vo,qo,ln,un=se(()=>{"use strict";c();m();p();d();f();l();Vo={},qo={existsSync:$o,promises:Vo},ln=qo});function Ko(...e){return e.join("/")}function Ho(...e){return e.join("/")}var vn,zo,Yo,rt,Tn=se(()=>{"use strict";c();m();p();d();f();l();vn="/",zo={sep:vn},Yo={resolve:Ko,posix:zo,join:Ho,sep:vn},rt=Yo});var _t,Rn=se(()=>{"use strict";c();m();p();d();f();l();_t=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 Sn=_e((Mc,An)=>{"use strict";c();m();p();d();f();l();An.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 Mn=_e((Jc,kn)=>{"use strict";c();m();p();d();f();l();kn.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 In=_e((Xc,Ln)=>{"use strict";c();m();p();d();f();l();var ns=Mn();Ln.exports=e=>typeof e=="string"?e.replace(ns(),""):e});var Nn=_e((Sf,as)=>{as.exports={name:"@prisma/engines-version",version:"5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4c784e32044a8a016d99474bd02a3b6123742169"},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 Un=_e(()=>{"use strict";c();m();p();d();f();l()});var Br=_e((vC,Oi)=>{"use strict";c();m();p();d();f();l();Oi.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;swr,Decimal:()=>ue,Extensions:()=>gr,MetricsClient:()=>$e,NotFoundError:()=>ye,PrismaClientInitializationError:()=>I,PrismaClientKnownRequestError:()=>Q,PrismaClientRustPanicError:()=>be,PrismaClientUnknownRequestError:()=>J,PrismaClientValidationError:()=>G,Public:()=>hr,Sql:()=>X,defineDmmfProperty:()=>Fn,empty:()=>$n,getPrismaClient:()=>wo,getRuntime:()=>ve,join:()=>Bn,makeStrictEnum:()=>Eo,objectEnumValues:()=>Nt,raw:()=>kr,sqltag:()=>Mr,warnEnvConflicts:()=>void 0,warnOnce:()=>st});module.exports=So(Wa);c();m();p();d();f();l();var gr={};At(gr,{defineExtension:()=>on,getExtensionContext:()=>sn});c();m();p();d();f();l();c();m();p();d();f();l();function on(e){return typeof e=="function"?e:t=>t.$extends(e)}c();m();p();d();f();l();function sn(e){return e}var hr={};At(hr,{validator:()=>an});c();m();p();d();f();l();c();m();p();d();f();l();function an(...e){return t=>t}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var yr,cn,mn,pn,dn=!0;typeof g<"u"&&({FORCE_COLOR:yr,NODE_DISABLE_COLORS:cn,NO_COLOR:mn,TERM:pn}=g.env||{},dn=g.stdout&&g.stdout.isTTY);var jo={enabled:!cn&&mn==null&&pn!=="dumb"&&(yr!=null&&yr!=="0"||dn)};function F(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!jo.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Xl=F(0,0),Mt=F(1,22),Lt=F(2,22),Zl=F(3,23),fn=F(4,24),eu=F(7,27),tu=F(8,28),ru=F(9,29),nu=F(30,39),Ue=F(31,39),gn=F(32,39),hn=F(33,39),yn=F(34,39),iu=F(35,39),bn=F(36,39),ou=F(37,39),wn=F(90,39),su=F(90,39),au=F(40,49),lu=F(41,49),uu=F(42,49),cu=F(43,49),mu=F(44,49),pu=F(45,49),du=F(46,49),fu=F(47,49);c();m();p();d();f();l();var Qo=100,En=["green","yellow","blue","magenta","cyan","red"],It=[],xn=Date.now(),Jo=0,br=typeof g<"u"?g.env:{};globalThis.DEBUG??=br.DEBUG??"";globalThis.DEBUG_COLORS??=br.DEBUG_COLORS?br.DEBUG_COLORS==="true":!0;var tt={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 Go(e){let t={color:En[Jo++%En.length],enabled:tt.enabled(e),namespace:e,log:tt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&It.push([o,...n]),It.length>Qo&&It.shift(),tt.enabled(o)||i){let u=n.map(T=>typeof T=="string"?T:Wo(T)),y=`+${Date.now()-xn}ms`;xn=Date.now(),a(o,...u,y)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var wr=new Proxy(Go,{get:(e,t)=>tt[t],set:(e,t,r)=>tt[t]=r});function Wo(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 Pn(){It.length=0}var ee=wr;c();m();p();d();f();l();c();m();p();d();f();l();var Er=["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 Cn="library";function nt(e){let t=Xo();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":Cn)}function Xo(){let e=g.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 Oe;(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||={})})(Oe||={});var ot={};At(ot,{error:()=>ts,info:()=>es,log:()=>Zo,query:()=>rs,should:()=>On,tags:()=>it,warn:()=>xr});c();m();p();d();f();l();var it={error:Ue("prisma:error"),warn:hn("prisma:warn"),info:bn("prisma:info"),query:yn("prisma:query")},On={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function Zo(...e){console.log(...e)}function xr(e,...t){On.warn()&&console.warn(`${it.warn} ${e}`,...t)}function es(e,...t){console.info(`${it.info} ${e}`,...t)}function ts(e,...t){console.error(`${it.error} ${e}`,...t)}function rs(e,...t){console.log(`${it.query} ${e}`,...t)}c();m();p();d();f();l();function Dt(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 he(e,t){throw new Error(t)}c();m();p();d();f();l();function Pr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}c();m();p();d();f();l();var vr=(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 Tr(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{_n.has(e)||(_n.add(e),xr(t,...r))};c();m();p();d();f();l();var Q=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(Q,"PrismaClientKnownRequestError");var ye=class extends Q{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};K(ye,"NotFoundError");c();m();p();d();f();l();var I=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(I,"PrismaClientInitializationError");c();m();p();d();f();l();var be=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};K(be,"PrismaClientRustPanicError");c();m();p();d();f();l();var J=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(J,"PrismaClientUnknownRequestError");c();m();p();d();f();l();var G=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};K(G,"PrismaClientValidationError");c();m();p();d();f();l();var $e=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();c();m();p();d();f();l();function at(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Fn(e,t){let r=at(()=>is(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function is(e){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Cr(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}c();m();p();d();f();l();var Ft=Symbol(),Rr=new WeakMap,we=class{constructor(t){t===Ft?Rr.set(this,`Prisma.${this._getName()}`):Rr.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Rr.get(this)}},lt=class extends we{_getNamespace(){return"NullTypes"}},ut=class extends lt{};Ar(ut,"DbNull");var ct=class extends lt{};Ar(ct,"JsonNull");var mt=class extends lt{};Ar(mt,"AnyNull");var Nt={classes:{DbNull:ut,JsonNull:ct,AnyNull:mt},instances:{DbNull:new ut(Ft),JsonNull:new ct(Ft),AnyNull:new mt(Ft)}};function Ar(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}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 Sr=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}},Or=e=>{let t=new Sr,r=ke(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:ke(t,e.queryRaw.bind(e)),executeRaw:ke(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>os(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=ss(t,e.getConnectionInfo.bind(e))),n},os=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:ke(e,t.queryRaw.bind(t)),executeRaw:ke(e,t.executeRaw.bind(t)),commit:ke(e,t.commit.bind(t)),rollback:ke(e,t.rollback.bind(t))});function ke(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return pt({kind:"GenericJs",id:i})}}}function ss(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return pt({kind:"GenericJs",id:i})}}}var bo=De(Nn());var mO=De(Un());Rn();un();Tn();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 Ut={enumerable:!0,configurable:!0,writable:!0};function Bt(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Ut,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Vn=Symbol.for("nodejs.util.inspect.custom");function me(e,t){let r=ls(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=qn(Reflect.ownKeys(o),r),a=qn(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?{...Ut,...u?.getPropertyDescriptor(s)}:Ut:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[Vn]=function(){let o={...this};return delete o[Vn],o},i}function ls(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 qn(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}c();m();p();d();f();l();function Ve(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}c();m();p();d();f();l();function $t(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}c();m();p();d();f();l();c();m();p();d();f();l();var qe=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();function jn(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 Vt(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();var ft=class{constructor(t,r,n,i,o){this.modelName=t,this.name=r,this.typeName=n,this.isList=i,this.isEnum=o}_toGraphQLInputType(){let t=this.isList?"List":"",r=this.isEnum?"Enum":"";return`${t}${r}${this.typeName}FieldRefInput<${this.modelName}>`}};function Je(e){return e instanceof ft}c();m();p();d();f();l();c();m();p();d();f();l();var qt=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},Qn={bold:Mt,red:Ue,green:gn,dim:Lt,enabled:!0},Ge={write(e){e.writeLine(",")}};c();m();p();d();f();l();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)))})}};c();m();p();d();f();l();var xe=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var We=class extends xe{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new qt(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(Ge,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};c();m();p();d();f();l();var Jn=": ",Jt=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()+Jn.length}write(t){let r=new pe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Jn).write(this.value)}};c();m();p();d();f();l();var Ke=class e extends xe{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 We&&(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 pe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(Ge,[...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 xe{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 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 He(e){return new Lr(Gn(e))}function Gn(e){let t=new Ke;for(let[r,n]of Object.entries(e)){let i=new Jt(r,Wn(n));t.addField(i)}return t}function Wn(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=Vt(e)?e.toISOString():"Invalid Date";return new W(`new Date("${t}")`)}return e instanceof we?new W(`Prisma.${e._getName()}`):Je(e)?new W(`prisma.${jn(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?cs(e):typeof e=="object"?Gn(e):new W(Object.prototype.toString.call(e))}function cs(e){let t=new We;for(let r of e)t.addItem(Wn(r));return t}function Gt(e,t){let r=t==="pretty"?Qn:Qt,n=e.renderAllMessages(r),i=new qe(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Kn(e){if(e===void 0)return"";let t=He(e);return new qe(0,{colors:Qt}).write(t).toString()}c();m();p();d();f();l();var ms="P2037";function Wt({error:e,user_facing_error:t},r,n){return t.error_code?new Q(ps(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new J(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function ps(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===ms&&(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 Ir=class{getLocation(){return null}};function Pe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Ir}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var Hn={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function ze(e={}){let t=fs(e);return Object.entries(t).reduce((n,[i,o])=>(Hn[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function fs(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Kt(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function zn(e,t){let r=Kt(e);return t({action:"aggregate",unpacker:r,argsMapper:ze})(e)}c();m();p();d();f();l();function gs(e={}){let{select:t,...r}=e;return typeof t=="object"?ze({...r,_count:t}):ze({...r,_count:{_all:!0}})}function hs(e={}){return typeof e.select=="object"?t=>Kt(e)(t)._count:t=>Kt(e)(t)._count._all}function Yn(e,t){return t({action:"count",unpacker:hs(e),argsMapper:gs})(e)}c();m();p();d();f();l();function ys(e={}){let t=ze(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 bs(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Xn(e,t){return t({action:"groupBy",unpacker:bs(e),argsMapper:ys})(e)}function Zn(e,t,r){if(t==="aggregate")return n=>zn(n,r);if(t==="count")return n=>Yn(n,r);if(t==="groupBy")return n=>Xn(n,r)}c();m();p();d();f();l();function ei(e,t){let r=t.fields.filter(i=>!i.relationName),n=vr(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")},...Bt(Object.keys(n))})}c();m();p();d();f();l();c();m();p();d();f();l();var ti=e=>Array.isArray(e)?e:e.split("."),_r=(e,t)=>ti(t).reduce((r,n)=>r&&r[n],e),ri=(e,t,r)=>ti(t).reduceRight((n,i,o,s)=>Object.assign({},_r(e,s.slice(0,o)),{[i]:n}),r);function ws(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Es(e,t,r){return t===void 0?e??{}:ri(t,r,e||!0)}function Dr(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((u,y)=>({...u,[y.name]:y}),{});return u=>{let y=Pe(e._errorFormat),T=ws(n,i),C=Es(u,o,T),O=r({dataPath:T,callsite:y})(C),A=xs(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 Dr(e,...ne,...z)},...Bt([...A,...Object.getOwnPropertyNames(O)])})}}function xs(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}c();m();p();d();f();l();c();m();p();d();f();l();var Ps=De(Sn());var vs={red:Ue,gray:wn,dim:Lt,bold:Mt,underline:fn,highlightSource:e=>e.highlight()},Ts={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Cs({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Rs({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(As(t))),i){a.push("");let y=[i.toString()];o&&(y.push(o),y.push(s.dim(")"))),a.push(y.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function As(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function Ye(e){let t=e.showColors?vs:Ts,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Cs(e),Rs(r,t)}function ni(e,t,r,n){return e===Oe.ModelAction.findFirstOrThrow||e===Oe.ModelAction.findUniqueOrThrow?Ss(t,r,n):n}function Ss(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=Ye({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new G(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof Q&&o.code==="P2025"?new ye(`No ${e} found`,t):o})}}c();m();p();d();f();l();function de(e){return e.replace(/^./,t=>t.toLowerCase())}var Os=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],ks=["aggregate","count","groupBy"];function Fr(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Ms(e,t),Is(e,t),dt(r),H("name",()=>t),H("$name",()=>t),H("$parent",()=>e._appliedParent)];return me({},n)}function Ms(e,t){let r=de(t),n=Object.keys(Oe.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=u=>e._request(u);s=ni(o,t,e._clientVersion,s);let a=u=>y=>{let T=Pe(e._errorFormat);return e._createPrismaPromise(C=>{let O={args:y,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:C,callsite:T};return s({...O,...u})})};return Os.includes(o)?Dr(e,t,a):Ls(i)?Zn(e,i,a):a({})}}}function Ls(e){return ks.includes(e)}function Is(e,t){return Me(H("fields",()=>{let r=e._runtimeDataModel.models[t];return ei(t,r)}))}c();m();p();d();f();l();function ii(e){return e.replace(/^./,t=>t.toUpperCase())}var Nr=Symbol();function gt(e){let t=[_s(e),H(Nr,()=>e),H("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(dt(r)),me(e,t)}function _s(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(de),n=[...new Set(t.concat(r))];return Me({getKeys(){return n},getPropertyValue(i){let o=ii(i);if(e._runtimeDataModel.models[o]!==void 0)return Fr(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Fr(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function oi(e){return e[Nr]?e[Nr]:e}function si(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)}c();m();p();d();f();l();c();m();p();d();f();l();function ai({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 y=u.needs.filter(T=>n[T]);y.length>0&&a.push(Ve(y))}else if(r){if(!r[u.name])continue;let y=u.needs.filter(T=>!r[T]);y.length>0&&a.push(Ve(y))}Ds(e,u.needs)&&s.push(Fs(u,me(e,s)))}return s.length>0||a.length>0?me(e,[...s,...a]):e}function Ds(e,t){return t.every(r=>Pr(e,r))}function Fs(e,t){return Me(H(e.name,()=>e.compute(t)))}c();m();p();d();f();l();function Ht({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 y=typeof s=="object"?s:{};t[o]=Ht({visitor:i,result:t[o],args:y,modelName:u.type,runtimeDataModel:n})}}function ui({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Ht({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,u,y)=>{let T=de(u);return ai({result:a,modelName:T,select:y.select,omit:y.select?void 0:{...o?.[T],...y.omit},extensions:n})}})}c();m();p();d();f();l();c();m();p();d();f();l();l();function ci(e){if(e instanceof X)return Ns(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:ci(t.args??{}),__internalParams:t,query:(s,a=t)=>{let u=a.customDataProxyFetch;return a.customDataProxyFetch=hi(o,u),a.args=s,pi(e,a,r,n+1)}})})}function di(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 pi(e,t,s)}function fi(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=hi(i,u),gi(a,t,r+1,n)}})}var mi=e=>e;function hi(e=mi,t=mi){return r=>e(t(r))}c();m();p();d();f();l();c();m();p();d();f();l();function bi(e,t,r){let n=de(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Us({...e,...yi(t.name,e,t.result.$allModels),...yi(t.name,e,t.result[n])})}function Us(e){let t=new ce,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 yi(e,t,r){return r?Be(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Bs(t,o,i)})):{}}function Bs(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function wi(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 Ei(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 zt=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new ce;this.modelExtensionsCache=new ce;this.queryCallbacksCache=new ce;this.clientExtensions=at(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=at(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>bi(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=de(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()}},Yt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new zt(t))}isEmpty(){return this.head===void 0}append(t){return new e(new zt(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();var xi=ee("prisma:client"),Pi={Vercel:"vercel","Netlify CI":"netlify"};function vi({postinstall:e,ciName:t,clientVersion:r}){if(xi("checkPlatformCaching:postinstall",e),xi("checkPlatformCaching:ciName",t),e===!0&&t&&t in Pi){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/${Pi[t]}-build`;throw console.error(n),new I(n,r)}}c();m();p();d();f();l();function Ti(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 $s="Cloudflare-Workers",Vs="node";function Ci(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===$s?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Vs?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var qs={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 ve(){let e=Ci();return{id:e,prettyName:qs[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}c();m();p();d();f();l();c();m();p();d();f();l();function Xt({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 ve().id==="workerd"?new I(`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 I(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new I("error: Missing URL environment variable, value, or override.",n);return i}c();m();p();d();f();l();c();m();p();d();f();l();function Ri(e){if(e?.kind==="itx")return e.options.id}c();m();p();d();f();l();var Ur,Ai={async loadLibrary(e){let{clientVersion:t,adapter:r,engineWasm:n}=e;if(r===void 0)throw new I(`The \`adapter\` option for \`PrismaClient\` is required in this context (${ve().prettyName})`,t);if(n===void 0)throw new I("WASM engine was unexpectedly `undefined`",t);Ur===void 0&&(Ur=(async()=>{let o=n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new I("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 Ur;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var js="P2036",fe=ee("prisma:client:libraryEngine");function Qs(e){return e.item_type==="query"&&"query"in e}function Js(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var ET=[...Er,"native"],yt=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=r??Ai,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(Gs(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new Q(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(fe("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.loadEngine(),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new J("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new J("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&&fe("Using driver adapter: %O",r),this.engine=new this.QueryEngineConstructor({datamodel:this.datamodel,env:g.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 I(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",Qs(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(Js(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 fe(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{fe("library starting");try{let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,fe("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(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 fe("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),fe("library stopping");let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,fe("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}){fe(`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 J(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s,elapsed:0}}catch(s){if(s instanceof I)throw s;s.code==="GenericFailure"&&s.message?.startsWith("PANIC:");let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new J(`${a.message} +${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){fe("requestBatch");let i=$t(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),Ri(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new J(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:u}=s;if(Array.isArray(a))return a.map(y=>y.errors&&y.errors.length>0?this.loggerRustPanic??this.buildQueryError(y.errors[0]):{data:y,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:Wt(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===js&&this.config.adapter){let r=t.meta?.id;Dt(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return Dt(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 Gs(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}c();m();p();d();f();l();var bt="Accelerate has not been setup correctly. Make sure your client is using `.$extends(withAccelerate())`. See https://pris.ly/d/accelerate-getting-started",Zt=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 I(bt,this.config.clientVersion)}metrics(t){throw new I(bt,this.config.clientVersion)}request(t,r){throw new I(bt,this.config.clientVersion)}requestBatch(t,r){throw new I(bt,this.config.clientVersion)}applyPendingMigrations(){throw new I(bt,this.config.clientVersion)}};function Si({copyEngine:e=!0},t){let r;try{r=Xt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...g.env},clientVersion:t.clientVersion})}catch{}e&&r?.startsWith("prisma://")&&st("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=nt(t.generator),i=!!(r?.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o&&!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 G(u.join(` +`),{clientVersion:t.clientVersion})}if(o)return new yt(t);if(i)return new Zt(t);{let u=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${ve().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 G(u.join(` +`),{clientVersion:t.clientVersion})}throw new G("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}c();m();p();d();f();l();function er({generator:e}){return e?.previewFeatures??[]}c();m();p();d();f();l();c();m();p();d();f();l();function Xe(e){return e.substring(0,1).toLowerCase()+e.substring(1)}c();m();p();d();f();l();c();m();p();d();f();l();var _i=De(Br());c();m();p();d();f();l();function Li(e,t,r){let n=Ii(e),i=Ws(n),o=Hs(i);o?tr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Ii(e){return e.errors.flatMap(t=>t.kind==="Union"?Ii(t):[t])}function Ws(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:Ks(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Ks(e,t){return[...new Set(e.concat(t))]}function Hs(e){return Tr(e,(t,r)=>{let n=ki(t),i=ki(r);return n!==i?n-i:Mi(t)-Mi(r)})}function ki(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Mi(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();var wt=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(Ge,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function tr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":zs(e,t);break;case"IncludeOnScalar":Ys(e,t);break;case"EmptySelection":Xs(e,t,r);break;case"UnknownSelectionField":ra(e,t);break;case"UnknownArgument":na(e,t);break;case"UnknownInputField":ia(e,t);break;case"RequiredArgumentMissing":oa(e,t);break;case"InvalidArgumentType":sa(e,t);break;case"InvalidArgumentValue":aa(e,t);break;case"ValueTooLarge":la(e,t);break;case"SomeFieldsMissing":ua(e,t);break;case"TooManyFieldsGiven":ca(e,t);break;case"Union":Li(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function zs(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 Ys(e,t){let[r,n]=Et(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)}. ${xt(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Xs(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Zs(e,t,i);return}if(n.hasField("select")){ea(e,t);return}}if(r?.[Xe(e.outputType.name)]){ta(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Zs(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 ea(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Ni(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${xt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function ta(e,t){let r=new wt;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]=Et(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let u=a?.value.asObject()??new Ke;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 ra(e,t){let[r,n]=Et(e.selectionPath),i=t.arguments.getDeepSubSelectionValue(r)?.asObject(),o;if(i){let s=i.getFieldValue("select")?.asObject(),a=i.getFieldValue("include")?.asObject(),u=i.getFieldValue("omit")?.asObject();s?.hasField(n)?(o="select",s.getField(n)?.markAsError(),Ni(s,e.outputType)):a?.hasField(n)?(o="include",a.getField(n)?.markAsError(),ma(a,e.outputType)):u?.hasField(n)&&(o="omit",u.getField(n)?.markAsError(),pa(u,e.outputType))}t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(xt(s)),a.join(" ")})}function na(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),da(n,e.arguments)),t.addErrorMessage(i=>Di(i,r,e.arguments.map(o=>o.name)))}function ia(e,t){let[r,n]=Et(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Ui(o,e.inputType)}t.addErrorMessage(o=>Di(o,n,e.inputType.fields.map(s=>s.name)))}function Di(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=ga(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(xt(e)),n.join(" ")}function oa(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]=Et(e.argumentPath),s=new wt,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(Fi).join(" | ");a.addSuggestion(new te(o,u).makeRequired())}}function Fi(e){return e.kind==="list"?`${Fi(e.elementType)}[]`:e.name}function sa(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=rr("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 aa(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=rr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function la(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 ua(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&&Ui(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")} ${rr("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(xt(i)),o.join(" ")})}function ca(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 ${rr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Ni(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new te(r.name,"true"))}function ma(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new te(r.name,"true"))}function pa(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new te(r.name,"true"))}function da(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new te(r.name,r.typeNames.join(" | ")))}function Ui(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 Et(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function xt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function rr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var fa=3;function ga(e,t){let r=1/0,n;for(let i of t){let o=(0,_i.default)(e,i);o>fa||o({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?.[Xe(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:he(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 qi=e=>({command:e});c();m();p();d();f();l();c();m();p();d();f();l();var ji=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);c();m();p();d();f();l();l();function vt(e){try{return Qi(e,"fast")}catch{return Qi(e,"slow")}}function Qi(e,t){return JSON.stringify(e.map(r=>Ca(r,t)))}function Ca(e,t){return 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")}:Ra(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:b.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Gi(e):e}function Ra(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Gi(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ji);let t={};for(let r of Object.keys(e))t[r]=Ji(e[r]);return t}function Ji(e){return typeof e=="bigint"?e.toString():Gi(e)}var Aa=/^(\s*alter\s)/i,Wi=ee("prisma:client");function Vr(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Aa.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 qr=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:vt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:vt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:vt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=ji(r),i={values:vt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Wi(`prisma.${e}(${n}, ${i.values})`):Wi(`prisma.${e}(${n})`),{query:n,parameters:i}},Ki={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new X(t,r)}},Hi={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};c();m();p();d();f();l();function jr(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=zi(r(o)):zi(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 zi(e){return typeof e.then=="function"?e:Promise.resolve(e)}c();m();p();d();f();l();var Yi={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Qr=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??Yi}};function Xi(e){return e.includes("tracing")?new Qr:Yi}c();m();p();d();f();l();function Zi(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();var Sa=["$connect","$disconnect","$on","$transaction","$use","$extends"],eo=Sa;c();m();p();d();f();l();function to(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 ir=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 io=De(In());c();m();p();d();f();l();function or(e){return typeof e.batchRequestIdx=="number"}c();m();p();d();f();l();l();function sr(e){return e===null?e:Array.isArray(e)?e.map(sr):typeof e=="object"?Oa(e)?ka(e):Be(e,sr):e}function Oa(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function ka({$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:he(t,"Unknown tagged value")}}c();m();p();d();f();l();function ro(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Jr(e.query.arguments)),t.push(Jr(e.query.selection)),t.join("")}function Jr(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Jr(n)})`:r}).join(" ")})`}c();m();p();d();f();l();var Ma={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 Gr(e){return Ma[e]}c();m();p();d();f();l();var ar=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,g.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 no(e){let t=[],r=La(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),y=n.some(C=>Gr(C.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:u,transaction:_a(o),containsWrite:y,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"?oo(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Gr(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:ro(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 g.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(Ia(t),Da(t,i)||t instanceof ye)throw t;if(t instanceof Q&&Fa(t)){let y=so(t.meta);nr({args:o,errors:[y],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let u=t.message;if(n&&(u=Ye({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:u})),u=this.sanitizeMessage(u),t.code){let y=s?{modelName:s,...t.meta}:t.meta;throw new Q(u,{code:t.code,clientVersion:this.client._clientVersion,meta:y,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new be(u,this.client._clientVersion);if(t instanceof J)throw new J(u,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof I)throw new I(u,this.client._clientVersion);if(t instanceof be)throw new be(u,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,io.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(y=>y!=="select"&&y!=="include"),a=_r(o,s),u=i==="queryRaw"?no(a):sr(a);return n?n(u):u}get[Symbol.toStringTag](){return"RequestHandler"}};function _a(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:oo(e)};he(e,"Unknown transaction kind")}}function oo(e){return{id:e.id,payload:e.payload}}function Da(e,t){return or(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Fa(e){return e.code==="P2009"||e.code==="P2012"}function so(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(so)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}c();m();p();d();f();l();var ao="5.18.0";var lo=ao;c();m();p();d();f();l();var fo=De(Br());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 uo=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],co=["pretty","colorless","minimal"],mo=["info","query","warn","error"],Ua={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=Ze(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(!er(t).includes("driverAdapters"))throw new _('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(nt()==="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(!co.includes(e)){let t=Ze(e,co);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"&&!mo.includes(r)){let n=Ze(r,mo);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=Ze(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=$a(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(y=>y.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 _(Va(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=Ze(r,t);throw new _(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function go(e,t){for(let[r,n]of Object.entries(e)){if(!uo.includes(r)){let i=Ze(r,uo);throw new _(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Ua[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 Ze(e,t){if(t.length===0||typeof e!="string")return"";let r=Ba(e,t);return r?` Did you mean "${r}"?`:""}function Ba(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,fo.default)(e,i)}));r.sort((i,o)=>i.distanceXe(n)===t);if(r)return e[r]}function Va(e,t){let r=He(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}=Gt(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}c();m();p();d();f();l();function ho(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=y=>{o||(o=!0,r(y))};for(let y=0;y{n[y]=T,a()},T=>{if(!or(T)){u(T);return}T.batchRequestIdx===y?u(T):(i||(i=T),a())})})}var Te=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var qa={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},ja=Symbol.for("prisma.client.transaction.id"),Qa={id:0,nextId(){return++this.id}};function wo(e){class t{constructor(n){this._originalClient=this;this._middlewares=new ir;this._createPrismaPromise=jr();this.$extends=si;e=n?.__internal?.configOverride?.(e)??e,vi(e),n&&go(n,e);let i=new _t().on("error",()=>{});this._extensions=Yt.empty(),this._previewFeatures=er(e),this._clientVersion=e.clientVersion??lo,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Xi(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&rt.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&rt.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=Or(n.adapter);let u=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==u)throw new I(`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 I("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??{},y=u.__internal??{},T=y.debug===!0;T&&ee.enable("prisma:client");let C=rt.resolve(e.dirname,e.relativePath);ln.existsSync(C)||(C=e.dirname),Te("dirname",e.dirname),Te("relativePath",e.relativePath),Te("cwd",C);let O=y.engine||{};if(u.errorFormat?this._errorFormat=u.errorFormat:g.env.NODE_ENV==="production"?this._errorFormat="minimal":g.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:rt.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&&to(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:Ti(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:Xt,getBatchRequestPayload:$t,prismaGraphQLToJSError:Wt,PrismaClientUnknownRequestError:J,PrismaClientInitializationError:I,PrismaClientKnownRequestError:Q,debug:ee("prisma:client:accelerateEngine"),engineVersion:bo.version,clientVersion:e.clientVersion}},Te("clientVersion",e.clientVersion),this._engine=Si(e,this._engineConfig),this._requestHandler=new lr(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=>{ot.log(`${ot.tags[M]??""}`,S.message||S.query)})}this._metrics=new $e(this._engine)}catch(u){throw u.clientVersion=this._clientVersion,u}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{Pn()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:qr({clientMethod:i,activeProvider:a}),callsite:Pe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=yo(n,i);return Vr(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new G("`$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=>(Vr(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new G(`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:qi,callsite:Pe(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:qr({clientMethod:i,activeProvider:a}),callsite:Pe(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",...yo(n,i));throw new G("`$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})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Qa.nextId(),s=Zi(n.length),a=n.map((u,y)=>{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:y,isolationLevel:T,lock:s};return u.requestTransaction?.(C)??u});return ho(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 y={kind:"itx",...a};u=await n(this._createItxClient(y)),await this._engine.transaction("commit",o,a)}catch(y){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),y}return u}_createItxClient(n){return gt(me(oi(this),[H("_appliedParent",()=>this._appliedParent._createItxClient(n)),H("_createPrismaPromise",()=>jr(n)),H(ja,()=>n.id),Ve(eo)]))}$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??qa,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 y=>{let T=this._middlewares.get(++a);if(T)return this._tracingHelper.runInChildSpan(s.middleware,L=>T(y,ne=>(L?.end(),u(ne))));let{runInTransaction:C,args:O,...A}=y,M={...n,...A};O&&(M.args=i.middlewareArgsToRequestArgs(O)),n.transaction!==void 0&&C===!1&&delete M.transaction;let S=await di(this,M);return M.model?ui({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:y,transaction:T,unpacker:C,otelParentCtx:O,customDataProxyFetch:A}){try{n=y?y(n):n;let M={name:"serialize"},S=this._tracingHelper.runInChildSpan(M,()=>Bi({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")&&(Te("Prisma Client call:"),Te(`prisma.${i}(${Kn(n)})`),Te("Generated request:"),Te(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 G("`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 yo(e,t){return Ja(e)?[new X(e,t),Ki]:[e,Hi]}function Ja(e){return Array.isArray(e)&&Array.isArray(e.raw)}c();m();p();d();f();l();var Ga=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Eo(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Ga.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,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); +//# sourceMappingURL=wasm.js.map diff --git a/experiments/mongodb/prisma/generated/client/wasm.d.ts b/experiments/mongodb/prisma/generated/client/wasm.d.ts new file mode 100644 index 000000000..34c616106 --- /dev/null +++ b/experiments/mongodb/prisma/generated/client/wasm.d.ts @@ -0,0 +1 @@ +export * from './index' \ No newline at end of file diff --git a/experiments/mongodb/prisma/generated/client/wasm.js b/experiments/mongodb/prisma/generated/client/wasm.js new file mode 100644 index 000000000..fd1885a67 --- /dev/null +++ b/experiments/mongodb/prisma/generated/client/wasm.js @@ -0,0 +1,181 @@ + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + Decimal, + objectEnumValues, + makeStrictEnum, + Public, + getRuntime, +} = require('./runtime/index-browser.js') + + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: 5.18.0 + * Query Engine version: 4c784e32044a8a016d99474bd02a3b6123742169 + */ +Prisma.prismaVersion = { + client: "5.18.0", + engine: "4c784e32044a8a016d99474bd02a3b6123742169" +} + +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.PostScalarFieldEnum = { + id: 'id', + slug: 'slug', + title: 'title', + body: 'body', + authorId: 'authorId' +}; + +exports.Prisma.CommentScalarFieldEnum = { + id: 'id', + postId: 'postId', + comment: 'comment' +}; + +exports.Prisma.UserScalarFieldEnum = { + id: 'id', + email: 'email', + age: 'age' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + + +exports.Prisma.ModelName = { + Post: 'Post', + Comment: 'Comment', + User: 'User' +}; + +/** + * 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/experiments/mongodb/prisma/generated/type-graphql/dmmf.json b/experiments/mongodb/prisma/generated/type-graphql/dmmf.json index c26ef3712..740d65b1b 100644 --- a/experiments/mongodb/prisma/generated/type-graphql/dmmf.json +++ b/experiments/mongodb/prisma/generated/type-graphql/dmmf.json @@ -319,6 +319,58 @@ "uniqueFields": [], "uniqueIndexes": [] } + ], + "indexes": [ + { + "model": "Post", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "id" + } + ] + }, + { + "model": "Post", + "type": "unique", + "isDefinedOnField": true, + "fields": [ + { + "name": "slug" + } + ] + }, + { + "model": "Comment", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "id" + } + ] + }, + { + "model": "User", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "id" + } + ] + }, + { + "model": "User", + "type": "unique", + "isDefinedOnField": true, + "fields": [ + { + "name": "email" + } + ] + } ] }, "schema": { diff --git a/experiments/mongodb/prisma/generated/type-graphql/enhance.ts b/experiments/mongodb/prisma/generated/type-graphql/enhance.ts index 20d87b06c..aad3bd328 100644 --- a/experiments/mongodb/prisma/generated/type-graphql/enhance.ts +++ b/experiments/mongodb/prisma/generated/type-graphql/enhance.ts @@ -138,7 +138,7 @@ export function applyResolversEnhanceMap( resolversEnhanceMap: ResolversEnhanceMap, ) { const mutationOperationPrefixes = [ - "createOne", "createMany", "deleteOne", "updateOne", "deleteMany", "updateMany", "upsertOne" + "createOne", "createMany", "createManyAndReturn", "deleteOne", "updateOne", "deleteMany", "updateMany", "upsertOne" ]; for (const resolversEnhanceMapKey of Object.keys(resolversEnhanceMap)) { const modelName = resolversEnhanceMapKey as keyof typeof resolversEnhanceMap; diff --git a/experiments/mongodb/prisma/generated/type-graphql/prisma-client-dmmf.json b/experiments/mongodb/prisma/generated/type-graphql/prisma-client-dmmf.json index c26ef3712..740d65b1b 100644 --- a/experiments/mongodb/prisma/generated/type-graphql/prisma-client-dmmf.json +++ b/experiments/mongodb/prisma/generated/type-graphql/prisma-client-dmmf.json @@ -319,6 +319,58 @@ "uniqueFields": [], "uniqueIndexes": [] } + ], + "indexes": [ + { + "model": "Post", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "id" + } + ] + }, + { + "model": "Post", + "type": "unique", + "isDefinedOnField": true, + "fields": [ + { + "name": "slug" + } + ] + }, + { + "model": "Comment", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "id" + } + ] + }, + { + "model": "User", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "id" + } + ] + }, + { + "model": "User", + "type": "unique", + "isDefinedOnField": true, + "fields": [ + { + "name": "email" + } + ] + } ] }, "schema": { diff --git a/experiments/postgres/generated-schema.graphql b/experiments/postgres/generated-schema.graphql index 43c9d5f5e..2a11ee1ad 100644 --- a/experiments/postgres/generated-schema.graphql +++ b/experiments/postgres/generated-schema.graphql @@ -204,7 +204,7 @@ input CategoryOrderByWithAggregationInput { slug: SortOrder } -input CategoryOrderByWithRelationAndSearchRelevanceInput { +input CategoryOrderByWithRelationInput { _relevance: CategoryOrderByRelevanceInput name: SortOrder number: SortOrder @@ -253,12 +253,66 @@ input CategoryWhereUniqueInput { slug: StringFilter } +type CreateManyAndReturnCreator { + id: Int! + name: String! +} + +type CreateManyAndReturnDirector { + firstName: String! + lastName: String! +} + +type CreateManyAndReturnHidden { + id: String! + name: String +} + +type CreateManyAndReturnMainUser { + age: Int! + aliases: [String!] + amount: Float! + balance: Float! + email: String! + grades: [Int!] + id: Int! + name: String + role: Role! +} + +type CreateManyAndReturnMovie { + director: Director! + directorFirstName: String! + directorLastName: String! + title: String! +} + +type CreateManyAndReturnNativeTypeModel { + bigInt: BigInt + byteA: Byte + decimal: Decimal + id: Int! +} + +type CreateManyAndReturnPatient { + email: String! + firstName: String! + lastName: String! +} + +type CreateManyAndReturnProblem { + creator(where: CreatorWhereInput): Creator + creatorId: Int + id: Int! + problemText: String! +} + type Creator { _count: CreatorCount id: ID! - likes(cursor: ProblemWhereUniqueInput, distinct: [ProblemScalarFieldEnum!], orderBy: [ProblemOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: ProblemWhereInput): [Problem!]! + likes(cursor: ProblemWhereUniqueInput, distinct: [ProblemScalarFieldEnum!], orderBy: [ProblemOrderByWithRelationInput!], skip: Int, take: Int, where: ProblemWhereInput): [Problem!]! name: String! - problems(cursor: ProblemWhereUniqueInput, distinct: [ProblemScalarFieldEnum!], orderBy: [ProblemOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: ProblemWhereInput): [Problem!]! + problems(cursor: ProblemWhereUniqueInput, distinct: [ProblemScalarFieldEnum!], orderBy: [ProblemOrderByWithRelationInput!], skip: Int, take: Int, where: ProblemWhereInput): [Problem!]! } type CreatorAvgAggregate { @@ -393,7 +447,7 @@ input CreatorOrderByWithAggregationInput { name: SortOrder } -input CreatorOrderByWithRelationAndSearchRelevanceInput { +input CreatorOrderByWithRelationInput { _relevance: CreatorOrderByRelevanceInput id: SortOrder likes: ProblemOrderByRelationAggregateInput @@ -586,7 +640,7 @@ type Director { _count: DirectorCount firstName: String! lastName: String! - movies(cursor: MovieWhereUniqueInput, distinct: [MovieScalarFieldEnum!], orderBy: [MovieOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: MovieWhereInput): [Movie!]! + movies(cursor: MovieWhereUniqueInput, distinct: [MovieScalarFieldEnum!], orderBy: [MovieOrderByWithRelationInput!], skip: Int, take: Int, where: MovieWhereInput): [Movie!]! } type DirectorCount { @@ -683,7 +737,7 @@ input DirectorOrderByWithAggregationInput { lastName: SortOrder } -input DirectorOrderByWithRelationAndSearchRelevanceInput { +input DirectorOrderByWithRelationInput { _relevance: DirectorOrderByRelevanceInput firstName: SortOrder lastName: SortOrder @@ -897,7 +951,7 @@ input HiddenOrderByWithAggregationInput { name: SortOrderInput } -input HiddenOrderByWithRelationAndSearchRelevanceInput { +input HiddenOrderByWithRelationInput { _relevance: HiddenOrderByRelevanceInput id: SortOrder name: SortOrderInput @@ -1051,7 +1105,7 @@ type MainUser { age: Int! aliases: [String!]! amount: Float! - clientPosts(cursor: PostWhereUniqueInput, distinct: [PostScalarFieldEnum!], orderBy: [PostOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: PostWhereInput): [Post!]! + clientPosts(cursor: PostWhereUniqueInput, distinct: [PostScalarFieldEnum!], orderBy: [PostOrderByWithRelationInput!], skip: Int, take: Int, where: PostWhereInput): [Post!]! email: String! """renamed field doc""" @@ -1267,7 +1321,7 @@ input MainUserOrderByWithAggregationInput { role: SortOrder } -input MainUserOrderByWithRelationAndSearchRelevanceInput { +input MainUserOrderByWithRelationInput { _relevance: MainUserOrderByRelevanceInput accountBalance: SortOrder age: SortOrder @@ -1578,9 +1632,9 @@ input MovieOrderByWithAggregationInput { title: SortOrder } -input MovieOrderByWithRelationAndSearchRelevanceInput { +input MovieOrderByWithRelationInput { _relevance: MovieOrderByRelevanceInput - director: DirectorOrderByWithRelationAndSearchRelevanceInput + director: DirectorOrderByWithRelationInput directorFirstName: SortOrder directorLastName: SortOrder title: SortOrder @@ -1675,6 +1729,14 @@ input MovieWhereUniqueInput { } type Mutation { + createManyAndReturnCreator(data: [CreatorCreateManyInput!]!, skipDuplicates: Boolean): [CreateManyAndReturnCreator!]! + createManyAndReturnDirector(data: [DirectorCreateManyInput!]!, skipDuplicates: Boolean): [CreateManyAndReturnDirector!]! + createManyAndReturnHidden(data: [HiddenCreateManyInput!]!, skipDuplicates: Boolean): [CreateManyAndReturnHidden!]! + createManyAndReturnMainUser(data: [MainUserCreateManyInput!]!, skipDuplicates: Boolean): [CreateManyAndReturnMainUser!]! + createManyAndReturnMovie(data: [MovieCreateManyInput!]!, skipDuplicates: Boolean): [CreateManyAndReturnMovie!]! + createManyAndReturnNativeTypeModel(data: [NativeTypeModelCreateManyInput!]!, skipDuplicates: Boolean): [CreateManyAndReturnNativeTypeModel!]! + createManyAndReturnPatient(data: [PatientCreateManyInput!]!, skipDuplicates: Boolean): [CreateManyAndReturnPatient!]! + createManyAndReturnProblem(data: [ProblemCreateManyInput!]!, skipDuplicates: Boolean): [CreateManyAndReturnProblem!]! createManyCreator(data: [CreatorCreateManyInput!]!, skipDuplicates: Boolean): AffectedRowsOutput! createManyDirector(data: [DirectorCreateManyInput!]!, skipDuplicates: Boolean): AffectedRowsOutput! createManyHidden(data: [HiddenCreateManyInput!]!, skipDuplicates: Boolean): AffectedRowsOutput! @@ -1835,7 +1897,7 @@ input NativeTypeModelOrderByWithAggregationInput { id: SortOrder } -input NativeTypeModelOrderByWithRelationAndSearchRelevanceInput { +input NativeTypeModelOrderByWithRelationInput { bigInt: SortOrderInput byteA: SortOrderInput decimal: SortOrderInput @@ -2302,7 +2364,7 @@ input PatientOrderByWithAggregationInput { lastName: SortOrder } -input PatientOrderByWithRelationAndSearchRelevanceInput { +input PatientOrderByWithRelationInput { _relevance: PatientOrderByRelevanceInput email: SortOrder firstName: SortOrder @@ -2360,9 +2422,9 @@ type Post { authorId: Int! content: String createdAt: DateTimeISO! + isPublished: Boolean! kind: PostKind metadata: JSON! - published: Boolean! title: String! updatedAt: DateTimeISO! @@ -2617,13 +2679,13 @@ input PostOrderByWithAggregationInput { uuid: SortOrder } -input PostOrderByWithRelationAndSearchRelevanceInput { +input PostOrderByWithRelationInput { _relevance: PostOrderByRelevanceInput - author: MainUserOrderByWithRelationAndSearchRelevanceInput + author: MainUserOrderByWithRelationInput authorId: SortOrder content: SortOrderInput createdAt: SortOrder - editor: MainUserOrderByWithRelationAndSearchRelevanceInput + editor: MainUserOrderByWithRelationInput editorId: SortOrderInput kind: SortOrderInput metadata: SortOrder @@ -2822,7 +2884,7 @@ type Problem { creator(where: CreatorWhereInput): Creator creatorId: Int id: ID! - likedBy(cursor: CreatorWhereUniqueInput, distinct: [CreatorScalarFieldEnum!], orderBy: [CreatorOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: CreatorWhereInput): [Creator!]! + likedBy(cursor: CreatorWhereUniqueInput, distinct: [CreatorScalarFieldEnum!], orderBy: [CreatorOrderByWithRelationInput!], skip: Int, take: Int, where: CreatorWhereInput): [Creator!]! problemText: String! } @@ -2974,9 +3036,9 @@ input ProblemOrderByWithAggregationInput { problemText: SortOrder } -input ProblemOrderByWithRelationAndSearchRelevanceInput { +input ProblemOrderByWithRelationInput { _relevance: ProblemOrderByRelevanceInput - creator: CreatorOrderByWithRelationAndSearchRelevanceInput + creator: CreatorOrderByWithRelationInput creatorId: SortOrderInput id: SortOrder likedBy: CreatorOrderByRelationAggregateInput @@ -3119,38 +3181,38 @@ input ProblemWhereUniqueInput { } type Query { - aggregateCreator(cursor: CreatorWhereUniqueInput, orderBy: [CreatorOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: CreatorWhereInput): AggregateCreator! - aggregateDirector(cursor: DirectorWhereUniqueInput, orderBy: [DirectorOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: DirectorWhereInput): AggregateDirector! - aggregateHidden(cursor: HiddenWhereUniqueInput, orderBy: [HiddenOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: HiddenWhereInput): AggregateHidden! - aggregateMainUser(cursor: MainUserWhereUniqueInput, orderBy: [MainUserOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: MainUserWhereInput): AggregateMainUser! - aggregateMovie(cursor: MovieWhereUniqueInput, orderBy: [MovieOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: MovieWhereInput): AggregateMovie! - aggregateNativeTypeModel(cursor: NativeTypeModelWhereUniqueInput, orderBy: [NativeTypeModelOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: NativeTypeModelWhereInput): AggregateNativeTypeModel! - aggregatePatient(cursor: PatientWhereUniqueInput, orderBy: [PatientOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: PatientWhereInput): AggregatePatient! - aggregateProblem(cursor: ProblemWhereUniqueInput, orderBy: [ProblemOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: ProblemWhereInput): AggregateProblem! + aggregateCreator(cursor: CreatorWhereUniqueInput, orderBy: [CreatorOrderByWithRelationInput!], skip: Int, take: Int, where: CreatorWhereInput): AggregateCreator! + aggregateDirector(cursor: DirectorWhereUniqueInput, orderBy: [DirectorOrderByWithRelationInput!], skip: Int, take: Int, where: DirectorWhereInput): AggregateDirector! + aggregateHidden(cursor: HiddenWhereUniqueInput, orderBy: [HiddenOrderByWithRelationInput!], skip: Int, take: Int, where: HiddenWhereInput): AggregateHidden! + aggregateMainUser(cursor: MainUserWhereUniqueInput, orderBy: [MainUserOrderByWithRelationInput!], skip: Int, take: Int, where: MainUserWhereInput): AggregateMainUser! + aggregateMovie(cursor: MovieWhereUniqueInput, orderBy: [MovieOrderByWithRelationInput!], skip: Int, take: Int, where: MovieWhereInput): AggregateMovie! + aggregateNativeTypeModel(cursor: NativeTypeModelWhereUniqueInput, orderBy: [NativeTypeModelOrderByWithRelationInput!], skip: Int, take: Int, where: NativeTypeModelWhereInput): AggregateNativeTypeModel! + aggregatePatient(cursor: PatientWhereUniqueInput, orderBy: [PatientOrderByWithRelationInput!], skip: Int, take: Int, where: PatientWhereInput): AggregatePatient! + aggregateProblem(cursor: ProblemWhereUniqueInput, orderBy: [ProblemOrderByWithRelationInput!], skip: Int, take: Int, where: ProblemWhereInput): AggregateProblem! allMainUsers: [MainUser!]! allPosts: [Post!]! - categories(cursor: CategoryWhereUniqueInput, distinct: [CategoryScalarFieldEnum!], orderBy: [CategoryOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: CategoryWhereInput): [Category!]! + categories(cursor: CategoryWhereUniqueInput, distinct: [CategoryScalarFieldEnum!], orderBy: [CategoryOrderByWithRelationInput!], skip: Int, take: Int, where: CategoryWhereInput): [Category!]! creator(where: CreatorWhereUniqueInput!): Creator - creators(cursor: CreatorWhereUniqueInput, distinct: [CreatorScalarFieldEnum!], orderBy: [CreatorOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: CreatorWhereInput): [Creator!]! - customFindMainUsersWithArgs(cursor: MainUserWhereUniqueInput, distinct: [MainUserScalarFieldEnum!], orderBy: [MainUserOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: MainUserWhereInput): [MainUser!]! + creators(cursor: CreatorWhereUniqueInput, distinct: [CreatorScalarFieldEnum!], orderBy: [CreatorOrderByWithRelationInput!], skip: Int, take: Int, where: CreatorWhereInput): [Creator!]! + customFindMainUsersWithArgs(cursor: MainUserWhereUniqueInput, distinct: [MainUserScalarFieldEnum!], orderBy: [MainUserOrderByWithRelationInput!], skip: Int, take: Int, where: MainUserWhereInput): [MainUser!]! director(where: DirectorWhereUniqueInput!): Director - directors(cursor: DirectorWhereUniqueInput, distinct: [DirectorScalarFieldEnum!], orderBy: [DirectorOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: DirectorWhereInput): [Director!]! - findFirstCreator(cursor: CreatorWhereUniqueInput, distinct: [CreatorScalarFieldEnum!], orderBy: [CreatorOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: CreatorWhereInput): Creator - findFirstCreatorOrThrow(cursor: CreatorWhereUniqueInput, distinct: [CreatorScalarFieldEnum!], orderBy: [CreatorOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: CreatorWhereInput): Creator - findFirstDirector(cursor: DirectorWhereUniqueInput, distinct: [DirectorScalarFieldEnum!], orderBy: [DirectorOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: DirectorWhereInput): Director - findFirstDirectorOrThrow(cursor: DirectorWhereUniqueInput, distinct: [DirectorScalarFieldEnum!], orderBy: [DirectorOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: DirectorWhereInput): Director - findFirstHidden(cursor: HiddenWhereUniqueInput, distinct: [HiddenScalarFieldEnum!], orderBy: [HiddenOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: HiddenWhereInput): Hidden - findFirstHiddenOrThrow(cursor: HiddenWhereUniqueInput, distinct: [HiddenScalarFieldEnum!], orderBy: [HiddenOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: HiddenWhereInput): Hidden - findFirstMainUser(cursor: MainUserWhereUniqueInput, distinct: [MainUserScalarFieldEnum!], orderBy: [MainUserOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: MainUserWhereInput): MainUser - findFirstMainUserOrThrow(cursor: MainUserWhereUniqueInput, distinct: [MainUserScalarFieldEnum!], orderBy: [MainUserOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: MainUserWhereInput): MainUser - findFirstMovie(cursor: MovieWhereUniqueInput, distinct: [MovieScalarFieldEnum!], orderBy: [MovieOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: MovieWhereInput): Movie - findFirstMovieOrThrow(cursor: MovieWhereUniqueInput, distinct: [MovieScalarFieldEnum!], orderBy: [MovieOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: MovieWhereInput): Movie - findFirstNativeTypeModel(cursor: NativeTypeModelWhereUniqueInput, distinct: [NativeTypeModelScalarFieldEnum!], orderBy: [NativeTypeModelOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: NativeTypeModelWhereInput): NativeTypeModel - findFirstNativeTypeModelOrThrow(cursor: NativeTypeModelWhereUniqueInput, distinct: [NativeTypeModelScalarFieldEnum!], orderBy: [NativeTypeModelOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: NativeTypeModelWhereInput): NativeTypeModel - findFirstPatient(cursor: PatientWhereUniqueInput, distinct: [PatientScalarFieldEnum!], orderBy: [PatientOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: PatientWhereInput): Patient - findFirstPatientOrThrow(cursor: PatientWhereUniqueInput, distinct: [PatientScalarFieldEnum!], orderBy: [PatientOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: PatientWhereInput): Patient - findFirstProblem(cursor: ProblemWhereUniqueInput, distinct: [ProblemScalarFieldEnum!], orderBy: [ProblemOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: ProblemWhereInput): Problem - findFirstProblemOrThrow(cursor: ProblemWhereUniqueInput, distinct: [ProblemScalarFieldEnum!], orderBy: [ProblemOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: ProblemWhereInput): Problem + directors(cursor: DirectorWhereUniqueInput, distinct: [DirectorScalarFieldEnum!], orderBy: [DirectorOrderByWithRelationInput!], skip: Int, take: Int, where: DirectorWhereInput): [Director!]! + findFirstCreator(cursor: CreatorWhereUniqueInput, distinct: [CreatorScalarFieldEnum!], orderBy: [CreatorOrderByWithRelationInput!], skip: Int, take: Int, where: CreatorWhereInput): Creator + findFirstCreatorOrThrow(cursor: CreatorWhereUniqueInput, distinct: [CreatorScalarFieldEnum!], orderBy: [CreatorOrderByWithRelationInput!], skip: Int, take: Int, where: CreatorWhereInput): Creator + findFirstDirector(cursor: DirectorWhereUniqueInput, distinct: [DirectorScalarFieldEnum!], orderBy: [DirectorOrderByWithRelationInput!], skip: Int, take: Int, where: DirectorWhereInput): Director + findFirstDirectorOrThrow(cursor: DirectorWhereUniqueInput, distinct: [DirectorScalarFieldEnum!], orderBy: [DirectorOrderByWithRelationInput!], skip: Int, take: Int, where: DirectorWhereInput): Director + findFirstHidden(cursor: HiddenWhereUniqueInput, distinct: [HiddenScalarFieldEnum!], orderBy: [HiddenOrderByWithRelationInput!], skip: Int, take: Int, where: HiddenWhereInput): Hidden + findFirstHiddenOrThrow(cursor: HiddenWhereUniqueInput, distinct: [HiddenScalarFieldEnum!], orderBy: [HiddenOrderByWithRelationInput!], skip: Int, take: Int, where: HiddenWhereInput): Hidden + findFirstMainUser(cursor: MainUserWhereUniqueInput, distinct: [MainUserScalarFieldEnum!], orderBy: [MainUserOrderByWithRelationInput!], skip: Int, take: Int, where: MainUserWhereInput): MainUser + findFirstMainUserOrThrow(cursor: MainUserWhereUniqueInput, distinct: [MainUserScalarFieldEnum!], orderBy: [MainUserOrderByWithRelationInput!], skip: Int, take: Int, where: MainUserWhereInput): MainUser + findFirstMovie(cursor: MovieWhereUniqueInput, distinct: [MovieScalarFieldEnum!], orderBy: [MovieOrderByWithRelationInput!], skip: Int, take: Int, where: MovieWhereInput): Movie + findFirstMovieOrThrow(cursor: MovieWhereUniqueInput, distinct: [MovieScalarFieldEnum!], orderBy: [MovieOrderByWithRelationInput!], skip: Int, take: Int, where: MovieWhereInput): Movie + findFirstNativeTypeModel(cursor: NativeTypeModelWhereUniqueInput, distinct: [NativeTypeModelScalarFieldEnum!], orderBy: [NativeTypeModelOrderByWithRelationInput!], skip: Int, take: Int, where: NativeTypeModelWhereInput): NativeTypeModel + findFirstNativeTypeModelOrThrow(cursor: NativeTypeModelWhereUniqueInput, distinct: [NativeTypeModelScalarFieldEnum!], orderBy: [NativeTypeModelOrderByWithRelationInput!], skip: Int, take: Int, where: NativeTypeModelWhereInput): NativeTypeModel + findFirstPatient(cursor: PatientWhereUniqueInput, distinct: [PatientScalarFieldEnum!], orderBy: [PatientOrderByWithRelationInput!], skip: Int, take: Int, where: PatientWhereInput): Patient + findFirstPatientOrThrow(cursor: PatientWhereUniqueInput, distinct: [PatientScalarFieldEnum!], orderBy: [PatientOrderByWithRelationInput!], skip: Int, take: Int, where: PatientWhereInput): Patient + findFirstProblem(cursor: ProblemWhereUniqueInput, distinct: [ProblemScalarFieldEnum!], orderBy: [ProblemOrderByWithRelationInput!], skip: Int, take: Int, where: ProblemWhereInput): Problem + findFirstProblemOrThrow(cursor: ProblemWhereUniqueInput, distinct: [ProblemScalarFieldEnum!], orderBy: [ProblemOrderByWithRelationInput!], skip: Int, take: Int, where: ProblemWhereInput): Problem getCreator(where: CreatorWhereUniqueInput!): Creator getDirector(where: DirectorWhereUniqueInput!): Director getHidden(where: HiddenWhereUniqueInput!): Hidden @@ -3170,19 +3232,19 @@ type Query { groupByPost(by: [PostScalarFieldEnum!]!, having: PostScalarWhereWithAggregatesInput, orderBy: [PostOrderByWithAggregationInput!], skip: Int, take: Int, where: PostWhereInput): [PostGroupBy!]! groupByProblem(by: [ProblemScalarFieldEnum!]!, having: ProblemScalarWhereWithAggregatesInput, orderBy: [ProblemOrderByWithAggregationInput!], skip: Int, take: Int, where: ProblemWhereInput): [ProblemGroupBy!]! hidden(where: HiddenWhereUniqueInput!): Hidden - hiddens(cursor: HiddenWhereUniqueInput, distinct: [HiddenScalarFieldEnum!], orderBy: [HiddenOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: HiddenWhereInput): [Hidden!]! + hiddens(cursor: HiddenWhereUniqueInput, distinct: [HiddenScalarFieldEnum!], orderBy: [HiddenOrderByWithRelationInput!], skip: Int, take: Int, where: HiddenWhereInput): [Hidden!]! mainUser(where: MainUserWhereUniqueInput!): MainUser - mainUsers(cursor: MainUserWhereUniqueInput, distinct: [MainUserScalarFieldEnum!], orderBy: [MainUserOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: MainUserWhereInput): [MainUser!]! + mainUsers(cursor: MainUserWhereUniqueInput, distinct: [MainUserScalarFieldEnum!], orderBy: [MainUserOrderByWithRelationInput!], skip: Int, take: Int, where: MainUserWhereInput): [MainUser!]! movie(where: MovieWhereUniqueInput!): Movie - movies(cursor: MovieWhereUniqueInput, distinct: [MovieScalarFieldEnum!], orderBy: [MovieOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: MovieWhereInput): [Movie!]! + movies(cursor: MovieWhereUniqueInput, distinct: [MovieScalarFieldEnum!], orderBy: [MovieOrderByWithRelationInput!], skip: Int, take: Int, where: MovieWhereInput): [Movie!]! nativeTypeModel(where: NativeTypeModelWhereUniqueInput!): NativeTypeModel - nativeTypeModels(cursor: NativeTypeModelWhereUniqueInput, distinct: [NativeTypeModelScalarFieldEnum!], orderBy: [NativeTypeModelOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: NativeTypeModelWhereInput): [NativeTypeModel!]! + nativeTypeModels(cursor: NativeTypeModelWhereUniqueInput, distinct: [NativeTypeModelScalarFieldEnum!], orderBy: [NativeTypeModelOrderByWithRelationInput!], skip: Int, take: Int, where: NativeTypeModelWhereInput): [NativeTypeModel!]! patient(where: PatientWhereUniqueInput!): Patient - patients(cursor: PatientWhereUniqueInput, distinct: [PatientScalarFieldEnum!], orderBy: [PatientOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: PatientWhereInput): [Patient!]! + patients(cursor: PatientWhereUniqueInput, distinct: [PatientScalarFieldEnum!], orderBy: [PatientOrderByWithRelationInput!], skip: Int, take: Int, where: PatientWhereInput): [Patient!]! post(where: PostWhereUniqueInput!): Post - posts(cursor: PostWhereUniqueInput, distinct: [PostScalarFieldEnum!], orderBy: [PostOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: PostWhereInput): [Post!]! + posts(cursor: PostWhereUniqueInput, distinct: [PostScalarFieldEnum!], orderBy: [PostOrderByWithRelationInput!], skip: Int, take: Int, where: PostWhereInput): [Post!]! problem(where: ProblemWhereUniqueInput!): Problem - problems(cursor: ProblemWhereUniqueInput, distinct: [ProblemScalarFieldEnum!], orderBy: [ProblemOrderByWithRelationAndSearchRelevanceInput!], skip: Int, take: Int, where: ProblemWhereInput): [Problem!]! + problems(cursor: ProblemWhereUniqueInput, distinct: [ProblemScalarFieldEnum!], orderBy: [ProblemOrderByWithRelationInput!], skip: Int, take: Int, where: ProblemWhereInput): [Problem!]! } enum QueryMode { diff --git a/experiments/postgres/package-lock.json b/experiments/postgres/package-lock.json index 56c92b814..48db5789b 100644 --- a/experiments/postgres/package-lock.json +++ b/experiments/postgres/package-lock.json @@ -5,22 +5,22 @@ "packages": { "": { "dependencies": { - "@prisma/client": "^5.4.2", - "@types/graphql-fields": "^1.3.8", - "graphql": "^16.8.1", + "@prisma/client": "^5.18.0", + "@types/graphql-fields": "^1.3.9", + "graphql": "^16.9.0", "graphql-fields": "^2.0.3", - "graphql-scalars": "^1.22.4", - "graphql-yoga": "^5.0.0", - "reflect-metadata": "^0.1.13", - "tslib": "^2.6.2", - "type-graphql": "2.0.0-beta.3" + "graphql-scalars": "^1.23.0", + "graphql-yoga": "^5.6.3", + "reflect-metadata": "0.1.13", + "tslib": "^2.6.3", + "type-graphql": "2.0.0-rc.2" }, "devDependencies": { - "@types/node": "^20.8.7", - "class-validator": "^0.14.0", - "prisma": "^5.4.2", - "ts-node": "^10.9.1", - "typescript": "~5.2.2" + "@types/node": "^22.1.0", + "class-validator": "^0.14.1", + "prisma": "^5.18.0", + "ts-node": "^10.9.2", + "typescript": "~5.5.4" } }, "node_modules/@cspotcode/source-map-support": { @@ -36,9 +36,10 @@ } }, "node_modules/@envelop/core": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@envelop/core/-/core-5.0.0.tgz", - "integrity": "sha512-aJdnH/ptv+cvwfvciCBe7TSvccBwo9g0S5f6u35TBVzRVqIGkK03lFlIL+x1cnfZgN9EfR2b1PH2galrT1CdCQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@envelop/core/-/core-5.0.1.tgz", + "integrity": "sha512-wxA8EyE1fPnlbP0nC/SFI7uU8wSNf4YjxZhAPu0P63QbgIvqHtHsH4L3/u+rsTruzhk3OvNRgQyLsMfaR9uzAQ==", + "license": "MIT", "dependencies": { "@envelop/types": "5.0.0", "tslib": "^2.5.0" @@ -51,6 +52,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/@envelop/types/-/types-5.0.0.tgz", "integrity": "sha512-IPjmgSc4KpQRlO4qbEDnBEixvtb06WDmjKfi/7fkZaryh5HuOmTtixe1EupQI5XfXO8joc3d27uUZ0QdC++euA==", + "license": "MIT", "dependencies": { "tslib": "^2.5.0" }, @@ -59,11 +61,12 @@ } }, "node_modules/@graphql-tools/executor": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/executor/-/executor-1.1.0.tgz", - "integrity": "sha512-+1wmnaUHETSYxiK/ELsT60x584Rw3QKBB7F/7fJ83HKPnLifmE2Dm/K9Eyt6L0Ppekf1jNUbWBpmBGb8P5hAeg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor/-/executor-1.3.0.tgz", + "integrity": "sha512-e+rmEf/2EO4hDnbkO8mTS2FI+jGUNmYkSDKw5TgPVlO8VOKS+TXmJBK6E9v4Gc/39yVkZsffYfW/R8obJrA0mg==", + "license": "MIT", "dependencies": { - "@graphql-tools/utils": "^10.0.0", + "@graphql-tools/utils": "^10.2.3", "@graphql-typed-document-node/core": "3.2.0", "@repeaterjs/repeater": "^3.0.4", "tslib": "^2.4.0", @@ -77,11 +80,12 @@ } }, "node_modules/@graphql-tools/merge": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-9.0.0.tgz", - "integrity": "sha512-J7/xqjkGTTwOJmaJQJ2C+VDBDOWJL3lKrHJN4yMaRLAJH3PosB7GiPRaSDZdErs0+F77sH2MKs2haMMkywzx7Q==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-9.0.4.tgz", + "integrity": "sha512-MivbDLUQ+4Q8G/Hp/9V72hbn810IJDEZQ57F01sHnlrrijyadibfVhaQfW/pNH+9T/l8ySZpaR/DpL5i+ruZ+g==", + "license": "MIT", "dependencies": { - "@graphql-tools/utils": "^10.0.0", + "@graphql-tools/utils": "^10.0.13", "tslib": "^2.4.0" }, "engines": { @@ -92,12 +96,13 @@ } }, "node_modules/@graphql-tools/schema": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-10.0.0.tgz", - "integrity": "sha512-kf3qOXMFcMs2f/S8Y3A8fm/2w+GaHAkfr3Gnhh2LOug/JgpY/ywgFVxO3jOeSpSEdoYcDKLcXVjMigNbY4AdQg==", + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-10.0.4.tgz", + "integrity": "sha512-HuIwqbKxPaJujox25Ra4qwz0uQzlpsaBOzO6CVfzB/MemZdd+Gib8AIvfhQArK0YIN40aDran/yi+E5Xf0mQww==", + "license": "MIT", "dependencies": { - "@graphql-tools/merge": "^9.0.0", - "@graphql-tools/utils": "^10.0.0", + "@graphql-tools/merge": "^9.0.3", + "@graphql-tools/utils": "^10.2.1", "tslib": "^2.4.0", "value-or-promise": "^1.0.12" }, @@ -109,11 +114,14 @@ } }, "node_modules/@graphql-tools/utils": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-10.0.1.tgz", - "integrity": "sha512-i1FozbDGHgdsFA47V/JvQZ0FE8NAy0Eiz7HGCJO2MkNdZAKNnwei66gOq0JWYVFztwpwbVQ09GkKhq7Kjcq5Cw==", + "version": "10.3.3", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-10.3.3.tgz", + "integrity": "sha512-p0zCctE+kXsXb5FCJmA3DoucQmB5eSkrtyBAaEcjbnz8OVbriSJx2WNEyzttiHv2qanBe/AK/YiyHD/5Nsj76Q==", + "license": "MIT", "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", + "cross-inspect": "1.0.1", + "dset": "^3.1.2", "tslib": "^2.4.0" }, "engines": { @@ -127,6 +135,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", + "license": "MIT", "peerDependencies": { "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } @@ -143,9 +152,10 @@ } }, "node_modules/@graphql-yoga/subscription": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@graphql-yoga/subscription/-/subscription-5.0.0.tgz", - "integrity": "sha512-Ri7sK8hmxd/kwaEa0YT8uqQUb2wOLsmBMxI90QDyf96lzOMJRgBuNYoEkU1pSgsgmW2glceZ96sRYfaXqwVxUw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@graphql-yoga/subscription/-/subscription-5.0.1.tgz", + "integrity": "sha512-1wCB1DfAnaLzS+IdoOzELGGnx1ODEg9nzQXFh4u2j02vAnne6d+v4A7HIH9EqzVdPLoAaMKXCZUUdKs+j3z1fg==", + "license": "MIT", "dependencies": { "@graphql-yoga/typed-event-target": "^3.0.0", "@repeaterjs/repeater": "^3.0.4", @@ -160,6 +170,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@graphql-yoga/typed-event-target/-/typed-event-target-3.0.0.tgz", "integrity": "sha512-w+liuBySifrstuHbFrHoHAEyVnDFVib+073q8AeAJ/qqJfvFvAwUPLLtNohR/WDVRgSasfXtl3dcNuVJWN+rjg==", + "license": "MIT", "dependencies": { "@repeaterjs/repeater": "^3.0.4", "tslib": "^2.5.2" @@ -193,14 +204,18 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@kamilkisiela/fast-url-parser": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@kamilkisiela/fast-url-parser/-/fast-url-parser-1.1.4.tgz", + "integrity": "sha512-gbkePEBupNydxCelHCESvFSFM8XPh1Zs/OAVRW/rKpEqPAl5PbOM90Si8mv9bvnR53uPD2s/FiRxdvSejpRJew==", + "license": "MIT" + }, "node_modules/@prisma/client": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.4.2.tgz", - "integrity": "sha512-2xsPaz4EaMKj1WS9iW6MlPhmbqtBsXAOeVttSePp8vTFTtvzh2hZbDgswwBdSCgPzmmwF+tLB259QzggvCmJqA==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.18.0.tgz", + "integrity": "sha512-BWivkLh+af1kqC89zCJYkHsRcyWsM8/JHpsDMM76DjP3ZdEquJhXa4IeX+HkWPnwJ5FanxEJFZZDTWiDs/Kvyw==", "hasInstallScript": true, - "dependencies": { - "@prisma/engines-version": "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574" - }, + "license": "Apache-2.0", "engines": { "node": ">=16.13" }, @@ -213,22 +228,61 @@ } } }, + "node_modules/@prisma/debug": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.18.0.tgz", + "integrity": "sha512-f+ZvpTLidSo3LMJxQPVgAxdAjzv5OpzAo/eF8qZqbwvgi2F5cTOI9XCpdRzJYA0iGfajjwjOKKrVq64vkxEfUw==", + "devOptional": true, + "license": "Apache-2.0" + }, "node_modules/@prisma/engines": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.4.2.tgz", - "integrity": "sha512-fqeucJ3LH0e1eyFdT0zRx+oETLancu5+n4lhiYECyEz6H2RDskPJHJYHkVc0LhkU4Uv7fuEnppKU3nVKNzMh8g==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.18.0.tgz", + "integrity": "sha512-ofmpGLeJ2q2P0wa/XaEgTnX/IsLnvSp/gZts0zjgLNdBhfuj2lowOOPmDcfKljLQUXMvAek3lw5T01kHmCG8rg==", "devOptional": true, - "hasInstallScript": true + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "5.18.0", + "@prisma/engines-version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "@prisma/fetch-engine": "5.18.0", + "@prisma/get-platform": "5.18.0" + } }, "node_modules/@prisma/engines-version": { - "version": "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574.tgz", - "integrity": "sha512-wvupDL4AA1vf4TQNANg7kR7y98ITqPsk6aacfBxZKtrJKRIsWjURHkZCGcQliHdqCiW/hGreO6d6ZuSv9MhdAA==" + "version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169.tgz", + "integrity": "sha512-a/+LpJj8vYU3nmtkg+N3X51ddbt35yYrRe8wqHTJtYQt7l1f8kjIBcCs6sHJvodW/EK5XGvboOiwm47fmNrbgg==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/fetch-engine": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.18.0.tgz", + "integrity": "sha512-I/3u0x2n31rGaAuBRx2YK4eB7R/1zCuayo2DGwSpGyrJWsZesrV7QVw7ND0/Suxeo/vLkJ5OwuBqHoCxvTHpOg==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "5.18.0", + "@prisma/engines-version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "@prisma/get-platform": "5.18.0" + } + }, + "node_modules/@prisma/get-platform": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.18.0.tgz", + "integrity": "sha512-Tk+m7+uhqcKDgnMnFN0lRiH7Ewea0OEsZZs9pqXa7i3+7svS3FSCqDBCaM9x5fmhhkufiG0BtunJVDka+46DlA==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "5.18.0" + } }, "node_modules/@repeaterjs/repeater": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@repeaterjs/repeater/-/repeater-3.0.4.tgz", - "integrity": "sha512-AW8PKd6iX3vAZ0vA43nOUOnbq/X5ihgU+mSXXqunMkeQADGiqw/PY0JNeYtD5sr0PAy51YPgAPbDoeapv9r8WA==" + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@repeaterjs/repeater/-/repeater-3.0.6.tgz", + "integrity": "sha512-Javneu5lsuhwNCryN+pXH93VPQ8g0dBX7wItHFgYiwQmzE1sVdg5tWHiOgHywzL2W21XQopa7IwIEnNbmeUJYA==", + "license": "MIT" }, "node_modules/@tsconfig/node10": { "version": "1.0.7", @@ -255,77 +309,87 @@ "dev": true }, "node_modules/@types/graphql-fields": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/@types/graphql-fields/-/graphql-fields-1.3.8.tgz", - "integrity": "sha512-XA3QT8f1THR3t77YT4EpFV/qF3GatLFODwUHvSmF0EjDmjxZY09yWrp9Gw6ju3zpJHGZUwN/p/HID7CaKwGHtw==", + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/@types/graphql-fields/-/graphql-fields-1.3.9.tgz", + "integrity": "sha512-HynTnp1HrE58uYcFcAK5UOfdrHSOIHDLCjvMU4yCmQLMj21uo7ZiZqnDGrD27pgCgHH5a1e8GYNK98Ndmma7ig==", + "license": "MIT", "dependencies": { "graphql": "*" } }, "node_modules/@types/node": { - "version": "20.8.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.7.tgz", - "integrity": "sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", + "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", + "license": "MIT", "dependencies": { - "undici-types": "~5.25.1" + "undici-types": "~6.13.0" } }, "node_modules/@types/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==" + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "license": "MIT" }, "node_modules/@types/validator": { - "version": "13.7.10", - "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.10.tgz", - "integrity": "sha512-t1yxFAR2n0+VO6hd/FJ9F2uezAZVWHLmpmlJzm1eX03+H7+HsuTAp7L8QJs+2pQCfWkP1+EXsGK9Z9v7o/qPVQ==", - "devOptional": true + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.12.0.tgz", + "integrity": "sha512-nH45Lk7oPIJ1RVOF6JgFI6Dy0QpHEzq4QecZhvguxYPDwT8c93prCMqAtiIttm39voZ+DDR+qkNnMpJmMBRqag==", + "devOptional": true, + "license": "MIT" }, "node_modules/@whatwg-node/events": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.1.tgz", - "integrity": "sha512-AyQEn5hIPV7Ze+xFoXVU3QTHXVbWPrzaOkxtENMPMuNL6VVHrp4hHfDt9nrQpjO7BgvuM95dMtkycX5M/DZR3w==", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.2.tgz", + "integrity": "sha512-ApcWxkrs1WmEMS2CaLLFUEem/49erT3sxIVjpzU5f6zmVcnijtDSrhoK2zVobOIikZJdH63jdAXOrvjf6eOUNQ==", + "license": "MIT", + "dependencies": { + "tslib": "^2.6.3" + }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@whatwg-node/fetch": { - "version": "0.9.9", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.9.tgz", - "integrity": "sha512-OTVoDm039CNyAWSRc2WBimMl/N9J4Fk2le21Xzcf+3OiWPNNSIbMnpWKBUyraPh2d9SAEgoBdQxTfVNihXgiUw==", + "version": "0.9.19", + "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.19.tgz", + "integrity": "sha512-J+zopRcUVOhkiQYlHpxOEZuOgZtqW9xMaNQFDjESm9vRcyATms+E2/p2mZiVQGllPqWflkA3SzoJC1MxV4Pf9g==", + "license": "MIT", "dependencies": { - "@whatwg-node/node-fetch": "^0.4.8", - "urlpattern-polyfill": "^9.0.0" + "@whatwg-node/node-fetch": "^0.5.16", + "urlpattern-polyfill": "^10.0.0" }, "engines": { "node": ">=16.0.0" } }, "node_modules/@whatwg-node/node-fetch": { - "version": "0.4.10", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.4.10.tgz", - "integrity": "sha512-Vj/xaVgyaA2f7PVpegFnoT2W2NAJdb3gB2y1jOlQ+ae94u8YlaOi11jNPQ7qD61fvTw4N19e+avz0KGyfYWxQw==", + "version": "0.5.20", + "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.5.20.tgz", + "integrity": "sha512-DFLsOG//CrDdIO0x7Q7Ompxj3TZhB4iMDeXpQKY4toSbIbzsKmbwyOkzXMwvV1syxvAtPoHBzyGGtDrPV424FA==", + "license": "MIT", "dependencies": { - "@whatwg-node/events": "^0.1.0", + "@kamilkisiela/fast-url-parser": "^1.1.4", "busboy": "^1.6.0", "fast-querystring": "^1.1.1", - "fast-url-parser": "^1.1.3", - "tslib": "^2.3.1" + "tslib": "^2.6.3" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@whatwg-node/server": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@whatwg-node/server/-/server-0.9.5.tgz", - "integrity": "sha512-unJrvZj20XZv6VNJBmszOBAm/43tVd9LvFCTnKZwQtMd8lcrOYn/RZWgt2dDDsOz3kpe9U2ds6II4MLFxQJbwg==", + "version": "0.9.46", + "resolved": "https://registry.npmjs.org/@whatwg-node/server/-/server-0.9.46.tgz", + "integrity": "sha512-vUKCMPP6f2BLtOxnK2c98QmK0rb24RlmXb2enbEg8nXttQLvlKfMOfaY7uNAtaMXejjR2ku/ww9EEeiWXV3Q9A==", + "license": "MIT", "dependencies": { - "@whatwg-node/fetch": "^0.9.7", - "tslib": "^2.3.1" + "@whatwg-node/fetch": "^0.9.19", + "tslib": "^2.6.3" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/acorn": { @@ -367,14 +431,15 @@ } }, "node_modules/class-validator": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.0.tgz", - "integrity": "sha512-ct3ltplN8I9fOwUd8GrP8UQixwff129BkEtuWDKL5W45cQuLd19xqmTLu5ge78YDm/fdje6FMt0hGOhl0lii3A==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.1.tgz", + "integrity": "sha512-2VEG9JICxIqTpoK1eMzZqaV+u/EiwEJkMGzTrZf6sU/fwsnOITVgYJ8yojSy6CaXtO9V0Cc6ZQZ8h8m4UBuLwQ==", "devOptional": true, + "license": "MIT", "dependencies": { - "@types/validator": "^13.7.10", - "libphonenumber-js": "^1.10.14", - "validator": "^13.7.0" + "@types/validator": "^13.11.8", + "libphonenumber-js": "^1.10.53", + "validator": "^13.9.0" } }, "node_modules/create-require": { @@ -383,6 +448,18 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, + "node_modules/cross-inspect": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cross-inspect/-/cross-inspect-1.0.1.tgz", + "integrity": "sha512-Pcw1JTvZLSJH83iiGWt6fRcT+BjZlCDRVwYLbUcHzv/CRpB7r0MlSrGbIyQvVSNyGnbt7G4AXuyCiDR3POvZ1A==", + "license": "MIT", + "dependencies": { + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -403,28 +480,23 @@ "node_modules/fast-decode-uri-component": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/fast-decode-uri-component/-/fast-decode-uri-component-1.0.1.tgz", - "integrity": "sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==" + "integrity": "sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==", + "license": "MIT" }, "node_modules/fast-querystring": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/fast-querystring/-/fast-querystring-1.1.2.tgz", "integrity": "sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==", + "license": "MIT", "dependencies": { "fast-decode-uri-component": "^1.0.1" } }, - "node_modules/fast-url-parser": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", - "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", - "dependencies": { - "punycode": "^1.3.2" - } - }, "node_modules/graphql": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.8.1.tgz", - "integrity": "sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==", + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz", + "integrity": "sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==", + "license": "MIT", "engines": { "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } @@ -446,9 +518,10 @@ } }, "node_modules/graphql-scalars": { - "version": "1.22.4", - "resolved": "https://registry.npmjs.org/graphql-scalars/-/graphql-scalars-1.22.4.tgz", - "integrity": "sha512-ILnv7jq5VKHLUyoaTFX7lgYrjCd6vTee9i8/B+D4zJKJT5TguOl0KkpPEbXHjmeor8AZYrVsrYUHdqRBMX1pjA==", + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/graphql-scalars/-/graphql-scalars-1.23.0.tgz", + "integrity": "sha512-YTRNcwitkn8CqYcleKOx9IvedA8JIERn8BRq21nlKgOr4NEcTaWEG0sT+H92eF3ALTFbPgsqfft4cw+MGgv0Gg==", + "license": "MIT", "dependencies": { "tslib": "^2.5.0" }, @@ -459,30 +532,20 @@ "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" } }, - "node_modules/graphql-subscriptions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/graphql-subscriptions/-/graphql-subscriptions-2.0.0.tgz", - "integrity": "sha512-s6k2b8mmt9gF9pEfkxsaO1lTxaySfKoEJzEfmwguBbQ//Oq23hIXCfR1hm4kdh5hnR20RdwB+s3BCb+0duHSZA==", - "dependencies": { - "iterall": "^1.3.0" - }, - "peerDependencies": { - "graphql": "^15.7.2 || ^16.0.0" - } - }, "node_modules/graphql-yoga": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/graphql-yoga/-/graphql-yoga-5.0.0.tgz", - "integrity": "sha512-ZvZlO8MHMDWuLRoDhvJQnXg8SOJD0iDaCA+M/zWuD26AlhEugOEbpnhw/645oqXTYtvHsM91WyxtV7p5XJWYMg==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/graphql-yoga/-/graphql-yoga-5.6.3.tgz", + "integrity": "sha512-JtZ3r/QdkGpdi+8XfPuG+6Nb+V5wNMg2LYChSIATes5LhcIx3pbOkm/nWoGT/SA5LqlRyp+e0sxmVNEz8qN5TQ==", + "license": "MIT", "dependencies": { - "@envelop/core": "^5.0.0", - "@graphql-tools/executor": "^1.0.0", - "@graphql-tools/schema": "^10.0.0", - "@graphql-tools/utils": "^10.0.0", + "@envelop/core": "^5.0.1", + "@graphql-tools/executor": "^1.3.0", + "@graphql-tools/schema": "^10.0.4", + "@graphql-tools/utils": "^10.3.2", "@graphql-yoga/logger": "^2.0.0", - "@graphql-yoga/subscription": "^5.0.0", - "@whatwg-node/fetch": "^0.9.7", - "@whatwg-node/server": "^0.9.1", + "@graphql-yoga/subscription": "^5.0.1", + "@whatwg-node/fetch": "^0.9.18", + "@whatwg-node/server": "^0.9.41", "dset": "^3.1.1", "lru-cache": "^10.0.0", "tslib": "^2.5.2" @@ -502,16 +565,12 @@ "node": "14 || >=16.14" } }, - "node_modules/iterall": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz", - "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==" - }, "node_modules/libphonenumber-js": { - "version": "1.10.15", - "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.15.tgz", - "integrity": "sha512-sLeVLmWX17VCKKulc+aDIRHS95TxoTsKMRJi5s5gJdwlqNzMWcBCtSHHruVyXjqfi67daXM2SnLf2juSrdx5Sg==", - "devOptional": true + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.11.5.tgz", + "integrity": "sha512-TwHR5BZxGRODtAfz03szucAkjT5OArXr+94SMtAM2pYXIlQNVMrxvb6uSCbnaJJV6QXEyICk7+l6QPgn72WHhg==", + "devOptional": true, + "license": "MIT" }, "node_modules/lodash.get": { "version": "4.4.2", @@ -536,13 +595,14 @@ "dev": true }, "node_modules/prisma": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.4.2.tgz", - "integrity": "sha512-GDMZwZy7mysB2oXU+angQqJ90iaPFdD0rHaZNkn+dio5NRkGLmMqmXs31//tg/qXT3iB0cTQwnGGQNuirhSTZg==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.18.0.tgz", + "integrity": "sha512-+TrSIxZsh64OPOmaSgVPH7ALL9dfU0jceYaMJXsNrTkFHO7/3RANi5K2ZiPB1De9+KDxCWn7jvRq8y8pvk+o9g==", "devOptional": true, "hasInstallScript": true, + "license": "Apache-2.0", "dependencies": { - "@prisma/engines": "5.4.2" + "@prisma/engines": "5.18.0" }, "bin": { "prisma": "build/index.js" @@ -551,11 +611,6 @@ "node": ">=16.13" } }, - "node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==" - }, "node_modules/reflect-metadata": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", @@ -584,10 +639,11 @@ } }, "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, + "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -627,14 +683,15 @@ } }, "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", + "license": "0BSD" }, "node_modules/type-graphql": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/type-graphql/-/type-graphql-2.0.0-beta.3.tgz", - "integrity": "sha512-5HEiQaWHPYhPmbJuMmT+IZgjsnbNWsW37osUISwgr5EpcHZ4krLl8eBoOfjFya4mxAWYshlpSO1ahaucJQqM5g==", + "version": "2.0.0-rc.2", + "resolved": "https://registry.npmjs.org/type-graphql/-/type-graphql-2.0.0-rc.2.tgz", + "integrity": "sha512-DJ8erG1cmjteMrOhFIkBHOqRM+L+wCJxvNjbbj1Y+q2r4HZkB1qOSS4ZD4AaoAfRPAp1yU23gMtmzf0jen/FFA==", "funding": [ { "type": "github", @@ -645,21 +702,22 @@ "url": "https://opencollective.com/typegraphql" } ], + "license": "MIT", "dependencies": { + "@graphql-yoga/subscription": "^5.0.0", "@types/node": "*", - "@types/semver": "^7.5.0", + "@types/semver": "^7.5.6", "graphql-query-complexity": "^0.12.0", - "graphql-subscriptions": "^2.0.0", "semver": "^7.5.4", - "tslib": "^2.6.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">= 16.16.0" + "node": ">= 18.12.0" }, "peerDependencies": { "class-validator": ">=0.14.0", - "graphql": "^16.7.1", - "graphql-scalars": "^1.22.2" + "graphql": "^16.8.1", + "graphql-scalars": "^1.23.0" }, "peerDependenciesMeta": { "class-validator": { @@ -668,10 +726,11 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -681,14 +740,16 @@ } }, "node_modules/undici-types": { - "version": "5.25.3", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", - "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==" + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==", + "license": "MIT" }, "node_modules/urlpattern-polyfill": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-9.0.0.tgz", - "integrity": "sha512-WHN8KDQblxd32odxeIgo83rdVDE2bvdkb86it7bMhYZwWKJz0+O0RK/eZiHYnM+zgt/U7hAHOlCQGfjjvSkw2g==" + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", + "license": "MIT" }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", @@ -697,10 +758,11 @@ "dev": true }, "node_modules/validator": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", - "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.12.0.tgz", + "integrity": "sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==", "devOptional": true, + "license": "MIT", "engines": { "node": ">= 0.10" } @@ -709,6 +771,7 @@ "version": "1.0.12", "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.12.tgz", "integrity": "sha512-Z6Uz+TYwEqE7ZN50gwn+1LCVo9ZVrpxRPOhOLnncYkY1ZzOYtrX8Fwf/rFktZ8R5mJms6EZf5TqNOMeZmnPq9Q==", + "license": "MIT", "engines": { "node": ">=12" } @@ -739,9 +802,9 @@ } }, "@envelop/core": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@envelop/core/-/core-5.0.0.tgz", - "integrity": "sha512-aJdnH/ptv+cvwfvciCBe7TSvccBwo9g0S5f6u35TBVzRVqIGkK03lFlIL+x1cnfZgN9EfR2b1PH2galrT1CdCQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@envelop/core/-/core-5.0.1.tgz", + "integrity": "sha512-wxA8EyE1fPnlbP0nC/SFI7uU8wSNf4YjxZhAPu0P63QbgIvqHtHsH4L3/u+rsTruzhk3OvNRgQyLsMfaR9uzAQ==", "requires": { "@envelop/types": "5.0.0", "tslib": "^2.5.0" @@ -756,11 +819,11 @@ } }, "@graphql-tools/executor": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/executor/-/executor-1.1.0.tgz", - "integrity": "sha512-+1wmnaUHETSYxiK/ELsT60x584Rw3QKBB7F/7fJ83HKPnLifmE2Dm/K9Eyt6L0Ppekf1jNUbWBpmBGb8P5hAeg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor/-/executor-1.3.0.tgz", + "integrity": "sha512-e+rmEf/2EO4hDnbkO8mTS2FI+jGUNmYkSDKw5TgPVlO8VOKS+TXmJBK6E9v4Gc/39yVkZsffYfW/R8obJrA0mg==", "requires": { - "@graphql-tools/utils": "^10.0.0", + "@graphql-tools/utils": "^10.2.3", "@graphql-typed-document-node/core": "3.2.0", "@repeaterjs/repeater": "^3.0.4", "tslib": "^2.4.0", @@ -768,31 +831,33 @@ } }, "@graphql-tools/merge": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-9.0.0.tgz", - "integrity": "sha512-J7/xqjkGTTwOJmaJQJ2C+VDBDOWJL3lKrHJN4yMaRLAJH3PosB7GiPRaSDZdErs0+F77sH2MKs2haMMkywzx7Q==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-9.0.4.tgz", + "integrity": "sha512-MivbDLUQ+4Q8G/Hp/9V72hbn810IJDEZQ57F01sHnlrrijyadibfVhaQfW/pNH+9T/l8ySZpaR/DpL5i+ruZ+g==", "requires": { - "@graphql-tools/utils": "^10.0.0", + "@graphql-tools/utils": "^10.0.13", "tslib": "^2.4.0" } }, "@graphql-tools/schema": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-10.0.0.tgz", - "integrity": "sha512-kf3qOXMFcMs2f/S8Y3A8fm/2w+GaHAkfr3Gnhh2LOug/JgpY/ywgFVxO3jOeSpSEdoYcDKLcXVjMigNbY4AdQg==", + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-10.0.4.tgz", + "integrity": "sha512-HuIwqbKxPaJujox25Ra4qwz0uQzlpsaBOzO6CVfzB/MemZdd+Gib8AIvfhQArK0YIN40aDran/yi+E5Xf0mQww==", "requires": { - "@graphql-tools/merge": "^9.0.0", - "@graphql-tools/utils": "^10.0.0", + "@graphql-tools/merge": "^9.0.3", + "@graphql-tools/utils": "^10.2.1", "tslib": "^2.4.0", "value-or-promise": "^1.0.12" } }, "@graphql-tools/utils": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-10.0.1.tgz", - "integrity": "sha512-i1FozbDGHgdsFA47V/JvQZ0FE8NAy0Eiz7HGCJO2MkNdZAKNnwei66gOq0JWYVFztwpwbVQ09GkKhq7Kjcq5Cw==", + "version": "10.3.3", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-10.3.3.tgz", + "integrity": "sha512-p0zCctE+kXsXb5FCJmA3DoucQmB5eSkrtyBAaEcjbnz8OVbriSJx2WNEyzttiHv2qanBe/AK/YiyHD/5Nsj76Q==", "requires": { "@graphql-typed-document-node/core": "^3.1.1", + "cross-inspect": "1.0.1", + "dset": "^3.1.2", "tslib": "^2.4.0" } }, @@ -811,9 +876,9 @@ } }, "@graphql-yoga/subscription": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@graphql-yoga/subscription/-/subscription-5.0.0.tgz", - "integrity": "sha512-Ri7sK8hmxd/kwaEa0YT8uqQUb2wOLsmBMxI90QDyf96lzOMJRgBuNYoEkU1pSgsgmW2glceZ96sRYfaXqwVxUw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@graphql-yoga/subscription/-/subscription-5.0.1.tgz", + "integrity": "sha512-1wCB1DfAnaLzS+IdoOzELGGnx1ODEg9nzQXFh4u2j02vAnne6d+v4A7HIH9EqzVdPLoAaMKXCZUUdKs+j3z1fg==", "requires": { "@graphql-yoga/typed-event-target": "^3.0.0", "@repeaterjs/repeater": "^3.0.4", @@ -852,29 +917,65 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "@kamilkisiela/fast-url-parser": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@kamilkisiela/fast-url-parser/-/fast-url-parser-1.1.4.tgz", + "integrity": "sha512-gbkePEBupNydxCelHCESvFSFM8XPh1Zs/OAVRW/rKpEqPAl5PbOM90Si8mv9bvnR53uPD2s/FiRxdvSejpRJew==" + }, "@prisma/client": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.4.2.tgz", - "integrity": "sha512-2xsPaz4EaMKj1WS9iW6MlPhmbqtBsXAOeVttSePp8vTFTtvzh2hZbDgswwBdSCgPzmmwF+tLB259QzggvCmJqA==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.18.0.tgz", + "integrity": "sha512-BWivkLh+af1kqC89zCJYkHsRcyWsM8/JHpsDMM76DjP3ZdEquJhXa4IeX+HkWPnwJ5FanxEJFZZDTWiDs/Kvyw==", + "requires": {} + }, + "@prisma/debug": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.18.0.tgz", + "integrity": "sha512-f+ZvpTLidSo3LMJxQPVgAxdAjzv5OpzAo/eF8qZqbwvgi2F5cTOI9XCpdRzJYA0iGfajjwjOKKrVq64vkxEfUw==", + "devOptional": true + }, + "@prisma/engines": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.18.0.tgz", + "integrity": "sha512-ofmpGLeJ2q2P0wa/XaEgTnX/IsLnvSp/gZts0zjgLNdBhfuj2lowOOPmDcfKljLQUXMvAek3lw5T01kHmCG8rg==", + "devOptional": true, "requires": { - "@prisma/engines-version": "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574" + "@prisma/debug": "5.18.0", + "@prisma/engines-version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "@prisma/fetch-engine": "5.18.0", + "@prisma/get-platform": "5.18.0" } }, - "@prisma/engines": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.4.2.tgz", - "integrity": "sha512-fqeucJ3LH0e1eyFdT0zRx+oETLancu5+n4lhiYECyEz6H2RDskPJHJYHkVc0LhkU4Uv7fuEnppKU3nVKNzMh8g==", + "@prisma/engines-version": { + "version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169.tgz", + "integrity": "sha512-a/+LpJj8vYU3nmtkg+N3X51ddbt35yYrRe8wqHTJtYQt7l1f8kjIBcCs6sHJvodW/EK5XGvboOiwm47fmNrbgg==", "devOptional": true }, - "@prisma/engines-version": { - "version": "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574.tgz", - "integrity": "sha512-wvupDL4AA1vf4TQNANg7kR7y98ITqPsk6aacfBxZKtrJKRIsWjURHkZCGcQliHdqCiW/hGreO6d6ZuSv9MhdAA==" + "@prisma/fetch-engine": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.18.0.tgz", + "integrity": "sha512-I/3u0x2n31rGaAuBRx2YK4eB7R/1zCuayo2DGwSpGyrJWsZesrV7QVw7ND0/Suxeo/vLkJ5OwuBqHoCxvTHpOg==", + "devOptional": true, + "requires": { + "@prisma/debug": "5.18.0", + "@prisma/engines-version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "@prisma/get-platform": "5.18.0" + } + }, + "@prisma/get-platform": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.18.0.tgz", + "integrity": "sha512-Tk+m7+uhqcKDgnMnFN0lRiH7Ewea0OEsZZs9pqXa7i3+7svS3FSCqDBCaM9x5fmhhkufiG0BtunJVDka+46DlA==", + "devOptional": true, + "requires": { + "@prisma/debug": "5.18.0" + } }, "@repeaterjs/repeater": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@repeaterjs/repeater/-/repeater-3.0.4.tgz", - "integrity": "sha512-AW8PKd6iX3vAZ0vA43nOUOnbq/X5ihgU+mSXXqunMkeQADGiqw/PY0JNeYtD5sr0PAy51YPgAPbDoeapv9r8WA==" + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@repeaterjs/repeater/-/repeater-3.0.6.tgz", + "integrity": "sha512-Javneu5lsuhwNCryN+pXH93VPQ8g0dBX7wItHFgYiwQmzE1sVdg5tWHiOgHywzL2W21XQopa7IwIEnNbmeUJYA==" }, "@tsconfig/node10": { "version": "1.0.7", @@ -901,65 +1002,67 @@ "dev": true }, "@types/graphql-fields": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/@types/graphql-fields/-/graphql-fields-1.3.8.tgz", - "integrity": "sha512-XA3QT8f1THR3t77YT4EpFV/qF3GatLFODwUHvSmF0EjDmjxZY09yWrp9Gw6ju3zpJHGZUwN/p/HID7CaKwGHtw==", + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/@types/graphql-fields/-/graphql-fields-1.3.9.tgz", + "integrity": "sha512-HynTnp1HrE58uYcFcAK5UOfdrHSOIHDLCjvMU4yCmQLMj21uo7ZiZqnDGrD27pgCgHH5a1e8GYNK98Ndmma7ig==", "requires": { "graphql": "*" } }, "@types/node": { - "version": "20.8.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.7.tgz", - "integrity": "sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", + "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", "requires": { - "undici-types": "~5.25.1" + "undici-types": "~6.13.0" } }, "@types/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==" + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==" }, "@types/validator": { - "version": "13.7.10", - "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.10.tgz", - "integrity": "sha512-t1yxFAR2n0+VO6hd/FJ9F2uezAZVWHLmpmlJzm1eX03+H7+HsuTAp7L8QJs+2pQCfWkP1+EXsGK9Z9v7o/qPVQ==", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.12.0.tgz", + "integrity": "sha512-nH45Lk7oPIJ1RVOF6JgFI6Dy0QpHEzq4QecZhvguxYPDwT8c93prCMqAtiIttm39voZ+DDR+qkNnMpJmMBRqag==", "devOptional": true }, "@whatwg-node/events": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.1.tgz", - "integrity": "sha512-AyQEn5hIPV7Ze+xFoXVU3QTHXVbWPrzaOkxtENMPMuNL6VVHrp4hHfDt9nrQpjO7BgvuM95dMtkycX5M/DZR3w==" + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.2.tgz", + "integrity": "sha512-ApcWxkrs1WmEMS2CaLLFUEem/49erT3sxIVjpzU5f6zmVcnijtDSrhoK2zVobOIikZJdH63jdAXOrvjf6eOUNQ==", + "requires": { + "tslib": "^2.6.3" + } }, "@whatwg-node/fetch": { - "version": "0.9.9", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.9.tgz", - "integrity": "sha512-OTVoDm039CNyAWSRc2WBimMl/N9J4Fk2le21Xzcf+3OiWPNNSIbMnpWKBUyraPh2d9SAEgoBdQxTfVNihXgiUw==", + "version": "0.9.19", + "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.19.tgz", + "integrity": "sha512-J+zopRcUVOhkiQYlHpxOEZuOgZtqW9xMaNQFDjESm9vRcyATms+E2/p2mZiVQGllPqWflkA3SzoJC1MxV4Pf9g==", "requires": { - "@whatwg-node/node-fetch": "^0.4.8", - "urlpattern-polyfill": "^9.0.0" + "@whatwg-node/node-fetch": "^0.5.16", + "urlpattern-polyfill": "^10.0.0" } }, "@whatwg-node/node-fetch": { - "version": "0.4.10", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.4.10.tgz", - "integrity": "sha512-Vj/xaVgyaA2f7PVpegFnoT2W2NAJdb3gB2y1jOlQ+ae94u8YlaOi11jNPQ7qD61fvTw4N19e+avz0KGyfYWxQw==", + "version": "0.5.20", + "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.5.20.tgz", + "integrity": "sha512-DFLsOG//CrDdIO0x7Q7Ompxj3TZhB4iMDeXpQKY4toSbIbzsKmbwyOkzXMwvV1syxvAtPoHBzyGGtDrPV424FA==", "requires": { - "@whatwg-node/events": "^0.1.0", + "@kamilkisiela/fast-url-parser": "^1.1.4", "busboy": "^1.6.0", "fast-querystring": "^1.1.1", - "fast-url-parser": "^1.1.3", - "tslib": "^2.3.1" + "tslib": "^2.6.3" } }, "@whatwg-node/server": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@whatwg-node/server/-/server-0.9.5.tgz", - "integrity": "sha512-unJrvZj20XZv6VNJBmszOBAm/43tVd9LvFCTnKZwQtMd8lcrOYn/RZWgt2dDDsOz3kpe9U2ds6II4MLFxQJbwg==", + "version": "0.9.46", + "resolved": "https://registry.npmjs.org/@whatwg-node/server/-/server-0.9.46.tgz", + "integrity": "sha512-vUKCMPP6f2BLtOxnK2c98QmK0rb24RlmXb2enbEg8nXttQLvlKfMOfaY7uNAtaMXejjR2ku/ww9EEeiWXV3Q9A==", "requires": { - "@whatwg-node/fetch": "^0.9.7", - "tslib": "^2.3.1" + "@whatwg-node/fetch": "^0.9.19", + "tslib": "^2.6.3" } }, "acorn": { @@ -989,14 +1092,14 @@ } }, "class-validator": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.0.tgz", - "integrity": "sha512-ct3ltplN8I9fOwUd8GrP8UQixwff129BkEtuWDKL5W45cQuLd19xqmTLu5ge78YDm/fdje6FMt0hGOhl0lii3A==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.1.tgz", + "integrity": "sha512-2VEG9JICxIqTpoK1eMzZqaV+u/EiwEJkMGzTrZf6sU/fwsnOITVgYJ8yojSy6CaXtO9V0Cc6ZQZ8h8m4UBuLwQ==", "devOptional": true, "requires": { - "@types/validator": "^13.7.10", - "libphonenumber-js": "^1.10.14", - "validator": "^13.7.0" + "@types/validator": "^13.11.8", + "libphonenumber-js": "^1.10.53", + "validator": "^13.9.0" } }, "create-require": { @@ -1005,6 +1108,14 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, + "cross-inspect": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cross-inspect/-/cross-inspect-1.0.1.tgz", + "integrity": "sha512-Pcw1JTvZLSJH83iiGWt6fRcT+BjZlCDRVwYLbUcHzv/CRpB7r0MlSrGbIyQvVSNyGnbt7G4AXuyCiDR3POvZ1A==", + "requires": { + "tslib": "^2.4.0" + } + }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -1029,18 +1140,10 @@ "fast-decode-uri-component": "^1.0.1" } }, - "fast-url-parser": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", - "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", - "requires": { - "punycode": "^1.3.2" - } - }, "graphql": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.8.1.tgz", - "integrity": "sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==" + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz", + "integrity": "sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==" }, "graphql-fields": { "version": "2.0.3", @@ -1056,34 +1159,26 @@ } }, "graphql-scalars": { - "version": "1.22.4", - "resolved": "https://registry.npmjs.org/graphql-scalars/-/graphql-scalars-1.22.4.tgz", - "integrity": "sha512-ILnv7jq5VKHLUyoaTFX7lgYrjCd6vTee9i8/B+D4zJKJT5TguOl0KkpPEbXHjmeor8AZYrVsrYUHdqRBMX1pjA==", + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/graphql-scalars/-/graphql-scalars-1.23.0.tgz", + "integrity": "sha512-YTRNcwitkn8CqYcleKOx9IvedA8JIERn8BRq21nlKgOr4NEcTaWEG0sT+H92eF3ALTFbPgsqfft4cw+MGgv0Gg==", "requires": { "tslib": "^2.5.0" } }, - "graphql-subscriptions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/graphql-subscriptions/-/graphql-subscriptions-2.0.0.tgz", - "integrity": "sha512-s6k2b8mmt9gF9pEfkxsaO1lTxaySfKoEJzEfmwguBbQ//Oq23hIXCfR1hm4kdh5hnR20RdwB+s3BCb+0duHSZA==", - "requires": { - "iterall": "^1.3.0" - } - }, "graphql-yoga": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/graphql-yoga/-/graphql-yoga-5.0.0.tgz", - "integrity": "sha512-ZvZlO8MHMDWuLRoDhvJQnXg8SOJD0iDaCA+M/zWuD26AlhEugOEbpnhw/645oqXTYtvHsM91WyxtV7p5XJWYMg==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/graphql-yoga/-/graphql-yoga-5.6.3.tgz", + "integrity": "sha512-JtZ3r/QdkGpdi+8XfPuG+6Nb+V5wNMg2LYChSIATes5LhcIx3pbOkm/nWoGT/SA5LqlRyp+e0sxmVNEz8qN5TQ==", "requires": { - "@envelop/core": "^5.0.0", - "@graphql-tools/executor": "^1.0.0", - "@graphql-tools/schema": "^10.0.0", - "@graphql-tools/utils": "^10.0.0", + "@envelop/core": "^5.0.1", + "@graphql-tools/executor": "^1.3.0", + "@graphql-tools/schema": "^10.0.4", + "@graphql-tools/utils": "^10.3.2", "@graphql-yoga/logger": "^2.0.0", - "@graphql-yoga/subscription": "^5.0.0", - "@whatwg-node/fetch": "^0.9.7", - "@whatwg-node/server": "^0.9.1", + "@graphql-yoga/subscription": "^5.0.1", + "@whatwg-node/fetch": "^0.9.18", + "@whatwg-node/server": "^0.9.41", "dset": "^3.1.1", "lru-cache": "^10.0.0", "tslib": "^2.5.2" @@ -1096,15 +1191,10 @@ } } }, - "iterall": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz", - "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==" - }, "libphonenumber-js": { - "version": "1.10.15", - "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.15.tgz", - "integrity": "sha512-sLeVLmWX17VCKKulc+aDIRHS95TxoTsKMRJi5s5gJdwlqNzMWcBCtSHHruVyXjqfi67daXM2SnLf2juSrdx5Sg==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.11.5.tgz", + "integrity": "sha512-TwHR5BZxGRODtAfz03szucAkjT5OArXr+94SMtAM2pYXIlQNVMrxvb6uSCbnaJJV6QXEyICk7+l6QPgn72WHhg==", "devOptional": true }, "lodash.get": { @@ -1127,19 +1217,14 @@ "dev": true }, "prisma": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.4.2.tgz", - "integrity": "sha512-GDMZwZy7mysB2oXU+angQqJ90iaPFdD0rHaZNkn+dio5NRkGLmMqmXs31//tg/qXT3iB0cTQwnGGQNuirhSTZg==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.18.0.tgz", + "integrity": "sha512-+TrSIxZsh64OPOmaSgVPH7ALL9dfU0jceYaMJXsNrTkFHO7/3RANi5K2ZiPB1De9+KDxCWn7jvRq8y8pvk+o9g==", "devOptional": true, "requires": { - "@prisma/engines": "5.4.2" + "@prisma/engines": "5.18.0" } }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==" - }, "reflect-metadata": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", @@ -1159,9 +1244,9 @@ "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==" }, "ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "requires": { "@cspotcode/source-map-support": "^0.8.0", @@ -1180,38 +1265,38 @@ } }, "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" }, "type-graphql": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/type-graphql/-/type-graphql-2.0.0-beta.3.tgz", - "integrity": "sha512-5HEiQaWHPYhPmbJuMmT+IZgjsnbNWsW37osUISwgr5EpcHZ4krLl8eBoOfjFya4mxAWYshlpSO1ahaucJQqM5g==", + "version": "2.0.0-rc.2", + "resolved": "https://registry.npmjs.org/type-graphql/-/type-graphql-2.0.0-rc.2.tgz", + "integrity": "sha512-DJ8erG1cmjteMrOhFIkBHOqRM+L+wCJxvNjbbj1Y+q2r4HZkB1qOSS4ZD4AaoAfRPAp1yU23gMtmzf0jen/FFA==", "requires": { + "@graphql-yoga/subscription": "^5.0.0", "@types/node": "*", - "@types/semver": "^7.5.0", + "@types/semver": "^7.5.6", "graphql-query-complexity": "^0.12.0", - "graphql-subscriptions": "^2.0.0", "semver": "^7.5.4", - "tslib": "^2.6.0" + "tslib": "^2.6.2" } }, "typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "dev": true }, "undici-types": { - "version": "5.25.3", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", - "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==" + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==" }, "urlpattern-polyfill": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-9.0.0.tgz", - "integrity": "sha512-WHN8KDQblxd32odxeIgo83rdVDE2bvdkb86it7bMhYZwWKJz0+O0RK/eZiHYnM+zgt/U7hAHOlCQGfjjvSkw2g==" + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==" }, "v8-compile-cache-lib": { "version": "3.0.1", @@ -1220,9 +1305,9 @@ "dev": true }, "validator": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", - "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.12.0.tgz", + "integrity": "sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==", "devOptional": true }, "value-or-promise": { diff --git a/experiments/postgres/package.json b/experiments/postgres/package.json index 396b288be..b76f6d58a 100644 --- a/experiments/postgres/package.json +++ b/experiments/postgres/package.json @@ -6,22 +6,22 @@ "seed": "prisma db seed" }, "dependencies": { - "@prisma/client": "^5.4.2", - "@types/graphql-fields": "^1.3.8", - "graphql": "^16.8.1", + "@prisma/client": "^5.18.0", + "@types/graphql-fields": "^1.3.9", + "graphql": "^16.9.0", "graphql-fields": "^2.0.3", - "graphql-scalars": "^1.22.4", - "graphql-yoga": "^5.0.0", - "reflect-metadata": "^0.1.13", - "tslib": "^2.6.2", - "type-graphql": "2.0.0-beta.3" + "graphql-scalars": "^1.23.0", + "graphql-yoga": "^5.6.3", + "reflect-metadata": "0.1.13", + "tslib": "^2.6.3", + "type-graphql": "2.0.0-rc.2" }, "devDependencies": { - "@types/node": "^20.8.7", - "class-validator": "^0.14.0", - "prisma": "^5.4.2", - "ts-node": "^10.9.1", - "typescript": "~5.2.2" + "@types/node": "^22.1.0", + "class-validator": "^0.14.1", + "prisma": "^5.18.0", + "ts-node": "^10.9.2", + "typescript": "~5.5.4" }, "prisma": { "seed": "ts-node ./prisma/seed.ts" diff --git a/experiments/postgres/prisma/generated/client/default.d.ts b/experiments/postgres/prisma/generated/client/default.d.ts new file mode 100644 index 000000000..34c616106 --- /dev/null +++ b/experiments/postgres/prisma/generated/client/default.d.ts @@ -0,0 +1 @@ +export * from './index' \ No newline at end of file diff --git a/experiments/postgres/prisma/generated/client/default.js b/experiments/postgres/prisma/generated/client/default.js new file mode 100644 index 000000000..fa52f0cd2 --- /dev/null +++ b/experiments/postgres/prisma/generated/client/default.js @@ -0,0 +1 @@ +module.exports = { ...require('.') } \ No newline at end of file diff --git a/experiments/postgres/prisma/generated/client/edge.d.ts b/experiments/postgres/prisma/generated/client/edge.d.ts index 34c616106..479a9ab23 100644 --- a/experiments/postgres/prisma/generated/client/edge.d.ts +++ b/experiments/postgres/prisma/generated/client/edge.d.ts @@ -1 +1 @@ -export * from './index' \ No newline at end of file +export * from './default' \ No newline at end of file diff --git a/experiments/postgres/prisma/generated/client/edge.js b/experiments/postgres/prisma/generated/client/edge.js index 728bdd6aa..e296171cb 100644 --- a/experiments/postgres/prisma/generated/client/edge.js +++ b/experiments/postgres/prisma/generated/client/edge.js @@ -21,7 +21,8 @@ const { warnOnce, defineDmmfProperty, Public, -} = require('./runtime/edge') + getRuntime +} = require('./runtime/edge.js') const Prisma = {} @@ -30,12 +31,12 @@ exports.Prisma = Prisma exports.$Enums = {} /** - * Prisma Client JS version: 5.4.2 - * Query Engine version: ac9d7041ed77bcc8a8dbd2ab6616b39013829574 + * Prisma Client JS version: 5.18.0 + * Query Engine version: 4c784e32044a8a016d99474bd02a3b6123742169 */ Prisma.prismaVersion = { - client: "5.4.2", - engine: "ac9d7041ed77bcc8a8dbd2ab6616b39013829574" + client: "5.18.0", + engine: "4c784e32044a8a016d99474bd02a3b6123742169" } Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; @@ -290,6 +291,7 @@ const config = { "previewFeatures": [ "fullTextSearch" ], + "sourceFilePath": "/home/majkel/development/typegraphql-prisma/experiments/postgres/prisma/schema.prisma", "isCustomOutput": true }, "relativeEnvPaths": { @@ -297,8 +299,8 @@ const config = { "schemaEnvPath": "../../.env" }, "relativePath": "../..", - "clientVersion": "5.4.2", - "engineVersion": "ac9d7041ed77bcc8a8dbd2ab6616b39013829574", + "clientVersion": "5.18.0", + "engineVersion": "4c784e32044a8a016d99474bd02a3b6123742169", "datasourceNames": [ "postgres" ], @@ -312,15 +314,15 @@ const config = { } } }, - "inlineSchema": "ZGF0YXNvdXJjZSBwb3N0Z3JlcyB7CiAgcHJvdmlkZXIgPSAicG9zdGdyZXNxbCIKICB1cmwgICAgICA9IGVudigiREFUQUJBU0VfVVJMIikKfQoKZ2VuZXJhdG9yIGNsaWVudCB7CiAgcHJvdmlkZXIgICAgICAgID0gInByaXNtYS1jbGllbnQtanMiCiAgLy8gYmluYXJ5VGFyZ2V0cyAgID0gWyJ3aW5kb3dzIiwgImRlYmlhbi1vcGVuc3NsLTEuMS54Il0KICBvdXRwdXQgICAgICAgICAgPSAiLi4vcHJpc21hL2dlbmVyYXRlZC9jbGllbnQiCiAgcHJldmlld0ZlYXR1cmVzID0gWyJmdWxsVGV4dFNlYXJjaCJdCn0KCmdlbmVyYXRvciB0eXBlZ3JhcGhxbCB7CiAgcHJvdmlkZXIgICAgICAgICAgICAgICAgID0gIm5vZGUgLi4vLi4vc3JjL2NsaS9kZXYudHMiCiAgb3V0cHV0ICAgICAgICAgICAgICAgICAgID0gIi4uL3ByaXNtYS9nZW5lcmF0ZWQvdHlwZS1ncmFwaHFsIgogIGVtaXRETU1GICAgICAgICAgICAgICAgICA9IHRydWUKICAvLyBlbWl0VHJhbnNwaWxlZENvZGUgICAgICAgPSB0cnVlCiAgc2ltcGxlUmVzb2x2ZXJzICAgICAgICAgID0gZmFsc2UKICAvLyB1c2VPcmlnaW5hbE1hcHBpbmcgICAgICAgPSB0cnVlCiAgdXNlVW5jaGVja2VkU2NhbGFySW5wdXRzID0gZmFsc2UKICBlbWl0SWRBc0lEVHlwZSAgICAgICAgICAgPSB0cnVlCiAgLy8gZW1pdE9ubHkgICAgICAgICAgICAgICAgID0gWyJlbnVtcyIsICJtb2RlbHMiXQogIGN1c3RvbVByaXNtYUltcG9ydFBhdGggICA9ICIuLi9jbGllbnQiCiAgY29udGV4dFByaXNtYUtleSAgICAgICAgID0gInByaXNtYUNsaWVudCIKICB1c2VTaW1wbGVJbnB1dHMgICAgICAgICAgPSB0cnVlCiAgZW1pdFJlZHVuZGFudFR5cGVzSW5mbyAgID0gdHJ1ZQogIGZvcm1hdEdlbmVyYXRlZENvZGUgICAgICA9ICJ0c2MiCn0KCi8vIFJvbGUgZW51bSBjb21tZW50Ci8vLyBSb2xlIGVudW0gZG9jCmVudW0gUm9sZSB7CiAgVVNFUgogIEFETUlOCn0KCi8vIFVzZXIgbW9kZWwgY29tbWVudAovLy8gVXNlciBtb2RlbCBkb2MKLy8vIEBAVHlwZUdyYXBoUUwudHlwZShuYW1lOiAiTWFpblVzZXIiKQptb2RlbCBVc2VyIHsKICAvLyBVc2VyIG1vZGVsIGZpZWxkIGNvbW1lbnQKICAvLy8gVXNlciBtb2RlbCBmaWVsZCBkb2MKICBpZCAgICAgICAgICBJbnQgICAgICBAaWQgQGRlZmF1bHQoYXV0b2luY3JlbWVudCgpKQogIGVtYWlsICAgICAgIFN0cmluZyAgIEB1bmlxdWUKICAvLy8gcmVuYW1lZCBmaWVsZCBkb2MKICAvLy8gQFR5cGVHcmFwaFFMLmZpZWxkKG5hbWU6ICJmaXJzdE5hbWUiKQogIG5hbWUgICAgICAgIFN0cmluZz8KICBhZ2UgICAgICAgICBJbnQKICAvLy8gQFR5cGVHcmFwaFFMLmZpZWxkKG5hbWU6ICJhY2NvdW50QmFsYW5jZSIpCiAgYmFsYW5jZSAgICAgRmxvYXQKICBhbW91bnQgICAgICBGbG9hdAogIC8vLyBAVHlwZUdyYXBoUUwuZmllbGQobmFtZTogImNsaWVudFBvc3RzIikKICBwb3N0cyAgICAgICBwb3N0W10gICBAcmVsYXRpb24oInBvc3RzIikKICByb2xlICAgICAgICBSb2xlCiAgLy8vIEBUeXBlR3JhcGhRTC5vbWl0KG91dHB1dDogdHJ1ZSkKICBlZGl0b3JQb3N0cyBwb3N0W10gICBAcmVsYXRpb24oImVkaXRvclBvc3RzIikKICBncmFkZXMgICAgICBJbnRbXQogIGFsaWFzZXMgICAgIFN0cmluZ1tdCn0KCmVudW0gUG9zdEtpbmQgewogIEJMT0cKICBBRFZFUlQKfQoKbW9kZWwgcG9zdCB7CiAgLy8vIGZpcnN0IGxpbmUgb2YgY29tbWVudAogIC8vLyBzZWNvbmQgbGluZSBvZiBjb21tZW50CiAgLy8vIHRoaXJkIGxpbmUgb2YgY29tbWVudAogIHV1aWQgICAgICBTdHJpbmcgICAgQGlkIEBkZWZhdWx0KHV1aWQoKSkKICBjcmVhdGVkQXQgRGF0ZVRpbWUgIEBkZWZhdWx0KG5vdygpKQogIC8vLyBAVHlwZUdyYXBoUUwub21pdChpbnB1dDogWyJjcmVhdGUiLCAidXBkYXRlIl0pCiAgdXBkYXRlZEF0IERhdGVUaW1lICBAdXBkYXRlZEF0CiAgLy8vIEBUeXBlR3JhcGhRTC5vbWl0KGlucHV0OiB0cnVlKQogIC8vLyBAVHlwZUdyYXBoUUwuZmllbGQobmFtZTogImlzUHVibGlzaGVkIikKICBwdWJsaXNoZWQgQm9vbGVhbiAgIEBkZWZhdWx0KGZhbHNlKQogIHRpdGxlICAgICBTdHJpbmcKICAvLy8gQFR5cGVHcmFwaFFMLm9taXQob3V0cHV0OiB0cnVlKQogIHN1YnRpdGxlICBTdHJpbmcKICBjb250ZW50ICAgU3RyaW5nPwogIGF1dGhvciAgICBVc2VyICAgICAgQHJlbGF0aW9uKGZpZWxkczogW2F1dGhvcklkXSwgcmVmZXJlbmNlczogW2lkXSwgbmFtZTogInBvc3RzIiwgb25EZWxldGU6IENhc2NhZGUpCiAgYXV0aG9ySWQgIEludAogIC8vLyBAVHlwZUdyYXBoUUwub21pdChvdXRwdXQ6IHRydWUpCiAgZWRpdG9yICAgIFVzZXI/ICAgICBAcmVsYXRpb24oZmllbGRzOiBbZWRpdG9ySWRdLCByZWZlcmVuY2VzOiBbaWRdLCBuYW1lOiAiZWRpdG9yUG9zdHMiLCBvbkRlbGV0ZTogQ2FzY2FkZSkKICAvLy8gQFR5cGVHcmFwaFFMLm9taXQob3V0cHV0OiB0cnVlKQogIGVkaXRvcklkICBJbnQ/CiAga2luZCAgICAgIFBvc3RLaW5kPwogIG1ldGFkYXRhICBKc29uCn0KCm1vZGVsIENhdGVnb3J5IHsKICBuYW1lICAgU3RyaW5nCiAgc2x1ZyAgIFN0cmluZwogIG51bWJlciBJbnQKCiAgQEB1bmlxdWUoW3NsdWcsIG51bWJlcl0sIG5hbWU6ICJjYXRlZ29yeUNvbXBvdW5kVW5pcXVlIikKfQoKbW9kZWwgUGF0aWVudCB7CiAgZmlyc3ROYW1lIFN0cmluZwogIGxhc3ROYW1lICBTdHJpbmcKICBlbWFpbCAgICAgU3RyaW5nCgogIEBAaWQoW2ZpcnN0TmFtZSwgbGFzdE5hbWVdKQp9Cgptb2RlbCBNb3ZpZSB7CiAgZGlyZWN0b3JGaXJzdE5hbWUgU3RyaW5nCiAgZGlyZWN0b3JMYXN0TmFtZSAgU3RyaW5nCiAgZGlyZWN0b3IgICAgICAgICAgRGlyZWN0b3IgQHJlbGF0aW9uKGZpZWxkczogW2RpcmVjdG9yRmlyc3ROYW1lLCBkaXJlY3Rvckxhc3ROYW1lXSwgcmVmZXJlbmNlczogW2ZpcnN0TmFtZSwgbGFzdE5hbWVdLCBvbkRlbGV0ZTogQ2FzY2FkZSkKICB0aXRsZSAgICAgICAgICAgICBTdHJpbmcKCiAgQEBpZChbZGlyZWN0b3JGaXJzdE5hbWUsIGRpcmVjdG9yTGFzdE5hbWUsIHRpdGxlXSwgbmFtZTogIm1vdmllQ29tcG91bmRJZCIpCn0KCm1vZGVsIERpcmVjdG9yIHsKICBmaXJzdE5hbWUgU3RyaW5nCiAgbGFzdE5hbWUgIFN0cmluZwogIG1vdmllcyAgICBNb3ZpZVtdCgogIEBAaWQoW2ZpcnN0TmFtZSwgbGFzdE5hbWVdKQp9Cgptb2RlbCBQcm9ibGVtIHsKICBpZCAgICAgICAgICBJbnQgICAgICAgQGlkIEBkZWZhdWx0KGF1dG9pbmNyZW1lbnQoKSkKICBwcm9ibGVtVGV4dCBTdHJpbmcKICBsaWtlZEJ5ICAgICBDcmVhdG9yW10KICBjcmVhdG9yICAgICBDcmVhdG9yPyAgQHJlbGF0aW9uKG5hbWU6ICJjcmVhdG9yIiwgZmllbGRzOiBbY3JlYXRvcklkXSwgcmVmZXJlbmNlczogW2lkXSwgb25EZWxldGU6IENhc2NhZGUpCiAgY3JlYXRvcklkICAgSW50Pwp9Cgptb2RlbCBDcmVhdG9yIHsKICBpZCAgICAgICBJbnQgICAgICAgQGlkIEBkZWZhdWx0KGF1dG9pbmNyZW1lbnQoKSkKICBuYW1lICAgICBTdHJpbmcKICBsaWtlcyAgICBQcm9ibGVtW10KICBwcm9ibGVtcyBQcm9ibGVtW10gQHJlbGF0aW9uKCJjcmVhdG9yIikKfQoKbW9kZWwgTmF0aXZlVHlwZU1vZGVsIHsKICBpZCAgICAgIEludCAgICAgIEBpZCBAZGVmYXVsdChhdXRvaW5jcmVtZW50KCkpIEBwb3N0Z3Jlcy5JbnRlZ2VyCiAgYmlnSW50ICBCaWdJbnQ/ICBAcG9zdGdyZXMuQmlnSW50CiAgYnl0ZUEgICBCeXRlcz8gICBAcG9zdGdyZXMuQnl0ZUEKICBkZWNpbWFsIERlY2ltYWw/IEBwb3N0Z3Jlcy5EZWNpbWFsCn0KCi8vLyBAQFR5cGVHcmFwaFFMLnR5cGUocGx1cmFsOiAiZXF1aXBtZW50cyIpCm1vZGVsIEVxdWlwbWVudCB7CiAgaWQgICBTdHJpbmcgIEBpZCBAZGVmYXVsdChjdWlkKCkpCiAgbmFtZSBTdHJpbmc/Cn0KCi8vLyBAQFR5cGVHcmFwaFFMLm9taXQob3V0cHV0OiB0cnVlKQptb2RlbCBIaWRkZW4gewogIGlkICAgU3RyaW5nICBAaWQgQGRlZmF1bHQoY3VpZCgpKQogIG5hbWUgU3RyaW5nPwp9Cg==", + "inlineSchema": "datasource postgres {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\ngenerator client {\n provider = \"prisma-client-js\"\n // binaryTargets = [\"windows\", \"debian-openssl-1.1.x\"]\n output = \"../prisma/generated/client\"\n previewFeatures = [\"fullTextSearch\"]\n}\n\ngenerator typegraphql {\n provider = \"node ../../src/cli/dev.ts\"\n output = \"../prisma/generated/type-graphql\"\n emitDMMF = true\n // emitTranspiledCode = true\n simpleResolvers = false\n // useOriginalMapping = true\n useUncheckedScalarInputs = false\n emitIdAsIDType = true\n // emitOnly = [\"enums\", \"models\"]\n customPrismaImportPath = \"../client\"\n contextPrismaKey = \"prismaClient\"\n useSimpleInputs = true\n emitRedundantTypesInfo = true\n formatGeneratedCode = \"tsc\"\n}\n\n// Role enum comment\n/// Role enum doc\nenum Role {\n USER\n ADMIN\n}\n\n// User model comment\n/// User model doc\n/// @@TypeGraphQL.type(name: \"MainUser\")\nmodel User {\n // User model field comment\n /// User model field doc\n id Int @id @default(autoincrement())\n email String @unique\n /// renamed field doc\n /// @TypeGraphQL.field(name: \"firstName\")\n name String?\n age Int\n /// @TypeGraphQL.field(name: \"accountBalance\")\n balance Float\n amount Float\n /// @TypeGraphQL.field(name: \"clientPosts\")\n posts post[] @relation(\"posts\")\n role Role\n /// @TypeGraphQL.omit(output: true)\n editorPosts post[] @relation(\"editorPosts\")\n grades Int[]\n aliases String[]\n}\n\nenum PostKind {\n BLOG\n ADVERT\n}\n\nmodel post {\n /// first line of comment\n /// second line of comment\n /// third line of comment\n uuid String @id @default(uuid())\n createdAt DateTime @default(now())\n /// @TypeGraphQL.omit(input: [\"create\", \"update\"])\n updatedAt DateTime @updatedAt\n /// @TypeGraphQL.omit(input: true)\n /// @TypeGraphQL.field(name: \"isPublished\")\n published Boolean @default(false)\n title String\n /// @TypeGraphQL.omit(output: true)\n subtitle String\n content String?\n author User @relation(fields: [authorId], references: [id], name: \"posts\", onDelete: Cascade)\n authorId Int\n /// @TypeGraphQL.omit(output: true)\n editor User? @relation(fields: [editorId], references: [id], name: \"editorPosts\", onDelete: Cascade)\n /// @TypeGraphQL.omit(output: true)\n editorId Int?\n kind PostKind?\n metadata Json\n}\n\nmodel Category {\n name String\n slug String\n number Int\n\n @@unique([slug, number], name: \"categoryCompoundUnique\")\n}\n\nmodel Patient {\n firstName String\n lastName String\n email String\n\n @@id([firstName, lastName])\n}\n\nmodel Movie {\n directorFirstName String\n directorLastName String\n director Director @relation(fields: [directorFirstName, directorLastName], references: [firstName, lastName], onDelete: Cascade)\n title String\n\n @@id([directorFirstName, directorLastName, title], name: \"movieCompoundId\")\n}\n\nmodel Director {\n firstName String\n lastName String\n movies Movie[]\n\n @@id([firstName, lastName])\n}\n\nmodel Problem {\n id Int @id @default(autoincrement())\n problemText String\n likedBy Creator[]\n creator Creator? @relation(name: \"creator\", fields: [creatorId], references: [id], onDelete: Cascade)\n creatorId Int?\n}\n\nmodel Creator {\n id Int @id @default(autoincrement())\n name String\n likes Problem[]\n problems Problem[] @relation(\"creator\")\n}\n\nmodel NativeTypeModel {\n id Int @id @default(autoincrement()) @postgres.Integer\n bigInt BigInt? @postgres.BigInt\n byteA Bytes? @postgres.ByteA\n decimal Decimal? @postgres.Decimal\n}\n\n/// @@TypeGraphQL.type(plural: \"equipments\")\nmodel Equipment {\n id String @id @default(cuid())\n name String?\n}\n\n/// @@TypeGraphQL.omit(output: true)\nmodel Hidden {\n id String @id @default(cuid())\n name String?\n}\n", "inlineSchemaHash": "4a58739cfc99389b8e007daef18ab6b9cbb45f71a3644eba235943a45bde9d1a", - "noEngine": false + "copyEngine": true } config.dirname = '/' -config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"User model field doc\"},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"renamed field doc\\\\n@TypeGraphQL.field(name: \\\"firstName\\\")\"},{\"name\":\"age\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"balance\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.field(name: \\\"accountBalance\\\")\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"posts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"post\",\"relationName\":\"posts\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.field(name: \\\"clientPosts\\\")\"},{\"name\":\"role\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Role\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"editorPosts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"post\",\"relationName\":\"editorPosts\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(output: true)\"},{\"name\":\"grades\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aliases\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"User model doc\\\\n@@TypeGraphQL.type(name: \\\"MainUser\\\")\"},\"post\":{\"dbName\":null,\"fields\":[{\"name\":\"uuid\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"first line of comment\\\\nsecond line of comment\\\\nthird line of comment\"},{\"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,\"documentation\":\"@TypeGraphQL.omit(input: [\\\"create\\\", \\\"update\\\"])\"},{\"name\":\"published\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(input: true)\\\\n@TypeGraphQL.field(name: \\\"isPublished\\\")\"},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subtitle\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(output: true)\"},{\"name\":\"content\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"author\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"posts\",\"relationFromFields\":[\"authorId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"authorId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"editor\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"editorPosts\",\"relationFromFields\":[\"editorId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(output: true)\"},{\"name\":\"editorId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(output: true)\"},{\"name\":\"kind\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PostKind\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"metadata\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Category\":{\"dbName\":null,\"fields\":[{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"slug\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"number\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"slug\",\"number\"]],\"uniqueIndexes\":[{\"name\":\"categoryCompoundUnique\",\"fields\":[\"slug\",\"number\"]}],\"isGenerated\":false},\"Patient\":{\"dbName\":null,\"fields\":[{\"name\":\"firstName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"firstName\",\"lastName\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Movie\":{\"dbName\":null,\"fields\":[{\"name\":\"directorFirstName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"directorLastName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"director\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Director\",\"relationName\":\"DirectorToMovie\",\"relationFromFields\":[\"directorFirstName\",\"directorLastName\"],\"relationToFields\":[\"firstName\",\"lastName\"],\"relationOnDelete\":\"Cascade\",\"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}],\"primaryKey\":{\"name\":\"movieCompoundId\",\"fields\":[\"directorFirstName\",\"directorLastName\",\"title\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Director\":{\"dbName\":null,\"fields\":[{\"name\":\"firstName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"movies\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Movie\",\"relationName\":\"DirectorToMovie\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"firstName\",\"lastName\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Problem\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"problemText\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"likedBy\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Creator\",\"relationName\":\"CreatorToProblem\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"creator\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Creator\",\"relationName\":\"creator\",\"relationFromFields\":[\"creatorId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"creatorId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Creator\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"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\":\"likes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Problem\",\"relationName\":\"CreatorToProblem\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"problems\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Problem\",\"relationName\":\"creator\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"NativeTypeModel\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bigInt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"byteA\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Bytes\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"decimal\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Equipment\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"@@TypeGraphQL.type(plural: \\\"equipments\\\")\"},\"Hidden\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"@@TypeGraphQL.omit(output: true)\"}},\"enums\":{\"Role\":{\"values\":[{\"name\":\"USER\",\"dbName\":null},{\"name\":\"ADMIN\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Role enum doc\"},\"PostKind\":{\"values\":[{\"name\":\"BLOG\",\"dbName\":null},{\"name\":\"ADVERT\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"User model field doc\"},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"renamed field doc\\\\n@TypeGraphQL.field(name: \\\"firstName\\\")\"},{\"name\":\"age\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"balance\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.field(name: \\\"accountBalance\\\")\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"posts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"post\",\"relationName\":\"posts\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.field(name: \\\"clientPosts\\\")\"},{\"name\":\"role\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Role\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"editorPosts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"post\",\"relationName\":\"editorPosts\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(output: true)\"},{\"name\":\"grades\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aliases\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"User model doc\\\\n@@TypeGraphQL.type(name: \\\"MainUser\\\")\"},\"post\":{\"dbName\":null,\"fields\":[{\"name\":\"uuid\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"first line of comment\\\\nsecond line of comment\\\\nthird line of comment\"},{\"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,\"documentation\":\"@TypeGraphQL.omit(input: [\\\"create\\\", \\\"update\\\"])\"},{\"name\":\"published\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(input: true)\\\\n@TypeGraphQL.field(name: \\\"isPublished\\\")\"},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subtitle\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(output: true)\"},{\"name\":\"content\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"author\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"posts\",\"relationFromFields\":[\"authorId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"authorId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"editor\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"editorPosts\",\"relationFromFields\":[\"editorId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(output: true)\"},{\"name\":\"editorId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(output: true)\"},{\"name\":\"kind\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PostKind\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"metadata\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Category\":{\"dbName\":null,\"fields\":[{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"slug\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"number\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"slug\",\"number\"]],\"uniqueIndexes\":[{\"name\":\"categoryCompoundUnique\",\"fields\":[\"slug\",\"number\"]}],\"isGenerated\":false},\"Patient\":{\"dbName\":null,\"fields\":[{\"name\":\"firstName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"firstName\",\"lastName\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Movie\":{\"dbName\":null,\"fields\":[{\"name\":\"directorFirstName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"directorLastName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"director\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Director\",\"relationName\":\"DirectorToMovie\",\"relationFromFields\":[\"directorFirstName\",\"directorLastName\"],\"relationToFields\":[\"firstName\",\"lastName\"],\"relationOnDelete\":\"Cascade\",\"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}],\"primaryKey\":{\"name\":\"movieCompoundId\",\"fields\":[\"directorFirstName\",\"directorLastName\",\"title\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Director\":{\"dbName\":null,\"fields\":[{\"name\":\"firstName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"movies\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Movie\",\"relationName\":\"DirectorToMovie\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"firstName\",\"lastName\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Problem\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"problemText\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"likedBy\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Creator\",\"relationName\":\"CreatorToProblem\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"creator\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Creator\",\"relationName\":\"creator\",\"relationFromFields\":[\"creatorId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"creatorId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Creator\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"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\":\"likes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Problem\",\"relationName\":\"CreatorToProblem\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"problems\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Problem\",\"relationName\":\"creator\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"NativeTypeModel\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bigInt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"byteA\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Bytes\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"decimal\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Equipment\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"@@TypeGraphQL.type(plural: \\\"equipments\\\")\"},\"Hidden\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"@@TypeGraphQL.omit(output: true)\"}},\"enums\":{\"Role\":{\"values\":[{\"name\":\"USER\",\"dbName\":null},{\"name\":\"ADMIN\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Role enum doc\"},\"PostKind\":{\"values\":[{\"name\":\"BLOG\",\"dbName\":null},{\"name\":\"ADVERT\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") defineDmmfProperty(exports.Prisma, config.runtimeDataModel) - +config.engineWasm = undefined config.injectableEdgeEnv = () => ({ parsed: { diff --git a/experiments/postgres/prisma/generated/client/index-browser.js b/experiments/postgres/prisma/generated/client/index-browser.js index 677973027..64bec277e 100644 --- a/experiments/postgres/prisma/generated/client/index-browser.js +++ b/experiments/postgres/prisma/generated/client/index-browser.js @@ -6,8 +6,8 @@ const { objectEnumValues, makeStrictEnum, Public, - detectRuntime, -} = require('./runtime/index-browser') + getRuntime, +} = require('./runtime/index-browser.js') const Prisma = {} @@ -16,37 +16,43 @@ exports.Prisma = Prisma exports.$Enums = {} /** - * Prisma Client JS version: 5.4.2 - * Query Engine version: ac9d7041ed77bcc8a8dbd2ab6616b39013829574 + * Prisma Client JS version: 5.18.0 + * Query Engine version: 4c784e32044a8a016d99474bd02a3b6123742169 */ Prisma.prismaVersion = { - client: "5.4.2", - engine: "ac9d7041ed77bcc8a8dbd2ab6616b39013829574" + client: "5.18.0", + engine: "4c784e32044a8a016d99474bd02a3b6123742169" } Prisma.PrismaClientKnownRequestError = () => { - throw new Error(`PrismaClientKnownRequestError is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 = () => { - throw new Error(`PrismaClientUnknownRequestError is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 = () => { - throw new Error(`PrismaClientRustPanicError is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 = () => { - throw new Error(`PrismaClientInitializationError is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 = () => { - throw new Error(`PrismaClientValidationError is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 = () => { - throw new Error(`NotFoundError is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 @@ -54,20 +60,24 @@ Prisma.Decimal = Decimal * Re-export of sql-template-tag */ Prisma.sql = () => { - throw new Error(`sqltag is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 = () => { - throw new Error(`empty is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 = () => { - throw new Error(`join is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 = () => { - throw new Error(`raw is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 @@ -75,12 +85,14 @@ Prisma.validator = Public.validator * Extensions */ Prisma.getExtensionContext = () => { - throw new Error(`Extensions.getExtensionContext is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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 = () => { - throw new Error(`Extensions.defineExtension is unable to be run ${runtimeDescription}. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`, + 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`, )} /** @@ -292,23 +304,19 @@ class PrismaClient { constructor() { return new Proxy(this, { get(target, prop) { - const runtime = detectRuntime() - const edgeRuntimeName = { - 'workerd': 'Cloudflare Workers', - 'deno': 'Deno and Deno Deploy', - 'netlify': 'Netlify Edge Functions', - 'edge-light': 'Vercel Edge Functions', - }[runtime] - - let message = 'PrismaClient is unable to run in ' - if (edgeRuntimeName !== undefined) { - message += edgeRuntimeName + '. As an alternative, try Accelerate: https://pris.ly/d/accelerate.' + 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 += 'this browser environment, or has been bundled for the browser (running in `' + runtime + '`).' + 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://github.com/prisma/prisma/issues` +If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` throw new Error(message) } diff --git a/experiments/postgres/prisma/generated/client/index.d.ts b/experiments/postgres/prisma/generated/client/index.d.ts index 6d999fd64..ad7957b91 100644 --- a/experiments/postgres/prisma/generated/client/index.d.ts +++ b/experiments/postgres/prisma/generated/client/index.d.ts @@ -3,7 +3,7 @@ * Client **/ -import * as runtime from './runtime/library'; +import * as runtime from './runtime/library.js'; import $Types = runtime.Types // general types import $Public = runtime.Types.Public import $Utils = runtime.Types.Utils @@ -114,8 +114,8 @@ export const PostKind: typeof $Enums.PostKind * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). */ export class PrismaClient< - T extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, - U = 'log' extends keyof T ? T['log'] extends Array ? Prisma.GetEvents : never : never, + 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'] } @@ -135,7 +135,7 @@ export class PrismaClient< * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). */ - constructor(optionsArg ?: Prisma.Subset); + constructor(optionsArg ?: Prisma.Subset); $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): void; /** @@ -219,7 +219,7 @@ export class PrismaClient< $transaction(fn: (prisma: Omit) => $Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise - $extends: $Extensions.ExtendsHook<'extends', Prisma.TypeMapCb, ExtArgs> + $extends: $Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs> /** * `prisma.user`: Exposes CRUD operations for the **User** model. @@ -387,8 +387,8 @@ export namespace Prisma { export import Exact = $Public.Exact /** - * Prisma Client JS version: 5.4.2 - * Query Engine version: ac9d7041ed77bcc8a8dbd2ab6616b39013829574 + * Prisma Client JS version: 5.18.0 + * Query Engine version: 4c784e32044a8a016d99474bd02a3b6123742169 */ export type PrismaVersion = { client: string @@ -515,6 +515,11 @@ export namespace Prisma { include: any } + type SelectAndOmit = { + select: any + omit: any + } + /** * Get the type of the value, that the Promise holds. */ @@ -563,7 +568,9 @@ export namespace Prisma { } & (T extends SelectAndInclude ? 'Please either choose `select` or `include`.' - : {}) + : T extends SelectAndOmit + ? 'Please either choose `select` or `omit`.' + : {}) /** * Subset + Intersection @@ -820,79 +827,82 @@ export namespace Prisma { postgres?: Datasource } - - interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs}, $Utils.Record> { - returns: Prisma.TypeMap + interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs, clientOptions: PrismaClientOptions }, $Utils.Record> { + returns: Prisma.TypeMap } - export type TypeMap = { + export type TypeMap = { meta: { - modelProps: 'user' | 'post' | 'category' | 'patient' | 'movie' | 'director' | 'problem' | 'creator' | 'nativeTypeModel' | 'equipment' | 'hidden' + modelProps: "user" | "post" | "category" | "patient" | "movie" | "director" | "problem" | "creator" | "nativeTypeModel" | "equipment" | "hidden" txIsolationLevel: Prisma.TransactionIsolationLevel - }, + } model: { User: { payload: Prisma.$UserPayload fields: Prisma.UserFieldRefs operations: { findUnique: { - args: Prisma.UserFindUniqueArgs, + args: Prisma.UserFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.UserFindUniqueOrThrowArgs, + args: Prisma.UserFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { - args: Prisma.UserFindFirstArgs, + args: Prisma.UserFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.UserFindFirstOrThrowArgs, + args: Prisma.UserFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { - args: Prisma.UserFindManyArgs, + args: Prisma.UserFindManyArgs result: $Utils.PayloadToResult[] } create: { - args: Prisma.UserCreateArgs, + args: Prisma.UserCreateArgs result: $Utils.PayloadToResult } createMany: { - args: Prisma.UserCreateManyArgs, - result: Prisma.BatchPayload + args: Prisma.UserCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.UserCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] } delete: { - args: Prisma.UserDeleteArgs, + args: Prisma.UserDeleteArgs result: $Utils.PayloadToResult } update: { - args: Prisma.UserUpdateArgs, + args: Prisma.UserUpdateArgs result: $Utils.PayloadToResult } deleteMany: { - args: Prisma.UserDeleteManyArgs, - result: Prisma.BatchPayload + args: Prisma.UserDeleteManyArgs + result: BatchPayload } updateMany: { - args: Prisma.UserUpdateManyArgs, - result: Prisma.BatchPayload + args: Prisma.UserUpdateManyArgs + result: BatchPayload } upsert: { - args: Prisma.UserUpsertArgs, + args: Prisma.UserUpsertArgs result: $Utils.PayloadToResult } aggregate: { - args: Prisma.UserAggregateArgs, + args: Prisma.UserAggregateArgs result: $Utils.Optional } groupBy: { - args: Prisma.UserGroupByArgs, + args: Prisma.UserGroupByArgs result: $Utils.Optional[] } count: { - args: Prisma.UserCountArgs, + args: Prisma.UserCountArgs result: $Utils.Optional | number } } @@ -902,63 +912,67 @@ export namespace Prisma { fields: Prisma.postFieldRefs operations: { findUnique: { - args: Prisma.postFindUniqueArgs, + args: Prisma.postFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.postFindUniqueOrThrowArgs, + args: Prisma.postFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { - args: Prisma.postFindFirstArgs, + args: Prisma.postFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.postFindFirstOrThrowArgs, + args: Prisma.postFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { - args: Prisma.postFindManyArgs, + args: Prisma.postFindManyArgs result: $Utils.PayloadToResult[] } create: { - args: Prisma.postCreateArgs, + args: Prisma.postCreateArgs result: $Utils.PayloadToResult } createMany: { - args: Prisma.postCreateManyArgs, - result: Prisma.BatchPayload + args: Prisma.postCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.postCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] } delete: { - args: Prisma.postDeleteArgs, + args: Prisma.postDeleteArgs result: $Utils.PayloadToResult } update: { - args: Prisma.postUpdateArgs, + args: Prisma.postUpdateArgs result: $Utils.PayloadToResult } deleteMany: { - args: Prisma.postDeleteManyArgs, - result: Prisma.BatchPayload + args: Prisma.postDeleteManyArgs + result: BatchPayload } updateMany: { - args: Prisma.postUpdateManyArgs, - result: Prisma.BatchPayload + args: Prisma.postUpdateManyArgs + result: BatchPayload } upsert: { - args: Prisma.postUpsertArgs, + args: Prisma.postUpsertArgs result: $Utils.PayloadToResult } aggregate: { - args: Prisma.PostAggregateArgs, + args: Prisma.PostAggregateArgs result: $Utils.Optional } groupBy: { - args: Prisma.postGroupByArgs, + args: Prisma.postGroupByArgs result: $Utils.Optional[] } count: { - args: Prisma.postCountArgs, + args: Prisma.postCountArgs result: $Utils.Optional | number } } @@ -968,63 +982,67 @@ export namespace Prisma { fields: Prisma.CategoryFieldRefs operations: { findUnique: { - args: Prisma.CategoryFindUniqueArgs, + args: Prisma.CategoryFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.CategoryFindUniqueOrThrowArgs, + args: Prisma.CategoryFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { - args: Prisma.CategoryFindFirstArgs, + args: Prisma.CategoryFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.CategoryFindFirstOrThrowArgs, + args: Prisma.CategoryFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { - args: Prisma.CategoryFindManyArgs, + args: Prisma.CategoryFindManyArgs result: $Utils.PayloadToResult[] } create: { - args: Prisma.CategoryCreateArgs, + args: Prisma.CategoryCreateArgs result: $Utils.PayloadToResult } createMany: { - args: Prisma.CategoryCreateManyArgs, - result: Prisma.BatchPayload + args: Prisma.CategoryCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.CategoryCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] } delete: { - args: Prisma.CategoryDeleteArgs, + args: Prisma.CategoryDeleteArgs result: $Utils.PayloadToResult } update: { - args: Prisma.CategoryUpdateArgs, + args: Prisma.CategoryUpdateArgs result: $Utils.PayloadToResult } deleteMany: { - args: Prisma.CategoryDeleteManyArgs, - result: Prisma.BatchPayload + args: Prisma.CategoryDeleteManyArgs + result: BatchPayload } updateMany: { - args: Prisma.CategoryUpdateManyArgs, - result: Prisma.BatchPayload + args: Prisma.CategoryUpdateManyArgs + result: BatchPayload } upsert: { - args: Prisma.CategoryUpsertArgs, + args: Prisma.CategoryUpsertArgs result: $Utils.PayloadToResult } aggregate: { - args: Prisma.CategoryAggregateArgs, + args: Prisma.CategoryAggregateArgs result: $Utils.Optional } groupBy: { - args: Prisma.CategoryGroupByArgs, + args: Prisma.CategoryGroupByArgs result: $Utils.Optional[] } count: { - args: Prisma.CategoryCountArgs, + args: Prisma.CategoryCountArgs result: $Utils.Optional | number } } @@ -1034,63 +1052,67 @@ export namespace Prisma { fields: Prisma.PatientFieldRefs operations: { findUnique: { - args: Prisma.PatientFindUniqueArgs, + args: Prisma.PatientFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.PatientFindUniqueOrThrowArgs, + args: Prisma.PatientFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { - args: Prisma.PatientFindFirstArgs, + args: Prisma.PatientFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.PatientFindFirstOrThrowArgs, + args: Prisma.PatientFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { - args: Prisma.PatientFindManyArgs, + args: Prisma.PatientFindManyArgs result: $Utils.PayloadToResult[] } create: { - args: Prisma.PatientCreateArgs, + args: Prisma.PatientCreateArgs result: $Utils.PayloadToResult } createMany: { - args: Prisma.PatientCreateManyArgs, - result: Prisma.BatchPayload + args: Prisma.PatientCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.PatientCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] } delete: { - args: Prisma.PatientDeleteArgs, + args: Prisma.PatientDeleteArgs result: $Utils.PayloadToResult } update: { - args: Prisma.PatientUpdateArgs, + args: Prisma.PatientUpdateArgs result: $Utils.PayloadToResult } deleteMany: { - args: Prisma.PatientDeleteManyArgs, - result: Prisma.BatchPayload + args: Prisma.PatientDeleteManyArgs + result: BatchPayload } updateMany: { - args: Prisma.PatientUpdateManyArgs, - result: Prisma.BatchPayload + args: Prisma.PatientUpdateManyArgs + result: BatchPayload } upsert: { - args: Prisma.PatientUpsertArgs, + args: Prisma.PatientUpsertArgs result: $Utils.PayloadToResult } aggregate: { - args: Prisma.PatientAggregateArgs, + args: Prisma.PatientAggregateArgs result: $Utils.Optional } groupBy: { - args: Prisma.PatientGroupByArgs, + args: Prisma.PatientGroupByArgs result: $Utils.Optional[] } count: { - args: Prisma.PatientCountArgs, + args: Prisma.PatientCountArgs result: $Utils.Optional | number } } @@ -1100,63 +1122,67 @@ export namespace Prisma { fields: Prisma.MovieFieldRefs operations: { findUnique: { - args: Prisma.MovieFindUniqueArgs, + args: Prisma.MovieFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.MovieFindUniqueOrThrowArgs, + args: Prisma.MovieFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { - args: Prisma.MovieFindFirstArgs, + args: Prisma.MovieFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.MovieFindFirstOrThrowArgs, + args: Prisma.MovieFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { - args: Prisma.MovieFindManyArgs, + args: Prisma.MovieFindManyArgs result: $Utils.PayloadToResult[] } create: { - args: Prisma.MovieCreateArgs, + args: Prisma.MovieCreateArgs result: $Utils.PayloadToResult } createMany: { - args: Prisma.MovieCreateManyArgs, - result: Prisma.BatchPayload + args: Prisma.MovieCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.MovieCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] } delete: { - args: Prisma.MovieDeleteArgs, + args: Prisma.MovieDeleteArgs result: $Utils.PayloadToResult } update: { - args: Prisma.MovieUpdateArgs, + args: Prisma.MovieUpdateArgs result: $Utils.PayloadToResult } deleteMany: { - args: Prisma.MovieDeleteManyArgs, - result: Prisma.BatchPayload + args: Prisma.MovieDeleteManyArgs + result: BatchPayload } updateMany: { - args: Prisma.MovieUpdateManyArgs, - result: Prisma.BatchPayload + args: Prisma.MovieUpdateManyArgs + result: BatchPayload } upsert: { - args: Prisma.MovieUpsertArgs, + args: Prisma.MovieUpsertArgs result: $Utils.PayloadToResult } aggregate: { - args: Prisma.MovieAggregateArgs, + args: Prisma.MovieAggregateArgs result: $Utils.Optional } groupBy: { - args: Prisma.MovieGroupByArgs, + args: Prisma.MovieGroupByArgs result: $Utils.Optional[] } count: { - args: Prisma.MovieCountArgs, + args: Prisma.MovieCountArgs result: $Utils.Optional | number } } @@ -1166,63 +1192,67 @@ export namespace Prisma { fields: Prisma.DirectorFieldRefs operations: { findUnique: { - args: Prisma.DirectorFindUniqueArgs, + args: Prisma.DirectorFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.DirectorFindUniqueOrThrowArgs, + args: Prisma.DirectorFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { - args: Prisma.DirectorFindFirstArgs, + args: Prisma.DirectorFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.DirectorFindFirstOrThrowArgs, + args: Prisma.DirectorFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { - args: Prisma.DirectorFindManyArgs, + args: Prisma.DirectorFindManyArgs result: $Utils.PayloadToResult[] } create: { - args: Prisma.DirectorCreateArgs, + args: Prisma.DirectorCreateArgs result: $Utils.PayloadToResult } createMany: { - args: Prisma.DirectorCreateManyArgs, - result: Prisma.BatchPayload + args: Prisma.DirectorCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.DirectorCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] } delete: { - args: Prisma.DirectorDeleteArgs, + args: Prisma.DirectorDeleteArgs result: $Utils.PayloadToResult } update: { - args: Prisma.DirectorUpdateArgs, + args: Prisma.DirectorUpdateArgs result: $Utils.PayloadToResult } deleteMany: { - args: Prisma.DirectorDeleteManyArgs, - result: Prisma.BatchPayload + args: Prisma.DirectorDeleteManyArgs + result: BatchPayload } updateMany: { - args: Prisma.DirectorUpdateManyArgs, - result: Prisma.BatchPayload + args: Prisma.DirectorUpdateManyArgs + result: BatchPayload } upsert: { - args: Prisma.DirectorUpsertArgs, + args: Prisma.DirectorUpsertArgs result: $Utils.PayloadToResult } aggregate: { - args: Prisma.DirectorAggregateArgs, + args: Prisma.DirectorAggregateArgs result: $Utils.Optional } groupBy: { - args: Prisma.DirectorGroupByArgs, + args: Prisma.DirectorGroupByArgs result: $Utils.Optional[] } count: { - args: Prisma.DirectorCountArgs, + args: Prisma.DirectorCountArgs result: $Utils.Optional | number } } @@ -1232,63 +1262,67 @@ export namespace Prisma { fields: Prisma.ProblemFieldRefs operations: { findUnique: { - args: Prisma.ProblemFindUniqueArgs, + args: Prisma.ProblemFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.ProblemFindUniqueOrThrowArgs, + args: Prisma.ProblemFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { - args: Prisma.ProblemFindFirstArgs, + args: Prisma.ProblemFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.ProblemFindFirstOrThrowArgs, + args: Prisma.ProblemFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { - args: Prisma.ProblemFindManyArgs, + args: Prisma.ProblemFindManyArgs result: $Utils.PayloadToResult[] } create: { - args: Prisma.ProblemCreateArgs, + args: Prisma.ProblemCreateArgs result: $Utils.PayloadToResult } createMany: { - args: Prisma.ProblemCreateManyArgs, - result: Prisma.BatchPayload + args: Prisma.ProblemCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ProblemCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] } delete: { - args: Prisma.ProblemDeleteArgs, + args: Prisma.ProblemDeleteArgs result: $Utils.PayloadToResult } update: { - args: Prisma.ProblemUpdateArgs, + args: Prisma.ProblemUpdateArgs result: $Utils.PayloadToResult } deleteMany: { - args: Prisma.ProblemDeleteManyArgs, - result: Prisma.BatchPayload + args: Prisma.ProblemDeleteManyArgs + result: BatchPayload } updateMany: { - args: Prisma.ProblemUpdateManyArgs, - result: Prisma.BatchPayload + args: Prisma.ProblemUpdateManyArgs + result: BatchPayload } upsert: { - args: Prisma.ProblemUpsertArgs, + args: Prisma.ProblemUpsertArgs result: $Utils.PayloadToResult } aggregate: { - args: Prisma.ProblemAggregateArgs, + args: Prisma.ProblemAggregateArgs result: $Utils.Optional } groupBy: { - args: Prisma.ProblemGroupByArgs, + args: Prisma.ProblemGroupByArgs result: $Utils.Optional[] } count: { - args: Prisma.ProblemCountArgs, + args: Prisma.ProblemCountArgs result: $Utils.Optional | number } } @@ -1298,63 +1332,67 @@ export namespace Prisma { fields: Prisma.CreatorFieldRefs operations: { findUnique: { - args: Prisma.CreatorFindUniqueArgs, + args: Prisma.CreatorFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.CreatorFindUniqueOrThrowArgs, + args: Prisma.CreatorFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { - args: Prisma.CreatorFindFirstArgs, + args: Prisma.CreatorFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.CreatorFindFirstOrThrowArgs, + args: Prisma.CreatorFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { - args: Prisma.CreatorFindManyArgs, + args: Prisma.CreatorFindManyArgs result: $Utils.PayloadToResult[] } create: { - args: Prisma.CreatorCreateArgs, + args: Prisma.CreatorCreateArgs result: $Utils.PayloadToResult } createMany: { - args: Prisma.CreatorCreateManyArgs, - result: Prisma.BatchPayload + args: Prisma.CreatorCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.CreatorCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] } delete: { - args: Prisma.CreatorDeleteArgs, + args: Prisma.CreatorDeleteArgs result: $Utils.PayloadToResult } update: { - args: Prisma.CreatorUpdateArgs, + args: Prisma.CreatorUpdateArgs result: $Utils.PayloadToResult } deleteMany: { - args: Prisma.CreatorDeleteManyArgs, - result: Prisma.BatchPayload + args: Prisma.CreatorDeleteManyArgs + result: BatchPayload } updateMany: { - args: Prisma.CreatorUpdateManyArgs, - result: Prisma.BatchPayload + args: Prisma.CreatorUpdateManyArgs + result: BatchPayload } upsert: { - args: Prisma.CreatorUpsertArgs, + args: Prisma.CreatorUpsertArgs result: $Utils.PayloadToResult } aggregate: { - args: Prisma.CreatorAggregateArgs, + args: Prisma.CreatorAggregateArgs result: $Utils.Optional } groupBy: { - args: Prisma.CreatorGroupByArgs, + args: Prisma.CreatorGroupByArgs result: $Utils.Optional[] } count: { - args: Prisma.CreatorCountArgs, + args: Prisma.CreatorCountArgs result: $Utils.Optional | number } } @@ -1364,63 +1402,67 @@ export namespace Prisma { fields: Prisma.NativeTypeModelFieldRefs operations: { findUnique: { - args: Prisma.NativeTypeModelFindUniqueArgs, + args: Prisma.NativeTypeModelFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.NativeTypeModelFindUniqueOrThrowArgs, + args: Prisma.NativeTypeModelFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { - args: Prisma.NativeTypeModelFindFirstArgs, + args: Prisma.NativeTypeModelFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.NativeTypeModelFindFirstOrThrowArgs, + args: Prisma.NativeTypeModelFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { - args: Prisma.NativeTypeModelFindManyArgs, + args: Prisma.NativeTypeModelFindManyArgs result: $Utils.PayloadToResult[] } create: { - args: Prisma.NativeTypeModelCreateArgs, + args: Prisma.NativeTypeModelCreateArgs result: $Utils.PayloadToResult } createMany: { - args: Prisma.NativeTypeModelCreateManyArgs, - result: Prisma.BatchPayload + args: Prisma.NativeTypeModelCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.NativeTypeModelCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] } delete: { - args: Prisma.NativeTypeModelDeleteArgs, + args: Prisma.NativeTypeModelDeleteArgs result: $Utils.PayloadToResult } update: { - args: Prisma.NativeTypeModelUpdateArgs, + args: Prisma.NativeTypeModelUpdateArgs result: $Utils.PayloadToResult } deleteMany: { - args: Prisma.NativeTypeModelDeleteManyArgs, - result: Prisma.BatchPayload + args: Prisma.NativeTypeModelDeleteManyArgs + result: BatchPayload } updateMany: { - args: Prisma.NativeTypeModelUpdateManyArgs, - result: Prisma.BatchPayload + args: Prisma.NativeTypeModelUpdateManyArgs + result: BatchPayload } upsert: { - args: Prisma.NativeTypeModelUpsertArgs, + args: Prisma.NativeTypeModelUpsertArgs result: $Utils.PayloadToResult } aggregate: { - args: Prisma.NativeTypeModelAggregateArgs, + args: Prisma.NativeTypeModelAggregateArgs result: $Utils.Optional } groupBy: { - args: Prisma.NativeTypeModelGroupByArgs, + args: Prisma.NativeTypeModelGroupByArgs result: $Utils.Optional[] } count: { - args: Prisma.NativeTypeModelCountArgs, + args: Prisma.NativeTypeModelCountArgs result: $Utils.Optional | number } } @@ -1430,63 +1472,67 @@ export namespace Prisma { fields: Prisma.EquipmentFieldRefs operations: { findUnique: { - args: Prisma.EquipmentFindUniqueArgs, + args: Prisma.EquipmentFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.EquipmentFindUniqueOrThrowArgs, + args: Prisma.EquipmentFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { - args: Prisma.EquipmentFindFirstArgs, + args: Prisma.EquipmentFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.EquipmentFindFirstOrThrowArgs, + args: Prisma.EquipmentFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { - args: Prisma.EquipmentFindManyArgs, + args: Prisma.EquipmentFindManyArgs result: $Utils.PayloadToResult[] } create: { - args: Prisma.EquipmentCreateArgs, + args: Prisma.EquipmentCreateArgs result: $Utils.PayloadToResult } createMany: { - args: Prisma.EquipmentCreateManyArgs, - result: Prisma.BatchPayload + args: Prisma.EquipmentCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.EquipmentCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] } delete: { - args: Prisma.EquipmentDeleteArgs, + args: Prisma.EquipmentDeleteArgs result: $Utils.PayloadToResult } update: { - args: Prisma.EquipmentUpdateArgs, + args: Prisma.EquipmentUpdateArgs result: $Utils.PayloadToResult } deleteMany: { - args: Prisma.EquipmentDeleteManyArgs, - result: Prisma.BatchPayload + args: Prisma.EquipmentDeleteManyArgs + result: BatchPayload } updateMany: { - args: Prisma.EquipmentUpdateManyArgs, - result: Prisma.BatchPayload + args: Prisma.EquipmentUpdateManyArgs + result: BatchPayload } upsert: { - args: Prisma.EquipmentUpsertArgs, + args: Prisma.EquipmentUpsertArgs result: $Utils.PayloadToResult } aggregate: { - args: Prisma.EquipmentAggregateArgs, + args: Prisma.EquipmentAggregateArgs result: $Utils.Optional } groupBy: { - args: Prisma.EquipmentGroupByArgs, + args: Prisma.EquipmentGroupByArgs result: $Utils.Optional[] } count: { - args: Prisma.EquipmentCountArgs, + args: Prisma.EquipmentCountArgs result: $Utils.Optional | number } } @@ -1496,63 +1542,67 @@ export namespace Prisma { fields: Prisma.HiddenFieldRefs operations: { findUnique: { - args: Prisma.HiddenFindUniqueArgs, + args: Prisma.HiddenFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.HiddenFindUniqueOrThrowArgs, + args: Prisma.HiddenFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { - args: Prisma.HiddenFindFirstArgs, + args: Prisma.HiddenFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.HiddenFindFirstOrThrowArgs, + args: Prisma.HiddenFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { - args: Prisma.HiddenFindManyArgs, + args: Prisma.HiddenFindManyArgs result: $Utils.PayloadToResult[] } create: { - args: Prisma.HiddenCreateArgs, + args: Prisma.HiddenCreateArgs result: $Utils.PayloadToResult } createMany: { - args: Prisma.HiddenCreateManyArgs, - result: Prisma.BatchPayload + args: Prisma.HiddenCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.HiddenCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] } delete: { - args: Prisma.HiddenDeleteArgs, + args: Prisma.HiddenDeleteArgs result: $Utils.PayloadToResult } update: { - args: Prisma.HiddenUpdateArgs, + args: Prisma.HiddenUpdateArgs result: $Utils.PayloadToResult } deleteMany: { - args: Prisma.HiddenDeleteManyArgs, - result: Prisma.BatchPayload + args: Prisma.HiddenDeleteManyArgs + result: BatchPayload } updateMany: { - args: Prisma.HiddenUpdateManyArgs, - result: Prisma.BatchPayload + args: Prisma.HiddenUpdateManyArgs + result: BatchPayload } upsert: { - args: Prisma.HiddenUpsertArgs, + args: Prisma.HiddenUpsertArgs result: $Utils.PayloadToResult } aggregate: { - args: Prisma.HiddenAggregateArgs, + args: Prisma.HiddenAggregateArgs result: $Utils.Optional } groupBy: { - args: Prisma.HiddenGroupByArgs, + args: Prisma.HiddenGroupByArgs result: $Utils.Optional[] } count: { - args: Prisma.HiddenCountArgs, + args: Prisma.HiddenCountArgs result: $Utils.Optional | number } } @@ -1581,7 +1631,7 @@ export namespace Prisma { } } } - export const defineExtension: $Extensions.ExtendsHook<'define', Prisma.TypeMapCb, $Extensions.DefaultArgs> + export const defineExtension: $Extensions.ExtendsHook<"define", Prisma.TypeMapCb, $Extensions.DefaultArgs> export type DefaultPrismaClient = PrismaClient export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' export interface PrismaClientOptions { @@ -1614,8 +1664,19 @@ export namespace Prisma { * 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 = { @@ -1652,6 +1713,7 @@ export namespace Prisma { | 'findFirstOrThrow' | 'create' | 'createMany' + | 'createManyAndReturn' | 'update' | 'updateMany' | 'upsert' @@ -1716,7 +1778,6 @@ export namespace Prisma { } // Custom InputTypes - /** * UserCountOutputType without action */ @@ -1727,7 +1788,6 @@ export namespace Prisma { select?: UserCountOutputTypeSelect | null } - /** * UserCountOutputType without action */ @@ -1735,7 +1795,6 @@ export namespace Prisma { where?: postWhereInput } - /** * UserCountOutputType without action */ @@ -1744,7 +1803,6 @@ export namespace Prisma { } - /** * Count Type DirectorCountOutputType */ @@ -1758,7 +1816,6 @@ export namespace Prisma { } // Custom InputTypes - /** * DirectorCountOutputType without action */ @@ -1769,7 +1826,6 @@ export namespace Prisma { select?: DirectorCountOutputTypeSelect | null } - /** * DirectorCountOutputType without action */ @@ -1778,7 +1834,6 @@ export namespace Prisma { } - /** * Count Type ProblemCountOutputType */ @@ -1792,7 +1847,6 @@ export namespace Prisma { } // Custom InputTypes - /** * ProblemCountOutputType without action */ @@ -1803,7 +1857,6 @@ export namespace Prisma { select?: ProblemCountOutputTypeSelect | null } - /** * ProblemCountOutputType without action */ @@ -1812,7 +1865,6 @@ export namespace Prisma { } - /** * Count Type CreatorCountOutputType */ @@ -1828,7 +1880,6 @@ export namespace Prisma { } // Custom InputTypes - /** * CreatorCountOutputType without action */ @@ -1839,7 +1890,6 @@ export namespace Prisma { select?: CreatorCountOutputTypeSelect | null } - /** * CreatorCountOutputType without action */ @@ -1847,7 +1897,6 @@ export namespace Prisma { where?: ProblemWhereInput } - /** * CreatorCountOutputType without action */ @@ -1856,7 +1905,6 @@ export namespace Prisma { } - /** * Models */ @@ -1982,7 +2030,7 @@ export namespace Prisma { * * Determine the order of Users to fetch. */ - orderBy?: UserOrderByWithRelationAndSearchRelevanceInput | UserOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -2104,6 +2152,18 @@ export namespace Prisma { _count?: boolean | UserCountOutputTypeDefaultArgs }, ExtArgs["result"]["user"]> + export type UserSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + email?: boolean + name?: boolean + age?: boolean + balance?: boolean + amount?: boolean + role?: boolean + grades?: boolean + aliases?: boolean + }, ExtArgs["result"]["user"]> + export type UserSelectScalar = { id?: boolean email?: boolean @@ -2121,7 +2181,7 @@ export namespace Prisma { editorPosts?: boolean | User$editorPostsArgs _count?: boolean | UserCountOutputTypeDefaultArgs } - + export type UserIncludeCreateManyAndReturn = {} export type $UserPayload = { name: "User" @@ -2159,11 +2219,10 @@ export namespace Prisma { composites: {} } - type UserGetPayload = $Result.GetResult type UserCountArgs = - Omit & { + Omit & { select?: UserCountAggregateInputType | true } @@ -2179,14 +2238,12 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUnique>( - args: SelectSubset> - ): Prisma__UserClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> + */ + findUnique(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** - * Find one User that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. + * Find one User that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. * @param {UserFindUniqueOrThrowArgs} args - Arguments to find a User * @example * // Get one User @@ -2195,10 +2252,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__UserClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first User that matches the filter. @@ -2212,10 +2267,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirst>( - args?: SelectSubset> - ): Prisma__UserClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> + */ + findFirst(args?: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first User that matches the filter or @@ -2230,16 +2283,14 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__UserClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** * Find zero or more Users that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {UserFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {UserFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Users * const users = await prisma.user.findMany() @@ -2250,10 +2301,8 @@ export namespace Prisma { * // Only select the `id` * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } }) * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a User. @@ -2266,26 +2315,46 @@ export namespace Prisma { * } * }) * - **/ - create>( - args: SelectSubset> - ): Prisma__UserClient<$Result.GetResult, T, 'create'>, never, ExtArgs> + */ + create(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "create">, never, ExtArgs> /** * Create many Users. - * @param {UserCreateManyArgs} args - Arguments to create many Users. - * @example - * // Create many Users - * const user = await prisma.user.createMany({ - * data: { - * // ... provide data here - * } - * }) + * @param {UserCreateManyArgs} args - Arguments to create many Users. + * @example + * // Create many Users + * const user = await prisma.user.createMany({ + * data: [ + * // ... provide data here + * ] + * }) * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Users and returns the data saved in the database. + * @param {UserCreateManyAndReturnArgs} args - Arguments to create many Users. + * @example + * // Create many Users + * const user = await prisma.user.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Users and only return the `id` + * const userWithIdOnly = await prisma.user.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> /** * Delete a User. @@ -2298,10 +2367,8 @@ export namespace Prisma { * } * }) * - **/ - delete>( - args: SelectSubset> - ): Prisma__UserClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> + */ + delete(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one User. @@ -2317,10 +2384,8 @@ export namespace Prisma { * } * }) * - **/ - update>( - args: SelectSubset> - ): Prisma__UserClient<$Result.GetResult, T, 'update'>, never, ExtArgs> + */ + update(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more Users. @@ -2333,10 +2398,8 @@ export namespace Prisma { * } * }) * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Users. @@ -2354,10 +2417,8 @@ export namespace Prisma { * } * }) * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one User. @@ -2375,10 +2436,9 @@ export namespace Prisma { * // ... the filter for the User we want to update * } * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__UserClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> + */ + upsert(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + /** * Count the number of Users. @@ -2518,36 +2578,34 @@ export namespace Prisma { * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__UserClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - - posts = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; - - editorPosts = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; - + readonly [Symbol.toStringTag]: "PrismaPromise" + posts = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + editorPosts = {}>(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; + 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; + 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; + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } + /** * Fields of the User model */ @@ -2565,7 +2623,6 @@ export namespace Prisma { // Custom InputTypes - /** * User findUnique */ @@ -2575,7 +2632,7 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** @@ -2584,7 +2641,6 @@ export namespace Prisma { where: UserWhereUniqueInput } - /** * User findUniqueOrThrow */ @@ -2594,7 +2650,7 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** @@ -2603,7 +2659,6 @@ export namespace Prisma { where: UserWhereUniqueInput } - /** * User findFirst */ @@ -2613,7 +2668,7 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** @@ -2625,7 +2680,7 @@ export namespace Prisma { * * Determine the order of Users to fetch. */ - orderBy?: UserOrderByWithRelationAndSearchRelevanceInput | UserOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -2652,7 +2707,6 @@ export namespace Prisma { distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] } - /** * User findFirstOrThrow */ @@ -2662,7 +2716,7 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** @@ -2674,7 +2728,7 @@ export namespace Prisma { * * Determine the order of Users to fetch. */ - orderBy?: UserOrderByWithRelationAndSearchRelevanceInput | UserOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -2701,7 +2755,6 @@ export namespace Prisma { distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] } - /** * User findMany */ @@ -2711,7 +2764,7 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** @@ -2723,7 +2776,7 @@ export namespace Prisma { * * Determine the order of Users to fetch. */ - orderBy?: UserOrderByWithRelationAndSearchRelevanceInput | UserOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -2745,7 +2798,6 @@ export namespace Prisma { distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] } - /** * User create */ @@ -2755,7 +2807,7 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** @@ -2764,7 +2816,6 @@ export namespace Prisma { data: XOR } - /** * User createMany */ @@ -2776,6 +2827,20 @@ export namespace Prisma { skipDuplicates?: boolean } + /** + * User createManyAndReturn + */ + export type UserCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelectCreateManyAndReturn | null + /** + * The data used to create many Users. + */ + data: UserCreateManyInput | UserCreateManyInput[] + skipDuplicates?: boolean + } /** * User update @@ -2786,7 +2851,7 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** @@ -2799,7 +2864,6 @@ export namespace Prisma { where: UserWhereUniqueInput } - /** * User updateMany */ @@ -2814,7 +2878,6 @@ export namespace Prisma { where?: UserWhereInput } - /** * User upsert */ @@ -2824,7 +2887,7 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** @@ -2841,7 +2904,6 @@ export namespace Prisma { update: XOR } - /** * User delete */ @@ -2851,7 +2913,7 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** @@ -2860,7 +2922,6 @@ export namespace Prisma { where: UserWhereUniqueInput } - /** * User deleteMany */ @@ -2871,7 +2932,6 @@ export namespace Prisma { where?: UserWhereInput } - /** * User.posts */ @@ -2881,18 +2941,17 @@ export namespace Prisma { */ select?: postSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: postInclude | null where?: postWhereInput - orderBy?: postOrderByWithRelationAndSearchRelevanceInput | postOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: postOrderByWithRelationInput | postOrderByWithRelationInput[] cursor?: postWhereUniqueInput take?: number skip?: number distinct?: PostScalarFieldEnum | PostScalarFieldEnum[] } - /** * User.editorPosts */ @@ -2902,18 +2961,17 @@ export namespace Prisma { */ select?: postSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: postInclude | null where?: postWhereInput - orderBy?: postOrderByWithRelationAndSearchRelevanceInput | postOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: postOrderByWithRelationInput | postOrderByWithRelationInput[] cursor?: postWhereUniqueInput take?: number skip?: number distinct?: PostScalarFieldEnum | PostScalarFieldEnum[] } - /** * User without action */ @@ -2923,13 +2981,12 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null } - /** * Model post */ @@ -3055,7 +3112,7 @@ export namespace Prisma { * * Determine the order of posts to fetch. */ - orderBy?: postOrderByWithRelationAndSearchRelevanceInput | postOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: postOrderByWithRelationInput | postOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -3180,6 +3237,22 @@ export namespace Prisma { editor?: boolean | post$editorArgs }, ExtArgs["result"]["post"]> + export type postSelectCreateManyAndReturn = $Extensions.GetSelect<{ + uuid?: boolean + createdAt?: boolean + updatedAt?: boolean + published?: boolean + title?: boolean + subtitle?: boolean + content?: boolean + authorId?: boolean + editorId?: boolean + kind?: boolean + metadata?: boolean + author?: boolean | UserDefaultArgs + editor?: boolean | post$editorArgs + }, ExtArgs["result"]["post"]> + export type postSelectScalar = { uuid?: boolean createdAt?: boolean @@ -3198,7 +3271,10 @@ export namespace Prisma { author?: boolean | UserDefaultArgs editor?: boolean | post$editorArgs } - + export type postIncludeCreateManyAndReturn = { + author?: boolean | UserDefaultArgs + editor?: boolean | post$editorArgs + } export type $postPayload = { name: "post" @@ -3243,11 +3319,10 @@ export namespace Prisma { composites: {} } - type postGetPayload = $Result.GetResult type postCountArgs = - Omit & { + Omit & { select?: PostCountAggregateInputType | true } @@ -3263,14 +3338,12 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUnique>( - args: SelectSubset> - ): Prisma__postClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> + */ + findUnique(args: SelectSubset>): Prisma__postClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** - * Find one Post that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. + * Find one Post that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. * @param {postFindUniqueOrThrowArgs} args - Arguments to find a Post * @example * // Get one Post @@ -3279,10 +3352,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__postClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__postClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first Post that matches the filter. @@ -3296,10 +3367,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirst>( - args?: SelectSubset> - ): Prisma__postClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> + */ + findFirst(args?: SelectSubset>): Prisma__postClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first Post that matches the filter or @@ -3314,16 +3383,14 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__postClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__postClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** * Find zero or more Posts 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 {postFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {postFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Posts * const posts = await prisma.post.findMany() @@ -3334,10 +3401,8 @@ export namespace Prisma { * // Only select the `uuid` * const postWithUuidOnly = await prisma.post.findMany({ select: { uuid: true } }) * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a Post. @@ -3350,26 +3415,46 @@ export namespace Prisma { * } * }) * - **/ - create>( - args: SelectSubset> - ): Prisma__postClient<$Result.GetResult, T, 'create'>, never, ExtArgs> + */ + create(args: SelectSubset>): Prisma__postClient<$Result.GetResult, T, "create">, never, ExtArgs> /** * Create many Posts. - * @param {postCreateManyArgs} args - Arguments to create many Posts. - * @example - * // Create many Posts - * const post = await prisma.post.createMany({ - * data: { - * // ... provide data here - * } - * }) + * @param {postCreateManyArgs} args - Arguments to create many Posts. + * @example + * // Create many Posts + * const post = await prisma.post.createMany({ + * data: [ + * // ... provide data here + * ] + * }) * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Posts and returns the data saved in the database. + * @param {postCreateManyAndReturnArgs} args - Arguments to create many Posts. + * @example + * // Create many Posts + * const post = await prisma.post.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Posts and only return the `uuid` + * const postWithUuidOnly = await prisma.post.createManyAndReturn({ + * select: { uuid: 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 Post. @@ -3382,10 +3467,8 @@ export namespace Prisma { * } * }) * - **/ - delete>( - args: SelectSubset> - ): Prisma__postClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> + */ + delete(args: SelectSubset>): Prisma__postClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one Post. @@ -3401,10 +3484,8 @@ export namespace Prisma { * } * }) * - **/ - update>( - args: SelectSubset> - ): Prisma__postClient<$Result.GetResult, T, 'update'>, never, ExtArgs> + */ + update(args: SelectSubset>): Prisma__postClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more Posts. @@ -3417,10 +3498,8 @@ export namespace Prisma { * } * }) * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Posts. @@ -3438,10 +3517,8 @@ export namespace Prisma { * } * }) * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one Post. @@ -3459,10 +3536,9 @@ export namespace Prisma { * // ... the filter for the Post we want to update * } * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__postClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> + */ + upsert(args: SelectSubset>): Prisma__postClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + /** * Count the number of Posts. @@ -3602,36 +3678,34 @@ export namespace Prisma { * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__postClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - - author = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, 'findUniqueOrThrow'> | Null, Null, ExtArgs>; - - editor = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, 'findUniqueOrThrow'> | null, null, ExtArgs>; - + readonly [Symbol.toStringTag]: "PrismaPromise" + author = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + editor = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; + 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; + 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; + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } + /** * Fields of the post model */ @@ -3651,7 +3725,6 @@ export namespace Prisma { // Custom InputTypes - /** * post findUnique */ @@ -3661,7 +3734,7 @@ export namespace Prisma { */ select?: postSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: postInclude | null /** @@ -3670,7 +3743,6 @@ export namespace Prisma { where: postWhereUniqueInput } - /** * post findUniqueOrThrow */ @@ -3680,7 +3752,7 @@ export namespace Prisma { */ select?: postSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: postInclude | null /** @@ -3689,7 +3761,6 @@ export namespace Prisma { where: postWhereUniqueInput } - /** * post findFirst */ @@ -3699,7 +3770,7 @@ export namespace Prisma { */ select?: postSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: postInclude | null /** @@ -3711,7 +3782,7 @@ export namespace Prisma { * * Determine the order of posts to fetch. */ - orderBy?: postOrderByWithRelationAndSearchRelevanceInput | postOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: postOrderByWithRelationInput | postOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -3738,7 +3809,6 @@ export namespace Prisma { distinct?: PostScalarFieldEnum | PostScalarFieldEnum[] } - /** * post findFirstOrThrow */ @@ -3748,7 +3818,7 @@ export namespace Prisma { */ select?: postSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: postInclude | null /** @@ -3760,7 +3830,7 @@ export namespace Prisma { * * Determine the order of posts to fetch. */ - orderBy?: postOrderByWithRelationAndSearchRelevanceInput | postOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: postOrderByWithRelationInput | postOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -3787,7 +3857,6 @@ export namespace Prisma { distinct?: PostScalarFieldEnum | PostScalarFieldEnum[] } - /** * post findMany */ @@ -3797,7 +3866,7 @@ export namespace Prisma { */ select?: postSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: postInclude | null /** @@ -3809,7 +3878,7 @@ export namespace Prisma { * * Determine the order of posts to fetch. */ - orderBy?: postOrderByWithRelationAndSearchRelevanceInput | postOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: postOrderByWithRelationInput | postOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -3831,7 +3900,6 @@ export namespace Prisma { distinct?: PostScalarFieldEnum | PostScalarFieldEnum[] } - /** * post create */ @@ -3841,7 +3909,7 @@ export namespace Prisma { */ select?: postSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: postInclude | null /** @@ -3850,7 +3918,6 @@ export namespace Prisma { data: XOR } - /** * post createMany */ @@ -3862,6 +3929,24 @@ export namespace Prisma { skipDuplicates?: boolean } + /** + * post createManyAndReturn + */ + export type postCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the post + */ + select?: postSelectCreateManyAndReturn | null + /** + * The data used to create many posts. + */ + data: postCreateManyInput | postCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: postIncludeCreateManyAndReturn | null + } /** * post update @@ -3872,7 +3957,7 @@ export namespace Prisma { */ select?: postSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: postInclude | null /** @@ -3885,7 +3970,6 @@ export namespace Prisma { where: postWhereUniqueInput } - /** * post updateMany */ @@ -3900,7 +3984,6 @@ export namespace Prisma { where?: postWhereInput } - /** * post upsert */ @@ -3910,7 +3993,7 @@ export namespace Prisma { */ select?: postSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: postInclude | null /** @@ -3927,7 +4010,6 @@ export namespace Prisma { update: XOR } - /** * post delete */ @@ -3937,7 +4019,7 @@ export namespace Prisma { */ select?: postSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: postInclude | null /** @@ -3946,7 +4028,6 @@ export namespace Prisma { where: postWhereUniqueInput } - /** * post deleteMany */ @@ -3957,7 +4038,6 @@ export namespace Prisma { where?: postWhereInput } - /** * post.editor */ @@ -3967,13 +4047,12 @@ export namespace Prisma { */ select?: UserSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: UserInclude | null where?: UserWhereInput } - /** * post without action */ @@ -3983,13 +4062,12 @@ export namespace Prisma { */ select?: postSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: postInclude | null } - /** * Model Category */ @@ -4067,7 +4145,7 @@ export namespace Prisma { * * Determine the order of Categories to fetch. */ - orderBy?: CategoryOrderByWithRelationAndSearchRelevanceInput | CategoryOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: CategoryOrderByWithRelationInput | CategoryOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -4174,6 +4252,12 @@ export namespace Prisma { number?: boolean }, ExtArgs["result"]["category"]> + export type CategorySelectCreateManyAndReturn = $Extensions.GetSelect<{ + name?: boolean + slug?: boolean + number?: boolean + }, ExtArgs["result"]["category"]> + export type CategorySelectScalar = { name?: boolean slug?: boolean @@ -4192,11 +4276,10 @@ export namespace Prisma { composites: {} } - type CategoryGetPayload = $Result.GetResult type CategoryCountArgs = - Omit & { + Omit & { select?: CategoryCountAggregateInputType | true } @@ -4212,14 +4295,12 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUnique>( - args: SelectSubset> - ): Prisma__CategoryClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> + */ + 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. + * 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 @@ -4228,10 +4309,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__CategoryClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__CategoryClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first Category that matches the filter. @@ -4245,10 +4324,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirst>( - args?: SelectSubset> - ): Prisma__CategoryClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> + */ + findFirst(args?: SelectSubset>): Prisma__CategoryClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first Category that matches the filter or @@ -4263,16 +4340,14 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__CategoryClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> + */ + 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. + * @param {CategoryFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Categories * const categories = await prisma.category.findMany() @@ -4283,10 +4358,8 @@ export namespace Prisma { * // Only select the `name` * const categoryWithNameOnly = await prisma.category.findMany({ select: { name: true } }) * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a Category. @@ -4299,26 +4372,46 @@ export namespace Prisma { * } * }) * - **/ - create>( - args: SelectSubset> - ): Prisma__CategoryClient<$Result.GetResult, T, 'create'>, never, ExtArgs> + */ + 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 - * } - * }) + * @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 + */ + 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 `name` + * const categoryWithNameOnly = await prisma.category.createManyAndReturn({ + * select: { name: 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. @@ -4331,10 +4424,8 @@ export namespace Prisma { * } * }) * - **/ - delete>( - args: SelectSubset> - ): Prisma__CategoryClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> + */ + delete(args: SelectSubset>): Prisma__CategoryClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one Category. @@ -4350,10 +4441,8 @@ export namespace Prisma { * } * }) * - **/ - update>( - args: SelectSubset> - ): Prisma__CategoryClient<$Result.GetResult, T, 'update'>, never, ExtArgs> + */ + update(args: SelectSubset>): Prisma__CategoryClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more Categories. @@ -4366,10 +4455,8 @@ export namespace Prisma { * } * }) * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Categories. @@ -4387,10 +4474,8 @@ export namespace Prisma { * } * }) * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one Category. @@ -4408,10 +4493,9 @@ export namespace Prisma { * // ... the filter for the Category we want to update * } * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__CategoryClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> + */ + upsert(args: SelectSubset>): Prisma__CategoryClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + /** * Count the number of Categories. @@ -4551,33 +4635,32 @@ export namespace Prisma { * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__CategoryClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: '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; + 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; + 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; + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } + /** * Fields of the Category model */ @@ -4589,7 +4672,6 @@ export namespace Prisma { // Custom InputTypes - /** * Category findUnique */ @@ -4604,7 +4686,6 @@ export namespace Prisma { where: CategoryWhereUniqueInput } - /** * Category findUniqueOrThrow */ @@ -4619,7 +4700,6 @@ export namespace Prisma { where: CategoryWhereUniqueInput } - /** * Category findFirst */ @@ -4637,7 +4717,7 @@ export namespace Prisma { * * Determine the order of Categories to fetch. */ - orderBy?: CategoryOrderByWithRelationAndSearchRelevanceInput | CategoryOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: CategoryOrderByWithRelationInput | CategoryOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -4664,7 +4744,6 @@ export namespace Prisma { distinct?: CategoryScalarFieldEnum | CategoryScalarFieldEnum[] } - /** * Category findFirstOrThrow */ @@ -4682,7 +4761,7 @@ export namespace Prisma { * * Determine the order of Categories to fetch. */ - orderBy?: CategoryOrderByWithRelationAndSearchRelevanceInput | CategoryOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: CategoryOrderByWithRelationInput | CategoryOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -4709,7 +4788,6 @@ export namespace Prisma { distinct?: CategoryScalarFieldEnum | CategoryScalarFieldEnum[] } - /** * Category findMany */ @@ -4727,7 +4805,7 @@ export namespace Prisma { * * Determine the order of Categories to fetch. */ - orderBy?: CategoryOrderByWithRelationAndSearchRelevanceInput | CategoryOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: CategoryOrderByWithRelationInput | CategoryOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -4749,7 +4827,6 @@ export namespace Prisma { distinct?: CategoryScalarFieldEnum | CategoryScalarFieldEnum[] } - /** * Category create */ @@ -4764,7 +4841,6 @@ export namespace Prisma { data: XOR } - /** * Category createMany */ @@ -4776,6 +4852,20 @@ export namespace Prisma { 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 + } /** * Category update @@ -4795,7 +4885,6 @@ export namespace Prisma { where: CategoryWhereUniqueInput } - /** * Category updateMany */ @@ -4810,7 +4899,6 @@ export namespace Prisma { where?: CategoryWhereInput } - /** * Category upsert */ @@ -4833,7 +4921,6 @@ export namespace Prisma { update: XOR } - /** * Category delete */ @@ -4848,7 +4935,6 @@ export namespace Prisma { where: CategoryWhereUniqueInput } - /** * Category deleteMany */ @@ -4859,7 +4945,6 @@ export namespace Prisma { where?: CategoryWhereInput } - /** * Category without action */ @@ -4871,7 +4956,6 @@ export namespace Prisma { } - /** * Model Patient */ @@ -4931,7 +5015,7 @@ export namespace Prisma { * * Determine the order of Patients to fetch. */ - orderBy?: PatientOrderByWithRelationAndSearchRelevanceInput | PatientOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: PatientOrderByWithRelationInput | PatientOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -5022,6 +5106,12 @@ export namespace Prisma { email?: boolean }, ExtArgs["result"]["patient"]> + export type PatientSelectCreateManyAndReturn = $Extensions.GetSelect<{ + firstName?: boolean + lastName?: boolean + email?: boolean + }, ExtArgs["result"]["patient"]> + export type PatientSelectScalar = { firstName?: boolean lastName?: boolean @@ -5040,11 +5130,10 @@ export namespace Prisma { composites: {} } - type PatientGetPayload = $Result.GetResult type PatientCountArgs = - Omit & { + Omit & { select?: PatientCountAggregateInputType | true } @@ -5060,14 +5149,12 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUnique>( - args: SelectSubset> - ): Prisma__PatientClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> + */ + findUnique(args: SelectSubset>): Prisma__PatientClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** - * Find one Patient that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. + * Find one Patient that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. * @param {PatientFindUniqueOrThrowArgs} args - Arguments to find a Patient * @example * // Get one Patient @@ -5076,10 +5163,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__PatientClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__PatientClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first Patient that matches the filter. @@ -5093,10 +5178,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirst>( - args?: SelectSubset> - ): Prisma__PatientClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> + */ + findFirst(args?: SelectSubset>): Prisma__PatientClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first Patient that matches the filter or @@ -5111,16 +5194,14 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__PatientClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__PatientClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** * Find zero or more Patients 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 {PatientFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {PatientFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Patients * const patients = await prisma.patient.findMany() @@ -5131,10 +5212,8 @@ export namespace Prisma { * // Only select the `firstName` * const patientWithFirstNameOnly = await prisma.patient.findMany({ select: { firstName: true } }) * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a Patient. @@ -5147,26 +5226,46 @@ export namespace Prisma { * } * }) * - **/ - create>( - args: SelectSubset> - ): Prisma__PatientClient<$Result.GetResult, T, 'create'>, never, ExtArgs> + */ + create(args: SelectSubset>): Prisma__PatientClient<$Result.GetResult, T, "create">, never, ExtArgs> /** * Create many Patients. - * @param {PatientCreateManyArgs} args - Arguments to create many Patients. - * @example - * // Create many Patients - * const patient = await prisma.patient.createMany({ - * data: { - * // ... provide data here - * } - * }) + * @param {PatientCreateManyArgs} args - Arguments to create many Patients. + * @example + * // Create many Patients + * const patient = await prisma.patient.createMany({ + * data: [ + * // ... provide data here + * ] + * }) * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Patients and returns the data saved in the database. + * @param {PatientCreateManyAndReturnArgs} args - Arguments to create many Patients. + * @example + * // Create many Patients + * const patient = await prisma.patient.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Patients and only return the `firstName` + * const patientWithFirstNameOnly = await prisma.patient.createManyAndReturn({ + * select: { firstName: 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 Patient. @@ -5179,10 +5278,8 @@ export namespace Prisma { * } * }) * - **/ - delete>( - args: SelectSubset> - ): Prisma__PatientClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> + */ + delete(args: SelectSubset>): Prisma__PatientClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one Patient. @@ -5198,10 +5295,8 @@ export namespace Prisma { * } * }) * - **/ - update>( - args: SelectSubset> - ): Prisma__PatientClient<$Result.GetResult, T, 'update'>, never, ExtArgs> + */ + update(args: SelectSubset>): Prisma__PatientClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more Patients. @@ -5214,10 +5309,8 @@ export namespace Prisma { * } * }) * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Patients. @@ -5235,10 +5328,8 @@ export namespace Prisma { * } * }) * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one Patient. @@ -5256,10 +5347,9 @@ export namespace Prisma { * // ... the filter for the Patient we want to update * } * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__PatientClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> + */ + upsert(args: SelectSubset>): Prisma__PatientClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + /** * Count the number of Patients. @@ -5399,33 +5489,32 @@ export namespace Prisma { * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__PatientClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: '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; + 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; + 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; + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } + /** * Fields of the Patient model */ @@ -5437,7 +5526,6 @@ export namespace Prisma { // Custom InputTypes - /** * Patient findUnique */ @@ -5452,7 +5540,6 @@ export namespace Prisma { where: PatientWhereUniqueInput } - /** * Patient findUniqueOrThrow */ @@ -5467,7 +5554,6 @@ export namespace Prisma { where: PatientWhereUniqueInput } - /** * Patient findFirst */ @@ -5485,7 +5571,7 @@ export namespace Prisma { * * Determine the order of Patients to fetch. */ - orderBy?: PatientOrderByWithRelationAndSearchRelevanceInput | PatientOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: PatientOrderByWithRelationInput | PatientOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -5512,7 +5598,6 @@ export namespace Prisma { distinct?: PatientScalarFieldEnum | PatientScalarFieldEnum[] } - /** * Patient findFirstOrThrow */ @@ -5530,7 +5615,7 @@ export namespace Prisma { * * Determine the order of Patients to fetch. */ - orderBy?: PatientOrderByWithRelationAndSearchRelevanceInput | PatientOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: PatientOrderByWithRelationInput | PatientOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -5557,7 +5642,6 @@ export namespace Prisma { distinct?: PatientScalarFieldEnum | PatientScalarFieldEnum[] } - /** * Patient findMany */ @@ -5575,7 +5659,7 @@ export namespace Prisma { * * Determine the order of Patients to fetch. */ - orderBy?: PatientOrderByWithRelationAndSearchRelevanceInput | PatientOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: PatientOrderByWithRelationInput | PatientOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -5597,7 +5681,6 @@ export namespace Prisma { distinct?: PatientScalarFieldEnum | PatientScalarFieldEnum[] } - /** * Patient create */ @@ -5612,7 +5695,6 @@ export namespace Prisma { data: XOR } - /** * Patient createMany */ @@ -5624,6 +5706,20 @@ export namespace Prisma { skipDuplicates?: boolean } + /** + * Patient createManyAndReturn + */ + export type PatientCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Patient + */ + select?: PatientSelectCreateManyAndReturn | null + /** + * The data used to create many Patients. + */ + data: PatientCreateManyInput | PatientCreateManyInput[] + skipDuplicates?: boolean + } /** * Patient update @@ -5643,7 +5739,6 @@ export namespace Prisma { where: PatientWhereUniqueInput } - /** * Patient updateMany */ @@ -5658,7 +5753,6 @@ export namespace Prisma { where?: PatientWhereInput } - /** * Patient upsert */ @@ -5681,7 +5775,6 @@ export namespace Prisma { update: XOR } - /** * Patient delete */ @@ -5696,7 +5789,6 @@ export namespace Prisma { where: PatientWhereUniqueInput } - /** * Patient deleteMany */ @@ -5707,7 +5799,6 @@ export namespace Prisma { where?: PatientWhereInput } - /** * Patient without action */ @@ -5719,7 +5810,6 @@ export namespace Prisma { } - /** * Model Movie */ @@ -5779,7 +5869,7 @@ export namespace Prisma { * * Determine the order of Movies to fetch. */ - orderBy?: MovieOrderByWithRelationAndSearchRelevanceInput | MovieOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: MovieOrderByWithRelationInput | MovieOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -5871,6 +5961,13 @@ export namespace Prisma { director?: boolean | DirectorDefaultArgs }, ExtArgs["result"]["movie"]> + export type MovieSelectCreateManyAndReturn = $Extensions.GetSelect<{ + directorFirstName?: boolean + directorLastName?: boolean + title?: boolean + director?: boolean | DirectorDefaultArgs + }, ExtArgs["result"]["movie"]> + export type MovieSelectScalar = { directorFirstName?: boolean directorLastName?: boolean @@ -5880,7 +5977,9 @@ export namespace Prisma { export type MovieInclude = { director?: boolean | DirectorDefaultArgs } - + export type MovieIncludeCreateManyAndReturn = { + director?: boolean | DirectorDefaultArgs + } export type $MoviePayload = { name: "Movie" @@ -5895,11 +5994,10 @@ export namespace Prisma { composites: {} } - type MovieGetPayload = $Result.GetResult type MovieCountArgs = - Omit & { + Omit & { select?: MovieCountAggregateInputType | true } @@ -5915,14 +6013,12 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUnique>( - args: SelectSubset> - ): Prisma__MovieClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> + */ + findUnique(args: SelectSubset>): Prisma__MovieClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** - * Find one Movie that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. + * Find one Movie that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. * @param {MovieFindUniqueOrThrowArgs} args - Arguments to find a Movie * @example * // Get one Movie @@ -5931,10 +6027,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__MovieClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__MovieClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first Movie that matches the filter. @@ -5948,10 +6042,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirst>( - args?: SelectSubset> - ): Prisma__MovieClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> + */ + findFirst(args?: SelectSubset>): Prisma__MovieClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first Movie that matches the filter or @@ -5966,16 +6058,14 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__MovieClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__MovieClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** * Find zero or more Movies 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 {MovieFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {MovieFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Movies * const movies = await prisma.movie.findMany() @@ -5986,10 +6076,8 @@ export namespace Prisma { * // Only select the `directorFirstName` * const movieWithDirectorFirstNameOnly = await prisma.movie.findMany({ select: { directorFirstName: true } }) * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a Movie. @@ -6002,26 +6090,46 @@ export namespace Prisma { * } * }) * - **/ - create>( - args: SelectSubset> - ): Prisma__MovieClient<$Result.GetResult, T, 'create'>, never, ExtArgs> + */ + create(args: SelectSubset>): Prisma__MovieClient<$Result.GetResult, T, "create">, never, ExtArgs> /** * Create many Movies. - * @param {MovieCreateManyArgs} args - Arguments to create many Movies. - * @example - * // Create many Movies - * const movie = await prisma.movie.createMany({ - * data: { - * // ... provide data here - * } - * }) + * @param {MovieCreateManyArgs} args - Arguments to create many Movies. + * @example + * // Create many Movies + * const movie = await prisma.movie.createMany({ + * data: [ + * // ... provide data here + * ] + * }) * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Movies and returns the data saved in the database. + * @param {MovieCreateManyAndReturnArgs} args - Arguments to create many Movies. + * @example + * // Create many Movies + * const movie = await prisma.movie.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Movies and only return the `directorFirstName` + * const movieWithDirectorFirstNameOnly = await prisma.movie.createManyAndReturn({ + * select: { directorFirstName: 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 Movie. @@ -6034,10 +6142,8 @@ export namespace Prisma { * } * }) * - **/ - delete>( - args: SelectSubset> - ): Prisma__MovieClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> + */ + delete(args: SelectSubset>): Prisma__MovieClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one Movie. @@ -6053,10 +6159,8 @@ export namespace Prisma { * } * }) * - **/ - update>( - args: SelectSubset> - ): Prisma__MovieClient<$Result.GetResult, T, 'update'>, never, ExtArgs> + */ + update(args: SelectSubset>): Prisma__MovieClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more Movies. @@ -6069,10 +6173,8 @@ export namespace Prisma { * } * }) * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Movies. @@ -6090,10 +6192,8 @@ export namespace Prisma { * } * }) * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one Movie. @@ -6111,10 +6211,9 @@ export namespace Prisma { * // ... the filter for the Movie we want to update * } * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__MovieClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> + */ + upsert(args: SelectSubset>): Prisma__MovieClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + /** * Count the number of Movies. @@ -6254,34 +6353,33 @@ export namespace Prisma { * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__MovieClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - - director = {}>(args?: Subset>): Prisma__DirectorClient<$Result.GetResult, T, 'findUniqueOrThrow'> | Null, Null, ExtArgs>; - + readonly [Symbol.toStringTag]: "PrismaPromise" + director = {}>(args?: Subset>): Prisma__DirectorClient<$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; + 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; + 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; + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } + /** * Fields of the Movie model */ @@ -6293,7 +6391,6 @@ export namespace Prisma { // Custom InputTypes - /** * Movie findUnique */ @@ -6303,7 +6400,7 @@ export namespace Prisma { */ select?: MovieSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: MovieInclude | null /** @@ -6312,7 +6409,6 @@ export namespace Prisma { where: MovieWhereUniqueInput } - /** * Movie findUniqueOrThrow */ @@ -6322,7 +6418,7 @@ export namespace Prisma { */ select?: MovieSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: MovieInclude | null /** @@ -6331,7 +6427,6 @@ export namespace Prisma { where: MovieWhereUniqueInput } - /** * Movie findFirst */ @@ -6341,7 +6436,7 @@ export namespace Prisma { */ select?: MovieSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: MovieInclude | null /** @@ -6353,7 +6448,7 @@ export namespace Prisma { * * Determine the order of Movies to fetch. */ - orderBy?: MovieOrderByWithRelationAndSearchRelevanceInput | MovieOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: MovieOrderByWithRelationInput | MovieOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -6380,7 +6475,6 @@ export namespace Prisma { distinct?: MovieScalarFieldEnum | MovieScalarFieldEnum[] } - /** * Movie findFirstOrThrow */ @@ -6390,7 +6484,7 @@ export namespace Prisma { */ select?: MovieSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: MovieInclude | null /** @@ -6402,7 +6496,7 @@ export namespace Prisma { * * Determine the order of Movies to fetch. */ - orderBy?: MovieOrderByWithRelationAndSearchRelevanceInput | MovieOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: MovieOrderByWithRelationInput | MovieOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -6429,7 +6523,6 @@ export namespace Prisma { distinct?: MovieScalarFieldEnum | MovieScalarFieldEnum[] } - /** * Movie findMany */ @@ -6439,7 +6532,7 @@ export namespace Prisma { */ select?: MovieSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: MovieInclude | null /** @@ -6451,7 +6544,7 @@ export namespace Prisma { * * Determine the order of Movies to fetch. */ - orderBy?: MovieOrderByWithRelationAndSearchRelevanceInput | MovieOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: MovieOrderByWithRelationInput | MovieOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -6473,7 +6566,6 @@ export namespace Prisma { distinct?: MovieScalarFieldEnum | MovieScalarFieldEnum[] } - /** * Movie create */ @@ -6483,7 +6575,7 @@ export namespace Prisma { */ select?: MovieSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: MovieInclude | null /** @@ -6492,7 +6584,6 @@ export namespace Prisma { data: XOR } - /** * Movie createMany */ @@ -6504,6 +6595,24 @@ export namespace Prisma { skipDuplicates?: boolean } + /** + * Movie createManyAndReturn + */ + export type MovieCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Movie + */ + select?: MovieSelectCreateManyAndReturn | null + /** + * The data used to create many Movies. + */ + data: MovieCreateManyInput | MovieCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: MovieIncludeCreateManyAndReturn | null + } /** * Movie update @@ -6514,7 +6623,7 @@ export namespace Prisma { */ select?: MovieSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: MovieInclude | null /** @@ -6527,7 +6636,6 @@ export namespace Prisma { where: MovieWhereUniqueInput } - /** * Movie updateMany */ @@ -6542,7 +6650,6 @@ export namespace Prisma { where?: MovieWhereInput } - /** * Movie upsert */ @@ -6552,7 +6659,7 @@ export namespace Prisma { */ select?: MovieSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: MovieInclude | null /** @@ -6569,7 +6676,6 @@ export namespace Prisma { update: XOR } - /** * Movie delete */ @@ -6579,7 +6685,7 @@ export namespace Prisma { */ select?: MovieSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: MovieInclude | null /** @@ -6588,7 +6694,6 @@ export namespace Prisma { where: MovieWhereUniqueInput } - /** * Movie deleteMany */ @@ -6599,7 +6704,6 @@ export namespace Prisma { where?: MovieWhereInput } - /** * Movie without action */ @@ -6609,13 +6713,12 @@ export namespace Prisma { */ select?: MovieSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: MovieInclude | null } - /** * Model Director */ @@ -6669,7 +6772,7 @@ export namespace Prisma { * * Determine the order of Directors to fetch. */ - orderBy?: DirectorOrderByWithRelationAndSearchRelevanceInput | DirectorOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: DirectorOrderByWithRelationInput | DirectorOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -6760,6 +6863,11 @@ export namespace Prisma { _count?: boolean | DirectorCountOutputTypeDefaultArgs }, ExtArgs["result"]["director"]> + export type DirectorSelectCreateManyAndReturn = $Extensions.GetSelect<{ + firstName?: boolean + lastName?: boolean + }, ExtArgs["result"]["director"]> + export type DirectorSelectScalar = { firstName?: boolean lastName?: boolean @@ -6769,7 +6877,7 @@ export namespace Prisma { movies?: boolean | Director$moviesArgs _count?: boolean | DirectorCountOutputTypeDefaultArgs } - + export type DirectorIncludeCreateManyAndReturn = {} export type $DirectorPayload = { name: "Director" @@ -6783,11 +6891,10 @@ export namespace Prisma { composites: {} } - type DirectorGetPayload = $Result.GetResult type DirectorCountArgs = - Omit & { + Omit & { select?: DirectorCountAggregateInputType | true } @@ -6803,14 +6910,12 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUnique>( - args: SelectSubset> - ): Prisma__DirectorClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> + */ + findUnique(args: SelectSubset>): Prisma__DirectorClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** - * Find one Director that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. + * Find one Director that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. * @param {DirectorFindUniqueOrThrowArgs} args - Arguments to find a Director * @example * // Get one Director @@ -6819,10 +6924,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__DirectorClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__DirectorClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first Director that matches the filter. @@ -6836,10 +6939,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirst>( - args?: SelectSubset> - ): Prisma__DirectorClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> + */ + findFirst(args?: SelectSubset>): Prisma__DirectorClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first Director that matches the filter or @@ -6854,16 +6955,14 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__DirectorClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__DirectorClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** * Find zero or more Directors 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 {DirectorFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {DirectorFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Directors * const directors = await prisma.director.findMany() @@ -6874,10 +6973,8 @@ export namespace Prisma { * // Only select the `firstName` * const directorWithFirstNameOnly = await prisma.director.findMany({ select: { firstName: true } }) * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a Director. @@ -6890,26 +6987,46 @@ export namespace Prisma { * } * }) * - **/ - create>( - args: SelectSubset> - ): Prisma__DirectorClient<$Result.GetResult, T, 'create'>, never, ExtArgs> + */ + create(args: SelectSubset>): Prisma__DirectorClient<$Result.GetResult, T, "create">, never, ExtArgs> /** * Create many Directors. - * @param {DirectorCreateManyArgs} args - Arguments to create many Directors. - * @example - * // Create many Directors - * const director = await prisma.director.createMany({ - * data: { - * // ... provide data here - * } - * }) + * @param {DirectorCreateManyArgs} args - Arguments to create many Directors. + * @example + * // Create many Directors + * const director = await prisma.director.createMany({ + * data: [ + * // ... provide data here + * ] + * }) * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Directors and returns the data saved in the database. + * @param {DirectorCreateManyAndReturnArgs} args - Arguments to create many Directors. + * @example + * // Create many Directors + * const director = await prisma.director.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Directors and only return the `firstName` + * const directorWithFirstNameOnly = await prisma.director.createManyAndReturn({ + * select: { firstName: 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 Director. @@ -6922,10 +7039,8 @@ export namespace Prisma { * } * }) * - **/ - delete>( - args: SelectSubset> - ): Prisma__DirectorClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> + */ + delete(args: SelectSubset>): Prisma__DirectorClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one Director. @@ -6941,10 +7056,8 @@ export namespace Prisma { * } * }) * - **/ - update>( - args: SelectSubset> - ): Prisma__DirectorClient<$Result.GetResult, T, 'update'>, never, ExtArgs> + */ + update(args: SelectSubset>): Prisma__DirectorClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more Directors. @@ -6957,10 +7070,8 @@ export namespace Prisma { * } * }) * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Directors. @@ -6978,10 +7089,8 @@ export namespace Prisma { * } * }) * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one Director. @@ -6999,10 +7108,9 @@ export namespace Prisma { * // ... the filter for the Director we want to update * } * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__DirectorClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> + */ + upsert(args: SelectSubset>): Prisma__DirectorClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + /** * Count the number of Directors. @@ -7142,34 +7250,33 @@ export namespace Prisma { * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__DirectorClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - - movies = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; - + readonly [Symbol.toStringTag]: "PrismaPromise" + movies = {}>(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; + 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; + 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; + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } + /** * Fields of the Director model */ @@ -7180,7 +7287,6 @@ export namespace Prisma { // Custom InputTypes - /** * Director findUnique */ @@ -7190,7 +7296,7 @@ export namespace Prisma { */ select?: DirectorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: DirectorInclude | null /** @@ -7199,7 +7305,6 @@ export namespace Prisma { where: DirectorWhereUniqueInput } - /** * Director findUniqueOrThrow */ @@ -7209,7 +7314,7 @@ export namespace Prisma { */ select?: DirectorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: DirectorInclude | null /** @@ -7218,7 +7323,6 @@ export namespace Prisma { where: DirectorWhereUniqueInput } - /** * Director findFirst */ @@ -7228,7 +7332,7 @@ export namespace Prisma { */ select?: DirectorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: DirectorInclude | null /** @@ -7240,7 +7344,7 @@ export namespace Prisma { * * Determine the order of Directors to fetch. */ - orderBy?: DirectorOrderByWithRelationAndSearchRelevanceInput | DirectorOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: DirectorOrderByWithRelationInput | DirectorOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -7267,7 +7371,6 @@ export namespace Prisma { distinct?: DirectorScalarFieldEnum | DirectorScalarFieldEnum[] } - /** * Director findFirstOrThrow */ @@ -7277,7 +7380,7 @@ export namespace Prisma { */ select?: DirectorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: DirectorInclude | null /** @@ -7289,7 +7392,7 @@ export namespace Prisma { * * Determine the order of Directors to fetch. */ - orderBy?: DirectorOrderByWithRelationAndSearchRelevanceInput | DirectorOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: DirectorOrderByWithRelationInput | DirectorOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -7316,7 +7419,6 @@ export namespace Prisma { distinct?: DirectorScalarFieldEnum | DirectorScalarFieldEnum[] } - /** * Director findMany */ @@ -7326,7 +7428,7 @@ export namespace Prisma { */ select?: DirectorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: DirectorInclude | null /** @@ -7338,7 +7440,7 @@ export namespace Prisma { * * Determine the order of Directors to fetch. */ - orderBy?: DirectorOrderByWithRelationAndSearchRelevanceInput | DirectorOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: DirectorOrderByWithRelationInput | DirectorOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -7360,7 +7462,6 @@ export namespace Prisma { distinct?: DirectorScalarFieldEnum | DirectorScalarFieldEnum[] } - /** * Director create */ @@ -7370,7 +7471,7 @@ export namespace Prisma { */ select?: DirectorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: DirectorInclude | null /** @@ -7379,7 +7480,6 @@ export namespace Prisma { data: XOR } - /** * Director createMany */ @@ -7391,6 +7491,20 @@ export namespace Prisma { skipDuplicates?: boolean } + /** + * Director createManyAndReturn + */ + export type DirectorCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Director + */ + select?: DirectorSelectCreateManyAndReturn | null + /** + * The data used to create many Directors. + */ + data: DirectorCreateManyInput | DirectorCreateManyInput[] + skipDuplicates?: boolean + } /** * Director update @@ -7401,7 +7515,7 @@ export namespace Prisma { */ select?: DirectorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: DirectorInclude | null /** @@ -7414,7 +7528,6 @@ export namespace Prisma { where: DirectorWhereUniqueInput } - /** * Director updateMany */ @@ -7429,7 +7542,6 @@ export namespace Prisma { where?: DirectorWhereInput } - /** * Director upsert */ @@ -7439,7 +7551,7 @@ export namespace Prisma { */ select?: DirectorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: DirectorInclude | null /** @@ -7456,7 +7568,6 @@ export namespace Prisma { update: XOR } - /** * Director delete */ @@ -7466,7 +7577,7 @@ export namespace Prisma { */ select?: DirectorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: DirectorInclude | null /** @@ -7475,7 +7586,6 @@ export namespace Prisma { where: DirectorWhereUniqueInput } - /** * Director deleteMany */ @@ -7486,7 +7596,6 @@ export namespace Prisma { where?: DirectorWhereInput } - /** * Director.movies */ @@ -7496,18 +7605,17 @@ export namespace Prisma { */ select?: MovieSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: MovieInclude | null where?: MovieWhereInput - orderBy?: MovieOrderByWithRelationAndSearchRelevanceInput | MovieOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: MovieOrderByWithRelationInput | MovieOrderByWithRelationInput[] cursor?: MovieWhereUniqueInput take?: number skip?: number distinct?: MovieScalarFieldEnum | MovieScalarFieldEnum[] } - /** * Director without action */ @@ -7517,13 +7625,12 @@ export namespace Prisma { */ select?: DirectorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: DirectorInclude | null } - /** * Model Problem */ @@ -7605,7 +7712,7 @@ export namespace Prisma { * * Determine the order of Problems to fetch. */ - orderBy?: ProblemOrderByWithRelationAndSearchRelevanceInput | ProblemOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: ProblemOrderByWithRelationInput | ProblemOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -7715,6 +7822,13 @@ export namespace Prisma { _count?: boolean | ProblemCountOutputTypeDefaultArgs }, ExtArgs["result"]["problem"]> + export type ProblemSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + problemText?: boolean + creatorId?: boolean + creator?: boolean | Problem$creatorArgs + }, ExtArgs["result"]["problem"]> + export type ProblemSelectScalar = { id?: boolean problemText?: boolean @@ -7726,7 +7840,9 @@ export namespace Prisma { creator?: boolean | Problem$creatorArgs _count?: boolean | ProblemCountOutputTypeDefaultArgs } - + export type ProblemIncludeCreateManyAndReturn = { + creator?: boolean | Problem$creatorArgs + } export type $ProblemPayload = { name: "Problem" @@ -7742,11 +7858,10 @@ export namespace Prisma { composites: {} } - type ProblemGetPayload = $Result.GetResult type ProblemCountArgs = - Omit & { + Omit & { select?: ProblemCountAggregateInputType | true } @@ -7762,14 +7877,12 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUnique>( - args: SelectSubset> - ): Prisma__ProblemClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> + */ + findUnique(args: SelectSubset>): Prisma__ProblemClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** - * Find one Problem that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. + * Find one Problem that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. * @param {ProblemFindUniqueOrThrowArgs} args - Arguments to find a Problem * @example * // Get one Problem @@ -7778,10 +7891,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__ProblemClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ProblemClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first Problem that matches the filter. @@ -7795,10 +7906,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirst>( - args?: SelectSubset> - ): Prisma__ProblemClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> + */ + findFirst(args?: SelectSubset>): Prisma__ProblemClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first Problem that matches the filter or @@ -7813,16 +7922,14 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__ProblemClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ProblemClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** * Find zero or more Problems 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 {ProblemFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {ProblemFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Problems * const problems = await prisma.problem.findMany() @@ -7833,10 +7940,8 @@ export namespace Prisma { * // Only select the `id` * const problemWithIdOnly = await prisma.problem.findMany({ select: { id: true } }) * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a Problem. @@ -7849,26 +7954,46 @@ export namespace Prisma { * } * }) * - **/ - create>( - args: SelectSubset> - ): Prisma__ProblemClient<$Result.GetResult, T, 'create'>, never, ExtArgs> + */ + create(args: SelectSubset>): Prisma__ProblemClient<$Result.GetResult, T, "create">, never, ExtArgs> /** * Create many Problems. - * @param {ProblemCreateManyArgs} args - Arguments to create many Problems. - * @example - * // Create many Problems - * const problem = await prisma.problem.createMany({ - * data: { - * // ... provide data here - * } - * }) + * @param {ProblemCreateManyArgs} args - Arguments to create many Problems. + * @example + * // Create many Problems + * const problem = await prisma.problem.createMany({ + * data: [ + * // ... provide data here + * ] + * }) * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Problems and returns the data saved in the database. + * @param {ProblemCreateManyAndReturnArgs} args - Arguments to create many Problems. + * @example + * // Create many Problems + * const problem = await prisma.problem.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Problems and only return the `id` + * const problemWithIdOnly = await prisma.problem.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 Problem. @@ -7881,10 +8006,8 @@ export namespace Prisma { * } * }) * - **/ - delete>( - args: SelectSubset> - ): Prisma__ProblemClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> + */ + delete(args: SelectSubset>): Prisma__ProblemClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one Problem. @@ -7900,10 +8023,8 @@ export namespace Prisma { * } * }) * - **/ - update>( - args: SelectSubset> - ): Prisma__ProblemClient<$Result.GetResult, T, 'update'>, never, ExtArgs> + */ + update(args: SelectSubset>): Prisma__ProblemClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more Problems. @@ -7916,10 +8037,8 @@ export namespace Prisma { * } * }) * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Problems. @@ -7937,10 +8056,8 @@ export namespace Prisma { * } * }) * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one Problem. @@ -7958,10 +8075,9 @@ export namespace Prisma { * // ... the filter for the Problem we want to update * } * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__ProblemClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> + */ + upsert(args: SelectSubset>): Prisma__ProblemClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + /** * Count the number of Problems. @@ -8101,36 +8217,34 @@ export namespace Prisma { * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__ProblemClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - - likedBy = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; - - creator = {}>(args?: Subset>): Prisma__CreatorClient<$Result.GetResult, T, 'findUniqueOrThrow'> | null, null, ExtArgs>; - + readonly [Symbol.toStringTag]: "PrismaPromise" + likedBy = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + creator = {}>(args?: Subset>): Prisma__CreatorClient<$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; + 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; + 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; + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } + /** * Fields of the Problem model */ @@ -8142,7 +8256,6 @@ export namespace Prisma { // Custom InputTypes - /** * Problem findUnique */ @@ -8152,7 +8265,7 @@ export namespace Prisma { */ select?: ProblemSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: ProblemInclude | null /** @@ -8161,7 +8274,6 @@ export namespace Prisma { where: ProblemWhereUniqueInput } - /** * Problem findUniqueOrThrow */ @@ -8171,7 +8283,7 @@ export namespace Prisma { */ select?: ProblemSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: ProblemInclude | null /** @@ -8180,7 +8292,6 @@ export namespace Prisma { where: ProblemWhereUniqueInput } - /** * Problem findFirst */ @@ -8190,7 +8301,7 @@ export namespace Prisma { */ select?: ProblemSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: ProblemInclude | null /** @@ -8202,7 +8313,7 @@ export namespace Prisma { * * Determine the order of Problems to fetch. */ - orderBy?: ProblemOrderByWithRelationAndSearchRelevanceInput | ProblemOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: ProblemOrderByWithRelationInput | ProblemOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -8229,7 +8340,6 @@ export namespace Prisma { distinct?: ProblemScalarFieldEnum | ProblemScalarFieldEnum[] } - /** * Problem findFirstOrThrow */ @@ -8239,7 +8349,7 @@ export namespace Prisma { */ select?: ProblemSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: ProblemInclude | null /** @@ -8251,7 +8361,7 @@ export namespace Prisma { * * Determine the order of Problems to fetch. */ - orderBy?: ProblemOrderByWithRelationAndSearchRelevanceInput | ProblemOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: ProblemOrderByWithRelationInput | ProblemOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -8278,7 +8388,6 @@ export namespace Prisma { distinct?: ProblemScalarFieldEnum | ProblemScalarFieldEnum[] } - /** * Problem findMany */ @@ -8288,7 +8397,7 @@ export namespace Prisma { */ select?: ProblemSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: ProblemInclude | null /** @@ -8300,7 +8409,7 @@ export namespace Prisma { * * Determine the order of Problems to fetch. */ - orderBy?: ProblemOrderByWithRelationAndSearchRelevanceInput | ProblemOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: ProblemOrderByWithRelationInput | ProblemOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -8322,7 +8431,6 @@ export namespace Prisma { distinct?: ProblemScalarFieldEnum | ProblemScalarFieldEnum[] } - /** * Problem create */ @@ -8332,7 +8440,7 @@ export namespace Prisma { */ select?: ProblemSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: ProblemInclude | null /** @@ -8341,7 +8449,6 @@ export namespace Prisma { data: XOR } - /** * Problem createMany */ @@ -8353,6 +8460,24 @@ export namespace Prisma { skipDuplicates?: boolean } + /** + * Problem createManyAndReturn + */ + export type ProblemCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Problem + */ + select?: ProblemSelectCreateManyAndReturn | null + /** + * The data used to create many Problems. + */ + data: ProblemCreateManyInput | ProblemCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ProblemIncludeCreateManyAndReturn | null + } /** * Problem update @@ -8363,7 +8488,7 @@ export namespace Prisma { */ select?: ProblemSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: ProblemInclude | null /** @@ -8376,7 +8501,6 @@ export namespace Prisma { where: ProblemWhereUniqueInput } - /** * Problem updateMany */ @@ -8391,7 +8515,6 @@ export namespace Prisma { where?: ProblemWhereInput } - /** * Problem upsert */ @@ -8401,7 +8524,7 @@ export namespace Prisma { */ select?: ProblemSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: ProblemInclude | null /** @@ -8418,7 +8541,6 @@ export namespace Prisma { update: XOR } - /** * Problem delete */ @@ -8428,7 +8550,7 @@ export namespace Prisma { */ select?: ProblemSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: ProblemInclude | null /** @@ -8437,7 +8559,6 @@ export namespace Prisma { where: ProblemWhereUniqueInput } - /** * Problem deleteMany */ @@ -8448,7 +8569,6 @@ export namespace Prisma { where?: ProblemWhereInput } - /** * Problem.likedBy */ @@ -8458,18 +8578,17 @@ export namespace Prisma { */ select?: CreatorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CreatorInclude | null where?: CreatorWhereInput - orderBy?: CreatorOrderByWithRelationAndSearchRelevanceInput | CreatorOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: CreatorOrderByWithRelationInput | CreatorOrderByWithRelationInput[] cursor?: CreatorWhereUniqueInput take?: number skip?: number distinct?: CreatorScalarFieldEnum | CreatorScalarFieldEnum[] } - /** * Problem.creator */ @@ -8479,13 +8598,12 @@ export namespace Prisma { */ select?: CreatorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CreatorInclude | null where?: CreatorWhereInput } - /** * Problem without action */ @@ -8495,13 +8613,12 @@ export namespace Prisma { */ select?: ProblemSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: ProblemInclude | null } - /** * Model Creator */ @@ -8573,7 +8690,7 @@ export namespace Prisma { * * Determine the order of Creators to fetch. */ - orderBy?: CreatorOrderByWithRelationAndSearchRelevanceInput | CreatorOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: CreatorOrderByWithRelationInput | CreatorOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -8681,6 +8798,11 @@ export namespace Prisma { _count?: boolean | CreatorCountOutputTypeDefaultArgs }, ExtArgs["result"]["creator"]> + export type CreatorSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + }, ExtArgs["result"]["creator"]> + export type CreatorSelectScalar = { id?: boolean name?: boolean @@ -8691,7 +8813,7 @@ export namespace Prisma { problems?: boolean | Creator$problemsArgs _count?: boolean | CreatorCountOutputTypeDefaultArgs } - + export type CreatorIncludeCreateManyAndReturn = {} export type $CreatorPayload = { name: "Creator" @@ -8706,11 +8828,10 @@ export namespace Prisma { composites: {} } - type CreatorGetPayload = $Result.GetResult type CreatorCountArgs = - Omit & { + Omit & { select?: CreatorCountAggregateInputType | true } @@ -8726,14 +8847,12 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUnique>( - args: SelectSubset> - ): Prisma__CreatorClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> + */ + findUnique(args: SelectSubset>): Prisma__CreatorClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** - * Find one Creator that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. + * Find one Creator that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. * @param {CreatorFindUniqueOrThrowArgs} args - Arguments to find a Creator * @example * // Get one Creator @@ -8742,10 +8861,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__CreatorClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__CreatorClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first Creator that matches the filter. @@ -8759,10 +8876,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirst>( - args?: SelectSubset> - ): Prisma__CreatorClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> + */ + findFirst(args?: SelectSubset>): Prisma__CreatorClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first Creator that matches the filter or @@ -8777,16 +8892,14 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__CreatorClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__CreatorClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** * Find zero or more Creators 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 {CreatorFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {CreatorFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Creators * const creators = await prisma.creator.findMany() @@ -8797,10 +8910,8 @@ export namespace Prisma { * // Only select the `id` * const creatorWithIdOnly = await prisma.creator.findMany({ select: { id: true } }) * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a Creator. @@ -8813,26 +8924,46 @@ export namespace Prisma { * } * }) * - **/ - create>( - args: SelectSubset> - ): Prisma__CreatorClient<$Result.GetResult, T, 'create'>, never, ExtArgs> + */ + create(args: SelectSubset>): Prisma__CreatorClient<$Result.GetResult, T, "create">, never, ExtArgs> /** * Create many Creators. - * @param {CreatorCreateManyArgs} args - Arguments to create many Creators. - * @example - * // Create many Creators - * const creator = await prisma.creator.createMany({ - * data: { - * // ... provide data here - * } - * }) + * @param {CreatorCreateManyArgs} args - Arguments to create many Creators. + * @example + * // Create many Creators + * const creator = await prisma.creator.createMany({ + * data: [ + * // ... provide data here + * ] + * }) * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Creators and returns the data saved in the database. + * @param {CreatorCreateManyAndReturnArgs} args - Arguments to create many Creators. + * @example + * // Create many Creators + * const creator = await prisma.creator.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Creators and only return the `id` + * const creatorWithIdOnly = await prisma.creator.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 Creator. @@ -8845,10 +8976,8 @@ export namespace Prisma { * } * }) * - **/ - delete>( - args: SelectSubset> - ): Prisma__CreatorClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> + */ + delete(args: SelectSubset>): Prisma__CreatorClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one Creator. @@ -8864,10 +8993,8 @@ export namespace Prisma { * } * }) * - **/ - update>( - args: SelectSubset> - ): Prisma__CreatorClient<$Result.GetResult, T, 'update'>, never, ExtArgs> + */ + update(args: SelectSubset>): Prisma__CreatorClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more Creators. @@ -8880,10 +9007,8 @@ export namespace Prisma { * } * }) * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Creators. @@ -8901,10 +9026,8 @@ export namespace Prisma { * } * }) * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one Creator. @@ -8922,10 +9045,9 @@ export namespace Prisma { * // ... the filter for the Creator we want to update * } * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__CreatorClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> + */ + upsert(args: SelectSubset>): Prisma__CreatorClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + /** * Count the number of Creators. @@ -9065,36 +9187,34 @@ export namespace Prisma { * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__CreatorClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - - likes = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; - - problems = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; - + readonly [Symbol.toStringTag]: "PrismaPromise" + likes = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + problems = {}>(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; + 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; + 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; + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } + /** * Fields of the Creator model */ @@ -9105,7 +9225,6 @@ export namespace Prisma { // Custom InputTypes - /** * Creator findUnique */ @@ -9115,7 +9234,7 @@ export namespace Prisma { */ select?: CreatorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CreatorInclude | null /** @@ -9124,7 +9243,6 @@ export namespace Prisma { where: CreatorWhereUniqueInput } - /** * Creator findUniqueOrThrow */ @@ -9134,7 +9252,7 @@ export namespace Prisma { */ select?: CreatorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CreatorInclude | null /** @@ -9143,7 +9261,6 @@ export namespace Prisma { where: CreatorWhereUniqueInput } - /** * Creator findFirst */ @@ -9153,7 +9270,7 @@ export namespace Prisma { */ select?: CreatorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CreatorInclude | null /** @@ -9165,7 +9282,7 @@ export namespace Prisma { * * Determine the order of Creators to fetch. */ - orderBy?: CreatorOrderByWithRelationAndSearchRelevanceInput | CreatorOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: CreatorOrderByWithRelationInput | CreatorOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -9192,7 +9309,6 @@ export namespace Prisma { distinct?: CreatorScalarFieldEnum | CreatorScalarFieldEnum[] } - /** * Creator findFirstOrThrow */ @@ -9202,7 +9318,7 @@ export namespace Prisma { */ select?: CreatorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CreatorInclude | null /** @@ -9214,7 +9330,7 @@ export namespace Prisma { * * Determine the order of Creators to fetch. */ - orderBy?: CreatorOrderByWithRelationAndSearchRelevanceInput | CreatorOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: CreatorOrderByWithRelationInput | CreatorOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -9241,7 +9357,6 @@ export namespace Prisma { distinct?: CreatorScalarFieldEnum | CreatorScalarFieldEnum[] } - /** * Creator findMany */ @@ -9251,7 +9366,7 @@ export namespace Prisma { */ select?: CreatorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CreatorInclude | null /** @@ -9263,7 +9378,7 @@ export namespace Prisma { * * Determine the order of Creators to fetch. */ - orderBy?: CreatorOrderByWithRelationAndSearchRelevanceInput | CreatorOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: CreatorOrderByWithRelationInput | CreatorOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -9285,7 +9400,6 @@ export namespace Prisma { distinct?: CreatorScalarFieldEnum | CreatorScalarFieldEnum[] } - /** * Creator create */ @@ -9295,7 +9409,7 @@ export namespace Prisma { */ select?: CreatorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CreatorInclude | null /** @@ -9304,7 +9418,6 @@ export namespace Prisma { data: XOR } - /** * Creator createMany */ @@ -9316,6 +9429,20 @@ export namespace Prisma { skipDuplicates?: boolean } + /** + * Creator createManyAndReturn + */ + export type CreatorCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Creator + */ + select?: CreatorSelectCreateManyAndReturn | null + /** + * The data used to create many Creators. + */ + data: CreatorCreateManyInput | CreatorCreateManyInput[] + skipDuplicates?: boolean + } /** * Creator update @@ -9326,7 +9453,7 @@ export namespace Prisma { */ select?: CreatorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CreatorInclude | null /** @@ -9339,7 +9466,6 @@ export namespace Prisma { where: CreatorWhereUniqueInput } - /** * Creator updateMany */ @@ -9354,7 +9480,6 @@ export namespace Prisma { where?: CreatorWhereInput } - /** * Creator upsert */ @@ -9364,7 +9489,7 @@ export namespace Prisma { */ select?: CreatorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CreatorInclude | null /** @@ -9381,7 +9506,6 @@ export namespace Prisma { update: XOR } - /** * Creator delete */ @@ -9391,7 +9515,7 @@ export namespace Prisma { */ select?: CreatorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CreatorInclude | null /** @@ -9400,7 +9524,6 @@ export namespace Prisma { where: CreatorWhereUniqueInput } - /** * Creator deleteMany */ @@ -9411,7 +9534,6 @@ export namespace Prisma { where?: CreatorWhereInput } - /** * Creator.likes */ @@ -9421,18 +9543,17 @@ export namespace Prisma { */ select?: ProblemSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: ProblemInclude | null where?: ProblemWhereInput - orderBy?: ProblemOrderByWithRelationAndSearchRelevanceInput | ProblemOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: ProblemOrderByWithRelationInput | ProblemOrderByWithRelationInput[] cursor?: ProblemWhereUniqueInput take?: number skip?: number distinct?: ProblemScalarFieldEnum | ProblemScalarFieldEnum[] } - /** * Creator.problems */ @@ -9442,18 +9563,17 @@ export namespace Prisma { */ select?: ProblemSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: ProblemInclude | null where?: ProblemWhereInput - orderBy?: ProblemOrderByWithRelationAndSearchRelevanceInput | ProblemOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: ProblemOrderByWithRelationInput | ProblemOrderByWithRelationInput[] cursor?: ProblemWhereUniqueInput take?: number skip?: number distinct?: ProblemScalarFieldEnum | ProblemScalarFieldEnum[] } - /** * Creator without action */ @@ -9463,13 +9583,12 @@ export namespace Prisma { */ select?: CreatorSelect | null /** - * Choose, which related nodes to fetch as well. + * Choose, which related nodes to fetch as well */ include?: CreatorInclude | null } - /** * Model NativeTypeModel */ @@ -9561,7 +9680,7 @@ export namespace Prisma { * * Determine the order of NativeTypeModels to fetch. */ - orderBy?: NativeTypeModelOrderByWithRelationAndSearchRelevanceInput | NativeTypeModelOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: NativeTypeModelOrderByWithRelationInput | NativeTypeModelOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -9670,6 +9789,13 @@ export namespace Prisma { decimal?: boolean }, ExtArgs["result"]["nativeTypeModel"]> + export type NativeTypeModelSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + bigInt?: boolean + byteA?: boolean + decimal?: boolean + }, ExtArgs["result"]["nativeTypeModel"]> + export type NativeTypeModelSelectScalar = { id?: boolean bigInt?: boolean @@ -9690,11 +9816,10 @@ export namespace Prisma { composites: {} } - type NativeTypeModelGetPayload = $Result.GetResult type NativeTypeModelCountArgs = - Omit & { + Omit & { select?: NativeTypeModelCountAggregateInputType | true } @@ -9710,14 +9835,12 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUnique>( - args: SelectSubset> - ): Prisma__NativeTypeModelClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> + */ + findUnique(args: SelectSubset>): Prisma__NativeTypeModelClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** - * Find one NativeTypeModel that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. + * Find one NativeTypeModel that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. * @param {NativeTypeModelFindUniqueOrThrowArgs} args - Arguments to find a NativeTypeModel * @example * // Get one NativeTypeModel @@ -9726,10 +9849,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__NativeTypeModelClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__NativeTypeModelClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first NativeTypeModel that matches the filter. @@ -9743,10 +9864,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirst>( - args?: SelectSubset> - ): Prisma__NativeTypeModelClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> + */ + findFirst(args?: SelectSubset>): Prisma__NativeTypeModelClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first NativeTypeModel that matches the filter or @@ -9761,16 +9880,14 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__NativeTypeModelClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__NativeTypeModelClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** * Find zero or more NativeTypeModels 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 {NativeTypeModelFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {NativeTypeModelFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all NativeTypeModels * const nativeTypeModels = await prisma.nativeTypeModel.findMany() @@ -9781,10 +9898,8 @@ export namespace Prisma { * // Only select the `id` * const nativeTypeModelWithIdOnly = await prisma.nativeTypeModel.findMany({ select: { id: true } }) * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a NativeTypeModel. @@ -9797,26 +9912,46 @@ export namespace Prisma { * } * }) * - **/ - create>( - args: SelectSubset> - ): Prisma__NativeTypeModelClient<$Result.GetResult, T, 'create'>, never, ExtArgs> + */ + create(args: SelectSubset>): Prisma__NativeTypeModelClient<$Result.GetResult, T, "create">, never, ExtArgs> /** * Create many NativeTypeModels. - * @param {NativeTypeModelCreateManyArgs} args - Arguments to create many NativeTypeModels. - * @example - * // Create many NativeTypeModels - * const nativeTypeModel = await prisma.nativeTypeModel.createMany({ - * data: { - * // ... provide data here - * } - * }) + * @param {NativeTypeModelCreateManyArgs} args - Arguments to create many NativeTypeModels. + * @example + * // Create many NativeTypeModels + * const nativeTypeModel = await prisma.nativeTypeModel.createMany({ + * data: [ + * // ... provide data here + * ] + * }) * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many NativeTypeModels and returns the data saved in the database. + * @param {NativeTypeModelCreateManyAndReturnArgs} args - Arguments to create many NativeTypeModels. + * @example + * // Create many NativeTypeModels + * const nativeTypeModel = await prisma.nativeTypeModel.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many NativeTypeModels and only return the `id` + * const nativeTypeModelWithIdOnly = await prisma.nativeTypeModel.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 NativeTypeModel. @@ -9829,10 +9964,8 @@ export namespace Prisma { * } * }) * - **/ - delete>( - args: SelectSubset> - ): Prisma__NativeTypeModelClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> + */ + delete(args: SelectSubset>): Prisma__NativeTypeModelClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one NativeTypeModel. @@ -9848,10 +9981,8 @@ export namespace Prisma { * } * }) * - **/ - update>( - args: SelectSubset> - ): Prisma__NativeTypeModelClient<$Result.GetResult, T, 'update'>, never, ExtArgs> + */ + update(args: SelectSubset>): Prisma__NativeTypeModelClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more NativeTypeModels. @@ -9864,10 +9995,8 @@ export namespace Prisma { * } * }) * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more NativeTypeModels. @@ -9885,10 +10014,8 @@ export namespace Prisma { * } * }) * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one NativeTypeModel. @@ -9906,10 +10033,9 @@ export namespace Prisma { * // ... the filter for the NativeTypeModel we want to update * } * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__NativeTypeModelClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> + */ + upsert(args: SelectSubset>): Prisma__NativeTypeModelClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + /** * Count the number of NativeTypeModels. @@ -10049,33 +10175,32 @@ export namespace Prisma { * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__NativeTypeModelClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: '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; + 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; + 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; + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } + /** * Fields of the NativeTypeModel model */ @@ -10088,7 +10213,6 @@ export namespace Prisma { // Custom InputTypes - /** * NativeTypeModel findUnique */ @@ -10103,7 +10227,6 @@ export namespace Prisma { where: NativeTypeModelWhereUniqueInput } - /** * NativeTypeModel findUniqueOrThrow */ @@ -10118,7 +10241,6 @@ export namespace Prisma { where: NativeTypeModelWhereUniqueInput } - /** * NativeTypeModel findFirst */ @@ -10136,7 +10258,7 @@ export namespace Prisma { * * Determine the order of NativeTypeModels to fetch. */ - orderBy?: NativeTypeModelOrderByWithRelationAndSearchRelevanceInput | NativeTypeModelOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: NativeTypeModelOrderByWithRelationInput | NativeTypeModelOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -10163,7 +10285,6 @@ export namespace Prisma { distinct?: NativeTypeModelScalarFieldEnum | NativeTypeModelScalarFieldEnum[] } - /** * NativeTypeModel findFirstOrThrow */ @@ -10181,7 +10302,7 @@ export namespace Prisma { * * Determine the order of NativeTypeModels to fetch. */ - orderBy?: NativeTypeModelOrderByWithRelationAndSearchRelevanceInput | NativeTypeModelOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: NativeTypeModelOrderByWithRelationInput | NativeTypeModelOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -10208,7 +10329,6 @@ export namespace Prisma { distinct?: NativeTypeModelScalarFieldEnum | NativeTypeModelScalarFieldEnum[] } - /** * NativeTypeModel findMany */ @@ -10226,7 +10346,7 @@ export namespace Prisma { * * Determine the order of NativeTypeModels to fetch. */ - orderBy?: NativeTypeModelOrderByWithRelationAndSearchRelevanceInput | NativeTypeModelOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: NativeTypeModelOrderByWithRelationInput | NativeTypeModelOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -10248,7 +10368,6 @@ export namespace Prisma { distinct?: NativeTypeModelScalarFieldEnum | NativeTypeModelScalarFieldEnum[] } - /** * NativeTypeModel create */ @@ -10263,7 +10382,6 @@ export namespace Prisma { data?: XOR } - /** * NativeTypeModel createMany */ @@ -10275,6 +10393,20 @@ export namespace Prisma { skipDuplicates?: boolean } + /** + * NativeTypeModel createManyAndReturn + */ + export type NativeTypeModelCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the NativeTypeModel + */ + select?: NativeTypeModelSelectCreateManyAndReturn | null + /** + * The data used to create many NativeTypeModels. + */ + data: NativeTypeModelCreateManyInput | NativeTypeModelCreateManyInput[] + skipDuplicates?: boolean + } /** * NativeTypeModel update @@ -10294,7 +10426,6 @@ export namespace Prisma { where: NativeTypeModelWhereUniqueInput } - /** * NativeTypeModel updateMany */ @@ -10309,7 +10440,6 @@ export namespace Prisma { where?: NativeTypeModelWhereInput } - /** * NativeTypeModel upsert */ @@ -10332,7 +10462,6 @@ export namespace Prisma { update: XOR } - /** * NativeTypeModel delete */ @@ -10347,7 +10476,6 @@ export namespace Prisma { where: NativeTypeModelWhereUniqueInput } - /** * NativeTypeModel deleteMany */ @@ -10358,7 +10486,6 @@ export namespace Prisma { where?: NativeTypeModelWhereInput } - /** * NativeTypeModel without action */ @@ -10370,7 +10497,6 @@ export namespace Prisma { } - /** * Model Equipment */ @@ -10424,7 +10550,7 @@ export namespace Prisma { * * Determine the order of Equipment to fetch. */ - orderBy?: EquipmentOrderByWithRelationAndSearchRelevanceInput | EquipmentOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: EquipmentOrderByWithRelationInput | EquipmentOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -10513,6 +10639,11 @@ export namespace Prisma { name?: boolean }, ExtArgs["result"]["equipment"]> + export type EquipmentSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + }, ExtArgs["result"]["equipment"]> + export type EquipmentSelectScalar = { id?: boolean name?: boolean @@ -10529,11 +10660,10 @@ export namespace Prisma { composites: {} } - type EquipmentGetPayload = $Result.GetResult type EquipmentCountArgs = - Omit & { + Omit & { select?: EquipmentCountAggregateInputType | true } @@ -10549,14 +10679,12 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUnique>( - args: SelectSubset> - ): Prisma__EquipmentClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> + */ + findUnique(args: SelectSubset>): Prisma__EquipmentClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** - * Find one Equipment that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. + * Find one Equipment that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. * @param {EquipmentFindUniqueOrThrowArgs} args - Arguments to find a Equipment * @example * // Get one Equipment @@ -10565,10 +10693,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__EquipmentClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__EquipmentClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first Equipment that matches the filter. @@ -10582,10 +10708,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirst>( - args?: SelectSubset> - ): Prisma__EquipmentClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> + */ + findFirst(args?: SelectSubset>): Prisma__EquipmentClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first Equipment that matches the filter or @@ -10600,16 +10724,14 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__EquipmentClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__EquipmentClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** * Find zero or more Equipment 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 {EquipmentFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {EquipmentFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Equipment * const equipment = await prisma.equipment.findMany() @@ -10620,10 +10742,8 @@ export namespace Prisma { * // Only select the `id` * const equipmentWithIdOnly = await prisma.equipment.findMany({ select: { id: true } }) * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a Equipment. @@ -10636,26 +10756,46 @@ export namespace Prisma { * } * }) * - **/ - create>( - args: SelectSubset> - ): Prisma__EquipmentClient<$Result.GetResult, T, 'create'>, never, ExtArgs> + */ + create(args: SelectSubset>): Prisma__EquipmentClient<$Result.GetResult, T, "create">, never, ExtArgs> /** * Create many Equipment. - * @param {EquipmentCreateManyArgs} args - Arguments to create many Equipment. - * @example - * // Create many Equipment - * const equipment = await prisma.equipment.createMany({ - * data: { - * // ... provide data here - * } - * }) + * @param {EquipmentCreateManyArgs} args - Arguments to create many Equipment. + * @example + * // Create many Equipment + * const equipment = await prisma.equipment.createMany({ + * data: [ + * // ... provide data here + * ] + * }) * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Equipment and returns the data saved in the database. + * @param {EquipmentCreateManyAndReturnArgs} args - Arguments to create many Equipment. + * @example + * // Create many Equipment + * const equipment = await prisma.equipment.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Equipment and only return the `id` + * const equipmentWithIdOnly = await prisma.equipment.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 Equipment. @@ -10668,10 +10808,8 @@ export namespace Prisma { * } * }) * - **/ - delete>( - args: SelectSubset> - ): Prisma__EquipmentClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> + */ + delete(args: SelectSubset>): Prisma__EquipmentClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one Equipment. @@ -10687,10 +10825,8 @@ export namespace Prisma { * } * }) * - **/ - update>( - args: SelectSubset> - ): Prisma__EquipmentClient<$Result.GetResult, T, 'update'>, never, ExtArgs> + */ + update(args: SelectSubset>): Prisma__EquipmentClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more Equipment. @@ -10703,10 +10839,8 @@ export namespace Prisma { * } * }) * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Equipment. @@ -10724,10 +10858,8 @@ export namespace Prisma { * } * }) * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one Equipment. @@ -10745,10 +10877,9 @@ export namespace Prisma { * // ... the filter for the Equipment we want to update * } * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__EquipmentClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> + */ + upsert(args: SelectSubset>): Prisma__EquipmentClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + /** * Count the number of Equipment. @@ -10888,33 +11019,32 @@ export namespace Prisma { * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__EquipmentClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: '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; + 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; + 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; + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } + /** * Fields of the Equipment model */ @@ -10925,7 +11055,6 @@ export namespace Prisma { // Custom InputTypes - /** * Equipment findUnique */ @@ -10940,7 +11069,6 @@ export namespace Prisma { where: EquipmentWhereUniqueInput } - /** * Equipment findUniqueOrThrow */ @@ -10955,7 +11083,6 @@ export namespace Prisma { where: EquipmentWhereUniqueInput } - /** * Equipment findFirst */ @@ -10973,7 +11100,7 @@ export namespace Prisma { * * Determine the order of Equipment to fetch. */ - orderBy?: EquipmentOrderByWithRelationAndSearchRelevanceInput | EquipmentOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: EquipmentOrderByWithRelationInput | EquipmentOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -11000,7 +11127,6 @@ export namespace Prisma { distinct?: EquipmentScalarFieldEnum | EquipmentScalarFieldEnum[] } - /** * Equipment findFirstOrThrow */ @@ -11018,7 +11144,7 @@ export namespace Prisma { * * Determine the order of Equipment to fetch. */ - orderBy?: EquipmentOrderByWithRelationAndSearchRelevanceInput | EquipmentOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: EquipmentOrderByWithRelationInput | EquipmentOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -11045,7 +11171,6 @@ export namespace Prisma { distinct?: EquipmentScalarFieldEnum | EquipmentScalarFieldEnum[] } - /** * Equipment findMany */ @@ -11063,7 +11188,7 @@ export namespace Prisma { * * Determine the order of Equipment to fetch. */ - orderBy?: EquipmentOrderByWithRelationAndSearchRelevanceInput | EquipmentOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: EquipmentOrderByWithRelationInput | EquipmentOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -11085,7 +11210,6 @@ export namespace Prisma { distinct?: EquipmentScalarFieldEnum | EquipmentScalarFieldEnum[] } - /** * Equipment create */ @@ -11100,7 +11224,6 @@ export namespace Prisma { data?: XOR } - /** * Equipment createMany */ @@ -11112,6 +11235,20 @@ export namespace Prisma { skipDuplicates?: boolean } + /** + * Equipment createManyAndReturn + */ + export type EquipmentCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Equipment + */ + select?: EquipmentSelectCreateManyAndReturn | null + /** + * The data used to create many Equipment. + */ + data: EquipmentCreateManyInput | EquipmentCreateManyInput[] + skipDuplicates?: boolean + } /** * Equipment update @@ -11131,7 +11268,6 @@ export namespace Prisma { where: EquipmentWhereUniqueInput } - /** * Equipment updateMany */ @@ -11146,7 +11282,6 @@ export namespace Prisma { where?: EquipmentWhereInput } - /** * Equipment upsert */ @@ -11169,7 +11304,6 @@ export namespace Prisma { update: XOR } - /** * Equipment delete */ @@ -11184,7 +11318,6 @@ export namespace Prisma { where: EquipmentWhereUniqueInput } - /** * Equipment deleteMany */ @@ -11195,7 +11328,6 @@ export namespace Prisma { where?: EquipmentWhereInput } - /** * Equipment without action */ @@ -11207,7 +11339,6 @@ export namespace Prisma { } - /** * Model Hidden */ @@ -11261,7 +11392,7 @@ export namespace Prisma { * * Determine the order of Hiddens to fetch. */ - orderBy?: HiddenOrderByWithRelationAndSearchRelevanceInput | HiddenOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: HiddenOrderByWithRelationInput | HiddenOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -11350,6 +11481,11 @@ export namespace Prisma { name?: boolean }, ExtArgs["result"]["hidden"]> + export type HiddenSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + }, ExtArgs["result"]["hidden"]> + export type HiddenSelectScalar = { id?: boolean name?: boolean @@ -11366,11 +11502,10 @@ export namespace Prisma { composites: {} } - type HiddenGetPayload = $Result.GetResult type HiddenCountArgs = - Omit & { + Omit & { select?: HiddenCountAggregateInputType | true } @@ -11386,14 +11521,12 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUnique>( - args: SelectSubset> - ): Prisma__HiddenClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> + */ + findUnique(args: SelectSubset>): Prisma__HiddenClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** - * Find one Hidden that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. + * Find one Hidden that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. * @param {HiddenFindUniqueOrThrowArgs} args - Arguments to find a Hidden * @example * // Get one Hidden @@ -11402,10 +11535,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__HiddenClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__HiddenClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first Hidden that matches the filter. @@ -11419,10 +11550,8 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirst>( - args?: SelectSubset> - ): Prisma__HiddenClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> + */ + findFirst(args?: SelectSubset>): Prisma__HiddenClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first Hidden that matches the filter or @@ -11437,16 +11566,14 @@ export namespace Prisma { * // ... provide filter here * } * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__HiddenClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__HiddenClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** * Find zero or more Hiddens 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 {HiddenFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {HiddenFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Hiddens * const hiddens = await prisma.hidden.findMany() @@ -11457,10 +11584,8 @@ export namespace Prisma { * // Only select the `id` * const hiddenWithIdOnly = await prisma.hidden.findMany({ select: { id: true } }) * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a Hidden. @@ -11473,26 +11598,46 @@ export namespace Prisma { * } * }) * - **/ - create>( - args: SelectSubset> - ): Prisma__HiddenClient<$Result.GetResult, T, 'create'>, never, ExtArgs> + */ + create(args: SelectSubset>): Prisma__HiddenClient<$Result.GetResult, T, "create">, never, ExtArgs> /** * Create many Hiddens. - * @param {HiddenCreateManyArgs} args - Arguments to create many Hiddens. - * @example - * // Create many Hiddens - * const hidden = await prisma.hidden.createMany({ - * data: { - * // ... provide data here - * } - * }) + * @param {HiddenCreateManyArgs} args - Arguments to create many Hiddens. + * @example + * // Create many Hiddens + * const hidden = await prisma.hidden.createMany({ + * data: [ + * // ... provide data here + * ] + * }) * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Hiddens and returns the data saved in the database. + * @param {HiddenCreateManyAndReturnArgs} args - Arguments to create many Hiddens. + * @example + * // Create many Hiddens + * const hidden = await prisma.hidden.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Hiddens and only return the `id` + * const hiddenWithIdOnly = await prisma.hidden.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 Hidden. @@ -11505,10 +11650,8 @@ export namespace Prisma { * } * }) * - **/ - delete>( - args: SelectSubset> - ): Prisma__HiddenClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> + */ + delete(args: SelectSubset>): Prisma__HiddenClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one Hidden. @@ -11524,10 +11667,8 @@ export namespace Prisma { * } * }) * - **/ - update>( - args: SelectSubset> - ): Prisma__HiddenClient<$Result.GetResult, T, 'update'>, never, ExtArgs> + */ + update(args: SelectSubset>): Prisma__HiddenClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more Hiddens. @@ -11540,10 +11681,8 @@ export namespace Prisma { * } * }) * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Hiddens. @@ -11561,10 +11700,8 @@ export namespace Prisma { * } * }) * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one Hidden. @@ -11582,10 +11719,9 @@ export namespace Prisma { * // ... the filter for the Hidden we want to update * } * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__HiddenClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> + */ + upsert(args: SelectSubset>): Prisma__HiddenClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + /** * Count the number of Hiddens. @@ -11725,33 +11861,32 @@ export namespace Prisma { * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__HiddenClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: '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; + 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; + 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; + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } + /** * Fields of the Hidden model */ @@ -11762,7 +11897,6 @@ export namespace Prisma { // Custom InputTypes - /** * Hidden findUnique */ @@ -11777,7 +11911,6 @@ export namespace Prisma { where: HiddenWhereUniqueInput } - /** * Hidden findUniqueOrThrow */ @@ -11792,7 +11925,6 @@ export namespace Prisma { where: HiddenWhereUniqueInput } - /** * Hidden findFirst */ @@ -11810,7 +11942,7 @@ export namespace Prisma { * * Determine the order of Hiddens to fetch. */ - orderBy?: HiddenOrderByWithRelationAndSearchRelevanceInput | HiddenOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: HiddenOrderByWithRelationInput | HiddenOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -11837,7 +11969,6 @@ export namespace Prisma { distinct?: HiddenScalarFieldEnum | HiddenScalarFieldEnum[] } - /** * Hidden findFirstOrThrow */ @@ -11855,7 +11986,7 @@ export namespace Prisma { * * Determine the order of Hiddens to fetch. */ - orderBy?: HiddenOrderByWithRelationAndSearchRelevanceInput | HiddenOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: HiddenOrderByWithRelationInput | HiddenOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -11882,7 +12013,6 @@ export namespace Prisma { distinct?: HiddenScalarFieldEnum | HiddenScalarFieldEnum[] } - /** * Hidden findMany */ @@ -11900,7 +12030,7 @@ export namespace Prisma { * * Determine the order of Hiddens to fetch. */ - orderBy?: HiddenOrderByWithRelationAndSearchRelevanceInput | HiddenOrderByWithRelationAndSearchRelevanceInput[] + orderBy?: HiddenOrderByWithRelationInput | HiddenOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * @@ -11922,7 +12052,6 @@ export namespace Prisma { distinct?: HiddenScalarFieldEnum | HiddenScalarFieldEnum[] } - /** * Hidden create */ @@ -11937,7 +12066,6 @@ export namespace Prisma { data?: XOR } - /** * Hidden createMany */ @@ -11949,6 +12077,20 @@ export namespace Prisma { skipDuplicates?: boolean } + /** + * Hidden createManyAndReturn + */ + export type HiddenCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Hidden + */ + select?: HiddenSelectCreateManyAndReturn | null + /** + * The data used to create many Hiddens. + */ + data: HiddenCreateManyInput | HiddenCreateManyInput[] + skipDuplicates?: boolean + } /** * Hidden update @@ -11968,7 +12110,6 @@ export namespace Prisma { where: HiddenWhereUniqueInput } - /** * Hidden updateMany */ @@ -11983,7 +12124,6 @@ export namespace Prisma { where?: HiddenWhereInput } - /** * Hidden upsert */ @@ -12006,7 +12146,6 @@ export namespace Prisma { update: XOR } - /** * Hidden delete */ @@ -12021,7 +12160,6 @@ export namespace Prisma { where: HiddenWhereUniqueInput } - /** * Hidden deleteMany */ @@ -12032,7 +12170,6 @@ export namespace Prisma { where?: HiddenWhereInput } - /** * Hidden without action */ @@ -12044,7 +12181,6 @@ export namespace Prisma { } - /** * Enums */ @@ -12457,7 +12593,7 @@ export namespace Prisma { editorPosts?: PostListRelationFilter } - export type UserOrderByWithRelationAndSearchRelevanceInput = { + export type UserOrderByWithRelationInput = { id?: SortOrder email?: SortOrder name?: SortOrderInput | SortOrder @@ -12540,7 +12676,7 @@ export namespace Prisma { editor?: XOR | null } - export type postOrderByWithRelationAndSearchRelevanceInput = { + export type postOrderByWithRelationInput = { uuid?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder @@ -12552,8 +12688,8 @@ export namespace Prisma { editorId?: SortOrderInput | SortOrder kind?: SortOrderInput | SortOrder metadata?: SortOrder - author?: UserOrderByWithRelationAndSearchRelevanceInput - editor?: UserOrderByWithRelationAndSearchRelevanceInput + author?: UserOrderByWithRelationInput + editor?: UserOrderByWithRelationInput _relevance?: postOrderByRelevanceInput } @@ -12621,7 +12757,7 @@ export namespace Prisma { number?: IntFilter<"Category"> | number } - export type CategoryOrderByWithRelationAndSearchRelevanceInput = { + export type CategoryOrderByWithRelationInput = { name?: SortOrder slug?: SortOrder number?: SortOrder @@ -12667,7 +12803,7 @@ export namespace Prisma { email?: StringFilter<"Patient"> | string } - export type PatientOrderByWithRelationAndSearchRelevanceInput = { + export type PatientOrderByWithRelationInput = { firstName?: SortOrder lastName?: SortOrder email?: SortOrder @@ -12712,11 +12848,11 @@ export namespace Prisma { director?: XOR } - export type MovieOrderByWithRelationAndSearchRelevanceInput = { + export type MovieOrderByWithRelationInput = { directorFirstName?: SortOrder directorLastName?: SortOrder title?: SortOrder - director?: DirectorOrderByWithRelationAndSearchRelevanceInput + director?: DirectorOrderByWithRelationInput _relevance?: MovieOrderByRelevanceInput } @@ -12758,7 +12894,7 @@ export namespace Prisma { movies?: MovieListRelationFilter } - export type DirectorOrderByWithRelationAndSearchRelevanceInput = { + export type DirectorOrderByWithRelationInput = { firstName?: SortOrder lastName?: SortOrder movies?: MovieOrderByRelationAggregateInput @@ -12802,12 +12938,12 @@ export namespace Prisma { creator?: XOR | null } - export type ProblemOrderByWithRelationAndSearchRelevanceInput = { + export type ProblemOrderByWithRelationInput = { id?: SortOrder problemText?: SortOrder creatorId?: SortOrderInput | SortOrder likedBy?: CreatorOrderByRelationAggregateInput - creator?: CreatorOrderByWithRelationAndSearchRelevanceInput + creator?: CreatorOrderByWithRelationInput _relevance?: ProblemOrderByRelevanceInput } @@ -12852,7 +12988,7 @@ export namespace Prisma { problems?: ProblemListRelationFilter } - export type CreatorOrderByWithRelationAndSearchRelevanceInput = { + export type CreatorOrderByWithRelationInput = { id?: SortOrder name?: SortOrder likes?: ProblemOrderByRelationAggregateInput @@ -12898,7 +13034,7 @@ export namespace Prisma { decimal?: DecimalNullableFilter<"NativeTypeModel"> | Decimal | DecimalJsLike | number | string | null } - export type NativeTypeModelOrderByWithRelationAndSearchRelevanceInput = { + export type NativeTypeModelOrderByWithRelationInput = { id?: SortOrder bigInt?: SortOrderInput | SortOrder byteA?: SortOrderInput | SortOrder @@ -12945,7 +13081,7 @@ export namespace Prisma { name?: StringNullableFilter<"Equipment"> | string | null } - export type EquipmentOrderByWithRelationAndSearchRelevanceInput = { + export type EquipmentOrderByWithRelationInput = { id?: SortOrder name?: SortOrderInput | SortOrder _relevance?: EquipmentOrderByRelevanceInput @@ -12983,7 +13119,7 @@ export namespace Prisma { name?: StringNullableFilter<"Hidden"> | string | null } - export type HiddenOrderByWithRelationAndSearchRelevanceInput = { + export type HiddenOrderByWithRelationInput = { id?: SortOrder name?: SortOrderInput | SortOrder _relevance?: HiddenOrderByRelevanceInput diff --git a/experiments/postgres/prisma/generated/client/index.js b/experiments/postgres/prisma/generated/client/index.js index e0e09851e..192545fd3 100644 --- a/experiments/postgres/prisma/generated/client/index.js +++ b/experiments/postgres/prisma/generated/client/index.js @@ -21,7 +21,8 @@ const { warnOnce, defineDmmfProperty, Public, -} = require('./runtime/library') + getRuntime +} = require('./runtime/library.js') const Prisma = {} @@ -30,12 +31,12 @@ exports.Prisma = Prisma exports.$Enums = {} /** - * Prisma Client JS version: 5.4.2 - * Query Engine version: ac9d7041ed77bcc8a8dbd2ab6616b39013829574 + * Prisma Client JS version: 5.18.0 + * Query Engine version: 4c784e32044a8a016d99474bd02a3b6123742169 */ Prisma.prismaVersion = { - client: "5.4.2", - engine: "ac9d7041ed77bcc8a8dbd2ab6616b39013829574" + client: "5.18.0", + engine: "4c784e32044a8a016d99474bd02a3b6123742169" } Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; @@ -291,6 +292,7 @@ const config = { "previewFeatures": [ "fullTextSearch" ], + "sourceFilePath": "/home/majkel/development/typegraphql-prisma/experiments/postgres/prisma/schema.prisma", "isCustomOutput": true }, "relativeEnvPaths": { @@ -298,8 +300,8 @@ const config = { "schemaEnvPath": "../../.env" }, "relativePath": "../..", - "clientVersion": "5.4.2", - "engineVersion": "ac9d7041ed77bcc8a8dbd2ab6616b39013829574", + "clientVersion": "5.18.0", + "engineVersion": "4c784e32044a8a016d99474bd02a3b6123742169", "datasourceNames": [ "postgres" ], @@ -313,9 +315,9 @@ const config = { } } }, - "inlineSchema": "ZGF0YXNvdXJjZSBwb3N0Z3JlcyB7CiAgcHJvdmlkZXIgPSAicG9zdGdyZXNxbCIKICB1cmwgICAgICA9IGVudigiREFUQUJBU0VfVVJMIikKfQoKZ2VuZXJhdG9yIGNsaWVudCB7CiAgcHJvdmlkZXIgICAgICAgID0gInByaXNtYS1jbGllbnQtanMiCiAgLy8gYmluYXJ5VGFyZ2V0cyAgID0gWyJ3aW5kb3dzIiwgImRlYmlhbi1vcGVuc3NsLTEuMS54Il0KICBvdXRwdXQgICAgICAgICAgPSAiLi4vcHJpc21hL2dlbmVyYXRlZC9jbGllbnQiCiAgcHJldmlld0ZlYXR1cmVzID0gWyJmdWxsVGV4dFNlYXJjaCJdCn0KCmdlbmVyYXRvciB0eXBlZ3JhcGhxbCB7CiAgcHJvdmlkZXIgICAgICAgICAgICAgICAgID0gIm5vZGUgLi4vLi4vc3JjL2NsaS9kZXYudHMiCiAgb3V0cHV0ICAgICAgICAgICAgICAgICAgID0gIi4uL3ByaXNtYS9nZW5lcmF0ZWQvdHlwZS1ncmFwaHFsIgogIGVtaXRETU1GICAgICAgICAgICAgICAgICA9IHRydWUKICAvLyBlbWl0VHJhbnNwaWxlZENvZGUgICAgICAgPSB0cnVlCiAgc2ltcGxlUmVzb2x2ZXJzICAgICAgICAgID0gZmFsc2UKICAvLyB1c2VPcmlnaW5hbE1hcHBpbmcgICAgICAgPSB0cnVlCiAgdXNlVW5jaGVja2VkU2NhbGFySW5wdXRzID0gZmFsc2UKICBlbWl0SWRBc0lEVHlwZSAgICAgICAgICAgPSB0cnVlCiAgLy8gZW1pdE9ubHkgICAgICAgICAgICAgICAgID0gWyJlbnVtcyIsICJtb2RlbHMiXQogIGN1c3RvbVByaXNtYUltcG9ydFBhdGggICA9ICIuLi9jbGllbnQiCiAgY29udGV4dFByaXNtYUtleSAgICAgICAgID0gInByaXNtYUNsaWVudCIKICB1c2VTaW1wbGVJbnB1dHMgICAgICAgICAgPSB0cnVlCiAgZW1pdFJlZHVuZGFudFR5cGVzSW5mbyAgID0gdHJ1ZQogIGZvcm1hdEdlbmVyYXRlZENvZGUgICAgICA9ICJ0c2MiCn0KCi8vIFJvbGUgZW51bSBjb21tZW50Ci8vLyBSb2xlIGVudW0gZG9jCmVudW0gUm9sZSB7CiAgVVNFUgogIEFETUlOCn0KCi8vIFVzZXIgbW9kZWwgY29tbWVudAovLy8gVXNlciBtb2RlbCBkb2MKLy8vIEBAVHlwZUdyYXBoUUwudHlwZShuYW1lOiAiTWFpblVzZXIiKQptb2RlbCBVc2VyIHsKICAvLyBVc2VyIG1vZGVsIGZpZWxkIGNvbW1lbnQKICAvLy8gVXNlciBtb2RlbCBmaWVsZCBkb2MKICBpZCAgICAgICAgICBJbnQgICAgICBAaWQgQGRlZmF1bHQoYXV0b2luY3JlbWVudCgpKQogIGVtYWlsICAgICAgIFN0cmluZyAgIEB1bmlxdWUKICAvLy8gcmVuYW1lZCBmaWVsZCBkb2MKICAvLy8gQFR5cGVHcmFwaFFMLmZpZWxkKG5hbWU6ICJmaXJzdE5hbWUiKQogIG5hbWUgICAgICAgIFN0cmluZz8KICBhZ2UgICAgICAgICBJbnQKICAvLy8gQFR5cGVHcmFwaFFMLmZpZWxkKG5hbWU6ICJhY2NvdW50QmFsYW5jZSIpCiAgYmFsYW5jZSAgICAgRmxvYXQKICBhbW91bnQgICAgICBGbG9hdAogIC8vLyBAVHlwZUdyYXBoUUwuZmllbGQobmFtZTogImNsaWVudFBvc3RzIikKICBwb3N0cyAgICAgICBwb3N0W10gICBAcmVsYXRpb24oInBvc3RzIikKICByb2xlICAgICAgICBSb2xlCiAgLy8vIEBUeXBlR3JhcGhRTC5vbWl0KG91dHB1dDogdHJ1ZSkKICBlZGl0b3JQb3N0cyBwb3N0W10gICBAcmVsYXRpb24oImVkaXRvclBvc3RzIikKICBncmFkZXMgICAgICBJbnRbXQogIGFsaWFzZXMgICAgIFN0cmluZ1tdCn0KCmVudW0gUG9zdEtpbmQgewogIEJMT0cKICBBRFZFUlQKfQoKbW9kZWwgcG9zdCB7CiAgLy8vIGZpcnN0IGxpbmUgb2YgY29tbWVudAogIC8vLyBzZWNvbmQgbGluZSBvZiBjb21tZW50CiAgLy8vIHRoaXJkIGxpbmUgb2YgY29tbWVudAogIHV1aWQgICAgICBTdHJpbmcgICAgQGlkIEBkZWZhdWx0KHV1aWQoKSkKICBjcmVhdGVkQXQgRGF0ZVRpbWUgIEBkZWZhdWx0KG5vdygpKQogIC8vLyBAVHlwZUdyYXBoUUwub21pdChpbnB1dDogWyJjcmVhdGUiLCAidXBkYXRlIl0pCiAgdXBkYXRlZEF0IERhdGVUaW1lICBAdXBkYXRlZEF0CiAgLy8vIEBUeXBlR3JhcGhRTC5vbWl0KGlucHV0OiB0cnVlKQogIC8vLyBAVHlwZUdyYXBoUUwuZmllbGQobmFtZTogImlzUHVibGlzaGVkIikKICBwdWJsaXNoZWQgQm9vbGVhbiAgIEBkZWZhdWx0KGZhbHNlKQogIHRpdGxlICAgICBTdHJpbmcKICAvLy8gQFR5cGVHcmFwaFFMLm9taXQob3V0cHV0OiB0cnVlKQogIHN1YnRpdGxlICBTdHJpbmcKICBjb250ZW50ICAgU3RyaW5nPwogIGF1dGhvciAgICBVc2VyICAgICAgQHJlbGF0aW9uKGZpZWxkczogW2F1dGhvcklkXSwgcmVmZXJlbmNlczogW2lkXSwgbmFtZTogInBvc3RzIiwgb25EZWxldGU6IENhc2NhZGUpCiAgYXV0aG9ySWQgIEludAogIC8vLyBAVHlwZUdyYXBoUUwub21pdChvdXRwdXQ6IHRydWUpCiAgZWRpdG9yICAgIFVzZXI/ICAgICBAcmVsYXRpb24oZmllbGRzOiBbZWRpdG9ySWRdLCByZWZlcmVuY2VzOiBbaWRdLCBuYW1lOiAiZWRpdG9yUG9zdHMiLCBvbkRlbGV0ZTogQ2FzY2FkZSkKICAvLy8gQFR5cGVHcmFwaFFMLm9taXQob3V0cHV0OiB0cnVlKQogIGVkaXRvcklkICBJbnQ/CiAga2luZCAgICAgIFBvc3RLaW5kPwogIG1ldGFkYXRhICBKc29uCn0KCm1vZGVsIENhdGVnb3J5IHsKICBuYW1lICAgU3RyaW5nCiAgc2x1ZyAgIFN0cmluZwogIG51bWJlciBJbnQKCiAgQEB1bmlxdWUoW3NsdWcsIG51bWJlcl0sIG5hbWU6ICJjYXRlZ29yeUNvbXBvdW5kVW5pcXVlIikKfQoKbW9kZWwgUGF0aWVudCB7CiAgZmlyc3ROYW1lIFN0cmluZwogIGxhc3ROYW1lICBTdHJpbmcKICBlbWFpbCAgICAgU3RyaW5nCgogIEBAaWQoW2ZpcnN0TmFtZSwgbGFzdE5hbWVdKQp9Cgptb2RlbCBNb3ZpZSB7CiAgZGlyZWN0b3JGaXJzdE5hbWUgU3RyaW5nCiAgZGlyZWN0b3JMYXN0TmFtZSAgU3RyaW5nCiAgZGlyZWN0b3IgICAgICAgICAgRGlyZWN0b3IgQHJlbGF0aW9uKGZpZWxkczogW2RpcmVjdG9yRmlyc3ROYW1lLCBkaXJlY3Rvckxhc3ROYW1lXSwgcmVmZXJlbmNlczogW2ZpcnN0TmFtZSwgbGFzdE5hbWVdLCBvbkRlbGV0ZTogQ2FzY2FkZSkKICB0aXRsZSAgICAgICAgICAgICBTdHJpbmcKCiAgQEBpZChbZGlyZWN0b3JGaXJzdE5hbWUsIGRpcmVjdG9yTGFzdE5hbWUsIHRpdGxlXSwgbmFtZTogIm1vdmllQ29tcG91bmRJZCIpCn0KCm1vZGVsIERpcmVjdG9yIHsKICBmaXJzdE5hbWUgU3RyaW5nCiAgbGFzdE5hbWUgIFN0cmluZwogIG1vdmllcyAgICBNb3ZpZVtdCgogIEBAaWQoW2ZpcnN0TmFtZSwgbGFzdE5hbWVdKQp9Cgptb2RlbCBQcm9ibGVtIHsKICBpZCAgICAgICAgICBJbnQgICAgICAgQGlkIEBkZWZhdWx0KGF1dG9pbmNyZW1lbnQoKSkKICBwcm9ibGVtVGV4dCBTdHJpbmcKICBsaWtlZEJ5ICAgICBDcmVhdG9yW10KICBjcmVhdG9yICAgICBDcmVhdG9yPyAgQHJlbGF0aW9uKG5hbWU6ICJjcmVhdG9yIiwgZmllbGRzOiBbY3JlYXRvcklkXSwgcmVmZXJlbmNlczogW2lkXSwgb25EZWxldGU6IENhc2NhZGUpCiAgY3JlYXRvcklkICAgSW50Pwp9Cgptb2RlbCBDcmVhdG9yIHsKICBpZCAgICAgICBJbnQgICAgICAgQGlkIEBkZWZhdWx0KGF1dG9pbmNyZW1lbnQoKSkKICBuYW1lICAgICBTdHJpbmcKICBsaWtlcyAgICBQcm9ibGVtW10KICBwcm9ibGVtcyBQcm9ibGVtW10gQHJlbGF0aW9uKCJjcmVhdG9yIikKfQoKbW9kZWwgTmF0aXZlVHlwZU1vZGVsIHsKICBpZCAgICAgIEludCAgICAgIEBpZCBAZGVmYXVsdChhdXRvaW5jcmVtZW50KCkpIEBwb3N0Z3Jlcy5JbnRlZ2VyCiAgYmlnSW50ICBCaWdJbnQ/ICBAcG9zdGdyZXMuQmlnSW50CiAgYnl0ZUEgICBCeXRlcz8gICBAcG9zdGdyZXMuQnl0ZUEKICBkZWNpbWFsIERlY2ltYWw/IEBwb3N0Z3Jlcy5EZWNpbWFsCn0KCi8vLyBAQFR5cGVHcmFwaFFMLnR5cGUocGx1cmFsOiAiZXF1aXBtZW50cyIpCm1vZGVsIEVxdWlwbWVudCB7CiAgaWQgICBTdHJpbmcgIEBpZCBAZGVmYXVsdChjdWlkKCkpCiAgbmFtZSBTdHJpbmc/Cn0KCi8vLyBAQFR5cGVHcmFwaFFMLm9taXQob3V0cHV0OiB0cnVlKQptb2RlbCBIaWRkZW4gewogIGlkICAgU3RyaW5nICBAaWQgQGRlZmF1bHQoY3VpZCgpKQogIG5hbWUgU3RyaW5nPwp9Cg==", + "inlineSchema": "datasource postgres {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\ngenerator client {\n provider = \"prisma-client-js\"\n // binaryTargets = [\"windows\", \"debian-openssl-1.1.x\"]\n output = \"../prisma/generated/client\"\n previewFeatures = [\"fullTextSearch\"]\n}\n\ngenerator typegraphql {\n provider = \"node ../../src/cli/dev.ts\"\n output = \"../prisma/generated/type-graphql\"\n emitDMMF = true\n // emitTranspiledCode = true\n simpleResolvers = false\n // useOriginalMapping = true\n useUncheckedScalarInputs = false\n emitIdAsIDType = true\n // emitOnly = [\"enums\", \"models\"]\n customPrismaImportPath = \"../client\"\n contextPrismaKey = \"prismaClient\"\n useSimpleInputs = true\n emitRedundantTypesInfo = true\n formatGeneratedCode = \"tsc\"\n}\n\n// Role enum comment\n/// Role enum doc\nenum Role {\n USER\n ADMIN\n}\n\n// User model comment\n/// User model doc\n/// @@TypeGraphQL.type(name: \"MainUser\")\nmodel User {\n // User model field comment\n /// User model field doc\n id Int @id @default(autoincrement())\n email String @unique\n /// renamed field doc\n /// @TypeGraphQL.field(name: \"firstName\")\n name String?\n age Int\n /// @TypeGraphQL.field(name: \"accountBalance\")\n balance Float\n amount Float\n /// @TypeGraphQL.field(name: \"clientPosts\")\n posts post[] @relation(\"posts\")\n role Role\n /// @TypeGraphQL.omit(output: true)\n editorPosts post[] @relation(\"editorPosts\")\n grades Int[]\n aliases String[]\n}\n\nenum PostKind {\n BLOG\n ADVERT\n}\n\nmodel post {\n /// first line of comment\n /// second line of comment\n /// third line of comment\n uuid String @id @default(uuid())\n createdAt DateTime @default(now())\n /// @TypeGraphQL.omit(input: [\"create\", \"update\"])\n updatedAt DateTime @updatedAt\n /// @TypeGraphQL.omit(input: true)\n /// @TypeGraphQL.field(name: \"isPublished\")\n published Boolean @default(false)\n title String\n /// @TypeGraphQL.omit(output: true)\n subtitle String\n content String?\n author User @relation(fields: [authorId], references: [id], name: \"posts\", onDelete: Cascade)\n authorId Int\n /// @TypeGraphQL.omit(output: true)\n editor User? @relation(fields: [editorId], references: [id], name: \"editorPosts\", onDelete: Cascade)\n /// @TypeGraphQL.omit(output: true)\n editorId Int?\n kind PostKind?\n metadata Json\n}\n\nmodel Category {\n name String\n slug String\n number Int\n\n @@unique([slug, number], name: \"categoryCompoundUnique\")\n}\n\nmodel Patient {\n firstName String\n lastName String\n email String\n\n @@id([firstName, lastName])\n}\n\nmodel Movie {\n directorFirstName String\n directorLastName String\n director Director @relation(fields: [directorFirstName, directorLastName], references: [firstName, lastName], onDelete: Cascade)\n title String\n\n @@id([directorFirstName, directorLastName, title], name: \"movieCompoundId\")\n}\n\nmodel Director {\n firstName String\n lastName String\n movies Movie[]\n\n @@id([firstName, lastName])\n}\n\nmodel Problem {\n id Int @id @default(autoincrement())\n problemText String\n likedBy Creator[]\n creator Creator? @relation(name: \"creator\", fields: [creatorId], references: [id], onDelete: Cascade)\n creatorId Int?\n}\n\nmodel Creator {\n id Int @id @default(autoincrement())\n name String\n likes Problem[]\n problems Problem[] @relation(\"creator\")\n}\n\nmodel NativeTypeModel {\n id Int @id @default(autoincrement()) @postgres.Integer\n bigInt BigInt? @postgres.BigInt\n byteA Bytes? @postgres.ByteA\n decimal Decimal? @postgres.Decimal\n}\n\n/// @@TypeGraphQL.type(plural: \"equipments\")\nmodel Equipment {\n id String @id @default(cuid())\n name String?\n}\n\n/// @@TypeGraphQL.omit(output: true)\nmodel Hidden {\n id String @id @default(cuid())\n name String?\n}\n", "inlineSchemaHash": "4a58739cfc99389b8e007daef18ab6b9cbb45f71a3644eba235943a45bde9d1a", - "noEngine": false + "copyEngine": true } const fs = require('fs') @@ -335,12 +337,12 @@ if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { config.isBundled = true } -config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"User model field doc\"},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"renamed field doc\\\\n@TypeGraphQL.field(name: \\\"firstName\\\")\"},{\"name\":\"age\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"balance\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.field(name: \\\"accountBalance\\\")\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"posts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"post\",\"relationName\":\"posts\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.field(name: \\\"clientPosts\\\")\"},{\"name\":\"role\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Role\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"editorPosts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"post\",\"relationName\":\"editorPosts\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(output: true)\"},{\"name\":\"grades\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aliases\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"User model doc\\\\n@@TypeGraphQL.type(name: \\\"MainUser\\\")\"},\"post\":{\"dbName\":null,\"fields\":[{\"name\":\"uuid\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"first line of comment\\\\nsecond line of comment\\\\nthird line of comment\"},{\"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,\"documentation\":\"@TypeGraphQL.omit(input: [\\\"create\\\", \\\"update\\\"])\"},{\"name\":\"published\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(input: true)\\\\n@TypeGraphQL.field(name: \\\"isPublished\\\")\"},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subtitle\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(output: true)\"},{\"name\":\"content\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"author\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"posts\",\"relationFromFields\":[\"authorId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"authorId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"editor\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"editorPosts\",\"relationFromFields\":[\"editorId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(output: true)\"},{\"name\":\"editorId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(output: true)\"},{\"name\":\"kind\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PostKind\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"metadata\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Category\":{\"dbName\":null,\"fields\":[{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"slug\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"number\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"slug\",\"number\"]],\"uniqueIndexes\":[{\"name\":\"categoryCompoundUnique\",\"fields\":[\"slug\",\"number\"]}],\"isGenerated\":false},\"Patient\":{\"dbName\":null,\"fields\":[{\"name\":\"firstName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"firstName\",\"lastName\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Movie\":{\"dbName\":null,\"fields\":[{\"name\":\"directorFirstName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"directorLastName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"director\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Director\",\"relationName\":\"DirectorToMovie\",\"relationFromFields\":[\"directorFirstName\",\"directorLastName\"],\"relationToFields\":[\"firstName\",\"lastName\"],\"relationOnDelete\":\"Cascade\",\"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}],\"primaryKey\":{\"name\":\"movieCompoundId\",\"fields\":[\"directorFirstName\",\"directorLastName\",\"title\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Director\":{\"dbName\":null,\"fields\":[{\"name\":\"firstName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"movies\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Movie\",\"relationName\":\"DirectorToMovie\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"firstName\",\"lastName\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Problem\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"problemText\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"likedBy\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Creator\",\"relationName\":\"CreatorToProblem\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"creator\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Creator\",\"relationName\":\"creator\",\"relationFromFields\":[\"creatorId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"creatorId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Creator\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"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\":\"likes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Problem\",\"relationName\":\"CreatorToProblem\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"problems\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Problem\",\"relationName\":\"creator\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"NativeTypeModel\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bigInt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"byteA\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Bytes\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"decimal\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Equipment\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"@@TypeGraphQL.type(plural: \\\"equipments\\\")\"},\"Hidden\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"@@TypeGraphQL.omit(output: true)\"}},\"enums\":{\"Role\":{\"values\":[{\"name\":\"USER\",\"dbName\":null},{\"name\":\"ADMIN\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Role enum doc\"},\"PostKind\":{\"values\":[{\"name\":\"BLOG\",\"dbName\":null},{\"name\":\"ADVERT\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"User model field doc\"},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"renamed field doc\\\\n@TypeGraphQL.field(name: \\\"firstName\\\")\"},{\"name\":\"age\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"balance\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.field(name: \\\"accountBalance\\\")\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"posts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"post\",\"relationName\":\"posts\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.field(name: \\\"clientPosts\\\")\"},{\"name\":\"role\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Role\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"editorPosts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"post\",\"relationName\":\"editorPosts\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(output: true)\"},{\"name\":\"grades\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aliases\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"User model doc\\\\n@@TypeGraphQL.type(name: \\\"MainUser\\\")\"},\"post\":{\"dbName\":null,\"fields\":[{\"name\":\"uuid\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"first line of comment\\\\nsecond line of comment\\\\nthird line of comment\"},{\"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,\"documentation\":\"@TypeGraphQL.omit(input: [\\\"create\\\", \\\"update\\\"])\"},{\"name\":\"published\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(input: true)\\\\n@TypeGraphQL.field(name: \\\"isPublished\\\")\"},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subtitle\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(output: true)\"},{\"name\":\"content\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"author\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"posts\",\"relationFromFields\":[\"authorId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"authorId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"editor\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"editorPosts\",\"relationFromFields\":[\"editorId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(output: true)\"},{\"name\":\"editorId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"@TypeGraphQL.omit(output: true)\"},{\"name\":\"kind\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PostKind\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"metadata\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Category\":{\"dbName\":null,\"fields\":[{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"slug\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"number\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"slug\",\"number\"]],\"uniqueIndexes\":[{\"name\":\"categoryCompoundUnique\",\"fields\":[\"slug\",\"number\"]}],\"isGenerated\":false},\"Patient\":{\"dbName\":null,\"fields\":[{\"name\":\"firstName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"firstName\",\"lastName\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Movie\":{\"dbName\":null,\"fields\":[{\"name\":\"directorFirstName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"directorLastName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"director\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Director\",\"relationName\":\"DirectorToMovie\",\"relationFromFields\":[\"directorFirstName\",\"directorLastName\"],\"relationToFields\":[\"firstName\",\"lastName\"],\"relationOnDelete\":\"Cascade\",\"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}],\"primaryKey\":{\"name\":\"movieCompoundId\",\"fields\":[\"directorFirstName\",\"directorLastName\",\"title\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Director\":{\"dbName\":null,\"fields\":[{\"name\":\"firstName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"movies\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Movie\",\"relationName\":\"DirectorToMovie\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"firstName\",\"lastName\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Problem\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"problemText\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"likedBy\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Creator\",\"relationName\":\"CreatorToProblem\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"creator\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Creator\",\"relationName\":\"creator\",\"relationFromFields\":[\"creatorId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"creatorId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Creator\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"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\":\"likes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Problem\",\"relationName\":\"CreatorToProblem\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"problems\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Problem\",\"relationName\":\"creator\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"NativeTypeModel\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bigInt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"byteA\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Bytes\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"decimal\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Equipment\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"@@TypeGraphQL.type(plural: \\\"equipments\\\")\"},\"Hidden\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"@@TypeGraphQL.omit(output: true)\"}},\"enums\":{\"Role\":{\"values\":[{\"name\":\"USER\",\"dbName\":null},{\"name\":\"ADMIN\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Role enum doc\"},\"PostKind\":{\"values\":[{\"name\":\"BLOG\",\"dbName\":null},{\"name\":\"ADVERT\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") defineDmmfProperty(exports.Prisma, config.runtimeDataModel) +config.engineWasm = undefined - -const { warnEnvConflicts } = require('./runtime/library') +const { warnEnvConflicts } = require('./runtime/library.js') warnEnvConflicts({ rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.rootEnvPath), diff --git a/experiments/postgres/prisma/generated/client/package.json b/experiments/postgres/prisma/generated/client/package.json index da6bb21c0..75a819235 100644 --- a/experiments/postgres/prisma/generated/client/package.json +++ b/experiments/postgres/prisma/generated/client/package.json @@ -1,7 +1,84 @@ { - "name": ".prisma/client", + "name": "prisma-client-482200bf5ce8cd03dd222b8d244c25cdac0d18a06df2c363fc98058005e12dc5", "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" + }, + "./*": "./*" + }, + "version": "5.18.0", "sideEffects": false } \ No newline at end of file diff --git a/experiments/postgres/prisma/generated/client/runtime/edge-esm.js b/experiments/postgres/prisma/generated/client/runtime/edge-esm.js index c71aead5e..f13526bd0 100644 --- a/experiments/postgres/prisma/generated/client/runtime/edge-esm.js +++ b/experiments/postgres/prisma/generated/client/runtime/edge-esm.js @@ -1,43 +1,31 @@ -var Xu=Object.create;var _r=Object.defineProperty;var el=Object.getOwnPropertyDescriptor;var tl=Object.getOwnPropertyNames;var rl=Object.getPrototypeOf,nl=Object.prototype.hasOwnProperty;var ol=(e,t,r)=>t in e?_r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Qn=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Nr=(e,t)=>()=>(e&&(t=e(e=0)),t);var Z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Lr=(e,t)=>{for(var r in t)_r(e,r,{get:t[r],enumerable:!0})},il=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of tl(t))!nl.call(e,o)&&o!==r&&_r(e,o,{get:()=>t[o],enumerable:!(n=el(t,o))||n.enumerable});return e};var Pe=(e,t,r)=>(r=e!=null?Xu(rl(e)):{},il(t||!e||!e.__esModule?_r(r,"default",{value:e,enumerable:!0}):r,e));var hi=(e,t,r)=>(ol(e,typeof t!="symbol"?t+"":t,r),r);function B(e){return()=>e}function Ie(){return y}var y,p=Nr(()=>{"use strict";y={abort:B(void 0),addListener:B(Ie()),allowedNodeEnvironmentFlags:new Set,arch:"x64",argv:["/bin/node"],argv0:"node",chdir:B(void 0),config:{target_defaults:{cflags:[],default_configuration:"",defines:[],include_dirs:[],libraries:[]},variables:{clang:0,host_arch:"x64",node_install_npm:!1,node_install_waf:!1,node_prefix:"",node_shared_openssl:!1,node_shared_v8:!1,node_shared_zlib:!1,node_use_dtrace:!1,node_use_etw:!1,node_use_openssl:!1,target_arch:"x64",v8_no_strict_aliasing:0,v8_use_snapshot:!1,visibility:""}},connected:!1,cpuUsage:()=>({user:0,system:0}),cwd:()=>"/",debugPort:0,disconnect:B(void 0),constrainedMemory:()=>{},emit:B(Ie()),emitWarning:B(void 0),env:{},eventNames:()=>[],execArgv:[],execPath:"/",exit:B(void 0),features:{inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1},getMaxListeners:B(0),getegid:B(0),geteuid:B(0),getgid:B(0),getgroups:B([]),getuid:B(0),hasUncaughtExceptionCaptureCallback:B(!1),hrtime:B([0,0]),platform:"linux",kill:B(!0),listenerCount:B(0),listeners:B([]),memoryUsage:B({arrayBuffers:0,external:0,heapTotal:0,heapUsed:0,rss:0}),nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},off:B(Ie()),on:B(Ie()),once:B(Ie()),openStdin:B({}),pid:0,ppid:0,prependListener:B(Ie()),prependOnceListener:B(Ie()),rawListeners:B([]),release:{name:"node"},removeAllListeners:B(Ie()),removeListener:B(Ie()),resourceUsage:B({fsRead:0,fsWrite:0,involuntaryContextSwitches:0,ipcReceived:0,ipcSent:0,majorPageFault:0,maxRSS:0,minorPageFault:0,sharedMemorySize:0,signalsCount:0,swappedOut:0,systemCPUTime:0,unsharedDataSize:0,unsharedStackSize:0,userCPUTime:0,voluntaryContextSwitches:0}),setMaxListeners:B(Ie()),setUncaughtExceptionCaptureCallback:B(void 0),setegid:B(void 0),seteuid:B(void 0),setgid:B(void 0),setgroups:B(void 0),setuid:B(void 0),stderr:{fd:2},stdin:{fd:0},stdout:{fd:1},title:"node",traceDeprecation:!1,umask:B(0),uptime:B(0),version:"",versions:{http_parser:"",node:"",v8:"",ares:"",uv:"",zlib:"",modules:"",openssl:""}}});var h,f=Nr(()=>{"use strict";h=()=>{};h.prototype=h});var Ni=Z(Ot=>{"use strict";d();p();f();var Pi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),sl=Pi(e=>{"use strict";e.byteLength=u,e.toByteArray=c,e.fromByteArray=w;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(i=0,s=o.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var T=E.indexOf("=");T===-1&&(T=b);var S=T===b?0:4-T%4;return[T,S]}function u(E){var b=a(E),T=b[0],S=b[1];return(T+S)*3/4-S}function l(E,b,T){return(b+T)*3/4-T}function c(E){var b,T=a(E),S=T[0],R=T[1],C=new n(l(E,S,R)),M=0,N=R>0?S-4:S,L;for(L=0;L>16&255,C[M++]=b>>8&255,C[M++]=b&255;return R===2&&(b=r[E.charCodeAt(L)]<<2|r[E.charCodeAt(L+1)]>>4,C[M++]=b&255),R===1&&(b=r[E.charCodeAt(L)]<<10|r[E.charCodeAt(L+1)]<<4|r[E.charCodeAt(L+2)]>>2,C[M++]=b>>8&255,C[M++]=b&255),C}function m(E){return t[E>>18&63]+t[E>>12&63]+t[E>>6&63]+t[E&63]}function g(E,b,T){for(var S,R=[],C=b;CN?N:M+C));return S===1?(b=E[T-1],R.push(t[b>>2]+t[b<<4&63]+"==")):S===2&&(b=(E[T-2]<<8)+E[T-1],R.push(t[b>>10]+t[b>>4&63]+t[b<<2&63]+"=")),R.join("")}}),al=Pi(e=>{e.read=function(t,r,n,o,i){var s,a,u=i*8-o-1,l=(1<>1,m=-7,g=n?i-1:0,w=n?-1:1,E=t[r+g];for(g+=w,s=E&(1<<-m)-1,E>>=-m,m+=u;m>0;s=s*256+t[r+g],g+=w,m-=8);for(a=s&(1<<-m)-1,s>>=-m,m+=o;m>0;a=a*256+t[r+g],g+=w,m-=8);if(s===0)s=1-c;else{if(s===l)return a?NaN:(E?-1:1)*(1/0);a=a+Math.pow(2,o),s=s-c}return(E?-1:1)*a*Math.pow(2,s-o)},e.write=function(t,r,n,o,i,s){var a,u,l,c=s*8-i-1,m=(1<>1,w=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=o?0:s-1,b=o?1:-1,T=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,a=m):(a=Math.floor(Math.log(r)/Math.LN2),r*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+g>=1?r+=w/l:r+=w*Math.pow(2,1-g),r*l>=2&&(a++,l/=2),a+g>=m?(u=0,a=m):a+g>=1?(u=(r*l-1)*Math.pow(2,i),a=a+g):(u=r*Math.pow(2,g-1)*Math.pow(2,i),a=0));i>=8;t[n+E]=u&255,E+=b,u/=256,i-=8);for(a=a<0;t[n+E]=a&255,E+=b,a/=256,c-=8);t[n+E-b]|=T*128}}),Wn=sl(),St=al(),xi=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ot.Buffer=P;Ot.SlowBuffer=dl;Ot.INSPECT_MAX_BYTES=50;var Br=2147483647;Ot.kMaxLength=Br;P.TYPED_ARRAY_SUPPORT=ul();!P.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 ul(){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(e){return!1}}Object.defineProperty(P.prototype,"parent",{enumerable:!0,get:function(){if(P.isBuffer(this))return this.buffer}});Object.defineProperty(P.prototype,"offset",{enumerable:!0,get:function(){if(P.isBuffer(this))return this.byteOffset}});function $e(e){if(e>Br)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,P.prototype),t}function P(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 Zn(e)}return vi(e,t,r)}P.poolSize=8192;function vi(e,t,r){if(typeof e=="string")return cl(e,t);if(ArrayBuffer.isView(e))return pl(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(ke(e,ArrayBuffer)||e&&ke(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ke(e,SharedArrayBuffer)||e&&ke(e.buffer,SharedArrayBuffer)))return Ti(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 P.from(n,t,r);let o=fl(e);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return P.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)}P.from=function(e,t,r){return vi(e,t,r)};Object.setPrototypeOf(P.prototype,Uint8Array.prototype);Object.setPrototypeOf(P,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 ll(e,t,r){return Ai(e),e<=0?$e(e):t!==void 0?typeof r=="string"?$e(e).fill(t,r):$e(e).fill(t):$e(e)}P.alloc=function(e,t,r){return ll(e,t,r)};function Zn(e){return Ai(e),$e(e<0?0:Yn(e)|0)}P.allocUnsafe=function(e){return Zn(e)};P.allocUnsafeSlow=function(e){return Zn(e)};function cl(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!P.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=Ci(e,t)|0,n=$e(r),o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}function Hn(e){let t=e.length<0?0:Yn(e.length)|0,r=$e(t);for(let n=0;n=Br)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Br.toString(16)+" bytes");return e|0}function dl(e){return+e!=e&&(e=0),P.alloc(+e)}P.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==P.prototype};P.compare=function(e,t){if(ke(e,Uint8Array)&&(e=P.from(e,e.offset,e.byteLength)),ke(t,Uint8Array)&&(t=P.from(t,t.offset,t.byteLength)),!P.isBuffer(e)||!P.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 o=0,i=Math.min(r,n);on.length?(P.isBuffer(i)||(i=P.from(i)),i.copy(n,o)):Uint8Array.prototype.set.call(n,i,o);else if(P.isBuffer(i))i.copy(n,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=i.length}return n};function Ci(e,t){if(P.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ke(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 o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return zn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return _i(e).length;default:if(o)return n?-1:zn(e).length;t=(""+t).toLowerCase(),o=!0}}P.byteLength=Ci;function ml(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 Al(this,t,r);case"utf8":case"utf-8":return Si(this,t,r);case"ascii":return Pl(this,t,r);case"latin1":case"binary":return vl(this,t,r);case"base64":return wl(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Tl(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}P.prototype._isBuffer=!0;function mt(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}P.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+=" ... "),""};xi&&(P.prototype[xi]=P.prototype.inspect);P.prototype.compare=function(e,t,r,n,o){if(ke(e,Uint8Array)&&(e=P.from(e,e.offset,e.byteLength)),!P.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),o===void 0&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;let i=o-n,s=r-t,a=Math.min(i,s),u=this.slice(n,o),l=e.slice(t,r);for(let c=0;c2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,eo(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0)if(o)r=0;else return-1;if(typeof t=="string"&&(t=P.from(t,n)),P.isBuffer(t))return t.length===0?-1:bi(e,t,r,n,o);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):bi(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function bi(e,t,r,n,o){let i=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;i=2,s/=2,a/=2,r/=2}function u(c,m){return i===1?c[m]:c.readUInt16BE(m*i)}let l;if(o){let c=-1;for(l=r;ls&&(r=s-a),l=r;l>=0;l--){let c=!0;for(let m=0;mo&&(n=o)):n=o;let i=t.length;n>i/2&&(n=i/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 o=this.length-t;if((r===void 0||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return gl(this,e,t,r);case"utf8":case"utf-8":return yl(this,e,t,r);case"ascii":case"latin1":case"binary":return hl(this,e,t,r);case"base64":return xl(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return bl(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}};P.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function wl(e,t,r){return t===0&&r===e.length?Wn.fromByteArray(e):Wn.fromByteArray(e.slice(t,r))}function Si(e,t,r){r=Math.min(e.length,r);let n=[],o=t;for(;o239?4:i>223?3:i>191?2:1;if(o+a<=r){let u,l,c,m;switch(a){case 1:i<128&&(s=i);break;case 2:u=e[o+1],(u&192)===128&&(m=(i&31)<<6|u&63,m>127&&(s=m));break;case 3:u=e[o+1],l=e[o+2],(u&192)===128&&(l&192)===128&&(m=(i&15)<<12|(u&63)<<6|l&63,m>2047&&(m<55296||m>57343)&&(s=m));break;case 4:u=e[o+1],l=e[o+2],c=e[o+3],(u&192)===128&&(l&192)===128&&(c&192)===128&&(m=(i&15)<<18|(u&63)<<12|(l&63)<<6|c&63,m>65535&&m<1114112&&(s=m))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),o+=a}return El(n)}var wi=4096;function El(e){let t=e.length;if(t<=wi)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let o="";for(let i=t;ir&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}P.prototype.readUintLE=P.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||ee(e,t,this.length);let n=this[e],o=1,i=0;for(;++i>>0,t=t>>>0,r||ee(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n};P.prototype.readUint8=P.prototype.readUInt8=function(e,t){return e=e>>>0,t||ee(e,1,this.length),this[e]};P.prototype.readUint16LE=P.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||ee(e,2,this.length),this[e]|this[e+1]<<8};P.prototype.readUint16BE=P.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||ee(e,2,this.length),this[e]<<8|this[e+1]};P.prototype.readUint32LE=P.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};P.prototype.readUint32BE=P.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};P.prototype.readBigUInt64LE=He(function(e){e=e>>>0,Rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&er(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,o=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(o)<>>0,Rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&er(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],o=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||ee(e,t,this.length);let n=this[e],o=1,i=0;for(;++i=o&&(n-=Math.pow(2,8*t)),n};P.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||ee(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i};P.prototype.readInt8=function(e,t){return e=e>>>0,t||ee(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};P.prototype.readInt16LE=function(e,t){e=e>>>0,t||ee(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};P.prototype.readInt16BE=function(e,t){e=e>>>0,t||ee(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};P.prototype.readInt32LE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};P.prototype.readInt32BE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};P.prototype.readBigInt64LE=He(function(e){e=e>>>0,Rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&er(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,Rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&er(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||ee(e,4,this.length),St.read(this,e,!0,23,4)};P.prototype.readFloatBE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),St.read(this,e,!1,23,4)};P.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||ee(e,8,this.length),St.read(this,e,!0,52,8)};P.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||ee(e,8,this.length),St.read(this,e,!1,52,8)};function ye(e,t,r,n,o,i){if(!P.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}P.prototype.writeUintLE=P.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;ye(this,e,t,r,s,0)}let o=1,i=0;for(this[t]=e&255;++i>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;ye(this,e,t,r,s,0)}let o=r-1,i=1;for(this[t+o]=e&255;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r};P.prototype.writeUint8=P.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,1,255,0),this[t]=e&255,t+1};P.prototype.writeUint16LE=P.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};P.prototype.writeUint16BE=P.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};P.prototype.writeUint32LE=P.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ye(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};P.prototype.writeUint32BE=P.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ye(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 Ri(e,t,r,n,o){Di(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i;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 Oi(e,t,r,n,o){Di(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i=i>>8,e[r+6]=i,i=i>>8,e[r+5]=i,i=i>>8,e[r+4]=i;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}P.prototype.writeBigUInt64LE=He(function(e,t=0){return Ri(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});P.prototype.writeBigUInt64BE=He(function(e,t=0){return Oi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});P.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ye(this,e,t,r,a-1,-a)}let o=0,i=1,s=0;for(this[t]=e&255;++o>0)-s&255;return t+r};P.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ye(this,e,t,r,a-1,-a)}let o=r-1,i=1,s=0;for(this[t+o]=e&255;--o>=0&&(i*=256);)e<0&&s===0&&this[t+o+1]!==0&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+r};P.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};P.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};P.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};P.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ye(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};P.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ye(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};P.prototype.writeBigInt64LE=He(function(e,t=0){return Ri(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});P.prototype.writeBigInt64BE=He(function(e,t=0){return Oi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Fi(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Ii(e,t,r,n,o){return t=+t,r=r>>>0,o||Fi(e,t,r,4,34028234663852886e22,-34028234663852886e22),St.write(e,t,r,n,23,4),r+4}P.prototype.writeFloatLE=function(e,t,r){return Ii(this,e,t,!0,r)};P.prototype.writeFloatBE=function(e,t,r){return Ii(this,e,t,!1,r)};function ki(e,t,r,n,o){return t=+t,r=r>>>0,o||Fi(e,t,r,8,17976931348623157e292,-17976931348623157e292),St.write(e,t,r,n,52,8),r+8}P.prototype.writeDoubleLE=function(e,t,r){return ki(this,e,t,!0,r)};P.prototype.writeDoubleBE=function(e,t,r){return ki(this,e,t,!1,r)};P.prototype.copy=function(e,t,r,n){if(!P.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 o;if(typeof e=="number")for(o=t;o2**32?o=Ei(String(r)):typeof r=="bigint"&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=Ei(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n},RangeError);function Ei(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 Cl(e,t,r){Rt(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&er(t,e.length-(r+1))}function Di(e,t,r,n,o,i){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(i+1)*8}${s}`:a=`>= -(2${s} ** ${(i+1)*8-1}${s}) and < 2 ** ${(i+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Mt.ERR_OUT_OF_RANGE("value",a,e)}Cl(n,o,i)}function Rt(e,t){if(typeof e!="number")throw new Mt.ERR_INVALID_ARG_TYPE(t,"number",e)}function er(e,t,r){throw Math.floor(e)!==e?(Rt(e,r),new Mt.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Mt.ERR_BUFFER_OUT_OF_BOUNDS:new Mt.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Ml=/[^+/0-9A-Za-z-_]/g;function Sl(e){if(e=e.split("=")[0],e=e.trim().replace(Ml,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function zn(e,t){t=t||1/0;let r,n=e.length,o=null,i=[];for(let s=0;s55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function Rl(e){let t=[];for(let r=0;r>8,o=r%256,i.push(o),i.push(n);return i}function _i(e){return Wn.toByteArray(Sl(e))}function jr(e,t,r,n){let o;for(o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function ke(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function eo(e){return e!==e}var Fl=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function He(e){return typeof BigInt>"u"?Il:e}function Il(){throw new Error("BigInt not supported")}});var x,d=Nr(()=>{"use strict";x=Pe(Ni())});var po=Z(j=>{"use strict";d();p();f();var W=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wi=W((e,t)=>{"use strict";t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var i=42;r[n]=i;for(n in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var s=Object.getOwnPropertySymbols(r);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(r,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(r,n);if(a.value!==i||a.enumerable!==!0)return!1}return!0}}),Gr=W((e,t)=>{"use strict";var r=Wi();t.exports=function(){return r()&&!!Symbol.toStringTag}}),kl=W((e,t)=>{"use strict";var r=typeof Symbol<"u"&&Symbol,n=Wi();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}),Dl=W((e,t)=>{"use strict";var r={foo:{}},n=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof n)}}),_l=W((e,t)=>{"use strict";var r="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,o=Object.prototype.toString,i="[object Function]";t.exports=function(s){var a=this;if(typeof a!="function"||o.call(a)!==i)throw new TypeError(r+a);for(var u=n.call(arguments,1),l,c=function(){if(this instanceof l){var b=a.apply(this,u.concat(n.call(arguments)));return Object(b)===b?b:this}else return a.apply(s,u.concat(n.call(arguments)))},m=Math.max(0,a.length-u.length),g=[],w=0;w{"use strict";var r=_l();t.exports=h.prototype.bind||r}),Nl=W((e,t)=>{"use strict";var r=so();t.exports=r.call(h.call,Object.prototype.hasOwnProperty)}),ao=W((e,t)=>{"use strict";var r,n=SyntaxError,o=h,i=TypeError,s=function($){try{return o('"use strict"; return ('+$+").constructor;")()}catch(U){}},a=Object.getOwnPropertyDescriptor;if(a)try{a({},"")}catch($){a=null}var u=function(){throw new i},l=a?function(){try{return arguments.callee,u}catch($){try{return a(arguments,"callee").get}catch(U){return u}}}():u,c=kl()(),m=Dl()(),g=Object.getPrototypeOf||(m?function($){return $.__proto__}:null),w={},E=typeof Uint8Array>"u"||!g?r:g(Uint8Array),b={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":c&&g?g([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":w,"%AsyncGenerator%":w,"%AsyncGeneratorFunction%":w,"%AsyncIteratorPrototype%":w,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":void 0,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":w,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c&&g?g(g([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!c||!g?r:g(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!c||!g?r:g(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c&&g?g(""[Symbol.iterator]()):r,"%Symbol%":c?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":l,"%TypedArray%":E,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(g)try{null.error}catch($){T=g(g($)),b["%Error.prototype%"]=T}var T,S=function $(U){var O;if(U==="%AsyncFunction%")O=s("async function () {}");else if(U==="%GeneratorFunction%")O=s("function* () {}");else if(U==="%AsyncGeneratorFunction%")O=s("async function* () {}");else if(U==="%AsyncGenerator%"){var oe=$("%AsyncGeneratorFunction%");oe&&(O=oe.prototype)}else if(U==="%AsyncIteratorPrototype%"){var ie=$("%AsyncGenerator%");ie&&g&&(O=g(ie.prototype))}return b[U]=O,O},R={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=so(),M=Nl(),N=C.call(h.call,Array.prototype.concat),L=C.call(h.apply,Array.prototype.splice),Te=C.call(h.call,String.prototype.replace),V=C.call(h.call,String.prototype.slice),H=C.call(h.call,RegExp.prototype.exec),we=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,z=/\\(\\)?/g,Ee=function($){var U=V($,0,1),O=V($,-1);if(U==="%"&&O!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(O==="%"&&U!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var oe=[];return Te($,we,function(ie,Qe,Y,pt){oe[oe.length]=Y?Te(pt,z,"$1"):Qe||ie}),oe},Je=function($,U){var O=$,oe;if(M(R,O)&&(oe=R[O],O="%"+oe[0]+"%"),M(b,O)){var ie=b[O];if(ie===w&&(ie=S(O)),typeof ie>"u"&&!U)throw new i("intrinsic "+$+" exists, but is not available. Please file an issue!");return{alias:oe,name:O,value:ie}}throw new n("intrinsic "+$+" does not exist!")};t.exports=function($,U){if(typeof $!="string"||$.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof U!="boolean")throw new i('"allowMissing" argument must be a boolean');if(H(/^%?[^%]*%?$/,$)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var O=Ee($),oe=O.length>0?O[0]:"",ie=Je("%"+oe+"%",U),Qe=ie.name,Y=ie.value,pt=!1,We=ie.alias;We&&(oe=We[0],L(O,N([0,1],We)));for(var ft=1,Ue=!0;ft=O.length){var Ct=a(Y,pe);Ue=!!Ct,Ue&&"get"in Ct&&!("originalValue"in Ct.get)?Y=Ct.get:Y=Y[pe]}else Ue=M(Y,pe),Y=Y[pe];Ue&&!pt&&(b[Qe]=Y)}}return Y}}),Ll=W((e,t)=>{"use strict";var r=so(),n=ao(),o=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||r.call(i,o),a=n("%Object.getOwnPropertyDescriptor%",!0),u=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(u)try{u({},"a",{value:1})}catch(m){u=null}t.exports=function(m){var g=s(r,i,arguments);if(a&&u){var w=a(g,"length");w.configurable&&u(g,"length",{value:1+l(0,m.length-(arguments.length-1))})}return g};var c=function(){return s(r,o,arguments)};u?u(t.exports,"apply",{value:c}):t.exports.apply=c}),uo=W((e,t)=>{"use strict";var r=ao(),n=Ll(),o=n(r("String.prototype.indexOf"));t.exports=function(i,s){var a=r(i,!!s);return typeof a=="function"&&o(i,".prototype.")>-1?n(a):a}}),Bl=W((e,t)=>{"use strict";var r=Gr()(),n=uo(),o=n("Object.prototype.toString"),i=function(u){return r&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:o(u)==="[object Arguments]"},s=function(u){return i(u)?!0:u!==null&&typeof u=="object"&&typeof u.length=="number"&&u.length>=0&&o(u)!=="[object Array]"&&o(u.callee)==="[object Function]"},a=function(){return i(arguments)}();i.isLegacyArguments=s,t.exports=a?i:s}),jl=W((e,t)=>{"use strict";var r=Object.prototype.toString,n=h.prototype.toString,o=/^\s*(?:function)?\*/,i=Gr()(),s=Object.getPrototypeOf,a=function(){if(!i)return!1;try{return h("return function*() {}")()}catch(l){}},u;t.exports=function(l){if(typeof l!="function")return!1;if(o.test(n.call(l)))return!0;if(!i){var c=r.call(l);return c==="[object GeneratorFunction]"}if(!s)return!1;if(typeof u>"u"){var m=a();u=m?s(m):!1}return s(l)===u}}),Ul=W((e,t)=>{"use strict";var r=h.prototype.toString,n=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,o,i;if(typeof n=="function"&&typeof Object.defineProperty=="function")try{o=Object.defineProperty({},"length",{get:function(){throw i}}),i={},n(function(){throw 42},null,o)}catch(M){M!==i&&(n=null)}else n=null;var s=/^\s*class\b/,a=function(M){try{var N=r.call(M);return s.test(N)}catch(L){return!1}},u=function(M){try{return a(M)?!1:(r.call(M),!0)}catch(N){return!1}},l=Object.prototype.toString,c="[object Object]",m="[object Function]",g="[object GeneratorFunction]",w="[object HTMLAllCollection]",E="[object HTML document.all class]",b="[object HTMLCollection]",T=typeof Symbol=="function"&&!!Symbol.toStringTag,S=!(0 in[,]),R=function(){return!1};typeof document=="object"&&(C=document.all,l.call(C)===l.call(document.all)&&(R=function(M){if((S||!M)&&(typeof M>"u"||typeof M=="object"))try{var N=l.call(M);return(N===w||N===E||N===b||N===c)&&M("")==null}catch(L){}return!1}));var C;t.exports=n?function(M){if(R(M))return!0;if(!M||typeof M!="function"&&typeof M!="object")return!1;try{n(M,null,o)}catch(N){if(N!==i)return!1}return!a(M)&&u(M)}:function(M){if(R(M))return!0;if(!M||typeof M!="function"&&typeof M!="object")return!1;if(T)return u(M);if(a(M))return!1;var N=l.call(M);return N!==m&&N!==g&&!/^\[object HTML/.test(N)?!1:u(M)}}),Hi=W((e,t)=>{"use strict";var r=Ul(),n=Object.prototype.toString,o=Object.prototype.hasOwnProperty,i=function(l,c,m){for(var g=0,w=l.length;g=3&&(g=m),n.call(l)==="[object Array]"?i(l,c,g):typeof l=="string"?s(l,c,g):a(l,c,g)};t.exports=u}),zi=W((e,t)=>{"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],n=typeof globalThis>"u"?global:globalThis;t.exports=function(){for(var o=[],i=0;i{"use strict";var r=ao(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(o){n=null}t.exports=n}),Yi=W((e,t)=>{"use strict";var r=Hi(),n=zi(),o=uo(),i=o("Object.prototype.toString"),s=Gr()(),a=Zi(),u=typeof globalThis>"u"?global:globalThis,l=n(),c=o("Array.prototype.indexOf",!0)||function(b,T){for(var S=0;S-1}return a?E(b):!1}}),$l=W((e,t)=>{"use strict";var r=Hi(),n=zi(),o=uo(),i=Zi(),s=o("Object.prototype.toString"),a=Gr()(),u=typeof globalThis>"u"?global:globalThis,l=n(),c=o("String.prototype.slice"),m={},g=Object.getPrototypeOf;a&&i&&g&&r(l,function(b){if(typeof u[b]=="function"){var T=new u[b];if(Symbol.toStringTag in T){var S=g(T),R=i(S,Symbol.toStringTag);if(!R){var C=g(S);R=i(C,Symbol.toStringTag)}m[b]=R.get}}});var w=function(b){var T=!1;return r(m,function(S,R){if(!T)try{var C=S.call(b);C===R&&(T=C)}catch(M){}}),T},E=Yi();t.exports=function(b){return E(b)?!a||!(Symbol.toStringTag in b)?c(s(b),8,-1):w(b):!1}}),ql=W(e=>{"use strict";var t=Bl(),r=jl(),n=$l(),o=Yi();function i(A){return A.call.bind(A)}var s=typeof BigInt<"u",a=typeof Symbol<"u",u=i(Object.prototype.toString),l=i(Number.prototype.valueOf),c=i(String.prototype.valueOf),m=i(Boolean.prototype.valueOf);s&&(g=i(BigInt.prototype.valueOf));var g;a&&(w=i(Symbol.prototype.valueOf));var w;function E(A,Yu){if(typeof A!="object")return!1;try{return Yu(A),!0}catch(Qd){return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=o;function b(A){return typeof Promise<"u"&&A instanceof Promise||A!==null&&typeof A=="object"&&typeof A.then=="function"&&typeof A.catch=="function"}e.isPromise=b;function T(A){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(A):o(A)||ft(A)}e.isArrayBufferView=T;function S(A){return n(A)==="Uint8Array"}e.isUint8Array=S;function R(A){return n(A)==="Uint8ClampedArray"}e.isUint8ClampedArray=R;function C(A){return n(A)==="Uint16Array"}e.isUint16Array=C;function M(A){return n(A)==="Uint32Array"}e.isUint32Array=M;function N(A){return n(A)==="Int8Array"}e.isInt8Array=N;function L(A){return n(A)==="Int16Array"}e.isInt16Array=L;function Te(A){return n(A)==="Int32Array"}e.isInt32Array=Te;function V(A){return n(A)==="Float32Array"}e.isFloat32Array=V;function H(A){return n(A)==="Float64Array"}e.isFloat64Array=H;function we(A){return n(A)==="BigInt64Array"}e.isBigInt64Array=we;function z(A){return n(A)==="BigUint64Array"}e.isBigUint64Array=z;function Ee(A){return u(A)==="[object Map]"}Ee.working=typeof Map<"u"&&Ee(new Map);function Je(A){return typeof Map>"u"?!1:Ee.working?Ee(A):A instanceof Map}e.isMap=Je;function $(A){return u(A)==="[object Set]"}$.working=typeof Set<"u"&&$(new Set);function U(A){return typeof Set>"u"?!1:$.working?$(A):A instanceof Set}e.isSet=U;function O(A){return u(A)==="[object WeakMap]"}O.working=typeof WeakMap<"u"&&O(new WeakMap);function oe(A){return typeof WeakMap>"u"?!1:O.working?O(A):A instanceof WeakMap}e.isWeakMap=oe;function ie(A){return u(A)==="[object WeakSet]"}ie.working=typeof WeakSet<"u"&&ie(new WeakSet);function Qe(A){return ie(A)}e.isWeakSet=Qe;function Y(A){return u(A)==="[object ArrayBuffer]"}Y.working=typeof ArrayBuffer<"u"&&Y(new ArrayBuffer);function pt(A){return typeof ArrayBuffer>"u"?!1:Y.working?Y(A):A instanceof ArrayBuffer}e.isArrayBuffer=pt;function We(A){return u(A)==="[object DataView]"}We.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&We(new DataView(new ArrayBuffer(1),0,1));function ft(A){return typeof DataView>"u"?!1:We.working?We(A):A instanceof DataView}e.isDataView=ft;var Ue=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function pe(A){return u(A)==="[object SharedArrayBuffer]"}function dt(A){return typeof Ue>"u"?!1:(typeof pe.working>"u"&&(pe.working=pe(new Ue)),pe.working?pe(A):A instanceof Ue)}e.isSharedArrayBuffer=dt;function Tt(A){return u(A)==="[object AsyncFunction]"}e.isAsyncFunction=Tt;function Ct(A){return u(A)==="[object Map Iterator]"}e.isMapIterator=Ct;function Qu(A){return u(A)==="[object Set Iterator]"}e.isSetIterator=Qu;function Wu(A){return u(A)==="[object Generator]"}e.isGeneratorObject=Wu;function Hu(A){return u(A)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=Hu;function fi(A){return E(A,l)}e.isNumberObject=fi;function di(A){return E(A,c)}e.isStringObject=di;function mi(A){return E(A,m)}e.isBooleanObject=mi;function gi(A){return s&&E(A,g)}e.isBigIntObject=gi;function yi(A){return a&&E(A,w)}e.isSymbolObject=yi;function zu(A){return fi(A)||di(A)||mi(A)||gi(A)||yi(A)}e.isBoxedPrimitive=zu;function Zu(A){return typeof Uint8Array<"u"&&(pt(A)||dt(A))}e.isAnyArrayBuffer=Zu,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(A){Object.defineProperty(e,A,{enumerable:!1,value:function(){throw new Error(A+" is not supported in userland")}})})}),Vl=W((e,t)=>{t.exports=function(r){return r instanceof x.Buffer}}),Kl=W((e,t)=>{typeof Object.create=="function"?t.exports=function(r,n){n&&(r.super_=n,r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(r,n){if(n){r.super_=n;var o=function(){};o.prototype=n.prototype,r.prototype=new o,r.prototype.constructor=r}}}),Xi=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=o)return u;switch(u){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return u}}),s=n[r];r"u")return function(){return j.deprecate(e,t).apply(this,arguments)};var r=!1;function n(){if(!r){if(y.throwDeprecation)throw new Error(t);y.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}return n};var Ur={},es=/^$/;y.env.NODE_DEBUG&&($r=y.env.NODE_DEBUG,$r=$r.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),es=new RegExp("^"+$r+"$","i"));var $r;j.debuglog=function(e){if(e=e.toUpperCase(),!Ur[e])if(es.test(e)){var t=y.pid;Ur[e]=function(){var r=j.format.apply(j,arguments);console.error("%s %d: %s",e,t,r)}}else Ur[e]=function(){};return Ur[e]};function Ze(e,t){var r={seen:[],stylize:Ql};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),lo(t)?r.showHidden=t:t&&j._extend(r,t),yt(r.showHidden)&&(r.showHidden=!1),yt(r.depth)&&(r.depth=2),yt(r.colors)&&(r.colors=!1),yt(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Jl),Vr(r,e,r.depth)}j.inspect=Ze;Ze.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};Ze.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Jl(e,t){var r=Ze.styles[t];return r?"\x1B["+Ze.colors[r][0]+"m"+e+"\x1B["+Ze.colors[r][1]+"m":e}function Ql(e,t){return e}function Wl(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function Vr(e,t,r){if(e.customInspect&&t&&qr(t.inspect)&&t.inspect!==j.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return Qr(n)||(n=Vr(e,n,r)),n}var o=Hl(e,t);if(o)return o;var i=Object.keys(t),s=Wl(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),rr(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return no(t);if(i.length===0){if(qr(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(tr(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Kr(t))return e.stylize(Date.prototype.toString.call(t),"date");if(rr(t))return no(t)}var u="",l=!1,c=["{","}"];if(ts(t)&&(l=!0,c=["[","]"]),qr(t)){var m=t.name?": "+t.name:"";u=" [Function"+m+"]"}if(tr(t)&&(u=" "+RegExp.prototype.toString.call(t)),Kr(t)&&(u=" "+Date.prototype.toUTCString.call(t)),rr(t)&&(u=" "+no(t)),i.length===0&&(!l||t.length==0))return c[0]+u+c[1];if(r<0)return tr(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var g;return l?g=zl(e,t,r,s,i):g=i.map(function(w){return io(e,t,r,s,w,l)}),e.seen.pop(),Zl(g,u,c)}function Hl(e,t){if(yt(t))return e.stylize("undefined","undefined");if(Qr(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(rs(t))return e.stylize(""+t,"number");if(lo(t))return e.stylize(""+t,"boolean");if(Jr(t))return e.stylize("null","null")}function no(e){return"["+Error.prototype.toString.call(e)+"]"}function zl(e,t,r,n,o){for(var i=[],s=0,a=t.length;s-1&&(i?a=a.split(` -`).map(function(l){return" "+l}).join(` -`).slice(2):a=` -`+a.split(` -`).map(function(l){return" "+l}).join(` -`))):a=e.stylize("[Circular]","special")),yt(s)){if(i&&o.match(/^\d+$/))return a;s=JSON.stringify(""+o),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.slice(1,-1),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function Zl(e,t,r){var n=0,o=e.reduce(function(i,s){return n++,s.indexOf(` -`)>=0&&n++,i+s.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?r[0]+(t===""?"":t+` - `)+" "+e.join(`, - `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}j.types=ql();function ts(e){return Array.isArray(e)}j.isArray=ts;function lo(e){return typeof e=="boolean"}j.isBoolean=lo;function Jr(e){return e===null}j.isNull=Jr;function Yl(e){return e==null}j.isNullOrUndefined=Yl;function rs(e){return typeof e=="number"}j.isNumber=rs;function Qr(e){return typeof e=="string"}j.isString=Qr;function Xl(e){return typeof e=="symbol"}j.isSymbol=Xl;function yt(e){return e===void 0}j.isUndefined=yt;function tr(e){return Ft(e)&&co(e)==="[object RegExp]"}j.isRegExp=tr;j.types.isRegExp=tr;function Ft(e){return typeof e=="object"&&e!==null}j.isObject=Ft;function Kr(e){return Ft(e)&&co(e)==="[object Date]"}j.isDate=Kr;j.types.isDate=Kr;function rr(e){return Ft(e)&&(co(e)==="[object Error]"||e instanceof Error)}j.isError=rr;j.types.isNativeError=rr;function qr(e){return typeof e=="function"}j.isFunction=qr;function ec(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}j.isPrimitive=ec;j.isBuffer=Vl();function co(e){return Object.prototype.toString.call(e)}function oo(e){return e<10?"0"+e.toString(10):e.toString(10)}var tc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function rc(){var e=new Date,t=[oo(e.getHours()),oo(e.getMinutes()),oo(e.getSeconds())].join(":");return[e.getDate(),tc[e.getMonth()],t].join(" ")}j.log=function(){console.log("%s - %s",rc(),j.format.apply(j,arguments))};j.inherits=Kl();j._extend=function(e,t){if(!t||!Ft(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function ns(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var gt=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;j.promisify=function(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');if(gt&&e[gt]){var t=e[gt];if(typeof t!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,gt,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var r,n,o=new Promise(function(a,u){r=a,n=u}),i=[],s=0;s{"use strict";d();p();f();var It=1e3,kt=It*60,Dt=kt*60,ht=Dt*24,ic=ht*7,sc=ht*365.25;os.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return ac(e);if(r==="number"&&isFinite(e))return t.long?lc(e):uc(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function ac(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*sc;case"weeks":case"week":case"w":return r*ic;case"days":case"day":case"d":return r*ht;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Dt;case"minutes":case"minute":case"mins":case"min":case"m":return r*kt;case"seconds":case"second":case"secs":case"sec":case"s":return r*It;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function uc(e){var t=Math.abs(e);return t>=ht?Math.round(e/ht)+"d":t>=Dt?Math.round(e/Dt)+"h":t>=kt?Math.round(e/kt)+"m":t>=It?Math.round(e/It)+"s":e+"ms"}function lc(e){var t=Math.abs(e);return t>=ht?Wr(e,t,ht,"day"):t>=Dt?Wr(e,t,Dt,"hour"):t>=kt?Wr(e,t,kt,"minute"):t>=It?Wr(e,t,It,"second"):e+" ms"}function Wr(e,t,r,n){var o=t>=r*1.5;return Math.round(e/r)+" "+n+(o?"s":"")}});var fo=Z((sg,ss)=>{"use strict";d();p();f();function cc(e){r.debug=r,r.default=r,r.coerce=u,r.disable=i,r.enable=o,r.enabled=s,r.humanize=is(),r.destroy=l,Object.keys(e).forEach(c=>{r[c]=e[c]}),r.names=[],r.skips=[],r.formatters={};function t(c){let m=0;for(let g=0;g{if(L==="%%")return"%";M++;let V=r.formatters[Te];if(typeof V=="function"){let H=T[M];L=V.call(S,H),T.splice(M,1),M--}return L}),r.formatArgs.call(S,T),(S.log||r.log).apply(S,T)}return b.namespace=c,b.useColors=r.useColors(),b.color=r.selectColor(c),b.extend=n,b.destroy=r.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(w!==r.namespaces&&(w=r.namespaces,E=r.enabled(c)),E),set:T=>{g=T}}),typeof r.init=="function"&&r.init(b),b}function n(c,m){let g=r(this.namespace+(typeof m=="undefined"?":":m)+c);return g.log=this.log,g}function o(c){r.save(c),r.namespaces=c,r.names=[],r.skips=[];let m,g=(typeof c=="string"?c:"").split(/[\s,]+/),w=g.length;for(m=0;m"-"+m)].join(",");return r.enable(""),c}function s(c){if(c[c.length-1]==="*")return!0;let m,g;for(m=0,g=r.skips.length;m{"use strict";d();p();f();ve.formatArgs=fc;ve.save=dc;ve.load=mc;ve.useColors=pc;ve.storage=gc();ve.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();ve.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function pc(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function fc(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Hr.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),e.splice(n,0,t)}ve.log=console.debug||console.log||(()=>{});function dc(e){try{e?ve.storage.setItem("debug",e):ve.storage.removeItem("debug")}catch(t){}}function mc(){let e;try{e=ve.storage.getItem("debug")}catch(t){}return!e&&typeof y!="undefined"&&"env"in y&&(e=y.env.DEBUG),e}function gc(){try{return localStorage}catch(e){}}Hr.exports=fo()(ve);var{formatters:yc}=Hr.exports;yc.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var mo=Z(zr=>{"use strict";d();p();f();zr.isatty=function(){return!1};function hc(){throw new Error("tty.ReadStream is not implemented")}zr.ReadStream=hc;function xc(){throw new Error("tty.WriteStream is not implemented")}zr.WriteStream=xc});var us=Z(()=>{"use strict";d();p();f()});var cs=Z((Pg,ls)=>{"use strict";d();p();f();ls.exports=(e,t=y.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return n!==-1&&(o===-1||n{"use strict";d();p();f();var bc=us(),ps=mo(),Ce=cs(),{env:te}=y,Ye;Ce("no-color")||Ce("no-colors")||Ce("color=false")||Ce("color=never")?Ye=0:(Ce("color")||Ce("colors")||Ce("color=true")||Ce("color=always"))&&(Ye=1);"FORCE_COLOR"in te&&(te.FORCE_COLOR==="true"?Ye=1:te.FORCE_COLOR==="false"?Ye=0:Ye=te.FORCE_COLOR.length===0?1:Math.min(parseInt(te.FORCE_COLOR,10),3));function go(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function yo(e,t){if(Ye===0)return 0;if(Ce("color=16m")||Ce("color=full")||Ce("color=truecolor"))return 3;if(Ce("color=256"))return 2;if(e&&!t&&Ye===void 0)return 0;let r=Ye||0;if(te.TERM==="dumb")return r;if(y.platform==="win32"){let n=bc.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in te)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in te)||te.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in te)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(te.TEAMCITY_VERSION)?1:0;if(te.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in te){let n=parseInt((te.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(te.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(te.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(te.TERM)||"COLORTERM"in te?1:r}function wc(e){let t=yo(e,e&&e.isTTY);return go(t)}fs.exports={supportsColor:wc,stdout:go(yo(!0,ps.isatty(1))),stderr:go(yo(!0,ps.isatty(2)))}});var gs=Z((se,Yr)=>{"use strict";d();p();f();var Ec=mo(),Zr=po();se.init=Sc;se.log=Tc;se.formatArgs=vc;se.save=Cc;se.load=Mc;se.useColors=Pc;se.destroy=Zr.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");se.colors=[6,2,3,4,5,1];try{let e=ds();e&&(e.stderr||e).level>=2&&(se.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}se.inspectOpts=Object.keys(y.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),n=y.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function Pc(){return"colors"in se.inspectOpts?!!se.inspectOpts.colors:Ec.isatty(y.stderr.fd)}function vc(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),i=` ${o};1m${t} \x1B[0m`;e[0]=i+e[0].split(` -`).join(` -`+i),e.push(o+"m+"+Yr.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Ac()+t+" "+e[0]}function Ac(){return se.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Tc(...e){return y.stderr.write(Zr.format(...e)+` -`)}function Cc(e){e?y.env.DEBUG=e:delete y.env.DEBUG}function Mc(){return y.env.DEBUG}function Sc(e){e.inspectOpts={};let t=Object.keys(se.inspectOpts);for(let r=0;rt.trim()).join(" ")};ms.O=function(e){return this.inspectOpts.colors=this.useColors,Zr.inspect(e,this.inspectOpts)}});var xo=Z((kg,ho)=>{"use strict";d();p();f();typeof y=="undefined"||y.type==="renderer"||y.browser===!0||y.__nwjs?ho.exports=as():ho.exports=gs()});function Ic(){return!1}var kc,Dc,sn,wo=Nr(()=>{"use strict";d();p();f();kc={},Dc={existsSync:Ic,promises:kc},sn=Dc});var Eo=Z((wy,Cs)=>{"use strict";d();p();f();function De(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function Ts(e,t){for(var r="",n=0,o=-1,i=0,s,a=0;a<=e.length;++a){if(a2){var u=r.lastIndexOf("/");if(u!==r.length-1){u===-1?(r="",n=0):(r=r.slice(0,u),n=r.length-1-r.lastIndexOf("/")),o=a,i=0;continue}}else if(r.length===2||r.length===1){r="",n=0,o=a,i=0;continue}}t&&(r.length>0?r+="/..":r="..",n=2)}else r.length>0?r+="/"+e.slice(o+1,a):r=e.slice(o+1,a),n=a-o-1;o=a,i=0}else s===46&&i!==-1?++i:i=-1}return r}function _c(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+e+n:n}var Lt={resolve:function(){for(var e="",t=!1,r,n=arguments.length-1;n>=-1&&!t;n--){var o;n>=0?o=arguments[n]:(r===void 0&&(r=y.cwd()),o=r),De(o),o.length!==0&&(e=o+"/"+e,t=o.charCodeAt(0)===47)}return e=Ts(e,!t),t?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(De(e),e.length===0)return".";var t=e.charCodeAt(0)===47,r=e.charCodeAt(e.length-1)===47;return e=Ts(e,!t),e.length===0&&!t&&(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return De(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t0&&(e===void 0?e=r:e+="/"+r)}return e===void 0?".":Lt.normalize(e)},relative:function(e,t){if(De(e),De(t),e===t||(e=Lt.resolve(e),t=Lt.resolve(t),e===t))return"";for(var r=1;ru){if(t.charCodeAt(i+c)===47)return t.slice(i+c+1);if(c===0)return t.slice(i+c)}else o>u&&(e.charCodeAt(r+c)===47?l=c:c===0&&(l=0));break}var m=e.charCodeAt(r+c),g=t.charCodeAt(i+c);if(m!==g)break;m===47&&(l=c)}var w="";for(c=r+l+1;c<=n;++c)(c===n||e.charCodeAt(c)===47)&&(w.length===0?w+="..":w+="/..");return w.length>0?w+t.slice(i+l):(i+=l,t.charCodeAt(i)===47&&++i,t.slice(i))},_makeLong:function(e){return e},dirname:function(e){if(De(e),e.length===0)return".";for(var t=e.charCodeAt(0),r=t===47,n=-1,o=!0,i=e.length-1;i>=1;--i)if(t=e.charCodeAt(i),t===47){if(!o){n=i;break}}else o=!1;return n===-1?r?"/":".":r&&n===1?"//":e.slice(0,n)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');De(e);var r=0,n=-1,o=!0,i;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){var u=e.charCodeAt(i);if(u===47){if(!o){r=i+1;break}}else a===-1&&(o=!1,a=i+1),s>=0&&(u===t.charCodeAt(s)?--s===-1&&(n=i):(s=-1,n=a))}return r===n?n=a:n===-1&&(n=e.length),e.slice(r,n)}else{for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===47){if(!o){r=i+1;break}}else n===-1&&(o=!1,n=i+1);return n===-1?"":e.slice(r,n)}},extname:function(e){De(e);for(var t=-1,r=0,n=-1,o=!0,i=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(a===47){if(!o){r=s+1;break}continue}n===-1&&(o=!1,n=s+1),a===46?t===-1?t=s:i!==1&&(i=1):t!==-1&&(i=-1)}return t===-1||n===-1||i===0||i===1&&t===n-1&&t===r+1?"":e.slice(t,n)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return _c("/",e)},parse:function(e){De(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var r=e.charCodeAt(0),n=r===47,o;n?(t.root="/",o=1):o=0;for(var i=-1,s=0,a=-1,u=!0,l=e.length-1,c=0;l>=o;--l){if(r=e.charCodeAt(l),r===47){if(!u){s=l+1;break}continue}a===-1&&(u=!1,a=l+1),r===46?i===-1?i=l:c!==1&&(c=1):i!==-1&&(c=-1)}return i===-1||a===-1||c===0||c===1&&i===a-1&&i===s+1?a!==-1&&(s===0&&n?t.base=t.name=e.slice(1,a):t.base=t.name=e.slice(s,a)):(s===0&&n?(t.name=e.slice(1,i),t.base=e.slice(1,a)):(t.name=e.slice(s,i),t.base=e.slice(s,a)),t.ext=e.slice(i,a)),s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};Lt.posix=Lt;Cs.exports=Lt});var Rs=Z((Sy,Ss)=>{"use strict";d();p();f();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 Fs=Z((Iy,Os)=>{"use strict";d();p();f();var Lc=Rs();Os.exports=e=>{let t=Lc(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var ks=Z((Uy,Ao)=>{"use strict";d();p();f();var Bc=Object.prototype.hasOwnProperty,fe="~";function or(){}Object.create&&(or.prototype=Object.create(null),new or().__proto__||(fe=!1));function jc(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function Is(e,t,r,n,o){if(typeof r!="function")throw new TypeError("The listener must be a function");var i=new jc(r,n||e,o),s=fe?fe+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],i]:e._events[s].push(i):(e._events[s]=i,e._eventsCount++),e}function an(e,t){--e._eventsCount===0?e._events=new or:delete e._events[t]}function le(){this._events=new or,this._eventsCount=0}le.prototype.eventNames=function(){var e=[],t,r;if(this._eventsCount===0)return e;for(r in t=this._events)Bc.call(t,r)&&e.push(fe?r.slice(1):r);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e};le.prototype.listeners=function(e){var t=fe?fe+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,o=r.length,i=new Array(o);n{"use strict";d();p();f();Ds.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 Bs=Z((Yy,Ls)=>{"use strict";d();p();f();Ls.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 Us=Z((rh,js)=>{"use strict";d();p();f();var Kc=Bs();js.exports=e=>typeof e=="string"?e.replace(Kc(),""):e});var Ks=Z(()=>{"use strict";d();p();f()});var ni=Z((AM,ou)=>{"use strict";d();p();f();ou.exports=function(){function e(t,r,n,o,i){return tn?n+1:t+1:o===i?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 o=t.length,i=r.length;o>0&&t.charCodeAt(o-1)===r.charCodeAt(i-1);)o--,i--;for(var s=0;sLi,getExtensionContext:()=>Bi});d();p();f();d();p();f();function Li(e){return typeof e=="function"?e:t=>t.$extends(e)}d();p();f();function Bi(e){return e}var $i={};Lr($i,{validator:()=>Ui});d();p();f();d();p();f();function Ui(...e){return t=>t}var Ji={};Lr(Ji,{Extensions:()=>qi,Public:()=>Vi,Result:()=>Ki,Utils:()=>Gi});d();p();f();var qi={};d();p();f();var Vi={};d();p();f();var Ki={};d();p();f();var Gi={};d();p();f();d();p();f();d();p();f();var ze=(e,t)=>{let r={};for(let n of e){let o=n[t];r[o]=n}return r};function Qi(e){return e.substring(0,1).toLowerCase()+e.substring(1)}var ro=class{constructor(t){this.document=t;this.compositeNames=new Set(this.datamodel.types.map(r=>r.name)),this.typeAndModelMap=this.buildTypeModelMap(),this.mappingsMap=this.buildMappingsMap(),this.outputTypeMap=this.buildMergedOutputTypeMap(),this.rootFieldMap=this.buildRootFieldMap(),this.inputTypesByName=this.buildInputTypesMap()}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(t){return this.compositeNames.has(t)}getOtherOperationNames(){return[Object.values(this.mappings.otherOperations.write),Object.values(this.mappings.otherOperations.read)].flat()}hasEnumInNamespace(t,r){var n;return((n=this.schema.enumTypes[r])==null?void 0:n.find(o=>o.name===t))!==void 0}resolveInputObjectType(t){return this.inputTypesByName.get(to(t.type,t.namespace))}resolveOutputObjectType(t){var r;if(t.location==="outputObjectTypes")return this.outputObjectTypes[(r=t.namespace)!=null?r:"prisma"].find(n=>n.name===t.type)}buildModelMap(){return ze(this.datamodel.models,"name")}buildTypeMap(){return ze(this.datamodel.types,"name")}buildTypeModelMap(){return{...this.buildTypeMap(),...this.buildModelMap()}}buildMappingsMap(){return ze(this.mappings.modelOperations,"model")}buildMergedOutputTypeMap(){return{model:ze(this.schema.outputObjectTypes.model,"name"),prisma:ze(this.schema.outputObjectTypes.prisma,"name")}}buildRootFieldMap(){return{...ze(this.outputTypeMap.prisma.Query.fields,"name"),...ze(this.outputTypeMap.prisma.Mutation.fields,"name")}}buildInputTypesMap(){let t=new Map;for(let r of this.inputObjectTypes.prisma)t.set(to(r.name,"prisma"),r);if(!this.inputObjectTypes.model)return t;for(let r of this.inputObjectTypes.model)t.set(to(r.name,"model"),r);return t}};function to(e,t){return t?`${t}.${e}`:e}d();p();f();d();p();f();var Me;(t=>{let e;(C=>(C.findUnique="findUnique",C.findUniqueOrThrow="findUniqueOrThrow",C.findFirst="findFirst",C.findFirstOrThrow="findFirstOrThrow",C.findMany="findMany",C.create="create",C.createMany="createMany",C.update="update",C.updateMany="updateMany",C.upsert="upsert",C.delete="delete",C.deleteMany="deleteMany",C.groupBy="groupBy",C.count="count",C.aggregate="aggregate",C.findRaw="findRaw",C.aggregateRaw="aggregateRaw"))(e=t.ModelAction||(t.ModelAction={}))})(Me||(Me={}));d();p();f();var en=Pe(xo()),Rc=100,Xr=[],ys,hs;typeof y!="undefined"&&typeof((ys=y.stderr)==null?void 0:ys.write)!="function"&&(en.default.log=(hs=console.debug)!=null?hs:console.log);function Oc(e){let t=(0,en.default)(e),r=Object.assign((...n)=>(t.log=r.log,n.length!==0&&Xr.push([e,...n]),Xr.length>Rc&&Xr.shift(),t("",...n)),t);return r}var xs=Object.assign(Oc,en.default);function bs(){Xr.length=0}var he=xs;d();p();f();var bo,ws,Es,Ps,vs=!0;typeof y!="undefined"&&({FORCE_COLOR:bo,NODE_DISABLE_COLORS:ws,NO_COLOR:Es,TERM:Ps}=y.env||{},vs=y.stdout&&y.stdout.isTTY);var Fc={enabled:!ws&&Es==null&&Ps!=="dumb"&&(bo!=null&&bo!=="0"||vs)};function G(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,o=`\x1B[${t}m`;return function(i){return!Fc.enabled||i==null?i:n+(~(""+i).indexOf(o)?i.replace(r,o+n):i)+o}}var $g=G(0,0),Xe=G(1,22),tn=G(2,22),qg=G(3,23),As=G(4,24),Vg=G(7,27),Kg=G(8,28),Gg=G(9,29),Jg=G(30,39),_t=G(31,39),rn=G(32,39),nn=G(33,39),Nt=G(34,39),Qg=G(35,39),et=G(36,39),Wg=G(37,39),on=G(90,39),Hg=G(90,39),zg=G(40,49),Zg=G(41,49),Yg=G(42,49),Xg=G(43,49),ey=G(44,49),ty=G(45,49),ry=G(46,49),ny=G(47,49);d();p();f();d();p();f();d();p();f();d();p();f();var Ms="library";function Po(e){let t=Nc();return t||((e==null?void 0:e.config.engineType)==="library"?"library":(e==null?void 0:e.config.engineType)==="binary"?"binary":Ms)}function Nc(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}d();p();f();var nr=Pe(Eo());function vo(e){return nr.default.sep===nr.default.posix.sep?e:e.split(nr.default.sep).join(nr.default.posix.sep)}var Bt={};Lr(Bt,{error:()=>qc,info:()=>$c,log:()=>Uc,query:()=>Vc,should:()=>Ns,tags:()=>ir,warn:()=>To});d();p();f();var ir={error:_t("prisma:error"),warn:nn("prisma:warn"),info:et("prisma:info"),query:Nt("prisma:query")},Ns={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Uc(...e){console.log(...e)}function To(e,...t){Ns.warn()&&console.warn(`${ir.warn} ${e}`,...t)}function $c(e,...t){console.info(`${ir.info} ${e}`,...t)}function qc(e,...t){console.error(`${ir.error} ${e}`,...t)}function Vc(e,...t){console.log(`${ir.query} ${e}`,...t)}d();p();f();function xt(e,t){throw new Error(t)}d();p();f();function Co(e,t){return Object.prototype.hasOwnProperty.call(e,t)}d();p();f();var Mo=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});d();p();f();function jt(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}d();p();f();function So(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{$s.has(e)||($s.add(e),To(t,...r))};d();p();f();var de=class extends Error{constructor(r,{code:n,clientVersion:o,meta:i,batchRequestIdx:s}){super(r);this.name="PrismaClientKnownRequestError",this.code=n,this.clientVersion=o,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:s,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};k(de,"PrismaClientKnownRequestError");var tt=class extends de{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};k(tt,"NotFoundError");d();p();f();var ae=class e extends Error{constructor(r,n,o){super(r);this.name="PrismaClientInitializationError",this.clientVersion=n,this.errorCode=o,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};k(ae,"PrismaClientInitializationError");d();p();f();var rt=class extends Error{constructor(r,n){super(r);this.name="PrismaClientRustPanicError",this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};k(rt,"PrismaClientRustPanicError");d();p();f();var Se=class extends Error{constructor(r,{clientVersion:n,batchRequestIdx:o}){super(r);this.name="PrismaClientUnknownRequestError",this.clientVersion=n,Object.defineProperty(this,"batchRequestIdx",{value:o,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};k(Se,"PrismaClientUnknownRequestError");d();p();f();var me=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};k(me,"PrismaClientValidationError");d();p();f();var sr=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};d();p();f();d();p();f();function ar(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Gc(e,t){let r=ar(()=>Jc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Jc(e){return{datamodel:{models:Ro(e.models),enums:Ro(e.enums),types:Ro(e.types)}}}function Ro(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}d();p();f();var V0=["JsonNullValueInput","NullableJsonNullValueInput","JsonNullValueFilter"],ln=Symbol(),Oo=new WeakMap,qe=class{constructor(t){t===ln?Oo.set(this,`Prisma.${this._getName()}`):Oo.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Oo.get(this)}},ur=class extends qe{_getNamespace(){return"NullTypes"}},lr=class extends ur{};Io(lr,"DbNull");var cr=class extends ur{};Io(cr,"JsonNull");var pr=class extends ur{};Io(pr,"AnyNull");var Fo={classes:{DbNull:lr,JsonNull:cr,AnyNull:pr},instances:{DbNull:new lr(ln),JsonNull:new cr(ln),AnyNull:new pr(ln)}};function Io(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}d();p();f();d();p();f();var zc=Pe(xo(),1);function cn(e){return{ok:!1,error:e,map(){return cn(e)},flatMap(){return cn(e)}}}var Qc=class{constructor(){hi(this,"registeredErrors",[])}consumeError(e){return this.registeredErrors[e]}registerNewError(e){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:e},t}},Vs=e=>{let t=new Qc,r=nt(t,e.startTransaction.bind(e));return{errorRegistry:t,queryRaw:nt(t,e.queryRaw.bind(e)),executeRaw:nt(t,e.executeRaw.bind(e)),flavour:e.flavour,startTransaction:async(...n)=>(await r(...n)).map(i=>Wc(t,i)),close:nt(t,e.close.bind(e))}},Wc=(e,t)=>({flavour:t.flavour,options:t.options,queryRaw:nt(e,t.queryRaw.bind(t)),executeRaw:nt(e,t.executeRaw.bind(t)),commit:nt(e,t.commit.bind(t)),rollback:nt(e,t.rollback.bind(t)),dispose:Hc(e,t.dispose.bind(t))});function nt(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let o=e.registerNewError(n);return cn({kind:"GenericJsError",id:o})}}}function Hc(e,t){return(...r)=>{try{return t(...r)}catch(n){let o=e.registerNewError(n);return cn({kind:"GenericJsError",id:o})}}}var O2=Pe(Ks()),Ju=Pe(ks());wo();var Dr=Pe(Eo());d();p();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 o=0,i=0;for(;oe.getPropertyValue(r))},getPropertyDescriptor(r){var n;return(n=e.getPropertyDescriptor)==null?void 0:n.call(e,r)}}}d();p();f();var Hs=Pe(po());d();p();f();var pn={enumerable:!0,configurable:!0,writable:!0};function fn(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>pn,has:(r,n)=>t.has(n),set:(r,n,o)=>t.add(n)&&Reflect.set(r,n,o),ownKeys:()=>[...t]}}var Qs=Symbol.for("nodejs.util.inspect.custom");function Ne(e,t){let r=Xc(t),n=new Set,o=new Proxy(e,{get(i,s){if(n.has(s))return i[s];let a=r.get(s);return a?a.getPropertyValue(s):i[s]},has(i,s){var u,l;if(n.has(s))return!0;let a=r.get(s);return a?(l=(u=a.has)==null?void 0:u.call(a,s))!=null?l:!0:Reflect.has(i,s)},ownKeys(i){let s=Ws(Reflect.ownKeys(i),r),a=Ws(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(i,s,a){var l,c;let u=r.get(s);return((c=(l=u==null?void 0:u.getPropertyDescriptor)==null?void 0:l.call(u,s))==null?void 0:c.writable)===!1?!1:(n.add(s),Reflect.set(i,s,a))},getOwnPropertyDescriptor(i,s){let a=Reflect.getOwnPropertyDescriptor(i,s);if(a&&!a.configurable)return a;let u=r.get(s);return u?u.getPropertyDescriptor?{...pn,...u==null?void 0:u.getPropertyDescriptor(s)}:pn:a},defineProperty(i,s,a){return n.add(s),Reflect.defineProperty(i,s,a)}});return o[Qs]=function(i,s,a=Hs.inspect){let u={...this};return delete u[Qs],a(u,s)},o}function Xc(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let o of n)t.set(o,r)}return t}function Ws(e,t){return e.filter(r=>{var o,i;let n=t.get(r);return(i=(o=n==null?void 0:n.has)==null?void 0:o.call(n,r))!=null?i:!0})}d();p();f();function dr(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}d();p();f();d();p();f();var Ut=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){let n=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}};d();p();f();d();p();f();function $t(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function dn(e){return e.toString()!=="Invalid Date"}d();p();f();d();p();f();var qt=9e15,at=1e9,ko="0123456789abcdef",gn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",yn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Do={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-qt,maxE:qt,crypto:!1},Xs,Ve,D=!0,xn="[DecimalError] ",st=xn+"Invalid argument: ",ea=xn+"Precision limit exceeded",ta=xn+"crypto unavailable",ra="[object Decimal]",ce=Math.floor,X=Math.pow,ep=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,tp=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,rp=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,na=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Oe=1e7,I=7,np=9007199254740991,op=gn.length-1,_o=yn.length-1,v={toStringTag:ra};v.absoluteValue=v.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),F(e)};v.ceil=function(){return F(new this.constructor(this),this.e+1,2)};v.clampedTo=v.clamp=function(e,t){var r,n=this,o=n.constructor;if(e=new o(e),t=new o(t),!e.s||!t.s)return new o(NaN);if(e.gt(t))throw Error(st+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new o(n)};v.comparedTo=v.cmp=function(e){var t,r,n,o,i=this,s=i.d,a=(e=new i.constructor(e)).d,u=i.s,l=e.s;if(!s||!a)return!u||!l?NaN:u!==l?u:s===a?0:!s^u<0?1:-1;if(!s[0]||!a[0])return s[0]?u:a[0]?-l:0;if(u!==l)return u;if(i.e!==e.e)return i.e>e.e^u<0?1:-1;for(n=s.length,o=a.length,t=0,r=na[t]^u<0?1:-1;return n===o?0:n>o^u<0?1:-1};v.cosine=v.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=ip(n,ua(n,r)),n.precision=e,n.rounding=t,F(Ve==2||Ve==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};v.cubeRoot=v.cbrt=function(){var e,t,r,n,o,i,s,a,u,l,c=this,m=c.constructor;if(!c.isFinite()||c.isZero())return new m(c);for(D=!1,i=c.s*X(c.s*c,1/3),!i||Math.abs(i)==1/0?(r=ue(c.d),e=c.e,(i=(e-r.length+1)%3)&&(r+=i==1||i==-2?"0":"00"),i=X(r,1/3),e=ce((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?r="5e"+e:(r=i.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new m(r),n.s=c.s):n=new m(i.toString()),s=(e=m.precision)+3;;)if(a=n,u=a.times(a).times(a),l=u.plus(c),n=K(l.plus(c).times(a),l.plus(u),s+2,1),ue(a.d).slice(0,s)===(r=ue(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!o&&r=="4999"){if(!o&&(F(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}s+=4,o=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(F(n,e+1,1),t=!n.times(n).times(n).eq(c));break}return D=!0,F(n,e,m.rounding,t)};v.decimalPlaces=v.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-ce(this.e/I))*I,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};v.dividedBy=v.div=function(e){return K(this,new this.constructor(e))};v.dividedToIntegerBy=v.divToInt=function(e){var t=this,r=t.constructor;return F(K(t,new r(e),0,1,1),r.precision,r.rounding)};v.equals=v.eq=function(e){return this.cmp(e)===0};v.floor=function(){return F(new this.constructor(this),this.e+1,3)};v.greaterThan=v.gt=function(e){return this.cmp(e)>0};v.greaterThanOrEqualTo=v.gte=function(e){var t=this.cmp(e);return t==1||t===0};v.hyperbolicCosine=v.cosh=function(){var e,t,r,n,o,i=this,s=i.constructor,a=new s(1);if(!i.isFinite())return new s(i.s?1/0:NaN);if(i.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(i.e,i.sd())+4,s.rounding=1,o=i.d.length,o<32?(e=Math.ceil(o/3),t=(1/wn(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),i=Vt(s,1,i.times(t),new s(1),!0);for(var u,l=e,c=new s(8);l--;)u=i.times(i),i=a.minus(u.times(c.minus(u.times(c))));return F(i,s.precision=r,s.rounding=n,!0)};v.hyperbolicSine=v.sinh=function(){var e,t,r,n,o=this,i=o.constructor;if(!o.isFinite()||o.isZero())return new i(o);if(t=i.precision,r=i.rounding,i.precision=t+Math.max(o.e,o.sd())+4,i.rounding=1,n=o.d.length,n<3)o=Vt(i,2,o,o,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,o=o.times(1/wn(5,e)),o=Vt(i,2,o,o,!0);for(var s,a=new i(5),u=new i(16),l=new i(20);e--;)s=o.times(o),o=o.times(a.plus(s.times(u.times(s).plus(l))))}return i.precision=t,i.rounding=r,F(o,t,r,!0)};v.hyperbolicTangent=v.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,K(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};v.inverseCosine=v.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),o=r.precision,i=r.rounding;return n!==-1?n===0?t.isNeg()?Re(r,o,i):new r(0):new r(NaN):t.isZero()?Re(r,o+4,i).times(.5):(r.precision=o+6,r.rounding=1,t=t.asin(),e=Re(r,o+4,i).times(.5),r.precision=o,r.rounding=i,e.minus(t))};v.inverseHyperbolicCosine=v.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,D=!1,r=r.times(r).minus(1).sqrt().plus(r),D=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};v.inverseHyperbolicSine=v.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,D=!1,r=r.times(r).plus(1).sqrt().plus(r),D=!0,n.precision=e,n.rounding=t,r.ln())};v.inverseHyperbolicTangent=v.atanh=function(){var e,t,r,n,o=this,i=o.constructor;return o.isFinite()?o.e>=0?new i(o.abs().eq(1)?o.s/0:o.isZero()?o:NaN):(e=i.precision,t=i.rounding,n=o.sd(),Math.max(n,e)<2*-o.e-1?F(new i(o),e,t,!0):(i.precision=r=n-o.e,o=K(o.plus(1),new i(1).minus(o),r+e,1),i.precision=e+4,i.rounding=1,o=o.ln(),i.precision=e,i.rounding=t,o.times(.5))):new i(NaN)};v.inverseSine=v.asin=function(){var e,t,r,n,o=this,i=o.constructor;return o.isZero()?new i(o):(t=o.abs().cmp(1),r=i.precision,n=i.rounding,t!==-1?t===0?(e=Re(i,r+4,n).times(.5),e.s=o.s,e):new i(NaN):(i.precision=r+6,i.rounding=1,o=o.div(new i(1).minus(o.times(o)).sqrt().plus(1)).atan(),i.precision=r,i.rounding=n,o.times(2)))};v.inverseTangent=v.atan=function(){var e,t,r,n,o,i,s,a,u,l=this,c=l.constructor,m=c.precision,g=c.rounding;if(l.isFinite()){if(l.isZero())return new c(l);if(l.abs().eq(1)&&m+4<=_o)return s=Re(c,m+4,g).times(.25),s.s=l.s,s}else{if(!l.s)return new c(NaN);if(m+4<=_o)return s=Re(c,m+4,g).times(.5),s.s=l.s,s}for(c.precision=a=m+10,c.rounding=1,r=Math.min(28,a/I+2|0),e=r;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(D=!1,t=Math.ceil(a/I),n=1,u=l.times(l),s=new c(l),o=l;e!==-1;)if(o=o.times(u),i=s.minus(o.div(n+=2)),o=o.times(u),s=i.plus(o.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===i.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};v.isNaN=function(){return!this.s};v.isNegative=v.isNeg=function(){return this.s<0};v.isPositive=v.isPos=function(){return this.s>0};v.isZero=function(){return!!this.d&&this.d[0]===0};v.lessThan=v.lt=function(e){return this.cmp(e)<0};v.lessThanOrEqualTo=v.lte=function(e){return this.cmp(e)<1};v.logarithm=v.log=function(e){var t,r,n,o,i,s,a,u,l=this,c=l.constructor,m=c.precision,g=c.rounding,w=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=l.d,l.s<0||!r||!r[0]||l.eq(1))return new c(r&&!r[0]?-1/0:l.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)i=!0;else{for(o=r[0];o%10===0;)o/=10;i=o!==1}if(D=!1,a=m+w,s=it(l,a),n=t?hn(c,a+10):it(e,a),u=K(s,n,a,1),mr(u.d,o=m,g))do if(a+=10,s=it(l,a),n=t?hn(c,a+10):it(e,a),u=K(s,n,a,1),!i){+ue(u.d).slice(o+1,o+15)+1==1e14&&(u=F(u,m+1,0));break}while(mr(u.d,o+=10,g));return D=!0,F(u,m,g)};v.minus=v.sub=function(e){var t,r,n,o,i,s,a,u,l,c,m,g,w=this,E=w.constructor;if(e=new E(e),!w.d||!e.d)return!w.s||!e.s?e=new E(NaN):w.d?e.s=-e.s:e=new E(e.d||w.s!==e.s?w:NaN),e;if(w.s!=e.s)return e.s=-e.s,w.plus(e);if(l=w.d,g=e.d,a=E.precision,u=E.rounding,!l[0]||!g[0]){if(g[0])e.s=-e.s;else if(l[0])e=new E(w);else return new E(u===3?-0:0);return D?F(e,a,u):e}if(r=ce(e.e/I),c=ce(w.e/I),l=l.slice(),i=c-r,i){for(m=i<0,m?(t=l,i=-i,s=g.length):(t=g,r=c,s=l.length),n=Math.max(Math.ceil(a/I),s)+2,i>n&&(i=n,t.length=1),t.reverse(),n=i;n--;)t.push(0);t.reverse()}else{for(n=l.length,s=g.length,m=n0;--n)l[s++]=0;for(n=g.length;n>i;){if(l[--n]s?i+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=l.length,o=c.length,s-o<0&&(o=s,r=c,c=l,l=r),t=0;o;)t=(l[--o]=l[o]+c[o]+t)/Oe|0,l[o]%=Oe;for(t&&(l.unshift(t),++n),s=l.length;l[--s]==0;)l.pop();return e.d=l,e.e=bn(l,n),D?F(e,a,u):e};v.precision=v.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(st+e);return r.d?(t=oa(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};v.round=function(){var e=this,t=e.constructor;return F(new t(e),e.e+1,t.rounding)};v.sine=v.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=ap(n,ua(n,r)),n.precision=e,n.rounding=t,F(Ve>2?r.neg():r,e,t,!0)):new n(NaN)};v.squareRoot=v.sqrt=function(){var e,t,r,n,o,i,s=this,a=s.d,u=s.e,l=s.s,c=s.constructor;if(l!==1||!a||!a[0])return new c(!l||l<0&&(!a||a[0])?NaN:a?s:1/0);for(D=!1,l=Math.sqrt(+s),l==0||l==1/0?(t=ue(a),(t.length+u)%2==0&&(t+="0"),l=Math.sqrt(t),u=ce((u+1)/2)-(u<0||u%2),l==1/0?t="5e"+u:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),n=new c(t)):n=new c(l.toString()),r=(u=c.precision)+3;;)if(i=n,n=i.plus(K(s,i,r+2,1)).times(.5),ue(i.d).slice(0,r)===(t=ue(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!o&&t=="4999"){if(!o&&(F(i,u+1,0),i.times(i).eq(s))){n=i;break}r+=4,o=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(F(n,u+1,1),e=!n.times(n).eq(s));break}return D=!0,F(n,u,c.rounding,e)};v.tangent=v.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=K(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,F(Ve==2||Ve==4?r.neg():r,e,t,!0)):new n(NaN)};v.times=v.mul=function(e){var t,r,n,o,i,s,a,u,l,c=this,m=c.constructor,g=c.d,w=(e=new m(e)).d;if(e.s*=c.s,!g||!g[0]||!w||!w[0])return new m(!e.s||g&&!g[0]&&!w||w&&!w[0]&&!g?NaN:!g||!w?e.s/0:e.s*0);for(r=ce(c.e/I)+ce(e.e/I),u=g.length,l=w.length,u=0;){for(t=0,o=u+n;o>n;)a=i[o]+w[n]*g[o-n-1]+t,i[o--]=a%Oe|0,t=a/Oe|0;i[o]=(i[o]+t)%Oe|0}for(;!i[--s];)i.pop();return t?++r:i.shift(),e.d=i,e.e=bn(i,r),D?F(e,m.precision,m.rounding):e};v.toBinary=function(e,t){return Bo(this,2,e,t)};v.toDecimalPlaces=v.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(xe(e,0,at),t===void 0?t=n.rounding:xe(t,0,8),F(r,e+r.e+1,t))};v.toExponential=function(e,t){var r,n=this,o=n.constructor;return e===void 0?r=Le(n,!0):(xe(e,0,at),t===void 0?t=o.rounding:xe(t,0,8),n=F(new o(n),e+1,t),r=Le(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};v.toFixed=function(e,t){var r,n,o=this,i=o.constructor;return e===void 0?r=Le(o):(xe(e,0,at),t===void 0?t=i.rounding:xe(t,0,8),n=F(new i(o),e+o.e+1,t),r=Le(n,!1,e+n.e+1)),o.isNeg()&&!o.isZero()?"-"+r:r};v.toFraction=function(e){var t,r,n,o,i,s,a,u,l,c,m,g,w=this,E=w.d,b=w.constructor;if(!E)return new b(w);if(l=r=new b(1),n=u=new b(0),t=new b(n),i=t.e=oa(E)-w.e-1,s=i%I,t.d[0]=X(10,s<0?I+s:s),e==null)e=i>0?t:l;else{if(a=new b(e),!a.isInt()||a.lt(l))throw Error(st+a);e=a.gt(t)?i>0?t:l:a}for(D=!1,a=new b(ue(E)),c=b.precision,b.precision=i=E.length*I*2;m=K(a,t,0,1,1),o=r.plus(m.times(n)),o.cmp(e)!=1;)r=n,n=o,o=l,l=u.plus(m.times(o)),u=o,o=t,t=a.minus(m.times(o)),a=o;return o=K(e.minus(r),n,0,1,1),u=u.plus(o.times(l)),r=r.plus(o.times(n)),u.s=l.s=w.s,g=K(l,n,i,1).minus(w).abs().cmp(K(u,r,i,1).minus(w).abs())<1?[l,n]:[u,r],b.precision=c,D=!0,g};v.toHexadecimal=v.toHex=function(e,t){return Bo(this,16,e,t)};v.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:xe(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]?(D=!1,r=K(r,e,0,t,1).times(e),D=!0,F(r)):(e.s=r.s,r=e),r};v.toNumber=function(){return+this};v.toOctal=function(e,t){return Bo(this,8,e,t)};v.toPower=v.pow=function(e){var t,r,n,o,i,s,a=this,u=a.constructor,l=+(e=new u(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new u(X(+a,l));if(a=new u(a),a.eq(1))return a;if(n=u.precision,i=u.rounding,e.eq(1))return F(a,n,i);if(t=ce(e.e/I),t>=e.d.length-1&&(r=l<0?-l:l)<=np)return o=ia(u,a,r,n),e.s<0?new u(1).div(o):F(o,n,i);if(s=a.s,s<0){if(tu.maxE+1||t0?s/0:0):(D=!1,u.rounding=a.s=1,r=Math.min(12,(t+"").length),o=No(e.times(it(a,n+r)),n),o.d&&(o=F(o,n+5,1),mr(o.d,n,i)&&(t=n+10,o=F(No(e.times(it(a,t+r)),t),t+5,1),+ue(o.d).slice(n+1,n+15)+1==1e14&&(o=F(o,n+1,0)))),o.s=s,D=!0,u.rounding=i,F(o,n,i))};v.toPrecision=function(e,t){var r,n=this,o=n.constructor;return e===void 0?r=Le(n,n.e<=o.toExpNeg||n.e>=o.toExpPos):(xe(e,1,at),t===void 0?t=o.rounding:xe(t,0,8),n=F(new o(n),e,t),r=Le(n,e<=n.e||n.e<=o.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};v.toSignificantDigits=v.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(xe(e,1,at),t===void 0?t=n.rounding:xe(t,0,8)),F(new n(r),e,t)};v.toString=function(){var e=this,t=e.constructor,r=Le(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};v.truncated=v.trunc=function(){return F(new this.constructor(this),this.e+1,1)};v.valueOf=v.toJSON=function(){var e=this,t=e.constructor,r=Le(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function ue(e){var t,r,n,o=e.length-1,i="",s=e[0];if(o>0){for(i+=s,t=1;tr)throw Error(st+e)}function mr(e,t,r,n){var o,i,s,a;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=I,o=0):(o=Math.ceil((t+1)/I),t%=I),i=X(10,I-t),a=e[o]%i|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==i||r>3&&a+1==i/2)&&(e[o+1]/i/100|0)==X(10,t-2)-1||(a==i/2||a==0)&&(e[o+1]/i/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==i||!n&&r>3&&a+1==i/2)&&(e[o+1]/i/1e3|0)==X(10,t-3)-1,s}function mn(e,t,r){for(var n,o=[0],i,s=0,a=e.length;sr-1&&(o[n+1]===void 0&&(o[n+1]=0),o[n+1]+=o[n]/r|0,o[n]%=r)}return o.reverse()}function ip(e,t){var r,n,o;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),o=(1/wn(4,r)).toString()):(r=16,o="2.3283064365386962890625e-10"),e.precision+=r,t=Vt(e,1,t.times(o),new e(1));for(var i=r;i--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var K=function(){function e(n,o,i){var s,a=0,u=n.length;for(n=n.slice();u--;)s=n[u]*o+a,n[u]=s%i|0,a=s/i|0;return a&&n.unshift(a),n}function t(n,o,i,s){var a,u;if(i!=s)u=i>s?1:-1;else for(a=u=0;ao[a]?1:-1;break}return u}function r(n,o,i,s){for(var a=0;i--;)n[i]-=a,a=n[i]1;)n.shift()}return function(n,o,i,s,a,u){var l,c,m,g,w,E,b,T,S,R,C,M,N,L,Te,V,H,we,z,Ee,Je=n.constructor,$=n.s==o.s?1:-1,U=n.d,O=o.d;if(!U||!U[0]||!O||!O[0])return new Je(!n.s||!o.s||(U?O&&U[0]==O[0]:!O)?NaN:U&&U[0]==0||!O?$*0:$/0);for(u?(w=1,c=n.e-o.e):(u=Oe,w=I,c=ce(n.e/w)-ce(o.e/w)),z=O.length,H=U.length,S=new Je($),R=S.d=[],m=0;O[m]==(U[m]||0);m++);if(O[m]>(U[m]||0)&&c--,i==null?(L=i=Je.precision,s=Je.rounding):a?L=i+(n.e-o.e)+1:L=i,L<0)R.push(1),E=!0;else{if(L=L/w+2|0,m=0,z==1){for(g=0,O=O[0],L++;(m1&&(O=e(O,g,u),U=e(U,g,u),z=O.length,H=U.length),V=z,C=U.slice(0,z),M=C.length;M=u/2&&++we;do g=0,l=t(O,C,z,M),l<0?(N=C[0],z!=M&&(N=N*u+(C[1]||0)),g=N/we|0,g>1?(g>=u&&(g=u-1),b=e(O,g,u),T=b.length,M=C.length,l=t(b,C,T,M),l==1&&(g--,r(b,z=10;g/=10)m++;S.e=m+c*w-1,F(S,a?i+S.e+1:i,s,E)}return S}}();function F(e,t,r,n){var o,i,s,a,u,l,c,m,g,w=e.constructor;e:if(t!=null){if(m=e.d,!m)return e;for(o=1,a=m[0];a>=10;a/=10)o++;if(i=t-o,i<0)i+=I,s=t,c=m[g=0],u=c/X(10,o-s-1)%10|0;else if(g=Math.ceil((i+1)/I),a=m.length,g>=a)if(n){for(;a++<=g;)m.push(0);c=u=0,o=1,i%=I,s=i-I+1}else break e;else{for(c=a=m[g],o=1;a>=10;a/=10)o++;i%=I,s=i-I+o,u=s<0?0:c/X(10,o-s-1)%10|0}if(n=n||t<0||m[g+1]!==void 0||(s<0?c:c%X(10,o-s-1)),l=r<4?(u||n)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||n||r==6&&(i>0?s>0?c/X(10,o-s):0:m[g-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,l?(t-=e.e+1,m[0]=X(10,(I-t%I)%I),e.e=-t||0):m[0]=e.e=0,e;if(i==0?(m.length=g,a=1,g--):(m.length=g+1,a=X(10,I-i),m[g]=s>0?(c/X(10,o-s)%X(10,s)|0)*a:0),l)for(;;)if(g==0){for(i=1,s=m[0];s>=10;s/=10)i++;for(s=m[0]+=a,a=1;s>=10;s/=10)a++;i!=a&&(e.e++,m[0]==Oe&&(m[0]=1));break}else{if(m[g]+=a,m[g]!=Oe)break;m[g--]=0,a=1}for(i=m.length;m[--i]===0;)m.pop()}return D&&(e.e>w.maxE?(e.d=null,e.e=NaN):e.e0?i=i.charAt(0)+"."+i.slice(1)+ot(n):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):o<0?(i="0."+ot(-o-1)+i,r&&(n=r-s)>0&&(i+=ot(n))):o>=s?(i+=ot(o+1-s),r&&(n=r-o-1)>0&&(i=i+"."+ot(n))):((n=o+1)0&&(o+1===s&&(i+="."),i+=ot(n))),i}function bn(e,t){var r=e[0];for(t*=I;r>=10;r/=10)t++;return t}function hn(e,t,r){if(t>op)throw D=!0,r&&(e.precision=r),Error(ea);return F(new e(gn),t,1,!0)}function Re(e,t,r){if(t>_o)throw Error(ea);return F(new e(yn),t,r,!0)}function oa(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 ot(e){for(var t="";e--;)t+="0";return t}function ia(e,t,r,n){var o,i=new e(1),s=Math.ceil(n/I+4);for(D=!1;;){if(r%2&&(i=i.times(t),Zs(i.d,s)&&(o=!0)),r=ce(r/2),r===0){r=i.d.length-1,o&&i.d[r]===0&&++i.d[r];break}t=t.times(t),Zs(t.d,s)}return D=!0,i}function zs(e){return e.d[e.d.length-1]&1}function sa(e,t,r){for(var n,o=new e(t[0]),i=0;++i17)return new g(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:0/0);for(t==null?(D=!1,u=E):u=t,a=new g(.03125);e.e>-2;)e=e.times(a),m+=5;for(n=Math.log(X(2,m))/Math.LN10*2+5|0,u+=n,r=i=s=new g(1),g.precision=u;;){if(i=F(i.times(e),u,1),r=r.times(++c),a=s.plus(K(i,r,u,1)),ue(a.d).slice(0,u)===ue(s.d).slice(0,u)){for(o=m;o--;)s=F(s.times(s),u,1);if(t==null)if(l<3&&mr(s.d,u-n,w,l))g.precision=u+=10,r=i=a=new g(1),c=0,l++;else return F(s,g.precision=E,w,D=!0);else return g.precision=E,s}s=a}}function it(e,t){var r,n,o,i,s,a,u,l,c,m,g,w=1,E=10,b=e,T=b.d,S=b.constructor,R=S.rounding,C=S.precision;if(b.s<0||!T||!T[0]||!b.e&&T[0]==1&&T.length==1)return new S(T&&!T[0]?-1/0:b.s!=1?NaN:T?0:b);if(t==null?(D=!1,c=C):c=t,S.precision=c+=E,r=ue(T),n=r.charAt(0),Math.abs(i=b.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=ue(b.d),n=r.charAt(0),w++;i=b.e,n>1?(b=new S("0."+r),i++):b=new S(n+"."+r.slice(1))}else return l=hn(S,c+2,C).times(i+""),b=it(new S(n+"."+r.slice(1)),c-E).plus(l),S.precision=C,t==null?F(b,C,R,D=!0):b;for(m=b,u=s=b=K(b.minus(1),b.plus(1),c,1),g=F(b.times(b),c,1),o=3;;){if(s=F(s.times(g),c,1),l=u.plus(K(s,new S(o),c,1)),ue(l.d).slice(0,c)===ue(u.d).slice(0,c))if(u=u.times(2),i!==0&&(u=u.plus(hn(S,c+2,C).times(i+""))),u=K(u,new S(w),c,1),t==null)if(mr(u.d,c-E,R,a))S.precision=c+=E,l=s=b=K(m.minus(1),m.plus(1),c,1),g=F(b.times(b),c,1),o=a=1;else return F(u,S.precision=C,R,D=!0);else return S.precision=C,u;u=l,o+=2}}function aa(e){return String(e.s*e.s/0)}function Lo(e,t){var r,n,o;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(o=t.length;t.charCodeAt(o-1)===48;--o);if(t=t.slice(n,o),t){if(o-=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"),na.test(t))return Lo(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(tp.test(t))r=16,t=t.toLowerCase();else if(ep.test(t))r=2;else if(rp.test(t))r=8;else throw Error(st+t);for(i=t.search(/p/i),i>0?(u=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),i=t.indexOf("."),s=i>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,i=a-i,o=ia(n,new n(r),i,i*2)),l=mn(t,r,Oe),c=l.length-1,i=c;l[i]===0;--i)l.pop();return i<0?new n(e.s*0):(e.e=bn(l,c),e.d=l,D=!1,s&&(e=K(e,o,a*4)),u&&(e=e.times(Math.abs(u)<54?X(2,u):wt.pow(2,u))),D=!0,e)}function ap(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:Vt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/wn(5,r)),t=Vt(e,2,t,t);for(var o,i=new e(5),s=new e(16),a=new e(20);r--;)o=t.times(t),t=t.times(i.plus(o.times(s.times(o).minus(a))));return t}function Vt(e,t,r,n,o){var i,s,a,u,l=1,c=e.precision,m=Math.ceil(c/I);for(D=!1,u=r.times(r),a=new e(n);;){if(s=K(a.times(u),new e(t++*t++),c,1),a=o?n.plus(s):n.minus(s),n=K(s.times(u),new e(t++*t++),c,1),s=a.plus(n),s.d[m]!==void 0){for(i=m;s.d[i]===a.d[i]&&i--;);if(i==-1)break}i=a,a=n,n=s,s=i,l++}return D=!0,s.d.length=m+1,s}function wn(e,t){for(var r=e;--t;)r*=e;return r}function ua(e,t){var r,n=t.s<0,o=Re(e,e.precision,1),i=o.times(.5);if(t=t.abs(),t.lte(i))return Ve=n?4:1,t;if(r=t.divToInt(o),r.isZero())Ve=n?3:2;else{if(t=t.minus(r.times(o)),t.lte(i))return Ve=zs(r)?n?2:3:n?4:1,t;Ve=zs(r)?n?1:4:n?3:2}return t.minus(o).abs()}function Bo(e,t,r,n){var o,i,s,a,u,l,c,m,g,w=e.constructor,E=r!==void 0;if(E?(xe(r,1,at),n===void 0?n=w.rounding:xe(n,0,8)):(r=w.precision,n=w.rounding),!e.isFinite())c=aa(e);else{for(c=Le(e),s=c.indexOf("."),E?(o=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):o=t,s>=0&&(c=c.replace(".",""),g=new w(1),g.e=c.length-s,g.d=mn(Le(g),10,o),g.e=g.d.length),m=mn(c,10,o),i=u=m.length;m[--u]==0;)m.pop();if(!m[0])c=E?"0p+0":"0";else{if(s<0?i--:(e=new w(e),e.d=m,e.e=i,e=K(e,g,r,n,0,o),m=e.d,i=e.e,l=Xs),s=m[r],a=o/2,l=l||m[r+1]!==void 0,l=n<4?(s!==void 0||l)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||l||n===6&&m[r-1]&1||n===(e.s<0?8:7)),m.length=r,l)for(;++m[--r]>o-1;)m[r]=0,r||(++i,m.unshift(1));for(u=m.length;!m[u-1];--u);for(s=0,c="";s1)if(t==16||t==8){for(s=t==16?4:3,--u;u%s;u++)c+="0";for(m=mn(c,o,t),u=m.length;!m[u-1];--u);for(s=1,c="1.";su)for(i-=u;i--;)c+="0";else it)return e.length=t,!0}function up(e){return new this(e).abs()}function lp(e){return new this(e).acos()}function cp(e){return new this(e).acosh()}function pp(e,t){return new this(e).plus(t)}function fp(e){return new this(e).asin()}function dp(e){return new this(e).asinh()}function mp(e){return new this(e).atan()}function gp(e){return new this(e).atanh()}function yp(e,t){e=new this(e),t=new this(t);var r,n=this.precision,o=this.rounding,i=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=Re(this,i,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?Re(this,n,o):new this(0),r.s=e.s):!e.d||t.isZero()?(r=Re(this,i,1).times(.5),r.s=e.s):t.s<0?(this.precision=i,this.rounding=1,r=this.atan(K(e,t,i,1)),t=Re(this,i,1),this.precision=n,this.rounding=o,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(K(e,t,i,1)),r}function hp(e){return new this(e).cbrt()}function xp(e){return F(e=new this(e),e.e+1,2)}function bp(e,t,r){return new this(e).clamp(t,r)}function wp(e){if(!e||typeof e!="object")throw Error(xn+"Object expected");var t,r,n,o=e.defaults===!0,i=["precision",1,at,"rounding",0,8,"toExpNeg",-qt,0,"toExpPos",0,qt,"maxE",0,qt,"minE",-qt,0,"modulo",0,9];for(t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(st+r+": "+n);if(r="crypto",o&&(this[r]=Do[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(ta);else this[r]=!1;else throw Error(st+r+": "+n);return this}function Ep(e){return new this(e).cos()}function Pp(e){return new this(e).cosh()}function la(e){var t,r,n;function o(i){var s,a,u,l=this;if(!(l instanceof o))return new o(i);if(l.constructor=o,Ys(i)){l.s=i.s,D?!i.d||i.e>o.maxE?(l.e=NaN,l.d=null):i.e=10;a/=10)s++;D?s>o.maxE?(l.e=NaN,l.d=null):s=429e7?t[i]=crypto.getRandomValues(new Uint32Array(1))[0]:a[i++]=o%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);i=214e7?crypto.randomBytes(4).copy(t,i):(a.push(o%1e7),i+=4);i=n/4}else throw Error(ta);else for(;i=10;o/=10)n++;n`}};function Gt(e){return e instanceof gr}d();p();f();d();p();f();var En=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};d();p();f();var Pn=e=>e,vn={bold:Pn,red:Pn,green:Pn,dim:Pn,enabled:!1},ca={bold:Xe,red:_t,green:rn,dim:tn,enabled:!0},Jt={write(e){e.writeLine(",")}};d();p();f();var Be=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)))})}};d();p();f();var ut=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Qt=class extends ut{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new En(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 Be("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Jt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}};d();p();f();var pa=": ",An=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()+pa.length}write(t){let r=new Be(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(pa).write(this.value)}};d();p();f();var re=class e extends ut{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,...o]=r,i=this.getField(n);if(!i)return;let s=i;for(let a of o){let u;if(s.value instanceof e?u=s.value.getField(a):s.value instanceof Qt&&(u=s.value.getField(Number(a))),!u)return;s=u}return s}getDeepFieldValue(r){var n;return r.length===0?this:(n=this.getDeepField(r))==null?void 0:n.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){var n;return(n=this.getField(r))==null?void 0:n.value}getDeepSubSelectionValue(r){let n=this;for(let o of r){if(!(n instanceof e))return;let i=n.getSubSelectionValue(o);if(!i)return;n=i}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let o=n;for(let i of r){let s=o.value.getFieldValue(i);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;o=a}return o}getSelectionParent(){let r=this.getField("select");if((r==null?void 0:r.value)instanceof e)return{kind:"select",value:r.value};let n=this.getField("include");if((n==null?void 0:n.value)instanceof e)return{kind:"include",value:n.value}}getSubSelectionValue(r){var n;return(n=this.getSelectionParent())==null?void 0:n.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(o=>o.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)}writeEmpty(r){let n=new Be("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(Jt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};d();p();f();var ne=class extends ut{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Be(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}};var jo=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 Tn(e){return new jo(fa(e))}function fa(e){let t=new re;for(let[r,n]of Object.entries(e)){let o=new An(r,da(n));t.addField(o)}return t}function da(e){if(typeof e=="string")return new ne(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new ne(String(e));if(typeof e=="bigint")return new ne(`${e}n`);if(e===null)return new ne("null");if(e===void 0)return new ne("undefined");if(Kt(e))return new ne(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return x.Buffer.isBuffer(e)?new ne(`Buffer.alloc(${e.byteLength})`):new ne(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=dn(e)?e.toISOString():"Invalid Date";return new ne(`new Date("${t}")`)}return e instanceof qe?new ne(`Prisma.${e._getName()}`):Gt(e)?new ne(`prisma.${Qi(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Wp(e):typeof e=="object"?fa(e):new ne(Object.prototype.toString.call(e))}function Wp(e){let t=new Qt;for(let r of e)t.addItem(da(r));return t}function ma(e){if(e===void 0)return"";let t=Tn(e);return new Ut(0,{colors:vn}).write(t).toString()}d();p();f();d();p();f();d();p();f();d();p();f();d();p();f();var yr="";function ga(e){var t=e.split(` -`);return t.reduce(function(r,n){var o=Zp(n)||Xp(n)||rf(n)||af(n)||of(n);return o&&r.push(o),r},[])}var Hp=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,zp=/\((\S*)(?::(\d+))(?::(\d+))\)/;function Zp(e){var t=Hp.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,o=zp.exec(t[2]);return n&&o!=null&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]),{file:r?null:t[2],methodName:t[1]||yr,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var Yp=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Xp(e){var t=Yp.exec(e);return t?{file:t[2],methodName:t[1]||yr,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var ef=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,tf=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function rf(e){var t=ef.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=tf.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||yr,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var nf=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function of(e){var t=nf.exec(e);return t?{file:t[3],methodName:t[1]||yr,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var sf=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function af(e){var t=sf.exec(e);return t?{file:t[2],methodName:t[1]||yr,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Uo=class{getLocation(){return null}},$o=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=ga(t).find(o=>{if(!o.file)return!1;let i=vo(o.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/")&&!o.methodName.includes("new ")&&!o.methodName.includes("getCallSite")&&!o.methodName.includes("Proxy.")&&o.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function lt(e){return e==="minimal"?new Uo:new $o}d();p();f();d();p();f();d();p();f();var ya={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Wt(e={}){let t=lf(e);return Object.entries(t).reduce((n,[o,i])=>(ya[o]!==void 0?n.select[o]={select:i}:n[o]=i,n),{select:{}})}function lf(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Cn(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ha(e,t){let r=Cn(e);return t({action:"aggregate",unpacker:r,argsMapper:Wt})(e)}d();p();f();function cf(e={}){let{select:t,...r}=e;return typeof t=="object"?Wt({...r,_count:t}):Wt({...r,_count:{_all:!0}})}function pf(e={}){return typeof e.select=="object"?t=>Cn(e)(t)._count:t=>Cn(e)(t)._count._all}function xa(e,t){return t({action:"count",unpacker:pf(e),argsMapper:cf})(e)}d();p();f();function ff(e={}){let t=Wt(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 df(e={}){return t=>(typeof(e==null?void 0:e._count)=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function ba(e,t){return t({action:"groupBy",unpacker:df(e),argsMapper:ff})(e)}function wa(e,t,r){if(t==="aggregate")return n=>ha(n,r);if(t==="count")return n=>xa(n,r);if(t==="groupBy")return n=>ba(n,r)}d();p();f();function Ea(e,t){let r=t.fields.filter(o=>!o.relationName),n=Mo(r,o=>o.name);return new Proxy({},{get(o,i){if(i in o||typeof i=="symbol")return o[i];let s=n[i];if(s)return new gr(e,i,s.type,s.isList,s.kind==="enum")},...fn(Object.keys(n))})}d();p();f();d();p();f();var Pa=e=>Array.isArray(e)?e:e.split("."),qo=(e,t)=>Pa(t).reduce((r,n)=>r&&r[n],e),va=(e,t,r)=>Pa(t).reduceRight((n,o,i,s)=>Object.assign({},qo(e,s.slice(0,i)),{[o]:n}),r);function mf(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function gf(e,t,r){return t===void 0?e!=null?e:{}:va(t,r,e||!0)}function Vo(e,t,r,n,o,i){let a=e._runtimeDataModel.models[t].fields.reduce((u,l)=>({...u,[l.name]:l}),{});return u=>{let l=lt(e._errorFormat),c=mf(n,o),m=gf(u,i,c),g=r({dataPath:c,callsite:l})(m),w=yf(e,t);return new Proxy(g,{get(E,b){if(!w.includes(b))return E[b];let S=[a[b].type,r,b],R=[c,m];return Vo(e,...S,...R)},...fn([...w,...Object.getOwnPropertyNames(g)])})}}function yf(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}d();p();f();d();p();f();var Sa=Pe(_s());d();p();f();wo();d();p();f();d();p();f();d();p();f();var Aa={keyword:et,entity:et,value:e=>Xe(Nt(e)),punctuation:Nt,directive:et,function:et,variable:e=>Xe(Nt(e)),string:e=>Xe(rn(e)),boolean:nn,number:et,comment:on};var hf=e=>e,Mn={},xf=0,_={manual:Mn.Prism&&Mn.Prism.manual,disableWorkerMessageHandler:Mn.Prism&&Mn.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof Fe){let t=e;return new Fe(t.type,_.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(_.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(we instanceof Fe)continue;if(N&&V!=t.length-1){R.lastIndex=H;var m=R.exec(e);if(!m)break;var c=m.index+(M?m[1].length:0),g=m.index+m[0].length,a=V,u=H;for(let O=t.length;a=u&&(++V,H=u);if(t[V]instanceof Fe)continue;l=a-V,we=e.slice(H,u),m.index-=H}else{R.lastIndex=0;var m=R.exec(we),l=1}if(!m){if(i)break;continue}M&&(L=m[1]?m[1].length:0);var c=m.index+L,m=m[0].slice(L),g=c+m.length,w=we.slice(0,c),E=we.slice(g);let z=[V,l];w&&(++V,H+=w.length,z.push(w));let Ee=new Fe(b,C?_.tokenize(m,C):m,Te,m,N);if(z.push(Ee),E&&z.push(E),Array.prototype.splice.apply(t,z),l!=1&&_.matchGrammar(e,t,r,V,H,!0,b),i)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let o in n)t[o]=n[o];delete t.rest}return _.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=_.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=_.hooks.all[e];if(!(!r||!r.length))for(var n=0,o;o=r[n++];)o(t)}},Token:Fe};_.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:/[{}[\];(),.:]/};_.languages.javascript=_.languages.extend("clike",{"class-name":[_.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}/});_.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;_.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:_.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:_.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:_.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:_.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});_.languages.markup&&_.languages.markup.tag.addInlined("script","javascript");_.languages.js=_.languages.javascript;_.languages.typescript=_.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/});_.languages.ts=_.languages.typescript;function Fe(e,t,r,n,o){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!o}Fe.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return Fe.stringify(r,t)}).join(""):bf(e.type)(e.content)};function bf(e){return Aa[e]||hf}function Ta(e){return wf(e,_.languages.javascript)}function wf(e,t){return _.tokenize(e,t).map(n=>Fe.stringify(n)).join("")}d();p();f();var Ca=Pe(Fs());function Ma(e){return(0,Ca.default)(e)}var Sn=class e{static read(t){let r;try{r=sn.readFileSync(t,"utf-8")}catch(n){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,o=[...this.lines];return o[n]=r(o[n]),new e(this.firstLineNumber,o)}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,o)=>o===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` -`);return new e(t,Ma(n).split(` -`))}highlight(){let t=Ta(this.toString());return new e(this.firstLineNumber,t.split(` -`))}toString(){return this.lines.join(` -`)}};var Ef={red:_t,gray:on,dim:tn,bold:Xe,underline:As,highlightSource:e=>e.highlight()},Pf={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function vf({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:o},i){var m;let s={functionName:`prisma.${r}()`,message:t,isPanic:n!=null?n:!1,callArguments:o};if(!e||typeof window!="undefined"||y.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let u=Math.max(1,a.lineNumber-3),l=(m=Sn.read(a.fileName))==null?void 0:m.slice(u,a.lineNumber),c=l==null?void 0:l.lineAt(a.lineNumber);if(l&&c){let g=Tf(c),w=Af(c);if(!w)return s;s.functionName=`${w.code})`,s.location=a,n||(l=l.mapLineAt(a.lineNumber,b=>b.slice(0,w.openingBraceIndex))),l=i.highlightSource(l);let E=String(l.lastLineNumber).length;if(s.contextLines=l.mapLines((b,T)=>i.gray(String(T).padStart(E))+" "+b).mapLines(b=>i.dim(b)).prependSymbolAt(a.lineNumber,i.bold(i.red("\u2192"))),o){let b=g+E+1;b+=2,s.callArguments=(0,Sa.default)(o,b).slice(b)}}return s}function Af(e){let t=Object.keys(Me.ModelAction).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let o=n.index+n[0].length,i=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(i,o),openingBraceIndex:o}}return null}function Tf(e){let t=0;for(let r=0;r{if("rejectOnNotFound"in n.args){let i=Ht({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new me(i,{clientVersion:t})}return await r(n).catch(i=>{throw i instanceof de&&i.code==="P2025"?new tt(`No ${e} found`,t):i})}}d();p();f();function je(e){return e.replace(/^./,t=>t.toLowerCase())}var Rf=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Of=["aggregate","count","groupBy"];function Ko(e,t){var o;let r=(o=e._extensions.getAllModelExtensions(t))!=null?o:{},n=[Ff(e,t),kf(e,t),fr(r),ge("name",()=>t),ge("$name",()=>t),ge("$parent",()=>e._appliedParent)];return Ne({},n)}function Ff(e,t){let r=je(t),n=Object.keys(Me.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(o){let i=o,s=u=>e._request(u);s=Ra(i,t,e._clientVersion,s);let a=u=>l=>{let c=lt(e._errorFormat);return e._createPrismaPromise(m=>{let g={args:l,dataPath:[],action:i,model:t,clientMethod:`${r}.${o}`,jsModelName:r,transaction:m,callsite:c};return s({...g,...u})})};return Rf.includes(i)?Vo(e,t,a):If(o)?wa(e,o,a):a({})}}}function If(e){return Of.includes(e)}function kf(e,t){return bt(ge("fields",()=>{let r=e._runtimeDataModel.models[t];return Ea(t,r)}))}d();p();f();function Oa(e){return e.replace(/^./,t=>t.toUpperCase())}var Go=Symbol();function hr(e){let t=[Df(e),ge(Go,()=>e),ge("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(fr(r)),Ne(e,t)}function Df(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(je),n=[...new Set(t.concat(r))];return bt({getKeys(){return n},getPropertyValue(o){let i=Oa(o);if(e._runtimeDataModel.models[i]!==void 0)return Ko(e,i);if(e._runtimeDataModel.models[o]!==void 0)return Ko(e,o)},getPropertyDescriptor(o){if(!r.includes(o))return{enumerable:!1}}})}function Rn(e){return e[Go]?e[Go]:e}function Fa(e){if(typeof e=="function")return e(this);let t=Rn(this),r=Object.create(t,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return hr(r)}d();p();f();d();p();f();function Ia({result:e,modelName:t,select:r,extensions:n}){let o=n.getAllComputedFields(t);if(!o)return e;let i=[],s=[];for(let a of Object.values(o)){if(r){if(!r[a.name])continue;let u=a.needs.filter(l=>!r[l]);u.length>0&&s.push(dr(u))}_f(e,a.needs)&&i.push(Nf(a,Ne(e,i)))}return i.length>0||s.length>0?Ne(e,[...i,...s]):e}function _f(e,t){return t.every(r=>Co(e,r))}function Nf(e,t){return bt(ge(e.name,()=>e.compute(t)))}d();p();f();function On({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:o}){var s;if(Array.isArray(t)){for(let a=0;ac.name===i);if(!u||u.kind!=="object"||!u.relationName)continue;let l=typeof s=="object"?s:{};t[i]=On({visitor:o,result:t[i],args:l,modelName:u.type,runtimeDataModel:n})}}function Da({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:o}){return n.isEmpty()||e==null||typeof e!="object"||!o.models[t]?e:On({result:e,args:r!=null?r:{},modelName:t,runtimeDataModel:o,visitor:(s,a,u)=>Ia({result:s,modelName:je(a),select:u.select,extensions:n})})}d();p();f();d();p();f();function _a(e){if(e instanceof Ae)return Lf(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{var s,a;let i=t.customDataProxyFetch;return"transaction"in t&&o!==void 0&&(((s=t.transaction)==null?void 0:s.kind)==="batch"&&t.transaction.lock.then(),t.transaction=o),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:_a((a=t.args)!=null?a:{}),__internalParams:t,query:(u,l=t)=>{let c=l.customDataProxyFetch;return l.customDataProxyFetch=$a(i,c),l.args=u,La(e,l,r,n+1)}})})}function Ba(e,t){let{jsModelName:r,action:n,clientMethod:o}=t,i=r?n:o;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r!=null?r:"$none",i);return La(e,t,s)}function ja(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Ua(r,n,0,e):e(r)}}function Ua(e,t,r,n){if(r===t.length)return n(e);let o=e.customDataProxyFetch,i=e.requests[0].transaction;return t[r]({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,a=e){let u=a.customDataProxyFetch;return a.customDataProxyFetch=$a(o,u),Ua(a,t,r+1,n)}})}var Na=e=>e;function $a(e=Na,t=Na){return r=>e(t(r))}d();p();f();d();p();f();function Va(e,t,r){let n=je(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Bf({...e,...qa(t.name,e,t.result.$allModels),...qa(t.name,e,t.result[n])})}function Bf(e){let t=new _e,r=(n,o)=>t.getOrCreate(n,()=>o.has(n)?[n]:(o.add(n),e[n]?e[n].needs.flatMap(i=>r(i,o)):[n]));return jt(e,n=>({...n,needs:r(n.name,new Set)}))}function qa(e,t,r){return r?jt(r,({needs:n,compute:o},i)=>({name:i,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:jf(t,i,o)})):{}}function jf(e,t,r){var o;let n=(o=e==null?void 0:e[t])==null?void 0:o.compute;return n?i=>r({...i,[t]:n(i)}):r}function Ka(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let o of n.needs)r[o]=!0;return r}var Fn=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new _e;this.modelExtensionsCache=new _e;this.queryCallbacksCache=new _e;this.clientExtensions=ar(()=>{var t,r;return this.extension.client?{...(r=this.previous)==null?void 0:r.getAllClientExtensions(),...this.extension.client}:(t=this.previous)==null?void 0:t.getAllClientExtensions()});this.batchCallbacks=ar(()=>{var n,o,i;let t=(o=(n=this.previous)==null?void 0:n.getAllBatchQueryCallbacks())!=null?o:[],r=(i=this.extension.query)==null?void 0:i.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>{var r;return Va((r=this.previous)==null?void 0:r.getAllComputedFields(t),this.extension,t)})}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{var n,o;let r=je(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?(n=this.previous)==null?void 0:n.getAllModelExtensions(t):{...(o=this.previous)==null?void 0:o.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{var s,a;let n=(a=(s=this.previous)==null?void 0:s.getAllQueryCallbacks(t,r))!=null?a:[],o=[],i=this.extension.query;return!i||!(i[t]||i.$allModels||i[r]||i.$allOperations)?n:(i[t]!==void 0&&(i[t][r]!==void 0&&o.push(i[t][r]),i[t].$allOperations!==void 0&&o.push(i[t].$allOperations)),t!=="$none"&&i.$allModels!==void 0&&(i.$allModels[r]!==void 0&&o.push(i.$allModels[r]),i.$allModels.$allOperations!==void 0&&o.push(i.$allModels.$allOperations)),i[r]!==void 0&&o.push(i[r]),i.$allOperations!==void 0&&o.push(i.$allOperations),n.concat(o))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},In=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Fn(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Fn(t,this.head))}getAllComputedFields(t){var r;return(r=this.head)==null?void 0:r.getAllComputedFields(t)}getAllClientExtensions(){var t;return(t=this.head)==null?void 0:t.getAllClientExtensions()}getAllModelExtensions(t){var r;return(r=this.head)==null?void 0:r.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){var n,o;return(o=(n=this.head)==null?void 0:n.getAllQueryCallbacks(t,r))!=null?o:[]}getAllBatchQueryCallbacks(){var t,r;return(r=(t=this.head)==null?void 0:t.getAllBatchQueryCallbacks())!=null?r:[]}};d();p();f();var Ga=he("prisma:client"),Ja={Vercel:"vercel","Netlify CI":"netlify"};function Qa({postinstall:e,ciName:t,clientVersion:r}){if(Ga("checkPlatformCaching:postinstall",e),Ga("checkPlatformCaching:ciName",t),e===!0&&t&&t in Ja){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. +var Hs=Object.create;var Qr=Object.defineProperty;var Ws=Object.getOwnPropertyDescriptor;var Ks=Object.getOwnPropertyNames;var zs=Object.getPrototypeOf,Ys=Object.prototype.hasOwnProperty;var Hr=(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 Te=(e,t)=>()=>(e&&(t=e(e=0)),t);var Fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wr=(e,t)=>{for(var r in t)Qr(e,r,{get:t[r],enumerable:!0})},Zs=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ks(t))!Ys.call(e,i)&&i!==r&&Qr(e,i,{get:()=>t[i],enumerable:!(n=Ws(t,i))||n.enumerable});return e};var _e=(e,t,r)=>(r=e!=null?Hs(zs(e)):{},Zs(t||!e||!e.__esModule?Qr(r,"default",{value:e,enumerable:!0}):r,e));var y,c=Te(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var b,p=Te(()=>{"use strict";b=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,m=Te(()=>{"use strict";E=()=>{};E.prototype=E});var d=Te(()=>{"use strict"});var ci=Fe(ze=>{"use strict";f();c();p();m();d();var zn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Xs=zn(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=C.indexOf("=");M===-1&&(M=R);var F=M===R?0:4-M%4;return[M,F]}function l(C){var R=a(C),M=R[0],F=R[1];return(M+F)*3/4-F}function u(C,R,M){return(R+M)*3/4-M}function g(C){var R,M=a(C),F=M[0],B=M[1],D=new n(u(C,F,B)),O=0,oe=B>0?F-4:F,G;for(G=0;G>16&255,D[O++]=R>>8&255,D[O++]=R&255;return B===2&&(R=r[C.charCodeAt(G)]<<2|r[C.charCodeAt(G+1)]>>4,D[O++]=R&255),B===1&&(R=r[C.charCodeAt(G)]<<10|r[C.charCodeAt(G+1)]<<4|r[C.charCodeAt(G+2)]>>2,D[O++]=R>>8&255,D[O++]=R&255),D}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function v(C,R,M){for(var F,B=[],D=R;Doe?oe:O+D));return F===1?(R=C[M-1],B.push(t[R>>2]+t[R<<4&63]+"==")):F===2&&(R=(C[M-2]<<8)+C[M-1],B.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),B.join("")}}),ea=zn(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,C=t[r+v];for(v+=S,s=C&(1<<-h)-1,C>>=-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:(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,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+C]=l&255,C+=R,l/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=R,a/=256,g-=8);t[n+C-R]|=M*128}}),Kr=Xs(),We=ea(),Qn=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.Buffer=T;ze.SlowBuffer=sa;ze.INSPECT_MAX_BYTES=50;var or=2147483647;ze.kMaxLength=or;T.TYPED_ARRAY_SUPPORT=ta();!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 ta(){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 we(e){if(e>or)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 Zr(e)}return Yn(e,t,r)}T.poolSize=8192;function Yn(e,t,r){if(typeof e=="string")return na(e,t);if(ArrayBuffer.isView(e))return ia(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(me(e,ArrayBuffer)||e&&me(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(e,SharedArrayBuffer)||e&&me(e.buffer,SharedArrayBuffer)))return Xn(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=oa(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 Yn(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function Zn(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 ra(e,t,r){return Zn(e),e<=0?we(e):t!==void 0?typeof r=="string"?we(e).fill(t,r):we(e).fill(t):we(e)}T.alloc=function(e,t,r){return ra(e,t,r)};function Zr(e){return Zn(e),we(e<0?0:Xr(e)|0)}T.allocUnsafe=function(e){return Zr(e)};T.allocUnsafeSlow=function(e){return Zr(e)};function na(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=ei(e,t)|0,n=we(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function zr(e){let t=e.length<0?0:Xr(e.length)|0,r=we(t);for(let n=0;n=or)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+or.toString(16)+" bytes");return e|0}function sa(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(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),me(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 ei(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||me(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 Yr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return ui(e).length;default:if(i)return n?-1:Yr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=ei;function aa(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 ya(this,t,r);case"utf8":case"utf-8":return ri(this,t,r);case"ascii":return ga(this,t,r);case"latin1":case"binary":return ha(this,t,r);case"base64":return da(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wa(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Le(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+=" ... "),""};Qn&&(T.prototype[Qn]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(me(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,tn(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:Hn(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):Hn(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Hn(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 la(this,e,t,r);case"utf8":case"utf-8":return ua(this,e,t,r);case"ascii":case"latin1":case"binary":return ca(this,e,t,r);case"base64":return pa(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 da(e,t,r){return t===0&&r===e.length?Kr.fromByteArray(e):Kr.fromByteArray(e.slice(t,r))}function ri(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 Wn=4096;function fa(e){let t=e.length;if(t<=Wn)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=Ae(function(e){e=e>>>0,Ke(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(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,Ke(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(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=Ae(function(e){e=e>>>0,Ke(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(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,Ke(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(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),We.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||H(e,4,this.length),We.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||H(e,8,this.length),We.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||H(e,8,this.length),We.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 ni(e,t,r,n,i){li(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 ii(e,t,r,n,i){li(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=Ae(function(e,t=0){return ni(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Ae(function(e,t=0){return ii(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=Ae(function(e,t=0){return ni(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Ae(function(e,t=0){return ii(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function oi(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 si(e,t,r,n,i){return t=+t,r=r>>>0,i||oi(e,t,r,4,34028234663852886e22,-34028234663852886e22),We.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return si(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return si(this,e,t,!1,r)};function ai(e,t,r,n,i){return t=+t,r=r>>>0,i||oi(e,t,r,8,17976931348623157e292,-17976931348623157e292),We.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return ai(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return ai(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=Kn(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Kn(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function Kn(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 Ea(e,t,r){Ke(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Et(t,e.length-(r+1))}function li(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 He.ERR_OUT_OF_RANGE("value",a,e)}Ea(n,i,o)}function Ke(e,t){if(typeof e!="number")throw new He.ERR_INVALID_ARG_TYPE(t,"number",e)}function Et(e,t,r){throw Math.floor(e)!==e?(Ke(e,r),new He.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new He.ERR_BUFFER_OUT_OF_BOUNDS:new He.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var ba=/[^+/0-9A-Za-z-_]/g;function xa(e){if(e=e.split("=")[0],e=e.trim().replace(ba,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Yr(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 Pa(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function ui(e){return Kr.toByteArray(xa(e))}function sr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function me(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function tn(e){return e!==e}var Ta=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 Ae(e){return typeof BigInt>"u"?Aa:e}function Aa(){throw new Error("BigInt not supported")}});var w,f=Te(()=>{"use strict";w=_e(ci())});function Ca(){return!1}var Ra,Sa,hi,yi=Te(()=>{"use strict";f();c();p();m();d();Ra={},Sa={existsSync:Ca,promises:Ra},hi=Sa});function Na(...e){return e.join("/")}function Fa(...e){return e.join("/")}var Di,_a,La,xt,Mi=Te(()=>{"use strict";f();c();p();m();d();Di="/",_a={sep:Di},La={resolve:Na,posix:_a,join:Fa,sep:Di},xt=La});var cr,Fi=Te(()=>{"use strict";f();c();p();m();d();cr=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=Fe((Xm,_i)=>{"use strict";f();c();p();m();d();_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=Fe((pd,Ui)=>{"use strict";f();c();p();m();d();Ui.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 Vi=Fe((yd,qi)=>{"use strict";f();c();p();m();d();var ja=$i();qi.exports=e=>typeof e=="string"?e.replace(ja(),""):e});var Ji=Fe((yh,Wa)=>{Wa.exports={name:"@prisma/engines-version",version:"5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4c784e32044a8a016d99474bd02a3b6123742169"},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 Qi=Fe(()=>{"use strict";f();c();p();m();d()});var Bn=Fe((i2,is)=>{"use strict";f();c();p();m();d();is.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;spi,getExtensionContext:()=>mi});f();c();p();m();d();f();c();p();m();d();function pi(e){return typeof e=="function"?e:t=>t.$extends(e)}f();c();p();m();d();function mi(e){return e}var gi={};Wr(gi,{validator:()=>fi});f();c();p();m();d();f();c();p();m();d();function fi(...e){return t=>t}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();var rn,wi,Ei,bi,xi=!0;typeof y<"u"&&({FORCE_COLOR:rn,NODE_DISABLE_COLORS:wi,NO_COLOR:Ei,TERM:bi}=y.env||{},xi=y.stdout&&y.stdout.isTTY);var Oa={enabled:!wi&&Ei==null&&bi!=="dumb"&&(rn!=null&&rn!=="0"||xi)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Oa.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var _p=V(0,0),ar=V(1,22),lr=V(2,22),Lp=V(3,23),Pi=V(4,24),Bp=V(7,27),Up=V(8,28),$p=V(9,29),qp=V(30,39),Ye=V(31,39),vi=V(32,39),Ti=V(33,39),Ai=V(34,39),Vp=V(35,39),Ci=V(36,39),jp=V(37,39),Ri=V(90,39),Gp=V(90,39),Jp=V(40,49),Qp=V(41,49),Hp=V(42,49),Wp=V(43,49),Kp=V(44,49),zp=V(45,49),Yp=V(46,49),Zp=V(47,49);f();c();p();m();d();var Ia=100,Si=["green","yellow","blue","magenta","cyan","red"],ur=[],Oi=Date.now(),ka=0,nn=typeof y<"u"?y.env:{};globalThis.DEBUG??=nn.DEBUG??"";globalThis.DEBUG_COLORS??=nn.DEBUG_COLORS?nn.DEBUG_COLORS==="true":!0;var bt={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 Da(e){let t={color:Si[ka++%Si.length],enabled:bt.enabled(e),namespace:e,log:bt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&ur.push([o,...n]),ur.length>Ia&&ur.shift(),bt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:Ma(g)),u=`+${Date.now()-Oi}ms`;Oi=Date.now(),a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Ii=new Proxy(Da,{get:(e,t)=>bt[t],set:(e,t,r)=>bt[t]=r});function Ma(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 ki(){ur.length=0}var ee=Ii;f();c();p();m();d();f();c();p();m();d();var Ni="library";function Pt(e){let t=Ba();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":Ni)}function Ba(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}f();c();p();m();d();f();c();p();m();d();var Be;(t=>{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||={})})(Be||={});var Tt={};Wr(Tt,{error:()=>qa,info:()=>$a,log:()=>Ua,query:()=>Va,should:()=>Bi,tags:()=>vt,warn:()=>on});f();c();p();m();d();var vt={error:Ye("prisma:error"),warn:Ti("prisma:warn"),info:Ci("prisma:info"),query:Ai("prisma:query")},Bi={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Ua(...e){console.log(...e)}function on(e,...t){Bi.warn()&&console.warn(`${vt.warn} ${e}`,...t)}function $a(e,...t){console.info(`${vt.info} ${e}`,...t)}function qa(e,...t){console.error(`${vt.error} ${e}`,...t)}function Va(e,...t){console.log(`${vt.query} ${e}`,...t)}f();c();p();m();d();function Ee(e,t){throw new Error(t)}f();c();p();m();d();function sn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();c();p();m();d();var an=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});f();c();p();m();d();function Ze(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();c();p();m();d();function ln(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{ji.has(e)||(ji.add(e),on(t,...r))};f();c();p();m();d();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 Ce=class extends K{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};N(Ce,"NotFoundError");f();c();p();m();d();var J=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(J,"PrismaClientInitializationError");f();c();p();m();d();var Re=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(Re,"PrismaClientRustPanicError");f();c();p();m();d();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();m();d();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();m();d();var At=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();m();d();f();c();p();m();d();function Ct(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Ga(e,t){let r=Ct(()=>Ja(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Ja(e){return{datamodel:{models:un(e.models),enums:un(e.enums),types:un(e.types)}}}function un(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}f();c();p();m();d();var mr=Symbol(),cn=new WeakMap,be=class{constructor(t){t===mr?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)}},Rt=class extends be{_getNamespace(){return"NullTypes"}},St=class extends Rt{};mn(St,"DbNull");var Ot=class extends Rt{};mn(Ot,"JsonNull");var It=class extends Rt{};mn(It,"AnyNull");var pn={classes:{DbNull:St,JsonNull:Ot,AnyNull:It},instances:{DbNull:new St(mr),JsonNull:new Ot(mr),AnyNull:new It(mr)}};function mn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();function kt(e){return{ok:!1,error:e,map(){return kt(e)},flatMap(){return kt(e)}}}var dn=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 dn,r=Ue(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ue(t,e.queryRaw.bind(e)),executeRaw:Ue(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>Qa(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=Ha(t,e.getConnectionInfo.bind(e))),n},Qa=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ue(e,t.queryRaw.bind(t)),executeRaw:Ue(e,t.executeRaw.bind(t)),commit:Ue(e,t.commit.bind(t)),rollback:Ue(e,t.rollback.bind(t))});function Ue(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return kt({kind:"GenericJs",id:i})}}}function Ha(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return kt({kind:"GenericJs",id:i})}}}var Qs=_e(Ji());var wk=_e(Qi());Fi();yi();Mi();f();c();p();m();d();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)}}}f();c();p();m();d();f();c();p();m();d();var dr={enumerable:!0,configurable:!0,writable:!0};function fr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>dr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Ki=Symbol.for("nodejs.util.inspect.custom");function fe(e,t){let r=Ya(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=zi(Reflect.ownKeys(o),r),a=zi(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?{...dr,...l?.getPropertyDescriptor(s)}:dr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[Ki]=function(){let o={...this};return delete o[Ki],o},i}function Ya(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 zi(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}f();c();p();m();d();function Xe(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}f();c();p();m();d();function gr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}f();c();p();m();d();f();c();p();m();d();var et=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();m();d();f();c();p();m();d();function Yi(e){return e.substring(0,1).toLowerCase()+e.substring(1)}f();c();p();m();d();function tt(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function hr(e){return e.toString()!=="Invalid Date"}f();c();p();m();d();f();c();p();m();d();var rt=9e15,ke=1e9,gn="0123456789abcdef",wr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Er="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",hn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-rt,maxE:rt,crypto:!1},to,xe,_=!0,xr="[DecimalError] ",Ie=xr+"Invalid argument: ",ro=xr+"Precision limit exceeded",no=xr+"crypto unavailable",io="[object Decimal]",X=Math.floor,Q=Math.pow,Za=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Xa=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,el=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,oo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,k=7,tl=9007199254740991,rl=wr.length-1,yn=Er.length-1,A={toStringTag:io};A.absoluteValue=A.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),I(e)};A.ceil=function(){return I(new this.constructor(this),this.e+1,2)};A.clampedTo=A.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(Ie+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};A.comparedTo=A.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};A.cosine=A.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=nl(n,co(n,r)),n.precision=e,n.rounding=t,I(xe==2||xe==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};A.cubeRoot=A.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=z(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.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&&(I(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")&&(I(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return _=!0,I(n,e,h.rounding,t)};A.decimalPlaces=A.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};A.dividedBy=A.div=function(e){return $(this,new this.constructor(e))};A.dividedToIntegerBy=A.divToInt=function(e){var t=this,r=t.constructor;return I($(t,new r(e),0,1,1),r.precision,r.rounding)};A.equals=A.eq=function(e){return this.cmp(e)===0};A.floor=function(){return I(new this.constructor(this),this.e+1,3)};A.greaterThan=A.gt=function(e){return this.cmp(e)>0};A.greaterThanOrEqualTo=A.gte=function(e){var t=this.cmp(e);return t==1||t===0};A.hyperbolicCosine=A.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/vr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=nt(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 I(o,s.precision=r,s.rounding=n,!0)};A.hyperbolicSine=A.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=nt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/vr(5,e)),i=nt(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,I(i,t,r,!0)};A.hyperbolicTangent=A.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,$(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};A.inverseCosine=A.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))};A.inverseHyperbolicCosine=A.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)};A.inverseHyperbolicSine=A.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())};A.inverseHyperbolicTangent=A.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?I(new o(i),e,t,!0):(o.precision=r=n-i.e,i=$(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)};A.inverseSine=A.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)))};A.inverseTangent=A.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<=yn)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<=yn)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};A.isNaN=function(){return!this.s};A.isNegative=A.isNeg=function(){return this.s<0};A.isPositive=A.isPos=function(){return this.s>0};A.isZero=function(){return!!this.d&&this.d[0]===0};A.lessThan=A.lt=function(e){return this.cmp(e)<0};A.lessThanOrEqualTo=A.lte=function(e){return this.cmp(e)<1};A.logarithm=A.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=Oe(u,a),n=t?br(g,a+10):Oe(e,a),l=$(s,n,a,1),Mt(l.d,i=h,v))do if(a+=10,s=Oe(u,a),n=t?br(g,a+10):Oe(e,a),l=$(s,n,a,1),!o){+z(l.d).slice(i+1,i+15)+1==1e14&&(l=I(l,h+1,0));break}while(Mt(l.d,i+=10,v));return _=!0,I(l,h,v)};A.minus=A.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,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,v=e.d,a=C.precision,l=C.rounding,!u[0]||!v[0]){if(v[0])e.s=-e.s;else if(u[0])e=new C(S);else return new C(l===3?-0:0);return _?I(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=Pr(u,n),_?I(e,a,l):e};A.precision=A.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ie+e);return r.d?(t=so(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};A.round=function(){var e=this,t=e.constructor;return I(new t(e),e.e+1,t.rounding)};A.sine=A.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=ol(n,co(n,r)),n.precision=e,n.rounding=t,I(xe>2?r.neg():r,e,t,!0)):new n(NaN)};A.squareRoot=A.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=z(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($(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&&(I(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")&&(I(n,l+1,1),e=!n.times(n).eq(s));break}return _=!0,I(n,l,g.rounding,e)};A.tangent=A.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=$(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,I(xe==2||xe==4?r.neg():r,e,t,!0)):new n(NaN)};A.times=A.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=Pr(o,r),_?I(e,h.precision,h.rounding):e};A.toBinary=function(e,t){return bn(this,2,e,t)};A.toDecimalPlaces=A.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ne(e,0,ke),t===void 0?t=n.rounding:ne(t,0,8),I(r,e+r.e+1,t))};A.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ge(n,!0):(ne(e,0,ke),t===void 0?t=i.rounding:ne(t,0,8),n=I(new i(n),e+1,t),r=ge(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};A.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=ge(i):(ne(e,0,ke),t===void 0?t=o.rounding:ne(t,0,8),n=I(new o(i),e+i.e+1,t),r=ge(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};A.toFraction=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,S=this,C=S.d,R=S.constructor;if(!C)return new R(S);if(u=r=new R(1),n=l=new R(0),t=new R(n),o=t.e=so(C)-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(Ie+a);e=a.gt(t)?o>0?t:u:a}for(_=!1,a=new R(z(C)),g=R.precision,R.precision=o=C.length*k*2;h=$(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=$(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,n,o,1).minus(S).abs().cmp($(l,r,o,1).minus(S).abs())<1?[u,n]:[l,r],R.precision=g,_=!0,v};A.toHexadecimal=A.toHex=function(e,t){return bn(this,16,e,t)};A.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=$(r,e,0,t,1).times(e),_=!0,I(r)):(e.s=r.s,r=e),r};A.toNumber=function(){return+this};A.toOctal=function(e,t){return bn(this,8,e,t)};A.toPower=A.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 I(a,n,o);if(t=X(e.e/k),t>=e.d.length-1&&(r=u<0?-u:u)<=tl)return i=ao(l,a,r,n),e.s<0?new l(1).div(i):I(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=wn(e.times(Oe(a,n+r)),n),i.d&&(i=I(i,n+5,1),Mt(i.d,n,o)&&(t=n+10,i=I(wn(e.times(Oe(a,t+r)),t),t+5,1),+z(i.d).slice(n+1,n+15)+1==1e14&&(i=I(i,n+1,0)))),i.s=s,_=!0,l.rounding=o,I(i,n,o))};A.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ge(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ne(e,1,ke),t===void 0?t=i.rounding:ne(t,0,8),n=I(new i(n),e,t),r=ge(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};A.toSignificantDigits=A.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ne(e,1,ke),t===void 0?t=n.rounding:ne(t,0,8)),I(new n(r),e,t)};A.toString=function(){var e=this,t=e.constructor,r=ge(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};A.truncated=A.trunc=function(){return I(new this.constructor(this),this.e+1,1)};A.valueOf=A.toJSON=function(){var e=this,t=e.constructor,r=ge(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(Ie+e)}function Mt(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 yr(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 nl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/vr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=nt(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 $=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,C,R,M,F,B,D,O,oe,G,jr,rr,wt,Gr,ue,nr,ir=n.constructor,Jr=n.s==i.s?1:-1,Y=n.d,q=i.d;if(!Y||!Y[0]||!q||!q[0])return new ir(!n.s||!i.s||(Y?q&&Y[0]==q[0]:!q)?NaN:Y&&Y[0]==0||!q?Jr*0:Jr/0);for(l?(S=1,g=n.e-i.e):(l=pe,S=k,g=X(n.e/S)-X(i.e/S)),ue=q.length,wt=Y.length,F=new ir(Jr),B=F.d=[],h=0;q[h]==(Y[h]||0);h++);if(q[h]>(Y[h]||0)&&g--,o==null?(G=o=ir.precision,s=ir.rounding):a?G=o+(n.e-i.e)+1:G=o,G<0)B.push(1),C=!0;else{if(G=G/S+2|0,h=0,ue==1){for(v=0,q=q[0],G++;(h1&&(q=e(q,v,l),Y=e(Y,v,l),ue=q.length,wt=Y.length),rr=ue,D=Y.slice(0,ue),O=D.length;O=l/2&&++Gr;do v=0,u=t(q,D,ue,O),u<0?(oe=D[0],ue!=O&&(oe=oe*l+(D[1]||0)),v=oe/Gr|0,v>1?(v>=l&&(v=l-1),R=e(q,v,l),M=R.length,O=D.length,u=t(R,D,M,O),u==1&&(v--,r(R,ue=10;v/=10)h++;F.e=h+g*S-1,I(F,a?o+F.e+1:o,s,C)}return F}}();function I(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)+Se(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Se(-i-1)+o,r&&(n=r-s)>0&&(o+=Se(n))):i>=s?(o+=Se(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Se(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Se(n))),o}function Pr(e,t){var r=e[0];for(t*=k;r>=10;r/=10)t++;return t}function br(e,t,r){if(t>rl)throw _=!0,r&&(e.precision=r),Error(ro);return I(new e(wr),t,1,!0)}function ce(e,t,r){if(t>yn)throw Error(ro);return I(new e(Er),t,r,!0)}function so(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 Se(e){for(var t="";e--;)t+="0";return t}function ao(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),Xi(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),Xi(t.d,s)}return _=!0,o}function Zi(e){return e.d[e.d.length-1]&1}function lo(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=C):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=I(o.times(e),l,1),r=r.times(++g),a=s.plus($(o,r,l,1)),z(a.d).slice(0,l)===z(s.d).slice(0,l)){for(i=h;i--;)s=I(s.times(s),l,1);if(t==null)if(u<3&&Mt(s.d,l-n,S,u))v.precision=l+=10,r=o=a=new v(1),g=0,u++;else return I(s,v.precision=C,S,_=!0);else return v.precision=C,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,l,u,g,h,v,S=1,C=10,R=e,M=R.d,F=R.constructor,B=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+=C,r=z(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=z(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=br(F,g+2,D).times(o+""),R=Oe(new F(n+"."+r.slice(1)),g-C).plus(u),F.precision=D,t==null?I(R,D,B,_=!0):R;for(h=R,l=s=R=$(R.minus(1),R.plus(1),g,1),v=I(R.times(R),g,1),i=3;;){if(s=I(s.times(v),g,1),u=l.plus($(s,new F(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(br(F,g+2,D).times(o+""))),l=$(l,new F(S),g,1),t==null)if(Mt(l.d,g-C,B,a))F.precision=g+=C,u=s=R=$(h.minus(1),h.plus(1),g,1),v=I(R.times(R),g,1),i=a=1;else return I(l,F.precision=D,B,_=!0);else return F.precision=D,l;l=u,i+=2}}function uo(e){return String(e.s*e.s/0)}function En(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"),oo.test(t))return En(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Xa.test(t))r=16,t=t.toLowerCase();else if(Za.test(t))r=2;else if(el.test(t))r=8;else throw Error(Ie+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=ao(n,new n(r),o,o*2)),u=yr(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=Pr(u,g),e.d=u,_=!1,s&&(e=$(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?Q(2,l):qe.pow(2,l))),_=!0,e)}function ol(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:nt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/vr(5,r)),t=nt(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 nt(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=$(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=$(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 vr(e,t){for(var r=e;--t;)r*=e;return r}function co(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 xe=n?4:1,t;if(r=t.divToInt(i),r.isZero())xe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return xe=Zi(r)?n?2:3:n?4:1,t;xe=Zi(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,v,S=e.constructor,C=r!==void 0;if(C?(ne(r,1,ke),n===void 0?n=S.rounding:ne(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=uo(e);else{for(g=ge(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(".",""),v=new S(1),v.e=g.length-s,v.d=yr(ge(v),10,i),v.e=v.d.length),h=yr(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=$(e,v,r,n,0,i),h=e.d,o=e.e,u=to),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=yr(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 sl(e){return new this(e).abs()}function al(e){return new this(e).acos()}function ll(e){return new this(e).acosh()}function ul(e,t){return new this(e).plus(t)}function cl(e){return new this(e).asin()}function pl(e){return new this(e).asinh()}function ml(e){return new this(e).atan()}function dl(e){return new this(e).atanh()}function fl(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($(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($(e,t,o,1)),r}function gl(e){return new this(e).cbrt()}function hl(e){return I(e=new this(e),e.e+1,2)}function yl(e,t,r){return new this(e).clamp(t,r)}function wl(e){if(!e||typeof e!="object")throw Error(xr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,ke,"rounding",0,8,"toExpNeg",-rt,0,"toExpPos",0,rt,"maxE",0,rt,"minE",-rt,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Ie+r+": "+n);if(r="crypto",i&&(this[r]=hn[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(no);else this[r]=!1;else throw Error(Ie+r+": "+n);return this}function El(e){return new this(e).cos()}function bl(e){return new this(e).cosh()}function po(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,eo(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(no);else for(;o=10;i/=10)n++;n`}};function ot(e){return e instanceof Nt}f();c();p();m();d();f();c();p();m();d();var Tr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};f();c();p();m();d();var Ar=e=>e,Cr={bold:Ar,red:Ar,green:Ar,dim:Ar,enabled:!1},mo={bold:ar,red:Ye,green:vi,dim:lr,enabled:!0},st={write(e){e.writeLine(",")}};f();c();p();m();d();var he=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();m();d();var De=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var at=class extends De{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new Tr(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 he("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(st,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};f();c();p();m();d();var fo=": ",Rr=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()+fo.length}write(t){let r=new he(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(fo).write(this.value)}};f();c();p();m();d();var lt=class e extends De{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 at&&(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 he("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(st,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};f();c();p();m();d();var W=class extends De{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new he(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var xn=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 ut(e){return new xn(go(e))}function go(e){let t=new lt;for(let[r,n]of Object.entries(e)){let i=new Rr(r,ho(n));t.addField(i)}return t}function ho(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=hr(e)?e.toISOString():"Invalid Date";return new W(`new Date("${t}")`)}return e instanceof be?new W(`Prisma.${e._getName()}`):ot(e)?new W(`prisma.${Yi(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Ql(e):typeof e=="object"?go(e):new W(Object.prototype.toString.call(e))}function Ql(e){let t=new at;for(let r of e)t.addItem(ho(r));return t}function Sr(e,t){let r=t==="pretty"?mo:Cr,n=e.renderAllMessages(r),i=new et(0,{colors:r}).write(e).toString();return{message:n,args:i}}function yo(e){if(e===void 0)return"";let t=ut(e);return new et(0,{colors:Cr}).write(t).toString()}f();c();p();m();d();var Hl="P2037";function Ft({error:e,user_facing_error:t},r,n){return t.error_code?new K(Wl(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 Wl(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Hl&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();var Pn=class{getLocation(){return null}};function Me(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Pn}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();var wo={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function ct(e={}){let t=zl(e);return Object.entries(t).reduce((n,[i,o])=>(wo[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function zl(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 Eo(e,t){let r=Or(e);return t({action:"aggregate",unpacker:r,argsMapper:ct})(e)}f();c();p();m();d();function Yl(e={}){let{select:t,...r}=e;return typeof t=="object"?ct({...r,_count:t}):ct({...r,_count:{_all:!0}})}function Zl(e={}){return typeof e.select=="object"?t=>Or(e)(t)._count:t=>Or(e)(t)._count._all}function bo(e,t){return t({action:"count",unpacker:Zl(e),argsMapper:Yl})(e)}f();c();p();m();d();function Xl(e={}){let t=ct(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 eu(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function xo(e,t){return t({action:"groupBy",unpacker:eu(e),argsMapper:Xl})(e)}function Po(e,t,r){if(t==="aggregate")return n=>Eo(n,r);if(t==="count")return n=>bo(n,r);if(t==="groupBy")return n=>xo(n,r)}f();c();p();m();d();function vo(e,t){let r=t.fields.filter(i=>!i.relationName),n=an(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 Nt(e,o,s.type,s.isList,s.kind==="enum")},...fr(Object.keys(n))})}f();c();p();m();d();f();c();p();m();d();var To=e=>Array.isArray(e)?e:e.split("."),vn=(e,t)=>To(t).reduce((r,n)=>r&&r[n],e),Ao=(e,t,r)=>To(t).reduceRight((n,i,o,s)=>Object.assign({},vn(e,s.slice(0,o)),{[i]:n}),r);function tu(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function ru(e,t,r){return t===void 0?e??{}:Ao(t,r,e||!0)}function Tn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Me(e._errorFormat),g=tu(n,i),h=ru(l,o,g),v=r({dataPath:g,callsite:u})(h),S=nu(e,t);return new Proxy(v,{get(C,R){if(!S.includes(R))return C[R];let F=[a[R].type,r,R],B=[g,h];return Tn(e,...F,...B)},...fr([...S,...Object.getOwnPropertyNames(v)])})}}function nu(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}f();c();p();m();d();f();c();p();m();d();var iu=_e(Li());var ou={red:Ye,gray:Ri,dim:lr,bold:ar,underline:Pi,highlightSource:e=>e.highlight()},su={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function au({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function lu({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(uu(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 uu(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function pt(e){let t=e.showColors?ou:su,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=au(e),lu(r,t)}function Co(e,t,r,n){return e===Be.ModelAction.findFirstOrThrow||e===Be.ModelAction.findUniqueOrThrow?cu(t,r,n):n}function cu(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=pt({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 Ce(`No ${e} found`,t):o})}}f();c();p();m();d();function ye(e){return e.replace(/^./,t=>t.toLowerCase())}var pu=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],mu=["aggregate","count","groupBy"];function An(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[du(e,t),gu(e,t),Dt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return fe({},n)}function du(e,t){let r=ye(t),n=Object.keys(Be.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=Co(o,t,e._clientVersion,s);let a=l=>u=>{let g=Me(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 pu.includes(o)?Tn(e,t,a):fu(i)?Po(e,i,a):a({})}}}function fu(e){return mu.includes(e)}function gu(e,t){return $e(te("fields",()=>{let r=e._runtimeDataModel.models[t];return vo(t,r)}))}f();c();p();m();d();function Ro(e){return e.replace(/^./,t=>t.toUpperCase())}var Cn=Symbol();function _t(e){let t=[hu(e),te(Cn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Dt(r)),fe(e,t)}function hu(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(ye),n=[...new Set(t.concat(r))];return $e({getKeys(){return n},getPropertyValue(i){let o=Ro(i);if(e._runtimeDataModel.models[o]!==void 0)return An(e,o);if(e._runtimeDataModel.models[i]!==void 0)return An(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function So(e){return e[Cn]?e[Cn]:e}function Oo(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 _t(t)}f();c();p();m();d();f();c();p();m();d();function Io({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(Xe(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(Xe(u))}yu(e,l.needs)&&s.push(wu(l,fe(e,s)))}return s.length>0||a.length>0?fe(e,[...s,...a]):e}function yu(e,t){return t.every(r=>sn(e,r))}function wu(e,t){return $e(te(e.name,()=>e.compute(t)))}f();c();p();m();d();function Ir({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]=Ir({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Do({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Ir({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=ye(l);return Io({result:a,modelName:g,select:u.select,omit:u.select?void 0:{...o?.[g],...u.omit},extensions:n})}})}f();c();p();m();d();f();c();p();m();d();function Mo(e){if(e instanceof ae)return Eu(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:Mo(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Uo(o,l),a.args=s,Fo(e,a,r,n+1)}})})}function _o(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 Fo(e,t,s)}function Lo(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Bo(r,n,0,e):e(r)}}function Bo(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=Uo(i,l),Bo(a,t,r+1,n)}})}var No=e=>e;function Uo(e=No,t=No){return r=>e(t(r))}f();c();p();m();d();f();c();p();m();d();function qo(e,t,r){let n=ye(r);return!t.result||!(t.result.$allModels||t.result[n])?e:bu({...e,...$o(t.name,e,t.result.$allModels),...$o(t.name,e,t.result[n])})}function bu(e){let t=new de,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 Ze(e,n=>({...n,needs:r(n.name,new Set)}))}function $o(e,t,r){return r?Ze(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:xu(t,o,i)})):{}}function xu(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Vo(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 jo(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 kr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new de;this.modelExtensionsCache=new de;this.queryCallbacksCache=new de;this.clientExtensions=Ct(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Ct(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>qo(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()}},Dr=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new kr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new kr(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();m();d();var Go=ee("prisma:client"),Jo={Vercel:"vercel","Netlify CI":"netlify"};function Qo({postinstall:e,ciName:t,clientVersion:r}){if(Go("checkPlatformCaching:postinstall",e),Go("checkPlatformCaching:ciName",t),e===!0&&t&&t in Jo){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/${Ja[t]}-build`;throw console.error(n),new ae(n,r)}}d();p();f();function Wa(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}d();p();f();d();p();f();d();p();f();function Jo({error:e,user_facing_error:t},r){return t.error_code?new de(t.message,{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new Se(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}d();p();f();var kn=class{};d();p();f();function Ha(e,t){return{batch:e,transaction:(t==null?void 0:t.kind)==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}d();p();f();d();p();f();d();p();f();var Uf="Cloudflare-Workers",$f="node";function za(){var e,t,r;return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":((e=globalThis.navigator)==null?void 0:e.userAgent)===Uf?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":((r=(t=globalThis.process)==null?void 0:t.release)==null?void 0:r.name)===$f?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}function Dn({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){var u,l;let o,i=Object.keys(e)[0],s=(u=e[i])==null?void 0:u.url,a=(l=t[i])==null?void 0:l.url;if(i===void 0?o=void 0:a?o=a:s!=null&&s.value?o=s.value:s!=null&&s.fromEnvVar&&(o=r[s.fromEnvVar]),(s==null?void 0:s.fromEnvVar)!==void 0&&o===void 0)throw za()==="workerd"?new ae(`error: Environment variable not found: ${s.fromEnvVar}. +Learn how: https://pris.ly/d/${Jo[t]}-build`;throw console.error(n),new J(n,r)}}f();c();p();m();d();function Ho(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();var Pu="Cloudflare-Workers",vu="node";function Wo(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Pu?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===vu?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Tu={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 Rn(){let e=Wo();return{id:e,prettyName:Tu[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();function mt({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 Rn().id==="workerd"?new J(`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 ae(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(o===void 0)throw new ae("error: Missing URL environment variable, value, or override.",n);return o}d();p();f();d();p();f();var _n=class extends Error{constructor(r,n){super(r);this.clientVersion=n.clientVersion,this.cause=n.cause}get[Symbol.toStringTag](){return this.name}};var be=class extends _n{constructor(r,n){var o;super(r,n);this.isRetryable=(o=n.isRetryable)!=null?o:!0}};d();p();f();d();p();f();function q(e,t){return{...e,isRetryable:t}}var zt=class extends be{constructor(r){super("This request must be retried",q(r,!0));this.name="ForcedRetryError";this.code="P5001"}};k(zt,"ForcedRetryError");d();p();f();var Et=class extends be{constructor(r,n){super(r,q(n,!1));this.name="InvalidDatasourceError";this.code="P5002"}};k(Et,"InvalidDatasourceError");d();p();f();var Pt=class extends be{constructor(r,n){super(r,q(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};k(Pt,"NotImplementedYetError");d();p();f();d();p();f();var J=class extends be{constructor(r,n){super(r,n);this.response=n.response;let o=this.response.headers.get("prisma-request-id");if(o){let i=`(The request id was: ${o})`;this.message=this.message+" "+i}}};var vt=class extends J{constructor(r){super("Schema needs to be uploaded",q(r,!0));this.name="SchemaMissingError";this.code="P5005"}};k(vt,"SchemaMissingError");d();p();f();d();p();f();var Qo="This request could not be understood by the server",br=class extends J{constructor(r,n,o){super(n||Qo,q(r,!1));this.name="BadRequestError";this.code="P5000";o&&(this.code=o)}};k(br,"BadRequestError");d();p();f();var wr=class extends J{constructor(r,n){super("Engine not started: healthcheck timeout",q(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};k(wr,"HealthcheckTimeoutError");d();p();f();var Er=class extends J{constructor(r,n,o){super(n,q(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=o}};k(Er,"EngineStartupError");d();p();f();var Pr=class extends J{constructor(r){super("Engine version is not supported",q(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};k(Pr,"EngineVersionNotSupportedError");d();p();f();var Wo="Request timed out",vr=class extends J{constructor(r,n=Wo){super(n,q(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};k(vr,"GatewayTimeoutError");d();p();f();var qf="Interactive transaction error",Ar=class extends J{constructor(r,n=qf){super(n,q(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};k(Ar,"InteractiveTransactionError");d();p();f();var Vf="Request parameters are invalid",Tr=class extends J{constructor(r,n=Vf){super(n,q(r,!1));this.name="InvalidRequestError";this.code="P5011"}};k(Tr,"InvalidRequestError");d();p();f();var Ho="Requested resource does not exist",Cr=class extends J{constructor(r,n=Ho){super(n,q(r,!1));this.name="NotFoundError";this.code="P5003"}};k(Cr,"NotFoundError");d();p();f();var zo="Unknown server error",Zt=class extends J{constructor(r,n,o){super(n||zo,q(r,!0));this.name="ServerError";this.code="P5006";this.logs=o}};k(Zt,"ServerError");d();p();f();var Zo="Unauthorized, check your connection string",Mr=class extends J{constructor(r,n=Zo){super(n,q(r,!1));this.name="UnauthorizedError";this.code="P5007"}};k(Mr,"UnauthorizedError");d();p();f();var Yo="Usage exceeded, retry again later",Sr=class extends J{constructor(r,n=Yo){super(n,q(r,!0));this.name="UsageExceededError";this.code="P5008"}};k(Sr,"UsageExceededError");async function Kf(e){let t;try{t=await e.text()}catch(r){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(r){return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function Rr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await Kf(e);if(n.type==="QueryEngineError")throw new de(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Zt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new vt(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Pr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:o,logs:i}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Er(r,o,i)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:o,error_code:i}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new ae(o,t,i)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:o}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new wr(r,o)}}if("InteractiveTransactionMisrouted"in n.body){let o={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 Ar(r,o[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Tr(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Mr(r,Yt(Zo,n));if(e.status===404)return new Cr(r,Yt(Ho,n));if(e.status===429)throw new Sr(r,Yt(Yo,n));if(e.status===504)throw new vr(r,Yt(Wo,n));if(e.status>=500)throw new Zt(r,Yt(zo,n));if(e.status>=400)throw new br(r,Yt(Qo,n))}function Yt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}d();p();f();function Za(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(o=>setTimeout(()=>o(n),n))}d();p();f();function Ya(e){var r;if(!!((r=e.generator)!=null&&r.previewFeatures.some(n=>n.toLowerCase().includes("metrics"))))throw new ae("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)}d();p();f();var Xa={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*","@swc/core":"1.3.75","@swc/jest":"0.2.29","@types/jest":"29.5.5","@types/node":"18.18.0",execa:"5.1.1",jest:"29.7.0",typescript:"5.2.2"};d();p();f();d();p();f();var Or=class extends be{constructor(r,n){super(`Cannot fetch data from service: -${r}`,q(n,!0));this.name="RequestError";this.code="P5010"}};k(Or,"RequestError");async function At(e,t,r=n=>n){var o;let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(Xo)(e,t)}catch(i){console.log(e);let s=(o=i.message)!=null?o:"Unknown error";throw new Or(s,{clientVersion:n})}}function Jf(e){return{...e.headers,"Content-Type":"application/json"}}function Qf(e){return{method:e.method,headers:Jf(e)}}function Wf(e,t){return{text:()=>Promise.resolve(x.Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(x.Buffer.concat(e).toString())),ok:t.statusCode>=200&&t.statusCode<=299,status:t.statusCode,url:t.url,headers:new ei(t.headers)}}async function Xo(e,t={}){let r=Hf("https"),n=Qf(t),o=[],{origin:i}=new URL(e);return new Promise((s,a)=>{var l;let u=r.request(e,n,c=>{let{statusCode:m,headers:{location:g}}=c;m>=301&&m<=399&&g&&(g.startsWith("http")===!1?s(Xo(`${i}${g}`,t)):s(Xo(g,t))),c.on("data",w=>o.push(w)),c.on("end",()=>s(Wf(o,c))),c.on("error",a)});u.on("error",a),u.end((l=t.body)!=null?l:"")})}var Hf=typeof Qn!="undefined"?Qn:()=>{},ei=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 o of n)this.headers.set(r,o)}append(t,r){this.headers.set(t,r)}delete(t){this.headers.delete(t)}get(t){var r;return(r=this.headers.get(t))!=null?r:null}has(t){return this.headers.has(t)}set(t,r){this.headers.set(t,r)}forEach(t,r){for(let[n,o]of this.headers)t.call(r,o,n,this)}};var zf=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,eu=he("prisma:client:dataproxyEngine");async function Zf(e,t){var s,a,u;let r=Xa["@prisma/engines-version"],n=(s=t.clientVersion)!=null?s:"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[o,i]=(a=n==null?void 0:n.split("-"))!=null?a:[];if(i===void 0&&zf.test(o))return o;if(i!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[l]=(u=r.split("-"))!=null?u:[],[c,m,g]=l.split("."),w=Yf(`<=${c}.${m}.${g}`),E=await At(w,{clientVersion:n});if(!E.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${E.status} ${E.statusText}, response body: ${await E.text()||""}`);let b=await E.text();eu("length of body fetched from unpkg.com",b.length);let T;try{T=JSON.parse(b)}catch(S){throw console.error("JSON.parse error: body fetched from unpkg.com: ",b),S}return T.version}throw new Pt("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function tu(e,t){let r=await Zf(e,t);return eu("version",r),r}function Yf(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var ru=3,ti=he("prisma:client:dataproxyEngine"),ri=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`};this.tracingHelper.isEnabled()&&(n.traceparent=t!=null?t:this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let o=this.buildCaptureSettings();return o.length>0&&(n["X-capture-telemetry"]=o.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},Fr=class extends kn{constructor(r){var n,o,i,s;super();Ya(r),this.config=r,this.env={...this.config.env,...y.env},this.inlineSchema=(n=r.inlineSchema)!=null?n:"",this.inlineDatasources=(o=r.inlineDatasources)!=null?o:{},this.inlineSchemaHash=(i=r.inlineSchemaHash)!=null?i:"",this.clientVersion=(s=r.clientVersion)!=null?s:"unknown",this.logEmitter=r.logEmitter,this.tracingHelper=this.config.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return"unknown"}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[r,n]=this.extractHostAndApiKey();this.host=r,this.headerBuilder=new ri({apiKey:n,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries}),this.remoteClientVersion=await tu(r,this.config),ti("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(r){var n,o;(n=r==null?void 0:r.logs)!=null&&n.length&&r.logs.forEach(i=>{switch(i.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let s=typeof i.attributes.query=="string"?i.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[a]=s.split("/* traceparent");s=a}this.logEmitter.emit("query",{query:s,timestamp:i.timestamp,duration:i.attributes.duration_ms,params:i.attributes.params,target:i.attributes.target})}}}),(o=r==null?void 0:r.traces)!=null&&o.length&&this.tracingHelper.createEngineSpan({span:!0,spans:r.traces})}on(r,n){if(r==="beforeExit")throw new Error('"beforeExit" hook is not applicable to the remote query engine');this.logEmitter.on(r,n)}async url(r){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${r}`}async uploadSchema(){let r={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(r,async()=>{let n=await At(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});n.ok||ti("schema response status",n.status);let o=await Rr(n,this.clientVersion);if(o)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${o.message}`}),o;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`})})}request(r,{traceparent:n,interactiveTransaction:o,customDataProxyFetch:i}){return this.requestInternal({body:r,traceparent:n,interactiveTransaction:o,customDataProxyFetch:i})}async requestBatch(r,{traceparent:n,transaction:o,customDataProxyFetch:i}){let s=(o==null?void 0:o.kind)==="itx"?o.options:void 0,a=Ha(r,o),{batchResult:u,elapsed:l}=await this.requestInternal({body:a,customDataProxyFetch:i,interactiveTransaction:s,traceparent:n});return u.map(c=>"errors"in c&&c.errors.length>0?Jo(c.errors[0],this.clientVersion):{data:c,elapsed:l})}requestInternal({body:r,traceparent:n,customDataProxyFetch:o,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:s})=>{let a=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");s(a);let u=await At(a,{method:"POST",headers:this.headerBuilder.build({traceparent:n,interactiveTransaction:i}),body:JSON.stringify(r),clientVersion:this.clientVersion},o);u.ok||ti("graphql response status",u.status),await this.handleError(await Rr(u,this.clientVersion));let l=await u.json(),c=l.extensions;if(c&&this.propagateResponseExtensions(c),l.errors)throw l.errors.length===1?Jo(l.errors[0],this.config.clientVersion):new Se(l.errors,{clientVersion:this.config.clientVersion});return l}})}async transaction(r,n,o){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[r]} transaction`,callback:async({logHttpCall:s})=>{var a,u;if(r==="start"){let l=JSON.stringify({max_wait:(a=o==null?void 0:o.maxWait)!=null?a:2e3,timeout:(u=o==null?void 0:o.timeout)!=null?u:5e3,isolation_level:o==null?void 0:o.isolationLevel}),c=await this.url("transaction/start");s(c);let m=await At(c,{method:"POST",headers:this.headerBuilder.build({traceparent:n.traceparent}),body:l,clientVersion:this.clientVersion});await this.handleError(await Rr(m,this.clientVersion));let g=await m.json(),w=g.extensions;w&&this.propagateResponseExtensions(w);let E=g.id,b=g["data-proxy"].endpoint;return{id:E,payload:{endpoint:b}}}else{let l=`${o.payload.endpoint}/${r}`;s(l);let c=await At(l,{method:"POST",headers:this.headerBuilder.build({traceparent:n.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Rr(c,this.clientVersion));let g=(await c.json()).extensions;g&&this.propagateResponseExtensions(g);return}}})}extractHostAndApiKey(){let r={clientVersion:this.clientVersion},n=Object.keys(this.inlineDatasources)[0],o=Dn({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(o)}catch(c){throw new Et(`Error validating datasource \`${n}\`: the URL must start with the protocol \`prisma://\``,r)}let{protocol:s,host:a,searchParams:u}=i;if(s!=="prisma:")throw new Et(`Error validating datasource \`${n}\`: the URL must start with the protocol \`prisma://\``,r);let l=u.get("api_key");if(l===null||l.length<1)throw new Et(`Error validating datasource \`${n}\`: the URL must contain a valid API key`,r);return[a,l]}metrics(){throw new Pt("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(r){var n;for(let o=0;;o++){let i=s=>{this.logEmitter.emit("info",{message:`Calling ${s} (n=${o})`})};try{return await r.callback({logHttpCall:i})}catch(s){if(!(s instanceof be)||!s.isRetryable)throw s;if(o>=ru)throw s instanceof zt?s.cause:s;this.logEmitter.emit("warn",{message:`Attempt ${o+1}/${ru} failed for ${r.actionGerund}: ${(n=s.message)!=null?n:"(unknown)"}`});let a=await Za(o);this.logEmitter.emit("warn",{message:`Retrying after ${a}ms`})}}}async handleError(r){if(r instanceof vt)throw await this.uploadSchema(),new zt({clientVersion:this.clientVersion,cause:r});if(r)throw r}};function nu(e,t){let r;try{r=Dn({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch(o){}e.noEngine!==!0&&(r!=null&&r.startsWith("prisma://"))&&un("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=Po(t.generator);return r!=null&&r.startsWith("prisma://")||e.noEngine,new Fr(t);throw new me("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}d();p();f();function Nn({generator:e}){var t;return(t=e==null?void 0:e.previewFeatures)!=null?t:[]}d();p();f();d();p();f();d();p();f();var lu=Pe(ni());d();p();f();function au(e,t){let r=uu(e),n=Xf(r),o=td(n);o?Ln(o,t):t.addErrorMessage(()=>"Unknown error")}function uu(e){return e.errors.flatMap(t=>t.kind==="Union"?uu(t):[t])}function Xf(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let o=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,i=t.get(o);i?t.set(o,{...n,argument:{...n.argument,typeNames:ed(i.argument.typeNames,n.argument.typeNames)}}):t.set(o,n)}return r.push(...t.values()),r}function ed(e,t){return[...new Set(e.concat(t))]}function td(e){return So(e,(t,r)=>{let n=iu(t),o=iu(r);return n!==o?n-o:su(t)-su(r)})}function iu(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function su(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}d();p();f();var Ge=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)}};d();p();f();var Bn=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:o,dim:i}=n.context.colors;n.write(o(i(`${t}: ${r}`))).addMarginSymbol(o(i("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(Jt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Ln(e,t){switch(e.kind){case"IncludeAndSelect":rd(e,t);break;case"IncludeOnScalar":nd(e,t);break;case"EmptySelection":od(e,t);break;case"UnknownSelectionField":id(e,t);break;case"UnknownArgument":sd(e,t);break;case"UnknownInputField":ad(e,t);break;case"RequiredArgumentMissing":ud(e,t);break;case"InvalidArgumentType":ld(e,t);break;case"InvalidArgumentValue":cd(e,t);break;case"ValueTooLarge":pd(e,t);break;case"SomeFieldsMissing":fd(e,t);break;case"TooManyFieldsGiven":dd(e,t);break;case"Union":au(e,t);break;default:throw new Error("not implemented: "+e.kind)}}function rd(e,t){var n,o;let r=t.arguments.getDeepSubSelectionValue(e.selectionPath);r&&r instanceof re&&((n=r.getField("include"))==null||n.markAsError(),(o=r.getField("select"))==null||o.markAsError()),t.addErrorMessage(i=>`Please ${i.bold("either")} use ${i.green("`include`")} or ${i.green("`select`")}, but ${i.red("not both")} at the same time.`)}function nd(e,t){var s,a;let[r,n]=jn(e.selectionPath),o=e.outputType,i=(s=t.arguments.getDeepSelectionParent(r))==null?void 0:s.value;if(i&&((a=i.getField(n))==null||a.markAsError(),o))for(let u of o.fields)u.isRelation&&i.addSuggestion(new Ge(u.name,"true"));t.addErrorMessage(u=>{let l=`Invalid scalar field ${u.red(`\`${n}\``)} for ${u.bold("include")} statement`;return o?l+=` on model ${u.bold(o.name)}. ${Ir(u)}`:l+=".",l+=` -Note that ${u.bold("include")} statements only accept relation fields.`,l})}function od(e,t){var i,s;let r=e.outputType,n=(i=t.arguments.getDeepSelectionParent(e.selectionPath))==null?void 0:i.value,o=(s=n==null?void 0:n.isEmpty())!=null?s:!1;n&&(n.removeAllFields(),fu(n,r)),t.addErrorMessage(a=>o?`The ${a.red("`select`")} statement for type ${a.bold(r.name)} must not be empty. ${Ir(a)}`:`The ${a.red("`select`")} statement for type ${a.bold(r.name)} needs ${a.bold("at least one truthy value")}.`)}function id(e,t){var i;let[r,n]=jn(e.selectionPath),o=t.arguments.getDeepSelectionParent(r);o&&((i=o.value.getField(n))==null||i.markAsError(),fu(o.value,e.outputType)),t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o.kind)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(Ir(s)),a.join(" ")})}function sd(e,t){var o;let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof re&&((o=n.getField(r))==null||o.markAsError(),md(n,e.arguments)),t.addErrorMessage(i=>cu(i,r,e.arguments.map(s=>s.name)))}function ad(e,t){var i;let[r,n]=jn(e.argumentPath),o=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(o instanceof re){(i=o.getDeepField(e.argumentPath))==null||i.markAsError();let s=o.getDeepFieldValue(r);s instanceof re&&du(s,e.inputType)}t.addErrorMessage(s=>cu(s,n,e.inputType.fields.map(a=>a.name)))}function cu(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],o=yd(t,r);return o&&n.push(`Did you mean \`${e.green(o)}\`?`),r.length>0&&n.push(Ir(e)),n.join(" ")}function ud(e,t){let r;t.addErrorMessage(u=>(r==null?void 0:r.value)instanceof ne&&r.value.text==="null"?`Argument \`${u.green(i)}\` must not be ${u.red("null")}.`:`Argument \`${u.green(i)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(!(n instanceof re))return;let[o,i]=jn(e.argumentPath),s=new Bn,a=n.getDeepFieldValue(o);if(a instanceof re)if(r=a.getField(i),r&&a.removeField(i),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 Ge(i,s).makeRequired())}else{let u=e.inputTypes.map(pu).join(" | ");a.addSuggestion(new Ge(i,u).makeRequired())}}function pu(e){return e.kind==="list"?`${pu(e.elementType)}[]`:e.name}function ld(e,t){var o;let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof re&&((o=n.getDeepFieldValue(e.argumentPath))==null||o.markAsError()),t.addErrorMessage(i=>{let s=Un("or",e.argument.typeNames.map(a=>i.green(a)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${s}, provided ${i.red(e.inferredType)}.`})}function cd(e,t){var o;let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof re&&((o=n.getDeepFieldValue(e.argumentPath))==null||o.markAsError()),t.addErrorMessage(i=>{let s=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&s.push(`: ${e.underlyingError}`),s.push("."),e.argument.typeNames.length>0){let a=Un("or",e.argument.typeNames.map(u=>i.green(u)));s.push(` Expected ${a}.`)}return s.join("")})}function pd(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath),o;if(n instanceof re){let i=n.getDeepField(e.argumentPath),s=i==null?void 0:i.value;s==null||s.markAsError(),s instanceof ne&&(o=s.text)}t.addErrorMessage(i=>{let s=["Unable to fit value"];return o&&s.push(i.red(o)),s.push(`into a 64-bit signed integer for field \`${i.bold(r)}\``),s.join(" ")})}function fd(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(n instanceof re){let o=n.getDeepFieldValue(e.argumentPath);o instanceof re&&du(o,e.inputType)}t.addErrorMessage(o=>{let i=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?i.push(`${o.green("at least one of")} ${Un("or",e.constraints.requiredFields.map(s=>`\`${o.bold(s)}\``))} arguments.`):i.push(`${o.green("at least one")} argument.`):i.push(`${o.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),i.push(Ir(o)),i.join(" ")})}function dd(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath),o=[];if(n instanceof re){let i=n.getDeepFieldValue(e.argumentPath);i instanceof re&&(i.markAsError(),o=Object.keys(i.getFields()))}t.addErrorMessage(i=>{let s=[`Argument \`${i.bold(r)}\` 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 ${Un("and",o.map(a=>i.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function fu(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new Ge(r.name,"true"))}function md(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new Ge(r.name,r.typeNames.join(" | ")))}function du(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new Ge(r.name,r.typeNames.join(" | ")))}function jn(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Ir({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Un(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var gd=3;function yd(e,t){let r=1/0,n;for(let o of t){let i=(0,lu.default)(e,o);i>gd||i({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){var r;return(r=this.model)==null?void 0:r.fields.find(n=>n.name===t)}nestSelection(t){let r=this.findField(t),n=(r==null?void 0:r.kind)==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};d();p();f();var hu=e=>({command:e});d();p();f();d();p();f();var xu=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);d();p();f();function kr(e){try{return bu(e,"fast")}catch(t){return bu(e,"slow")}}function bu(e,t){return JSON.stringify(e.map(r=>Td(r,t)))}function Td(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:$t(e)?{prisma__type:"date",prisma__value:e.toJSON()}:Ke.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:x.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Cd(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:x.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Eu(e):e}function Cd(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Eu(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(wu);let t={};for(let r of Object.keys(e))t[r]=wu(e[r]);return t}function wu(e){return typeof e=="bigint"?e.toString():Eu(e)}var Md=/^(\s*alter\s)/i,Pu=he("prisma:client");function si(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Md.exec(t))throw new Error(`Running ALTER using ${n} is not supported +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new J(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new J("error: Missing URL environment variable, value, or override.",n);return i}f();c();p();m();d();f();c();p();m();d();var Mr=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 Mr{constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};f();c();p();m();d();f();c();p();m();d();function L(e,t){return{...e,isRetryable:t}}var dt=class extends ie{constructor(r){super("This request must be retried",L(r,!0));this.name="ForcedRetryError";this.code="P5001"}};N(dt,"ForcedRetryError");f();c();p();m();d();var Ve=class extends ie{constructor(r,n){super(r,L(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};N(Ve,"InvalidDatasourceError");f();c();p();m();d();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();m();d();f();c();p();m();d();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();m();d();f();c();p();m();d();var Sn="This request could not be understood by the server",Bt=class extends j{constructor(r,n,i){super(n||Sn,L(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};N(Bt,"BadRequestError");f();c();p();m();d();var Ut=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(Ut,"HealthcheckTimeoutError");f();c();p();m();d();var $t=class extends j{constructor(r,n,i){super(n,L(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};N($t,"EngineStartupError");f();c();p();m();d();var qt=class extends j{constructor(r){super("Engine version is not supported",L(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};N(qt,"EngineVersionNotSupportedError");f();c();p();m();d();var On="Request timed out",Vt=class extends j{constructor(r,n=On){super(n,L(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};N(Vt,"GatewayTimeoutError");f();c();p();m();d();var Au="Interactive transaction error",jt=class extends j{constructor(r,n=Au){super(n,L(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};N(jt,"InteractiveTransactionError");f();c();p();m();d();var Cu="Request parameters are invalid",Gt=class extends j{constructor(r,n=Cu){super(n,L(r,!1));this.name="InvalidRequestError";this.code="P5011"}};N(Gt,"InvalidRequestError");f();c();p();m();d();var In="Requested resource does not exist",Jt=class extends j{constructor(r,n=In){super(n,L(r,!1));this.name="NotFoundError";this.code="P5003"}};N(Jt,"NotFoundError");f();c();p();m();d();var kn="Unknown server error",ft=class extends j{constructor(r,n,i){super(n||kn,L(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};N(ft,"ServerError");f();c();p();m();d();var Dn="Unauthorized, check your connection string",Qt=class extends j{constructor(r,n=Dn){super(n,L(r,!1));this.name="UnauthorizedError";this.code="P5007"}};N(Qt,"UnauthorizedError");f();c();p();m();d();var Mn="Usage exceeded, retry again later",Ht=class extends j{constructor(r,n=Mn){super(n,L(r,!0));this.name="UsageExceededError";this.code="P5008"}};N(Ht,"UsageExceededError");async function Ru(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 Wt(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await Ru(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 ft(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 qt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new $t(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new J(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Ut(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 jt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Gt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Qt(r,gt(Dn,n));if(e.status===404)return new Jt(r,gt(In,n));if(e.status===429)throw new Ht(r,gt(Mn,n));if(e.status===504)throw new Vt(r,gt(On,n));if(e.status>=500)throw new ft(r,gt(kn,n));if(e.status>=400)throw new Bt(r,gt(Sn,n))}function gt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}f();c();p();m();d();function Ko(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();m();d();var ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function zo(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+=ve[s]+ve[a]+ve[l]+ve[u];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=ve[s]+ve[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=ve[s]+ve[a]+ve[l]+"="),r}f();c();p();m();d();function Yo(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new J("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();m();d();function Su(e){return e[0]*1e3+e[1]/1e6}function Zo(e){return new Date(Su(e))}f();c();p();m();d();var Xo={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};f();c();p();m();d();f();c();p();m();d();var Kt=class extends ie{constructor(r,n){super(`Cannot fetch data from service: +${r}`,L(n,!0));this.name="RequestError";this.code="P5010"}};N(Kt,"RequestError");async function Je(e,t,r=n=>n){let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(Nn)(e,t)}catch(i){let o=i.message??"Unknown error";throw new Kt(o,{clientVersion:n})}}function Iu(e){return{...e.headers,"Content-Type":"application/json"}}function ku(e){return{method:e.method,headers:Iu(e)}}function Du(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 Fn(t.headers)}}async function Nn(e,t={}){let r=Mu("https"),n=ku(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(Nn(`${o}${h}`,t)):s(Nn(h,t))),u.on("data",v=>i.push(v)),u.on("end",()=>s(Du(i,u))),u.on("error",a)});l.on("error",a),l.end(t.body??"")})}var Mu=typeof Hr<"u"?Hr:()=>{},Fn=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 Nu=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,es=ee("prisma:client:dataproxyEngine");async function Fu(e,t){let r=Xo["@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&&Nu.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=_u(`<=${a}.${l}.${u}`),h=await Je(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();es("length of body fetched from unpkg.com",v.length);let S;try{S=JSON.parse(v)}catch(C){throw console.error("JSON.parse error: body fetched from unpkg.com: ",v),C}return S.version}throw new je("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function ts(e,t){let r=await Fu(e,t);return es("version",r),r}function _u(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var rs=3,_n=ee("prisma:client:dataproxyEngine"),Ln=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}},zt=class{constructor(t){this.name="DataProxyEngine";Yo(t),this.config=t,this.env={...t.env,...typeof y<"u"?y.env:{}},this.inlineSchema=zo(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 Ln({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await ts(t,this.config),_n("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:Zo(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 Je(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||_n("schema response status",r.status);let n=await Wt(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=gr(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?Ft(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 Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||_n("graphql response status",a.status),await this.handleError(await Wt(a,this.clientVersion));let l=await a.json(),u=l.extensions;if(u&&this.propagateResponseExtensions(u),l.errors)throw l.errors.length===1?Ft(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 Je(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Wt(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 Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Wt(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=mt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new Ve(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:")throw new Ve(`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 Ve(`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 dt?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 Ko(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 dt({clientVersion:this.clientVersion,cause:t});if(t)throw t}applyPendingMigrations(){throw new Error("Method not implemented.")}};function ns({copyEngine:e=!0},t){let r;try{r=mt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}e&&r?.startsWith("prisma://")&&pr("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=Pt(t.generator),i=!!(r?.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o){let l;throw l=["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(l.join(` +`),{clientVersion:t.clientVersion})}if(i)return new zt(t);throw new Z("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}f();c();p();m();d();function Nr({generator:e}){return e?.previewFeatures??[]}f();c();p();m();d();f();c();p();m();d();function ht(e){return e.substring(0,1).toLowerCase()+e.substring(1)}f();c();p();m();d();f();c();p();m();d();var us=_e(Bn());f();c();p();m();d();function as(e,t,r){let n=ls(e),i=Lu(n),o=Uu(i);o?Fr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function ls(e){return e.errors.flatMap(t=>t.kind==="Union"?ls(t):[t])}function Lu(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:Bu(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Bu(e,t){return[...new Set(e.concat(t))]}function Uu(e){return ln(e,(t,r)=>{let n=os(t),i=os(r);return n!==i?n-i:ss(t)-ss(r)})}function os(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function ss(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}f();c();p();m();d();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();m();d();var Yt=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(st,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Fr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":$u(e,t);break;case"IncludeOnScalar":qu(e,t);break;case"EmptySelection":Vu(e,t,r);break;case"UnknownSelectionField":Qu(e,t);break;case"UnknownArgument":Hu(e,t);break;case"UnknownInputField":Wu(e,t);break;case"RequiredArgumentMissing":Ku(e,t);break;case"InvalidArgumentType":zu(e,t);break;case"InvalidArgumentValue":Yu(e,t);break;case"ValueTooLarge":Zu(e,t);break;case"SomeFieldsMissing":Xu(e,t);break;case"TooManyFieldsGiven":ec(e,t);break;case"Union":as(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function $u(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 qu(e,t){let[r,n]=Zt(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)}. ${Xt(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Vu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){ju(e,t,i);return}if(n.hasField("select")){Gu(e,t);return}}if(r?.[ht(e.outputType.name)]){Ju(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function ju(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 Gu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),ms(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Xt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Ju(e,t){let r=new Yt;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]=Zt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new lt;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 Qu(e,t){let[r,n]=Zt(e.selectionPath),i=t.arguments.getDeepSubSelectionValue(r)?.asObject(),o;if(i){let s=i.getFieldValue("select")?.asObject(),a=i.getFieldValue("include")?.asObject(),l=i.getFieldValue("omit")?.asObject();s?.hasField(n)?(o="select",s.getField(n)?.markAsError(),ms(s,e.outputType)):a?.hasField(n)?(o="include",a.getField(n)?.markAsError(),tc(a,e.outputType)):l?.hasField(n)&&(o="omit",l.getField(n)?.markAsError(),rc(l,e.outputType))}t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(Xt(s)),a.join(" ")})}function Hu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),nc(n,e.arguments)),t.addErrorMessage(i=>cs(i,r,e.arguments.map(o=>o.name)))}function Wu(e,t){let[r,n]=Zt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&ds(o,e.inputType)}t.addErrorMessage(o=>cs(o,n,e.inputType.fields.map(s=>s.name)))}function cs(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=oc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Xt(e)),n.join(" ")}function Ku(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]=Zt(e.argumentPath),s=new Yt,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(ps).join(" | ");a.addSuggestion(new le(o,l).makeRequired())}}function ps(e){return e.kind==="list"?`${ps(e.elementType)}[]`:e.name}function zu(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=_r("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 Yu(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=_r("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Zu(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 Xu(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&&ds(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")} ${_r("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(Xt(i)),o.join(" ")})}function ec(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 ${_r("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function ms(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,"true"))}function tc(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new le(r.name,"true"))}function rc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new le(r.name,"true"))}function nc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function ds(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 Zt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Xt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function _r(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var ic=3;function oc(e,t){let r=1/0,n;for(let i of t){let o=(0,us.default)(e,i);o>ic||o({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?.[ht(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:Ee(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};f();c();p();m();d();var ys=e=>({command:e});f();c();p();m();d();f();c();p();m();d();var ws=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);f();c();p();m();d();function tr(e){try{return Es(e,"fast")}catch{return Es(e,"slow")}}function Es(e,t){return JSON.stringify(e.map(r=>gc(r,t)))}function gc(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:tt(e)?{prisma__type:"date",prisma__value:e.toJSON()}:Pe.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:w.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:hc(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?xs(e):e}function hc(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function xs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(bs);let t={};for(let r of Object.keys(e))t[r]=bs(e[r]);return t}function bs(e){return typeof e=="bigint"?e.toString():xs(e)}var yc=/^(\s*alter\s)/i,Ps=ee("prisma:client");function $n(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&yc.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 ai=({clientMethod:e,activeProvider:t,activeProviderFlavour:r})=>n=>{r!==void 0&&(t=r);let o="",i;if(Array.isArray(n)){let[s,...a]=n;o=s,i={values:kr(a||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{o=n.sql,i={values:kr(n.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{o=n.text,i={values:kr(n.values),__prismaRawParameters__:!0};break}case"sqlserver":{o=xu(n),i={values:kr(n.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i!=null&&i.values?Pu(`prisma.${e}(${o}, ${i.values})`):Pu(`prisma.${e}(${o})`),{query:o,parameters:i}},vu={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new Ae(t,r)}},Au={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};d();p();f();function ui(e){return function(r){let n,o=(i=e)=>{try{return i===void 0||(i==null?void 0:i.kind)==="itx"?n!=null?n:n=Tu(r(i)):Tu(r(i))}catch(s){return Promise.reject(s)}};return{then(i,s){return o().then(i,s)},catch(i){return o().catch(i)},finally(i){return o().finally(i)},requestTransaction(i){let s=o(i);return s.requestTransaction?s.requestTransaction(i):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Tu(e){return typeof e.then=="function"?e:Promise.resolve(e)}d();p();f();var Cu={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},li=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(){var t,r;return(r=(t=globalThis.PRISMA_INSTRUMENTATION)==null?void 0:t.helper)!=null?r:Cu}};function Mu(e){return e.includes("tracing")?new li:Cu}d();p();f();function Su(e,t=()=>{}){let r,n=new Promise(o=>r=o);return{then(o){return--e===0&&r(t()),o==null?void 0:o(n)}}}d();p();f();var Sd=["$connect","$disconnect","$on","$transaction","$use","$extends"],Ru=Sd;d();p();f();function Ou(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)}d();p();f();var qn=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}};d();p();f();var Iu=Pe(Us());d();p();f();function Vn(e){return typeof e.batchRequestIdx=="number"}d();p();f();function Kn(e){return e===null?e:Array.isArray(e)?e.map(Kn):typeof e=="object"?Rd(e)?Od(e):jt(e,Kn):e}function Rd(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Od({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return x.Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new Ke(t);case"Json":return JSON.parse(t);default:xt(t,"Unknown tagged value")}}d();p();f();function Fu(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(ci(e.query.arguments)),t.push(ci(e.query.selection)),t.join("")}function ci(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${ci(n)})`:r}).join(" ")})`}d();p();f();var Fd={aggregate:!1,aggregateRaw:!1,createMany:!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 pi(e){return Fd[e]}d();p();f();var Gn=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,o)=>{this.batches[r].push({request:t,resolve:n,reject:o})})):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,o)=>this.options.batchOrder(n.request,o.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let o=0;o{for(let o=0;o{let{transaction:i,otelParentCtx:s}=n[0],a=n.map(m=>m.protocolQuery),u=this.client._tracingHelper.getTraceParent(s),l=n.some(m=>pi(m.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:u,transaction:kd(i),containsWrite:l,customDataProxyFetch:o})).map((m,g)=>{if(m instanceof Error)return m;try{return this.mapQueryEngineResult(n[g],m)}catch(w){return w}})}),singleLoader:async n=>{var s;let o=((s=n.transaction)==null?void 0:s.kind)==="itx"?ku(n.transaction):void 0,i=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:o,isWrite:pi(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,i)},batchBy:n=>{var o;return(o=n.transaction)!=null&&o.id?`transaction-${n.transaction.id}`:Fu(n.protocolQuery)},batchOrder(n,o){var i,s;return((i=n.transaction)==null?void 0:i.kind)==="batch"&&((s=o.transaction)==null?void 0:s.kind)==="batch"?n.transaction.index-o.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:o,transaction:i,args:s}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:o,transaction:i,args:s})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let o=n==null?void 0:n.data,i=n==null?void 0:n.elapsed,s=this.unpack(o,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:i}: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:o,args:i}){if(Id(t),Dd(t,o)||t instanceof tt)throw t;if(t instanceof de&&_d(t)){let a=Du(t.meta);$n({args:i,errors:[a],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion})}let s=t.message;throw n&&(s=Ht({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:s})),s=this.sanitizeMessage(s),t.code?new de(s,{code:t.code,clientVersion:this.client._clientVersion,meta:t.meta,batchRequestIdx:t.batchRequestIdx}):t.isPanic?new rt(s,this.client._clientVersion):t instanceof Se?new Se(s,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx}):t instanceof ae?new ae(s,this.client._clientVersion):t instanceof rt?new rt(s,this.client._clientVersion):(t.clientVersion=this.client._clientVersion,t)}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Iu.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let o=Object.values(t)[0],i=r.filter(a=>a!=="select"&&a!=="include"),s=Kn(qo(o,i));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function kd(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:ku(e)};xt(e,"Unknown transaction kind")}}function ku(e){return{id:e.id,payload:e.payload}}function Dd(e,t){return Vn(e)&&(t==null?void 0:t.kind)==="batch"&&e.batchRequestIdx!==t.index}function _d(e){return e.code==="P2009"||e.code==="P2012"}function Du(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Du)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}d();p();f();var _u="5.4.2";var Nu=_u;d();p();f();function Lu(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=Bu(t[n]);return r})}function Bu({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return x.Buffer.from(t,"base64");case"decimal":return new Ke(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map(Bu);default:return t}}d();p();f();var qu=Pe(ni());d();p();f();var Q=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(Q,"PrismaClientConstructorValidationError");var ju=["datasources","datasourceUrl","errorFormat","adapter","log","__internal"],Uu=["pretty","colorless","minimal"],$u=["info","query","warn","error"],Ld={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new Q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let o=Xt(r,t)||` Available datasources: ${t.join(", ")}`;throw new Q(`Unknown datasource ${r} provided to PrismaClient constructor.${o}`)}if(typeof n!="object"||Array.isArray(n))throw new Q(`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[o,i]of Object.entries(n)){if(o!=="url")throw new Q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof i!="string")throw new Q(`Invalid value ${JSON.stringify(i)} 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 Q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Nn(t).includes("driverAdapters"))throw new Q('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.')},datasourceUrl:e=>{if(typeof e!="undefined"&&typeof e!="string")throw new Q(`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 Q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Uu.includes(e)){let t=Xt(e,Uu);throw new Q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new Q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!$u.includes(r)){let n=Xt(r,$u);throw new Q(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:o=>{let i=["stdout","event"];if(!i.includes(o)){let s=Xt(o,i);throw new Q(`Invalid value ${JSON.stringify(o)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[o,i]of Object.entries(r))if(n[o])n[o](i);else throw new Q(`Invalid property ${o} for "log" provided to PrismaClient constructor`)}},__internal:e=>{if(!e)return;let t=["debug","hooks","engine","measurePerformance"];if(typeof e!="object")throw new Q(`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 Q(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Vu(e,t){for(let[r,n]of Object.entries(e)){if(!ju.includes(r)){let o=Xt(r,ju);throw new Q(`Unknown property ${r} provided to PrismaClient constructor.${o}`)}Ld[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new Q('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=Bd(e,t);return r?` Did you mean "${r}"?`:""}function Bd(e,t){if(t.length===0)return null;let r=t.map(o=>({value:o,distance:(0,qu.default)(e,o)}));r.sort((o,i)=>o.distance{let n=new Array(e.length),o=null,i=!1,s=0,a=()=>{i||(s++,s===e.length&&(i=!0,o?r(o):t(n)))},u=l=>{i||(i=!0,r(l))};for(let l=0;l{n[l]=c,a()},c=>{if(!Vn(c)){u(c);return}c.batchRequestIdx===l?u(c):(o||(o=c),a())})})}var ct=he("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var jd={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Ud=Symbol.for("prisma.client.transaction.id"),$d={id:0,nextId(){return++this.id}};function qd(e){class t{constructor(n){this._middlewares=new qn;this._createPrismaPromise=ui();this.$extends=Fa;var u,l,c,m,g,w;Qa(e),n&&Vu(n,e);let o=n!=null&&n.adapter?Vs(n.adapter):void 0,i=new Ju.EventEmitter().on("error",()=>{});this._extensions=In.empty(),this._previewFeatures=Nn(e),this._clientVersion=(u=e.clientVersion)!=null?u:Nu,this._activeProvider=e.activeProvider,this._tracingHelper=Mu(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Dr.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Dr.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=(l=e.injectableEdgeEnv)==null?void 0:l.call(e);try{let E=n!=null?n:{},b=(c=E.__internal)!=null?c:{},T=b.debug===!0;T&&he.enable("prisma:client");let S=Dr.default.resolve(e.dirname,e.relativePath);sn.existsSync(S)||(S=e.dirname),ct("dirname",e.dirname),ct("relativePath",e.relativePath),ct("cwd",S);let R=b.engine||{};if(E.errorFormat?this._errorFormat=E.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:S,dirname:e.dirname,enableDebugLogs:T,allowTriggerPanic:R.allowTriggerPanic,datamodelPath:Dr.default.join(e.dirname,(m=e.filename)!=null?m:"schema.prisma"),prismaPath:(g=R.binaryPath)!=null?g:void 0,engineEndpoint:R.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:E.log&&Ou(E.log),logQueries:E.log&&!!(typeof E.log=="string"?E.log==="query":E.log.find(C=>typeof C=="string"?C==="query":C.level==="query")),env:(w=a==null?void 0:a.parsed)!=null?w:{},flags:[],clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Wa(E,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,logEmitter:i,isBundled:e.isBundled,adapter:o},ct("clientVersion",e.clientVersion),this._engine=nu(e,this._engineConfig),this._requestHandler=new Jn(this,i),E.log)for(let C of E.log){let M=typeof C=="string"?C:C.emit==="stdout"?C.level:null;M&&this.$on(M,N=>{var L;Bt.log(`${(L=Bt.tags[M])!=null?L:""}`,N.message||N.query)})}this._metrics=new sr(this._engine)}catch(E){throw E.clientVersion=this._clientVersion,E}return this._appliedParent=hr(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,o){n==="beforeExit"?this._engine.on("beforeExit",o):this._engine.on(n,i=>{var a,u,l,c;let s=i.fields;return o(n==="query"?{timestamp:i.timestamp,query:(a=s==null?void 0:s.query)!=null?a:i.query,params:(u=s==null?void 0:s.params)!=null?u:i.params,duration:(l=s==null?void 0:s.duration_ms)!=null?l:i.duration,target:i.target}:{timestamp:i.timestamp,message:(c=s==null?void 0:s.message)!=null?c:i.message,target:i.target})})}$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{bs()}}$executeRawInternal(n,o,i,s){var l;let a=this._activeProvider,u=(l=this._engineConfig.adapter)==null?void 0:l.flavour;return this._request({action:"executeRaw",args:i,transaction:n,clientMethod:o,argsMapper:ai({clientMethod:o,activeProvider:a,activeProviderFlavour:u}),callsite:lt(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...o){return this._createPrismaPromise(i=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Gu(n,o);return si(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(i,"$executeRaw",s,a)}throw new me("`$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,...o){return this._createPrismaPromise(i=>(si(this._activeProvider,n,o,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(i,"$executeRawUnsafe",[n,...o])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new me(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(o=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:hu,callsite:lt(this._errorFormat),transaction:o}))}async $queryRawInternal(n,o,i,s){var l;let a=this._activeProvider,u=(l=this._engineConfig.adapter)==null?void 0:l.flavour;return this._request({action:"queryRaw",args:i,transaction:n,clientMethod:o,argsMapper:ai({clientMethod:o,activeProvider:a,activeProviderFlavour:u}),callsite:lt(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(Lu)}$queryRaw(n,...o){return this._createPrismaPromise(i=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(i,"$queryRaw",...Gu(n,o));throw new me("`$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})})}$queryRawUnsafe(n,...o){return this._createPrismaPromise(i=>this.$queryRawInternal(i,"$queryRawUnsafe",[n,...o]))}_transactionWithArray({promises:n,options:o}){let i=$d.nextId(),s=Su(n.length),a=n.map((u,l)=>{var g,w;if((u==null?void 0: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 c=o==null?void 0:o.isolationLevel,m={kind:"batch",id:i,index:l,isolationLevel:c,lock:s};return(w=(g=u.requestTransaction)==null?void 0:g.call(u,m))!=null?w:u});return Ku(a)}async _transactionWithCallback({callback:n,options:o}){let i={traceparent:this._tracingHelper.getTraceParent()},s=await this._engine.transaction("start",i,o),a;try{let u={kind:"itx",...s};a=await n(this._createItxClient(u)),await this._engine.transaction("commit",i,s)}catch(u){throw await this._engine.transaction("rollback",i,s).catch(()=>{}),u}return a}_createItxClient(n){return hr(Ne(Rn(this),[ge("_appliedParent",()=>this._appliedParent._createItxClient(n)),ge("_createPrismaPromise",()=>ui(n)),ge(Ud,()=>n.id),dr(Ru)]))}$transaction(n,o){let i;typeof n=="function"?i=()=>this._transactionWithCallback({callback:n,options:o}):i=()=>this._transactionWithArray({promises:n,options:o});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,i)}_request(n){var l;n.otelParentCtx=this._tracingHelper.getActiveContext();let o=(l=n.middlewareArgsMapper)!=null?l:jd,i={args:o.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:i.action,model:i.model,name:i.model?`${i.model}.${i.action}`:i.action}}},a=-1,u=async c=>{let m=this._middlewares.get(++a);if(m)return this._tracingHelper.runInChildSpan(s.middleware,S=>m(c,R=>(S==null||S.end(),u(R))));let{runInTransaction:g,args:w,...E}=c,b={...n,...E};w&&(b.args=o.middlewareArgsToRequestArgs(w)),n.transaction!==void 0&&g===!1&&delete b.transaction;let T=await Ba(this,b);return b.model?Da({result:T,modelName:b.model,args:b.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):T};return this._tracingHelper.runInChildSpan(s.operation,()=>u(i))}async _executeRequest({args:n,clientMethod:o,dataPath:i,callsite:s,action:a,model:u,argsMapper:l,transaction:c,unpacker:m,otelParentCtx:g,customDataProxyFetch:w}){try{n=l?l(n):n;let E={name:"serialize"},b=this._tracingHelper.runInChildSpan(E,()=>mu({modelName:u,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:o,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion}));return he.enabled("prisma:client")&&(ct("Prisma Client call:"),ct(`prisma.${o}(${ma(n)})`),ct("Generated request:"),ct(JSON.stringify(b,null,2)+` -`)),(c==null?void 0:c.kind)==="batch"&&await c.lock,this._requestHandler.request({protocolQuery:b,modelName:u,action:a,clientMethod:o,dataPath:i,callsite:s,args:n,extensions:this._extensions,transaction:c,unpacker:m,otelParentCtx:g,otelChildCtx:this._tracingHelper.getActiveContext(),customDataProxyFetch:w})}catch(E){throw E.clientVersion=this._clientVersion,E}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new me("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){var o;return!!((o=this._engineConfig.previewFeatures)!=null&&o.includes(n))}}return t}function Gu(e,t){return Vd(e)?[new Ae(e,t),vu]:[e,Au]}function Vd(e){return Array.isArray(e)&&Array.isArray(e.raw)}d();p();f();var Kd=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Gd(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Kd.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}d();p();f();var export_warnEnvConflicts=void 0;export{Me as DMMF,ro as DMMFClass,xs as Debug,Ke as Decimal,ji as Extensions,sr as MetricsClient,tt as NotFoundError,qe as ObjectEnumValue,ae as PrismaClientInitializationError,de as PrismaClientKnownRequestError,rt as PrismaClientRustPanicError,Se as PrismaClientUnknownRequestError,me as PrismaClientValidationError,$i as Public,Ae as Sql,Ji as Types,Gc as defineDmmfProperty,Yc as empty,qd as getPrismaClient,Ru as itxClientDenyList,Zc as join,Gd as makeStrictEnum,V0 as objectEnumNames,Fo as objectEnumValues,Gs as raw,Js as sqltag,export_warnEnvConflicts as warnEnvConflicts,un as warnOnce}; +`)}var qn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:tr(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:tr(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:tr(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=ws(r),i={values:tr(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Ps(`prisma.${e}(${n}, ${i.values})`):Ps(`prisma.${e}(${n})`),{query:n,parameters:i}},vs={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ae(t,r)}},Ts={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};f();c();p();m();d();function Vn(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=As(r(o)):As(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 As(e){return typeof e.then=="function"?e:Promise.resolve(e)}f();c();p();m();d();var Cs={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},jn=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??Cs}};function Rs(e){return e.includes("tracing")?new jn:Cs}f();c();p();m();d();function Ss(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}f();c();p();m();d();var wc=["$connect","$disconnect","$on","$transaction","$use","$extends"],Os=wc;f();c();p();m();d();function Is(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();m();d();var Br=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();m();d();var Ms=_e(Vi());f();c();p();m();d();function Ur(e){return typeof e.batchRequestIdx=="number"}f();c();p();m();d();function $r(e){return e===null?e:Array.isArray(e)?e.map($r):typeof e=="object"?Ec(e)?bc(e):Ze(e,$r):e}function Ec(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function bc({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return w.Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new Pe(t);case"Json":return JSON.parse(t);default:Ee(t,"Unknown tagged value")}}f();c();p();m();d();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(Gn(e.query.arguments)),t.push(Gn(e.query.selection)),t.join("")}function Gn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Gn(n)})`:r}).join(" ")})`}f();c();p();m();d();var xc={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 Jn(e){return xc[e]}f();c();p();m();d();var qr=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;iQe("bigint",r));case"bytes-array":return t.map(r=>Qe("bytes",r));case"decimal-array":return t.map(r=>Qe("decimal",r));case"datetime-array":return t.map(r=>Qe("datetime",r));case"date-array":return t.map(r=>Qe("date",r));case"time-array":return t.map(r=>Qe("time",r));default:return t}}function Ds(e){let t=[],r=Pc(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=>Jn(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Tc(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"?Ns(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Jn(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),Ac(t,i)||t instanceof Ce)throw t;if(t instanceof K&&Cc(t)){let u=Fs(t.meta);Lr({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=pt({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 Re(l,this.client._clientVersion);if(t instanceof se)throw new se(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof J)throw new J(l,this.client._clientVersion);if(t instanceof Re)throw new Re(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Ms.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=vn(o,s),l=i==="queryRaw"?Ds(a):$r(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Tc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Ns(e)};Ee(e,"Unknown transaction kind")}}function Ns(e){return{id:e.id,payload:e.payload}}function Ac(e,t){return Ur(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Cc(e){return e.code==="P2009"||e.code==="P2012"}function Fs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Fs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}f();c();p();m();d();var _s="5.18.0";var Ls=_s;f();c();p();m();d();var Vs=_e(Bn());f();c();p();m();d();var U=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(U,"PrismaClientConstructorValidationError");var Bs=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Us=["pretty","colorless","minimal"],$s=["info","query","warn","error"],Sc={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new U(`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=yt(r,t)||` Available datasources: ${t.join(", ")}`;throw new U(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new U(`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 U(`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 U(`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 U('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Nr(t).includes("driverAdapters"))throw new U('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Pt()==="binary")throw new U('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 U(`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 U(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Us.includes(e)){let t=yt(e,Us);throw new U(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new U(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!$s.includes(r)){let n=yt(r,$s);throw new U(`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=yt(i,o);throw new U(`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 U(`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 U(`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 U(`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 U('"omit" option is expected to be an object.');if(e===null)throw new U('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Ic(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 U(kc(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new U(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=yt(r,t);throw new U(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function js(e,t){for(let[r,n]of Object.entries(e)){if(!Bs.includes(r)){let i=yt(r,Bs);throw new U(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Sc[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new U('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function yt(e,t){if(t.length===0||typeof e!="string")return"";let r=Oc(e,t);return r?` Did you mean "${r}"?`:""}function Oc(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Vs.default)(e,i)}));r.sort((i,o)=>i.distanceht(n)===t);if(r)return e[r]}function kc(e,t){let r=ut(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}=Sr(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}f();c();p();m();d();function Gs(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 Ne=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Dc={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Mc=Symbol.for("prisma.client.transaction.id"),Nc={id:0,nextId(){return++this.id}};function Fc(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Br;this._createPrismaPromise=Vn();this.$extends=Oo;e=n?.__internal?.configOverride?.(e)??e,Qo(e),n&&js(n,e);let i=new cr().on("error",()=>{});this._extensions=Dr.empty(),this._previewFeatures=Nr(e),this._clientVersion=e.clientVersion??Ls,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Rs(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&xt.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&xt.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 J(`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 J("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=xt.resolve(e.dirname,e.relativePath);hi.existsSync(h)||(h=e.dirname),Ne("dirname",e.dirname),Ne("relativePath",e.relativePath),Ne("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:xt.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&&Is(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:Ho(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:mt,getBatchRequestPayload:gr,prismaGraphQLToJSError:Ft,PrismaClientUnknownRequestError:se,PrismaClientInitializationError:J,PrismaClientKnownRequestError:K,debug:ee("prisma:client:accelerateEngine"),engineVersion:Qs.version,clientVersion:e.clientVersion}},Ne("clientVersion",e.clientVersion),this._engine=ns(e,this._engineConfig),this._requestHandler=new Vr(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,R=>{Tt.log(`${Tt.tags[C]??""}`,R.message||R.query)})}this._metrics=new At(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=_t(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{ki()}}$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:Me(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Js(n,i);return $n(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=>($n(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:ys,callsite:Me(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:Me(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",...Js(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})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Nc.nextId(),s=Ss(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 Gs(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 _t(fe(So(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>Vn(n)),te(Mc,()=>n.id),Xe(Os)]))}$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??Dc,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,C={...n,...S};v&&(C.args=i.middlewareArgsToRequestArgs(v)),n.transaction!==void 0&&h===!1&&delete C.transaction;let R=await _o(this,C);return C.model?Do({result:R,modelName:C.model,args:C.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 C={name:"serialize"},R=this._tracingHelper.runInChildSpan(C,()=>fs({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")&&(Ne("Prisma Client call:"),Ne(`prisma.${i}(${yo(n)})`),Ne("Generated request:"),Ne(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(C){throw C.clientVersion=this._clientVersion,C}}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 Js(e,t){return _c(e)?[new ae(e,t),vs]:[e,Ts]}function _c(e){return Array.isArray(e)&&Array.isArray(e.raw)}f();c();p();m();d();var Lc=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Bc(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Lc.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}f();c();p();m();d();var export_warnEnvConflicts=void 0;export{Ii as Debug,Pe as Decimal,di as Extensions,At as MetricsClient,Ce as NotFoundError,J as PrismaClientInitializationError,K as PrismaClientKnownRequestError,Re as PrismaClientRustPanicError,se as PrismaClientUnknownRequestError,Z as PrismaClientValidationError,gi as Public,ae as Sql,Ga as defineDmmfProperty,za as empty,Fc as getPrismaClient,Rn as getRuntime,Ka as join,Bc as makeStrictEnum,pn as objectEnumValues,Hi as raw,Wi as sqltag,export_warnEnvConflicts as warnEnvConflicts,pr as warnOnce}; //# sourceMappingURL=edge-esm.js.map diff --git a/experiments/postgres/prisma/generated/client/runtime/edge.js b/experiments/postgres/prisma/generated/client/runtime/edge.js index 2488a0be3..2f1ccd190 100644 --- a/experiments/postgres/prisma/generated/client/runtime/edge.js +++ b/experiments/postgres/prisma/generated/client/runtime/edge.js @@ -1,43 +1,31 @@ -"use strict";var il=Object.create;var tr=Object.defineProperty;var sl=Object.getOwnPropertyDescriptor;var al=Object.getOwnPropertyNames;var ul=Object.getPrototypeOf,ll=Object.prototype.hasOwnProperty;var cl=(e,t,r)=>t in e?tr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Br=(e,t)=>()=>(e&&(t=e(e=0)),t);var Z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),rr=(e,t)=>{for(var r in t)tr(e,r,{get:t[r],enumerable:!0})},vi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of al(t))!ll.call(e,o)&&o!==r&&tr(e,o,{get:()=>t[o],enumerable:!(n=sl(t,o))||n.enumerable});return e};var ve=(e,t,r)=>(r=e!=null?il(ul(e)):{},vi(t||!e||!e.__esModule?tr(r,"default",{value:e,enumerable:!0}):r,e)),pl=e=>vi(tr({},"__esModule",{value:!0}),e);var Ai=(e,t,r)=>(cl(e,typeof t!="symbol"?t+"":t,r),r);function B(e){return()=>e}function Ie(){return y}var y,p=Br(()=>{"use strict";y={abort:B(void 0),addListener:B(Ie()),allowedNodeEnvironmentFlags:new Set,arch:"x64",argv:["/bin/node"],argv0:"node",chdir:B(void 0),config:{target_defaults:{cflags:[],default_configuration:"",defines:[],include_dirs:[],libraries:[]},variables:{clang:0,host_arch:"x64",node_install_npm:!1,node_install_waf:!1,node_prefix:"",node_shared_openssl:!1,node_shared_v8:!1,node_shared_zlib:!1,node_use_dtrace:!1,node_use_etw:!1,node_use_openssl:!1,target_arch:"x64",v8_no_strict_aliasing:0,v8_use_snapshot:!1,visibility:""}},connected:!1,cpuUsage:()=>({user:0,system:0}),cwd:()=>"/",debugPort:0,disconnect:B(void 0),constrainedMemory:()=>{},emit:B(Ie()),emitWarning:B(void 0),env:{},eventNames:()=>[],execArgv:[],execPath:"/",exit:B(void 0),features:{inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1},getMaxListeners:B(0),getegid:B(0),geteuid:B(0),getgid:B(0),getgroups:B([]),getuid:B(0),hasUncaughtExceptionCaptureCallback:B(!1),hrtime:B([0,0]),platform:"linux",kill:B(!0),listenerCount:B(0),listeners:B([]),memoryUsage:B({arrayBuffers:0,external:0,heapTotal:0,heapUsed:0,rss:0}),nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},off:B(Ie()),on:B(Ie()),once:B(Ie()),openStdin:B({}),pid:0,ppid:0,prependListener:B(Ie()),prependOnceListener:B(Ie()),rawListeners:B([]),release:{name:"node"},removeAllListeners:B(Ie()),removeListener:B(Ie()),resourceUsage:B({fsRead:0,fsWrite:0,involuntaryContextSwitches:0,ipcReceived:0,ipcSent:0,majorPageFault:0,maxRSS:0,minorPageFault:0,sharedMemorySize:0,signalsCount:0,swappedOut:0,systemCPUTime:0,unsharedDataSize:0,unsharedStackSize:0,userCPUTime:0,voluntaryContextSwitches:0}),setMaxListeners:B(Ie()),setUncaughtExceptionCaptureCallback:B(void 0),setegid:B(void 0),seteuid:B(void 0),setgid:B(void 0),setgroups:B(void 0),setuid:B(void 0),stderr:{fd:2},stdin:{fd:0},stdout:{fd:1},title:"node",traceDeprecation:!1,umask:B(0),uptime:B(0),version:"",versions:{http_parser:"",node:"",v8:"",ares:"",uv:"",zlib:"",modules:"",openssl:""}}});var h,f=Br(()=>{"use strict";h=()=>{};h.prototype=h});var Vi=Z(Ot=>{"use strict";d();p();f();var Ri=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fl=Ri(e=>{"use strict";e.byteLength=u,e.toByteArray=c,e.fromByteArray=w;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(i=0,s=o.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var T=E.indexOf("=");T===-1&&(T=b);var S=T===b?0:4-T%4;return[T,S]}function u(E){var b=a(E),T=b[0],S=b[1];return(T+S)*3/4-S}function l(E,b,T){return(b+T)*3/4-T}function c(E){var b,T=a(E),S=T[0],R=T[1],C=new n(l(E,S,R)),M=0,N=R>0?S-4:S,L;for(L=0;L>16&255,C[M++]=b>>8&255,C[M++]=b&255;return R===2&&(b=r[E.charCodeAt(L)]<<2|r[E.charCodeAt(L+1)]>>4,C[M++]=b&255),R===1&&(b=r[E.charCodeAt(L)]<<10|r[E.charCodeAt(L+1)]<<4|r[E.charCodeAt(L+2)]>>2,C[M++]=b>>8&255,C[M++]=b&255),C}function m(E){return t[E>>18&63]+t[E>>12&63]+t[E>>6&63]+t[E&63]}function g(E,b,T){for(var S,R=[],C=b;CN?N:M+C));return S===1?(b=E[T-1],R.push(t[b>>2]+t[b<<4&63]+"==")):S===2&&(b=(E[T-2]<<8)+E[T-1],R.push(t[b>>10]+t[b>>4&63]+t[b<<2&63]+"=")),R.join("")}}),dl=Ri(e=>{e.read=function(t,r,n,o,i){var s,a,u=i*8-o-1,l=(1<>1,m=-7,g=n?i-1:0,w=n?-1:1,E=t[r+g];for(g+=w,s=E&(1<<-m)-1,E>>=-m,m+=u;m>0;s=s*256+t[r+g],g+=w,m-=8);for(a=s&(1<<-m)-1,s>>=-m,m+=o;m>0;a=a*256+t[r+g],g+=w,m-=8);if(s===0)s=1-c;else{if(s===l)return a?NaN:(E?-1:1)*(1/0);a=a+Math.pow(2,o),s=s-c}return(E?-1:1)*a*Math.pow(2,s-o)},e.write=function(t,r,n,o,i,s){var a,u,l,c=s*8-i-1,m=(1<>1,w=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=o?0:s-1,b=o?1:-1,T=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,a=m):(a=Math.floor(Math.log(r)/Math.LN2),r*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+g>=1?r+=w/l:r+=w*Math.pow(2,1-g),r*l>=2&&(a++,l/=2),a+g>=m?(u=0,a=m):a+g>=1?(u=(r*l-1)*Math.pow(2,i),a=a+g):(u=r*Math.pow(2,g-1)*Math.pow(2,i),a=0));i>=8;t[n+E]=u&255,E+=b,u/=256,i-=8);for(a=a<0;t[n+E]=a&255,E+=b,a/=256,c-=8);t[n+E-b]|=T*128}}),Hn=fl(),St=dl(),Ti=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ot.Buffer=P;Ot.SlowBuffer=bl;Ot.INSPECT_MAX_BYTES=50;var jr=2147483647;Ot.kMaxLength=jr;P.TYPED_ARRAY_SUPPORT=ml();!P.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 ml(){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(e){return!1}}Object.defineProperty(P.prototype,"parent",{enumerable:!0,get:function(){if(P.isBuffer(this))return this.buffer}});Object.defineProperty(P.prototype,"offset",{enumerable:!0,get:function(){if(P.isBuffer(this))return this.byteOffset}});function Ve(e){if(e>jr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,P.prototype),t}function P(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 Yn(e)}return Oi(e,t,r)}P.poolSize=8192;function Oi(e,t,r){if(typeof e=="string")return yl(e,t);if(ArrayBuffer.isView(e))return hl(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(ke(e,ArrayBuffer)||e&&ke(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ke(e,SharedArrayBuffer)||e&&ke(e.buffer,SharedArrayBuffer)))return Ii(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 P.from(n,t,r);let o=xl(e);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return P.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)}P.from=function(e,t,r){return Oi(e,t,r)};Object.setPrototypeOf(P.prototype,Uint8Array.prototype);Object.setPrototypeOf(P,Uint8Array);function Fi(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 gl(e,t,r){return Fi(e),e<=0?Ve(e):t!==void 0?typeof r=="string"?Ve(e).fill(t,r):Ve(e).fill(t):Ve(e)}P.alloc=function(e,t,r){return gl(e,t,r)};function Yn(e){return Fi(e),Ve(e<0?0:Xn(e)|0)}P.allocUnsafe=function(e){return Yn(e)};P.allocUnsafeSlow=function(e){return Yn(e)};function yl(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!P.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=ki(e,t)|0,n=Ve(r),o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}function zn(e){let t=e.length<0?0:Xn(e.length)|0,r=Ve(t);for(let n=0;n=jr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+jr.toString(16)+" bytes");return e|0}function bl(e){return+e!=e&&(e=0),P.alloc(+e)}P.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==P.prototype};P.compare=function(e,t){if(ke(e,Uint8Array)&&(e=P.from(e,e.offset,e.byteLength)),ke(t,Uint8Array)&&(t=P.from(t,t.offset,t.byteLength)),!P.isBuffer(e)||!P.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 o=0,i=Math.min(r,n);on.length?(P.isBuffer(i)||(i=P.from(i)),i.copy(n,o)):Uint8Array.prototype.set.call(n,i,o);else if(P.isBuffer(i))i.copy(n,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=i.length}return n};function ki(e,t){if(P.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ke(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 o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Zn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return qi(e).length;default:if(o)return n?-1:Zn(e).length;t=(""+t).toLowerCase(),o=!0}}P.byteLength=ki;function wl(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 Ol(this,t,r);case"utf8":case"utf-8":return _i(this,t,r);case"ascii":return Sl(this,t,r);case"latin1":case"binary":return Rl(this,t,r);case"base64":return Cl(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Fl(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}P.prototype._isBuffer=!0;function mt(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}P.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&&(P.prototype[Ti]=P.prototype.inspect);P.prototype.compare=function(e,t,r,n,o){if(ke(e,Uint8Array)&&(e=P.from(e,e.offset,e.byteLength)),!P.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),o===void 0&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;let i=o-n,s=r-t,a=Math.min(i,s),u=this.slice(n,o),l=e.slice(t,r);for(let c=0;c2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,to(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0)if(o)r=0;else return-1;if(typeof t=="string"&&(t=P.from(t,n)),P.isBuffer(t))return t.length===0?-1:Ci(e,t,r,n,o);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Ci(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function Ci(e,t,r,n,o){let i=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;i=2,s/=2,a/=2,r/=2}function u(c,m){return i===1?c[m]:c.readUInt16BE(m*i)}let l;if(o){let c=-1;for(l=r;ls&&(r=s-a),l=r;l>=0;l--){let c=!0;for(let m=0;mo&&(n=o)):n=o;let i=t.length;n>i/2&&(n=i/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 o=this.length-t;if((r===void 0||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return El(this,e,t,r);case"utf8":case"utf-8":return Pl(this,e,t,r);case"ascii":case"latin1":case"binary":return vl(this,e,t,r);case"base64":return Al(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Tl(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}};P.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Cl(e,t,r){return t===0&&r===e.length?Hn.fromByteArray(e):Hn.fromByteArray(e.slice(t,r))}function _i(e,t,r){r=Math.min(e.length,r);let n=[],o=t;for(;o239?4:i>223?3:i>191?2:1;if(o+a<=r){let u,l,c,m;switch(a){case 1:i<128&&(s=i);break;case 2:u=e[o+1],(u&192)===128&&(m=(i&31)<<6|u&63,m>127&&(s=m));break;case 3:u=e[o+1],l=e[o+2],(u&192)===128&&(l&192)===128&&(m=(i&15)<<12|(u&63)<<6|l&63,m>2047&&(m<55296||m>57343)&&(s=m));break;case 4:u=e[o+1],l=e[o+2],c=e[o+3],(u&192)===128&&(l&192)===128&&(c&192)===128&&(m=(i&15)<<18|(u&63)<<12|(l&63)<<6|c&63,m>65535&&m<1114112&&(s=m))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),o+=a}return Ml(n)}var Mi=4096;function Ml(e){let t=e.length;if(t<=Mi)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let o="";for(let i=t;ir&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}P.prototype.readUintLE=P.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||ee(e,t,this.length);let n=this[e],o=1,i=0;for(;++i>>0,t=t>>>0,r||ee(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n};P.prototype.readUint8=P.prototype.readUInt8=function(e,t){return e=e>>>0,t||ee(e,1,this.length),this[e]};P.prototype.readUint16LE=P.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||ee(e,2,this.length),this[e]|this[e+1]<<8};P.prototype.readUint16BE=P.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||ee(e,2,this.length),this[e]<<8|this[e+1]};P.prototype.readUint32LE=P.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};P.prototype.readUint32BE=P.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};P.prototype.readBigUInt64LE=Ze(function(e){e=e>>>0,Rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&nr(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,o=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(o)<>>0,Rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&nr(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],o=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||ee(e,t,this.length);let n=this[e],o=1,i=0;for(;++i=o&&(n-=Math.pow(2,8*t)),n};P.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||ee(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i};P.prototype.readInt8=function(e,t){return e=e>>>0,t||ee(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};P.prototype.readInt16LE=function(e,t){e=e>>>0,t||ee(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};P.prototype.readInt16BE=function(e,t){e=e>>>0,t||ee(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};P.prototype.readInt32LE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};P.prototype.readInt32BE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};P.prototype.readBigInt64LE=Ze(function(e){e=e>>>0,Rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&nr(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,Rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&nr(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||ee(e,4,this.length),St.read(this,e,!0,23,4)};P.prototype.readFloatBE=function(e,t){return e=e>>>0,t||ee(e,4,this.length),St.read(this,e,!1,23,4)};P.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||ee(e,8,this.length),St.read(this,e,!0,52,8)};P.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||ee(e,8,this.length),St.read(this,e,!1,52,8)};function ye(e,t,r,n,o,i){if(!P.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}P.prototype.writeUintLE=P.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;ye(this,e,t,r,s,0)}let o=1,i=0;for(this[t]=e&255;++i>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;ye(this,e,t,r,s,0)}let o=r-1,i=1;for(this[t+o]=e&255;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r};P.prototype.writeUint8=P.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,1,255,0),this[t]=e&255,t+1};P.prototype.writeUint16LE=P.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};P.prototype.writeUint16BE=P.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};P.prototype.writeUint32LE=P.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ye(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};P.prototype.writeUint32BE=P.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ye(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 Ni(e,t,r,n,o){$i(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i;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,o){$i(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i=i>>8,e[r+6]=i,i=i>>8,e[r+5]=i,i=i>>8,e[r+4]=i;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}P.prototype.writeBigUInt64LE=Ze(function(e,t=0){return Ni(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});P.prototype.writeBigUInt64BE=Ze(function(e,t=0){return Li(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});P.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ye(this,e,t,r,a-1,-a)}let o=0,i=1,s=0;for(this[t]=e&255;++o>0)-s&255;return t+r};P.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ye(this,e,t,r,a-1,-a)}let o=r-1,i=1,s=0;for(this[t+o]=e&255;--o>=0&&(i*=256);)e<0&&s===0&&this[t+o+1]!==0&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+r};P.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};P.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};P.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ye(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};P.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ye(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};P.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ye(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};P.prototype.writeBigInt64LE=Ze(function(e,t=0){return Ni(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});P.prototype.writeBigInt64BE=Ze(function(e,t=0){return Li(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Bi(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ji(e,t,r,n,o){return t=+t,r=r>>>0,o||Bi(e,t,r,4,34028234663852886e22,-34028234663852886e22),St.write(e,t,r,n,23,4),r+4}P.prototype.writeFloatLE=function(e,t,r){return ji(this,e,t,!0,r)};P.prototype.writeFloatBE=function(e,t,r){return ji(this,e,t,!1,r)};function Ui(e,t,r,n,o){return t=+t,r=r>>>0,o||Bi(e,t,r,8,17976931348623157e292,-17976931348623157e292),St.write(e,t,r,n,52,8),r+8}P.prototype.writeDoubleLE=function(e,t,r){return Ui(this,e,t,!0,r)};P.prototype.writeDoubleBE=function(e,t,r){return Ui(this,e,t,!1,r)};P.prototype.copy=function(e,t,r,n){if(!P.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 o;if(typeof e=="number")for(o=t;o2**32?o=Si(String(r)):typeof r=="bigint"&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=Si(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n},RangeError);function Si(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 Il(e,t,r){Rt(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&nr(t,e.length-(r+1))}function $i(e,t,r,n,o,i){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(i+1)*8}${s}`:a=`>= -(2${s} ** ${(i+1)*8-1}${s}) and < 2 ** ${(i+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Mt.ERR_OUT_OF_RANGE("value",a,e)}Il(n,o,i)}function Rt(e,t){if(typeof e!="number")throw new Mt.ERR_INVALID_ARG_TYPE(t,"number",e)}function nr(e,t,r){throw Math.floor(e)!==e?(Rt(e,r),new Mt.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Mt.ERR_BUFFER_OUT_OF_BOUNDS:new Mt.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var kl=/[^+/0-9A-Za-z-_]/g;function Dl(e){if(e=e.split("=")[0],e=e.trim().replace(kl,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Zn(e,t){t=t||1/0;let r,n=e.length,o=null,i=[];for(let s=0;s55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function _l(e){let t=[];for(let r=0;r>8,o=r%256,i.push(o),i.push(n);return i}function qi(e){return Hn.toByteArray(Dl(e))}function Ur(e,t,r,n){let o;for(o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function ke(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function to(e){return e!==e}var Ll=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function Ze(e){return typeof BigInt>"u"?Bl:e}function Bl(){throw new Error("BigInt not supported")}});var x,d=Br(()=>{"use strict";x=ve(Vi())});var go=Z(j=>{"use strict";d();p();f();var W=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Yi=W((e,t)=>{"use strict";t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var i=42;r[n]=i;for(n in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var s=Object.getOwnPropertySymbols(r);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(r,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(r,n);if(a.value!==i||a.enumerable!==!0)return!1}return!0}}),Qr=W((e,t)=>{"use strict";var r=Yi();t.exports=function(){return r()&&!!Symbol.toStringTag}}),jl=W((e,t)=>{"use strict";var r=typeof Symbol<"u"&&Symbol,n=Yi();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}),Ul=W((e,t)=>{"use strict";var r={foo:{}},n=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof n)}}),$l=W((e,t)=>{"use strict";var r="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,o=Object.prototype.toString,i="[object Function]";t.exports=function(s){var a=this;if(typeof a!="function"||o.call(a)!==i)throw new TypeError(r+a);for(var u=n.call(arguments,1),l,c=function(){if(this instanceof l){var b=a.apply(this,u.concat(n.call(arguments)));return Object(b)===b?b:this}else return a.apply(s,u.concat(n.call(arguments)))},m=Math.max(0,a.length-u.length),g=[],w=0;w{"use strict";var r=$l();t.exports=h.prototype.bind||r}),ql=W((e,t)=>{"use strict";var r=lo();t.exports=r.call(h.call,Object.prototype.hasOwnProperty)}),co=W((e,t)=>{"use strict";var r,n=SyntaxError,o=h,i=TypeError,s=function($){try{return o('"use strict"; return ('+$+").constructor;")()}catch(U){}},a=Object.getOwnPropertyDescriptor;if(a)try{a({},"")}catch($){a=null}var u=function(){throw new i},l=a?function(){try{return arguments.callee,u}catch($){try{return a(arguments,"callee").get}catch(U){return u}}}():u,c=jl()(),m=Ul()(),g=Object.getPrototypeOf||(m?function($){return $.__proto__}:null),w={},E=typeof Uint8Array>"u"||!g?r:g(Uint8Array),b={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":c&&g?g([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":w,"%AsyncGenerator%":w,"%AsyncGeneratorFunction%":w,"%AsyncIteratorPrototype%":w,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":void 0,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":w,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c&&g?g(g([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!c||!g?r:g(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!c||!g?r:g(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c&&g?g(""[Symbol.iterator]()):r,"%Symbol%":c?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":l,"%TypedArray%":E,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(g)try{null.error}catch($){T=g(g($)),b["%Error.prototype%"]=T}var T,S=function $(U){var O;if(U==="%AsyncFunction%")O=s("async function () {}");else if(U==="%GeneratorFunction%")O=s("function* () {}");else if(U==="%AsyncGeneratorFunction%")O=s("async function* () {}");else if(U==="%AsyncGenerator%"){var ie=$("%AsyncGeneratorFunction%");ie&&(O=ie.prototype)}else if(U==="%AsyncIteratorPrototype%"){var se=$("%AsyncGenerator%");se&&g&&(O=g(se.prototype))}return b[U]=O,O},R={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=lo(),M=ql(),N=C.call(h.call,Array.prototype.concat),L=C.call(h.apply,Array.prototype.splice),Te=C.call(h.call,String.prototype.replace),V=C.call(h.call,String.prototype.slice),H=C.call(h.call,RegExp.prototype.exec),Ee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,z=/\\(\\)?/g,Pe=function($){var U=V($,0,1),O=V($,-1);if(U==="%"&&O!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(O==="%"&&U!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var ie=[];return Te($,Ee,function(se,He,Y,pt){ie[ie.length]=Y?Te(pt,z,"$1"):He||se}),ie},We=function($,U){var O=$,ie;if(M(R,O)&&(ie=R[O],O="%"+ie[0]+"%"),M(b,O)){var se=b[O];if(se===w&&(se=S(O)),typeof se>"u"&&!U)throw new i("intrinsic "+$+" exists, but is not available. Please file an issue!");return{alias:ie,name:O,value:se}}throw new n("intrinsic "+$+" does not exist!")};t.exports=function($,U){if(typeof $!="string"||$.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof U!="boolean")throw new i('"allowMissing" argument must be a boolean');if(H(/^%?[^%]*%?$/,$)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var O=Pe($),ie=O.length>0?O[0]:"",se=We("%"+ie+"%",U),He=se.name,Y=se.value,pt=!1,ze=se.alias;ze&&(ie=ze[0],L(O,N([0,1],ze)));for(var ft=1,qe=!0;ft=O.length){var Ct=a(Y,de);qe=!!Ct,qe&&"get"in Ct&&!("originalValue"in Ct.get)?Y=Ct.get:Y=Y[de]}else qe=M(Y,de),Y=Y[de];qe&&!pt&&(b[He]=Y)}}return Y}}),Vl=W((e,t)=>{"use strict";var r=lo(),n=co(),o=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||r.call(i,o),a=n("%Object.getOwnPropertyDescriptor%",!0),u=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(u)try{u({},"a",{value:1})}catch(m){u=null}t.exports=function(m){var g=s(r,i,arguments);if(a&&u){var w=a(g,"length");w.configurable&&u(g,"length",{value:1+l(0,m.length-(arguments.length-1))})}return g};var c=function(){return s(r,o,arguments)};u?u(t.exports,"apply",{value:c}):t.exports.apply=c}),po=W((e,t)=>{"use strict";var r=co(),n=Vl(),o=n(r("String.prototype.indexOf"));t.exports=function(i,s){var a=r(i,!!s);return typeof a=="function"&&o(i,".prototype.")>-1?n(a):a}}),Kl=W((e,t)=>{"use strict";var r=Qr()(),n=po(),o=n("Object.prototype.toString"),i=function(u){return r&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:o(u)==="[object Arguments]"},s=function(u){return i(u)?!0:u!==null&&typeof u=="object"&&typeof u.length=="number"&&u.length>=0&&o(u)!=="[object Array]"&&o(u.callee)==="[object Function]"},a=function(){return i(arguments)}();i.isLegacyArguments=s,t.exports=a?i:s}),Gl=W((e,t)=>{"use strict";var r=Object.prototype.toString,n=h.prototype.toString,o=/^\s*(?:function)?\*/,i=Qr()(),s=Object.getPrototypeOf,a=function(){if(!i)return!1;try{return h("return function*() {}")()}catch(l){}},u;t.exports=function(l){if(typeof l!="function")return!1;if(o.test(n.call(l)))return!0;if(!i){var c=r.call(l);return c==="[object GeneratorFunction]"}if(!s)return!1;if(typeof u>"u"){var m=a();u=m?s(m):!1}return s(l)===u}}),Jl=W((e,t)=>{"use strict";var r=h.prototype.toString,n=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,o,i;if(typeof n=="function"&&typeof Object.defineProperty=="function")try{o=Object.defineProperty({},"length",{get:function(){throw i}}),i={},n(function(){throw 42},null,o)}catch(M){M!==i&&(n=null)}else n=null;var s=/^\s*class\b/,a=function(M){try{var N=r.call(M);return s.test(N)}catch(L){return!1}},u=function(M){try{return a(M)?!1:(r.call(M),!0)}catch(N){return!1}},l=Object.prototype.toString,c="[object Object]",m="[object Function]",g="[object GeneratorFunction]",w="[object HTMLAllCollection]",E="[object HTML document.all class]",b="[object HTMLCollection]",T=typeof Symbol=="function"&&!!Symbol.toStringTag,S=!(0 in[,]),R=function(){return!1};typeof document=="object"&&(C=document.all,l.call(C)===l.call(document.all)&&(R=function(M){if((S||!M)&&(typeof M>"u"||typeof M=="object"))try{var N=l.call(M);return(N===w||N===E||N===b||N===c)&&M("")==null}catch(L){}return!1}));var C;t.exports=n?function(M){if(R(M))return!0;if(!M||typeof M!="function"&&typeof M!="object")return!1;try{n(M,null,o)}catch(N){if(N!==i)return!1}return!a(M)&&u(M)}:function(M){if(R(M))return!0;if(!M||typeof M!="function"&&typeof M!="object")return!1;if(T)return u(M);if(a(M))return!1;var N=l.call(M);return N!==m&&N!==g&&!/^\[object HTML/.test(N)?!1:u(M)}}),Xi=W((e,t)=>{"use strict";var r=Jl(),n=Object.prototype.toString,o=Object.prototype.hasOwnProperty,i=function(l,c,m){for(var g=0,w=l.length;g=3&&(g=m),n.call(l)==="[object Array]"?i(l,c,g):typeof l=="string"?s(l,c,g):a(l,c,g)};t.exports=u}),es=W((e,t)=>{"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],n=typeof globalThis>"u"?global:globalThis;t.exports=function(){for(var o=[],i=0;i{"use strict";var r=co(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(o){n=null}t.exports=n}),rs=W((e,t)=>{"use strict";var r=Xi(),n=es(),o=po(),i=o("Object.prototype.toString"),s=Qr()(),a=ts(),u=typeof globalThis>"u"?global:globalThis,l=n(),c=o("Array.prototype.indexOf",!0)||function(b,T){for(var S=0;S-1}return a?E(b):!1}}),Ql=W((e,t)=>{"use strict";var r=Xi(),n=es(),o=po(),i=ts(),s=o("Object.prototype.toString"),a=Qr()(),u=typeof globalThis>"u"?global:globalThis,l=n(),c=o("String.prototype.slice"),m={},g=Object.getPrototypeOf;a&&i&&g&&r(l,function(b){if(typeof u[b]=="function"){var T=new u[b];if(Symbol.toStringTag in T){var S=g(T),R=i(S,Symbol.toStringTag);if(!R){var C=g(S);R=i(C,Symbol.toStringTag)}m[b]=R.get}}});var w=function(b){var T=!1;return r(m,function(S,R){if(!T)try{var C=S.call(b);C===R&&(T=C)}catch(M){}}),T},E=rs();t.exports=function(b){return E(b)?!a||!(Symbol.toStringTag in b)?c(s(b),8,-1):w(b):!1}}),Wl=W(e=>{"use strict";var t=Kl(),r=Gl(),n=Ql(),o=rs();function i(A){return A.call.bind(A)}var s=typeof BigInt<"u",a=typeof Symbol<"u",u=i(Object.prototype.toString),l=i(Number.prototype.valueOf),c=i(String.prototype.valueOf),m=i(Boolean.prototype.valueOf);s&&(g=i(BigInt.prototype.valueOf));var g;a&&(w=i(Symbol.prototype.valueOf));var w;function E(A,ol){if(typeof A!="object")return!1;try{return ol(A),!0}catch(Hd){return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=o;function b(A){return typeof Promise<"u"&&A instanceof Promise||A!==null&&typeof A=="object"&&typeof A.then=="function"&&typeof A.catch=="function"}e.isPromise=b;function T(A){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(A):o(A)||ft(A)}e.isArrayBufferView=T;function S(A){return n(A)==="Uint8Array"}e.isUint8Array=S;function R(A){return n(A)==="Uint8ClampedArray"}e.isUint8ClampedArray=R;function C(A){return n(A)==="Uint16Array"}e.isUint16Array=C;function M(A){return n(A)==="Uint32Array"}e.isUint32Array=M;function N(A){return n(A)==="Int8Array"}e.isInt8Array=N;function L(A){return n(A)==="Int16Array"}e.isInt16Array=L;function Te(A){return n(A)==="Int32Array"}e.isInt32Array=Te;function V(A){return n(A)==="Float32Array"}e.isFloat32Array=V;function H(A){return n(A)==="Float64Array"}e.isFloat64Array=H;function Ee(A){return n(A)==="BigInt64Array"}e.isBigInt64Array=Ee;function z(A){return n(A)==="BigUint64Array"}e.isBigUint64Array=z;function Pe(A){return u(A)==="[object Map]"}Pe.working=typeof Map<"u"&&Pe(new Map);function We(A){return typeof Map>"u"?!1:Pe.working?Pe(A):A instanceof Map}e.isMap=We;function $(A){return u(A)==="[object Set]"}$.working=typeof Set<"u"&&$(new Set);function U(A){return typeof Set>"u"?!1:$.working?$(A):A instanceof Set}e.isSet=U;function O(A){return u(A)==="[object WeakMap]"}O.working=typeof WeakMap<"u"&&O(new WeakMap);function ie(A){return typeof WeakMap>"u"?!1:O.working?O(A):A instanceof WeakMap}e.isWeakMap=ie;function se(A){return u(A)==="[object WeakSet]"}se.working=typeof WeakSet<"u"&&se(new WeakSet);function He(A){return se(A)}e.isWeakSet=He;function Y(A){return u(A)==="[object ArrayBuffer]"}Y.working=typeof ArrayBuffer<"u"&&Y(new ArrayBuffer);function pt(A){return typeof ArrayBuffer>"u"?!1:Y.working?Y(A):A instanceof ArrayBuffer}e.isArrayBuffer=pt;function ze(A){return u(A)==="[object DataView]"}ze.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&ze(new DataView(new ArrayBuffer(1),0,1));function ft(A){return typeof DataView>"u"?!1:ze.working?ze(A):A instanceof DataView}e.isDataView=ft;var qe=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function de(A){return u(A)==="[object SharedArrayBuffer]"}function dt(A){return typeof qe>"u"?!1:(typeof de.working>"u"&&(de.working=de(new qe)),de.working?de(A):A instanceof qe)}e.isSharedArrayBuffer=dt;function Tt(A){return u(A)==="[object AsyncFunction]"}e.isAsyncFunction=Tt;function Ct(A){return u(A)==="[object Map Iterator]"}e.isMapIterator=Ct;function Xu(A){return u(A)==="[object Set Iterator]"}e.isSetIterator=Xu;function el(A){return u(A)==="[object Generator]"}e.isGeneratorObject=el;function tl(A){return u(A)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=tl;function xi(A){return E(A,l)}e.isNumberObject=xi;function bi(A){return E(A,c)}e.isStringObject=bi;function wi(A){return E(A,m)}e.isBooleanObject=wi;function Ei(A){return s&&E(A,g)}e.isBigIntObject=Ei;function Pi(A){return a&&E(A,w)}e.isSymbolObject=Pi;function rl(A){return xi(A)||bi(A)||wi(A)||Ei(A)||Pi(A)}e.isBoxedPrimitive=rl;function nl(A){return typeof Uint8Array<"u"&&(pt(A)||dt(A))}e.isAnyArrayBuffer=nl,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(A){Object.defineProperty(e,A,{enumerable:!1,value:function(){throw new Error(A+" is not supported in userland")}})})}),Hl=W((e,t)=>{t.exports=function(r){return r instanceof x.Buffer}}),zl=W((e,t)=>{typeof Object.create=="function"?t.exports=function(r,n){n&&(r.super_=n,r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(r,n){if(n){r.super_=n;var o=function(){};o.prototype=n.prototype,r.prototype=new o,r.prototype.constructor=r}}}),ns=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=o)return u;switch(u){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return u}}),s=n[r];r"u")return function(){return j.deprecate(e,t).apply(this,arguments)};var r=!1;function n(){if(!r){if(y.throwDeprecation)throw new Error(t);y.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}return n};var qr={},os=/^$/;y.env.NODE_DEBUG&&(Vr=y.env.NODE_DEBUG,Vr=Vr.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),os=new RegExp("^"+Vr+"$","i"));var Vr;j.debuglog=function(e){if(e=e.toUpperCase(),!qr[e])if(os.test(e)){var t=y.pid;qr[e]=function(){var r=j.format.apply(j,arguments);console.error("%s %d: %s",e,t,r)}}else qr[e]=function(){};return qr[e]};function Xe(e,t){var r={seen:[],stylize:Xl};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),fo(t)?r.showHidden=t:t&&j._extend(r,t),yt(r.showHidden)&&(r.showHidden=!1),yt(r.depth)&&(r.depth=2),yt(r.colors)&&(r.colors=!1),yt(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Yl),Gr(r,e,r.depth)}j.inspect=Xe;Xe.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};Xe.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Yl(e,t){var r=Xe.styles[t];return r?"\x1B["+Xe.colors[r][0]+"m"+e+"\x1B["+Xe.colors[r][1]+"m":e}function Xl(e,t){return e}function ec(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function Gr(e,t,r){if(e.customInspect&&t&&Kr(t.inspect)&&t.inspect!==j.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return Hr(n)||(n=Gr(e,n,r)),n}var o=tc(e,t);if(o)return o;var i=Object.keys(t),s=ec(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),ir(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return so(t);if(i.length===0){if(Kr(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(or(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Jr(t))return e.stylize(Date.prototype.toString.call(t),"date");if(ir(t))return so(t)}var u="",l=!1,c=["{","}"];if(is(t)&&(l=!0,c=["[","]"]),Kr(t)){var m=t.name?": "+t.name:"";u=" [Function"+m+"]"}if(or(t)&&(u=" "+RegExp.prototype.toString.call(t)),Jr(t)&&(u=" "+Date.prototype.toUTCString.call(t)),ir(t)&&(u=" "+so(t)),i.length===0&&(!l||t.length==0))return c[0]+u+c[1];if(r<0)return or(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var g;return l?g=rc(e,t,r,s,i):g=i.map(function(w){return uo(e,t,r,s,w,l)}),e.seen.pop(),nc(g,u,c)}function tc(e,t){if(yt(t))return e.stylize("undefined","undefined");if(Hr(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(ss(t))return e.stylize(""+t,"number");if(fo(t))return e.stylize(""+t,"boolean");if(Wr(t))return e.stylize("null","null")}function so(e){return"["+Error.prototype.toString.call(e)+"]"}function rc(e,t,r,n,o){for(var i=[],s=0,a=t.length;s-1&&(i?a=a.split(` -`).map(function(l){return" "+l}).join(` -`).slice(2):a=` -`+a.split(` -`).map(function(l){return" "+l}).join(` -`))):a=e.stylize("[Circular]","special")),yt(s)){if(i&&o.match(/^\d+$/))return a;s=JSON.stringify(""+o),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.slice(1,-1),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function nc(e,t,r){var n=0,o=e.reduce(function(i,s){return n++,s.indexOf(` -`)>=0&&n++,i+s.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?r[0]+(t===""?"":t+` - `)+" "+e.join(`, - `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}j.types=Wl();function is(e){return Array.isArray(e)}j.isArray=is;function fo(e){return typeof e=="boolean"}j.isBoolean=fo;function Wr(e){return e===null}j.isNull=Wr;function oc(e){return e==null}j.isNullOrUndefined=oc;function ss(e){return typeof e=="number"}j.isNumber=ss;function Hr(e){return typeof e=="string"}j.isString=Hr;function ic(e){return typeof e=="symbol"}j.isSymbol=ic;function yt(e){return e===void 0}j.isUndefined=yt;function or(e){return Ft(e)&&mo(e)==="[object RegExp]"}j.isRegExp=or;j.types.isRegExp=or;function Ft(e){return typeof e=="object"&&e!==null}j.isObject=Ft;function Jr(e){return Ft(e)&&mo(e)==="[object Date]"}j.isDate=Jr;j.types.isDate=Jr;function ir(e){return Ft(e)&&(mo(e)==="[object Error]"||e instanceof Error)}j.isError=ir;j.types.isNativeError=ir;function Kr(e){return typeof e=="function"}j.isFunction=Kr;function sc(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}j.isPrimitive=sc;j.isBuffer=Hl();function mo(e){return Object.prototype.toString.call(e)}function ao(e){return e<10?"0"+e.toString(10):e.toString(10)}var ac=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function uc(){var e=new Date,t=[ao(e.getHours()),ao(e.getMinutes()),ao(e.getSeconds())].join(":");return[e.getDate(),ac[e.getMonth()],t].join(" ")}j.log=function(){console.log("%s - %s",uc(),j.format.apply(j,arguments))};j.inherits=zl();j._extend=function(e,t){if(!t||!Ft(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function as(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var gt=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;j.promisify=function(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');if(gt&&e[gt]){var t=e[gt];if(typeof t!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,gt,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var r,n,o=new Promise(function(a,u){r=a,n=u}),i=[],s=0;s{"use strict";d();p();f();var It=1e3,kt=It*60,Dt=kt*60,ht=Dt*24,pc=ht*7,fc=ht*365.25;us.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return dc(e);if(r==="number"&&isFinite(e))return t.long?gc(e):mc(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function dc(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*fc;case"weeks":case"week":case"w":return r*pc;case"days":case"day":case"d":return r*ht;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Dt;case"minutes":case"minute":case"mins":case"min":case"m":return r*kt;case"seconds":case"second":case"secs":case"sec":case"s":return r*It;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function mc(e){var t=Math.abs(e);return t>=ht?Math.round(e/ht)+"d":t>=Dt?Math.round(e/Dt)+"h":t>=kt?Math.round(e/kt)+"m":t>=It?Math.round(e/It)+"s":e+"ms"}function gc(e){var t=Math.abs(e);return t>=ht?zr(e,t,ht,"day"):t>=Dt?zr(e,t,Dt,"hour"):t>=kt?zr(e,t,kt,"minute"):t>=It?zr(e,t,It,"second"):e+" ms"}function zr(e,t,r,n){var o=t>=r*1.5;return Math.round(e/r)+" "+n+(o?"s":"")}});var yo=Z((ug,cs)=>{"use strict";d();p();f();function yc(e){r.debug=r,r.default=r,r.coerce=u,r.disable=i,r.enable=o,r.enabled=s,r.humanize=ls(),r.destroy=l,Object.keys(e).forEach(c=>{r[c]=e[c]}),r.names=[],r.skips=[],r.formatters={};function t(c){let m=0;for(let g=0;g{if(L==="%%")return"%";M++;let V=r.formatters[Te];if(typeof V=="function"){let H=T[M];L=V.call(S,H),T.splice(M,1),M--}return L}),r.formatArgs.call(S,T),(S.log||r.log).apply(S,T)}return b.namespace=c,b.useColors=r.useColors(),b.color=r.selectColor(c),b.extend=n,b.destroy=r.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(w!==r.namespaces&&(w=r.namespaces,E=r.enabled(c)),E),set:T=>{g=T}}),typeof r.init=="function"&&r.init(b),b}function n(c,m){let g=r(this.namespace+(typeof m=="undefined"?":":m)+c);return g.log=this.log,g}function o(c){r.save(c),r.namespaces=c,r.names=[],r.skips=[];let m,g=(typeof c=="string"?c:"").split(/[\s,]+/),w=g.length;for(m=0;m"-"+m)].join(",");return r.enable(""),c}function s(c){if(c[c.length-1]==="*")return!0;let m,g;for(m=0,g=r.skips.length;m{"use strict";d();p();f();Ae.formatArgs=xc;Ae.save=bc;Ae.load=wc;Ae.useColors=hc;Ae.storage=Ec();Ae.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ae.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function hc(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function xc(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Zr.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),e.splice(n,0,t)}Ae.log=console.debug||console.log||(()=>{});function bc(e){try{e?Ae.storage.setItem("debug",e):Ae.storage.removeItem("debug")}catch(t){}}function wc(){let e;try{e=Ae.storage.getItem("debug")}catch(t){}return!e&&typeof y!="undefined"&&"env"in y&&(e=y.env.DEBUG),e}function Ec(){try{return localStorage}catch(e){}}Zr.exports=yo()(Ae);var{formatters:Pc}=Zr.exports;Pc.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var ho=Z(Yr=>{"use strict";d();p();f();Yr.isatty=function(){return!1};function vc(){throw new Error("tty.ReadStream is not implemented")}Yr.ReadStream=vc;function Ac(){throw new Error("tty.WriteStream is not implemented")}Yr.WriteStream=Ac});var fs=Z(()=>{"use strict";d();p();f()});var ms=Z((Ag,ds)=>{"use strict";d();p();f();ds.exports=(e,t=y.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return n!==-1&&(o===-1||n{"use strict";d();p();f();var Tc=fs(),gs=ho(),Me=ms(),{env:te}=y,et;Me("no-color")||Me("no-colors")||Me("color=false")||Me("color=never")?et=0:(Me("color")||Me("colors")||Me("color=true")||Me("color=always"))&&(et=1);"FORCE_COLOR"in te&&(te.FORCE_COLOR==="true"?et=1:te.FORCE_COLOR==="false"?et=0:et=te.FORCE_COLOR.length===0?1:Math.min(parseInt(te.FORCE_COLOR,10),3));function xo(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function bo(e,t){if(et===0)return 0;if(Me("color=16m")||Me("color=full")||Me("color=truecolor"))return 3;if(Me("color=256"))return 2;if(e&&!t&&et===void 0)return 0;let r=et||0;if(te.TERM==="dumb")return r;if(y.platform==="win32"){let n=Tc.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in te)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in te)||te.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in te)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(te.TEAMCITY_VERSION)?1:0;if(te.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in te){let n=parseInt((te.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(te.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(te.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(te.TERM)||"COLORTERM"in te?1:r}function Cc(e){let t=bo(e,e&&e.isTTY);return xo(t)}ys.exports={supportsColor:Cc,stdout:xo(bo(!0,gs.isatty(1))),stderr:xo(bo(!0,gs.isatty(2)))}});var bs=Z((ae,en)=>{"use strict";d();p();f();var Mc=ho(),Xr=go();ae.init=Dc;ae.log=Fc;ae.formatArgs=Rc;ae.save=Ic;ae.load=kc;ae.useColors=Sc;ae.destroy=Xr.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ae.colors=[6,2,3,4,5,1];try{let e=hs();e&&(e.stderr||e).level>=2&&(ae.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}ae.inspectOpts=Object.keys(y.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),n=y.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function Sc(){return"colors"in ae.inspectOpts?!!ae.inspectOpts.colors:Mc.isatty(y.stderr.fd)}function Rc(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),i=` ${o};1m${t} \x1B[0m`;e[0]=i+e[0].split(` -`).join(` -`+i),e.push(o+"m+"+en.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Oc()+t+" "+e[0]}function Oc(){return ae.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Fc(...e){return y.stderr.write(Xr.format(...e)+` -`)}function Ic(e){e?y.env.DEBUG=e:delete y.env.DEBUG}function kc(){return y.env.DEBUG}function Dc(e){e.inspectOpts={};let t=Object.keys(ae.inspectOpts);for(let r=0;rt.trim()).join(" ")};xs.O=function(e){return this.inspectOpts.colors=this.useColors,Xr.inspect(e,this.inspectOpts)}});var Eo=Z((_g,wo)=>{"use strict";d();p();f();typeof y=="undefined"||y.type==="renderer"||y.browser===!0||y.__nwjs?wo.exports=ps():wo.exports=bs()});function Bc(){return!1}var jc,Uc,un,Ao=Br(()=>{"use strict";d();p();f();jc={},Uc={existsSync:Bc,promises:jc},un=Uc});var To=Z((Py,Rs)=>{"use strict";d();p();f();function De(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function Ss(e,t){for(var r="",n=0,o=-1,i=0,s,a=0;a<=e.length;++a){if(a2){var u=r.lastIndexOf("/");if(u!==r.length-1){u===-1?(r="",n=0):(r=r.slice(0,u),n=r.length-1-r.lastIndexOf("/")),o=a,i=0;continue}}else if(r.length===2||r.length===1){r="",n=0,o=a,i=0;continue}}t&&(r.length>0?r+="/..":r="..",n=2)}else r.length>0?r+="/"+e.slice(o+1,a):r=e.slice(o+1,a),n=a-o-1;o=a,i=0}else s===46&&i!==-1?++i:i=-1}return r}function $c(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+e+n:n}var Lt={resolve:function(){for(var e="",t=!1,r,n=arguments.length-1;n>=-1&&!t;n--){var o;n>=0?o=arguments[n]:(r===void 0&&(r=y.cwd()),o=r),De(o),o.length!==0&&(e=o+"/"+e,t=o.charCodeAt(0)===47)}return e=Ss(e,!t),t?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(De(e),e.length===0)return".";var t=e.charCodeAt(0)===47,r=e.charCodeAt(e.length-1)===47;return e=Ss(e,!t),e.length===0&&!t&&(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return De(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t0&&(e===void 0?e=r:e+="/"+r)}return e===void 0?".":Lt.normalize(e)},relative:function(e,t){if(De(e),De(t),e===t||(e=Lt.resolve(e),t=Lt.resolve(t),e===t))return"";for(var r=1;ru){if(t.charCodeAt(i+c)===47)return t.slice(i+c+1);if(c===0)return t.slice(i+c)}else o>u&&(e.charCodeAt(r+c)===47?l=c:c===0&&(l=0));break}var m=e.charCodeAt(r+c),g=t.charCodeAt(i+c);if(m!==g)break;m===47&&(l=c)}var w="";for(c=r+l+1;c<=n;++c)(c===n||e.charCodeAt(c)===47)&&(w.length===0?w+="..":w+="/..");return w.length>0?w+t.slice(i+l):(i+=l,t.charCodeAt(i)===47&&++i,t.slice(i))},_makeLong:function(e){return e},dirname:function(e){if(De(e),e.length===0)return".";for(var t=e.charCodeAt(0),r=t===47,n=-1,o=!0,i=e.length-1;i>=1;--i)if(t=e.charCodeAt(i),t===47){if(!o){n=i;break}}else o=!1;return n===-1?r?"/":".":r&&n===1?"//":e.slice(0,n)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');De(e);var r=0,n=-1,o=!0,i;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){var u=e.charCodeAt(i);if(u===47){if(!o){r=i+1;break}}else a===-1&&(o=!1,a=i+1),s>=0&&(u===t.charCodeAt(s)?--s===-1&&(n=i):(s=-1,n=a))}return r===n?n=a:n===-1&&(n=e.length),e.slice(r,n)}else{for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===47){if(!o){r=i+1;break}}else n===-1&&(o=!1,n=i+1);return n===-1?"":e.slice(r,n)}},extname:function(e){De(e);for(var t=-1,r=0,n=-1,o=!0,i=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(a===47){if(!o){r=s+1;break}continue}n===-1&&(o=!1,n=s+1),a===46?t===-1?t=s:i!==1&&(i=1):t!==-1&&(i=-1)}return t===-1||n===-1||i===0||i===1&&t===n-1&&t===r+1?"":e.slice(t,n)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return $c("/",e)},parse:function(e){De(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var r=e.charCodeAt(0),n=r===47,o;n?(t.root="/",o=1):o=0;for(var i=-1,s=0,a=-1,u=!0,l=e.length-1,c=0;l>=o;--l){if(r=e.charCodeAt(l),r===47){if(!u){s=l+1;break}continue}a===-1&&(u=!1,a=l+1),r===46?i===-1?i=l:c!==1&&(c=1):i!==-1&&(c=-1)}return i===-1||a===-1||c===0||c===1&&i===a-1&&i===s+1?a!==-1&&(s===0&&n?t.base=t.name=e.slice(1,a):t.base=t.name=e.slice(s,a)):(s===0&&n?(t.name=e.slice(1,i),t.base=e.slice(1,a)):(t.name=e.slice(s,i),t.base=e.slice(s,a)),t.ext=e.slice(i,a)),s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};Lt.posix=Lt;Rs.exports=Lt});var Is=Z((Oy,Fs)=>{"use strict";d();p();f();Fs.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Ds=Z((Dy,ks)=>{"use strict";d();p();f();var Vc=Is();ks.exports=e=>{let t=Vc(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var Ns=Z((qy,So)=>{"use strict";d();p();f();var Kc=Object.prototype.hasOwnProperty,me="~";function ar(){}Object.create&&(ar.prototype=Object.create(null),new ar().__proto__||(me=!1));function Gc(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function _s(e,t,r,n,o){if(typeof r!="function")throw new TypeError("The listener must be a function");var i=new Gc(r,n||e,o),s=me?me+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],i]:e._events[s].push(i):(e._events[s]=i,e._eventsCount++),e}function ln(e,t){--e._eventsCount===0?e._events=new ar:delete e._events[t]}function le(){this._events=new ar,this._eventsCount=0}le.prototype.eventNames=function(){var e=[],t,r;if(this._eventsCount===0)return e;for(r in t=this._events)Kc.call(t,r)&&e.push(me?r.slice(1):r);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e};le.prototype.listeners=function(e){var t=me?me+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,o=r.length,i=new Array(o);n{"use strict";d();p();f();Ls.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 $s=Z((eh,Us)=>{"use strict";d();p();f();Us.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 Vs=Z((oh,qs)=>{"use strict";d();p();f();var zc=$s();qs.exports=e=>typeof e=="string"?e.replace(zc(),""):e});var Ws=Z(()=>{"use strict";d();p();f()});var ui=Z((AM,uu)=>{"use strict";d();p();f();uu.exports=function(){function e(t,r,n,o,i){return tn?n+1:t+1:o===i?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 o=t.length,i=r.length;o>0&&t.charCodeAt(o-1)===r.charCodeAt(i-1);)o--,i--;for(var s=0;sCe,DMMFClass:()=>$r,Debug:()=>Po,Decimal:()=>je,Extensions:()=>ro,MetricsClient:()=>Ut,NotFoundError:()=>Ke,ObjectEnumValue:()=>_e,PrismaClientInitializationError:()=>re,PrismaClientKnownRequestError:()=>ce,PrismaClientRustPanicError:()=>Ge,PrismaClientUnknownRequestError:()=>Se,PrismaClientValidationError:()=>pe,Public:()=>no,Sql:()=>xe,Types:()=>oo,defineDmmfProperty:()=>Js,empty:()=>zs,getPrismaClient:()=>zu,itxClientDenyList:()=>gi,join:()=>Hs,makeStrictEnum:()=>Zu,objectEnumNames:()=>Yc,objectEnumValues:()=>pn,raw:()=>No,sqltag:()=>Lo,warnEnvConflicts:()=>void 0,warnOnce:()=>lr});module.exports=pl(Wd);d();p();f();var ro={};rr(ro,{defineExtension:()=>Ki,getExtensionContext:()=>Gi});d();p();f();d();p();f();function Ki(e){return typeof e=="function"?e:t=>t.$extends(e)}d();p();f();function Gi(e){return e}var no={};rr(no,{validator:()=>Ji});d();p();f();d();p();f();function Ji(...e){return t=>t}var oo={};rr(oo,{Extensions:()=>Qi,Public:()=>Wi,Result:()=>Hi,Utils:()=>zi});d();p();f();var Qi={};d();p();f();var Wi={};d();p();f();var Hi={};d();p();f();var zi={};d();p();f();d();p();f();d();p();f();var Ye=(e,t)=>{let r={};for(let n of e){let o=n[t];r[o]=n}return r};function Zi(e){return e.substring(0,1).toLowerCase()+e.substring(1)}var $r=class{constructor(t){this.document=t;this.compositeNames=new Set(this.datamodel.types.map(r=>r.name)),this.typeAndModelMap=this.buildTypeModelMap(),this.mappingsMap=this.buildMappingsMap(),this.outputTypeMap=this.buildMergedOutputTypeMap(),this.rootFieldMap=this.buildRootFieldMap(),this.inputTypesByName=this.buildInputTypesMap()}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(t){return this.compositeNames.has(t)}getOtherOperationNames(){return[Object.values(this.mappings.otherOperations.write),Object.values(this.mappings.otherOperations.read)].flat()}hasEnumInNamespace(t,r){var n;return((n=this.schema.enumTypes[r])==null?void 0:n.find(o=>o.name===t))!==void 0}resolveInputObjectType(t){return this.inputTypesByName.get(io(t.type,t.namespace))}resolveOutputObjectType(t){var r;if(t.location==="outputObjectTypes")return this.outputObjectTypes[(r=t.namespace)!=null?r:"prisma"].find(n=>n.name===t.type)}buildModelMap(){return Ye(this.datamodel.models,"name")}buildTypeMap(){return Ye(this.datamodel.types,"name")}buildTypeModelMap(){return{...this.buildTypeMap(),...this.buildModelMap()}}buildMappingsMap(){return Ye(this.mappings.modelOperations,"model")}buildMergedOutputTypeMap(){return{model:Ye(this.schema.outputObjectTypes.model,"name"),prisma:Ye(this.schema.outputObjectTypes.prisma,"name")}}buildRootFieldMap(){return{...Ye(this.outputTypeMap.prisma.Query.fields,"name"),...Ye(this.outputTypeMap.prisma.Mutation.fields,"name")}}buildInputTypesMap(){let t=new Map;for(let r of this.inputObjectTypes.prisma)t.set(io(r.name,"prisma"),r);if(!this.inputObjectTypes.model)return t;for(let r of this.inputObjectTypes.model)t.set(io(r.name,"model"),r);return t}};function io(e,t){return t?`${t}.${e}`:e}d();p();f();d();p();f();var Ce;(t=>{let e;(C=>(C.findUnique="findUnique",C.findUniqueOrThrow="findUniqueOrThrow",C.findFirst="findFirst",C.findFirstOrThrow="findFirstOrThrow",C.findMany="findMany",C.create="create",C.createMany="createMany",C.update="update",C.updateMany="updateMany",C.upsert="upsert",C.delete="delete",C.deleteMany="deleteMany",C.groupBy="groupBy",C.count="count",C.aggregate="aggregate",C.findRaw="findRaw",C.aggregateRaw="aggregateRaw"))(e=t.ModelAction||(t.ModelAction={}))})(Ce||(Ce={}));d();p();f();var rn=ve(Eo()),_c=100,tn=[],ws,Es;typeof y!="undefined"&&typeof((ws=y.stderr)==null?void 0:ws.write)!="function"&&(rn.default.log=(Es=console.debug)!=null?Es:console.log);function Nc(e){let t=(0,rn.default)(e),r=Object.assign((...n)=>(t.log=r.log,n.length!==0&&tn.push([e,...n]),tn.length>_c&&tn.shift(),t("",...n)),t);return r}var Po=Object.assign(Nc,rn.default);function Ps(){tn.length=0}var he=Po;d();p();f();var vo,vs,As,Ts,Cs=!0;typeof y!="undefined"&&({FORCE_COLOR:vo,NODE_DISABLE_COLORS:vs,NO_COLOR:As,TERM:Ts}=y.env||{},Cs=y.stdout&&y.stdout.isTTY);var Lc={enabled:!vs&&As==null&&Ts!=="dumb"&&(vo!=null&&vo!=="0"||Cs)};function G(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,o=`\x1B[${t}m`;return function(i){return!Lc.enabled||i==null?i:n+(~(""+i).indexOf(o)?i.replace(r,o+n):i)+o}}var Vg=G(0,0),tt=G(1,22),nn=G(2,22),Kg=G(3,23),Ms=G(4,24),Gg=G(7,27),Jg=G(8,28),Qg=G(9,29),Wg=G(30,39),_t=G(31,39),on=G(32,39),sn=G(33,39),Nt=G(34,39),Hg=G(35,39),rt=G(36,39),zg=G(37,39),an=G(90,39),Zg=G(90,39),Yg=G(40,49),Xg=G(41,49),ey=G(42,49),ty=G(43,49),ry=G(44,49),ny=G(45,49),oy=G(46,49),iy=G(47,49);d();p();f();d();p();f();d();p();f();d();p();f();var Os="library";function Co(e){let t=qc();return t||((e==null?void 0:e.config.engineType)==="library"?"library":(e==null?void 0:e.config.engineType)==="binary"?"binary":Os)}function qc(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}d();p();f();var sr=ve(To());function Mo(e){return sr.default.sep===sr.default.posix.sep?e:e.split(sr.default.sep).join(sr.default.posix.sep)}var Bt={};rr(Bt,{error:()=>Wc,info:()=>Qc,log:()=>Jc,query:()=>Hc,should:()=>js,tags:()=>ur,warn:()=>Ro});d();p();f();var ur={error:_t("prisma:error"),warn:sn("prisma:warn"),info:rt("prisma:info"),query:Nt("prisma:query")},js={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Jc(...e){console.log(...e)}function Ro(e,...t){js.warn()&&console.warn(`${ur.warn} ${e}`,...t)}function Qc(e,...t){console.info(`${ur.info} ${e}`,...t)}function Wc(e,...t){console.error(`${ur.error} ${e}`,...t)}function Hc(e,...t){console.log(`${ur.query} ${e}`,...t)}d();p();f();function xt(e,t){throw new Error(t)}d();p();f();function Oo(e,t){return Object.prototype.hasOwnProperty.call(e,t)}d();p();f();var Fo=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});d();p();f();function jt(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}d();p();f();function Io(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Ks.has(e)||(Ks.add(e),Ro(t,...r))};d();p();f();var ce=class extends Error{constructor(r,{code:n,clientVersion:o,meta:i,batchRequestIdx:s}){super(r);this.name="PrismaClientKnownRequestError",this.code=n,this.clientVersion=o,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:s,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};k(ce,"PrismaClientKnownRequestError");var Ke=class extends ce{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};k(Ke,"NotFoundError");d();p();f();var re=class e extends Error{constructor(r,n,o){super(r);this.name="PrismaClientInitializationError",this.clientVersion=n,this.errorCode=o,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};k(re,"PrismaClientInitializationError");d();p();f();var Ge=class extends Error{constructor(r,n){super(r);this.name="PrismaClientRustPanicError",this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};k(Ge,"PrismaClientRustPanicError");d();p();f();var Se=class extends Error{constructor(r,{clientVersion:n,batchRequestIdx:o}){super(r);this.name="PrismaClientUnknownRequestError",this.clientVersion=n,Object.defineProperty(this,"batchRequestIdx",{value:o,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};k(Se,"PrismaClientUnknownRequestError");d();p();f();var pe=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};k(pe,"PrismaClientValidationError");d();p();f();var Ut=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};d();p();f();d();p();f();function cr(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Js(e,t){let r=cr(()=>Zc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Zc(e){return{datamodel:{models:ko(e.models),enums:ko(e.enums),types:ko(e.types)}}}function ko(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}d();p();f();var Yc=["JsonNullValueInput","NullableJsonNullValueInput","JsonNullValueFilter"],cn=Symbol(),Do=new WeakMap,_e=class{constructor(t){t===cn?Do.set(this,`Prisma.${this._getName()}`):Do.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Do.get(this)}},pr=class extends _e{_getNamespace(){return"NullTypes"}},fr=class extends pr{};_o(fr,"DbNull");var dr=class extends pr{};_o(dr,"JsonNull");var mr=class extends pr{};_o(mr,"AnyNull");var pn={classes:{DbNull:fr,JsonNull:dr,AnyNull:mr},instances:{DbNull:new fr(cn),JsonNull:new dr(cn),AnyNull:new mr(cn)}};function _o(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}d();p();f();d();p();f();var rp=ve(Eo(),1);function fn(e){return{ok:!1,error:e,map(){return fn(e)},flatMap(){return fn(e)}}}var Xc=class{constructor(){Ai(this,"registeredErrors",[])}consumeError(e){return this.registeredErrors[e]}registerNewError(e){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:e},t}},Qs=e=>{let t=new Xc,r=nt(t,e.startTransaction.bind(e));return{errorRegistry:t,queryRaw:nt(t,e.queryRaw.bind(e)),executeRaw:nt(t,e.executeRaw.bind(e)),flavour:e.flavour,startTransaction:async(...n)=>(await r(...n)).map(i=>ep(t,i)),close:nt(t,e.close.bind(e))}},ep=(e,t)=>({flavour:t.flavour,options:t.options,queryRaw:nt(e,t.queryRaw.bind(t)),executeRaw:nt(e,t.executeRaw.bind(t)),commit:nt(e,t.commit.bind(t)),rollback:nt(e,t.rollback.bind(t)),dispose:tp(e,t.dispose.bind(t))});function nt(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let o=e.registerNewError(n);return fn({kind:"GenericJsError",id:o})}}}function tp(e,t){return(...r)=>{try{return t(...r)}catch(n){let o=e.registerNewError(n);return fn({kind:"GenericJsError",id:o})}}}var O2=ve(Ws()),Hu=ve(Ns());Ao();var Lr=ve(To());d();p();f();var xe=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 o=0,i=0;for(;oe.getPropertyValue(r))},getPropertyDescriptor(r){var n;return(n=e.getPropertyDescriptor)==null?void 0:n.call(e,r)}}}d();p();f();var Xs=ve(go());d();p();f();var dn={enumerable:!0,configurable:!0,writable:!0};function mn(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>dn,has:(r,n)=>t.has(n),set:(r,n,o)=>t.add(n)&&Reflect.set(r,n,o),ownKeys:()=>[...t]}}var Zs=Symbol.for("nodejs.util.inspect.custom");function Le(e,t){let r=np(t),n=new Set,o=new Proxy(e,{get(i,s){if(n.has(s))return i[s];let a=r.get(s);return a?a.getPropertyValue(s):i[s]},has(i,s){var u,l;if(n.has(s))return!0;let a=r.get(s);return a?(l=(u=a.has)==null?void 0:u.call(a,s))!=null?l:!0:Reflect.has(i,s)},ownKeys(i){let s=Ys(Reflect.ownKeys(i),r),a=Ys(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(i,s,a){var l,c;let u=r.get(s);return((c=(l=u==null?void 0:u.getPropertyDescriptor)==null?void 0:l.call(u,s))==null?void 0:c.writable)===!1?!1:(n.add(s),Reflect.set(i,s,a))},getOwnPropertyDescriptor(i,s){let a=Reflect.getOwnPropertyDescriptor(i,s);if(a&&!a.configurable)return a;let u=r.get(s);return u?u.getPropertyDescriptor?{...dn,...u==null?void 0:u.getPropertyDescriptor(s)}:dn:a},defineProperty(i,s,a){return n.add(s),Reflect.defineProperty(i,s,a)}});return o[Zs]=function(i,s,a=Xs.inspect){let u={...this};return delete u[Zs],a(u,s)},o}function np(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let o of n)t.set(o,r)}return t}function Ys(e,t){return e.filter(r=>{var o,i;let n=t.get(r);return(i=(o=n==null?void 0:n.has)==null?void 0:o.call(n,r))!=null?i:!0})}d();p();f();function yr(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}d();p();f();d();p();f();var $t=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){let n=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}};d();p();f();d();p();f();function qt(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function gn(e){return e.toString()!=="Invalid Date"}d();p();f();d();p();f();var Vt=9e15,at=1e9,Bo="0123456789abcdef",hn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",xn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",jo={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Vt,maxE:Vt,crypto:!1},na,Je,D=!0,wn="[DecimalError] ",st=wn+"Invalid argument: ",oa=wn+"Precision limit exceeded",ia=wn+"crypto unavailable",sa="[object Decimal]",fe=Math.floor,X=Math.pow,op=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,ip=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,sp=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,aa=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Oe=1e7,I=7,ap=9007199254740991,up=hn.length-1,Uo=xn.length-1,v={toStringTag:sa};v.absoluteValue=v.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),F(e)};v.ceil=function(){return F(new this.constructor(this),this.e+1,2)};v.clampedTo=v.clamp=function(e,t){var r,n=this,o=n.constructor;if(e=new o(e),t=new o(t),!e.s||!t.s)return new o(NaN);if(e.gt(t))throw Error(st+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new o(n)};v.comparedTo=v.cmp=function(e){var t,r,n,o,i=this,s=i.d,a=(e=new i.constructor(e)).d,u=i.s,l=e.s;if(!s||!a)return!u||!l?NaN:u!==l?u:s===a?0:!s^u<0?1:-1;if(!s[0]||!a[0])return s[0]?u:a[0]?-l:0;if(u!==l)return u;if(i.e!==e.e)return i.e>e.e^u<0?1:-1;for(n=s.length,o=a.length,t=0,r=na[t]^u<0?1:-1;return n===o?0:n>o^u<0?1:-1};v.cosine=v.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=lp(n,fa(n,r)),n.precision=e,n.rounding=t,F(Je==2||Je==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};v.cubeRoot=v.cbrt=function(){var e,t,r,n,o,i,s,a,u,l,c=this,m=c.constructor;if(!c.isFinite()||c.isZero())return new m(c);for(D=!1,i=c.s*X(c.s*c,1/3),!i||Math.abs(i)==1/0?(r=ue(c.d),e=c.e,(i=(e-r.length+1)%3)&&(r+=i==1||i==-2?"0":"00"),i=X(r,1/3),e=fe((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?r="5e"+e:(r=i.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new m(r),n.s=c.s):n=new m(i.toString()),s=(e=m.precision)+3;;)if(a=n,u=a.times(a).times(a),l=u.plus(c),n=K(l.plus(c).times(a),l.plus(u),s+2,1),ue(a.d).slice(0,s)===(r=ue(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!o&&r=="4999"){if(!o&&(F(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}s+=4,o=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(F(n,e+1,1),t=!n.times(n).times(n).eq(c));break}return D=!0,F(n,e,m.rounding,t)};v.decimalPlaces=v.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-fe(this.e/I))*I,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};v.dividedBy=v.div=function(e){return K(this,new this.constructor(e))};v.dividedToIntegerBy=v.divToInt=function(e){var t=this,r=t.constructor;return F(K(t,new r(e),0,1,1),r.precision,r.rounding)};v.equals=v.eq=function(e){return this.cmp(e)===0};v.floor=function(){return F(new this.constructor(this),this.e+1,3)};v.greaterThan=v.gt=function(e){return this.cmp(e)>0};v.greaterThanOrEqualTo=v.gte=function(e){var t=this.cmp(e);return t==1||t===0};v.hyperbolicCosine=v.cosh=function(){var e,t,r,n,o,i=this,s=i.constructor,a=new s(1);if(!i.isFinite())return new s(i.s?1/0:NaN);if(i.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(i.e,i.sd())+4,s.rounding=1,o=i.d.length,o<32?(e=Math.ceil(o/3),t=(1/Pn(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),i=Kt(s,1,i.times(t),new s(1),!0);for(var u,l=e,c=new s(8);l--;)u=i.times(i),i=a.minus(u.times(c.minus(u.times(c))));return F(i,s.precision=r,s.rounding=n,!0)};v.hyperbolicSine=v.sinh=function(){var e,t,r,n,o=this,i=o.constructor;if(!o.isFinite()||o.isZero())return new i(o);if(t=i.precision,r=i.rounding,i.precision=t+Math.max(o.e,o.sd())+4,i.rounding=1,n=o.d.length,n<3)o=Kt(i,2,o,o,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,o=o.times(1/Pn(5,e)),o=Kt(i,2,o,o,!0);for(var s,a=new i(5),u=new i(16),l=new i(20);e--;)s=o.times(o),o=o.times(a.plus(s.times(u.times(s).plus(l))))}return i.precision=t,i.rounding=r,F(o,t,r,!0)};v.hyperbolicTangent=v.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,K(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};v.inverseCosine=v.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),o=r.precision,i=r.rounding;return n!==-1?n===0?t.isNeg()?Re(r,o,i):new r(0):new r(NaN):t.isZero()?Re(r,o+4,i).times(.5):(r.precision=o+6,r.rounding=1,t=t.asin(),e=Re(r,o+4,i).times(.5),r.precision=o,r.rounding=i,e.minus(t))};v.inverseHyperbolicCosine=v.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,D=!1,r=r.times(r).minus(1).sqrt().plus(r),D=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};v.inverseHyperbolicSine=v.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,D=!1,r=r.times(r).plus(1).sqrt().plus(r),D=!0,n.precision=e,n.rounding=t,r.ln())};v.inverseHyperbolicTangent=v.atanh=function(){var e,t,r,n,o=this,i=o.constructor;return o.isFinite()?o.e>=0?new i(o.abs().eq(1)?o.s/0:o.isZero()?o:NaN):(e=i.precision,t=i.rounding,n=o.sd(),Math.max(n,e)<2*-o.e-1?F(new i(o),e,t,!0):(i.precision=r=n-o.e,o=K(o.plus(1),new i(1).minus(o),r+e,1),i.precision=e+4,i.rounding=1,o=o.ln(),i.precision=e,i.rounding=t,o.times(.5))):new i(NaN)};v.inverseSine=v.asin=function(){var e,t,r,n,o=this,i=o.constructor;return o.isZero()?new i(o):(t=o.abs().cmp(1),r=i.precision,n=i.rounding,t!==-1?t===0?(e=Re(i,r+4,n).times(.5),e.s=o.s,e):new i(NaN):(i.precision=r+6,i.rounding=1,o=o.div(new i(1).minus(o.times(o)).sqrt().plus(1)).atan(),i.precision=r,i.rounding=n,o.times(2)))};v.inverseTangent=v.atan=function(){var e,t,r,n,o,i,s,a,u,l=this,c=l.constructor,m=c.precision,g=c.rounding;if(l.isFinite()){if(l.isZero())return new c(l);if(l.abs().eq(1)&&m+4<=Uo)return s=Re(c,m+4,g).times(.25),s.s=l.s,s}else{if(!l.s)return new c(NaN);if(m+4<=Uo)return s=Re(c,m+4,g).times(.5),s.s=l.s,s}for(c.precision=a=m+10,c.rounding=1,r=Math.min(28,a/I+2|0),e=r;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(D=!1,t=Math.ceil(a/I),n=1,u=l.times(l),s=new c(l),o=l;e!==-1;)if(o=o.times(u),i=s.minus(o.div(n+=2)),o=o.times(u),s=i.plus(o.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===i.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};v.isNaN=function(){return!this.s};v.isNegative=v.isNeg=function(){return this.s<0};v.isPositive=v.isPos=function(){return this.s>0};v.isZero=function(){return!!this.d&&this.d[0]===0};v.lessThan=v.lt=function(e){return this.cmp(e)<0};v.lessThanOrEqualTo=v.lte=function(e){return this.cmp(e)<1};v.logarithm=v.log=function(e){var t,r,n,o,i,s,a,u,l=this,c=l.constructor,m=c.precision,g=c.rounding,w=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=l.d,l.s<0||!r||!r[0]||l.eq(1))return new c(r&&!r[0]?-1/0:l.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)i=!0;else{for(o=r[0];o%10===0;)o/=10;i=o!==1}if(D=!1,a=m+w,s=it(l,a),n=t?bn(c,a+10):it(e,a),u=K(s,n,a,1),hr(u.d,o=m,g))do if(a+=10,s=it(l,a),n=t?bn(c,a+10):it(e,a),u=K(s,n,a,1),!i){+ue(u.d).slice(o+1,o+15)+1==1e14&&(u=F(u,m+1,0));break}while(hr(u.d,o+=10,g));return D=!0,F(u,m,g)};v.minus=v.sub=function(e){var t,r,n,o,i,s,a,u,l,c,m,g,w=this,E=w.constructor;if(e=new E(e),!w.d||!e.d)return!w.s||!e.s?e=new E(NaN):w.d?e.s=-e.s:e=new E(e.d||w.s!==e.s?w:NaN),e;if(w.s!=e.s)return e.s=-e.s,w.plus(e);if(l=w.d,g=e.d,a=E.precision,u=E.rounding,!l[0]||!g[0]){if(g[0])e.s=-e.s;else if(l[0])e=new E(w);else return new E(u===3?-0:0);return D?F(e,a,u):e}if(r=fe(e.e/I),c=fe(w.e/I),l=l.slice(),i=c-r,i){for(m=i<0,m?(t=l,i=-i,s=g.length):(t=g,r=c,s=l.length),n=Math.max(Math.ceil(a/I),s)+2,i>n&&(i=n,t.length=1),t.reverse(),n=i;n--;)t.push(0);t.reverse()}else{for(n=l.length,s=g.length,m=n0;--n)l[s++]=0;for(n=g.length;n>i;){if(l[--n]s?i+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=l.length,o=c.length,s-o<0&&(o=s,r=c,c=l,l=r),t=0;o;)t=(l[--o]=l[o]+c[o]+t)/Oe|0,l[o]%=Oe;for(t&&(l.unshift(t),++n),s=l.length;l[--s]==0;)l.pop();return e.d=l,e.e=En(l,n),D?F(e,a,u):e};v.precision=v.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(st+e);return r.d?(t=ua(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};v.round=function(){var e=this,t=e.constructor;return F(new t(e),e.e+1,t.rounding)};v.sine=v.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=pp(n,fa(n,r)),n.precision=e,n.rounding=t,F(Je>2?r.neg():r,e,t,!0)):new n(NaN)};v.squareRoot=v.sqrt=function(){var e,t,r,n,o,i,s=this,a=s.d,u=s.e,l=s.s,c=s.constructor;if(l!==1||!a||!a[0])return new c(!l||l<0&&(!a||a[0])?NaN:a?s:1/0);for(D=!1,l=Math.sqrt(+s),l==0||l==1/0?(t=ue(a),(t.length+u)%2==0&&(t+="0"),l=Math.sqrt(t),u=fe((u+1)/2)-(u<0||u%2),l==1/0?t="5e"+u:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),n=new c(t)):n=new c(l.toString()),r=(u=c.precision)+3;;)if(i=n,n=i.plus(K(s,i,r+2,1)).times(.5),ue(i.d).slice(0,r)===(t=ue(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!o&&t=="4999"){if(!o&&(F(i,u+1,0),i.times(i).eq(s))){n=i;break}r+=4,o=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(F(n,u+1,1),e=!n.times(n).eq(s));break}return D=!0,F(n,u,c.rounding,e)};v.tangent=v.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=K(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,F(Je==2||Je==4?r.neg():r,e,t,!0)):new n(NaN)};v.times=v.mul=function(e){var t,r,n,o,i,s,a,u,l,c=this,m=c.constructor,g=c.d,w=(e=new m(e)).d;if(e.s*=c.s,!g||!g[0]||!w||!w[0])return new m(!e.s||g&&!g[0]&&!w||w&&!w[0]&&!g?NaN:!g||!w?e.s/0:e.s*0);for(r=fe(c.e/I)+fe(e.e/I),u=g.length,l=w.length,u=0;){for(t=0,o=u+n;o>n;)a=i[o]+w[n]*g[o-n-1]+t,i[o--]=a%Oe|0,t=a/Oe|0;i[o]=(i[o]+t)%Oe|0}for(;!i[--s];)i.pop();return t?++r:i.shift(),e.d=i,e.e=En(i,r),D?F(e,m.precision,m.rounding):e};v.toBinary=function(e,t){return Vo(this,2,e,t)};v.toDecimalPlaces=v.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(be(e,0,at),t===void 0?t=n.rounding:be(t,0,8),F(r,e+r.e+1,t))};v.toExponential=function(e,t){var r,n=this,o=n.constructor;return e===void 0?r=Be(n,!0):(be(e,0,at),t===void 0?t=o.rounding:be(t,0,8),n=F(new o(n),e+1,t),r=Be(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};v.toFixed=function(e,t){var r,n,o=this,i=o.constructor;return e===void 0?r=Be(o):(be(e,0,at),t===void 0?t=i.rounding:be(t,0,8),n=F(new i(o),e+o.e+1,t),r=Be(n,!1,e+n.e+1)),o.isNeg()&&!o.isZero()?"-"+r:r};v.toFraction=function(e){var t,r,n,o,i,s,a,u,l,c,m,g,w=this,E=w.d,b=w.constructor;if(!E)return new b(w);if(l=r=new b(1),n=u=new b(0),t=new b(n),i=t.e=ua(E)-w.e-1,s=i%I,t.d[0]=X(10,s<0?I+s:s),e==null)e=i>0?t:l;else{if(a=new b(e),!a.isInt()||a.lt(l))throw Error(st+a);e=a.gt(t)?i>0?t:l:a}for(D=!1,a=new b(ue(E)),c=b.precision,b.precision=i=E.length*I*2;m=K(a,t,0,1,1),o=r.plus(m.times(n)),o.cmp(e)!=1;)r=n,n=o,o=l,l=u.plus(m.times(o)),u=o,o=t,t=a.minus(m.times(o)),a=o;return o=K(e.minus(r),n,0,1,1),u=u.plus(o.times(l)),r=r.plus(o.times(n)),u.s=l.s=w.s,g=K(l,n,i,1).minus(w).abs().cmp(K(u,r,i,1).minus(w).abs())<1?[l,n]:[u,r],b.precision=c,D=!0,g};v.toHexadecimal=v.toHex=function(e,t){return Vo(this,16,e,t)};v.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:be(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]?(D=!1,r=K(r,e,0,t,1).times(e),D=!0,F(r)):(e.s=r.s,r=e),r};v.toNumber=function(){return+this};v.toOctal=function(e,t){return Vo(this,8,e,t)};v.toPower=v.pow=function(e){var t,r,n,o,i,s,a=this,u=a.constructor,l=+(e=new u(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new u(X(+a,l));if(a=new u(a),a.eq(1))return a;if(n=u.precision,i=u.rounding,e.eq(1))return F(a,n,i);if(t=fe(e.e/I),t>=e.d.length-1&&(r=l<0?-l:l)<=ap)return o=la(u,a,r,n),e.s<0?new u(1).div(o):F(o,n,i);if(s=a.s,s<0){if(tu.maxE+1||t0?s/0:0):(D=!1,u.rounding=a.s=1,r=Math.min(12,(t+"").length),o=$o(e.times(it(a,n+r)),n),o.d&&(o=F(o,n+5,1),hr(o.d,n,i)&&(t=n+10,o=F($o(e.times(it(a,t+r)),t),t+5,1),+ue(o.d).slice(n+1,n+15)+1==1e14&&(o=F(o,n+1,0)))),o.s=s,D=!0,u.rounding=i,F(o,n,i))};v.toPrecision=function(e,t){var r,n=this,o=n.constructor;return e===void 0?r=Be(n,n.e<=o.toExpNeg||n.e>=o.toExpPos):(be(e,1,at),t===void 0?t=o.rounding:be(t,0,8),n=F(new o(n),e,t),r=Be(n,e<=n.e||n.e<=o.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};v.toSignificantDigits=v.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(be(e,1,at),t===void 0?t=n.rounding:be(t,0,8)),F(new n(r),e,t)};v.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};v.truncated=v.trunc=function(){return F(new this.constructor(this),this.e+1,1)};v.valueOf=v.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 ue(e){var t,r,n,o=e.length-1,i="",s=e[0];if(o>0){for(i+=s,t=1;tr)throw Error(st+e)}function hr(e,t,r,n){var o,i,s,a;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=I,o=0):(o=Math.ceil((t+1)/I),t%=I),i=X(10,I-t),a=e[o]%i|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==i||r>3&&a+1==i/2)&&(e[o+1]/i/100|0)==X(10,t-2)-1||(a==i/2||a==0)&&(e[o+1]/i/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==i||!n&&r>3&&a+1==i/2)&&(e[o+1]/i/1e3|0)==X(10,t-3)-1,s}function yn(e,t,r){for(var n,o=[0],i,s=0,a=e.length;sr-1&&(o[n+1]===void 0&&(o[n+1]=0),o[n+1]+=o[n]/r|0,o[n]%=r)}return o.reverse()}function lp(e,t){var r,n,o;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),o=(1/Pn(4,r)).toString()):(r=16,o="2.3283064365386962890625e-10"),e.precision+=r,t=Kt(e,1,t.times(o),new e(1));for(var i=r;i--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var K=function(){function e(n,o,i){var s,a=0,u=n.length;for(n=n.slice();u--;)s=n[u]*o+a,n[u]=s%i|0,a=s/i|0;return a&&n.unshift(a),n}function t(n,o,i,s){var a,u;if(i!=s)u=i>s?1:-1;else for(a=u=0;ao[a]?1:-1;break}return u}function r(n,o,i,s){for(var a=0;i--;)n[i]-=a,a=n[i]1;)n.shift()}return function(n,o,i,s,a,u){var l,c,m,g,w,E,b,T,S,R,C,M,N,L,Te,V,H,Ee,z,Pe,We=n.constructor,$=n.s==o.s?1:-1,U=n.d,O=o.d;if(!U||!U[0]||!O||!O[0])return new We(!n.s||!o.s||(U?O&&U[0]==O[0]:!O)?NaN:U&&U[0]==0||!O?$*0:$/0);for(u?(w=1,c=n.e-o.e):(u=Oe,w=I,c=fe(n.e/w)-fe(o.e/w)),z=O.length,H=U.length,S=new We($),R=S.d=[],m=0;O[m]==(U[m]||0);m++);if(O[m]>(U[m]||0)&&c--,i==null?(L=i=We.precision,s=We.rounding):a?L=i+(n.e-o.e)+1:L=i,L<0)R.push(1),E=!0;else{if(L=L/w+2|0,m=0,z==1){for(g=0,O=O[0],L++;(m1&&(O=e(O,g,u),U=e(U,g,u),z=O.length,H=U.length),V=z,C=U.slice(0,z),M=C.length;M=u/2&&++Ee;do g=0,l=t(O,C,z,M),l<0?(N=C[0],z!=M&&(N=N*u+(C[1]||0)),g=N/Ee|0,g>1?(g>=u&&(g=u-1),b=e(O,g,u),T=b.length,M=C.length,l=t(b,C,T,M),l==1&&(g--,r(b,z=10;g/=10)m++;S.e=m+c*w-1,F(S,a?i+S.e+1:i,s,E)}return S}}();function F(e,t,r,n){var o,i,s,a,u,l,c,m,g,w=e.constructor;e:if(t!=null){if(m=e.d,!m)return e;for(o=1,a=m[0];a>=10;a/=10)o++;if(i=t-o,i<0)i+=I,s=t,c=m[g=0],u=c/X(10,o-s-1)%10|0;else if(g=Math.ceil((i+1)/I),a=m.length,g>=a)if(n){for(;a++<=g;)m.push(0);c=u=0,o=1,i%=I,s=i-I+1}else break e;else{for(c=a=m[g],o=1;a>=10;a/=10)o++;i%=I,s=i-I+o,u=s<0?0:c/X(10,o-s-1)%10|0}if(n=n||t<0||m[g+1]!==void 0||(s<0?c:c%X(10,o-s-1)),l=r<4?(u||n)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||n||r==6&&(i>0?s>0?c/X(10,o-s):0:m[g-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,l?(t-=e.e+1,m[0]=X(10,(I-t%I)%I),e.e=-t||0):m[0]=e.e=0,e;if(i==0?(m.length=g,a=1,g--):(m.length=g+1,a=X(10,I-i),m[g]=s>0?(c/X(10,o-s)%X(10,s)|0)*a:0),l)for(;;)if(g==0){for(i=1,s=m[0];s>=10;s/=10)i++;for(s=m[0]+=a,a=1;s>=10;s/=10)a++;i!=a&&(e.e++,m[0]==Oe&&(m[0]=1));break}else{if(m[g]+=a,m[g]!=Oe)break;m[g--]=0,a=1}for(i=m.length;m[--i]===0;)m.pop()}return D&&(e.e>w.maxE?(e.d=null,e.e=NaN):e.e0?i=i.charAt(0)+"."+i.slice(1)+ot(n):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):o<0?(i="0."+ot(-o-1)+i,r&&(n=r-s)>0&&(i+=ot(n))):o>=s?(i+=ot(o+1-s),r&&(n=r-o-1)>0&&(i=i+"."+ot(n))):((n=o+1)0&&(o+1===s&&(i+="."),i+=ot(n))),i}function En(e,t){var r=e[0];for(t*=I;r>=10;r/=10)t++;return t}function bn(e,t,r){if(t>up)throw D=!0,r&&(e.precision=r),Error(oa);return F(new e(hn),t,1,!0)}function Re(e,t,r){if(t>Uo)throw Error(oa);return F(new e(xn),t,r,!0)}function ua(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 ot(e){for(var t="";e--;)t+="0";return t}function la(e,t,r,n){var o,i=new e(1),s=Math.ceil(n/I+4);for(D=!1;;){if(r%2&&(i=i.times(t),ta(i.d,s)&&(o=!0)),r=fe(r/2),r===0){r=i.d.length-1,o&&i.d[r]===0&&++i.d[r];break}t=t.times(t),ta(t.d,s)}return D=!0,i}function ea(e){return e.d[e.d.length-1]&1}function ca(e,t,r){for(var n,o=new e(t[0]),i=0;++i17)return new g(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:0/0);for(t==null?(D=!1,u=E):u=t,a=new g(.03125);e.e>-2;)e=e.times(a),m+=5;for(n=Math.log(X(2,m))/Math.LN10*2+5|0,u+=n,r=i=s=new g(1),g.precision=u;;){if(i=F(i.times(e),u,1),r=r.times(++c),a=s.plus(K(i,r,u,1)),ue(a.d).slice(0,u)===ue(s.d).slice(0,u)){for(o=m;o--;)s=F(s.times(s),u,1);if(t==null)if(l<3&&hr(s.d,u-n,w,l))g.precision=u+=10,r=i=a=new g(1),c=0,l++;else return F(s,g.precision=E,w,D=!0);else return g.precision=E,s}s=a}}function it(e,t){var r,n,o,i,s,a,u,l,c,m,g,w=1,E=10,b=e,T=b.d,S=b.constructor,R=S.rounding,C=S.precision;if(b.s<0||!T||!T[0]||!b.e&&T[0]==1&&T.length==1)return new S(T&&!T[0]?-1/0:b.s!=1?NaN:T?0:b);if(t==null?(D=!1,c=C):c=t,S.precision=c+=E,r=ue(T),n=r.charAt(0),Math.abs(i=b.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=ue(b.d),n=r.charAt(0),w++;i=b.e,n>1?(b=new S("0."+r),i++):b=new S(n+"."+r.slice(1))}else return l=bn(S,c+2,C).times(i+""),b=it(new S(n+"."+r.slice(1)),c-E).plus(l),S.precision=C,t==null?F(b,C,R,D=!0):b;for(m=b,u=s=b=K(b.minus(1),b.plus(1),c,1),g=F(b.times(b),c,1),o=3;;){if(s=F(s.times(g),c,1),l=u.plus(K(s,new S(o),c,1)),ue(l.d).slice(0,c)===ue(u.d).slice(0,c))if(u=u.times(2),i!==0&&(u=u.plus(bn(S,c+2,C).times(i+""))),u=K(u,new S(w),c,1),t==null)if(hr(u.d,c-E,R,a))S.precision=c+=E,l=s=b=K(m.minus(1),m.plus(1),c,1),g=F(b.times(b),c,1),o=a=1;else return F(u,S.precision=C,R,D=!0);else return S.precision=C,u;u=l,o+=2}}function pa(e){return String(e.s*e.s/0)}function qo(e,t){var r,n,o;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(o=t.length;t.charCodeAt(o-1)===48;--o);if(t=t.slice(n,o),t){if(o-=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"),aa.test(t))return qo(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(ip.test(t))r=16,t=t.toLowerCase();else if(op.test(t))r=2;else if(sp.test(t))r=8;else throw Error(st+t);for(i=t.search(/p/i),i>0?(u=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),i=t.indexOf("."),s=i>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,i=a-i,o=la(n,new n(r),i,i*2)),l=yn(t,r,Oe),c=l.length-1,i=c;l[i]===0;--i)l.pop();return i<0?new n(e.s*0):(e.e=En(l,c),e.d=l,D=!1,s&&(e=K(e,o,a*4)),u&&(e=e.times(Math.abs(u)<54?X(2,u):wt.pow(2,u))),D=!0,e)}function pp(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:Kt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Pn(5,r)),t=Kt(e,2,t,t);for(var o,i=new e(5),s=new e(16),a=new e(20);r--;)o=t.times(t),t=t.times(i.plus(o.times(s.times(o).minus(a))));return t}function Kt(e,t,r,n,o){var i,s,a,u,l=1,c=e.precision,m=Math.ceil(c/I);for(D=!1,u=r.times(r),a=new e(n);;){if(s=K(a.times(u),new e(t++*t++),c,1),a=o?n.plus(s):n.minus(s),n=K(s.times(u),new e(t++*t++),c,1),s=a.plus(n),s.d[m]!==void 0){for(i=m;s.d[i]===a.d[i]&&i--;);if(i==-1)break}i=a,a=n,n=s,s=i,l++}return D=!0,s.d.length=m+1,s}function Pn(e,t){for(var r=e;--t;)r*=e;return r}function fa(e,t){var r,n=t.s<0,o=Re(e,e.precision,1),i=o.times(.5);if(t=t.abs(),t.lte(i))return Je=n?4:1,t;if(r=t.divToInt(o),r.isZero())Je=n?3:2;else{if(t=t.minus(r.times(o)),t.lte(i))return Je=ea(r)?n?2:3:n?4:1,t;Je=ea(r)?n?1:4:n?3:2}return t.minus(o).abs()}function Vo(e,t,r,n){var o,i,s,a,u,l,c,m,g,w=e.constructor,E=r!==void 0;if(E?(be(r,1,at),n===void 0?n=w.rounding:be(n,0,8)):(r=w.precision,n=w.rounding),!e.isFinite())c=pa(e);else{for(c=Be(e),s=c.indexOf("."),E?(o=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):o=t,s>=0&&(c=c.replace(".",""),g=new w(1),g.e=c.length-s,g.d=yn(Be(g),10,o),g.e=g.d.length),m=yn(c,10,o),i=u=m.length;m[--u]==0;)m.pop();if(!m[0])c=E?"0p+0":"0";else{if(s<0?i--:(e=new w(e),e.d=m,e.e=i,e=K(e,g,r,n,0,o),m=e.d,i=e.e,l=na),s=m[r],a=o/2,l=l||m[r+1]!==void 0,l=n<4?(s!==void 0||l)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||l||n===6&&m[r-1]&1||n===(e.s<0?8:7)),m.length=r,l)for(;++m[--r]>o-1;)m[r]=0,r||(++i,m.unshift(1));for(u=m.length;!m[u-1];--u);for(s=0,c="";s1)if(t==16||t==8){for(s=t==16?4:3,--u;u%s;u++)c+="0";for(m=yn(c,o,t),u=m.length;!m[u-1];--u);for(s=1,c="1.";su)for(i-=u;i--;)c+="0";else it)return e.length=t,!0}function fp(e){return new this(e).abs()}function dp(e){return new this(e).acos()}function mp(e){return new this(e).acosh()}function gp(e,t){return new this(e).plus(t)}function yp(e){return new this(e).asin()}function hp(e){return new this(e).asinh()}function xp(e){return new this(e).atan()}function bp(e){return new this(e).atanh()}function wp(e,t){e=new this(e),t=new this(t);var r,n=this.precision,o=this.rounding,i=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=Re(this,i,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?Re(this,n,o):new this(0),r.s=e.s):!e.d||t.isZero()?(r=Re(this,i,1).times(.5),r.s=e.s):t.s<0?(this.precision=i,this.rounding=1,r=this.atan(K(e,t,i,1)),t=Re(this,i,1),this.precision=n,this.rounding=o,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(K(e,t,i,1)),r}function Ep(e){return new this(e).cbrt()}function Pp(e){return F(e=new this(e),e.e+1,2)}function vp(e,t,r){return new this(e).clamp(t,r)}function Ap(e){if(!e||typeof e!="object")throw Error(wn+"Object expected");var t,r,n,o=e.defaults===!0,i=["precision",1,at,"rounding",0,8,"toExpNeg",-Vt,0,"toExpPos",0,Vt,"maxE",0,Vt,"minE",-Vt,0,"modulo",0,9];for(t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(st+r+": "+n);if(r="crypto",o&&(this[r]=jo[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(ia);else this[r]=!1;else throw Error(st+r+": "+n);return this}function Tp(e){return new this(e).cos()}function Cp(e){return new this(e).cosh()}function da(e){var t,r,n;function o(i){var s,a,u,l=this;if(!(l instanceof o))return new o(i);if(l.constructor=o,ra(i)){l.s=i.s,D?!i.d||i.e>o.maxE?(l.e=NaN,l.d=null):i.e=10;a/=10)s++;D?s>o.maxE?(l.e=NaN,l.d=null):s=429e7?t[i]=crypto.getRandomValues(new Uint32Array(1))[0]:a[i++]=o%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);i=214e7?crypto.randomBytes(4).copy(t,i):(a.push(o%1e7),i+=4);i=n/4}else throw Error(ia);else for(;i=10;o/=10)n++;n`}};function Jt(e){return e instanceof xr}d();p();f();d();p();f();var vn=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};d();p();f();var An=e=>e,Tn={bold:An,red:An,green:An,dim:An,enabled:!1},ma={bold:tt,red:_t,green:on,dim:nn,enabled:!0},Qt={write(e){e.writeLine(",")}};d();p();f();var Ue=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)))})}};d();p();f();var ut=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Wt=class extends ut{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new vn(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 Ue("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Qt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}};d();p();f();var ga=": ",Cn=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()+ga.length}write(t){let r=new Ue(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(ga).write(this.value)}};d();p();f();var ne=class e extends ut{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,...o]=r,i=this.getField(n);if(!i)return;let s=i;for(let a of o){let u;if(s.value instanceof e?u=s.value.getField(a):s.value instanceof Wt&&(u=s.value.getField(Number(a))),!u)return;s=u}return s}getDeepFieldValue(r){var n;return r.length===0?this:(n=this.getDeepField(r))==null?void 0:n.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){var n;return(n=this.getField(r))==null?void 0:n.value}getDeepSubSelectionValue(r){let n=this;for(let o of r){if(!(n instanceof e))return;let i=n.getSubSelectionValue(o);if(!i)return;n=i}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let o=n;for(let i of r){let s=o.value.getFieldValue(i);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;o=a}return o}getSelectionParent(){let r=this.getField("select");if((r==null?void 0:r.value)instanceof e)return{kind:"select",value:r.value};let n=this.getField("include");if((n==null?void 0:n.value)instanceof e)return{kind:"include",value:n.value}}getSubSelectionValue(r){var n;return(n=this.getSelectionParent())==null?void 0:n.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(o=>o.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)}writeEmpty(r){let n=new Ue("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(Qt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};d();p();f();var oe=class extends ut{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Ue(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}};var Ko=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 Mn(e){return new Ko(ya(e))}function ya(e){let t=new ne;for(let[r,n]of Object.entries(e)){let o=new Cn(r,ha(n));t.addField(o)}return t}function ha(e){if(typeof e=="string")return new oe(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new oe(String(e));if(typeof e=="bigint")return new oe(`${e}n`);if(e===null)return new oe("null");if(e===void 0)return new oe("undefined");if(Gt(e))return new oe(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return x.Buffer.isBuffer(e)?new oe(`Buffer.alloc(${e.byteLength})`):new oe(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=gn(e)?e.toISOString():"Invalid Date";return new oe(`new Date("${t}")`)}return e instanceof _e?new oe(`Prisma.${e._getName()}`):Jt(e)?new oe(`prisma.${Zi(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Yp(e):typeof e=="object"?ya(e):new oe(Object.prototype.toString.call(e))}function Yp(e){let t=new Wt;for(let r of e)t.addItem(ha(r));return t}function xa(e){if(e===void 0)return"";let t=Mn(e);return new $t(0,{colors:Tn}).write(t).toString()}d();p();f();d();p();f();d();p();f();d();p();f();d();p();f();var br="";function ba(e){var t=e.split(` -`);return t.reduce(function(r,n){var o=tf(n)||nf(n)||af(n)||pf(n)||lf(n);return o&&r.push(o),r},[])}var Xp=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ef=/\((\S*)(?::(\d+))(?::(\d+))\)/;function tf(e){var t=Xp.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,o=ef.exec(t[2]);return n&&o!=null&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]),{file:r?null:t[2],methodName:t[1]||br,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var rf=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function nf(e){var t=rf.exec(e);return t?{file:t[2],methodName:t[1]||br,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var of=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,sf=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function af(e){var t=of.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=sf.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||br,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var uf=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function lf(e){var t=uf.exec(e);return t?{file:t[3],methodName:t[1]||br,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var cf=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function pf(e){var t=cf.exec(e);return t?{file:t[2],methodName:t[1]||br,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Go=class{getLocation(){return null}},Jo=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=ba(t).find(o=>{if(!o.file)return!1;let i=Mo(o.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/")&&!o.methodName.includes("new ")&&!o.methodName.includes("getCallSite")&&!o.methodName.includes("Proxy.")&&o.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function lt(e){return e==="minimal"?new Go:new Jo}d();p();f();d();p();f();d();p();f();var wa={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Ht(e={}){let t=df(e);return Object.entries(t).reduce((n,[o,i])=>(wa[o]!==void 0?n.select[o]={select:i}:n[o]=i,n),{select:{}})}function df(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:Ht})(e)}d();p();f();function mf(e={}){let{select:t,...r}=e;return typeof t=="object"?Ht({...r,_count:t}):Ht({...r,_count:{_all:!0}})}function gf(e={}){return typeof e.select=="object"?t=>Sn(e)(t)._count:t=>Sn(e)(t)._count._all}function Pa(e,t){return t({action:"count",unpacker:gf(e),argsMapper:mf})(e)}d();p();f();function yf(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 hf(e={}){return t=>(typeof(e==null?void 0:e._count)=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function va(e,t){return t({action:"groupBy",unpacker:hf(e),argsMapper:yf})(e)}function Aa(e,t,r){if(t==="aggregate")return n=>Ea(n,r);if(t==="count")return n=>Pa(n,r);if(t==="groupBy")return n=>va(n,r)}d();p();f();function Ta(e,t){let r=t.fields.filter(o=>!o.relationName),n=Fo(r,o=>o.name);return new Proxy({},{get(o,i){if(i in o||typeof i=="symbol")return o[i];let s=n[i];if(s)return new xr(e,i,s.type,s.isList,s.kind==="enum")},...mn(Object.keys(n))})}d();p();f();d();p();f();var Ca=e=>Array.isArray(e)?e:e.split("."),Qo=(e,t)=>Ca(t).reduce((r,n)=>r&&r[n],e),Ma=(e,t,r)=>Ca(t).reduceRight((n,o,i,s)=>Object.assign({},Qo(e,s.slice(0,i)),{[o]:n}),r);function xf(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function bf(e,t,r){return t===void 0?e!=null?e:{}:Ma(t,r,e||!0)}function Wo(e,t,r,n,o,i){let a=e._runtimeDataModel.models[t].fields.reduce((u,l)=>({...u,[l.name]:l}),{});return u=>{let l=lt(e._errorFormat),c=xf(n,o),m=bf(u,i,c),g=r({dataPath:c,callsite:l})(m),w=wf(e,t);return new Proxy(g,{get(E,b){if(!w.includes(b))return E[b];let S=[a[b].type,r,b],R=[c,m];return Wo(e,...S,...R)},...mn([...w,...Object.getOwnPropertyNames(g)])})}}function wf(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}d();p();f();d();p();f();var Ia=ve(Bs());d();p();f();Ao();d();p();f();d();p();f();d();p();f();var Sa={keyword:rt,entity:rt,value:e=>tt(Nt(e)),punctuation:Nt,directive:rt,function:rt,variable:e=>tt(Nt(e)),string:e=>tt(on(e)),boolean:sn,number:rt,comment:an};var Ef=e=>e,Rn={},Pf=0,_={manual:Rn.Prism&&Rn.Prism.manual,disableWorkerMessageHandler:Rn.Prism&&Rn.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof Fe){let t=e;return new Fe(t.type,_.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(_.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ee instanceof Fe)continue;if(N&&V!=t.length-1){R.lastIndex=H;var m=R.exec(e);if(!m)break;var c=m.index+(M?m[1].length:0),g=m.index+m[0].length,a=V,u=H;for(let O=t.length;a=u&&(++V,H=u);if(t[V]instanceof Fe)continue;l=a-V,Ee=e.slice(H,u),m.index-=H}else{R.lastIndex=0;var m=R.exec(Ee),l=1}if(!m){if(i)break;continue}M&&(L=m[1]?m[1].length:0);var c=m.index+L,m=m[0].slice(L),g=c+m.length,w=Ee.slice(0,c),E=Ee.slice(g);let z=[V,l];w&&(++V,H+=w.length,z.push(w));let Pe=new Fe(b,C?_.tokenize(m,C):m,Te,m,N);if(z.push(Pe),E&&z.push(E),Array.prototype.splice.apply(t,z),l!=1&&_.matchGrammar(e,t,r,V,H,!0,b),i)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let o in n)t[o]=n[o];delete t.rest}return _.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=_.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=_.hooks.all[e];if(!(!r||!r.length))for(var n=0,o;o=r[n++];)o(t)}},Token:Fe};_.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:/[{}[\];(),.:]/};_.languages.javascript=_.languages.extend("clike",{"class-name":[_.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}/});_.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;_.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:_.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:_.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:_.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:_.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});_.languages.markup&&_.languages.markup.tag.addInlined("script","javascript");_.languages.js=_.languages.javascript;_.languages.typescript=_.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/});_.languages.ts=_.languages.typescript;function Fe(e,t,r,n,o){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!o}Fe.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return Fe.stringify(r,t)}).join(""):vf(e.type)(e.content)};function vf(e){return Sa[e]||Ef}function Ra(e){return Af(e,_.languages.javascript)}function Af(e,t){return _.tokenize(e,t).map(n=>Fe.stringify(n)).join("")}d();p();f();var Oa=ve(Ds());function Fa(e){return(0,Oa.default)(e)}var On=class e{static read(t){let r;try{r=un.readFileSync(t,"utf-8")}catch(n){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,o=[...this.lines];return o[n]=r(o[n]),new e(this.firstLineNumber,o)}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,o)=>o===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` -`);return new e(t,Fa(n).split(` -`))}highlight(){let t=Ra(this.toString());return new e(this.firstLineNumber,t.split(` -`))}toString(){return this.lines.join(` -`)}};var Tf={red:_t,gray:an,dim:nn,bold:tt,underline:Ms,highlightSource:e=>e.highlight()},Cf={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Mf({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:o},i){var m;let s={functionName:`prisma.${r}()`,message:t,isPanic:n!=null?n:!1,callArguments:o};if(!e||typeof window!="undefined"||y.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let u=Math.max(1,a.lineNumber-3),l=(m=On.read(a.fileName))==null?void 0:m.slice(u,a.lineNumber),c=l==null?void 0:l.lineAt(a.lineNumber);if(l&&c){let g=Rf(c),w=Sf(c);if(!w)return s;s.functionName=`${w.code})`,s.location=a,n||(l=l.mapLineAt(a.lineNumber,b=>b.slice(0,w.openingBraceIndex))),l=i.highlightSource(l);let E=String(l.lastLineNumber).length;if(s.contextLines=l.mapLines((b,T)=>i.gray(String(T).padStart(E))+" "+b).mapLines(b=>i.dim(b)).prependSymbolAt(a.lineNumber,i.bold(i.red("\u2192"))),o){let b=g+E+1;b+=2,s.callArguments=(0,Ia.default)(o,b).slice(b)}}return s}function Sf(e){let t=Object.keys(Ce.ModelAction).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let o=n.index+n[0].length,i=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(i,o),openingBraceIndex:o}}return null}function Rf(e){let t=0;for(let r=0;r{if("rejectOnNotFound"in n.args){let i=zt({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new pe(i,{clientVersion:t})}return await r(n).catch(i=>{throw i instanceof ce&&i.code==="P2025"?new Ke(`No ${e} found`,t):i})}}d();p();f();function $e(e){return e.replace(/^./,t=>t.toLowerCase())}var kf=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Df=["aggregate","count","groupBy"];function Ho(e,t){var o;let r=(o=e._extensions.getAllModelExtensions(t))!=null?o:{},n=[_f(e,t),Lf(e,t),gr(r),ge("name",()=>t),ge("$name",()=>t),ge("$parent",()=>e._appliedParent)];return Le({},n)}function _f(e,t){let r=$e(t),n=Object.keys(Ce.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(o){let i=o,s=u=>e._request(u);s=ka(i,t,e._clientVersion,s);let a=u=>l=>{let c=lt(e._errorFormat);return e._createPrismaPromise(m=>{let g={args:l,dataPath:[],action:i,model:t,clientMethod:`${r}.${o}`,jsModelName:r,transaction:m,callsite:c};return s({...g,...u})})};return kf.includes(i)?Wo(e,t,a):Nf(o)?Aa(e,o,a):a({})}}}function Nf(e){return Df.includes(e)}function Lf(e,t){return bt(ge("fields",()=>{let r=e._runtimeDataModel.models[t];return Ta(t,r)}))}d();p();f();function Da(e){return e.replace(/^./,t=>t.toUpperCase())}var zo=Symbol();function wr(e){let t=[Bf(e),ge(zo,()=>e),ge("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(gr(r)),Le(e,t)}function Bf(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map($e),n=[...new Set(t.concat(r))];return bt({getKeys(){return n},getPropertyValue(o){let i=Da(o);if(e._runtimeDataModel.models[i]!==void 0)return Ho(e,i);if(e._runtimeDataModel.models[o]!==void 0)return Ho(e,o)},getPropertyDescriptor(o){if(!r.includes(o))return{enumerable:!1}}})}function Fn(e){return e[zo]?e[zo]:e}function _a(e){if(typeof e=="function")return e(this);let t=Fn(this),r=Object.create(t,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return wr(r)}d();p();f();d();p();f();function Na({result:e,modelName:t,select:r,extensions:n}){let o=n.getAllComputedFields(t);if(!o)return e;let i=[],s=[];for(let a of Object.values(o)){if(r){if(!r[a.name])continue;let u=a.needs.filter(l=>!r[l]);u.length>0&&s.push(yr(u))}jf(e,a.needs)&&i.push(Uf(a,Le(e,i)))}return i.length>0||s.length>0?Le(e,[...i,...s]):e}function jf(e,t){return t.every(r=>Oo(e,r))}function Uf(e,t){return bt(ge(e.name,()=>e.compute(t)))}d();p();f();function In({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:o}){var s;if(Array.isArray(t)){for(let a=0;ac.name===i);if(!u||u.kind!=="object"||!u.relationName)continue;let l=typeof s=="object"?s:{};t[i]=In({visitor:o,result:t[i],args:l,modelName:u.type,runtimeDataModel:n})}}function Ba({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:o}){return n.isEmpty()||e==null||typeof e!="object"||!o.models[t]?e:In({result:e,args:r!=null?r:{},modelName:t,runtimeDataModel:o,visitor:(s,a,u)=>Na({result:s,modelName:$e(a),select:u.select,extensions:n})})}d();p();f();d();p();f();function ja(e){if(e instanceof xe)return $f(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{var s,a;let i=t.customDataProxyFetch;return"transaction"in t&&o!==void 0&&(((s=t.transaction)==null?void 0:s.kind)==="batch"&&t.transaction.lock.then(),t.transaction=o),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:ja((a=t.args)!=null?a:{}),__internalParams:t,query:(u,l=t)=>{let c=l.customDataProxyFetch;return l.customDataProxyFetch=Ga(i,c),l.args=u,$a(e,l,r,n+1)}})})}function qa(e,t){let{jsModelName:r,action:n,clientMethod:o}=t,i=r?n:o;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r!=null?r:"$none",i);return $a(e,t,s)}function Va(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Ka(r,n,0,e):e(r)}}function Ka(e,t,r,n){if(r===t.length)return n(e);let o=e.customDataProxyFetch,i=e.requests[0].transaction;return t[r]({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,a=e){let u=a.customDataProxyFetch;return a.customDataProxyFetch=Ga(o,u),Ka(a,t,r+1,n)}})}var Ua=e=>e;function Ga(e=Ua,t=Ua){return r=>e(t(r))}d();p();f();d();p();f();function Qa(e,t,r){let n=$e(r);return!t.result||!(t.result.$allModels||t.result[n])?e:qf({...e,...Ja(t.name,e,t.result.$allModels),...Ja(t.name,e,t.result[n])})}function qf(e){let t=new Ne,r=(n,o)=>t.getOrCreate(n,()=>o.has(n)?[n]:(o.add(n),e[n]?e[n].needs.flatMap(i=>r(i,o)):[n]));return jt(e,n=>({...n,needs:r(n.name,new Set)}))}function Ja(e,t,r){return r?jt(r,({needs:n,compute:o},i)=>({name:i,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Vf(t,i,o)})):{}}function Vf(e,t,r){var o;let n=(o=e==null?void 0:e[t])==null?void 0:o.compute;return n?i=>r({...i,[t]:n(i)}):r}function Wa(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let o of n.needs)r[o]=!0;return r}var kn=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new Ne;this.modelExtensionsCache=new Ne;this.queryCallbacksCache=new Ne;this.clientExtensions=cr(()=>{var t,r;return this.extension.client?{...(r=this.previous)==null?void 0:r.getAllClientExtensions(),...this.extension.client}:(t=this.previous)==null?void 0:t.getAllClientExtensions()});this.batchCallbacks=cr(()=>{var n,o,i;let t=(o=(n=this.previous)==null?void 0:n.getAllBatchQueryCallbacks())!=null?o:[],r=(i=this.extension.query)==null?void 0:i.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>{var r;return Qa((r=this.previous)==null?void 0:r.getAllComputedFields(t),this.extension,t)})}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{var n,o;let r=$e(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?(n=this.previous)==null?void 0:n.getAllModelExtensions(t):{...(o=this.previous)==null?void 0:o.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{var s,a;let n=(a=(s=this.previous)==null?void 0:s.getAllQueryCallbacks(t,r))!=null?a:[],o=[],i=this.extension.query;return!i||!(i[t]||i.$allModels||i[r]||i.$allOperations)?n:(i[t]!==void 0&&(i[t][r]!==void 0&&o.push(i[t][r]),i[t].$allOperations!==void 0&&o.push(i[t].$allOperations)),t!=="$none"&&i.$allModels!==void 0&&(i.$allModels[r]!==void 0&&o.push(i.$allModels[r]),i.$allModels.$allOperations!==void 0&&o.push(i.$allModels.$allOperations)),i[r]!==void 0&&o.push(i[r]),i.$allOperations!==void 0&&o.push(i.$allOperations),n.concat(o))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Dn=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new kn(t))}isEmpty(){return this.head===void 0}append(t){return new e(new kn(t,this.head))}getAllComputedFields(t){var r;return(r=this.head)==null?void 0:r.getAllComputedFields(t)}getAllClientExtensions(){var t;return(t=this.head)==null?void 0:t.getAllClientExtensions()}getAllModelExtensions(t){var r;return(r=this.head)==null?void 0:r.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){var n,o;return(o=(n=this.head)==null?void 0:n.getAllQueryCallbacks(t,r))!=null?o:[]}getAllBatchQueryCallbacks(){var t,r;return(r=(t=this.head)==null?void 0:t.getAllBatchQueryCallbacks())!=null?r:[]}};d();p();f();var Ha=he("prisma:client"),za={Vercel:"vercel","Netlify CI":"netlify"};function Za({postinstall:e,ciName:t,clientVersion:r}){if(Ha("checkPlatformCaching:postinstall",e),Ha("checkPlatformCaching:ciName",t),e===!0&&t&&t in za){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. +"use strict";var Xs=Object.create;var sr=Object.defineProperty;var ea=Object.getOwnPropertyDescriptor;var ta=Object.getOwnPropertyNames;var ra=Object.getPrototypeOf,na=Object.prototype.hasOwnProperty;var Ce=(e,t)=>()=>(e&&(t=e(e=0)),t);var Fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ar=(e,t)=>{for(var r in t)sr(e,r,{get:t[r],enumerable:!0})},zn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ta(t))!na.call(e,i)&&i!==r&&sr(e,i,{get:()=>t[i],enumerable:!(n=ea(t,i))||n.enumerable});return e};var _e=(e,t,r)=>(r=e!=null?Xs(ra(e)):{},zn(t||!e||!e.__esModule?sr(r,"default",{value:e,enumerable:!0}):r,e)),ia=e=>zn(sr({},"__esModule",{value:!0}),e);var y,c=Ce(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var b,p=Ce(()=>{"use strict";b=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,m=Ce(()=>{"use strict";E=()=>{};E.prototype=E});var d=Ce(()=>{"use strict"});var gi=Fe(ze=>{"use strict";f();c();p();m();d();var ti=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),oa=ti(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=C.indexOf("=");M===-1&&(M=R);var F=M===R?0:4-M%4;return[M,F]}function l(C){var R=a(C),M=R[0],F=R[1];return(M+F)*3/4-F}function u(C,R,M){return(R+M)*3/4-M}function g(C){var R,M=a(C),F=M[0],B=M[1],D=new n(u(C,F,B)),O=0,ae=B>0?F-4:F,G;for(G=0;G>16&255,D[O++]=R>>8&255,D[O++]=R&255;return B===2&&(R=r[C.charCodeAt(G)]<<2|r[C.charCodeAt(G+1)]>>4,D[O++]=R&255),B===1&&(R=r[C.charCodeAt(G)]<<10|r[C.charCodeAt(G+1)]<<4|r[C.charCodeAt(G+2)]>>2,D[O++]=R>>8&255,D[O++]=R&255),D}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function v(C,R,M){for(var F,B=[],D=R;Dae?ae:O+D));return F===1?(R=C[M-1],B.push(t[R>>2]+t[R<<4&63]+"==")):F===2&&(R=(C[M-2]<<8)+C[M-1],B.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),B.join("")}}),sa=ti(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,C=t[r+v];for(v+=S,s=C&(1<<-h)-1,C>>=-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:(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,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+C]=l&255,C+=R,l/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=R,a/=256,g-=8);t[n+C-R]|=M*128}}),zr=oa(),We=sa(),Yn=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.Buffer=T;ze.SlowBuffer=ma;ze.INSPECT_MAX_BYTES=50;var lr=2147483647;ze.kMaxLength=lr;T.TYPED_ARRAY_SUPPORT=aa();!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 aa(){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 Ee(e){if(e>lr)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 Xr(e)}return ri(e,t,r)}T.poolSize=8192;function ri(e,t,r){if(typeof e=="string")return ua(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(me(e,ArrayBuffer)||e&&me(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(e,SharedArrayBuffer)||e&&me(e.buffer,SharedArrayBuffer)))return ii(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=pa(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 ri(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function ni(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 la(e,t,r){return ni(e),e<=0?Ee(e):t!==void 0?typeof r=="string"?Ee(e).fill(t,r):Ee(e).fill(t):Ee(e)}T.alloc=function(e,t,r){return la(e,t,r)};function Xr(e){return ni(e),Ee(e<0?0:en(e)|0)}T.allocUnsafe=function(e){return Xr(e)};T.allocUnsafeSlow=function(e){return Xr(e)};function ua(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=oi(e,t)|0,n=Ee(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function Yr(e){let t=e.length<0?0:en(e.length)|0,r=Ee(t);for(let n=0;n=lr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+lr.toString(16)+" bytes");return e|0}function ma(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(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),me(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 oi(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||me(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 Zr(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:Zr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=oi;function da(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 va(this,t,r);case"utf8":case"utf-8":return ai(this,t,r);case"ascii":return xa(this,t,r);case"latin1":case"binary":return Pa(this,t,r);case"base64":return Ea(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ta(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Le(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+=" ... "),""};Yn&&(T.prototype[Yn]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(me(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,rn(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:Zn(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):Zn(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Zn(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 fa(this,e,t,r);case"utf8":case"utf-8":return ga(this,e,t,r);case"ascii":case"latin1":case"binary":return ha(this,e,t,r);case"base64":return ya(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wa(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 Ea(e,t,r){return t===0&&r===e.length?zr.fromByteArray(e):zr.fromByteArray(e.slice(t,r))}function ai(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 ba(n)}var Xn=4096;function ba(e){let t=e.length;if(t<=Xn)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,Ke(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&bt(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,Ke(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&bt(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,Ke(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&bt(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,Ke(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&bt(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),We.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||H(e,4,this.length),We.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||H(e,8,this.length),We.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||H(e,8,this.length),We.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 li(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 ui(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=Re(function(e,t=0){return li(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Re(function(e,t=0){return ui(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 li(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Re(function(e,t=0){return ui(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ci(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 pi(e,t,r,n,i){return t=+t,r=r>>>0,i||ci(e,t,r,4,34028234663852886e22,-34028234663852886e22),We.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return pi(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return pi(this,e,t,!1,r)};function mi(e,t,r,n,i){return t=+t,r=r>>>0,i||ci(e,t,r,8,17976931348623157e292,-17976931348623157e292),We.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return mi(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return mi(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=ei(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ei(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ei(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 Aa(e,t,r){Ke(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&bt(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 He.ERR_OUT_OF_RANGE("value",a,e)}Aa(n,i,o)}function Ke(e,t){if(typeof e!="number")throw new He.ERR_INVALID_ARG_TYPE(t,"number",e)}function bt(e,t,r){throw Math.floor(e)!==e?(Ke(e,r),new He.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new He.ERR_BUFFER_OUT_OF_BOUNDS:new He.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Ca=/[^+/0-9A-Za-z-_]/g;function Ra(e){if(e=e.split("=")[0],e=e.trim().replace(Ca,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Zr(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 Sa(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function fi(e){return zr.toByteArray(Ra(e))}function ur(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function me(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function rn(e){return e!==e}var Ia=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"?ka:e}function ka(){throw new Error("BigInt not supported")}});var w,f=Ce(()=>{"use strict";w=_e(gi())});function Da(){return!1}var Ma,Na,Ei,bi=Ce(()=>{"use strict";f();c();p();m();d();Ma={},Na={existsSync:Da,promises:Ma},Ei=Na});function $a(...e){return e.join("/")}function qa(...e){return e.join("/")}var Ni,Va,ja,Pt,Fi=Ce(()=>{"use strict";f();c();p();m();d();Ni="/",Va={sep:Ni},ja={resolve:$a,posix:Va,join:qa,sep:Ni},Pt=ja});var dr,Li=Ce(()=>{"use strict";f();c();p();m();d();dr=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 Ui=Fe((ed,Bi)=>{"use strict";f();c();p();m();d();Bi.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 Vi=Fe((md,qi)=>{"use strict";f();c();p();m();d();qi.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 Gi=Fe((wd,ji)=>{"use strict";f();c();p();m();d();var Ka=Vi();ji.exports=e=>typeof e=="string"?e.replace(Ka(),""):e});var Wi=Fe((wh,Xa)=>{Xa.exports={name:"@prisma/engines-version",version:"5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4c784e32044a8a016d99474bd02a3b6123742169"},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 Ki=Fe(()=>{"use strict";f();c();p();m();d()});var Vn=Fe((i2,as)=>{"use strict";f();c();p();m();d();as.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;sln,Decimal:()=>he,Extensions:()=>nn,MetricsClient:()=>Xe,NotFoundError:()=>xe,PrismaClientInitializationError:()=>J,PrismaClientKnownRequestError:()=>W,PrismaClientRustPanicError:()=>Pe,PrismaClientUnknownRequestError:()=>ne,PrismaClientValidationError:()=>z,Public:()=>on,Sql:()=>ie,defineDmmfProperty:()=>Hi,empty:()=>Yi,getPrismaClient:()=>zs,getRuntime:()=>_r,join:()=>zi,makeStrictEnum:()=>Ys,objectEnumValues:()=>gr,raw:()=>wn,sqltag:()=>En,warnEnvConflicts:()=>void 0,warnOnce:()=>Ct});module.exports=ia($c);f();c();p();m();d();var nn={};ar(nn,{defineExtension:()=>hi,getExtensionContext:()=>yi});f();c();p();m();d();f();c();p();m();d();function hi(e){return typeof e=="function"?e:t=>t.$extends(e)}f();c();p();m();d();function yi(e){return e}var on={};ar(on,{validator:()=>wi});f();c();p();m();d();f();c();p();m();d();function wi(...e){return t=>t}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();var sn,xi,Pi,vi,Ti=!0;typeof y<"u"&&({FORCE_COLOR:sn,NODE_DISABLE_COLORS:xi,NO_COLOR:Pi,TERM:vi}=y.env||{},Ti=y.stdout&&y.stdout.isTTY);var Fa={enabled:!xi&&Pi==null&&vi!=="dumb"&&(sn!=null&&sn!=="0"||Ti)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Fa.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Lp=V(0,0),cr=V(1,22),pr=V(2,22),Bp=V(3,23),Ai=V(4,24),Up=V(7,27),$p=V(8,28),qp=V(9,29),Vp=V(30,39),Ye=V(31,39),Ci=V(32,39),Ri=V(33,39),Si=V(34,39),jp=V(35,39),Oi=V(36,39),Gp=V(37,39),Ii=V(90,39),Jp=V(90,39),Qp=V(40,49),Hp=V(41,49),Wp=V(42,49),Kp=V(43,49),zp=V(44,49),Yp=V(45,49),Zp=V(46,49),Xp=V(47,49);f();c();p();m();d();var _a=100,ki=["green","yellow","blue","magenta","cyan","red"],mr=[],Di=Date.now(),La=0,an=typeof y<"u"?y.env:{};globalThis.DEBUG??=an.DEBUG??"";globalThis.DEBUG_COLORS??=an.DEBUG_COLORS?an.DEBUG_COLORS==="true":!0;var xt={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 Ba(e){let t={color:ki[La++%ki.length],enabled:xt.enabled(e),namespace:e,log:xt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&mr.push([o,...n]),mr.length>_a&&mr.shift(),xt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:Ua(g)),u=`+${Date.now()-Di}ms`;Di=Date.now(),a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var ln=new Proxy(Ba,{get:(e,t)=>xt[t],set:(e,t,r)=>xt[t]=r});function Ua(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 Mi(){mr.length=0}var ee=ln;f();c();p();m();d();f();c();p();m();d();var _i="library";function vt(e){let t=Ga();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":_i)}function Ga(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}f();c();p();m();d();f();c();p();m();d();var Be;(t=>{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||={})})(Be||={});var At={};ar(At,{error:()=>Ha,info:()=>Qa,log:()=>Ja,query:()=>Wa,should:()=>$i,tags:()=>Tt,warn:()=>un});f();c();p();m();d();var Tt={error:Ye("prisma:error"),warn:Ri("prisma:warn"),info:Oi("prisma:info"),query:Si("prisma:query")},$i={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Ja(...e){console.log(...e)}function un(e,...t){$i.warn()&&console.warn(`${Tt.warn} ${e}`,...t)}function Qa(e,...t){console.info(`${Tt.info} ${e}`,...t)}function Ha(e,...t){console.error(`${Tt.error} ${e}`,...t)}function Wa(e,...t){console.log(`${Tt.query} ${e}`,...t)}f();c();p();m();d();function be(e,t){throw new Error(t)}f();c();p();m();d();function cn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();c();p();m();d();var pn=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});f();c();p();m();d();function Ze(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();c();p();m();d();function mn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Ji.has(e)||(Ji.add(e),un(t,...r))};f();c();p();m();d();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 xe=class extends W{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};N(xe,"NotFoundError");f();c();p();m();d();var J=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(J,"PrismaClientInitializationError");f();c();p();m();d();var Pe=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(Pe,"PrismaClientRustPanicError");f();c();p();m();d();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();m();d();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();m();d();var Xe=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();m();d();f();c();p();m();d();function Rt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Hi(e,t){let r=Rt(()=>za(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function za(e){return{datamodel:{models:dn(e.models),enums:dn(e.enums),types:dn(e.types)}}}function dn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}f();c();p();m();d();var fr=Symbol(),fn=new WeakMap,ve=class{constructor(t){t===fr?fn.set(this,`Prisma.${this._getName()}`):fn.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return fn.get(this)}},St=class extends ve{_getNamespace(){return"NullTypes"}},Ot=class extends St{};gn(Ot,"DbNull");var It=class extends St{};gn(It,"JsonNull");var kt=class extends St{};gn(kt,"AnyNull");var gr={classes:{DbNull:Ot,JsonNull:It,AnyNull:kt},instances:{DbNull:new Ot(fr),JsonNull:new It(fr),AnyNull:new kt(fr)}};function gn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();function Dt(e){return{ok:!1,error:e,map(){return Dt(e)},flatMap(){return Dt(e)}}}var hn=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}},yn=e=>{let t=new hn,r=Ue(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ue(t,e.queryRaw.bind(e)),executeRaw:Ue(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>Ya(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=Za(t,e.getConnectionInfo.bind(e))),n},Ya=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ue(e,t.queryRaw.bind(t)),executeRaw:Ue(e,t.executeRaw.bind(t)),commit:Ue(e,t.commit.bind(t)),rollback:Ue(e,t.rollback.bind(t))});function Ue(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return Dt({kind:"GenericJs",id:i})}}}function Za(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return Dt({kind:"GenericJs",id:i})}}}var Ks=_e(Wi());var wk=_e(Ki());Li();bi();Fi();f();c();p();m();d();var ie=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();m();d();f();c();p();m();d();var hr={enumerable:!0,configurable:!0,writable:!0};function yr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>hr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Zi=Symbol.for("nodejs.util.inspect.custom");function fe(e,t){let r=el(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=Xi(Reflect.ownKeys(o),r),a=Xi(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?{...hr,...l?.getPropertyDescriptor(s)}:hr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[Zi]=function(){let o={...this};return delete o[Zi],o},i}function el(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 Xi(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}f();c();p();m();d();function et(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}f();c();p();m();d();function wr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}f();c();p();m();d();f();c();p();m();d();var tt=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();m();d();f();c();p();m();d();function eo(e){return e.substring(0,1).toLowerCase()+e.substring(1)}f();c();p();m();d();function rt(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Er(e){return e.toString()!=="Invalid Date"}f();c();p();m();d();f();c();p();m();d();var nt=9e15,ke=1e9,bn="0123456789abcdef",xr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Pr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",xn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-nt,maxE:nt,crypto:!1},io,Te,_=!0,Tr="[DecimalError] ",Ie=Tr+"Invalid argument: ",oo=Tr+"Precision limit exceeded",so=Tr+"crypto unavailable",ao="[object Decimal]",X=Math.floor,Q=Math.pow,tl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,rl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,nl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,lo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,k=7,il=9007199254740991,ol=xr.length-1,Pn=Pr.length-1,A={toStringTag:ao};A.absoluteValue=A.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),I(e)};A.ceil=function(){return I(new this.constructor(this),this.e+1,2)};A.clampedTo=A.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(Ie+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};A.comparedTo=A.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};A.cosine=A.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=sl(n,fo(n,r)),n.precision=e,n.rounding=t,I(Te==2||Te==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};A.cubeRoot=A.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.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&&(I(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")&&(I(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return _=!0,I(n,e,h.rounding,t)};A.decimalPlaces=A.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};A.dividedBy=A.div=function(e){return $(this,new this.constructor(e))};A.dividedToIntegerBy=A.divToInt=function(e){var t=this,r=t.constructor;return I($(t,new r(e),0,1,1),r.precision,r.rounding)};A.equals=A.eq=function(e){return this.cmp(e)===0};A.floor=function(){return I(new this.constructor(this),this.e+1,3)};A.greaterThan=A.gt=function(e){return this.cmp(e)>0};A.greaterThanOrEqualTo=A.gte=function(e){var t=this.cmp(e);return t==1||t===0};A.hyperbolicCosine=A.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/Cr(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 I(o,s.precision=r,s.rounding=n,!0)};A.hyperbolicSine=A.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/Cr(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,I(i,t,r,!0)};A.hyperbolicTangent=A.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,$(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};A.inverseCosine=A.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))};A.inverseHyperbolicCosine=A.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)};A.inverseHyperbolicSine=A.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())};A.inverseHyperbolicTangent=A.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?I(new o(i),e,t,!0):(o.precision=r=n-i.e,i=$(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)};A.inverseSine=A.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)))};A.inverseTangent=A.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<=Pn)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<=Pn)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};A.isNaN=function(){return!this.s};A.isNegative=A.isNeg=function(){return this.s<0};A.isPositive=A.isPos=function(){return this.s>0};A.isZero=function(){return!!this.d&&this.d[0]===0};A.lessThan=A.lt=function(e){return this.cmp(e)<0};A.lessThanOrEqualTo=A.lte=function(e){return this.cmp(e)<1};A.logarithm=A.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=Oe(u,a),n=t?vr(g,a+10):Oe(e,a),l=$(s,n,a,1),Nt(l.d,i=h,v))do if(a+=10,s=Oe(u,a),n=t?vr(g,a+10):Oe(e,a),l=$(s,n,a,1),!o){+Y(l.d).slice(i+1,i+15)+1==1e14&&(l=I(l,h+1,0));break}while(Nt(l.d,i+=10,v));return _=!0,I(l,h,v)};A.minus=A.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,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,v=e.d,a=C.precision,l=C.rounding,!u[0]||!v[0]){if(v[0])e.s=-e.s;else if(u[0])e=new C(S);else return new C(l===3?-0:0);return _?I(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=Ar(u,n),_?I(e,a,l):e};A.precision=A.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ie+e);return r.d?(t=uo(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};A.round=function(){var e=this,t=e.constructor;return I(new t(e),e.e+1,t.rounding)};A.sine=A.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=ll(n,fo(n,r)),n.precision=e,n.rounding=t,I(Te>2?r.neg():r,e,t,!0)):new n(NaN)};A.squareRoot=A.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($(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&&(I(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")&&(I(n,l+1,1),e=!n.times(n).eq(s));break}return _=!0,I(n,l,g.rounding,e)};A.tangent=A.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=$(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,I(Te==2||Te==4?r.neg():r,e,t,!0)):new n(NaN)};A.times=A.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=Ar(o,r),_?I(e,h.precision,h.rounding):e};A.toBinary=function(e,t){return An(this,2,e,t)};A.toDecimalPlaces=A.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(oe(e,0,ke),t===void 0?t=n.rounding:oe(t,0,8),I(r,e+r.e+1,t))};A.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ge(n,!0):(oe(e,0,ke),t===void 0?t=i.rounding:oe(t,0,8),n=I(new i(n),e+1,t),r=ge(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};A.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=ge(i):(oe(e,0,ke),t===void 0?t=o.rounding:oe(t,0,8),n=I(new o(i),e+i.e+1,t),r=ge(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};A.toFraction=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,S=this,C=S.d,R=S.constructor;if(!C)return new R(S);if(u=r=new R(1),n=l=new R(0),t=new R(n),o=t.e=uo(C)-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(Ie+a);e=a.gt(t)?o>0?t:u:a}for(_=!1,a=new R(Y(C)),g=R.precision,R.precision=o=C.length*k*2;h=$(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=$(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,n,o,1).minus(S).abs().cmp($(l,r,o,1).minus(S).abs())<1?[u,n]:[l,r],R.precision=g,_=!0,v};A.toHexadecimal=A.toHex=function(e,t){return An(this,16,e,t)};A.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:oe(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=$(r,e,0,t,1).times(e),_=!0,I(r)):(e.s=r.s,r=e),r};A.toNumber=function(){return+this};A.toOctal=function(e,t){return An(this,8,e,t)};A.toPower=A.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 I(a,n,o);if(t=X(e.e/k),t>=e.d.length-1&&(r=u<0?-u:u)<=il)return i=co(l,a,r,n),e.s<0?new l(1).div(i):I(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=vn(e.times(Oe(a,n+r)),n),i.d&&(i=I(i,n+5,1),Nt(i.d,n,o)&&(t=n+10,i=I(vn(e.times(Oe(a,t+r)),t),t+5,1),+Y(i.d).slice(n+1,n+15)+1==1e14&&(i=I(i,n+1,0)))),i.s=s,_=!0,l.rounding=o,I(i,n,o))};A.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ge(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(oe(e,1,ke),t===void 0?t=i.rounding:oe(t,0,8),n=I(new i(n),e,t),r=ge(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};A.toSignificantDigits=A.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(oe(e,1,ke),t===void 0?t=n.rounding:oe(t,0,8)),I(new n(r),e,t)};A.toString=function(){var e=this,t=e.constructor,r=ge(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};A.truncated=A.trunc=function(){return I(new this.constructor(this),this.e+1,1)};A.valueOf=A.toJSON=function(){var e=this,t=e.constructor,r=ge(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(Ie+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+=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 br(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 sl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Cr(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 $=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,C,R,M,F,B,D,O,ae,G,Hr,nr,Et,Wr,ue,ir,or=n.constructor,Kr=n.s==i.s?1:-1,Z=n.d,q=i.d;if(!Z||!Z[0]||!q||!q[0])return new or(!n.s||!i.s||(Z?q&&Z[0]==q[0]:!q)?NaN:Z&&Z[0]==0||!q?Kr*0:Kr/0);for(l?(S=1,g=n.e-i.e):(l=pe,S=k,g=X(n.e/S)-X(i.e/S)),ue=q.length,Et=Z.length,F=new or(Kr),B=F.d=[],h=0;q[h]==(Z[h]||0);h++);if(q[h]>(Z[h]||0)&&g--,o==null?(G=o=or.precision,s=or.rounding):a?G=o+(n.e-i.e)+1:G=o,G<0)B.push(1),C=!0;else{if(G=G/S+2|0,h=0,ue==1){for(v=0,q=q[0],G++;(h1&&(q=e(q,v,l),Z=e(Z,v,l),ue=q.length,Et=Z.length),nr=ue,D=Z.slice(0,ue),O=D.length;O=l/2&&++Wr;do v=0,u=t(q,D,ue,O),u<0?(ae=D[0],ue!=O&&(ae=ae*l+(D[1]||0)),v=ae/Wr|0,v>1?(v>=l&&(v=l-1),R=e(q,v,l),M=R.length,O=D.length,u=t(R,D,M,O),u==1&&(v--,r(R,ue=10;v/=10)h++;F.e=h+g*S-1,I(F,a?o+F.e+1:o,s,C)}return F}}();function I(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)+Se(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Se(-i-1)+o,r&&(n=r-s)>0&&(o+=Se(n))):i>=s?(o+=Se(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Se(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Se(n))),o}function Ar(e,t){var r=e[0];for(t*=k;r>=10;r/=10)t++;return t}function vr(e,t,r){if(t>ol)throw _=!0,r&&(e.precision=r),Error(oo);return I(new e(xr),t,1,!0)}function ce(e,t,r){if(t>Pn)throw Error(oo);return I(new e(Pr),t,r,!0)}function uo(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 Se(e){for(var t="";e--;)t+="0";return t}function co(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),ro(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),ro(t.d,s)}return _=!0,o}function to(e){return e.d[e.d.length-1]&1}function po(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=C):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=I(o.times(e),l,1),r=r.times(++g),a=s.plus($(o,r,l,1)),Y(a.d).slice(0,l)===Y(s.d).slice(0,l)){for(i=h;i--;)s=I(s.times(s),l,1);if(t==null)if(u<3&&Nt(s.d,l-n,S,u))v.precision=l+=10,r=o=a=new v(1),g=0,u++;else return I(s,v.precision=C,S,_=!0);else return v.precision=C,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,l,u,g,h,v,S=1,C=10,R=e,M=R.d,F=R.constructor,B=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+=C,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=vr(F,g+2,D).times(o+""),R=Oe(new F(n+"."+r.slice(1)),g-C).plus(u),F.precision=D,t==null?I(R,D,B,_=!0):R;for(h=R,l=s=R=$(R.minus(1),R.plus(1),g,1),v=I(R.times(R),g,1),i=3;;){if(s=I(s.times(v),g,1),u=l.plus($(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(vr(F,g+2,D).times(o+""))),l=$(l,new F(S),g,1),t==null)if(Nt(l.d,g-C,B,a))F.precision=g+=C,u=s=R=$(h.minus(1),h.plus(1),g,1),v=I(R.times(R),g,1),i=a=1;else return I(l,F.precision=D,B,_=!0);else return F.precision=D,l;l=u,i+=2}}function mo(e){return String(e.s*e.s/0)}function Tn(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"),lo.test(t))return Tn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(rl.test(t))r=16,t=t.toLowerCase();else if(tl.test(t))r=2;else if(nl.test(t))r=8;else throw Error(Ie+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=co(n,new n(r),o,o*2)),u=br(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=Ar(u,g),e.d=u,_=!1,s&&(e=$(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?Q(2,l):qe.pow(2,l))),_=!0,e)}function ll(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/Cr(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/k);for(_=!1,l=r.times(r),a=new e(n);;){if(s=$(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=$(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 Cr(e,t){for(var r=e;--t;)r*=e;return r}function fo(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 Te=n?4:1,t;if(r=t.divToInt(i),r.isZero())Te=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Te=to(r)?n?2:3:n?4:1,t;Te=to(r)?n?1:4:n?3:2}return t.minus(i).abs()}function An(e,t,r,n){var i,o,s,a,l,u,g,h,v,S=e.constructor,C=r!==void 0;if(C?(oe(r,1,ke),n===void 0?n=S.rounding:oe(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=mo(e);else{for(g=ge(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(".",""),v=new S(1),v.e=g.length-s,v.d=br(ge(v),10,i),v.e=v.d.length),h=br(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=$(e,v,r,n,0,i),h=e.d,o=e.e,u=io),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=br(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 ul(e){return new this(e).abs()}function cl(e){return new this(e).acos()}function pl(e){return new this(e).acosh()}function ml(e,t){return new this(e).plus(t)}function dl(e){return new this(e).asin()}function fl(e){return new this(e).asinh()}function gl(e){return new this(e).atan()}function hl(e){return new this(e).atanh()}function yl(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($(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($(e,t,o,1)),r}function wl(e){return new this(e).cbrt()}function El(e){return I(e=new this(e),e.e+1,2)}function bl(e,t,r){return new this(e).clamp(t,r)}function xl(e){if(!e||typeof e!="object")throw Error(Tr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,ke,"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(Ie+r+": "+n);if(r="crypto",i&&(this[r]=xn[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(so);else this[r]=!1;else throw Error(Ie+r+": "+n);return this}function Pl(e){return new this(e).cos()}function vl(e){return new this(e).cosh()}function go(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,no(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(so);else for(;o=10;i/=10)n++;n`}};function st(e){return e instanceof Ft}f();c();p();m();d();f();c();p();m();d();var Rr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};f();c();p();m();d();var Sr=e=>e,Or={bold:Sr,red:Sr,green:Sr,dim:Sr,enabled:!1},ho={bold:cr,red:Ye,green:Ci,dim:pr,enabled:!0},at={write(e){e.writeLine(",")}};f();c();p();m();d();var ye=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();m();d();var De=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var lt=class extends De{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 ye("[]");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(){}};f();c();p();m();d();var yo=": ",Ir=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()+yo.length}write(t){let r=new ye(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(yo).write(this.value)}};f();c();p();m();d();var ut=class e extends De{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 ye("{}");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();m();d();var K=class extends De{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new ye(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var Cn=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 ct(e){return new Cn(wo(e))}function wo(e){let t=new ut;for(let[r,n]of Object.entries(e)){let i=new Ir(r,Eo(n));t.addField(i)}return t}function Eo(e){if(typeof e=="string")return new K(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new K(String(e));if(typeof e=="bigint")return new K(`${e}n`);if(e===null)return new K("null");if(e===void 0)return new K("undefined");if(ot(e))return new K(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new K(`Buffer.alloc(${e.byteLength})`):new K(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Er(e)?e.toISOString():"Invalid Date";return new K(`new Date("${t}")`)}return e instanceof ve?new K(`Prisma.${e._getName()}`):st(e)?new K(`prisma.${eo(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Kl(e):typeof e=="object"?wo(e):new K(Object.prototype.toString.call(e))}function Kl(e){let t=new lt;for(let r of e)t.addItem(Eo(r));return t}function kr(e,t){let r=t==="pretty"?ho:Or,n=e.renderAllMessages(r),i=new tt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function bo(e){if(e===void 0)return"";let t=ct(e);return new tt(0,{colors:Or}).write(t).toString()}f();c();p();m();d();var zl="P2037";function _t({error:e,user_facing_error:t},r,n){return t.error_code?new W(Yl(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 Yl(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===zl&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();var Rn=class{getLocation(){return null}};function Me(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Rn}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();var xo={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function pt(e={}){let t=Xl(e);return Object.entries(t).reduce((n,[i,o])=>(xo[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Xl(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 Po(e,t){let r=Dr(e);return t({action:"aggregate",unpacker:r,argsMapper:pt})(e)}f();c();p();m();d();function eu(e={}){let{select:t,...r}=e;return typeof t=="object"?pt({...r,_count:t}):pt({...r,_count:{_all:!0}})}function tu(e={}){return typeof e.select=="object"?t=>Dr(e)(t)._count:t=>Dr(e)(t)._count._all}function vo(e,t){return t({action:"count",unpacker:tu(e),argsMapper:eu})(e)}f();c();p();m();d();function ru(e={}){let t=pt(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 nu(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function To(e,t){return t({action:"groupBy",unpacker:nu(e),argsMapper:ru})(e)}function Ao(e,t,r){if(t==="aggregate")return n=>Po(n,r);if(t==="count")return n=>vo(n,r);if(t==="groupBy")return n=>To(n,r)}f();c();p();m();d();function Co(e,t){let r=t.fields.filter(i=>!i.relationName),n=pn(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")},...yr(Object.keys(n))})}f();c();p();m();d();f();c();p();m();d();var Ro=e=>Array.isArray(e)?e:e.split("."),Sn=(e,t)=>Ro(t).reduce((r,n)=>r&&r[n],e),So=(e,t,r)=>Ro(t).reduceRight((n,i,o,s)=>Object.assign({},Sn(e,s.slice(0,o)),{[i]:n}),r);function iu(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function ou(e,t,r){return t===void 0?e??{}:So(t,r,e||!0)}function On(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Me(e._errorFormat),g=iu(n,i),h=ou(l,o,g),v=r({dataPath:g,callsite:u})(h),S=su(e,t);return new Proxy(v,{get(C,R){if(!S.includes(R))return C[R];let F=[a[R].type,r,R],B=[g,h];return On(e,...F,...B)},...yr([...S,...Object.getOwnPropertyNames(v)])})}}function su(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}f();c();p();m();d();f();c();p();m();d();var au=_e(Ui());var lu={red:Ye,gray:Ii,dim:pr,bold:cr,underline:Ai,highlightSource:e=>e.highlight()},uu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function cu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function pu({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(mu(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 mu(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function mt(e){let t=e.showColors?lu:uu,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=cu(e),pu(r,t)}function Oo(e,t,r,n){return e===Be.ModelAction.findFirstOrThrow||e===Be.ModelAction.findUniqueOrThrow?du(t,r,n):n}function du(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=mt({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 W&&o.code==="P2025"?new xe(`No ${e} found`,t):o})}}f();c();p();m();d();function we(e){return e.replace(/^./,t=>t.toLowerCase())}var fu=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],gu=["aggregate","count","groupBy"];function In(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[hu(e,t),wu(e,t),Mt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return fe({},n)}function hu(e,t){let r=we(t),n=Object.keys(Be.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=Oo(o,t,e._clientVersion,s);let a=l=>u=>{let g=Me(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 fu.includes(o)?On(e,t,a):yu(i)?Ao(e,i,a):a({})}}}function yu(e){return gu.includes(e)}function wu(e,t){return $e(te("fields",()=>{let r=e._runtimeDataModel.models[t];return Co(t,r)}))}f();c();p();m();d();function Io(e){return e.replace(/^./,t=>t.toUpperCase())}var kn=Symbol();function Lt(e){let t=[Eu(e),te(kn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Mt(r)),fe(e,t)}function Eu(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(we),n=[...new Set(t.concat(r))];return $e({getKeys(){return n},getPropertyValue(i){let o=Io(i);if(e._runtimeDataModel.models[o]!==void 0)return In(e,o);if(e._runtimeDataModel.models[i]!==void 0)return In(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ko(e){return e[kn]?e[kn]:e}function Do(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 Lt(t)}f();c();p();m();d();f();c();p();m();d();function Mo({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(et(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(et(u))}bu(e,l.needs)&&s.push(xu(l,fe(e,s)))}return s.length>0||a.length>0?fe(e,[...s,...a]):e}function bu(e,t){return t.every(r=>cn(e,r))}function xu(e,t){return $e(te(e.name,()=>e.compute(t)))}f();c();p();m();d();function Mr({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]=Mr({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Fo({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Mr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=we(l);return Mo({result:a,modelName:g,select:u.select,omit:u.select?void 0:{...o?.[g],...u.omit},extensions:n})}})}f();c();p();m();d();f();c();p();m();d();function _o(e){if(e instanceof ie)return Pu(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:_o(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Vo(o,l),a.args=s,Bo(e,a,r,n+1)}})})}function Uo(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 Bo(e,t,s)}function $o(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?qo(r,n,0,e):e(r)}}function qo(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=Vo(i,l),qo(a,t,r+1,n)}})}var Lo=e=>e;function Vo(e=Lo,t=Lo){return r=>e(t(r))}f();c();p();m();d();f();c();p();m();d();function Go(e,t,r){let n=we(r);return!t.result||!(t.result.$allModels||t.result[n])?e:vu({...e,...jo(t.name,e,t.result.$allModels),...jo(t.name,e,t.result[n])})}function vu(e){let t=new de,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 Ze(e,n=>({...n,needs:r(n.name,new Set)}))}function jo(e,t,r){return r?Ze(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Tu(t,o,i)})):{}}function Tu(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Jo(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 Qo(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 Nr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new de;this.modelExtensionsCache=new de;this.queryCallbacksCache=new de;this.clientExtensions=Rt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Rt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Go(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=we(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()}},Fr=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Nr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Nr(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();m();d();var Ho=ee("prisma:client"),Wo={Vercel:"vercel","Netlify CI":"netlify"};function Ko({postinstall:e,ciName:t,clientVersion:r}){if(Ho("checkPlatformCaching:postinstall",e),Ho("checkPlatformCaching:ciName",t),e===!0&&t&&t in Wo){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/${za[t]}-build`;throw console.error(n),new re(n,r)}}d();p();f();function Ya(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}d();p();f();d();p();f();d();p();f();function Zo({error:e,user_facing_error:t},r){return t.error_code?new ce(t.message,{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new Se(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}d();p();f();var _n=class{};d();p();f();function Xa(e,t){return{batch:e,transaction:(t==null?void 0:t.kind)==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}d();p();f();d();p();f();d();p();f();var Kf="Cloudflare-Workers",Gf="node";function eu(){var e,t,r;return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":((e=globalThis.navigator)==null?void 0:e.userAgent)===Kf?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":((r=(t=globalThis.process)==null?void 0:t.release)==null?void 0:r.name)===Gf?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}function Nn({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){var u,l;let o,i=Object.keys(e)[0],s=(u=e[i])==null?void 0:u.url,a=(l=t[i])==null?void 0:l.url;if(i===void 0?o=void 0:a?o=a:s!=null&&s.value?o=s.value:s!=null&&s.fromEnvVar&&(o=r[s.fromEnvVar]),(s==null?void 0:s.fromEnvVar)!==void 0&&o===void 0)throw eu()==="workerd"?new re(`error: Environment variable not found: ${s.fromEnvVar}. +Learn how: https://pris.ly/d/${Wo[t]}-build`;throw console.error(n),new J(n,r)}}f();c();p();m();d();function zo(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();var Au="Cloudflare-Workers",Cu="node";function Yo(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Au?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Cu?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Ru={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 _r(){let e=Yo();return{id:e,prettyName:Ru[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}f();c();p();m();d();f();c();p();m();d();f();c();p();m();d();function dt({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 _r().id==="workerd"?new J(`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 re(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(o===void 0)throw new re("error: Missing URL environment variable, value, or override.",n);return o}d();p();f();d();p();f();var Ln=class extends Error{constructor(r,n){super(r);this.clientVersion=n.clientVersion,this.cause=n.cause}get[Symbol.toStringTag](){return this.name}};var we=class extends Ln{constructor(r,n){var o;super(r,n);this.isRetryable=(o=n.isRetryable)!=null?o:!0}};d();p();f();d();p();f();function q(e,t){return{...e,isRetryable:t}}var Zt=class extends we{constructor(r){super("This request must be retried",q(r,!0));this.name="ForcedRetryError";this.code="P5001"}};k(Zt,"ForcedRetryError");d();p();f();var Et=class extends we{constructor(r,n){super(r,q(n,!1));this.name="InvalidDatasourceError";this.code="P5002"}};k(Et,"InvalidDatasourceError");d();p();f();var Pt=class extends we{constructor(r,n){super(r,q(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};k(Pt,"NotImplementedYetError");d();p();f();d();p();f();var J=class extends we{constructor(r,n){super(r,n);this.response=n.response;let o=this.response.headers.get("prisma-request-id");if(o){let i=`(The request id was: ${o})`;this.message=this.message+" "+i}}};var vt=class extends J{constructor(r){super("Schema needs to be uploaded",q(r,!0));this.name="SchemaMissingError";this.code="P5005"}};k(vt,"SchemaMissingError");d();p();f();d();p();f();var Yo="This request could not be understood by the server",Pr=class extends J{constructor(r,n,o){super(n||Yo,q(r,!1));this.name="BadRequestError";this.code="P5000";o&&(this.code=o)}};k(Pr,"BadRequestError");d();p();f();var vr=class extends J{constructor(r,n){super("Engine not started: healthcheck timeout",q(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};k(vr,"HealthcheckTimeoutError");d();p();f();var Ar=class extends J{constructor(r,n,o){super(n,q(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=o}};k(Ar,"EngineStartupError");d();p();f();var Tr=class extends J{constructor(r){super("Engine version is not supported",q(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};k(Tr,"EngineVersionNotSupportedError");d();p();f();var Xo="Request timed out",Cr=class extends J{constructor(r,n=Xo){super(n,q(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};k(Cr,"GatewayTimeoutError");d();p();f();var Jf="Interactive transaction error",Mr=class extends J{constructor(r,n=Jf){super(n,q(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};k(Mr,"InteractiveTransactionError");d();p();f();var Qf="Request parameters are invalid",Sr=class extends J{constructor(r,n=Qf){super(n,q(r,!1));this.name="InvalidRequestError";this.code="P5011"}};k(Sr,"InvalidRequestError");d();p();f();var ei="Requested resource does not exist",Rr=class extends J{constructor(r,n=ei){super(n,q(r,!1));this.name="NotFoundError";this.code="P5003"}};k(Rr,"NotFoundError");d();p();f();var ti="Unknown server error",Yt=class extends J{constructor(r,n,o){super(n||ti,q(r,!0));this.name="ServerError";this.code="P5006";this.logs=o}};k(Yt,"ServerError");d();p();f();var ri="Unauthorized, check your connection string",Or=class extends J{constructor(r,n=ri){super(n,q(r,!1));this.name="UnauthorizedError";this.code="P5007"}};k(Or,"UnauthorizedError");d();p();f();var ni="Usage exceeded, retry again later",Fr=class extends J{constructor(r,n=ni){super(n,q(r,!0));this.name="UsageExceededError";this.code="P5008"}};k(Fr,"UsageExceededError");async function Wf(e){let t;try{t=await e.text()}catch(r){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(r){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 Wf(e);if(n.type==="QueryEngineError")throw new ce(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 vt(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Tr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:o,logs:i}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Ar(r,o,i)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:o,error_code:i}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new re(o,t,i)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:o}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new vr(r,o)}}if("InteractiveTransactionMisrouted"in n.body){let o={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 Mr(r,o[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Sr(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Or(r,Xt(ri,n));if(e.status===404)return new Rr(r,Xt(ei,n));if(e.status===429)throw new Fr(r,Xt(ni,n));if(e.status===504)throw new Cr(r,Xt(Xo,n));if(e.status>=500)throw new Yt(r,Xt(ti,n));if(e.status>=400)throw new Pr(r,Xt(Yo,n))}function Xt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}d();p();f();function tu(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(o=>setTimeout(()=>o(n),n))}d();p();f();function ru(e){var r;if(!!((r=e.generator)!=null&&r.previewFeatures.some(n=>n.toLowerCase().includes("metrics"))))throw new re("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)}d();p();f();var nu={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*","@swc/core":"1.3.75","@swc/jest":"0.2.29","@types/jest":"29.5.5","@types/node":"18.18.0",execa:"5.1.1",jest:"29.7.0",typescript:"5.2.2"};d();p();f();d();p();f();var kr=class extends we{constructor(r,n){super(`Cannot fetch data from service: -${r}`,q(n,!0));this.name="RequestError";this.code="P5010"}};k(kr,"RequestError");async function At(e,t,r=n=>n){var o;let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(oi)(e,t)}catch(i){console.log(e);let s=(o=i.message)!=null?o:"Unknown error";throw new kr(s,{clientVersion:n})}}function zf(e){return{...e.headers,"Content-Type":"application/json"}}function Zf(e){return{method:e.method,headers:zf(e)}}function Yf(e,t){return{text:()=>Promise.resolve(x.Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(x.Buffer.concat(e).toString())),ok:t.statusCode>=200&&t.statusCode<=299,status:t.statusCode,url:t.url,headers:new ii(t.headers)}}async function oi(e,t={}){let r=Xf("https"),n=Zf(t),o=[],{origin:i}=new URL(e);return new Promise((s,a)=>{var l;let u=r.request(e,n,c=>{let{statusCode:m,headers:{location:g}}=c;m>=301&&m<=399&&g&&(g.startsWith("http")===!1?s(oi(`${i}${g}`,t)):s(oi(g,t))),c.on("data",w=>o.push(w)),c.on("end",()=>s(Yf(o,c))),c.on("error",a)});u.on("error",a),u.end((l=t.body)!=null?l:"")})}var Xf=typeof require!="undefined"?require:()=>{},ii=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 o of n)this.headers.set(r,o)}append(t,r){this.headers.set(t,r)}delete(t){this.headers.delete(t)}get(t){var r;return(r=this.headers.get(t))!=null?r:null}has(t){return this.headers.has(t)}set(t,r){this.headers.set(t,r)}forEach(t,r){for(let[n,o]of this.headers)t.call(r,o,n,this)}};var ed=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,ou=he("prisma:client:dataproxyEngine");async function td(e,t){var s,a,u;let r=nu["@prisma/engines-version"],n=(s=t.clientVersion)!=null?s:"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[o,i]=(a=n==null?void 0:n.split("-"))!=null?a:[];if(i===void 0&&ed.test(o))return o;if(i!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[l]=(u=r.split("-"))!=null?u:[],[c,m,g]=l.split("."),w=rd(`<=${c}.${m}.${g}`),E=await At(w,{clientVersion:n});if(!E.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${E.status} ${E.statusText}, response body: ${await E.text()||""}`);let b=await E.text();ou("length of body fetched from unpkg.com",b.length);let T;try{T=JSON.parse(b)}catch(S){throw console.error("JSON.parse error: body fetched from unpkg.com: ",b),S}return T.version}throw new Pt("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function iu(e,t){let r=await td(e,t);return ou("version",r),r}function rd(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var su=3,si=he("prisma:client:dataproxyEngine"),ai=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`};this.tracingHelper.isEnabled()&&(n.traceparent=t!=null?t:this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let o=this.buildCaptureSettings();return o.length>0&&(n["X-capture-telemetry"]=o.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 extends _n{constructor(r){var n,o,i,s;super();ru(r),this.config=r,this.env={...this.config.env,...y.env},this.inlineSchema=(n=r.inlineSchema)!=null?n:"",this.inlineDatasources=(o=r.inlineDatasources)!=null?o:{},this.inlineSchemaHash=(i=r.inlineSchemaHash)!=null?i:"",this.clientVersion=(s=r.clientVersion)!=null?s:"unknown",this.logEmitter=r.logEmitter,this.tracingHelper=this.config.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return"unknown"}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[r,n]=this.extractHostAndApiKey();this.host=r,this.headerBuilder=new ai({apiKey:n,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries}),this.remoteClientVersion=await iu(r,this.config),si("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(r){var n,o;(n=r==null?void 0:r.logs)!=null&&n.length&&r.logs.forEach(i=>{switch(i.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let s=typeof i.attributes.query=="string"?i.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[a]=s.split("/* traceparent");s=a}this.logEmitter.emit("query",{query:s,timestamp:i.timestamp,duration:i.attributes.duration_ms,params:i.attributes.params,target:i.attributes.target})}}}),(o=r==null?void 0:r.traces)!=null&&o.length&&this.tracingHelper.createEngineSpan({span:!0,spans:r.traces})}on(r,n){if(r==="beforeExit")throw new Error('"beforeExit" hook is not applicable to the remote query engine');this.logEmitter.on(r,n)}async url(r){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${r}`}async uploadSchema(){let r={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(r,async()=>{let n=await At(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});n.ok||si("schema response status",n.status);let o=await Ir(n,this.clientVersion);if(o)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${o.message}`}),o;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`})})}request(r,{traceparent:n,interactiveTransaction:o,customDataProxyFetch:i}){return this.requestInternal({body:r,traceparent:n,interactiveTransaction:o,customDataProxyFetch:i})}async requestBatch(r,{traceparent:n,transaction:o,customDataProxyFetch:i}){let s=(o==null?void 0:o.kind)==="itx"?o.options:void 0,a=Xa(r,o),{batchResult:u,elapsed:l}=await this.requestInternal({body:a,customDataProxyFetch:i,interactiveTransaction:s,traceparent:n});return u.map(c=>"errors"in c&&c.errors.length>0?Zo(c.errors[0],this.clientVersion):{data:c,elapsed:l})}requestInternal({body:r,traceparent:n,customDataProxyFetch:o,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:s})=>{let a=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");s(a);let u=await At(a,{method:"POST",headers:this.headerBuilder.build({traceparent:n,interactiveTransaction:i}),body:JSON.stringify(r),clientVersion:this.clientVersion},o);u.ok||si("graphql response status",u.status),await this.handleError(await Ir(u,this.clientVersion));let l=await u.json(),c=l.extensions;if(c&&this.propagateResponseExtensions(c),l.errors)throw l.errors.length===1?Zo(l.errors[0],this.config.clientVersion):new Se(l.errors,{clientVersion:this.config.clientVersion});return l}})}async transaction(r,n,o){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[r]} transaction`,callback:async({logHttpCall:s})=>{var a,u;if(r==="start"){let l=JSON.stringify({max_wait:(a=o==null?void 0:o.maxWait)!=null?a:2e3,timeout:(u=o==null?void 0:o.timeout)!=null?u:5e3,isolation_level:o==null?void 0:o.isolationLevel}),c=await this.url("transaction/start");s(c);let m=await At(c,{method:"POST",headers:this.headerBuilder.build({traceparent:n.traceparent}),body:l,clientVersion:this.clientVersion});await this.handleError(await Ir(m,this.clientVersion));let g=await m.json(),w=g.extensions;w&&this.propagateResponseExtensions(w);let E=g.id,b=g["data-proxy"].endpoint;return{id:E,payload:{endpoint:b}}}else{let l=`${o.payload.endpoint}/${r}`;s(l);let c=await At(l,{method:"POST",headers:this.headerBuilder.build({traceparent:n.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Ir(c,this.clientVersion));let g=(await c.json()).extensions;g&&this.propagateResponseExtensions(g);return}}})}extractHostAndApiKey(){let r={clientVersion:this.clientVersion},n=Object.keys(this.inlineDatasources)[0],o=Nn({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(o)}catch(c){throw new Et(`Error validating datasource \`${n}\`: the URL must start with the protocol \`prisma://\``,r)}let{protocol:s,host:a,searchParams:u}=i;if(s!=="prisma:")throw new Et(`Error validating datasource \`${n}\`: the URL must start with the protocol \`prisma://\``,r);let l=u.get("api_key");if(l===null||l.length<1)throw new Et(`Error validating datasource \`${n}\`: the URL must contain a valid API key`,r);return[a,l]}metrics(){throw new Pt("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(r){var n;for(let o=0;;o++){let i=s=>{this.logEmitter.emit("info",{message:`Calling ${s} (n=${o})`})};try{return await r.callback({logHttpCall:i})}catch(s){if(!(s instanceof we)||!s.isRetryable)throw s;if(o>=su)throw s instanceof Zt?s.cause:s;this.logEmitter.emit("warn",{message:`Attempt ${o+1}/${su} failed for ${r.actionGerund}: ${(n=s.message)!=null?n:"(unknown)"}`});let a=await tu(o);this.logEmitter.emit("warn",{message:`Retrying after ${a}ms`})}}}async handleError(r){if(r instanceof vt)throw await this.uploadSchema(),new Zt({clientVersion:this.clientVersion,cause:r});if(r)throw r}};function au(e,t){let r;try{r=Nn({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch(o){}e.noEngine!==!0&&(r!=null&&r.startsWith("prisma://"))&&lr("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=Co(t.generator);return r!=null&&r.startsWith("prisma://")||e.noEngine,new Dr(t);throw new pe("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}d();p();f();function Bn({generator:e}){var t;return(t=e==null?void 0:e.previewFeatures)!=null?t:[]}d();p();f();d();p();f();d();p();f();var du=ve(ui());d();p();f();function pu(e,t){let r=fu(e),n=nd(r),o=id(n);o?jn(o,t):t.addErrorMessage(()=>"Unknown error")}function fu(e){return e.errors.flatMap(t=>t.kind==="Union"?fu(t):[t])}function nd(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let o=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,i=t.get(o);i?t.set(o,{...n,argument:{...n.argument,typeNames:od(i.argument.typeNames,n.argument.typeNames)}}):t.set(o,n)}return r.push(...t.values()),r}function od(e,t){return[...new Set(e.concat(t))]}function id(e){return Io(e,(t,r)=>{let n=lu(t),o=lu(r);return n!==o?n-o:cu(t)-cu(r)})}function lu(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function cu(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}d();p();f();var Qe=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)}};d();p();f();var Un=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:o,dim:i}=n.context.colors;n.write(o(i(`${t}: ${r}`))).addMarginSymbol(o(i("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(Qt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function jn(e,t){switch(e.kind){case"IncludeAndSelect":sd(e,t);break;case"IncludeOnScalar":ad(e,t);break;case"EmptySelection":ud(e,t);break;case"UnknownSelectionField":ld(e,t);break;case"UnknownArgument":cd(e,t);break;case"UnknownInputField":pd(e,t);break;case"RequiredArgumentMissing":fd(e,t);break;case"InvalidArgumentType":dd(e,t);break;case"InvalidArgumentValue":md(e,t);break;case"ValueTooLarge":gd(e,t);break;case"SomeFieldsMissing":yd(e,t);break;case"TooManyFieldsGiven":hd(e,t);break;case"Union":pu(e,t);break;default:throw new Error("not implemented: "+e.kind)}}function sd(e,t){var n,o;let r=t.arguments.getDeepSubSelectionValue(e.selectionPath);r&&r instanceof ne&&((n=r.getField("include"))==null||n.markAsError(),(o=r.getField("select"))==null||o.markAsError()),t.addErrorMessage(i=>`Please ${i.bold("either")} use ${i.green("`include`")} or ${i.green("`select`")}, but ${i.red("not both")} at the same time.`)}function ad(e,t){var s,a;let[r,n]=$n(e.selectionPath),o=e.outputType,i=(s=t.arguments.getDeepSelectionParent(r))==null?void 0:s.value;if(i&&((a=i.getField(n))==null||a.markAsError(),o))for(let u of o.fields)u.isRelation&&i.addSuggestion(new Qe(u.name,"true"));t.addErrorMessage(u=>{let l=`Invalid scalar field ${u.red(`\`${n}\``)} for ${u.bold("include")} statement`;return o?l+=` on model ${u.bold(o.name)}. ${_r(u)}`:l+=".",l+=` -Note that ${u.bold("include")} statements only accept relation fields.`,l})}function ud(e,t){var i,s;let r=e.outputType,n=(i=t.arguments.getDeepSelectionParent(e.selectionPath))==null?void 0:i.value,o=(s=n==null?void 0:n.isEmpty())!=null?s:!1;n&&(n.removeAllFields(),yu(n,r)),t.addErrorMessage(a=>o?`The ${a.red("`select`")} statement for type ${a.bold(r.name)} must not be empty. ${_r(a)}`:`The ${a.red("`select`")} statement for type ${a.bold(r.name)} needs ${a.bold("at least one truthy value")}.`)}function ld(e,t){var i;let[r,n]=$n(e.selectionPath),o=t.arguments.getDeepSelectionParent(r);o&&((i=o.value.getField(n))==null||i.markAsError(),yu(o.value,e.outputType)),t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o.kind)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(_r(s)),a.join(" ")})}function cd(e,t){var o;let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof ne&&((o=n.getField(r))==null||o.markAsError(),xd(n,e.arguments)),t.addErrorMessage(i=>mu(i,r,e.arguments.map(s=>s.name)))}function pd(e,t){var i;let[r,n]=$n(e.argumentPath),o=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(o instanceof ne){(i=o.getDeepField(e.argumentPath))==null||i.markAsError();let s=o.getDeepFieldValue(r);s instanceof ne&&hu(s,e.inputType)}t.addErrorMessage(s=>mu(s,n,e.inputType.fields.map(a=>a.name)))}function mu(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],o=wd(t,r);return o&&n.push(`Did you mean \`${e.green(o)}\`?`),r.length>0&&n.push(_r(e)),n.join(" ")}function fd(e,t){let r;t.addErrorMessage(u=>(r==null?void 0:r.value)instanceof oe&&r.value.text==="null"?`Argument \`${u.green(i)}\` must not be ${u.red("null")}.`:`Argument \`${u.green(i)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(!(n instanceof ne))return;let[o,i]=$n(e.argumentPath),s=new Un,a=n.getDeepFieldValue(o);if(a instanceof ne)if(r=a.getField(i),r&&a.removeField(i),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 Qe(i,s).makeRequired())}else{let u=e.inputTypes.map(gu).join(" | ");a.addSuggestion(new Qe(i,u).makeRequired())}}function gu(e){return e.kind==="list"?`${gu(e.elementType)}[]`:e.name}function dd(e,t){var o;let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof ne&&((o=n.getDeepFieldValue(e.argumentPath))==null||o.markAsError()),t.addErrorMessage(i=>{let s=qn("or",e.argument.typeNames.map(a=>i.green(a)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${s}, provided ${i.red(e.inferredType)}.`})}function md(e,t){var o;let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof ne&&((o=n.getDeepFieldValue(e.argumentPath))==null||o.markAsError()),t.addErrorMessage(i=>{let s=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&s.push(`: ${e.underlyingError}`),s.push("."),e.argument.typeNames.length>0){let a=qn("or",e.argument.typeNames.map(u=>i.green(u)));s.push(` Expected ${a}.`)}return s.join("")})}function gd(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath),o;if(n instanceof ne){let i=n.getDeepField(e.argumentPath),s=i==null?void 0:i.value;s==null||s.markAsError(),s instanceof oe&&(o=s.text)}t.addErrorMessage(i=>{let s=["Unable to fit value"];return o&&s.push(i.red(o)),s.push(`into a 64-bit signed integer for field \`${i.bold(r)}\``),s.join(" ")})}function yd(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(n instanceof ne){let o=n.getDeepFieldValue(e.argumentPath);o instanceof ne&&hu(o,e.inputType)}t.addErrorMessage(o=>{let i=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?i.push(`${o.green("at least one of")} ${qn("or",e.constraints.requiredFields.map(s=>`\`${o.bold(s)}\``))} arguments.`):i.push(`${o.green("at least one")} argument.`):i.push(`${o.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),i.push(_r(o)),i.join(" ")})}function hd(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath),o=[];if(n instanceof ne){let i=n.getDeepFieldValue(e.argumentPath);i instanceof ne&&(i.markAsError(),o=Object.keys(i.getFields()))}t.addErrorMessage(i=>{let s=[`Argument \`${i.bold(r)}\` 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 ${qn("and",o.map(a=>i.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function yu(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new Qe(r.name,"true"))}function xd(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new Qe(r.name,r.typeNames.join(" | ")))}function hu(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new Qe(r.name,r.typeNames.join(" | ")))}function $n(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function _r({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function qn(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var bd=3;function wd(e,t){let r=1/0,n;for(let o of t){let i=(0,du.default)(e,o);i>bd||i({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){var r;return(r=this.model)==null?void 0:r.fields.find(n=>n.name===t)}nestSelection(t){let r=this.findField(t),n=(r==null?void 0:r.kind)==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};d();p();f();var Eu=e=>({command:e});d();p();f();d();p();f();var Pu=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);d();p();f();function Nr(e){try{return vu(e,"fast")}catch(t){return vu(e,"slow")}}function vu(e,t){return JSON.stringify(e.map(r=>Rd(r,t)))}function Rd(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:qt(e)?{prisma__type:"date",prisma__value:e.toJSON()}:je.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:x.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Od(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:x.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Tu(e):e}function Od(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Tu(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Au);let t={};for(let r of Object.keys(e))t[r]=Au(e[r]);return t}function Au(e){return typeof e=="bigint"?e.toString():Tu(e)}var Fd=/^(\s*alter\s)/i,Cu=he("prisma:client");function pi(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Fd.exec(t))throw new Error(`Running ALTER using ${n} is not supported +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new J(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new J("error: Missing URL environment variable, value, or override.",n);return i}f();c();p();m();d();f();c();p();m();d();var Lr=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 Lr{constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};f();c();p();m();d();f();c();p();m();d();function L(e,t){return{...e,isRetryable:t}}var ft=class extends se{constructor(r){super("This request must be retried",L(r,!0));this.name="ForcedRetryError";this.code="P5001"}};N(ft,"ForcedRetryError");f();c();p();m();d();var Ve=class extends se{constructor(r,n){super(r,L(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};N(Ve,"InvalidDatasourceError");f();c();p();m();d();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();m();d();f();c();p();m();d();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();m();d();f();c();p();m();d();var Dn="This request could not be understood by the server",Ut=class extends j{constructor(r,n,i){super(n||Dn,L(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};N(Ut,"BadRequestError");f();c();p();m();d();var $t=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($t,"HealthcheckTimeoutError");f();c();p();m();d();var qt=class extends j{constructor(r,n,i){super(n,L(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};N(qt,"EngineStartupError");f();c();p();m();d();var Vt=class extends j{constructor(r){super("Engine version is not supported",L(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};N(Vt,"EngineVersionNotSupportedError");f();c();p();m();d();var Mn="Request timed out",jt=class extends j{constructor(r,n=Mn){super(n,L(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};N(jt,"GatewayTimeoutError");f();c();p();m();d();var Su="Interactive transaction error",Gt=class extends j{constructor(r,n=Su){super(n,L(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};N(Gt,"InteractiveTransactionError");f();c();p();m();d();var Ou="Request parameters are invalid",Jt=class extends j{constructor(r,n=Ou){super(n,L(r,!1));this.name="InvalidRequestError";this.code="P5011"}};N(Jt,"InvalidRequestError");f();c();p();m();d();var Nn="Requested resource does not exist",Qt=class extends j{constructor(r,n=Nn){super(n,L(r,!1));this.name="NotFoundError";this.code="P5003"}};N(Qt,"NotFoundError");f();c();p();m();d();var Fn="Unknown server error",gt=class extends j{constructor(r,n,i){super(n||Fn,L(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};N(gt,"ServerError");f();c();p();m();d();var _n="Unauthorized, check your connection string",Ht=class extends j{constructor(r,n=_n){super(n,L(r,!1));this.name="UnauthorizedError";this.code="P5007"}};N(Ht,"UnauthorizedError");f();c();p();m();d();var Ln="Usage exceeded, retry again later",Wt=class extends j{constructor(r,n=Ln){super(n,L(r,!0));this.name="UsageExceededError";this.code="P5008"}};N(Wt,"UsageExceededError");async function Iu(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 Kt(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await Iu(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 gt(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 Vt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new qt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new J(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new $t(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 Gt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Jt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Ht(r,ht(_n,n));if(e.status===404)return new Qt(r,ht(Nn,n));if(e.status===429)throw new Wt(r,ht(Ln,n));if(e.status===504)throw new jt(r,ht(Mn,n));if(e.status>=500)throw new gt(r,ht(Fn,n));if(e.status>=400)throw new Ut(r,ht(Dn,n))}function ht(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}f();c();p();m();d();function Zo(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();m();d();var Ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Xo(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+=Ae[s]+Ae[a]+Ae[l]+Ae[u];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Ae[s]+Ae[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Ae[s]+Ae[a]+Ae[l]+"="),r}f();c();p();m();d();function es(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new J("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();m();d();function ku(e){return e[0]*1e3+e[1]/1e6}function ts(e){return new Date(ku(e))}f();c();p();m();d();var rs={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};f();c();p();m();d();f();c();p();m();d();var zt=class extends se{constructor(r,n){super(`Cannot fetch data from service: +${r}`,L(n,!0));this.name="RequestError";this.code="P5010"}};N(zt,"RequestError");async function Je(e,t,r=n=>n){let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(Bn)(e,t)}catch(i){let o=i.message??"Unknown error";throw new zt(o,{clientVersion:n})}}function Mu(e){return{...e.headers,"Content-Type":"application/json"}}function Nu(e){return{method:e.method,headers:Mu(e)}}function Fu(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 Un(t.headers)}}async function Bn(e,t={}){let r=_u("https"),n=Nu(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(Bn(`${o}${h}`,t)):s(Bn(h,t))),u.on("data",v=>i.push(v)),u.on("end",()=>s(Fu(i,u))),u.on("error",a)});l.on("error",a),l.end(t.body??"")})}var _u=typeof require<"u"?require:()=>{},Un=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 Lu=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,ns=ee("prisma:client:dataproxyEngine");async function Bu(e,t){let r=rs["@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&&Lu.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=Uu(`<=${a}.${l}.${u}`),h=await Je(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();ns("length of body fetched from unpkg.com",v.length);let S;try{S=JSON.parse(v)}catch(C){throw console.error("JSON.parse error: body fetched from unpkg.com: ",v),C}return S.version}throw new je("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function is(e,t){let r=await Bu(e,t);return ns("version",r),r}function Uu(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var os=3,$n=ee("prisma:client:dataproxyEngine"),qn=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}},Yt=class{constructor(t){this.name="DataProxyEngine";es(t),this.config=t,this.env={...t.env,...typeof y<"u"?y.env:{}},this.inlineSchema=Xo(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 qn({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await is(t,this.config),$n("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:ts(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 Je(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||$n("schema response status",r.status);let n=await Kt(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=wr(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?_t(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 Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||$n("graphql response status",a.status),await this.handleError(await Kt(a,this.clientVersion));let l=await a.json(),u=l.extensions;if(u&&this.propagateResponseExtensions(u),l.errors)throw l.errors.length===1?_t(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 Je(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Kt(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 Je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Kt(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=dt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new Ve(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:")throw new Ve(`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 Ve(`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>=os)throw i instanceof ft?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${os} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Zo(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 ft({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=dt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}e&&r?.startsWith("prisma://")&&Ct("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=vt(t.generator),i=!!(r?.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o){let l;throw l=["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(l.join(` +`),{clientVersion:t.clientVersion})}if(i)return new Yt(t);throw new z("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}f();c();p();m();d();function Br({generator:e}){return e?.previewFeatures??[]}f();c();p();m();d();f();c();p();m();d();function yt(e){return e.substring(0,1).toLowerCase()+e.substring(1)}f();c();p();m();d();f();c();p();m();d();var ms=_e(Vn());f();c();p();m();d();function cs(e,t,r){let n=ps(e),i=$u(n),o=Vu(i);o?Ur(o,t,r):t.addErrorMessage(()=>"Unknown error")}function ps(e){return e.errors.flatMap(t=>t.kind==="Union"?ps(t):[t])}function $u(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:qu(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function qu(e,t){return[...new Set(e.concat(t))]}function Vu(e){return mn(e,(t,r)=>{let n=ls(t),i=ls(r);return n!==i?n-i:us(t)-us(r)})}function ls(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function us(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}f();c();p();m();d();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();m();d();var Zt=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 Ur(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":ju(e,t);break;case"IncludeOnScalar":Gu(e,t);break;case"EmptySelection":Ju(e,t,r);break;case"UnknownSelectionField":Ku(e,t);break;case"UnknownArgument":zu(e,t);break;case"UnknownInputField":Yu(e,t);break;case"RequiredArgumentMissing":Zu(e,t);break;case"InvalidArgumentType":Xu(e,t);break;case"InvalidArgumentValue":ec(e,t);break;case"ValueTooLarge":tc(e,t);break;case"SomeFieldsMissing":rc(e,t);break;case"TooManyFieldsGiven":nc(e,t);break;case"Union":cs(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function ju(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 Gu(e,t){let[r,n]=Xt(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)}. ${er(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Ju(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Qu(e,t,i);return}if(n.hasField("select")){Hu(e,t);return}}if(r?.[yt(e.outputType.name)]){Wu(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Qu(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 Hu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),gs(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${er(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Wu(e,t){let r=new Zt;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]=Xt(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 Ku(e,t){let[r,n]=Xt(e.selectionPath),i=t.arguments.getDeepSubSelectionValue(r)?.asObject(),o;if(i){let s=i.getFieldValue("select")?.asObject(),a=i.getFieldValue("include")?.asObject(),l=i.getFieldValue("omit")?.asObject();s?.hasField(n)?(o="select",s.getField(n)?.markAsError(),gs(s,e.outputType)):a?.hasField(n)?(o="include",a.getField(n)?.markAsError(),ic(a,e.outputType)):l?.hasField(n)&&(o="omit",l.getField(n)?.markAsError(),oc(l,e.outputType))}t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(er(s)),a.join(" ")})}function zu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),sc(n,e.arguments)),t.addErrorMessage(i=>ds(i,r,e.arguments.map(o=>o.name)))}function Yu(e,t){let[r,n]=Xt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&hs(o,e.inputType)}t.addErrorMessage(o=>ds(o,n,e.inputType.fields.map(s=>s.name)))}function ds(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=lc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(er(e)),n.join(" ")}function Zu(e,t){let r;t.addErrorMessage(l=>r?.value instanceof K&&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]=Xt(e.argumentPath),s=new Zt,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(fs).join(" | ");a.addSuggestion(new le(o,l).makeRequired())}}function fs(e){return e.kind==="list"?`${fs(e.elementType)}[]`:e.name}function Xu(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=$r("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 ec(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=$r("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function tc(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 K&&(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 rc(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&&hs(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")} ${$r("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(er(i)),o.join(" ")})}function nc(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 ${$r("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function gs(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,"true"))}function ic(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new le(r.name,"true"))}function oc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new le(r.name,"true"))}function sc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function hs(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 Xt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function er({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function $r(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var ac=3;function lc(e,t){let r=1/0,n;for(let i of t){let o=(0,ms.default)(e,i);o>ac||o({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?.[yt(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)})}};f();c();p();m();d();var bs=e=>({command:e});f();c();p();m();d();f();c();p();m();d();var xs=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);f();c();p();m();d();function rr(e){try{return Ps(e,"fast")}catch{return Ps(e,"slow")}}function Ps(e,t){return JSON.stringify(e.map(r=>wc(r,t)))}function wc(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:rt(e)?{prisma__type:"date",prisma__value:e.toJSON()}:he.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:w.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Ec(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Ts(e):e}function Ec(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Ts(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(vs);let t={};for(let r of Object.keys(e))t[r]=vs(e[r]);return t}function vs(e){return typeof e=="bigint"?e.toString():Ts(e)}var bc=/^(\s*alter\s)/i,As=ee("prisma:client");function Gn(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 fi=({clientMethod:e,activeProvider:t,activeProviderFlavour:r})=>n=>{r!==void 0&&(t=r);let o="",i;if(Array.isArray(n)){let[s,...a]=n;o=s,i={values:Nr(a||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{o=n.sql,i={values:Nr(n.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{o=n.text,i={values:Nr(n.values),__prismaRawParameters__:!0};break}case"sqlserver":{o=Pu(n),i={values:Nr(n.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i!=null&&i.values?Cu(`prisma.${e}(${o}, ${i.values})`):Cu(`prisma.${e}(${o})`),{query:o,parameters:i}},Mu={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new xe(t,r)}},Su={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};d();p();f();function di(e){return function(r){let n,o=(i=e)=>{try{return i===void 0||(i==null?void 0:i.kind)==="itx"?n!=null?n:n=Ru(r(i)):Ru(r(i))}catch(s){return Promise.reject(s)}};return{then(i,s){return o().then(i,s)},catch(i){return o().catch(i)},finally(i){return o().finally(i)},requestTransaction(i){let s=o(i);return s.requestTransaction?s.requestTransaction(i):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Ru(e){return typeof e.then=="function"?e:Promise.resolve(e)}d();p();f();var Ou={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},mi=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(){var t,r;return(r=(t=globalThis.PRISMA_INSTRUMENTATION)==null?void 0:t.helper)!=null?r:Ou}};function Fu(e){return e.includes("tracing")?new mi:Ou}d();p();f();function Iu(e,t=()=>{}){let r,n=new Promise(o=>r=o);return{then(o){return--e===0&&r(t()),o==null?void 0:o(n)}}}d();p();f();var Id=["$connect","$disconnect","$on","$transaction","$use","$extends"],gi=Id;d();p();f();function ku(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)}d();p();f();var Kn=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}};d();p();f();var _u=ve(Vs());d();p();f();function Gn(e){return typeof e.batchRequestIdx=="number"}d();p();f();function Jn(e){return e===null?e:Array.isArray(e)?e.map(Jn):typeof e=="object"?kd(e)?Dd(e):jt(e,Jn):e}function kd(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Dd({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return x.Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new je(t);case"Json":return JSON.parse(t);default:xt(t,"Unknown tagged value")}}d();p();f();function Du(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(yi(e.query.arguments)),t.push(yi(e.query.selection)),t.join("")}function yi(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${yi(n)})`:r}).join(" ")})`}d();p();f();var _d={aggregate:!1,aggregateRaw:!1,createMany:!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 hi(e){return _d[e]}d();p();f();var Qn=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,o)=>{this.batches[r].push({request:t,resolve:n,reject:o})})):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,o)=>this.options.batchOrder(n.request,o.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let o=0;o{for(let o=0;o{let{transaction:i,otelParentCtx:s}=n[0],a=n.map(m=>m.protocolQuery),u=this.client._tracingHelper.getTraceParent(s),l=n.some(m=>hi(m.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:u,transaction:Ld(i),containsWrite:l,customDataProxyFetch:o})).map((m,g)=>{if(m instanceof Error)return m;try{return this.mapQueryEngineResult(n[g],m)}catch(w){return w}})}),singleLoader:async n=>{var s;let o=((s=n.transaction)==null?void 0:s.kind)==="itx"?Nu(n.transaction):void 0,i=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:o,isWrite:hi(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,i)},batchBy:n=>{var o;return(o=n.transaction)!=null&&o.id?`transaction-${n.transaction.id}`:Du(n.protocolQuery)},batchOrder(n,o){var i,s;return((i=n.transaction)==null?void 0:i.kind)==="batch"&&((s=o.transaction)==null?void 0:s.kind)==="batch"?n.transaction.index-o.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:o,transaction:i,args:s}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:o,transaction:i,args:s})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let o=n==null?void 0:n.data,i=n==null?void 0:n.elapsed,s=this.unpack(o,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:i}: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:o,args:i}){if(Nd(t),Bd(t,o)||t instanceof Ke)throw t;if(t instanceof ce&&jd(t)){let a=Lu(t.meta);Vn({args:i,errors:[a],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion})}let s=t.message;throw n&&(s=zt({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:s})),s=this.sanitizeMessage(s),t.code?new ce(s,{code:t.code,clientVersion:this.client._clientVersion,meta:t.meta,batchRequestIdx:t.batchRequestIdx}):t.isPanic?new Ge(s,this.client._clientVersion):t instanceof Se?new Se(s,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx}):t instanceof re?new re(s,this.client._clientVersion):t instanceof Ge?new Ge(s,this.client._clientVersion):(t.clientVersion=this.client._clientVersion,t)}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,_u.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let o=Object.values(t)[0],i=r.filter(a=>a!=="select"&&a!=="include"),s=Jn(Qo(o,i));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function Ld(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Nu(e)};xt(e,"Unknown transaction kind")}}function Nu(e){return{id:e.id,payload:e.payload}}function Bd(e,t){return Gn(e)&&(t==null?void 0:t.kind)==="batch"&&e.batchRequestIdx!==t.index}function jd(e){return e.code==="P2009"||e.code==="P2012"}function Lu(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Lu)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}d();p();f();var Bu="5.4.2";var ju=Bu;d();p();f();function Uu(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=$u(t[n]);return r})}function $u({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return x.Buffer.from(t,"base64");case"decimal":return new je(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map($u);default:return t}}d();p();f();var Gu=ve(ui());d();p();f();var Q=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(Q,"PrismaClientConstructorValidationError");var qu=["datasources","datasourceUrl","errorFormat","adapter","log","__internal"],Vu=["pretty","colorless","minimal"],Ku=["info","query","warn","error"],$d={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new Q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let o=er(r,t)||` Available datasources: ${t.join(", ")}`;throw new Q(`Unknown datasource ${r} provided to PrismaClient constructor.${o}`)}if(typeof n!="object"||Array.isArray(n))throw new Q(`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[o,i]of Object.entries(n)){if(o!=="url")throw new Q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof i!="string")throw new Q(`Invalid value ${JSON.stringify(i)} 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 Q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Bn(t).includes("driverAdapters"))throw new Q('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.')},datasourceUrl:e=>{if(typeof e!="undefined"&&typeof e!="string")throw new Q(`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 Q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Vu.includes(e)){let t=er(e,Vu);throw new Q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new Q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Ku.includes(r)){let n=er(r,Ku);throw new Q(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:o=>{let i=["stdout","event"];if(!i.includes(o)){let s=er(o,i);throw new Q(`Invalid value ${JSON.stringify(o)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[o,i]of Object.entries(r))if(n[o])n[o](i);else throw new Q(`Invalid property ${o} for "log" provided to PrismaClient constructor`)}},__internal:e=>{if(!e)return;let t=["debug","hooks","engine","measurePerformance"];if(typeof e!="object")throw new Q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=er(r,t);throw new Q(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Ju(e,t){for(let[r,n]of Object.entries(e)){if(!qu.includes(r)){let o=er(r,qu);throw new Q(`Unknown property ${r} provided to PrismaClient constructor.${o}`)}$d[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new Q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function er(e,t){if(t.length===0||typeof e!="string")return"";let r=qd(e,t);return r?` Did you mean "${r}"?`:""}function qd(e,t){if(t.length===0)return null;let r=t.map(o=>({value:o,distance:(0,Gu.default)(e,o)}));r.sort((o,i)=>o.distance{let n=new Array(e.length),o=null,i=!1,s=0,a=()=>{i||(s++,s===e.length&&(i=!0,o?r(o):t(n)))},u=l=>{i||(i=!0,r(l))};for(let l=0;l{n[l]=c,a()},c=>{if(!Gn(c)){u(c);return}c.batchRequestIdx===l?u(c):(o||(o=c),a())})})}var ct=he("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Vd={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Kd=Symbol.for("prisma.client.transaction.id"),Gd={id:0,nextId(){return++this.id}};function zu(e){class t{constructor(n){this._middlewares=new Kn;this._createPrismaPromise=di();this.$extends=_a;var u,l,c,m,g,w;Za(e),n&&Ju(n,e);let o=n!=null&&n.adapter?Qs(n.adapter):void 0,i=new Hu.EventEmitter().on("error",()=>{});this._extensions=Dn.empty(),this._previewFeatures=Bn(e),this._clientVersion=(u=e.clientVersion)!=null?u:ju,this._activeProvider=e.activeProvider,this._tracingHelper=Fu(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Lr.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Lr.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=(l=e.injectableEdgeEnv)==null?void 0:l.call(e);try{let E=n!=null?n:{},b=(c=E.__internal)!=null?c:{},T=b.debug===!0;T&&he.enable("prisma:client");let S=Lr.default.resolve(e.dirname,e.relativePath);un.existsSync(S)||(S=e.dirname),ct("dirname",e.dirname),ct("relativePath",e.relativePath),ct("cwd",S);let R=b.engine||{};if(E.errorFormat?this._errorFormat=E.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:S,dirname:e.dirname,enableDebugLogs:T,allowTriggerPanic:R.allowTriggerPanic,datamodelPath:Lr.default.join(e.dirname,(m=e.filename)!=null?m:"schema.prisma"),prismaPath:(g=R.binaryPath)!=null?g:void 0,engineEndpoint:R.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:E.log&&ku(E.log),logQueries:E.log&&!!(typeof E.log=="string"?E.log==="query":E.log.find(C=>typeof C=="string"?C==="query":C.level==="query")),env:(w=a==null?void 0:a.parsed)!=null?w:{},flags:[],clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Ya(E,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,logEmitter:i,isBundled:e.isBundled,adapter:o},ct("clientVersion",e.clientVersion),this._engine=au(e,this._engineConfig),this._requestHandler=new Wn(this,i),E.log)for(let C of E.log){let M=typeof C=="string"?C:C.emit==="stdout"?C.level:null;M&&this.$on(M,N=>{var L;Bt.log(`${(L=Bt.tags[M])!=null?L:""}`,N.message||N.query)})}this._metrics=new Ut(this._engine)}catch(E){throw E.clientVersion=this._clientVersion,E}return this._appliedParent=wr(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,o){n==="beforeExit"?this._engine.on("beforeExit",o):this._engine.on(n,i=>{var a,u,l,c;let s=i.fields;return o(n==="query"?{timestamp:i.timestamp,query:(a=s==null?void 0:s.query)!=null?a:i.query,params:(u=s==null?void 0:s.params)!=null?u:i.params,duration:(l=s==null?void 0:s.duration_ms)!=null?l:i.duration,target:i.target}:{timestamp:i.timestamp,message:(c=s==null?void 0:s.message)!=null?c:i.message,target:i.target})})}$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{Ps()}}$executeRawInternal(n,o,i,s){var l;let a=this._activeProvider,u=(l=this._engineConfig.adapter)==null?void 0:l.flavour;return this._request({action:"executeRaw",args:i,transaction:n,clientMethod:o,argsMapper:fi({clientMethod:o,activeProvider:a,activeProviderFlavour:u}),callsite:lt(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...o){return this._createPrismaPromise(i=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Wu(n,o);return pi(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(i,"$executeRaw",s,a)}throw new pe("`$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,...o){return this._createPrismaPromise(i=>(pi(this._activeProvider,n,o,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(i,"$executeRawUnsafe",[n,...o])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new pe(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(o=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Eu,callsite:lt(this._errorFormat),transaction:o}))}async $queryRawInternal(n,o,i,s){var l;let a=this._activeProvider,u=(l=this._engineConfig.adapter)==null?void 0:l.flavour;return this._request({action:"queryRaw",args:i,transaction:n,clientMethod:o,argsMapper:fi({clientMethod:o,activeProvider:a,activeProviderFlavour:u}),callsite:lt(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(Uu)}$queryRaw(n,...o){return this._createPrismaPromise(i=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(i,"$queryRaw",...Wu(n,o));throw new pe("`$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})})}$queryRawUnsafe(n,...o){return this._createPrismaPromise(i=>this.$queryRawInternal(i,"$queryRawUnsafe",[n,...o]))}_transactionWithArray({promises:n,options:o}){let i=Gd.nextId(),s=Iu(n.length),a=n.map((u,l)=>{var g,w;if((u==null?void 0: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 c=o==null?void 0:o.isolationLevel,m={kind:"batch",id:i,index:l,isolationLevel:c,lock:s};return(w=(g=u.requestTransaction)==null?void 0:g.call(u,m))!=null?w:u});return Qu(a)}async _transactionWithCallback({callback:n,options:o}){let i={traceparent:this._tracingHelper.getTraceParent()},s=await this._engine.transaction("start",i,o),a;try{let u={kind:"itx",...s};a=await n(this._createItxClient(u)),await this._engine.transaction("commit",i,s)}catch(u){throw await this._engine.transaction("rollback",i,s).catch(()=>{}),u}return a}_createItxClient(n){return wr(Le(Fn(this),[ge("_appliedParent",()=>this._appliedParent._createItxClient(n)),ge("_createPrismaPromise",()=>di(n)),ge(Kd,()=>n.id),yr(gi)]))}$transaction(n,o){let i;typeof n=="function"?i=()=>this._transactionWithCallback({callback:n,options:o}):i=()=>this._transactionWithArray({promises:n,options:o});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,i)}_request(n){var l;n.otelParentCtx=this._tracingHelper.getActiveContext();let o=(l=n.middlewareArgsMapper)!=null?l:Vd,i={args:o.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:i.action,model:i.model,name:i.model?`${i.model}.${i.action}`:i.action}}},a=-1,u=async c=>{let m=this._middlewares.get(++a);if(m)return this._tracingHelper.runInChildSpan(s.middleware,S=>m(c,R=>(S==null||S.end(),u(R))));let{runInTransaction:g,args:w,...E}=c,b={...n,...E};w&&(b.args=o.middlewareArgsToRequestArgs(w)),n.transaction!==void 0&&g===!1&&delete b.transaction;let T=await qa(this,b);return b.model?Ba({result:T,modelName:b.model,args:b.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):T};return this._tracingHelper.runInChildSpan(s.operation,()=>u(i))}async _executeRequest({args:n,clientMethod:o,dataPath:i,callsite:s,action:a,model:u,argsMapper:l,transaction:c,unpacker:m,otelParentCtx:g,customDataProxyFetch:w}){try{n=l?l(n):n;let E={name:"serialize"},b=this._tracingHelper.runInChildSpan(E,()=>xu({modelName:u,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:o,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion}));return he.enabled("prisma:client")&&(ct("Prisma Client call:"),ct(`prisma.${o}(${xa(n)})`),ct("Generated request:"),ct(JSON.stringify(b,null,2)+` -`)),(c==null?void 0:c.kind)==="batch"&&await c.lock,this._requestHandler.request({protocolQuery:b,modelName:u,action:a,clientMethod:o,dataPath:i,callsite:s,args:n,extensions:this._extensions,transaction:c,unpacker:m,otelParentCtx:g,otelChildCtx:this._tracingHelper.getActiveContext(),customDataProxyFetch:w})}catch(E){throw E.clientVersion=this._clientVersion,E}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new pe("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){var o;return!!((o=this._engineConfig.previewFeatures)!=null&&o.includes(n))}}return t}function Wu(e,t){return Jd(e)?[new xe(e,t),Mu]:[e,Su]}function Jd(e){return Array.isArray(e)&&Array.isArray(e.raw)}d();p();f();var Qd=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Zu(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Qd.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}d();p();f();0&&(module.exports={DMMF,DMMFClass,Debug,Decimal,Extensions,MetricsClient,NotFoundError,ObjectEnumValue,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,Types,defineDmmfProperty,empty,getPrismaClient,itxClientDenyList,join,makeStrictEnum,objectEnumNames,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); +`)}var Jn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:rr(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:rr(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:rr(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=xs(r),i={values:rr(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?As(`prisma.${e}(${n}, ${i.values})`):As(`prisma.${e}(${n})`),{query:n,parameters:i}},Cs={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ie(t,r)}},Rs={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};f();c();p();m();d();function Qn(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=Ss(r(o)):Ss(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 Ss(e){return typeof e.then=="function"?e:Promise.resolve(e)}f();c();p();m();d();var Os={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Hn=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??Os}};function Is(e){return e.includes("tracing")?new Hn:Os}f();c();p();m();d();function ks(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}f();c();p();m();d();var xc=["$connect","$disconnect","$on","$transaction","$use","$extends"],Ds=xc;f();c();p();m();d();function Ms(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();m();d();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();m();d();var _s=_e(Gi());f();c();p();m();d();function jr(e){return typeof e.batchRequestIdx=="number"}f();c();p();m();d();function Gr(e){return e===null?e:Array.isArray(e)?e.map(Gr):typeof e=="object"?Pc(e)?vc(e):Ze(e,Gr):e}function Pc(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function vc({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return w.Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new he(t);case"Json":return JSON.parse(t);default:be(t,"Unknown tagged value")}}f();c();p();m();d();function Ns(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(" ")})`}f();c();p();m();d();var Tc={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 Tc[e]}f();c();p();m();d();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;iQe("bigint",r));case"bytes-array":return t.map(r=>Qe("bytes",r));case"decimal-array":return t.map(r=>Qe("decimal",r));case"datetime-array":return t.map(r=>Qe("datetime",r));case"date-array":return t.map(r=>Qe("date",r));case"time-array":return t.map(r=>Qe("time",r));default:return t}}function Fs(e){let t=[],r=Ac(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:Rc(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"?Ls(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}`:Ns(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(Cc(t),Sc(t,i)||t instanceof xe)throw t;if(t instanceof W&&Oc(t)){let u=Bs(t.meta);qr({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=mt({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 Pe(l,this.client._clientVersion);if(t instanceof ne)throw new ne(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof J)throw new J(l,this.client._clientVersion);if(t instanceof Pe)throw new Pe(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,_s.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=Sn(o,s),l=i==="queryRaw"?Fs(a):Gr(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Rc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Ls(e)};be(e,"Unknown transaction kind")}}function Ls(e){return{id:e.id,payload:e.payload}}function Sc(e,t){return jr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Oc(e){return e.code==="P2009"||e.code==="P2012"}function Bs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Bs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}f();c();p();m();d();var Us="5.18.0";var $s=Us;f();c();p();m();d();var Js=_e(Vn());f();c();p();m();d();var U=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(U,"PrismaClientConstructorValidationError");var qs=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Vs=["pretty","colorless","minimal"],js=["info","query","warn","error"],kc={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new U(`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=wt(r,t)||` Available datasources: ${t.join(", ")}`;throw new U(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new U(`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 U(`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 U(`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 U('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Br(t).includes("driverAdapters"))throw new U('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(vt()==="binary")throw new U('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 U(`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 U(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Vs.includes(e)){let t=wt(e,Vs);throw new U(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new U(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!js.includes(r)){let n=wt(r,js);throw new U(`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=wt(i,o);throw new U(`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 U(`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 U(`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 U(`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 U('"omit" option is expected to be an object.');if(e===null)throw new U('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Mc(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 U(Nc(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new U(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=wt(r,t);throw new U(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Qs(e,t){for(let[r,n]of Object.entries(e)){if(!qs.includes(r)){let i=wt(r,qs);throw new U(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}kc[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new U('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function wt(e,t){if(t.length===0||typeof e!="string")return"";let r=Dc(e,t);return r?` Did you mean "${r}"?`:""}function Dc(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Js.default)(e,i)}));r.sort((i,o)=>i.distanceyt(n)===t);if(r)return e[r]}function Nc(e,t){let r=ct(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();m();d();function Hs(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 Ne=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Fc={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},_c=Symbol.for("prisma.client.transaction.id"),Lc={id:0,nextId(){return++this.id}};function zs(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Vr;this._createPrismaPromise=Qn();this.$extends=Do;e=n?.__internal?.configOverride?.(e)??e,Ko(e),n&&Qs(n,e);let i=new dr().on("error",()=>{});this._extensions=Fr.empty(),this._previewFeatures=Br(e),this._clientVersion=e.clientVersion??$s,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Is(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Pt.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Pt.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=yn(n.adapter);let l=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==l)throw new J(`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 J("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=Pt.resolve(e.dirname,e.relativePath);Ei.existsSync(h)||(h=e.dirname),Ne("dirname",e.dirname),Ne("relativePath",e.relativePath),Ne("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:Pt.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&&Ms(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:zo(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:dt,getBatchRequestPayload:wr,prismaGraphQLToJSError:_t,PrismaClientUnknownRequestError:ne,PrismaClientInitializationError:J,PrismaClientKnownRequestError:W,debug:ee("prisma:client:accelerateEngine"),engineVersion:Ks.version,clientVersion:e.clientVersion}},Ne("clientVersion",e.clientVersion),this._engine=ss(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,R=>{At.log(`${At.tags[C]??""}`,R.message||R.query)})}this._metrics=new Xe(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Lt(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{Mi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Jn({clientMethod:i,activeProvider:a}),callsite:Me(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Ws(n,i);return Gn(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=>(Gn(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:bs,callsite:Me(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:Jn({clientMethod:i,activeProvider:a}),callsite:Me(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",...Ws(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})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Lc.nextId(),s=ks(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 Hs(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 Lt(fe(ko(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>Qn(n)),te(_c,()=>n.id),et(Ds)]))}$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??Fc,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,C={...n,...S};v&&(C.args=i.middlewareArgsToRequestArgs(v)),n.transaction!==void 0&&h===!1&&delete C.transaction;let R=await Uo(this,C);return C.model?Fo({result:R,modelName:C.model,args:C.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 C={name:"serialize"},R=this._tracingHelper.runInChildSpan(C,()=>ys({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")&&(Ne("Prisma Client call:"),Ne(`prisma.${i}(${bo(n)})`),Ne("Generated request:"),Ne(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(C){throw C.clientVersion=this._clientVersion,C}}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 Ws(e,t){return Bc(e)?[new ie(e,t),Cs]:[e,Rs]}function Bc(e){return Array.isArray(e)&&Array.isArray(e.raw)}f();c();p();m();d();var Uc=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Ys(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Uc.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}f();c();p();m();d();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); //# sourceMappingURL=edge.js.map diff --git a/experiments/postgres/prisma/generated/client/runtime/index-browser.d.ts b/experiments/postgres/prisma/generated/client/runtime/index-browser.d.ts index d0faecd24..fefa233b0 100644 --- a/experiments/postgres/prisma/generated/client/runtime/index-browser.d.ts +++ b/experiments/postgres/prisma/generated/client/runtime/index-browser.d.ts @@ -283,31 +283,18 @@ export declare class Decimal { static readonly EUCLID: 9; } -/** - * Detect the current JavaScript runtime following - * the WinterCG Runtime Keys proposal: - * - * - `edge-routine` Alibaba Cloud Edge Routine - * - `workerd` Cloudflare Workers - * - `deno` Deno and Deno Deploy - * - `lagon` Lagon - * - `react-native` React Native - * - `netlify` Netlify Edge Functions - * - `electron` Electron - * - `node` Node.js - * - `bun` Bun - * - `edge-light` Vercel Edge Functions - * - `fastly` Fastly Compute@Edge - * - * @see https://runtime-keys.proposal.wintercg.org/ - * @returns {Runtime} - */ -export declare function detectRuntime(): Runtime; - 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 { } @@ -358,7 +345,7 @@ export declare const objectEnumValues: { }; }; -declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; +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 { diff --git a/experiments/postgres/prisma/generated/client/runtime/index-browser.js b/experiments/postgres/prisma/generated/client/runtime/index-browser.js index 94566e221..8f0457df0 100644 --- a/experiments/postgres/prisma/generated/client/runtime/index-browser.js +++ b/experiments/postgres/prisma/generated/client/runtime/index-browser.js @@ -1,4 +1,4 @@ -"use strict";var he=Object.defineProperty;var Je=Object.getOwnPropertyDescriptor;var We=Object.getOwnPropertyNames;var je=Object.prototype.hasOwnProperty;var Ce=(e,n)=>{for(var i in n)he(e,i,{get:n[i],enumerable:!0})},Ge=(e,n,i,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of We(n))!je.call(e,t)&&t!==i&&he(e,t,{get:()=>n[t],enumerable:!(r=Je(n,t))||r.enumerable});return e};var Xe=e=>Ge(he({},"__esModule",{value:!0}),e);var jn={};Ce(jn,{Decimal:()=>Ve,Public:()=>de,detectRuntime:()=>He,makeStrictEnum:()=>Pe,objectEnumValues:()=>Oe});module.exports=Xe(jn);var de={};Ce(de,{validator:()=>Me});function Me(...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)}},j=class extends ge{_getNamespace(){return"NullTypes"}},G=class extends j{};me(G,"DbNull");var X=class extends j{};me(X,"JsonNull");var K=class extends j{};me(K,"AnyNull");var Oe={classes:{DbNull:G,JsonNull:X,AnyNull:K},instances:{DbNull:new G(ne),JsonNull:new X(ne),AnyNull:new K(ne)}};function me(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0})}var Ke=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(!Ke.has(i))throw new TypeError("Invalid enum value: ".concat(String(i)))}})}var H=9e15,V=1e9,we="0123456789abcdef",re="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",te="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ne={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-H,maxE:H,crypto:!1},qe,Z,w=!0,oe="[DecimalError] ",$=oe+"Invalid argument: ",Te=oe+"Precision limit exceeded",Le=oe+"crypto unavailable",Re="[object Decimal]",A=Math.floor,M=Math.pow,Qe=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Ye=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,xe=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Fe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,F=1e7,m=7,ze=9007199254740991,ye=re.length-1,ve=te.length-1,d={toStringTag:Re};d.absoluteValue=d.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),p(e)};d.ceil=function(){return p(new this.constructor(this),this.e+1,2)};d.clampedTo=d.clamp=function(e,n){var i,r=this,t=r.constructor;if(e=new t(e),n=new t(n),!e.s||!n.s)return new t(NaN);if(e.gt(n))throw Error($+n);return i=r.cmp(e),i<0?e:r.cmp(n)>0?n:new t(r)};d.comparedTo=d.cmp=function(e){var n,i,r,t,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(r=o.length,t=u.length,n=0,i=ru[n]^l<0?1:-1;return r===t?0:r>t^l<0?1:-1};d.cosine=d.cos=function(){var e,n,i=this,r=i.constructor;return i.d?i.d[0]?(e=r.precision,n=r.rounding,r.precision=e+Math.max(i.e,i.sd())+m,r.rounding=1,i=en(r,Be(r,i)),r.precision=e,r.rounding=n,p(Z==2||Z==3?i.neg():i,e,n,!0)):new r(1):new r(NaN)};d.cubeRoot=d.cbrt=function(){var e,n,i,r,t,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*M(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=M(i,1/3),e=A((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),r=new a(i),r.s=c.s):r=new a(s.toString()),o=(e=a.precision)+3;;)if(u=r,l=u.times(u).times(u),f=l.plus(c),r=S(f.plus(c).times(u),f.plus(l),o+2,1),O(u.d).slice(0,o)===(i=O(r.d)).slice(0,o))if(i=i.slice(o-3,o+1),i=="9999"||!t&&i=="4999"){if(!t&&(p(u,e+1,0),u.times(u).times(u).eq(c))){r=u;break}o+=4,t=1}else{(!+i||!+i.slice(1)&&i.charAt(0)=="5")&&(p(r,e+1,1),n=!r.times(r).times(r).eq(c));break}return w=!0,p(r,e,a.rounding,n)};d.decimalPlaces=d.dp=function(){var e,n=this.d,i=NaN;if(n){if(e=n.length-1,i=(e-A(this.e/m))*m,e=n[e],e)for(;e%10==0;e/=10)i--;i<0&&(i=0)}return i};d.dividedBy=d.div=function(e){return S(this,new this.constructor(e))};d.dividedToIntegerBy=d.divToInt=function(e){var n=this,i=n.constructor;return p(S(n,new i(e),0,1,1),i.precision,i.rounding)};d.equals=d.eq=function(e){return this.cmp(e)===0};d.floor=function(){return p(new this.constructor(this),this.e+1,3)};d.greaterThan=d.gt=function(e){return this.cmp(e)>0};d.greaterThanOrEqualTo=d.gte=function(e){var n=this.cmp(e);return n==1||n===0};d.hyperbolicCosine=d.cosh=function(){var e,n,i,r,t,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,r=o.rounding,o.precision=i+Math.max(s.e,s.sd())+4,o.rounding=1,t=s.d.length,t<32?(e=Math.ceil(t/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=r,!0)};d.hyperbolicSine=d.sinh=function(){var e,n,i,r,t=this,s=t.constructor;if(!t.isFinite()||t.isZero())return new s(t);if(n=s.precision,i=s.rounding,s.precision=n+Math.max(t.e,t.sd())+4,s.rounding=1,r=t.d.length,r<3)t=J(s,2,t,t,!0);else{e=1.4*Math.sqrt(r),e=e>16?16:e|0,t=t.times(1/fe(5,e)),t=J(s,2,t,t,!0);for(var o,u=new s(5),l=new s(16),f=new s(20);e--;)o=t.times(t),t=t.times(u.plus(o.times(l.times(o).plus(f))))}return s.precision=n,s.rounding=i,p(t,n,i,!0)};d.hyperbolicTangent=d.tanh=function(){var e,n,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(e=r.precision,n=r.rounding,r.precision=e+7,r.rounding=1,S(i.sinh(),i.cosh(),r.precision=e,r.rounding=n)):new r(i.s)};d.inverseCosine=d.acos=function(){var e,n=this,i=n.constructor,r=n.abs().cmp(1),t=i.precision,s=i.rounding;return r!==-1?r===0?n.isNeg()?R(i,t,s):new i(0):new i(NaN):n.isZero()?R(i,t+4,s).times(.5):(i.precision=t+6,i.rounding=1,n=n.asin(),e=R(i,t+4,s).times(.5),i.precision=t,i.rounding=s,e.minus(n))};d.inverseHyperbolicCosine=d.acosh=function(){var e,n,i=this,r=i.constructor;return i.lte(1)?new r(i.eq(1)?0:NaN):i.isFinite()?(e=r.precision,n=r.rounding,r.precision=e+Math.max(Math.abs(i.e),i.sd())+4,r.rounding=1,w=!1,i=i.times(i).minus(1).sqrt().plus(i),w=!0,r.precision=e,r.rounding=n,i.ln()):new r(i)};d.inverseHyperbolicSine=d.asinh=function(){var e,n,i=this,r=i.constructor;return!i.isFinite()||i.isZero()?new r(i):(e=r.precision,n=r.rounding,r.precision=e+2*Math.max(Math.abs(i.e),i.sd())+6,r.rounding=1,w=!1,i=i.times(i).plus(1).sqrt().plus(i),w=!0,r.precision=e,r.rounding=n,i.ln())};d.inverseHyperbolicTangent=d.atanh=function(){var e,n,i,r,t=this,s=t.constructor;return t.isFinite()?t.e>=0?new s(t.abs().eq(1)?t.s/0:t.isZero()?t:NaN):(e=s.precision,n=s.rounding,r=t.sd(),Math.max(r,e)<2*-t.e-1?p(new s(t),e,n,!0):(s.precision=i=r-t.e,t=S(t.plus(1),new s(1).minus(t),i+e,1),s.precision=e+4,s.rounding=1,t=t.ln(),s.precision=e,s.rounding=n,t.times(.5))):new s(NaN)};d.inverseSine=d.asin=function(){var e,n,i,r,t=this,s=t.constructor;return t.isZero()?new s(t):(n=t.abs().cmp(1),i=s.precision,r=s.rounding,n!==-1?n===0?(e=R(s,i+4,r).times(.5),e.s=t.s,e):new s(NaN):(s.precision=i+6,s.rounding=1,t=t.div(new s(1).minus(t.times(t)).sqrt().plus(1)).atan(),s.precision=i,s.rounding=r,t.times(2)))};d.inverseTangent=d.atan=function(){var e,n,i,r,t,s,o,u,l,f=this,c=f.constructor,a=c.precision,h=c.rounding;if(f.isFinite()){if(f.isZero())return new c(f);if(f.abs().eq(1)&&a+4<=ve)return o=R(c,a+4,h).times(.25),o.s=f.s,o}else{if(!f.s)return new c(NaN);if(a+4<=ve)return o=R(c,a+4,h).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),r=1,l=f.times(f),o=new c(f),t=f;e!==-1;)if(t=t.times(l),s=o.minus(t.div(r+=2)),t=t.times(l),o=s.plus(t.div(r+=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};d.isNaN=function(){return!this.s};d.isNegative=d.isNeg=function(){return this.s<0};d.isPositive=d.isPos=function(){return this.s>0};d.isZero=function(){return!!this.d&&this.d[0]===0};d.lessThan=d.lt=function(e){return this.cmp(e)<0};d.lessThanOrEqualTo=d.lte=function(e){return this.cmp(e)<1};d.logarithm=d.log=function(e){var n,i,r,t,s,o,u,l,f=this,c=f.constructor,a=c.precision,h=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(t=i[0];t%10===0;)t/=10;s=t!==1}if(w=!1,u=a+g,o=B(f,u),r=n?se(c,u+10):B(e,u),l=S(o,r,u,1),Q(l.d,t=a,h))do if(u+=10,o=B(f,u),r=n?se(c,u+10):B(e,u),l=S(o,r,u,1),!s){+O(l.d).slice(t+1,t+15)+1==1e14&&(l=p(l,a+1,0));break}while(Q(l.d,t+=10,h));return w=!0,p(l,a,h)};d.minus=d.sub=function(e){var n,i,r,t,s,o,u,l,f,c,a,h,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,h=e.d,u=v.precision,l=v.rounding,!f[0]||!h[0]){if(h[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=A(e.e/m),c=A(g.e/m),f=f.slice(),s=c-i,s){for(a=s<0,a?(n=f,s=-s,o=h.length):(n=h,i=c,o=f.length),r=Math.max(Math.ceil(u/m),o)+2,s>r&&(s=r,n.length=1),n.reverse(),r=s;r--;)n.push(0);n.reverse()}else{for(r=f.length,o=h.length,a=r0;--r)f[o++]=0;for(r=h.length;r>s;){if(f[--r]o?s+1:o+1,t>o&&(t=o,i.length=1),i.reverse();t--;)i.push(0);i.reverse()}for(o=f.length,t=c.length,o-t<0&&(t=o,i=c,c=f,f=i),n=0;t;)n=(f[--t]=f[t]+c[t]+n)/F|0,f[t]%=F;for(n&&(f.unshift(n),++r),o=f.length;f[--o]==0;)f.pop();return e.d=f,e.e=ue(f,r),w?p(e,u,l):e};d.precision=d.sd=function(e){var n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($+e);return i.d?(n=Ie(i.d),e&&i.e+1>n&&(n=i.e+1)):n=NaN,n};d.round=function(){var e=this,n=e.constructor;return p(new n(e),e.e+1,n.rounding)};d.sine=d.sin=function(){var e,n,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(e=r.precision,n=r.rounding,r.precision=e+Math.max(i.e,i.sd())+m,r.rounding=1,i=rn(r,Be(r,i)),r.precision=e,r.rounding=n,p(Z>2?i.neg():i,e,n,!0)):new r(NaN)};d.squareRoot=d.sqrt=function(){var e,n,i,r,t,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=A((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),r=new c(n)):r=new c(f.toString()),i=(l=c.precision)+3;;)if(s=r,r=s.plus(S(o,s,i+2,1)).times(.5),O(s.d).slice(0,i)===(n=O(r.d)).slice(0,i))if(n=n.slice(i-3,i+1),n=="9999"||!t&&n=="4999"){if(!t&&(p(s,l+1,0),s.times(s).eq(o))){r=s;break}i+=4,t=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(p(r,l+1,1),e=!r.times(r).eq(o));break}return w=!0,p(r,l,c.rounding,e)};d.tangent=d.tan=function(){var e,n,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(e=r.precision,n=r.rounding,r.precision=e+10,r.rounding=1,i=i.sin(),i.s=1,i=S(i,new r(1).minus(i.times(i)).sqrt(),e+10,0),r.precision=e,r.rounding=n,p(Z==2||Z==4?i.neg():i,e,n,!0)):new r(NaN)};d.times=d.mul=function(e){var n,i,r,t,s,o,u,l,f,c=this,a=c.constructor,h=c.d,g=(e=new a(e)).d;if(e.s*=c.s,!h||!h[0]||!g||!g[0])return new a(!e.s||h&&!h[0]&&!g||g&&!g[0]&&!h?NaN:!h||!g?e.s/0:e.s*0);for(i=A(c.e/m)+A(e.e/m),l=h.length,f=g.length,l=0;){for(n=0,t=l+r;t>r;)u=s[t]+g[r]*h[t-r-1]+n,s[t--]=u%F|0,n=u/F|0;s[t]=(s[t]+n)%F|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};d.toBinary=function(e,n){return ke(this,2,e,n)};d.toDecimalPlaces=d.toDP=function(e,n){var i=this,r=i.constructor;return i=new r(i),e===void 0?i:(q(e,0,V),n===void 0?n=r.rounding:q(n,0,8),p(i,e+i.e+1,n))};d.toExponential=function(e,n){var i,r=this,t=r.constructor;return e===void 0?i=I(r,!0):(q(e,0,V),n===void 0?n=t.rounding:q(n,0,8),r=p(new t(r),e+1,n),i=I(r,!0,e+1)),r.isNeg()&&!r.isZero()?"-"+i:i};d.toFixed=function(e,n){var i,r,t=this,s=t.constructor;return e===void 0?i=I(t):(q(e,0,V),n===void 0?n=s.rounding:q(n,0,8),r=p(new s(t),e+t.e+1,n),i=I(r,!1,e+r.e+1)),t.isNeg()&&!t.isZero()?"-"+i:i};d.toFraction=function(e){var n,i,r,t,s,o,u,l,f,c,a,h,g=this,v=g.d,N=g.constructor;if(!v)return new N(g);if(f=i=new N(1),r=l=new N(0),n=new N(r),s=n.e=Ie(v)-g.e-1,o=s%m,n.d[0]=M(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($+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),t=i.plus(a.times(r)),t.cmp(e)!=1;)i=r,r=t,t=f,f=l.plus(a.times(t)),l=t,t=n,n=u.minus(a.times(t)),u=t;return t=S(e.minus(i),r,0,1,1),l=l.plus(t.times(f)),i=i.plus(t.times(r)),l.s=f.s=g.s,h=S(f,r,s,1).minus(g).abs().cmp(S(l,i,s,1).minus(g).abs())<1?[f,r]:[l,i],N.precision=c,w=!0,h};d.toHexadecimal=d.toHex=function(e,n){return ke(this,16,e,n)};d.toNearest=function(e,n){var i=this,r=i.constructor;if(i=new r(i),e==null){if(!i.d)return i;e=new r(1),n=r.rounding}else{if(e=new r(e),n===void 0?n=r.rounding:q(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};d.toNumber=function(){return+this};d.toOctal=function(e,n){return ke(this,8,e,n)};d.toPower=d.pow=function(e){var n,i,r,t,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(M(+u,f));if(u=new l(u),u.eq(1))return u;if(r=l.precision,s=l.rounding,e.eq(1))return p(u,r,s);if(n=A(e.e/m),n>=e.d.length-1&&(i=f<0?-f:f)<=ze)return t=De(l,u,i,r),e.s<0?new l(1).div(t):p(t,r,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),t=Ee(e.times(B(u,r+i)),r),t.d&&(t=p(t,r+5,1),Q(t.d,r,s)&&(n=r+10,t=p(Ee(e.times(B(u,n+i)),n),n+5,1),+O(t.d).slice(r+1,r+15)+1==1e14&&(t=p(t,r+1,0)))),t.s=o,w=!0,l.rounding=s,p(t,r,s))};d.toPrecision=function(e,n){var i,r=this,t=r.constructor;return e===void 0?i=I(r,r.e<=t.toExpNeg||r.e>=t.toExpPos):(q(e,1,V),n===void 0?n=t.rounding:q(n,0,8),r=p(new t(r),e,n),i=I(r,e<=r.e||r.e<=t.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+i:i};d.toSignificantDigits=d.toSD=function(e,n){var i=this,r=i.constructor;return e===void 0?(e=r.precision,n=r.rounding):(q(e,1,V),n===void 0?n=r.rounding:q(n,0,8)),p(new r(i),e,n)};d.toString=function(){var e=this,n=e.constructor,i=I(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()&&!e.isZero()?"-"+i:i};d.truncated=d.trunc=function(){return p(new this.constructor(this),this.e+1,1)};d.valueOf=d.toJSON=function(){var e=this,n=e.constructor,i=I(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()?"-"+i:i};function O(e){var n,i,r,t=e.length-1,s="",o=e[0];if(t>0){for(s+=o,n=1;ni)throw Error($+e)}function Q(e,n,i,r){var t,s,o,u;for(s=e[0];s>=10;s/=10)--n;return--n<0?(n+=m,t=0):(t=Math.ceil((n+1)/m),n%=m),s=M(10,m-n),u=e[t]%s|0,r==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[t+1]/s/100|0)==M(10,n-2)-1||(u==s/2||u==0)&&(e[t+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=(r||i<4)&&u==9999||!r&&i>3&&u==4999):o=((r||i<4)&&u+1==s||!r&&i>3&&u+1==s/2)&&(e[t+1]/s/1e3|0)==M(10,n-3)-1,o}function ie(e,n,i){for(var r,t=[0],s,o=0,u=e.length;oi-1&&(t[r+1]===void 0&&(t[r+1]=0),t[r+1]+=t[r]/i|0,t[r]%=i)}return t.reverse()}function en(e,n){var i,r,t;if(n.isZero())return n;r=n.d.length,r<32?(i=Math.ceil(r/3),t=(1/fe(4,i)).toString()):(i=16,t="2.3283064365386962890625e-10"),e.precision+=i,n=J(e,1,n.times(t),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(r,t,s){var o,u=0,l=r.length;for(r=r.slice();l--;)o=r[l]*t+u,r[l]=o%s|0,u=o/s|0;return u&&r.unshift(u),r}function n(r,t,s,o){var u,l;if(s!=o)l=s>o?1:-1;else for(u=l=0;ut[u]?1:-1;break}return l}function i(r,t,s,o){for(var u=0;s--;)r[s]-=u,u=r[s]1;)r.shift()}return function(r,t,s,o,u,l){var f,c,a,h,g,v,N,_,C,T,E,P,x,D,le,z,W,ce,L,y,ee=r.constructor,ae=r.s==t.s?1:-1,b=r.d,k=t.d;if(!b||!b[0]||!k||!k[0])return new ee(!r.s||!t.s||(b?k&&b[0]==k[0]:!k)?NaN:b&&b[0]==0||!k?ae*0:ae/0);for(l?(g=1,c=r.e-t.e):(l=F,g=m,c=A(r.e/g)-A(t.e/g)),L=k.length,W=b.length,C=new ee(ae),T=C.d=[],a=0;k[a]==(b[a]||0);a++);if(k[a]>(b[a]||0)&&c--,s==null?(D=s=ee.precision,o=ee.rounding):u?D=s+(r.e-t.e)+1:D=s,D<0)T.push(1),v=!0;else{if(D=D/g+2|0,a=0,L==1){for(h=0,k=k[0],D++;(a1&&(k=e(k,h,l),b=e(b,h,l),L=k.length,W=b.length),z=L,E=b.slice(0,L),P=E.length;P=l/2&&++ce;do h=0,f=n(k,E,L,P),f<0?(x=E[0],L!=P&&(x=x*l+(E[1]||0)),h=x/ce|0,h>1?(h>=l&&(h=l-1),N=e(k,h,l),_=N.length,P=E.length,f=n(N,E,_,P),f==1&&(h--,i(N,L<_?y:k,_,l))):(h==0&&(f=h=1),N=k.slice()),_=N.length,_=10;h/=10)a++;C.e=a+c*g-1,p(C,u?s+C.e+1:s,o,v)}return C}}();function p(e,n,i,r){var t,s,o,u,l,f,c,a,h,g=e.constructor;e:if(n!=null){if(a=e.d,!a)return e;for(t=1,u=a[0];u>=10;u/=10)t++;if(s=n-t,s<0)s+=m,o=n,c=a[h=0],l=c/M(10,t-o-1)%10|0;else if(h=Math.ceil((s+1)/m),u=a.length,h>=u)if(r){for(;u++<=h;)a.push(0);c=l=0,t=1,s%=m,o=s-m+1}else break e;else{for(c=u=a[h],t=1;u>=10;u/=10)t++;s%=m,o=s-m+t,l=o<0?0:c/M(10,t-o-1)%10|0}if(r=r||n<0||a[h+1]!==void 0||(o<0?c:c%M(10,t-o-1)),f=i<4?(l||r)&&(i==0||i==(e.s<0?3:2)):l>5||l==5&&(i==4||r||i==6&&(s>0?o>0?c/M(10,t-o):0:a[h-1])%10&1||i==(e.s<0?8:7)),n<1||!a[0])return a.length=0,f?(n-=e.e+1,a[0]=M(10,(m-n%m)%m),e.e=-n||0):a[0]=e.e=0,e;if(s==0?(a.length=h,u=1,h--):(a.length=h+1,u=M(10,m-s),a[h]=o>0?(c/M(10,t-o)%M(10,o)|0)*u:0),f)for(;;)if(h==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]==F&&(a[0]=1));break}else{if(a[h]+=u,a[h]!=F)break;a[h--]=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(r):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):t<0?(s="0."+U(-t-1)+s,i&&(r=i-o)>0&&(s+=U(r))):t>=o?(s+=U(t+1-o),i&&(r=i-t-1)>0&&(s=s+"."+U(r))):((r=t+1)0&&(t+1===o&&(s+="."),s+=U(r))),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>ye)throw w=!0,i&&(e.precision=i),Error(Te);return p(new e(re),n,1,!0)}function R(e,n,i){if(n>ve)throw Error(Te);return p(new e(te),n,i,!0)}function Ie(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 De(e,n,i,r){var t,s=new e(1),o=Math.ceil(r/m+4);for(w=!1;;){if(i%2&&(s=s.times(n),Ae(s.d,o)&&(t=!0)),i=A(i/2),i===0){i=s.d.length-1,t&&s.d[i]===0&&++s.d[i];break}n=n.times(n),Ae(n.d,o)}return w=!0,s}function be(e){return e.d[e.d.length-1]&1}function Ze(e,n,i){for(var r,t=new e(n[0]),s=0;++s17)return new h(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:0/0);for(n==null?(w=!1,l=v):l=n,u=new h(.03125);e.e>-2;)e=e.times(u),a+=5;for(r=Math.log(M(2,a))/Math.LN10*2+5|0,l+=r,i=s=o=new h(1),h.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(t=a;t--;)o=p(o.times(o),l,1);if(n==null)if(f<3&&Q(o.d,l-r,g,f))h.precision=l+=10,i=s=u=new h(1),c=0,f++;else return p(o,h.precision=v,g,w=!0);else return h.precision=v,o}o=u}}function B(e,n){var i,r,t,s,o,u,l,f,c,a,h,g=1,v=10,N=e,_=N.d,C=N.constructor,T=C.rounding,E=C.precision;if(N.s<0||!_||!_[0]||!N.e&&_[0]==1&&_.length==1)return new C(_&&!_[0]?-1/0:N.s!=1?NaN:_?0:N);if(n==null?(w=!1,c=E):c=n,C.precision=c+=v,i=O(_),r=i.charAt(0),Math.abs(s=N.e)<15e14){for(;r<7&&r!=1||r==1&&i.charAt(1)>3;)N=N.times(e),i=O(N.d),r=i.charAt(0),g++;s=N.e,r>1?(N=new C("0."+i),s++):N=new C(r+"."+i.slice(1))}else return f=se(C,c+2,E).times(s+""),N=B(new C(r+"."+i.slice(1)),c-v).plus(f),C.precision=E,n==null?p(N,E,T,w=!0):N;for(a=N,l=o=N=S(N.minus(1),N.plus(1),c,1),h=p(N.times(N),c,1),t=3;;){if(o=p(o.times(h),c,1),f=l.plus(S(o,new C(t),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(C,c+2,E).times(s+""))),l=S(l,new C(g),c,1),n==null)if(Q(l.d,c-v,T,u))C.precision=c+=v,f=o=N=S(a.minus(1),a.plus(1),c,1),h=p(N.times(N),c,1),t=u=1;else return p(l,C.precision=E,T,w=!0);else return C.precision=E,l;l=f,t+=2}}function Ue(e){return String(e.s*e.s/0)}function Se(e,n){var i,r,t;for((i=n.indexOf("."))>-1&&(n=n.replace(".","")),(r=n.search(/e/i))>0?(i<0&&(i=r),i+=+n.slice(r+1),n=n.substring(0,r)):i<0&&(i=n.length),r=0;n.charCodeAt(r)===48;r++);for(t=n.length;n.charCodeAt(t-1)===48;--t);if(n=n.slice(r,t),n){if(t-=r,e.e=i=i-r-1,e.d=[],r=(i+1)%m,i<0&&(r+=m),re.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(n=n.replace(/(\d)_(?=\d)/g,"$1"),Fe.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(Ye.test(n))i=16,n=n.toLowerCase();else if(Qe.test(n))i=2;else if(xe.test(n))i=8;else throw Error($+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,r=e.constructor,o&&(n=n.replace(".",""),u=n.length,s=u-s,t=De(r,new r(i),s,s*2)),f=ie(n,i,F),c=f.length-1,s=c;f[s]===0;--s)f.pop();return s<0?new r(e.s*0):(e.e=ue(f,c),e.d=f,w=!1,o&&(e=S(e,t,u*4)),l&&(e=e.times(Math.abs(l)<54?M(2,l):Y.pow(2,l))),w=!0,e)}function rn(e,n){var i,r=n.d.length;if(r<3)return n.isZero()?n:J(e,2,n,n);i=1.4*Math.sqrt(r),i=i>16?16:i|0,n=n.times(1/fe(5,i)),n=J(e,2,n,n);for(var t,s=new e(5),o=new e(16),u=new e(20);i--;)t=n.times(n),n=n.times(s.plus(t.times(o.times(t).minus(u))));return n}function J(e,n,i,r,t){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(r);;){if(o=S(u.times(l),new e(n++*n++),c,1),u=t?r.plus(o):r.minus(o),r=S(o.times(l),new e(n++*n++),c,1),o=u.plus(r),o.d[a]!==void 0){for(s=a;o.d[s]===u.d[s]&&s--;);if(s==-1)break}s=u,u=r,r=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 Be(e,n){var i,r=n.s<0,t=R(e,e.precision,1),s=t.times(.5);if(n=n.abs(),n.lte(s))return Z=r?4:1,n;if(i=n.divToInt(t),i.isZero())Z=r?3:2;else{if(n=n.minus(i.times(t)),n.lte(s))return Z=be(i)?r?2:3:r?4:1,n;Z=be(i)?r?1:4:r?3:2}return n.minus(t).abs()}function ke(e,n,i,r){var t,s,o,u,l,f,c,a,h,g=e.constructor,v=i!==void 0;if(v?(q(i,1,V),r===void 0?r=g.rounding:q(r,0,8)):(i=g.precision,r=g.rounding),!e.isFinite())c=Ue(e);else{for(c=I(e),o=c.indexOf("."),v?(t=2,n==16?i=i*4-3:n==8&&(i=i*3-2)):t=n,o>=0&&(c=c.replace(".",""),h=new g(1),h.e=c.length-o,h.d=ie(I(h),10,t),h.e=h.d.length),a=ie(c,10,t),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,h,i,r,0,t),a=e.d,s=e.e,f=qe),o=a[i],u=t/2,f=f||a[i+1]!==void 0,f=r<4?(o!==void 0||f)&&(r===0||r===(e.s<0?3:2)):o>u||o===u&&(r===4||f||r===6&&a[i-1]&1||r===(e.s<0?8:7)),a.length=i,f)for(;++a[--i]>t-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,t,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 tn(e){return new this(e).abs()}function sn(e){return new this(e).acos()}function on(e){return new this(e).acosh()}function un(e,n){return new this(e).plus(n)}function fn(e){return new this(e).asin()}function ln(e){return new this(e).asinh()}function cn(e){return new this(e).atan()}function an(e){return new this(e).atanh()}function hn(e,n){e=new this(e),n=new this(n);var i,r=this.precision,t=this.rounding,s=r+4;return!e.s||!n.s?i=new this(NaN):!e.d&&!n.d?(i=R(this,s,1).times(n.s>0?.25:.75),i.s=e.s):!n.d||e.isZero()?(i=n.s<0?R(this,r,t):new this(0),i.s=e.s):!e.d||n.isZero()?(i=R(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=R(this,s,1),this.precision=r,this.rounding=t,i=e.s<0?i.minus(n):i.plus(n)):i=this.atan(S(e,n,s,1)),i}function dn(e){return new this(e).cbrt()}function pn(e){return p(e=new this(e),e.e+1,2)}function gn(e,n,i){return new this(e).clamp(n,i)}function mn(e){if(!e||typeof e!="object")throw Error(oe+"Object expected");var n,i,r,t=e.defaults===!0,s=["precision",1,V,"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]&&r<=s[n+2])this[i]=r;else throw Error($+i+": "+r);if(i="crypto",t&&(this[i]=Ne[i]),(r=e[i])!==void 0)if(r===!0||r===!1||r===0||r===1)if(r)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[i]=!0;else throw Error(Le);else this[i]=!1;else throw Error($+i+": "+r);return this}function wn(e){return new this(e).cos()}function Nn(e){return new this(e).cosh()}function $e(e){var n,i,r;function t(s){var o,u,l,f=this;if(!(f instanceof t))return new t(s);if(f.constructor=t,_e(s)){f.s=s.s,w?!s.d||s.e>t.maxE?(f.e=NaN,f.d=null):s.e=10;u/=10)o++;w?o>t.maxE?(f.e=NaN,f.d=null):o=429e7?n[s]=crypto.getRandomValues(new Uint32Array(1))[0]:u[s++]=t%1e7;else if(crypto.randomBytes){for(n=crypto.randomBytes(r*=4);s=214e7?crypto.randomBytes(4).copy(n,s):(u.push(t%1e7),s+=4);s=r/4}else throw Error(Le);else for(;s=10;t/=10)r++;r{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 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 { @@ -18,6 +38,10 @@ export declare type AllModelsToStringIndex = Compute<{ + [K in keyof T as OmitValue extends true ? never : K]: T[K]; +}>; + export declare type Args = T extends { [K: symbol]: { types: { @@ -48,7 +72,9 @@ declare interface Attributes { */ declare type AttributeValue = string | number | boolean | Array | Array | Array; -export declare type BaseDMMF = Pick; +export declare type BaseDMMF = { + readonly datamodel: Omit; +}; declare type BatchArgs = { queries: BatchQuery[]; @@ -79,7 +105,7 @@ declare type BatchQueryOptionsCbArgs = { }; declare type BatchTransactionOptions = { - isolationLevel?: Transaction.IsolationLevel; + isolationLevel?: Transaction_2.IsolationLevel; }; declare interface BinaryTargetsEnvValue { @@ -108,7 +134,11 @@ export declare type ClientArgs = { client: ClientArg; }; -export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin; +export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin; + +export declare type ClientOptionDef = undefined | { + [K in string]: any; +}; declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum]; @@ -119,7 +149,7 @@ declare const ColumnTypeEnum: { readonly Double: 3; readonly Numeric: 4; readonly Boolean: 5; - readonly Char: 6; + readonly Character: 6; readonly Text: 7; readonly Date: 8; readonly Time: 9; @@ -135,7 +165,7 @@ declare const ColumnTypeEnum: { readonly DoubleArray: 67; readonly NumericArray: 68; readonly BooleanArray: 69; - readonly CharArray: 70; + readonly CharacterArray: 70; readonly TextArray: 71; readonly DateArray: 72; readonly TimeArray: 73; @@ -165,6 +195,13 @@ 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. @@ -245,23 +282,31 @@ declare type Datasources = { declare class DbNull extends NullTypesEnumValue { } -export declare interface Debug { - (namespace: string): Debugger; - disable: () => string; - enable: (namespace: string) => void; - enabled: (namespace: string) => boolean; - log: (...args: any[]) => any; - formatters: Record string) | undefined>; -} +export declare const Debug: typeof debugCreate & { + enable(namespace: any): void; + disable(): any; + enabled(namespace: string): boolean; + log: (...args: string[]) => void; + formatters: {}; +}; -declare interface Debugger { - (format: any, ...args: any[]): void; - log: (...args: any[]) => any; - extend: (namespace: string, delimiter?: string) => Debugger; - color: string | number; +/** + * 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; @@ -544,9 +589,13 @@ export declare interface DecimalJsLike { export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>; -export declare type DefaultSelection

= UnwrapPayload<{ - default: P; -}>['default']; +export declare type DefaultSelection = Args extends { + omit: infer LocalOmit; +} ? ApplyOmit['default'], PatchFlat>>> : ApplyOmit['default'], ExtractGlobalOmit>>; export declare function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel): void; @@ -574,59 +623,52 @@ export declare type DevTypeMapFnDef = { payload: OperationPayload; }; -declare interface Dictionary { - [key: string]: T; -} - -declare type Dictionary_2 = { - [key: string]: T | undefined; -}; - export declare namespace DMMF { - export interface Document { + export type Document = ReadonlyDeep_2<{ datamodel: Datamodel; schema: Schema; mappings: Mappings; - } - export interface Mappings { + }>; + export type Mappings = ReadonlyDeep_2<{ modelOperations: ModelMapping[]; otherOperations: { read: string[]; write: string[]; }; - } - export interface OtherOperationMappings { + }>; + export type OtherOperationMappings = ReadonlyDeep_2<{ read: string[]; write: string[]; - } - export interface DatamodelEnum { + }>; + export type DatamodelEnum = ReadonlyDeep_2<{ name: string; values: EnumValue[]; dbName?: string | null; documentation?: string; - } - export interface SchemaEnum { + }>; + export type SchemaEnum = ReadonlyDeep_2<{ name: string; values: string[]; - } - export interface EnumValue { + }>; + export type EnumValue = ReadonlyDeep_2<{ name: string; dbName: string | null; - } - export interface Datamodel { + }>; + export type Datamodel = ReadonlyDeep_2<{ models: Model[]; enums: DatamodelEnum[]; types: Model[]; - } - export interface uniqueIndex { + indexes: Index[]; + }>; + export type uniqueIndex = ReadonlyDeep_2<{ name: string; fields: string[]; - } - export interface PrimaryKey { + }>; + export type PrimaryKey = ReadonlyDeep_2<{ name: string | null; fields: string[]; - } - export interface Model { + }>; + export type Model = ReadonlyDeep_2<{ name: string; dbName: string | null; fields: Field[]; @@ -635,11 +677,11 @@ export declare namespace DMMF { 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 interface Field { + export type Field = ReadonlyDeep_2<{ kind: FieldKind; name: string; isRequired: boolean; @@ -658,17 +700,35 @@ export declare namespace DMMF { hasDefaultValue: boolean; default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[]; relationFromFields?: string[]; - relationToFields?: any[]; + relationToFields?: string[]; relationOnDelete?: string; relationName?: string; documentation?: string; - } - export interface FieldDefault { + }>; + export type FieldDefault = ReadonlyDeep_2<{ name: string; args: any[]; - } + }>; export type FieldDefaultScalar = string | boolean | number; - export interface Schema { + 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: { @@ -686,17 +746,17 @@ export declare namespace DMMF { fieldRefTypes: { prisma?: FieldRefType[]; }; - } - export interface Query { + }>; + export type Query = ReadonlyDeep_2<{ name: string; args: SchemaArg[]; output: QueryOutput; - } - export interface QueryOutput { + }>; + export type QueryOutput = ReadonlyDeep_2<{ name: string; isRequired: boolean; isList: boolean; - } + }>; export type TypeRef = { isList: boolean; type: string; @@ -704,33 +764,33 @@ export declare namespace DMMF { namespace?: FieldNamespace; }; export type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>; - export interface SchemaArg { + export type SchemaArg = ReadonlyDeep_2<{ name: string; comment?: string; isNullable: boolean; isRequired: boolean; inputTypes: InputTypeRef[]; deprecation?: Deprecation; - } - export interface OutputType { + }>; + export type OutputType = ReadonlyDeep_2<{ name: string; fields: SchemaField[]; - } - export interface 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 interface Deprecation { + export type Deprecation = ReadonlyDeep_2<{ sinceVersion: string; reason: string; plannedRemovalVersion?: string; - } - export interface InputType { + }>; + export type InputType = ReadonlyDeep_2<{ name: string; constraints: { maxNumFields: number | null; @@ -741,14 +801,14 @@ export declare namespace DMMF { source?: string; }; fields: SchemaArg[]; - } - export interface FieldRefType { + }>; + export type FieldRefType = ReadonlyDeep_2<{ name: string; allowTypes: FieldRefAllowType[]; fields: SchemaArg[]; - } + }>; export type FieldRefAllowType = TypeRef<'scalar' | 'enumTypes'>; - export interface ModelMapping { + export type ModelMapping = ReadonlyDeep_2<{ model: string; plural: string; findUnique?: string | null; @@ -758,6 +818,7 @@ export declare namespace DMMF { findMany?: string | null; create?: string | null; createMany?: string | null; + createManyAndReturn?: string | null; update?: string | null; updateMany?: string | null; upsert?: string | null; @@ -768,7 +829,7 @@ export declare namespace DMMF { count?: string | null; findRaw?: string | null; aggregateRaw?: string | null; - } + }>; export enum ModelAction { findUnique = "findUnique", findUniqueOrThrow = "findUniqueOrThrow", @@ -777,95 +838,64 @@ export declare namespace DMMF { findMany = "findMany", create = "create", createMany = "createMany", + createManyAndReturn = "createManyAndReturn", update = "update", updateMany = "updateMany", upsert = "upsert", delete = "delete", deleteMany = "deleteMany", groupBy = "groupBy", - count = "count", + count = "count",// TODO: count does not actually exist, why? aggregate = "aggregate", findRaw = "findRaw", aggregateRaw = "aggregateRaw" } } -export declare class DMMFClass implements DMMF.Document { - document: DMMF.Document; - private compositeNames; - private inputTypesByName; - readonly typeAndModelMap: Dictionary; - readonly mappingsMap: Dictionary; - readonly outputTypeMap: NamespacedTypeMap; - readonly rootFieldMap: Dictionary; - constructor(document: DMMF.Document); - get datamodel(): DMMF.Datamodel; - get mappings(): DMMF.Mappings; - get schema(): DMMF.Schema; - get inputObjectTypes(): { - model?: DMMF.InputType[] | undefined; - prisma: DMMF.InputType[]; - }; - get outputObjectTypes(): { - model: DMMF.OutputType[]; - prisma: DMMF.OutputType[]; - }; - isComposite(modelOrTypeName: string): boolean; - getOtherOperationNames(): string[]; - hasEnumInNamespace(enumName: string, namespace: DMMF.FieldNamespace): boolean; - resolveInputObjectType(ref: DMMF.InputTypeRef): DMMF.InputType | undefined; - resolveOutputObjectType(ref: DMMF.OutputTypeRef): DMMF.OutputType | undefined; - private buildModelMap; - private buildTypeMap; - private buildTypeModelMap; - private buildMappingsMap; - private buildMergedOutputTypeMap; - private buildRootFieldMap; - private buildInputTypesMap; -} - export declare interface DriverAdapter extends Queryable { /** - * Starts new transation. + * Starts new transaction. */ - startTransaction(): Promise>; + startTransaction(): Promise>; /** - * Closes the connection to the database, if any. + * Optional method that returns extra connection info */ - close: () => Promise>; + getConnectionInfo?(): Result_4; } /** Client */ -export declare type DynamicClientExtensionArgs> = { +export declare type DynamicClientExtensionArgs, ClientOptions> = { [P in keyof C_]: unknown; } & { [K: symbol]: { - ctx: Optional, ITXClientDenyList> & { - $parent: Optional, ITXClientDenyList>; + ctx: Optional, ITXClientDenyList> & { + $parent: Optional, ITXClientDenyList>; }; }; }; -export declare type DynamicClientExtensionThis> = { +export declare type DynamicClientExtensionThis, ClientOptions> = { [P in keyof ExtArgs['client']]: Return; } & { - [P in Exclude]: DynamicModelExtensionThis, ExtArgs>; + [P in Exclude]: DynamicModelExtensionThis, ExtArgs, ClientOptions>; } & { - [P in Exclude]: >(...args: ToTuple) => PrismaPromise; + [P in Exclude]: >(...args: ToTuple) => PrismaPromise; } & { - [P in Exclude]: DynamicClientExtensionThisBuiltin[P]; + [P in Exclude]: DynamicClientExtensionThisBuiltin[P]; } & { [K: symbol]: { types: TypeMap['other']; }; }; -export declare type DynamicClientExtensionThisBuiltin> = { - $extends: ExtendsHook<'extends', TypeMapCb, ExtArgs>; +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?: { + $transaction(fn: (client: Omit, ITXClientDenyList>) => Promise, options?: { maxWait?: number; timeout?: number; isolationLevel?: TypeMap['meta']['txIsolationLevel']; @@ -875,7 +905,7 @@ export declare type DynamicClientExtensionThisBuiltin> = { +export declare type DynamicModelExtensionArgs, ClientOptions> = { [K in keyof M_]: K extends '$allModels' ? { [P in keyof M_[K]]?: unknown; } & { @@ -884,8 +914,8 @@ export declare type DynamicModelExtensionArgs, ExtArgs> & { - $parent: DynamicClientExtensionThis; + ctx: DynamicModelExtensionThis, ExtArgs, ClientOptions> & { + $parent: DynamicClientExtensionThis; } & { $name: ModelKey; } & { @@ -898,26 +928,26 @@ export declare type DynamicModelExtensionArgs = { +export declare type DynamicModelExtensionFluentApi = { [K in keyof TypeMap['model'][M]['payload']['objects']]: (args?: Exact>) => PrismaPromise, [K]> | Null> & DynamicModelExtensionFluentApi>; + }, P, ClientOptions>, [K]> | Null> & DynamicModelExtensionFluentApi, ClientOptions>; }; -export declare type DynamicModelExtensionFnResult> = P extends FluentOperation ? DynamicModelExtensionFluentApi & PrismaPromise | Null> : PrismaPromise>; +export declare type DynamicModelExtensionFnResult = P extends FluentOperation ? DynamicModelExtensionFluentApi & PrismaPromise | Null> : PrismaPromise>; -export declare type DynamicModelExtensionFnResultBase = GetResult; +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 : (args: Exact) => DynamicModelExtensionFnResult; +export declare type DynamicModelExtensionOperationFn = {} extends TypeMap['model'][M]['operations'][P]['args'] ? (args?: Exact) => DynamicModelExtensionFnResult, ClientOptions> : (args: Exact) => DynamicModelExtensionFnResult, ClientOptions>; -export declare type DynamicModelExtensionThis> = { +export declare type DynamicModelExtensionThis, ClientOptions> = { [P in keyof ExtArgs['model'][Uncapitalize]]: Return][P]>; } & { - [P in Exclude]>]: DynamicModelExtensionOperationFn; + [P in Exclude]>]: DynamicModelExtensionOperationFn; } & { [P in Exclude<'fields', keyof ExtArgs['model'][Uncapitalize]>]: TypeMap['model'][M]['fields']; } & { @@ -965,7 +995,7 @@ export declare type DynamicResultExtensionArgs = export declare type DynamicResultExtensionData = GetFindResult; +}, {}>; export declare type DynamicResultExtensionNeeds = { [K in keyof S]: K extends keyof TypeMap['model'][M]['payload']['scalars'] ? S[K] : never; @@ -980,18 +1010,21 @@ export declare const empty: Sql; export declare type EmptyToUnknown = T; -declare abstract class Engine { - abstract on(event: EngineEventType, listener: (args?: any) => any): void; - abstract start(): Promise; - abstract stop(): Promise; - abstract version(forceRun?: boolean): Promise | string; - abstract request(query: JsonQuery, options: RequestOptions): Promise>; - abstract requestBatch(queries: JsonQuery[], options: RequestBatchOptions): Promise[]>; - abstract transaction(action: 'start', headers: Transaction.TransactionHeaders, options?: Transaction.Options): Promise>; - abstract transaction(action: 'commit', headers: Transaction.TransactionHeaders, info: Transaction.InteractiveTransactionInfo): Promise; - abstract transaction(action: 'rollback', headers: Transaction.TransactionHeaders, info: Transaction.InteractiveTransactionInfo): Promise; - abstract metrics(options: MetricsOptionsJson): Promise; - abstract metrics(options: MetricsOptionsPrometheus): Promise; +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 { @@ -1013,26 +1046,28 @@ declare interface EngineConfig { previewFeatures?: string[]; engineEndpoint?: string; activeProvider?: string; - logEmitter: EventEmitter; + 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 for the purpose of data proxy + * @remarks only used by DataProxyEngine.ts */ inlineSchema: string; /** * The contents of the datasource url saved in a string - * @remarks only used for the purpose of data proxy + * @remarks only used by DataProxyEngine.ts */ inlineDatasources: GetPrismaClientConfig['inlineDatasources']; /** * The string hash that was produced for a given schema - * @remarks only used for the purpose of data proxy + * @remarks only used by DataProxyEngine.ts */ inlineSchemaHash: string; /** @@ -1046,9 +1081,32 @@ declare interface EngineConfig { * 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 EngineEventType = 'query' | 'info' | 'warn' | 'error' | 'beforeExit'; +declare type EngineEvent = E extends QueryEventType ? QueryEvent : LogEvent; + +declare type EngineEventType = QueryEventType | LogEventType; + +declare type EngineProtocol = 'graphql' | 'json'; declare type EngineSpan = { span: boolean; @@ -1070,6 +1128,11 @@ declare type EngineSpanEvent = { spans: EngineSpan[]; }; +declare type EnvPaths = { + rootEnvPath: string | null; + schemaEnvPath: string | undefined; +}; + declare interface EnvValue { fromEnvVar: null | string; value: null | string; @@ -1078,16 +1141,31 @@ declare interface EnvValue { export declare type Equals = (() => T extends A ? 1 : 2) extends (() => T extends B ? 1 : 2) ? 1 : 0; declare type Error_2 = { - kind: 'GenericJsError'; + kind: 'GenericJs'; id: number; } | { - kind: 'PostgresError'; + 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 { @@ -1108,10 +1186,7 @@ declare interface ErrorWithBatchIndex { batchRequestIdx?: number; } -declare interface EventEmitter { - on(event: string, listener: (...args: any[]) => void): unknown; - emit(event: string, args?: any): boolean; -} +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; @@ -1145,6 +1220,8 @@ declare interface ExceptionWithName { stack?: string; } +declare type ExtendedEventType = LogLevel | 'beforeExit'; + declare type ExtendedSpanOptions = SpanOptions & { /** The name of the span */ name: string; @@ -1159,7 +1236,7 @@ declare type ExtendedSpanOptions = SpanOptions & { /** $extends, defineExtension */ export declare interface ExtendsHook, TypeMap extends TypeMapDef = Call> { +}>, ClientOptions = {}> { extArgs: ExtArgs; , MergedArgs extends InternalArgs = MergeExtArgs>(extension: ((client: DynamicClientExtensionThis) => { + }, C, Args extends InternalArgs = InternalArgs, MergedArgs extends InternalArgs = MergeExtArgs>(extension: ((client: DynamicClientExtensionThis) => { $extends: { extArgs: Args; }; @@ -1177,12 +1254,12 @@ export declare interface ExtendsHook; result?: DynamicResultExtensionArgs & R; - model?: DynamicModelExtensionArgs & M; - client?: DynamicClientExtensionArgs & C; + model?: DynamicModelExtensionArgs & M; + client?: DynamicClientExtensionArgs & C; }): { extends: DynamicClientExtensionThis, TypeMapCb, MergedArgs>; + }>, TypeMapCb, MergedArgs, ClientOptions>; define: (client: any) => { $extends: { extArgs: Args; @@ -1207,6 +1284,7 @@ declare namespace Extensions_2 { DefaultArgs, GetPayloadResult, GetSelect, + GetOmit, DynamicQueryExtensionArgs, DynamicQueryExtensionCb, DynamicQueryExtensionCbArgs, @@ -1231,12 +1309,19 @@ declare namespace Extensions_2 { TypeMapDef, DevTypeMapDef, DevTypeMapFnDef, + ClientOptionDef, TypeMapCbDef, ModelKey, RequiredExtensionArgs as UserArgs } } +export declare type ExtractGlobalOmit = Options extends { + omit: { + [K in ModelName]: infer GlobalOmit; + }; +} ? GlobalOmit : {}; + declare type Fetch = typeof nodeFetch; /** @@ -1261,9 +1346,22 @@ declare interface GeneratorConfig { output: EnvValue | null; isCustomOutput?: boolean; provider: EnvValue; - config: Dictionary_2; + 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

= { @@ -1272,6 +1370,8 @@ export declare type GetAggregateResult

= { }; }; +declare function getBatchRequestPayload(batch: JsonQuery[], transaction?: TransactionOptions_2): QueryEngineBatchRequest; + export declare type GetBatchResult = { count: number; }; @@ -1282,19 +1382,19 @@ export declare type GetCountResult = A extends { declare function getExtensionContext(that: T): Context_2; -export declare type GetFindResult

= Equals extends 1 ? DefaultSelection

: A extends { +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 | 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 { + [K in keyof S | keyof I as (S & I)[K] extends false | undefined | 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

; +} & Record ? DefaultSelection : unknown) : DefaultSelection; export declare type GetGroupByResult

= A extends { by: string[]; @@ -1306,6 +1406,10 @@ export declare type GetGroupByResult

= A extends [K in A['by']]: P['scalars'][K]; }> : {}[]; +export declare type GetOmit = { + [K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean; +}; + export declare type GetPayloadResult, R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = unknown extends R ? Base : { [K in KR | keyof Base]: K extends KR ? R[K] extends () => { compute: (...args: any) => infer C; @@ -1314,11 +1418,13 @@ export declare type GetPayloadResult, R extends In 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; @@ -1326,6 +1432,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): { _middlewares: MiddlewareHandler; _previewFeatures: string[]; _activeProvider: string; + _globalOmit?: GlobalOmitOptions | undefined; _extensions: MergedExtensionsList; _engine: Engine; /** @@ -1339,7 +1446,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): { * @param middleware to hook */ $use(middleware: QueryMiddleware): void; - $on(eventType: EngineEventType, callback: (event: any) => void): void; + $on(eventType: E, callback: EventCallback): void; $connect(): Promise; /** * Disconnect from the database @@ -1377,7 +1484,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): { /** * Executes a raw query and returns selected data */ - $queryRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; + $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 @@ -1403,7 +1510,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): { */ _transactionWithArray({ promises, options, }: { promises: Array>; - options?: BatchTransactionOptions | undefined; + options?: BatchTransactionOptions; }): Promise; /** * Perform a long-running transaction @@ -1413,7 +1520,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): { */ _transactionWithCallback({ callback, options, }: { callback: (client: Client) => Promise; - options?: Options_2 | undefined; + options?: Options; }): Promise; _createItxClient(transaction: PrismaPromiseInteractiveTransaction): Client; /** @@ -1437,6 +1544,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): { * @returns */ _hasPreviewFlag(feature: string): boolean; + $applyPendingMigrations(): Promise; $extends: typeof $extends; readonly [Symbol.toStringTag]: string; }; @@ -1460,7 +1568,7 @@ declare type GetPrismaClientConfig = { clientVersion: string; engineVersion: string; datasourceNames: string[]; - activeProvider: string; + activeProvider: ActiveConnectorType; /** * The contents of the schema encoded into a string * @remarks only used for the purpose of data proxy @@ -1510,28 +1618,33 @@ declare type GetPrismaClientConfig = { */ isBundled?: boolean; /** - * A boolean that is `true` when the client was generated with --no-engine. At + * 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. */ - noEngine?: boolean; + 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; +export declare type GetResult = { + findUnique: GetFindResult | null; + findUniqueOrThrow: GetFindResult; + findFirst: GetFindResult | null; + findFirstOrThrow: GetFindResult; + findMany: GetFindResult[]; + create: GetFindResult; createMany: GetBatchResult; - update: GetFindResult; + createManyAndReturn: GetFindResult[]; + update: GetFindResult; updateMany: GetBatchResult; - upsert: GetFindResult; - delete: GetFindResult; + upsert: GetFindResult; + delete: GetFindResult; deleteMany: GetBatchResult; - aggregate: GetAggregateResult; - count: GetCountResult; - groupBy: GetGroupByResult; + aggregate: GetAggregateResult; + count: GetCountResult; + groupBy: GetGroupByResult; $queryRaw: unknown; $executeRaw: number; $queryRawUnsafe: unknown; @@ -1539,18 +1652,34 @@ export declare type GetResult

, 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; }; /** @@ -1580,7 +1709,7 @@ declare type InteractiveTransactionInfo = { payload: Payload; }; -declare type InteractiveTransactionOptions = Transaction.InteractiveTransactionInfo; +declare type InteractiveTransactionOptions = Transaction_2.InteractiveTransactionInfo; export declare type InternalArgs { } +declare type JsonBatchQuery = { + batch: JsonQuery[]; + transaction?: { + isolationLevel?: Transaction_2.IsolationLevel; + }; +}; + export declare interface JsonConvertible { toJSON(): unknown; } declare type JsonFieldSelection = { - arguments?: Record; + arguments?: Record | RawTaggedValue; selection: JsonSelectionSet; }; @@ -1704,7 +1841,7 @@ declare type JsonQuery = { query: JsonFieldSelection; }; -declare type JsonQueryAction = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'updateOne' | 'updateMany' | 'deleteOne' | 'deleteMany' | 'upsertOne' | 'aggregate' | 'groupBy' | 'executeRaw' | 'queryRaw' | 'runCommandRaw' | 'findRaw' | 'aggregateRaw'; +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; @@ -1713,11 +1850,6 @@ declare type JsonSelectionSet = { [fieldName: string]: boolean | JsonFieldSelection; }; -declare type JsonTaggedValue = { - $type: 'Json'; - value: string; -}; - export declare type JsonValue = string | number | boolean | JsonObject | JsonArray | null; export declare type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | { @@ -1775,6 +1907,26 @@ declare type LogDefinition = { 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'; /** @@ -1919,11 +2071,6 @@ export declare type NameArgs = { name?: string; }; -declare type NamespacedTypeMap = { - prisma: Record; - model: Record; -}; - export declare type Narrow = { [K in keyof A]: A[K] extends Function ? A[K] : Narrow; } | (A extends Narrowable ? A : never); @@ -1940,7 +2087,7 @@ export declare type NeverToUnknown = [T] extends [never] ? unknown : T; * @param options * @returns */ -declare function nodeFetch(url: string, options?: RequestOptions_2): Promise; +declare function nodeFetch(url: string, options?: RequestOptions): Promise; declare class NodeHeaders { readonly headers: Map; @@ -1995,14 +2142,21 @@ export declare const objectEnumValues: { }; }; +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 Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; +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; }; @@ -2029,19 +2183,15 @@ export declare type OptionalKeys = { }[keyof O]; declare type Options = { - clientVersion: string; -}; - -/** - * maxWait ?= 2000 - * timeout ?= 5000 - */ -declare type Options_2 = { maxWait?: number; timeout?: number; isolationLevel?: IsolationLevel; }; +declare type Options_2 = { + clientVersion: string; +}; + export declare type Or = { 0: { 0: 0; @@ -2099,7 +2249,7 @@ export declare type PrismaClientOptions = { /** * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale. */ - adapter?: DriverAdapter; + adapter?: DriverAdapter | null; /** * Overwrites the datasource url from your schema.prisma file */ @@ -2108,6 +2258,12 @@ export declare type PrismaClientOptions = { * @default "colorless" */ errorFormat?: ErrorFormat; + /** + * The default values for Transaction options + * maxWait ?= 2000 + * timeout ?= 5000 + */ + transactionOptions?: Transaction_2.Options; /** * @example * \`\`\` @@ -2124,6 +2280,7 @@ export declare type PrismaClientOptions = { * 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. @@ -2136,6 +2293,8 @@ export declare type PrismaClientOptions = { endpoint?: string; allowTriggerPanic?: boolean; }; + /** This can be used for testing purposes */ + configOverride?: (config: GetPrismaClientConfig) => GetPrismaClientConfig; }; }; @@ -2155,10 +2314,12 @@ export declare class PrismaClientUnknownRequestError extends Error implements Er export declare class PrismaClientValidationError extends Error { name: string; clientVersion: string; - constructor(message: string, { clientVersion }: Options); + 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'; } @@ -2248,14 +2409,15 @@ declare type Query = { }; declare interface Queryable { - readonly flavour: 'mysql' | 'postgres' | 'sqlite'; + 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>; + queryRaw(params: Query): Promise>; /** * Execute a query given as SQL, interpolating the given parameters, * and returning the number of affected rows. @@ -2263,14 +2425,77 @@ declare interface Queryable { * This is the preferred way of executing `INSERT`, `UPDATE`, `DELETE` queries, * as well as transactional queries. */ - executeRaw(params: Query): Promise>; + 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 = { @@ -2314,6 +2539,11 @@ export declare type RawParameters = { export declare type RawQueryArgs = Sql | [query: string, ...values: RawValue[]]; +declare type RawTaggedValue = { + $type: 'Raw'; + value: unknown; +}; + /** * Supported value or SQL instance. */ @@ -2323,6 +2553,10 @@ 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; }; @@ -2333,18 +2567,29 @@ export declare type RenameAndNestPayloadKeys

= { }; declare type RequestBatchOptions = { - transaction?: TransactionOptions; + 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?: EventEmitter); + constructor(client: Client, logEmitter?: LogEmitter); request(params: RequestParams): Promise; mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResult): any; /** @@ -2352,13 +2597,19 @@ declare class RequestHandler { * handlers to finish. */ handleAndLogRequestError(params: HandleErrorParams): never; - handleRequestError({ error, clientMethod, callsite, transaction, args }: 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 = { +declare type RequestOptions = { + method?: string; + headers?: Record; + body?: string; +}; + +declare type RequestOptions_2 = { traceparent?: string; numTry?: number; interactiveTransaction?: InteractiveTransactionOptions; @@ -2366,12 +2617,6 @@ declare type RequestOptions = { customDataProxyFetch?: (fetch: Fetch) => Fetch; }; -declare type RequestOptions_2 = { - method?: string; - headers?: Record; - body?: string; -}; - declare type RequestParams = { modelName?: string; action: Action; @@ -2386,6 +2631,7 @@ declare type RequestParams = { unpacker?: Unpacker; otelParentCtx?: Context; otelChildCtx?: Context; + globalOmit?: GlobalOmitOptions; customDataProxyFetch?: (fetch: Fetch) => Fetch; }; @@ -2407,6 +2653,13 @@ 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: { @@ -2417,22 +2670,12 @@ export declare type Result = T extends { composites: {}; objects: {}; scalars: {}; + name: ''; }, {}, F>; export declare type Result_2 = Result; -declare type Result_3 = { - map(fn: (value: T) => U): Result_3; - flatMap(fn: (value: T) => Result_3): Result_3; -} & ({ - readonly ok: true; - readonly value: T; -} | { - readonly ok: false; - readonly error: Error_2; -}); - -declare namespace Result_4 { +declare namespace Result_3 { export { Operation, FluentOperation, @@ -2442,15 +2685,29 @@ declare namespace Result_4 { SelectField, DefaultSelection, UnwrapPayload, + ApplyOmit, + OmitValue, GetCountResult, Aggregate, GetAggregateResult, GetBatchResult, GetGroupByResult, - GetResult + 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; }; @@ -2487,13 +2744,15 @@ declare interface ResultSet { rows: Array>; /** * The last ID of an `INSERT` statement, if any. - * This is required for `AUTO_INCREMENT` columns in MySQL and SQLite-flavoured databases. + * 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"; + declare type RuntimeDataModel = { readonly models: Record; readonly enums: Record; @@ -2573,6 +2832,24 @@ declare interface Span { * @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 @@ -2764,11 +3041,13 @@ export declare class Sql { readonly values: Value[]; readonly strings: string[]; constructor(rawStrings: readonly string[], rawValues: readonly RawValue[]); - get text(): string; get sql(): string; + get statement(): string; + get text(): string; inspect(): { - text: string; sql: string; + statement: string; + text: string; values: unknown[]; }; } @@ -2833,42 +3112,39 @@ declare interface TracingHelper { runInChildSpan(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback): R; } -declare namespace Transaction { - export { - IsolationLevel, - Options_2 as Options, - InteractiveTransactionInfo, - TransactionHeaders - } -} - -declare interface Transaction_2 extends Queryable { +declare interface Transaction extends Queryable { /** * Transaction options. */ - readonly options: TransactionOptions_2; + readonly options: TransactionOptions; /** * Commit the transaction. */ - commit(): Promise>; + commit(): Promise>; /** * Rolls back the transaction. */ - rollback(): Promise>; - /** - * Discards and closes the transaction which may or may not have been committed or rolled back. - * This operation must be synchronous. If the implementation requires calling creating new - * asynchronous tasks on the event loop, the driver is responsible for handling the errors - * appropriately to ensure they don't crash the application. - */ - dispose(): Result_3; + rollback(): Promise>; +} + +declare namespace Transaction_2 { + export { + IsolationLevel, + Options, + InteractiveTransactionInfo, + TransactionHeaders + } } declare type TransactionHeaders = { traceparent?: string; }; -declare type TransactionOptions = { +declare type TransactionOptions = { + usePhantomQuery: boolean; +}; + +declare type TransactionOptions_2 = { kind: 'itx'; options: InteractiveTransactionOptions; } | { @@ -2876,12 +3152,9 @@ declare type TransactionOptions = { options: BatchTransactionOptions; }; -declare type TransactionOptions_2 = { - usePhantomQuery: boolean; -}; - export declare type TypeMapCbDef = Fn<{ extArgs: InternalArgs; + clientOptions: ClientOptionDef; }, TypeMapDef>; /** Shared */ @@ -2889,7 +3162,7 @@ export declare type TypeMapDef = Record; declare namespace Types { export { - Result_4 as Result, + Result_3 as Result, Extensions_2 as Extensions, Utils, Public_2 as Public, @@ -2979,4 +3252,22 @@ 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/experiments/postgres/prisma/generated/client/runtime/library.js b/experiments/postgres/prisma/generated/client/runtime/library.js index 65b30894c..5cd4f3fe9 100644 --- a/experiments/postgres/prisma/generated/client/runtime/library.js +++ b/experiments/postgres/prisma/generated/client/runtime/library.js @@ -1,73 +1,71 @@ -"use strict";var Ll=Object.create;var Mt=Object.defineProperty;var $l=Object.getOwnPropertyDescriptor;var ql=Object.getOwnPropertyNames;var Vl=Object.getPrototypeOf,jl=Object.prototype.hasOwnProperty;var Bl=(e,t,r)=>t in e?Mt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var V=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),St=(e,t)=>{for(var r in t)Mt(e,r,{get:t[r],enumerable:!0})},Xi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ql(t))!jl.call(e,i)&&i!==r&&Mt(e,i,{get:()=>t[i],enumerable:!(n=$l(t,i))||n.enumerable});return e};var S=(e,t,r)=>(r=e!=null?Ll(Vl(e)):{},Xi(t||!e||!e.__esModule?Mt(r,"default",{value:e,enumerable:!0}):r,e)),Ul=e=>Xi(Mt({},"__esModule",{value:!0}),e);var eo=(e,t,r)=>(Bl(e,typeof t!="symbol"?t+"":t,r),r);var co=V((xm,uo)=>{"use strict";var rt=1e3,nt=rt*60,it=nt*60,Qe=it*24,Kl=Qe*7,Ql=Qe*365.25;uo.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return Gl(e);if(r==="number"&&isFinite(e))return t.long?Hl(e):Jl(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Gl(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Ql;case"weeks":case"week":case"w":return r*Kl;case"days":case"day":case"d":return r*Qe;case"hours":case"hour":case"hrs":case"hr":case"h":return r*it;case"minutes":case"minute":case"mins":case"min":case"m":return r*nt;case"seconds":case"second":case"secs":case"sec":case"s":return r*rt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Jl(e){var t=Math.abs(e);return t>=Qe?Math.round(e/Qe)+"d":t>=it?Math.round(e/it)+"h":t>=nt?Math.round(e/nt)+"m":t>=rt?Math.round(e/rt)+"s":e+"ms"}function Hl(e){var t=Math.abs(e);return t>=Qe?br(e,t,Qe,"day"):t>=it?br(e,t,it,"hour"):t>=nt?br(e,t,nt,"minute"):t>=rt?br(e,t,rt,"second"):e+" ms"}function br(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var kn=V((bm,po)=>{"use strict";function Wl(e){r.debug=r,r.default=r,r.coerce=l,r.disable=o,r.enable=i,r.enabled=s,r.humanize=co(),r.destroy=u,Object.keys(e).forEach(c=>{r[c]=e[c]}),r.names=[],r.skips=[],r.formatters={};function t(c){let p=0;for(let d=0;d{if(J==="%%")return"%";R++;let $=r.formatters[Ke];if(typeof $=="function"){let z=P[R];J=$.call(T,z),P.splice(R,1),R--}return J}),r.formatArgs.call(T,P),(T.log||r.log).apply(T,P)}return g.namespace=c,g.useColors=r.useColors(),g.color=r.selectColor(c),g.extend=n,g.destroy=r.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(f!==r.namespaces&&(f=r.namespaces,y=r.enabled(c)),y),set:P=>{d=P}}),typeof r.init=="function"&&r.init(g),g}function n(c,p){let d=r(this.namespace+(typeof p>"u"?":":p)+c);return d.log=this.log,d}function i(c){r.save(c),r.namespaces=c,r.names=[],r.skips=[];let p,d=(typeof c=="string"?c:"").split(/[\s,]+/),f=d.length;for(p=0;p"-"+p)].join(",");return r.enable(""),c}function s(c){if(c[c.length-1]==="*")return!0;let p,d;for(p=0,d=r.skips.length;p{"use strict";le.formatArgs=Yl;le.save=Zl;le.load=Xl;le.useColors=zl;le.storage=eu();le.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();le.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function zl(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Yl(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Er.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),e.splice(n,0,t)}le.log=console.debug||console.log||(()=>{});function Zl(e){try{e?le.storage.setItem("debug",e):le.storage.removeItem("debug")}catch{}}function Xl(){let e;try{e=le.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function eu(){try{return localStorage}catch{}}Er.exports=kn()(le);var{formatters:tu}=Er.exports;tu.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Fn=V((Em,fo)=>{"use strict";fo.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 ru=require("os"),go=require("tty"),de=Fn(),{env:B}=process,ke;de("no-color")||de("no-colors")||de("color=false")||de("color=never")?ke=0:(de("color")||de("colors")||de("color=true")||de("color=always"))&&(ke=1);"FORCE_COLOR"in B&&(B.FORCE_COLOR==="true"?ke=1:B.FORCE_COLOR==="false"?ke=0:ke=B.FORCE_COLOR.length===0?1:Math.min(parseInt(B.FORCE_COLOR,10),3));function On(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Dn(e,t){if(ke===0)return 0;if(de("color=16m")||de("color=full")||de("color=truecolor"))return 3;if(de("color=256"))return 2;if(e&&!t&&ke===void 0)return 0;let r=ke||0;if(B.TERM==="dumb")return r;if(process.platform==="win32"){let n=ru.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in B)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in B)||B.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in B)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(B.TEAMCITY_VERSION)?1:0;if(B.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in B){let n=parseInt((B.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(B.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(B.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(B.TERM)||"COLORTERM"in B?1:r}function nu(e){let t=Dn(e,e&&e.isTTY);return On(t)}yo.exports={supportsColor:nu,stdout:On(Dn(!0,go.isatty(1))),stderr:On(Dn(!0,go.isatty(2)))}});var xo=V((H,Pr)=>{"use strict";var iu=require("tty"),wr=require("util");H.init=pu;H.log=lu;H.formatArgs=su;H.save=uu;H.load=cu;H.useColors=ou;H.destroy=wr.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");H.colors=[6,2,3,4,5,1];try{let e=_n();e&&(e.stderr||e).level>=2&&(H.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}H.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(i,o)=>o.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function ou(){return"colors"in H.inspectOpts?!!H.inspectOpts.colors:iu.isatty(process.stderr.fd)}function su(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${i};1m${t} \x1B[0m`;e[0]=o+e[0].split(` -`).join(` -`+o),e.push(i+"m+"+Pr.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=au()+t+" "+e[0]}function au(){return H.inspectOpts.hideDate?"":new Date().toISOString()+" "}function lu(...e){return process.stderr.write(wr.format(...e)+` -`)}function uu(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function cu(){return process.env.DEBUG}function pu(e){e.inspectOpts={};let t=Object.keys(H.inspectOpts);for(let r=0;rt.trim()).join(" ")};ho.O=function(e){return this.inspectOpts.colors=this.useColors,wr.inspect(e,this.inspectOpts)}});var Ln=V((Pm,Nn)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Nn.exports=mo():Nn.exports=xo()});var So=V((ef,Un)=>{"use strict";var A=Un.exports;Un.exports.default=A;var I="\x1B[",kt="\x1B]",at="\x07",Rr=";",Mo=process.env.TERM_PROGRAM==="Apple_Terminal";A.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?I+(e+1)+"G":I+(t+1)+";"+(e+1)+"H"};A.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let r="";return e<0?r+=I+-e+"D":e>0&&(r+=I+e+"C"),t<0?r+=I+-t+"A":t>0&&(r+=I+t+"B"),r};A.cursorUp=(e=1)=>I+e+"A";A.cursorDown=(e=1)=>I+e+"B";A.cursorForward=(e=1)=>I+e+"C";A.cursorBackward=(e=1)=>I+e+"D";A.cursorLeft=I+"G";A.cursorSavePosition=Mo?"\x1B7":I+"s";A.cursorRestorePosition=Mo?"\x1B8":I+"u";A.cursorGetPosition=I+"6n";A.cursorNextLine=I+"E";A.cursorPrevLine=I+"F";A.cursorHide=I+"?25l";A.cursorShow=I+"?25h";A.eraseLines=e=>{let t="";for(let r=0;r[kt,"8",Rr,Rr,t,at,e,kt,"8",Rr,Rr,at].join("");A.image=(e,t={})=>{let r=`${kt}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")+at};A.iTerm={setCwd:(e=process.cwd())=>`${kt}50;CurrentDir=${e}${at}`,annotation:(e,t={})=>{let r=`${kt}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+at}}});var Fo=V((tf,ko)=>{"use strict";var hu=_n(),lt=Fn();function Io(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 Kn(e){let{env:t}=process;if("FORCE_HYPERLINK"in t)return!(t.FORCE_HYPERLINK.length>0&&parseInt(t.FORCE_HYPERLINK,10)===0);if(lt("no-hyperlink")||lt("no-hyperlinks")||lt("hyperlink=false")||lt("hyperlink=never"))return!1;if(lt("hyperlink=true")||lt("hyperlink=always")||"NETLIFY"in t)return!0;if(!hu.supportsColor(e)||e&&!e.isTTY||process.platform==="win32"||"CI"in t||"TEAMCITY_VERSION"in t)return!1;if("TERM_PROGRAM"in t){let r=Io(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=Io(t.VTE_VERSION);return r.major>0||r.minor>=50}return!1}ko.exports={supportsHyperlink:Kn,stdout:Kn(process.stdout),stderr:Kn(process.stderr)}});var Do=V((rf,Ft)=>{"use strict";var xu=So(),Qn=Fo(),Oo=(e,t,{target:r="stdout",...n}={})=>Qn[r]?xu.link(e,t):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,t):`${e} (\u200B${t}\u200B)`;Ft.exports=(e,t,r={})=>Oo(e,t,r);Ft.exports.stderr=(e,t,r={})=>Oo(e,t,{target:"stderr",...r});Ft.exports.isSupported=Qn.stdout;Ft.exports.stderr.isSupported=Qn.stderr});var Ko=V((wf,Ou)=>{Ou.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 Go=V((Pf,Fr)=>{"use strict";var Du=require("fs"),Qo=require("path"),_u=require("os"),Nu=Ko(),Lu=Nu.version,$u=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function qu(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,` -`);let n;for(;(n=$u.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 Wn(e){console.log(`[dotenv@${Lu}][DEBUG] ${e}`)}function Vu(e){return e[0]==="~"?Qo.join(_u.homedir(),e.slice(1)):e}function ju(e){let t=Qo.resolve(process.cwd(),".env"),r="utf8",n=!!(e&&e.debug),i=!!(e&&e.override);e&&(e.path!=null&&(t=Vu(e.path)),e.encoding!=null&&(r=e.encoding));try{let o=kr.parse(Du.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&&Wn(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&&Wn(`Failed to load ${t} ${o.message}`),{error:o}}}var kr={config:ju,parse:qu};Fr.exports.config=kr.config;Fr.exports.parse=kr.parse;Fr.exports=kr});var Zo=V((Sf,Yo)=>{"use strict";Yo.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var es=V((If,Xo)=>{"use strict";var Qu=Zo();Xo.exports=e=>{let t=Qu(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var ts=V((kf,Gu)=>{Gu.exports={name:"@prisma/engines-version",version:"5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"ac9d7041ed77bcc8a8dbd2ab6616b39013829574"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.18.4",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Xn=V(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.enginesVersion=void 0;Dr.enginesVersion=ts().prisma.enginesVersion});var ii=V((Kf,is)=>{"use strict";is.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 ls=V((Jf,as)=>{"use strict";as.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 li=V((Hf,us)=>{"use strict";var rc=ls();us.exports=e=>typeof e=="string"?e.replace(rc(),""):e});var cs=V((Yf,Nr)=>{"use strict";Nr.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()};Nr.exports.default=Nr.exports});var Ui=V((CP,Ka)=>{"use strict";Ka.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;spe,DMMFClass:()=>xr,Debug:()=>$n,Decimal:()=>Pe,Extensions:()=>Rn,MetricsClient:()=>dt,NotFoundError:()=>Re,ObjectEnumValue:()=>xe,PrismaClientInitializationError:()=>F,PrismaClientKnownRequestError:()=>U,PrismaClientRustPanicError:()=>ue,PrismaClientUnknownRequestError:()=>K,PrismaClientValidationError:()=>X,Public:()=>Mn,Sql:()=>oe,Types:()=>Sn,defineDmmfProperty:()=>ms,empty:()=>ys,getPrismaClient:()=>Dl,itxClientDenyList:()=>zi,join:()=>gs,makeStrictEnum:()=>_l,objectEnumNames:()=>ic,objectEnumValues:()=>$r,raw:()=>gi,sqltag:()=>yi,warnEnvConflicts:()=>Nl,warnOnce:()=>qt});module.exports=Ul(sm);var Rn={};St(Rn,{defineExtension:()=>to,getExtensionContext:()=>ro});function to(e){return typeof e=="function"?e:t=>t.$extends(e)}function ro(e){return e}var Mn={};St(Mn,{validator:()=>no});function no(...e){return t=>t}var Sn={};St(Sn,{Extensions:()=>io,Public:()=>oo,Result:()=>so,Utils:()=>ao});var io={};var oo={};var so={};var ao={};var Ie=(e,t)=>{let r={};for(let n of e){let i=n[t];r[i]=n}return r};function lo(e){return e.substring(0,1).toLowerCase()+e.substring(1)}var xr=class{constructor(t){this.document=t;this.compositeNames=new Set(this.datamodel.types.map(r=>r.name)),this.typeAndModelMap=this.buildTypeModelMap(),this.mappingsMap=this.buildMappingsMap(),this.outputTypeMap=this.buildMergedOutputTypeMap(),this.rootFieldMap=this.buildRootFieldMap(),this.inputTypesByName=this.buildInputTypesMap()}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(t){return this.compositeNames.has(t)}getOtherOperationNames(){return[Object.values(this.mappings.otherOperations.write),Object.values(this.mappings.otherOperations.read)].flat()}hasEnumInNamespace(t,r){return this.schema.enumTypes[r]?.find(n=>n.name===t)!==void 0}resolveInputObjectType(t){return this.inputTypesByName.get(In(t.type,t.namespace))}resolveOutputObjectType(t){if(t.location==="outputObjectTypes")return this.outputObjectTypes[t.namespace??"prisma"].find(r=>r.name===t.type)}buildModelMap(){return Ie(this.datamodel.models,"name")}buildTypeMap(){return Ie(this.datamodel.types,"name")}buildTypeModelMap(){return{...this.buildTypeMap(),...this.buildModelMap()}}buildMappingsMap(){return Ie(this.mappings.modelOperations,"model")}buildMergedOutputTypeMap(){return{model:Ie(this.schema.outputObjectTypes.model,"name"),prisma:Ie(this.schema.outputObjectTypes.prisma,"name")}}buildRootFieldMap(){return{...Ie(this.outputTypeMap.prisma.Query.fields,"name"),...Ie(this.outputTypeMap.prisma.Mutation.fields,"name")}}buildInputTypesMap(){let t=new Map;for(let r of this.inputObjectTypes.prisma)t.set(In(r.name,"prisma"),r);if(!this.inputObjectTypes.model)return t;for(let r of this.inputObjectTypes.model)t.set(In(r.name,"model"),r);return t}};function In(e,t){return t?`${t}.${e}`:e}var pe;(t=>{let e;(x=>(x.findUnique="findUnique",x.findUniqueOrThrow="findUniqueOrThrow",x.findFirst="findFirst",x.findFirstOrThrow="findFirstOrThrow",x.findMany="findMany",x.create="create",x.createMany="createMany",x.update="update",x.updateMany="updateMany",x.upsert="upsert",x.delete="delete",x.deleteMany="deleteMany",x.groupBy="groupBy",x.count="count",x.aggregate="aggregate",x.findRaw="findRaw",x.aggregateRaw="aggregateRaw"))(e=t.ModelAction||(t.ModelAction={}))})(pe||(pe={}));var vr=S(Ln()),du=100,It=[];typeof process<"u"&&typeof process.stderr?.write!="function"&&(vr.default.log=console.debug??console.log);function mu(e){let t=(0,vr.default)(e),r=Object.assign((...n)=>(t.log=r.log,n.length!==0&&It.push([e,...n]),It.length>du&&It.shift(),t("",...n)),t);return r}var $n=Object.assign(mu,vr.default);function bo(e=7500){let t=It.map(r=>r.map(n=>typeof n=="string"?n:JSON.stringify(n)).join(" ")).join(` -`);return t.length2&&i.push.apply(i,r.slice(1,r.length-1)),new e(this.value,this.cases.concat([{match:function(s){var a={},l=!!(i.some(function(u){return gu(u,s,function(c,p){a[c]=p})})&&o.every(function(u){return u(s)}));return{matched:l,value:l&&Object.keys(a).length?Ao in a?a[Ao]:a:s}},handler:n}]))},t.when=function(r,n){return new e(this.value,this.cases.concat([{match:function(i){return{matched:!!r(i),value:i}},handler:n}]))},t.otherwise=function(r){return new e(this.value,this.cases.concat([{match:function(n){return{matched:!0,value:n}},handler:r}])).run()},t.exhaustive=function(){return this.run()},t.run=function(){for(var r=this.value,n=void 0,i=0;i!process.env.PRISMA_DISABLE_WARNINGS};function Dt(e,...t){Eu.warn()&&console.warn(`${bu.warn} ${e}`,...t)}var wu=(0,qo.promisify)($o.default.exec),ie=D("prisma:get-platform"),Pu=["1.0.x","1.1.x","3.0.x"];async function Vo(){let e=Sr.default.platform(),t=process.arch;if(e==="freebsd"){let s=await Ir("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 Tu(),n=await Fu(),i=Au({arch:t,archFromUname:n,familyDistro:r.familyDistro}),{libssl:o}=await Ru(i);return{platform:"linux",libssl:o,arch:t,archFromUname:n,...r}}function vu(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=st({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 ie(`Found distro info: -${JSON.stringify(a,null,2)}`),a}async function Tu(){let e="/etc/os-release";try{let t=await Gn.default.readFile(e,{encoding:"utf-8"});return vu(t)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function Cu(e){let t=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(t){let r=`${t[1]}.x`;return jo(r)}}function No(e){let t=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(t){let r=`${t[1]}${t[2]??".0"}.x`;return jo(r)}}function jo(e){let t=(()=>{if(Uo(e))return e;let r=e.split(".");return r[1]="0",r.join(".")})();if(Pu.includes(t))return t}function Au(e){return st(e).with({familyDistro:"musl"},()=>(ie('Trying platform-specific paths for "alpine"'),["/lib"])).with({familyDistro:"debian"},({archFromUname:t})=>(ie('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${t}-linux-gnu`,`/lib/${t}-linux-gnu`])).with({familyDistro:"rhel"},()=>(ie('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:t,arch:r,archFromUname:n})=>(ie(`Don't know any platform-specific paths for "${t}" on ${r} (${n})`),[]))}async function Ru(e){let t='grep -v "libssl.so.0"',r=await Lo(e);if(r){ie(`Found libssl.so file using platform-specific paths: ${r}`);let o=No(r);if(ie(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"libssl-specific-path"}}ie('Falling back to "ldconfig" and other generic paths');let n=await Ir(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${t}`);if(n||(n=await Lo(["/lib64","/usr/lib64","/lib"])),n){ie(`Found libssl.so file using "ldconfig" or other generic paths: ${n}`);let o=No(n);if(ie(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"ldconfig"}}let i=await Ir("openssl version -v");if(i){ie(`Found openssl binary with version: ${i}`);let o=Cu(i);if(ie(`The parsed openssl version is: ${o}`),o)return{libssl:o,strategy:"openssl-binary"}}return ie("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function Lo(e){for(let t of e){let r=await Mu(t);if(r)return r}}async function Mu(e){try{return(await Gn.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 ut(){let{binaryTarget:e}=await Bo();return e}function Su(e){return e.binaryTarget!==void 0}async function Jn(){let{memoized:e,...t}=await Bo();return t}var Mr={};async function Bo(){if(Su(Mr))return Promise.resolve({...Mr,memoized:!0});let e=await Vo(),t=Iu(e);return Mr={...e,binaryTarget:t},{...Mr,memoized:!1}}function Iu(e){let{platform:t,arch:r,archFromUname:n,libssl:i,targetDistro:o,familyDistro:s,originalDistro:a}=e;t==="linux"&&!["x64","arm64"].includes(r)&&Dt(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures. 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=st({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.");Dt(`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&&Dt(`Prisma doesn't know which engines to download for the Linux distro "${a}". Falling back to Prisma engines built "${u}". -Please report your experience by creating an issue at ${Ot("https://github.com/prisma/prisma/issues")} so we can add your distro to the list of known supported distros.`),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||Uo(i)?c:`${c}-openssl-${i}`}return t==="linux"&&o&&i?`${o}-openssl-${i}`:(t!=="linux"&&Dt(`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 ku(e){try{return await e()}catch{return}}function Ir(e){return ku(async()=>{let t=await wu(e);return ie(`Command "${e}" successfully returned "${t.stdout}"`),t.stdout})}async function Fu(){return typeof Sr.default.machine=="function"?Sr.default.machine():(await Ir("uname -m"))?.trim()}function Uo(e){return e.startsWith("1.")}var Hn=["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","openbsd","netbsd","arm"];var Yn=S(Go()),Or=S(require("fs"));var ct=S(require("path"));function Jo(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 zn=D("prisma:tryLoadEnv");function _t({rootEnvPath:e,schemaEnvPath:t},r={conflictCheck:"none"}){let n=Ho(e);r.conflictCheck!=="none"&&Bu(n,t,r.conflictCheck);let i=null;return Wo(n?.path,t)||(i=Ho(t)),!n&&!i&&zn("No Environment variables loaded"),i?.dotenvResult.error?console.error(me(ne("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(` -`),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function Bu(e,t,r){let n=e?.dotenvResult.parsed,i=!Wo(e?.path,t);if(n&&t&&i&&Or.default.existsSync(t)){let o=Yn.default.parse(Or.default.readFileSync(t)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=ct.default.relative(process.cwd(),e.path),l=ct.default.relative(process.cwd(),t);if(r==="error"){let u=`There is a conflict between env var${s.length>1?"s":""} in ${te(a)} and ${te(l)} +"use strict";var ql=Object.create;var Dr=Object.defineProperty;var jl=Object.getOwnPropertyDescriptor;var Vl=Object.getOwnPropertyNames;var Bl=Object.getPrototypeOf,Ul=Object.prototype.hasOwnProperty;var Z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qt=(e,t)=>{for(var r in t)Dr(e,r,{get:t[r],enumerable:!0})},so=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Vl(t))!Ul.call(e,i)&&i!==r&&Dr(e,i,{get:()=>t[i],enumerable:!(n=jl(t,i))||n.enumerable});return e};var k=(e,t,r)=>(r=e!=null?ql(Bl(e)):{},so(t||!e||!e.__esModule?Dr(r,"default",{value:e,enumerable:!0}):r,e)),Gl=e=>so(Dr({},"__esModule",{value:!0}),e);var ko=Z((Hm,Wn)=>{"use strict";var v=Wn.exports;Wn.exports.default=v;var D="\x1B[",Gt="\x1B]",mt="\x07",Br=";",Oo=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=Oo?"\x1B7":D+"s";v.cursorRestorePosition=Oo?"\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[Gt,"8",Br,Br,t,mt,e,Gt,"8",Br,Br,mt].join("");v.image=(e,t={})=>{let r=`${Gt}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")+mt};v.iTerm={setCwd:(e=process.cwd())=>`${Gt}50;CurrentDir=${e}${mt}`,annotation:(e,t={})=>{let r=`${Gt}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+mt}}});var Hn=Z((Km,Do)=>{"use strict";Do.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 Iu=require("os"),_o=require("tty"),de=Hn(),{env:Q}=process,Ue;de("no-color")||de("no-colors")||de("color=false")||de("color=never")?Ue=0:(de("color")||de("colors")||de("color=true")||de("color=always"))&&(Ue=1);"FORCE_COLOR"in Q&&(Q.FORCE_COLOR==="true"?Ue=1:Q.FORCE_COLOR==="false"?Ue=0:Ue=Q.FORCE_COLOR.length===0?1:Math.min(parseInt(Q.FORCE_COLOR,10),3));function Kn(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function zn(e,t){if(Ue===0)return 0;if(de("color=16m")||de("color=full")||de("color=truecolor"))return 3;if(de("color=256"))return 2;if(e&&!t&&Ue===void 0)return 0;let r=Ue||0;if(Q.TERM==="dumb")return r;if(process.platform==="win32"){let n=Iu.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 Ou(e){let t=zn(e,e&&e.isTTY);return Kn(t)}Lo.exports={supportsColor:Ou,stdout:Kn(zn(!0,_o.isatty(1))),stderr:Kn(zn(!0,_o.isatty(2)))}});var $o=Z((Ym,Mo)=>{"use strict";var ku=Fo(),ft=Hn();function No(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 Yn(e){let{env:t}=process;if("FORCE_HYPERLINK"in t)return!(t.FORCE_HYPERLINK.length>0&&parseInt(t.FORCE_HYPERLINK,10)===0);if(ft("no-hyperlink")||ft("no-hyperlinks")||ft("hyperlink=false")||ft("hyperlink=never"))return!1;if(ft("hyperlink=true")||ft("hyperlink=always")||"NETLIFY"in t)return!0;if(!ku.supportsColor(e)||e&&!e.isTTY||process.platform==="win32"||"CI"in t||"TEAMCITY_VERSION"in t)return!1;if("TERM_PROGRAM"in t){let r=No(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=No(t.VTE_VERSION);return r.major>0||r.minor>=50}return!1}Mo.exports={supportsHyperlink:Yn,stdout:Yn(process.stdout),stderr:Yn(process.stderr)}});var jo=Z((Zm,Qt)=>{"use strict";var Du=ko(),Zn=$o(),qo=(e,t,{target:r="stdout",...n}={})=>Zn[r]?Du.link(e,t):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,t):`${e} (\u200B${t}\u200B)`;Qt.exports=(e,t,r={})=>qo(e,t,r);Qt.exports.stderr=(e,t,r={})=>qo(e,t,{target:"stderr",...r});Qt.exports.isSupported=Zn.stdout;Qt.exports.stderr.isSupported=Zn.stderr});var ei=Z((uf,_u)=>{_u.exports={name:"@prisma/engines-version",version:"5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4c784e32044a8a016d99474bd02a3b6123742169"},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 ti=Z(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.enginesVersion=void 0;Ur.enginesVersion=ei().prisma.enginesVersion});var Go=Z((Af,Nu)=>{Nu.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 Jo=Z((If,Qr)=>{"use strict";var Mu=require("fs"),Qo=require("path"),$u=require("os"),qu=Go(),ju=qu.version,Vu=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Bu(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,` +`);let n;for(;(n=Vu.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 oi(e){console.log(`[dotenv@${ju}][DEBUG] ${e}`)}function Uu(e){return e[0]==="~"?Qo.join($u.homedir(),e.slice(1)):e}function Gu(e){let t=Qo.resolve(process.cwd(),".env"),r="utf8",n=!!(e&&e.debug),i=!!(e&&e.override);e&&(e.path!=null&&(t=Uu(e.path)),e.encoding!=null&&(r=e.encoding));try{let o=Gr.parse(Mu.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&&oi(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&&oi(`Failed to load ${t} ${o.message}`),{error:o}}}var Gr={config:Gu,parse:Bu};Qr.exports.config=Gr.config;Qr.exports.parse=Gr.parse;Qr.exports=Gr});var Zo=Z((Nf,Yo)=>{"use strict";Yo.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var es=Z((Mf,Xo)=>{"use strict";var Hu=Zo();Xo.exports=e=>{let t=Hu(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var ui=Z((Uf,ts)=>{"use strict";ts.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 os=Z((Jf,is)=>{"use strict";is.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 mi=Z((Wf,ss)=>{"use strict";var rc=os();ss.exports=e=>typeof e=="string"?e.replace(rc(),""):e});var as=Z((zf,Hr)=>{"use strict";Hr.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()};Hr.exports.default=Hr.exports});var Zi=Z((GP,Ga)=>{"use strict";Ga.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;sqn,Decimal:()=>ve,Extensions:()=>Fn,MetricsClient:()=>yt,NotFoundError:()=>_e,PrismaClientInitializationError:()=>R,PrismaClientKnownRequestError:()=>V,PrismaClientRustPanicError:()=>le,PrismaClientUnknownRequestError:()=>B,PrismaClientValidationError:()=>H,Public:()=>Nn,Sql:()=>ie,defineDmmfProperty:()=>us,empty:()=>ps,getPrismaClient:()=>Nl,getRuntime:()=>wn,join:()=>cs,makeStrictEnum:()=>Ml,objectEnumValues:()=>Yr,raw:()=>Pi,sqltag:()=>vi,warnEnvConflicts:()=>$l,warnOnce:()=>Yt});module.exports=Gl(wm);var Fn={};qt(Fn,{defineExtension:()=>ao,getExtensionContext:()=>lo});function ao(e){return typeof e=="function"?e:t=>t.$extends(e)}function lo(e){return e}var Nn={};qt(Nn,{validator:()=>uo});function uo(...e){return t=>t}var _r={};qt(_r,{$:()=>go,bgBlack:()=>eu,bgBlue:()=>iu,bgCyan:()=>su,bgGreen:()=>ru,bgMagenta:()=>ou,bgRed:()=>tu,bgWhite:()=>au,bgYellow:()=>nu,black:()=>zl,blue:()=>et,bold:()=>W,cyan:()=>Oe,dim:()=>Ae,gray:()=>jt,green:()=>Me,grey:()=>Xl,hidden:()=>Hl,inverse:()=>Wl,italic:()=>Jl,magenta:()=>Yl,red:()=>ce,reset:()=>Ql,strikethrough:()=>Kl,underline:()=>X,white:()=>Zl,yellow:()=>Ie});var Mn,co,po,mo,fo=!0;typeof process<"u"&&({FORCE_COLOR:Mn,NODE_DISABLE_COLORS:co,NO_COLOR:po,TERM:mo}=process.env||{},fo=process.stdout&&process.stdout.isTTY);var go={enabled:!co&&po==null&&mo!=="dumb"&&(Mn!=null&&Mn!=="0"||fo)};function M(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!go.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Ql=M(0,0),W=M(1,22),Ae=M(2,22),Jl=M(3,23),X=M(4,24),Wl=M(7,27),Hl=M(8,28),Kl=M(9,29),zl=M(30,39),ce=M(31,39),Me=M(32,39),Ie=M(33,39),et=M(34,39),Yl=M(35,39),Oe=M(36,39),Zl=M(37,39),jt=M(90,39),Xl=M(90,39),eu=M(40,49),tu=M(41,49),ru=M(42,49),nu=M(43,49),iu=M(44,49),ou=M(45,49),su=M(46,49),au=M(47,49);var lu=100,ho=["green","yellow","blue","magenta","cyan","red"],Vt=[],yo=Date.now(),uu=0,$n=typeof process<"u"?process.env:{};globalThis.DEBUG??=$n.DEBUG??"";globalThis.DEBUG_COLORS??=$n.DEBUG_COLORS?$n.DEBUG_COLORS==="true":!0;var Bt={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 cu(e){let t={color:ho[uu++%ho.length],enabled:Bt.enabled(e),namespace:e,log:Bt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Vt.push([o,...n]),Vt.length>lu&&Vt.shift(),Bt.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:pu(c)),u=`+${Date.now()-yo}ms`;yo=Date.now(),globalThis.DEBUG_COLORS?a(_r[s](W(o)),...l,_r[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var qn=new Proxy(cu,{get:(e,t)=>Bt[t],set:(e,t,r)=>Bt[t]=r});function pu(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 bo(e=7500){let t=Vt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` +`);return t.length!!(e&&typeof e=="object"),Nr=e=>e&&!!e[ke],Ee=(e,t,r)=>{if(Nr(e)){let n=e[ke](),{matched:i,selections:o}=n.match(t);return i&&o&&Object.keys(o).forEach(s=>r(s,o[s])),i}if(Bn(e)){if(!Bn(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];Nr(a)&&a[du]?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||Nr(o=i)&&o[ke]().matcherType==="optional")&&Ee(i,t[n],r);var o})}return Object.is(t,e)},Be=e=>{var t,r,n;return Bn(e)?Nr(e)?(t=(r=(n=e[ke]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Ut(e,Be):Ut(Object.values(e),Be):[]},Ut=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function pe(e){return Object.assign(e,{optional:()=>mu(e),and:t=>j(e,t),or:t=>fu(e,t),select:t=>t===void 0?xo(e):xo(t,e)})}function mu(e){return pe({[ke]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return t===void 0?(Be(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:Ee(e,t,n),selections:r}},getSelectionKeys:()=>Be(e),matcherType:"optional"})})}function j(...e){return pe({[ke]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return{matched:e.every(i=>Ee(i,t,n)),selections:r}},getSelectionKeys:()=>Ut(e,Be),matcherType:"and"})})}function fu(...e){return pe({[ke]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return Ut(e,Be).forEach(i=>n(i,void 0)),{matched:e.some(i=>Ee(i,t,n)),selections:r}},getSelectionKeys:()=>Ut(e,Be),matcherType:"or"})})}function I(e){return{[ke]:()=>({match:t=>({matched:!!e(t)})})}}function xo(...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({[ke]:()=>({match:n=>{let i={[t??Mr]:n};return{matched:r===void 0||Ee(r,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[t??Mr].concat(r===void 0?[]:Be(r))})})}function ye(e){return typeof e=="number"}function $e(e){return typeof e=="string"}function qe(e){return typeof e=="bigint"}var _m=pe(I(function(e){return!0}));var je=e=>Object.assign(pe(e),{startsWith:t=>{return je(j(e,(r=t,I(n=>$e(n)&&n.startsWith(r)))));var r},endsWith:t=>{return je(j(e,(r=t,I(n=>$e(n)&&n.endsWith(r)))));var r},minLength:t=>je(j(e,(r=>I(n=>$e(n)&&n.length>=r))(t))),length:t=>je(j(e,(r=>I(n=>$e(n)&&n.length===r))(t))),maxLength:t=>je(j(e,(r=>I(n=>$e(n)&&n.length<=r))(t))),includes:t=>{return je(j(e,(r=t,I(n=>$e(n)&&n.includes(r)))));var r},regex:t=>{return je(j(e,(r=t,I(n=>$e(n)&&!!n.match(r)))));var r}}),Lm=je(I($e)),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)))}),Fm=be(I(ye)),Ve=e=>Object.assign(pe(e),{between:(t,r)=>Ve(j(e,((n,i)=>I(o=>qe(o)&&n<=o&&i>=o))(t,r))),lt:t=>Ve(j(e,(r=>I(n=>qe(n)&&nVe(j(e,(r=>I(n=>qe(n)&&n>r))(t))),lte:t=>Ve(j(e,(r=>I(n=>qe(n)&&n<=r))(t))),gte:t=>Ve(j(e,(r=>I(n=>qe(n)&&n>=r))(t))),positive:()=>Ve(j(e,I(t=>qe(t)&&t>0))),negative:()=>Ve(j(e,I(t=>qe(t)&&t<0)))}),Nm=Ve(I(qe)),Mm=pe(I(function(e){return typeof e=="boolean"})),$m=pe(I(function(e){return typeof e=="symbol"})),qm=pe(I(function(e){return e==null})),jm=pe(I(function(e){return e!=null}));var Un={matched:!1,value:void 0};function dt(e){return new Gn(e,Un)}var Gn=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)?Un:{matched:!0,value:r(o?Mr in s?s[Mr]: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)}:Un)}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 Ro=require("util");var gu={warn:Ie("prisma:warn")},hu={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function $r(e,...t){hu.warn()&&console.warn(`${gu.warn} ${e}`,...t)}var yu=(0,Ro.promisify)(To.default.exec),te=F("prisma:get-platform"),bu=["1.0.x","1.1.x","3.0.x"];async function Co(){let e=jr.default.platform(),t=process.arch;if(e==="freebsd"){let s=await Vr("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 wu(),n=await Au(),i=Pu({arch:t,archFromUname:n,familyDistro:r.familyDistro}),{libssl:o}=await vu(i);return{platform:"linux",libssl:o,arch:t,archFromUname:n,...r}}function Eu(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=dt({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 wu(){let e="/etc/os-release";try{let t=await Qn.default.readFile(e,{encoding:"utf-8"});return Eu(t)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function xu(e){let t=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(t){let r=`${t[1]}.x`;return So(r)}}function Po(e){let t=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(t){let r=`${t[1]}${t[2]??".0"}.x`;return So(r)}}function So(e){let t=(()=>{if(Io(e))return e;let r=e.split(".");return r[1]="0",r.join(".")})();if(bu.includes(t))return t}function Pu(e){return dt(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 vu(e){let t='grep -v "libssl.so.0"',r=await vo(e);if(r){te(`Found libssl.so file using platform-specific paths: ${r}`);let o=Po(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 Vr(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${t}`);if(n||(n=await vo(["/lib64","/usr/lib64","/lib"])),n){te(`Found libssl.so file using "ldconfig" or other generic paths: ${n}`);let o=Po(n);if(te(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"ldconfig"}}let i=await Vr("openssl version -v");if(i){te(`Found openssl binary with version: ${i}`);let o=xu(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 vo(e){for(let t of e){let r=await Tu(t);if(r)return r}}async function Tu(e){try{return(await Qn.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 tt(){let{binaryTarget:e}=await Ao();return e}function Ru(e){return e.binaryTarget!==void 0}async function Jn(){let{memoized:e,...t}=await Ao();return t}var qr={};async function Ao(){if(Ru(qr))return Promise.resolve({...qr,memoized:!0});let e=await Co(),t=Cu(e);return qr={...e,binaryTarget:t},{...qr,memoized:!1}}function Cu(e){let{platform:t,arch:r,archFromUname:n,libssl:i,targetDistro:o,familyDistro:s,originalDistro:a}=e;t==="linux"&&!["x64","arm64"].includes(r)&&$r(`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=dt({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.");$r(`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||Io(i)?c:`${c}-openssl-${i}`}return t==="linux"&&o&&i?`${o}-openssl-${i}`:(t!=="linux"&&$r(`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 Su(e){try{return await e()}catch{return}}function Vr(e){return Su(async()=>{let t=await yu(e);return te(`Command "${e}" successfully returned "${t.stdout}"`),t.stdout})}async function Au(){return typeof jr.default.machine=="function"?jr.default.machine():(await Vr("uname -m"))?.trim()}function Io(e){return e.startsWith("1.")}var Vo=k(jo());function Xn(e){return(0,Vo.default)(e,e,{fallback:X})}var Lu=k(ti());var $=k(require("path")),Fu=k(ti()),Ef=F("prisma:engines");function Bo(){return $.default.join(__dirname,"../")}var wf="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 ri=k(require("fs")),Uo=F("chmodPlusX");function ni(e){if(process.platform==="win32")return;let t=ri.default.statSync(e),r=t.mode|64|8|1;if(t.mode===r){Uo(`Execution permissions of ${e} are fine`);return}let n=r.toString(8).slice(-3);Uo(`Have to call chmodPlusX on ${e}`),ri.default.chmodSync(e,n)}function ii(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: ${Xn("https://pris.ly/d/system-requirements")}`,o=`Unable to require(\`${Ae(e.id)}\`).`,s=dt({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 ai=k(Jo()),Jr=k(require("fs"));var gt=k(require("path"));function Wo(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 si=F("prisma:tryLoadEnv");function Jt({rootEnvPath:e,schemaEnvPath:t},r={conflictCheck:"none"}){let n=Ho(e);r.conflictCheck!=="none"&&Qu(n,t,r.conflictCheck);let i=null;return Ko(n?.path,t)||(i=Ho(t)),!n&&!i&&si("No Environment variables loaded"),i?.dotenvResult.error?console.error(ce(W("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(` +`),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function Qu(e,t,r){let n=e?.dotenvResult.parsed,i=!Ko(e?.path,t);if(n&&t&&i&&Jr.default.existsSync(t)){let o=ai.default.parse(Jr.default.readFileSync(t)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=gt.default.relative(process.cwd(),e.path),l=gt.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=>` ${ne(c)}`).join(` +${s.map(c=>` ${W(c)}`).join(` `)} -We suggest to move the contents of ${te(l)} to ${te(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=>ne(c)).join(", ")} in ${te(a)} and ${te(l)} -Env vars from ${te(l)} overwrite the ones from ${te(a)} - `;console.warn(`${he("warn(prisma)")} ${u}`)}}}}function Ho(e){return Uu(e)?(zn(`Environment variables loaded from ${e}`),{dotenvResult:Jo(Yn.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0})),message:Fe(`Environment variables loaded from ${ct.default.relative(process.cwd(),e)}`),path:e}):(zn(`Environment variables not found at ${e}`),null)}function Wo(e,t){return e&&t&&ct.default.resolve(e)===ct.default.resolve(t)}function Uu(e){return!!(e&&Or.default.existsSync(e))}var zo="library";function Zn(e){let t=Ku();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":zo)}function Ku(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}var Ju=S(Xn());var N=S(require("path")),Hu=S(Xn()),Df=D("prisma:engines");function rs(){return N.default.join(__dirname,"../")}var _f="libquery-engine";N.default.join(__dirname,"../query-engine-darwin");N.default.join(__dirname,"../query-engine-darwin-arm64");N.default.join(__dirname,"../query-engine-debian-openssl-1.0.x");N.default.join(__dirname,"../query-engine-debian-openssl-1.1.x");N.default.join(__dirname,"../query-engine-debian-openssl-3.0.x");N.default.join(__dirname,"../query-engine-linux-static-x64");N.default.join(__dirname,"../query-engine-linux-static-arm64");N.default.join(__dirname,"../query-engine-rhel-openssl-1.0.x");N.default.join(__dirname,"../query-engine-rhel-openssl-1.1.x");N.default.join(__dirname,"../query-engine-rhel-openssl-3.0.x");N.default.join(__dirname,"../libquery_engine-darwin.dylib.node");N.default.join(__dirname,"../libquery_engine-darwin-arm64.dylib.node");N.default.join(__dirname,"../libquery_engine-debian-openssl-1.0.x.so.node");N.default.join(__dirname,"../libquery_engine-debian-openssl-1.1.x.so.node");N.default.join(__dirname,"../libquery_engine-debian-openssl-3.0.x.so.node");N.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.0.x.so.node");N.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.1.x.so.node");N.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-3.0.x.so.node");N.default.join(__dirname,"../libquery_engine-linux-musl.so.node");N.default.join(__dirname,"../libquery_engine-linux-musl-openssl-3.0.x.so.node");N.default.join(__dirname,"../libquery_engine-rhel-openssl-1.0.x.so.node");N.default.join(__dirname,"../libquery_engine-rhel-openssl-1.1.x.so.node");N.default.join(__dirname,"../libquery_engine-rhel-openssl-3.0.x.so.node");N.default.join(__dirname,"../query_engine-windows.dll.node");var ei=S(require("fs")),ns=D("chmodPlusX");function ti(e){if(process.platform==="win32")return;let t=ei.default.statSync(e),r=t.mode|64|8|1;if(t.mode===r){ns(`Execution permissions of ${e} are fine`);return}let n=r.toString(8).slice(-3);ns(`Have to call chmodPlusX on ${e}`),ei.default.chmodSync(e,n)}function ri(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: ${Ot("https://pris.ly/d/system-requirements")}`,o=`Unable to require(\`${Fe(e.id)}\`).`,s=st({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 Nt=S(require("path"));function ni(e){return Nt.default.sep===Nt.default.posix.sep?e:e.split(Nt.default.sep).join(Nt.default.posix.sep)}var os=S(ii());function si(e){return String(new oi(e))}var oi=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:Wu(t.binaryTargets)}));return`generator ${t.name} { -${(0,os.default)(zu(n),2)} -}`}};function Wu(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 zu(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)} = ${Yu(n)}`).join(` -`)}function Yu(e){return JSON.parse(JSON.stringify(e,(t,r)=>Array.isArray(r)?`[${r.map(n=>JSON.stringify(n)).join(", ")}]`:JSON.stringify(r)))}var $t={};St($t,{error:()=>ec,info:()=>Xu,log:()=>Zu,query:()=>tc,should:()=>ss,tags:()=>Lt,warn:()=>ai});var Lt={error:me("prisma:error"),warn:he("prisma:warn"),info:Oe("prisma:info"),query:ot("prisma:query")},ss={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Zu(...e){console.log(...e)}function ai(e,...t){ss.warn()&&console.warn(`${Lt.warn} ${e}`,...t)}function Xu(e,...t){console.info(`${Lt.info} ${e}`,...t)}function ec(e,...t){console.error(`${Lt.error} ${e}`,...t)}function tc(e,...t){console.log(`${Lt.query} ${e}`,...t)}function _r(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://github.com/prisma/prisma/issues/new?assignees=&labels=kind%2Fbug&projects=&template=bug_report.yml`)}function He(e,t){throw new Error(t)}function ui(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var ci=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});function pt(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function pi(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{ps.has(e)||(ps.add(e),ai(t,...r))};var U=class extends Error{constructor(r,{code:n,clientVersion:i,meta:o,batchRequestIdx:s}){super(r);this.name="PrismaClientKnownRequestError",this.code=n,this.clientVersion=i,this.meta=o,Object.defineProperty(this,"batchRequestIdx",{value:s,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};E(U,"PrismaClientKnownRequestError");var Re=class extends U{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};E(Re,"NotFoundError");var F=class e extends Error{constructor(r,n,i){super(r);this.name="PrismaClientInitializationError",this.clientVersion=n,this.errorCode=i,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};E(F,"PrismaClientInitializationError");var ue=class extends Error{constructor(r,n){super(r);this.name="PrismaClientRustPanicError",this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};E(ue,"PrismaClientRustPanicError");var K=class extends Error{constructor(r,{clientVersion:n,batchRequestIdx:i}){super(r);this.name="PrismaClientUnknownRequestError",this.clientVersion=n,Object.defineProperty(this,"batchRequestIdx",{value:i,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};E(K,"PrismaClientUnknownRequestError");var X=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};E(X,"PrismaClientValidationError");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 Vt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function ms(e,t){let r=Vt(()=>nc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function nc(e){return{datamodel:{models:di(e.models),enums:di(e.enums),types:di(e.types)}}}function di(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}var ic=["JsonNullValueInput","NullableJsonNullValueInput","JsonNullValueFilter"],Lr=Symbol(),mi=new WeakMap,xe=class{constructor(t){t===Lr?mi.set(this,`Prisma.${this._getName()}`):mi.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return mi.get(this)}},jt=class extends xe{_getNamespace(){return"NullTypes"}},Bt=class extends jt{};fi(Bt,"DbNull");var Ut=class extends jt{};fi(Ut,"JsonNull");var Kt=class extends jt{};fi(Kt,"AnyNull");var $r={classes:{DbNull:Bt,JsonNull:Ut,AnyNull:Kt},instances:{DbNull:new Bt(Lr),JsonNull:new Ut(Lr),AnyNull:new Kt(Lr)}};function fi(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}var lc=S(Ln(),1);function qr(e){return{ok:!1,error:e,map(){return qr(e)},flatMap(){return qr(e)}}}var oc=class{constructor(){eo(this,"registeredErrors",[])}consumeError(e){return this.registeredErrors[e]}registerNewError(e){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:e},t}},fs=e=>{let t=new oc,r=De(t,e.startTransaction.bind(e));return{errorRegistry:t,queryRaw:De(t,e.queryRaw.bind(e)),executeRaw:De(t,e.executeRaw.bind(e)),flavour:e.flavour,startTransaction:async(...n)=>(await r(...n)).map(o=>sc(t,o)),close:De(t,e.close.bind(e))}},sc=(e,t)=>({flavour:t.flavour,options:t.options,queryRaw:De(e,t.queryRaw.bind(t)),executeRaw:De(e,t.executeRaw.bind(t)),commit:De(e,t.commit.bind(t)),rollback:De(e,t.rollback.bind(t)),dispose:ac(e,t.dispose.bind(t))});function De(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return qr({kind:"GenericJsError",id:i})}}}function ac(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return qr({kind:"GenericJsError",id:i})}}}var kl=require("async_hooks"),Fl=require("events"),Ol=S(require("fs")),yr=S(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 bs=require("util");var Vr={enumerable:!0,configurable:!0,writable:!0};function jr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Vr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var hs=Symbol.for("nodejs.util.inspect.custom");function Ee(e,t){let r=uc(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=xs(Reflect.ownKeys(o),r),a=xs(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?{...Vr,...l?.getPropertyDescriptor(s)}:Vr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[hs]=function(o,s,a=bs.inspect){let l={...this};return delete l[hs],a(l,s)},i}function uc(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 xs(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}function Gt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}var mt=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){let n=r.length-1;for(let i=0;i0&&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}};function ft(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Br(e){return e.toString()!=="Invalid Date"}var gt=9e15,$e=1e9,hi="0123456789abcdef",Kr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Qr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",xi={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-gt,maxE:gt,crypto:!1},vs,Me,w=!0,Jr="[DecimalError] ",Le=Jr+"Invalid argument: ",Ts=Jr+"Precision limit exceeded",Cs=Jr+"crypto unavailable",As="[object Decimal]",ee=Math.floor,j=Math.pow,cc=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,pc=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,dc=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Rs=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ge=1e7,b=7,mc=9007199254740991,fc=Kr.length-1,bi=Qr.length-1,m={toStringTag:As};m.absoluteValue=m.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),h(e)};m.ceil=function(){return h(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(Le+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=gc(n,Fs(n,r)),n.precision=e,n.rounding=t,h(Me==2||Me==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(w=!1,o=c.s*j(c.s*c,1/3),!o||Math.abs(o)==1/0?(r=W(c.d),e=c.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=j(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=O(u.plus(c).times(a),u.plus(l),s+2,1),W(a.d).slice(0,s)===(r=W(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(h(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")&&(h(n,e+1,1),t=!n.times(n).times(n).eq(c));break}return w=!0,h(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 O(this,new this.constructor(e))};m.dividedToIntegerBy=m.divToInt=function(e){var t=this,r=t.constructor;return h(O(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 h(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/Wr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=yt(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 h(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=yt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Wr(5,e)),i=yt(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,h(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,O(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,w=!1,r=r.times(r).minus(1).sqrt().plus(r),w=!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,w=!1,r=r.times(r).plus(1).sqrt().plus(r),w=!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?h(new o(i),e,t,!0):(o.precision=r=n-i.e,i=O(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<=bi)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<=bi)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(w=!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(w=!1,a=p+f,s=Ne(u,a),n=t?Gr(c,a+10):Ne(e,a),l=O(s,n,a,1),Jt(l.d,i=p,d))do if(a+=10,s=Ne(u,a),n=t?Gr(c,a+10):Ne(e,a),l=O(s,n,a,1),!o){+W(l.d).slice(i+1,i+15)+1==1e14&&(l=h(l,p+1,0));break}while(Jt(l.d,i+=10,d));return w=!0,h(l,p,d)};m.minus=m.sub=function(e){var t,r,n,i,o,s,a,l,u,c,p,d,f=this,y=f.constructor;if(e=new y(e),!f.d||!e.d)return!f.s||!e.s?e=new y(NaN):f.d?e.s=-e.s:e=new y(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=y.precision,l=y.rounding,!u[0]||!d[0]){if(d[0])e.s=-e.s;else if(u[0])e=new y(f);else return new y(l===3?-0:0);return w?h(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=Hr(u,n),w?h(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(Le+e);return r.d?(t=Ms(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};m.round=function(){var e=this,t=e.constructor;return h(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=hc(n,Fs(n,r)),n.precision=e,n.rounding=t,h(Me>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(w=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=W(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(O(s,o,r+2,1)).times(.5),W(o.d).slice(0,r)===(t=W(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(h(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")&&(h(n,l+1,1),e=!n.times(n).eq(s));break}return w=!0,h(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=O(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,h(Me==2||Me==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=Hr(o,r),w?h(e,p.precision,p.rounding):e};m.toBinary=function(e,t){return Pi(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:(se(e,0,$e),t===void 0?t=n.rounding:se(t,0,8),h(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):(se(e,0,$e),t===void 0?t=i.rounding:se(t,0,8),n=h(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):(se(e,0,$e),t===void 0?t=o.rounding:se(t,0,8),n=h(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,y=f.d,g=f.constructor;if(!y)return new g(f);if(u=r=new g(1),n=l=new g(0),t=new g(n),o=t.e=Ms(y)-f.e-1,s=o%b,t.d[0]=j(10,s<0?b+s:s),e==null)e=o>0?t:u;else{if(a=new g(e),!a.isInt()||a.lt(u))throw Error(Le+a);e=a.gt(t)?o>0?t:u:a}for(w=!1,a=new g(W(y)),c=g.precision,g.precision=o=y.length*b*2;p=O(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=O(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=O(u,n,o,1).minus(f).abs().cmp(O(l,r,o,1).minus(f).abs())<1?[u,n]:[l,r],g.precision=c,w=!0,d};m.toHexadecimal=m.toHex=function(e,t){return Pi(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: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]?(w=!1,r=O(r,e,0,t,1).times(e),w=!0,h(r)):(e.s=r.s,r=e),r};m.toNumber=function(){return+this};m.toOctal=function(e,t){return Pi(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(j(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return h(a,n,o);if(t=ee(e.e/b),t>=e.d.length-1&&(r=u<0?-u:u)<=mc)return i=Ss(l,a,r,n),e.s<0?new l(1).div(i):h(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(w=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Ei(e.times(Ne(a,n+r)),n),i.d&&(i=h(i,n+5,1),Jt(i.d,n,o)&&(t=n+10,i=h(Ei(e.times(Ne(a,t+r)),t),t+5,1),+W(i.d).slice(n+1,n+15)+1==1e14&&(i=h(i,n+1,0)))),i.s=s,w=!0,l.rounding=o,h(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):(se(e,1,$e),t===void 0?t=i.rounding:se(t,0,8),n=h(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):(se(e,1,$e),t===void 0?t=n.rounding:se(t,0,8)),h(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 h(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 W(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(Le+e)}function Jt(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=j(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)==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 gc(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Wr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=yt(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 O=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,y,g,P,T,C,x,R,ce,J,Ke,$,z,Ae,Y,tt,hr=n.constructor,An=n.s==i.s?1:-1,Z=n.d,k=i.d;if(!Z||!Z[0]||!k||!k[0])return new hr(!n.s||!i.s||(Z?k&&Z[0]==k[0]:!k)?NaN:Z&&Z[0]==0||!k?An*0:An/0);for(l?(f=1,c=n.e-i.e):(l=ge,f=b,c=ee(n.e/f)-ee(i.e/f)),Y=k.length,z=Z.length,T=new hr(An),C=T.d=[],p=0;k[p]==(Z[p]||0);p++);if(k[p]>(Z[p]||0)&&c--,o==null?(J=o=hr.precision,s=hr.rounding):a?J=o+(n.e-i.e)+1:J=o,J<0)C.push(1),y=!0;else{if(J=J/f+2|0,p=0,Y==1){for(d=0,k=k[0],J++;(p1&&(k=e(k,d,l),Z=e(Z,d,l),Y=k.length,z=Z.length),$=Y,x=Z.slice(0,Y),R=x.length;R=l/2&&++Ae;do d=0,u=t(k,x,Y,R),u<0?(ce=x[0],Y!=R&&(ce=ce*l+(x[1]||0)),d=ce/Ae|0,d>1?(d>=l&&(d=l-1),g=e(k,d,l),P=g.length,R=x.length,u=t(g,x,P,R),u==1&&(d--,r(g,Y=10;d/=10)p++;T.e=p+c*f-1,h(T,a?o+T.e+1:o,s,y)}return T}}();function h(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/j(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/j(10,i-s-1)%10|0}if(n=n||t<0||p[d+1]!==void 0||(s<0?c:c%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?c/j(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]=j(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=j(10,b-o),p[d]=s>0?(c/j(10,i-s)%j(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 w&&(e.e>f.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 Hr(e,t){var r=e[0];for(t*=b;r>=10;r/=10)t++;return t}function Gr(e,t,r){if(t>fc)throw w=!0,r&&(e.precision=r),Error(Ts);return h(new e(Kr),t,1,!0)}function fe(e,t,r){if(t>bi)throw Error(Ts);return h(new e(Qr),t,r,!0)}function Ms(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 _e(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(w=!1;;){if(r%2&&(o=o.times(t),ws(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),ws(t.d,s)}return w=!0,o}function Es(e){return e.d[e.d.length-1]&1}function Is(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:0/0);for(t==null?(w=!1,l=y):l=t,a=new d(.03125);e.e>-2;)e=e.times(a),p+=5;for(n=Math.log(j(2,p))/Math.LN10*2+5|0,l+=n,r=o=s=new d(1),d.precision=l;;){if(o=h(o.times(e),l,1),r=r.times(++c),a=s.plus(O(o,r,l,1)),W(a.d).slice(0,l)===W(s.d).slice(0,l)){for(i=p;i--;)s=h(s.times(s),l,1);if(t==null)if(u<3&&Jt(s.d,l-n,f,u))d.precision=l+=10,r=o=a=new d(1),c=0,u++;else return h(s,d.precision=y,f,w=!0);else return d.precision=y,s}s=a}}function Ne(e,t){var r,n,i,o,s,a,l,u,c,p,d,f=1,y=10,g=e,P=g.d,T=g.constructor,C=T.rounding,x=T.precision;if(g.s<0||!P||!P[0]||!g.e&&P[0]==1&&P.length==1)return new T(P&&!P[0]?-1/0:g.s!=1?NaN:P?0:g);if(t==null?(w=!1,c=x):c=t,T.precision=c+=y,r=W(P),n=r.charAt(0),Math.abs(o=g.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)g=g.times(e),r=W(g.d),n=r.charAt(0),f++;o=g.e,n>1?(g=new T("0."+r),o++):g=new T(n+"."+r.slice(1))}else return u=Gr(T,c+2,x).times(o+""),g=Ne(new T(n+"."+r.slice(1)),c-y).plus(u),T.precision=x,t==null?h(g,x,C,w=!0):g;for(p=g,l=s=g=O(g.minus(1),g.plus(1),c,1),d=h(g.times(g),c,1),i=3;;){if(s=h(s.times(d),c,1),u=l.plus(O(s,new T(i),c,1)),W(u.d).slice(0,c)===W(l.d).slice(0,c))if(l=l.times(2),o!==0&&(l=l.plus(Gr(T,c+2,x).times(o+""))),l=O(l,new T(f),c,1),t==null)if(Jt(l.d,c-y,C,a))T.precision=c+=y,u=s=g=O(p.minus(1),p.plus(1),c,1),d=h(g.times(g),c,1),i=a=1;else return h(l,T.precision=x,C,w=!0);else return T.precision=x,l;l=u,i+=2}}function ks(e){return String(e.s*e.s/0)}function wi(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 wi(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(pc.test(t))r=16,t=t.toLowerCase();else if(cc.test(t))r=2;else if(dc.test(t))r=8;else throw Error(Le+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=Ur(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=Hr(u,c),e.d=u,w=!1,s&&(e=O(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?j(2,l):ze.pow(2,l))),w=!0,e)}function hc(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:yt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Wr(5,r)),t=yt(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 yt(e,t,r,n,i){var o,s,a,l,u=1,c=e.precision,p=Math.ceil(c/b);for(w=!1,l=r.times(r),a=new e(n);;){if(s=O(a.times(l),new e(t++*t++),c,1),a=i?n.plus(s):n.minus(s),n=O(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 w=!0,s.d.length=p+1,s}function Wr(e,t){for(var r=e;--t;)r*=e;return r}function Fs(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 Me=n?4:1,t;if(r=t.divToInt(i),r.isZero())Me=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Me=Es(r)?n?2:3:n?4:1,t;Me=Es(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Pi(e,t,r,n){var i,o,s,a,l,u,c,p,d,f=e.constructor,y=r!==void 0;if(y?(se(r,1,$e),n===void 0?n=f.rounding:se(n,0,8)):(r=f.precision,n=f.rounding),!e.isFinite())c=ks(e);else{for(c=we(e),s=c.indexOf("."),y?(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=Ur(we(d),10,i),d.e=d.d.length),p=Ur(c,10,i),o=l=p.length;p[--l]==0;)p.pop();if(!p[0])c=y?"0p+0":"0";else{if(s<0?o--:(e=new f(e),e.d=p,e.e=o,e=O(e,d,r,n,0,i),p=e.d,o=e.e,u=vs),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=Ur(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 xc(e){return new this(e).abs()}function bc(e){return new this(e).acos()}function Ec(e){return new this(e).acosh()}function wc(e,t){return new this(e).plus(t)}function Pc(e){return new this(e).asin()}function vc(e){return new this(e).asinh()}function Tc(e){return new this(e).atan()}function Cc(e){return new this(e).atanh()}function Ac(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(O(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(O(e,t,o,1)),r}function Rc(e){return new this(e).cbrt()}function Mc(e){return h(e=new this(e),e.e+1,2)}function Sc(e,t,r){return new this(e).clamp(t,r)}function Ic(e){if(!e||typeof e!="object")throw Error(Jr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,$e,"rounding",0,8,"toExpNeg",-gt,0,"toExpPos",0,gt,"maxE",0,gt,"minE",-gt,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Le+r+": "+n);if(r="crypto",i&&(this[r]=xi[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(Cs);else this[r]=!1;else throw Error(Le+r+": "+n);return this}function kc(e){return new this(e).cos()}function Fc(e){return new this(e).cosh()}function Os(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,Ps(o)){u.s=o.s,w?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;w?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(Cs);else for(;o=10;i/=10)n++;n`}};function xt(e){return e instanceof Ht}var zr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};var Yr=e=>e,Zr={bold:Yr,red:Yr,green:Yr,dim:Yr,enabled:!1},Ds={bold:ne,red:me,green:Ge,dim:Fe,enabled:!0},bt={write(e){e.writeLine(",")}};var ve=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 qe=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Et=class extends qe{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new zr(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 ve("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(bt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}};var _s=": ",Xr=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()+_s.length}write(t){let r=new ve(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(_s).write(this.value)}};var Q=class e extends qe{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 Et&&(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");if(r?.value instanceof e)return{kind:"select",value:r.value};let n=this.getField("include");if(n?.value instanceof e)return{kind:"include",value:n.value}}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)}writeEmpty(r){let n=new ve("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(bt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};var G=class extends qe{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new ve(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}};var vi=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 en(e){return new vi(Ns(e))}function Ns(e){let t=new Q;for(let[r,n]of Object.entries(e)){let i=new Xr(r,Ls(n));t.addField(i)}return t}function Ls(e){if(typeof e=="string")return new G(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new G(String(e));if(typeof e=="bigint")return new G(`${e}n`);if(e===null)return new G("null");if(e===void 0)return new G("undefined");if(ht(e))return new G(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new G(`Buffer.alloc(${e.byteLength})`):new G(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Br(e)?e.toISOString():"Invalid Date";return new G(`new Date("${t}")`)}return e instanceof xe?new G(`Prisma.${e._getName()}`):xt(e)?new G(`prisma.${lo(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?ip(e):typeof e=="object"?Ns(e):new G(Object.prototype.toString.call(e))}function ip(e){let t=new Et;for(let r of e)t.addItem(Ls(r));return t}function $s(e){if(e===void 0)return"";let t=en(e);return new mt(0,{colors:Zr}).write(t).toString()}var Wt="";function qs(e){var t=e.split(` -`);return t.reduce(function(r,n){var i=ap(n)||up(n)||dp(n)||yp(n)||fp(n);return i&&r.push(i),r},[])}var op=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,sp=/\((\S*)(?::(\d+))(?::(\d+))\)/;function ap(e){var t=op.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=sp.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]||Wt,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var lp=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function up(e){var t=lp.exec(e);return t?{file:t[2],methodName:t[1]||Wt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var cp=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,pp=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function dp(e){var t=cp.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=pp.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||Wt,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var mp=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function fp(e){var t=mp.exec(e);return t?{file:t[3],methodName:t[1]||Wt,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var gp=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function yp(e){var t=gp.exec(e);return t?{file:t[2],methodName:t[1]||Wt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Ti=class{getLocation(){return null}},Ci=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=qs(t).find(i=>{if(!i.file)return!1;let o=ni(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"?new Ti:new Ci}var Vs={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function wt(e={}){let t=xp(e);return Object.entries(t).reduce((n,[i,o])=>(Vs[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function xp(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function tn(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function js(e,t){let r=tn(e);return t({action:"aggregate",unpacker:r,argsMapper:wt})(e)}function bp(e={}){let{select:t,...r}=e;return typeof t=="object"?wt({...r,_count:t}):wt({...r,_count:{_all:!0}})}function Ep(e={}){return typeof e.select=="object"?t=>tn(e)(t)._count:t=>tn(e)(t)._count._all}function Bs(e,t){return t({action:"count",unpacker:Ep(e),argsMapper:bp})(e)}function wp(e={}){let t=wt(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 Pp(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Us(e,t){return t({action:"groupBy",unpacker:Pp(e),argsMapper:wp})(e)}function Ks(e,t,r){if(t==="aggregate")return n=>js(n,r);if(t==="count")return n=>Bs(n,r);if(t==="groupBy")return n=>Us(n,r)}function Qs(e,t){let r=t.fields.filter(i=>!i.relationName),n=ci(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 Ht(e,o,s.type,s.isList,s.kind==="enum")},...jr(Object.keys(n))})}var Gs=e=>Array.isArray(e)?e:e.split("."),Ai=(e,t)=>Gs(t).reduce((r,n)=>r&&r[n],e),Js=(e,t,r)=>Gs(t).reduceRight((n,i,o,s)=>Object.assign({},Ai(e,s.slice(0,o)),{[i]:n}),r);function vp(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Tp(e,t,r){return t===void 0?e??{}:Js(t,r,e||!0)}function Ri(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),c=vp(n,i),p=Tp(l,o,c),d=r({dataPath:c,callsite:u})(p),f=Cp(e,t);return new Proxy(d,{get(y,g){if(!f.includes(g))return y[g];let T=[a[g].type,r,g],C=[c,p];return Ri(e,...T,...C)},...jr([...f,...Object.getOwnPropertyNames(d)])})}}function Cp(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var Xs=S(ii());var Zs=S(require("fs"));var Hs={keyword:Oe,entity:Oe,value:e=>ne(ot(e)),punctuation:ot,directive:Oe,function:Oe,variable:e=>ne(ot(e)),string:e=>ne(Ge(e)),boolean:he,number:Oe,comment:Tr};var Ap=e=>e,rn={},Rp=0,v={manual:rn.Prism&&rn.Prism.manual,disableWorkerMessageHandler:rn.Prism&&rn.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof ye){let t=e;return new ye(t.type,v.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(v.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ae instanceof ye)continue;if(ce&&$!=t.length-1){C.lastIndex=z;var p=C.exec(e);if(!p)break;var c=p.index+(R?p[1].length:0),d=p.index+p[0].length,a=$,l=z;for(let k=t.length;a=l&&(++$,z=l);if(t[$]instanceof ye)continue;u=a-$,Ae=e.slice(z,l),p.index-=z}else{C.lastIndex=0;var p=C.exec(Ae),u=1}if(!p){if(o)break;continue}R&&(J=p[1]?p[1].length:0);var c=p.index+J,p=p[0].slice(J),d=c+p.length,f=Ae.slice(0,c),y=Ae.slice(d);let Y=[$,u];f&&(++$,z+=f.length,Y.push(f));let tt=new ye(g,x?v.tokenize(p,x):p,Ke,p,ce);if(Y.push(tt),y&&Y.push(y),Array.prototype.splice.apply(t,Y),u!=1&&v.matchGrammar(e,t,r,$,z,!0,g),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 v.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=v.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=v.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:ye};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 ye(e,t,r,n,i){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!i}ye.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return ye.stringify(r,t)}).join(""):Mp(e.type)(e.content)};function Mp(e){return Hs[e]||Ap}function Ws(e){return Sp(e,v.languages.javascript)}function Sp(e,t){return v.tokenize(e,t).map(n=>ye.stringify(n)).join("")}var zs=S(es());function Ys(e){return(0,zs.default)(e)}var nn=class e{static read(t){let r;try{r=Zs.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,Ys(n).split(` -`))}highlight(){let t=Ws(this.toString());return new e(this.firstLineNumber,t.split(` +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=>W(c)).join(", ")} in ${X(a)} and ${X(l)} +Env vars from ${X(l)} overwrite the ones from ${X(a)} + `;console.warn(`${Ie("warn(prisma)")} ${u}`)}}}}function Ho(e){if(Ju(e)){si(`Environment variables loaded from ${e}`);let t=ai.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:Wo(t),message:Ae(`Environment variables loaded from ${gt.default.relative(process.cwd(),e)}`),path:e}}else si(`Environment variables not found at ${e}`);return null}function Ko(e,t){return e&&t&>.default.resolve(e)===gt.default.resolve(t)}function Ju(e){return!!(e&&Jr.default.existsSync(e))}var zo="library";function Wt(e){let t=Wu();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":zo)}function Wu(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}var Ge;(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||={})})(Ge||={});var Ht=k(require("path"));function li(e){return Ht.default.sep===Ht.default.posix.sep?e:e.split(Ht.default.sep).join(Ht.default.posix.sep)}var rs=k(ui());function pi(e){return String(new ci(e))}var ci=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:Ku(t.binaryTargets)}));return`generator ${t.name} { +${(0,rs.default)(zu(n),2)} +}`}};function Ku(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 zu(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)} = ${Yu(n)}`).join(` +`)}function Yu(e){return JSON.parse(JSON.stringify(e,(t,r)=>Array.isArray(r)?`[${r.map(n=>JSON.stringify(n)).join(", ")}]`:JSON.stringify(r)))}var zt={};qt(zt,{error:()=>ec,info:()=>Xu,log:()=>Zu,query:()=>tc,should:()=>ns,tags:()=>Kt,warn:()=>di});var Kt={error:ce("prisma:error"),warn:Ie("prisma:warn"),info:Oe("prisma:info"),query:et("prisma:query")},ns={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Zu(...e){console.log(...e)}function di(e,...t){ns.warn()&&console.warn(`${Kt.warn} ${e}`,...t)}function Xu(e,...t){console.info(`${Kt.info} ${e}`,...t)}function ec(e,...t){console.error(`${Kt.error} ${e}`,...t)}function tc(e,...t){console.log(`${Kt.query} ${e}`,...t)}function Wr(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 De(e,t){throw new Error(t)}function fi(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var gi=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});function ht(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function hi(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{ls.has(e)||(ls.add(e),di(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 _e=class extends V{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};w(_e,"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 H=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};w(H,"PrismaClientValidationError");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})}};function Zt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function us(e,t){let r=Zt(()=>nc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function nc(e){return{datamodel:{models:yi(e.models),enums:yi(e.enums),types:yi(e.types)}}}function yi(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}var zr=Symbol(),bi=new WeakMap,Le=class{constructor(t){t===zr?bi.set(this,`Prisma.${this._getName()}`):bi.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return bi.get(this)}},Xt=class extends Le{_getNamespace(){return"NullTypes"}},er=class extends Xt{};Ei(er,"DbNull");var tr=class extends Xt{};Ei(tr,"JsonNull");var rr=class extends Xt{};Ei(rr,"AnyNull");var Yr={classes:{DbNull:er,JsonNull:tr,AnyNull:rr},instances:{DbNull:new er(zr),JsonNull:new tr(zr),AnyNull:new rr(zr)}};function Ei(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}function nr(e){return{ok:!1,error:e,map(){return nr(e)},flatMap(){return nr(e)}}}var wi=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}},xi=e=>{let t=new wi,r=rt(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:rt(t,e.queryRaw.bind(e)),executeRaw:rt(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>ic(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=oc(t,e.getConnectionInfo.bind(e))),n},ic=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:rt(e,t.queryRaw.bind(t)),executeRaw:rt(e,t.executeRaw.bind(t)),commit:rt(e,t.commit.bind(t)),rollback:rt(e,t.rollback.bind(t))});function rt(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return nr({kind:"GenericJs",id:i})}}}function oc(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return nr({kind:"GenericJs",id:i})}}}var Dl=k(ei());var _l=require("async_hooks"),Ll=require("events"),Fl=k(require("fs")),Or=k(require("path"));var ie=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 Zr={enumerable:!0,configurable:!0,writable:!0};function Xr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Zr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var ds=Symbol.for("nodejs.util.inspect.custom");function xe(e,t){let r=sc(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=ms(Reflect.ownKeys(o),r),a=ms(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?{...Zr,...l?.getPropertyDescriptor(s)}:Zr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[ds]=function(){let o={...this};return delete o[ds],o},i}function sc(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 ms(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}function bt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function Et(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}var wt=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}};function fs(e){return e.substring(0,1).toLowerCase()+e.substring(1)}function xt(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function en(e){return e.toString()!=="Invalid Date"}var Pt=9e15,He=1e9,Ti="0123456789abcdef",rn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",nn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ri={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Pt,maxE:Pt,crypto:!1},bs,Fe,x=!0,sn="[DecimalError] ",We=sn+"Invalid argument: ",Es=sn+"Precision limit exceeded",ws=sn+"crypto unavailable",xs="[object Decimal]",ee=Math.floor,G=Math.pow,ac=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,lc=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,uc=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ps=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ge=1e7,b=7,cc=9007199254740991,pc=rn.length-1,Ci=nn.length-1,m={toStringTag:xs};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(We+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=dc(n,Ss(n,r)),n.precision=e,n.rounding=t,y(Fe==2||Fe==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/ln(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=vt(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=vt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/ln(5,e)),i=vt(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<=Ci)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<=Ci)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=Je(u,a),n=t?on(c,a+10):Je(e,a),l=N(s,n,a,1),or(l.d,i=p,d))do if(a+=10,s=Je(u,a),n=t?on(c,a+10):Je(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(or(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=an(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(We+e);return r.d?(t=vs(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=fc(n,Ss(n,r)),n.precision=e,n.rounding=t,y(Fe>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(Fe==2||Fe==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=an(o,r),x?y(e,p.precision,p.rounding):e};m.toBinary=function(e,t){return Ii(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:(oe(e,0,He),t===void 0?t=n.rounding:oe(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=Pe(n,!0):(oe(e,0,He),t===void 0?t=i.rounding:oe(t,0,8),n=y(new i(n),e+1,t),r=Pe(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=Pe(i):(oe(e,0,He),t===void 0?t=o.rounding:oe(t,0,8),n=y(new o(i),e+i.e+1,t),r=Pe(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=vs(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(We+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 Ii(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:oe(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 Ii(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)<=cc)return i=Ts(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=Si(e.times(Je(a,n+r)),n),i.d&&(i=y(i,n+5,1),or(i.d,n,o)&&(t=n+10,i=y(Si(e.times(Je(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=Pe(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(oe(e,1,He),t===void 0?t=i.rounding:oe(t,0,8),n=y(new i(n),e,t),r=Pe(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):(oe(e,1,He),t===void 0?t=n.rounding:oe(t,0,8)),y(new n(r),e,t)};m.toString=function(){var e=this,t=e.constructor,r=Pe(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=Pe(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(We+e)}function or(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 tn(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 dc(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/ln(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=vt(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,$t,U,ne,Se,z,pt,kr=n.constructor,Ln=n.s==i.s?1:-1,Y=n.d,_=i.d;if(!Y||!Y[0]||!_||!_[0])return new kr(!n.s||!i.s||(Y?_&&Y[0]==_[0]:!_)?NaN:Y&&Y[0]==0||!_?Ln*0:Ln/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 kr(Ln),S=T.d=[],p=0;_[p]==(Y[p]||0);p++);if(_[p]>(Y[p]||0)&&c--,o==null?(ae=o=kr.precision,s=kr.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&&++Se;do d=0,u=t(_,C,z,E),u<0?(me=C[0],z!=E&&(me=me*l+(C[1]||0)),d=me/Se|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)+Qe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Qe(-i-1)+o,r&&(n=r-s)>0&&(o+=Qe(n))):i>=s?(o+=Qe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Qe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Qe(n))),o}function an(e,t){var r=e[0];for(t*=b;r>=10;r/=10)t++;return t}function on(e,t,r){if(t>pc)throw x=!0,r&&(e.precision=r),Error(Es);return y(new e(rn),t,1,!0)}function fe(e,t,r){if(t>Ci)throw Error(Es);return y(new e(nn),t,r,!0)}function vs(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 Qe(e){for(var t="";e--;)t+="0";return t}function Ts(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),hs(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),hs(t.d,s)}return x=!0,o}function gs(e){return e.d[e.d.length-1]&1}function Rs(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&&or(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 Je(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=on(T,c+2,C).times(o+""),h=Je(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(on(T,c+2,C).times(o+""))),l=N(l,new T(f),c,1),t==null)if(or(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 Cs(e){return String(e.s*e.s/0)}function Ai(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"),Ps.test(t))return Ai(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(lc.test(t))r=16,t=t.toLowerCase();else if(ac.test(t))r=2;else if(uc.test(t))r=8;else throw Error(We+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=Ts(n,new n(r),o,o*2)),u=tn(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=an(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 fc(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:vt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/ln(5,r)),t=vt(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 vt(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 ln(e,t){for(var r=e;--t;)r*=e;return r}function Ss(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 Fe=n?4:1,t;if(r=t.divToInt(i),r.isZero())Fe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Fe=gs(r)?n?2:3:n?4:1,t;Fe=gs(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Ii(e,t,r,n){var i,o,s,a,l,u,c,p,d,f=e.constructor,g=r!==void 0;if(g?(oe(r,1,He),n===void 0?n=f.rounding:oe(n,0,8)):(r=f.precision,n=f.rounding),!e.isFinite())c=Cs(e);else{for(c=Pe(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=tn(Pe(d),10,i),d.e=d.d.length),p=tn(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=bs),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=tn(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 gc(e){return new this(e).abs()}function hc(e){return new this(e).acos()}function yc(e){return new this(e).acosh()}function bc(e,t){return new this(e).plus(t)}function Ec(e){return new this(e).asin()}function wc(e){return new this(e).asinh()}function xc(e){return new this(e).atan()}function Pc(e){return new this(e).atanh()}function vc(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 Tc(e){return new this(e).cbrt()}function Rc(e){return y(e=new this(e),e.e+1,2)}function Cc(e,t,r){return new this(e).clamp(t,r)}function Sc(e){if(!e||typeof e!="object")throw Error(sn+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,He,"rounding",0,8,"toExpNeg",-Pt,0,"toExpPos",0,Pt,"maxE",0,Pt,"minE",-Pt,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(We+r+": "+n);if(r="crypto",i&&(this[r]=Ri[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(ws);else this[r]=!1;else throw Error(We+r+": "+n);return this}function Ac(e){return new this(e).cos()}function Ic(e){return new this(e).cosh()}function As(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,ys(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(ws);else for(;o=10;i/=10)n++;n`}};function Rt(e){return e instanceof sr}var un=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};var cn=e=>e,pn={bold:cn,red:cn,green:cn,dim:cn,enabled:!1},Is={bold:W,red:ce,green:Me,dim:Ae,enabled:!0},Ct={write(e){e.writeLine(",")}};var Te=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 Ke=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var St=class extends Ke{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new un(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 Te("[]");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 Os=": ",dn=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()+Os.length}write(t){let r=new Te(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Os).write(this.value)}};var At=class e extends Ke{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 Te("{}");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 J=class extends Ke{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Te(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var Oi=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 It(e){return new Oi(ks(e))}function ks(e){let t=new At;for(let[r,n]of Object.entries(e)){let i=new dn(r,Ds(n));t.addField(i)}return t}function Ds(e){if(typeof e=="string")return new J(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new J(String(e));if(typeof e=="bigint")return new J(`${e}n`);if(e===null)return new J("null");if(e===void 0)return new J("undefined");if(Tt(e))return new J(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new J(`Buffer.alloc(${e.byteLength})`):new J(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=en(e)?e.toISOString():"Invalid Date";return new J(`new Date("${t}")`)}return e instanceof Le?new J(`Prisma.${e._getName()}`):Rt(e)?new J(`prisma.${fs(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?tp(e):typeof e=="object"?ks(e):new J(Object.prototype.toString.call(e))}function tp(e){let t=new St;for(let r of e)t.addItem(Ds(r));return t}function mn(e,t){let r=t==="pretty"?Is:pn,n=e.renderAllMessages(r),i=new wt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function _s(e){if(e===void 0)return"";let t=It(e);return new wt(0,{colors:pn}).write(t).toString()}var rp="P2037";function ot({error:e,user_facing_error:t},r,n){return t.error_code?new V(np(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 np(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===rp&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}var ar="";function Ls(e){var t=e.split(` +`);return t.reduce(function(r,n){var i=sp(n)||lp(n)||pp(n)||gp(n)||mp(n);return i&&r.push(i),r},[])}var ip=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,op=/\((\S*)(?::(\d+))(?::(\d+))\)/;function sp(e){var t=ip.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=op.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]||ar,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var ap=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function lp(e){var t=ap.exec(e);return t?{file:t[2],methodName:t[1]||ar,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var up=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,cp=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function pp(e){var t=up.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=cp.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||ar,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var dp=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function mp(e){var t=dp.exec(e);return t?{file:t[3],methodName:t[1]||ar,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var fp=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function gp(e){var t=fp.exec(e);return t?{file:t[2],methodName:t[1]||ar,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var ki=class{getLocation(){return null}},Di=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=Ls(t).find(i=>{if(!i.file)return!1;let o=li(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 ki:new Di}var Fs={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Ot(e={}){let t=yp(e);return Object.entries(t).reduce((n,[i,o])=>(Fs[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function yp(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function fn(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Ns(e,t){let r=fn(e);return t({action:"aggregate",unpacker:r,argsMapper:Ot})(e)}function bp(e={}){let{select:t,...r}=e;return typeof t=="object"?Ot({...r,_count:t}):Ot({...r,_count:{_all:!0}})}function Ep(e={}){return typeof e.select=="object"?t=>fn(e)(t)._count:t=>fn(e)(t)._count._all}function Ms(e,t){return t({action:"count",unpacker:Ep(e),argsMapper:bp})(e)}function wp(e={}){let t=Ot(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 xp(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function $s(e,t){return t({action:"groupBy",unpacker:xp(e),argsMapper:wp})(e)}function qs(e,t,r){if(t==="aggregate")return n=>Ns(n,r);if(t==="count")return n=>Ms(n,r);if(t==="groupBy")return n=>$s(n,r)}function js(e,t){let r=t.fields.filter(i=>!i.relationName),n=gi(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")},...Xr(Object.keys(n))})}var Vs=e=>Array.isArray(e)?e:e.split("."),_i=(e,t)=>Vs(t).reduce((r,n)=>r&&r[n],e),Bs=(e,t,r)=>Vs(t).reduceRight((n,i,o,s)=>Object.assign({},_i(e,s.slice(0,o)),{[i]:n}),r);function Pp(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function vp(e,t,r){return t===void 0?e??{}:Bs(t,r,e||!0)}function Li(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=Pp(n,i),p=vp(l,o,c),d=r({dataPath:c,callsite:u})(p),f=Tp(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 Li(e,...T,...S)},...Xr([...f,...Object.getOwnPropertyNames(d)])})}}function Tp(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var Hs=k(ui());var Ws=k(require("fs"));var Us={keyword:Oe,entity:Oe,value:e=>W(et(e)),punctuation:et,directive:Oe,function:Oe,variable:e=>W(et(e)),string:e=>W(Me(e)),boolean:Ie,number:Oe,comment:jt};var Rp=e=>e,gn={},Cp=0,P={manual:gn.Prism&&gn.Prism.manual,disableWorkerMessageHandler:gn.Prism&&gn.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(Se 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,Se=e.slice(ne,l),p.index-=ne}else{S.lastIndex=0;var p=S.exec(Se),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=Se.slice(0,c),g=Se.slice(d);let z=[U,u];f&&(++U,ne+=f.length,z.push(f));let pt=new he(h,C?P.tokenize(p,C):p,$t,p,me);if(z.push(pt),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(""):Sp(e.type)(e.content)};function Sp(e){return Us[e]||Rp}function Gs(e){return Ap(e,P.languages.javascript)}function Ap(e,t){return P.tokenize(e,t).map(n=>he.stringify(n)).join("")}var Qs=k(es());function Js(e){return(0,Qs.default)(e)}var hn=class e{static read(t){let r;try{r=Ws.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,Js(n).split(` +`))}highlight(){let t=Gs(this.toString());return new e(this.firstLineNumber,t.split(` `))}toString(){return this.lines.join(` -`)}};var Ip={red:me,gray:Tr,dim:Fe,bold:ne,underline:te,highlightSource:e=>e.highlight()},kp={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Fp({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s={functionName:`prisma.${r}()`,message:t,isPanic:n??!1,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=nn.read(a.fileName)?.slice(l,a.lineNumber),c=u?.lineAt(a.lineNumber);if(u&&c){let p=Dp(c),d=Op(c);if(!d)return s;s.functionName=`${d.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,y=>y.slice(0,d.openingBraceIndex))),u=o.highlightSource(u);let f=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((y,g)=>o.gray(String(g).padStart(f))+" "+y).mapLines(y=>o.dim(y)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let y=p+f+1;y+=2,s.callArguments=(0,Xs.default)(i,y).slice(y)}}return s}function Op(e){let t=Object.keys(pe.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 Dp(e){let t=0;for(let r=0;r{if("rejectOnNotFound"in n.args){let o=Pt({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new X(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof U&&o.code==="P2025"?new Re(`No ${e} found`,t):o})}}function Te(e){return e.replace(/^./,t=>t.toLowerCase())}var $p=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],qp=["aggregate","count","groupBy"];function Mi(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Vp(e,t),Bp(e,t),Qt(r),re("name",()=>t),re("$name",()=>t),re("$parent",()=>e._appliedParent)];return Ee({},n)}function Vp(e,t){let r=Te(t),n=Object.keys(pe.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=ea(o,t,e._clientVersion,s);let a=l=>u=>{let c=Ve(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 $p.includes(o)?Ri(e,t,a):jp(i)?Ks(e,i,a):a({})}}}function jp(e){return qp.includes(e)}function Bp(e,t){return We(re("fields",()=>{let r=e._runtimeDataModel.models[t];return Qs(t,r)}))}function ta(e){return e.replace(/^./,t=>t.toUpperCase())}var Si=Symbol();function zt(e){let t=[Up(e),re(Si,()=>e),re("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Qt(r)),Ee(e,t)}function Up(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Te),n=[...new Set(t.concat(r))];return We({getKeys(){return n},getPropertyValue(i){let o=ta(i);if(e._runtimeDataModel.models[o]!==void 0)return Mi(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Mi(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function on(e){return e[Si]?e[Si]:e}function ra(e){if(typeof e=="function")return e(this);let t=on(this),r=Object.create(t,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return zt(r)}function na({result:e,modelName:t,select:r,extensions:n}){let i=n.getAllComputedFields(t);if(!i)return e;let o=[],s=[];for(let a of Object.values(i)){if(r){if(!r[a.name])continue;let l=a.needs.filter(u=>!r[u]);l.length>0&&s.push(Gt(l))}Kp(e,a.needs)&&o.push(Qp(a,Ee(e,o)))}return o.length>0||s.length>0?Ee(e,[...o,...s]):e}function Kp(e,t){return t.every(r=>ui(e,r))}function Qp(e,t){return We(re(e.name,()=>e.compute(t)))}function sn({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]=sn({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function oa({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:sn({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(s,a,l)=>na({result:s,modelName:Te(a),select:l.select,extensions:n})})}function sa(e){if(e instanceof oe)return Gp(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:sa(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=da(o,l),a.args=s,la(e,a,r,n+1)}})})}function ua(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 ca(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?pa(r,n,0,e):e(r)}}function pa(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=da(i,l),pa(a,t,r+1,n)}})}var aa=e=>e;function da(e=aa,t=aa){return r=>e(t(r))}function fa(e,t,r){let n=Te(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Jp({...e,...ma(t.name,e,t.result.$allModels),...ma(t.name,e,t.result[n])})}function Jp(e){let t=new be,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 pt(e,n=>({...n,needs:r(n.name,new Set)}))}function ma(e,t,r){return r?pt(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Hp(t,o,i)})):{}}function Hp(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function ga(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}var an=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new be;this.modelExtensionsCache=new be;this.queryCallbacksCache=new be;this.clientExtensions=Vt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Vt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>fa(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()}},ln=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new an(t))}isEmpty(){return this.head===void 0}append(t){return new e(new an(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 ya=D("prisma:client"),ha={Vercel:"vercel","Netlify CI":"netlify"};function xa({postinstall:e,ciName:t,clientVersion:r}){if(ya("checkPlatformCaching:postinstall",e),ya("checkPlatformCaching:ciName",t),e===!0&&t&&t in ha){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. +`)}};var Ip={red:ce,gray:jt,dim:Ae,bold:W,underline:X,highlightSource:e=>e.highlight()},Op={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function kp({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Dp({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=kp({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=hn.read(a.fileName)?.slice(l,a.lineNumber),c=u?.lineAt(a.lineNumber);if(u&&c){let p=Lp(c),d=_p(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,Hs.default)(i,g).slice(g)}}return s}function _p(e){let t=Object.keys(Ge.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 Lp(e){let t=0;for(let r=0;r{if("rejectOnNotFound"in n.args){let o=kt({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 V&&o.code==="P2025"?new _e(`No ${e} found`,t):o})}}function Re(e){return e.replace(/^./,t=>t.toLowerCase())}var $p=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],qp=["aggregate","count","groupBy"];function Fi(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[jp(e,t),Bp(e,t),ir(r),re("name",()=>t),re("$name",()=>t),re("$parent",()=>e._appliedParent)];return xe({},n)}function jp(e,t){let r=Re(t),n=Object.keys(Ge.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=Ks(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 $p.includes(o)?Li(e,t,a):Vp(i)?qs(e,i,a):a({})}}}function Vp(e){return qp.includes(e)}function Bp(e,t){return nt(re("fields",()=>{let r=e._runtimeDataModel.models[t];return js(t,r)}))}function zs(e){return e.replace(/^./,t=>t.toUpperCase())}var Ni=Symbol();function lr(e){let t=[Up(e),re(Ni,()=>e),re("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(ir(r)),xe(e,t)}function Up(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Re),n=[...new Set(t.concat(r))];return nt({getKeys(){return n},getPropertyValue(i){let o=zs(i);if(e._runtimeDataModel.models[o]!==void 0)return Fi(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Fi(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Ys(e){return e[Ni]?e[Ni]:e}function Zs(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 lr(t)}function Xs({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(bt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(c=>!r[c]);u.length>0&&a.push(bt(u))}Gp(e,l.needs)&&s.push(Qp(l,xe(e,s)))}return s.length>0||a.length>0?xe(e,[...s,...a]):e}function Gp(e,t){return t.every(r=>fi(e,r))}function Qp(e,t){return nt(re(e.name,()=>e.compute(t)))}function yn({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]=yn({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function ta({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:yn({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let c=Re(l);return Xs({result:a,modelName:c,select:u.select,omit:u.select?void 0:{...o?.[c],...u.omit},extensions:n})}})}function ra(e){if(e instanceof ie)return Jp(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:ra(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=la(o,l),a.args=s,ia(e,a,r,n+1)}})})}function oa(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 ia(e,t,s)}function sa(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?aa(r,n,0,e):e(r)}}function aa(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=la(i,l),aa(a,t,r+1,n)}})}var na=e=>e;function la(e=na,t=na){return r=>e(t(r))}function ca(e,t,r){let n=Re(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Wp({...e,...ua(t.name,e,t.result.$allModels),...ua(t.name,e,t.result[n])})}function Wp(e){let t=new we,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 ht(e,n=>({...n,needs:r(n.name,new Set)}))}function ua(e,t,r){return r?ht(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Hp(t,o,i)})):{}}function Hp(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function pa(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 da(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 bn=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new we;this.modelExtensionsCache=new we;this.queryCallbacksCache=new we;this.clientExtensions=Zt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Zt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>ca(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Re(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()}},En=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new bn(t))}isEmpty(){return this.head===void 0}append(t){return new e(new bn(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 ma=F("prisma:client"),fa={Vercel:"vercel","Netlify CI":"netlify"};function ga({postinstall:e,ciName:t,clientVersion:r}){if(ma("checkPlatformCaching:postinstall",e),ma("checkPlatformCaching:ciName",t),e===!0&&t&&t in fa){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/${ha[t]}-build`;throw console.error(n),new F(n,r)}}function ba(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}function Zt({error:e,user_facing_error:t},r){return t.error_code?new U(t.message,{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new K(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}var vt=class{};var Ta=S(require("fs")),Xt=S(require("path"));function un(e){let{runtimeBinaryTarget:t}=e;return`Add "${t}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: +Learn how: https://pris.ly/d/${fa[t]}-build`;throw console.error(n),new R(n,r)}}function ha(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}var Kp="Cloudflare-Workers",zp="node";function ya(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Kp?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===zp?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Yp={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 wn(){let e=ya();return{id:e,prettyName:Yp[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var Pa=k(require("fs")),cr=k(require("path"));function xn(e){let{runtimeBinaryTarget:t}=e;return`Add "${t}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: -${Wp(e)}`}function Wp(e){let{generator:t,generatorBinaryTargets:r,runtimeBinaryTarget:n}=e,i={fromEnvVar:null,value:n},o=[...r,i];return si({...t,binaryTargets:o})}function je(e){let{runtimeBinaryTarget:t}=e;return`Prisma Client could not locate the Query Engine for runtime "${t}".`}function Be(e){let{searchedLocations:t}=e;return`The following locations have been searched: +${Zp(e)}`}function Zp(e){let{generator:t,generatorBinaryTargets:r,runtimeBinaryTarget:n}=e,i={fromEnvVar:null,value:n},o=[...r,i];return pi({...t,binaryTargets:o})}function Ye(e){let{runtimeBinaryTarget:t}=e;return`Prisma Client could not locate the Query Engine for runtime "${t}".`}function Ze(e){let{searchedLocations:t}=e;return`The following locations have been searched: ${[...new Set(t)].map(i=>` ${i}`).join(` -`)}`}function Ea(e){let{runtimeBinaryTarget:t}=e;return`${je(e)} +`)}`}function ba(e){let{runtimeBinaryTarget:t}=e;return`${Ye(e)} This happened because \`binaryTargets\` have been pinned, but the actual deployment also required "${t}". -${un(e)} +${xn(e)} -${Be(e)}`}function cn(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 wa(e){let{queryEngineName:t}=e;return`${je(e)} +${Ze(e)}`}function Pn(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 vn(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 Ea(e){let{queryEngineName:t}=e;return`${Ye(e)}${vn(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}". -${cn("engine-not-found-bundler-investigation")} +${Pn("engine-not-found-bundler-investigation")} -${Be(e)}`}function Pa(e){let{runtimeBinaryTarget:t,generatorBinaryTargets:r}=e,n=r.find(i=>i.native);return`${je(e)} +${Ze(e)}`}function wa(e){let{runtimeBinaryTarget:t,generatorBinaryTargets:r}=e,n=r.find(i=>i.native);return`${Ye(e)} This happened because Prisma Client was generated for "${n?.value??"unknown"}", but the actual deployment required "${t}". -${un(e)} +${xn(e)} -${Be(e)}`}function va(e){let{queryEngineName:t}=e;return`${je(e)} +${Ze(e)}`}function xa(e){let{queryEngineName:t}=e;return`${Ye(e)}${vn(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}". -${cn("engine-not-found-tooling-investigation")} +${Pn("engine-not-found-tooling-investigation")} -${Be(e)}`}var zp=D("prisma:client:engines:resolveEnginePath"),Yp=()=>new RegExp("runtime[\\\\/]library\\.m?js$");async function Ca(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 Zp(e,t);if(zp("enginePath",n),n!==void 0&&e==="binary"&&ti(n),n!==void 0)return t.prismaPath=n;let o=await ut(),s=t.generator?.binaryTargets??[],a=s.some(d=>d.native),l=!s.some(d=>d.value===o),u=__filename.match(Yp())===null,c={searchedLocations:i,generatorBinaryTargets:s,generator:t.generator,runtimeBinaryTarget:o,queryEngineName:Aa(e,o),expectedLocation:Xt.default.relative(process.cwd(),t.dirname)},p;throw a&&l?p=Pa(c):l?p=Ea(c):u?p=wa(c):p=va(c),new F(p,t.clientVersion)}async function Zp(engineType,config){let binaryTarget=await ut(),searchedLocations=[],dirname=eval("__dirname"),searchLocations=[config.dirname,Xt.default.resolve(dirname,".."),config.generator?.output?.value??dirname,Xt.default.resolve(dirname,"../../../.prisma/client"),"/tmp/prisma-engines",config.cwd];__filename.includes("resolveEnginePath")&&searchLocations.push(rs());for(let e of searchLocations){let t=Aa(engineType,binaryTarget),r=Xt.default.join(e,t);if(searchedLocations.push(e),Ta.default.existsSync(r))return{enginePath:r,searchedLocations}}return{enginePath:void 0,searchedLocations}}function Aa(e,t){return e==="library"?jn(t,"fs"):`query-engine-${t}${t==="windows"?".exe":""}`}function pn(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}var Ii=S(li());function Ra(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}function Ma(e){return e.split(` +${Ze(e)}`}var Xp=F("prisma:client:engines:resolveEnginePath"),ed=()=>new RegExp("runtime[\\\\/]library\\.m?js$");async function va(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 td(e,t);if(Xp("enginePath",n),n!==void 0&&e==="binary"&&ni(n),n!==void 0)return t.prismaPath=n;let o=await tt(),s=t.generator?.binaryTargets??[],a=s.some(d=>d.native),l=!s.some(d=>d.value===o),u=__filename.match(ed())===null,c={searchedLocations:i,generatorBinaryTargets:s,generator:t.generator,runtimeBinaryTarget:o,queryEngineName:Ta(e,o),expectedLocation:cr.default.relative(process.cwd(),t.dirname),errorStack:new Error().stack},p;throw a&&l?p=wa(c):l?p=ba(c):u?p=Ea(c):p=xa(c),new R(p,t.clientVersion)}async function td(engineType,config){let binaryTarget=await tt(),searchedLocations=[],dirname=eval("__dirname"),searchLocations=[config.dirname,cr.default.resolve(dirname,".."),config.generator?.output?.value??dirname,cr.default.resolve(dirname,"../../../.prisma/client"),"/tmp/prisma-engines",config.cwd];__filename.includes("resolveEnginePath")&&searchLocations.push(Bo());for(let e of searchLocations){let t=Ta(engineType,binaryTarget),r=cr.default.join(e,t);if(searchedLocations.push(e),Pa.default.existsSync(r))return{enginePath:r,searchedLocations}}return{enginePath:void 0,searchedLocations}}function Ta(e,t){return e==="library"?Fr(t,"fs"):`query-engine-${t}${t==="windows"?".exe":""}`}var Mi=k(mi());function Ra(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}function Ca(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 Sa=S(cs());function Ia({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.md",body:i}){return(0,Sa.default)({user:t,repo:r,template:n,title:e,body:i})}function ka({version:e,platform:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=bo(6e3-(s?.length??0)),l=Ma((0,Ii.default)(a)),u=n?`# Description +`)}var Sa=k(as());function Aa({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,Sa.default)({user:t,repo:r,template:n,title:e,body:i})}function Ia({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=bo(6e3-(s?.length??0)),l=Ca((0,Mi.default)(a)),u=n?`# Description \`\`\` ${n} -\`\`\``:"",c=(0,Ii.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: +\`\`\``:"",c=(0,Mi.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: ## Versions | Name | Version | @@ -99,34 +97,38 @@ ${l} \`\`\` ${s?Ra(s):""} \`\`\` -`),p=Ia({title:r,body:c});return`${r} +`),p=Aa({title:r,body:c});return`${r} This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. -${te(p)} +${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 dn({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 F(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new F("error: Missing URL environment variable, value, or override.",n);return i}var mn=class extends Error{constructor(r,n){super(r);this.clientVersion=n.clientVersion,this.cause=n.cause}get[Symbol.toStringTag](){return this.name}};var ae=class extends mn{constructor(r,n){super(r,n);this.isRetryable=n.isRetryable??!0}};function M(e,t){return{...e,isRetryable:t}}var Tt=class extends ae{constructor(r){super("This request must be retried",M(r,!0));this.name="ForcedRetryError";this.code="P5001"}};E(Tt,"ForcedRetryError");var Ye=class extends ae{constructor(r,n){super(r,M(n,!1));this.name="InvalidDatasourceError";this.code="P5002"}};E(Ye,"InvalidDatasourceError");var Ze=class extends ae{constructor(r,n){super(r,M(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};E(Ze,"NotImplementedYetError");var L=class extends ae{constructor(r,n){super(r,n);this.response=n.response;let i=this.response.headers.get("prisma-request-id");if(i){let o=`(The request id was: ${i})`;this.message=this.message+" "+o}}};var Xe=class extends L{constructor(r){super("Schema needs to be uploaded",M(r,!0));this.name="SchemaMissingError";this.code="P5005"}};E(Xe,"SchemaMissingError");var ki="This request could not be understood by the server",er=class extends L{constructor(r,n,i){super(n||ki,M(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};E(er,"BadRequestError");var tr=class extends L{constructor(r,n){super("Engine not started: healthcheck timeout",M(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};E(tr,"HealthcheckTimeoutError");var rr=class extends L{constructor(r,n,i){super(n,M(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};E(rr,"EngineStartupError");var nr=class extends L{constructor(r){super("Engine version is not supported",M(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};E(nr,"EngineVersionNotSupportedError");var Fi="Request timed out",ir=class extends L{constructor(r,n=Fi){super(n,M(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};E(ir,"GatewayTimeoutError");var Xp="Interactive transaction error",or=class extends L{constructor(r,n=Xp){super(n,M(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};E(or,"InteractiveTransactionError");var ed="Request parameters are invalid",sr=class extends L{constructor(r,n=ed){super(n,M(r,!1));this.name="InvalidRequestError";this.code="P5011"}};E(sr,"InvalidRequestError");var Oi="Requested resource does not exist",ar=class extends L{constructor(r,n=Oi){super(n,M(r,!1));this.name="NotFoundError";this.code="P5003"}};E(ar,"NotFoundError");var Di="Unknown server error",Ct=class extends L{constructor(r,n,i){super(n||Di,M(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};E(Ct,"ServerError");var _i="Unauthorized, check your connection string",lr=class extends L{constructor(r,n=_i){super(n,M(r,!1));this.name="UnauthorizedError";this.code="P5007"}};E(lr,"UnauthorizedError");var Ni="Usage exceeded, retry again later",ur=class extends L{constructor(r,n=Ni){super(n,M(r,!0));this.name="UsageExceededError";this.code="P5008"}};E(ur,"UsageExceededError");async function td(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 cr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await td(e);if(n.type==="QueryEngineError")throw new U(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Ct(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Xe(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new nr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new rr(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new F(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new tr(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 or(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new sr(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new lr(r,At(_i,n));if(e.status===404)return new ar(r,At(Oi,n));if(e.status===429)throw new ur(r,At(Ni,n));if(e.status===504)throw new ir(r,At(Fi,n));if(e.status>=500)throw new Ct(r,At(Di,n));if(e.status>=400)throw new er(r,At(ki,n))}function At(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}function Fa(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))}function Oa(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new F("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)}var Da={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*","@swc/core":"1.3.75","@swc/jest":"0.2.29","@types/jest":"29.5.5","@types/node":"18.18.0",execa:"5.1.1",jest:"29.7.0",typescript:"5.2.2"};var pr=class extends ae{constructor(r,n){super(`Cannot fetch data from service: -${r}`,M(n,!0));this.name="RequestError";this.code="P5010"}};E(pr,"RequestError");async function et(e,t,r=n=>n){let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(Li)(e,t)}catch(i){console.log(e);let o=i.message??"Unknown error";throw new pr(o,{clientVersion:n})}}function nd(e){return{...e.headers,"Content-Type":"application/json"}}function id(e){return{method:e.method,headers:nd(e)}}function od(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 $i(t.headers)}}async function Li(e,t={}){let r=sd("https"),n=id(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(Li(`${o}${p}`,t)):s(Li(p,t))),u.on("data",d=>i.push(d)),u.on("end",()=>s(od(i,u))),u.on("error",a)});l.on("error",a),l.end(t.body??"")})}var sd=typeof require<"u"?require:()=>{},$i=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 ad=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,_a=D("prisma:client:dataproxyEngine");async function ld(e,t){let r=Da["@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&&ad.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=ud(`<=${a}.${l}.${u}`),p=await et(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();_a("length of body fetched from unpkg.com",d.length);let f;try{f=JSON.parse(d)}catch(y){throw console.error("JSON.parse error: body fetched from unpkg.com: ",d),y}return f.version}throw new Ze("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Na(e,t){let r=await ld(e,t);return _a("version",r),r}function ud(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var La=3,qi=D("prisma:client:dataproxyEngine"),Vi=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`};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 extends vt{constructor(r){super();Oa(r),this.config=r,this.env={...this.config.env,...process.env},this.inlineSchema=r.inlineSchema??"",this.inlineDatasources=r.inlineDatasources??{},this.inlineSchemaHash=r.inlineSchemaHash??"",this.clientVersion=r.clientVersion??"unknown",this.logEmitter=r.logEmitter,this.tracingHelper=this.config.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return"unknown"}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[r,n]=this.extractHostAndApiKey();this.host=r,this.headerBuilder=new Vi({apiKey:n,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries}),this.remoteClientVersion=await Na(r,this.config),qi("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(r){r?.logs?.length&&r.logs.forEach(n=>{switch(n.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let i=typeof n.attributes.query=="string"?n.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[o]=i.split("/* traceparent");i=o}this.logEmitter.emit("query",{query:i,timestamp:n.timestamp,duration:n.attributes.duration_ms,params:n.attributes.params,target:n.attributes.target})}}}),r?.traces?.length&&this.tracingHelper.createEngineSpan({span:!0,spans:r.traces})}on(r,n){if(r==="beforeExit")throw new Error('"beforeExit" hook is not applicable to the remote query engine');this.logEmitter.on(r,n)}async url(r){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${r}`}async uploadSchema(){let r={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(r,async()=>{let n=await et(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});n.ok||qi("schema response status",n.status);let i=await cr(n,this.clientVersion);if(i)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${i.message}`}),i;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`})})}request(r,{traceparent:n,interactiveTransaction:i,customDataProxyFetch:o}){return this.requestInternal({body:r,traceparent:n,interactiveTransaction:i,customDataProxyFetch:o})}async requestBatch(r,{traceparent:n,transaction:i,customDataProxyFetch:o}){let s=i?.kind==="itx"?i.options:void 0,a=pn(r,i),{batchResult:l,elapsed:u}=await this.requestInternal({body:a,customDataProxyFetch:o,interactiveTransaction:s,traceparent:n});return l.map(c=>"errors"in c&&c.errors.length>0?Zt(c.errors[0],this.clientVersion):{data:c,elapsed:u})}requestInternal({body:r,traceparent:n,customDataProxyFetch:i,interactiveTransaction:o}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:s})=>{let a=o?`${o.payload.endpoint}/graphql`:await this.url("graphql");s(a);let l=await et(a,{method:"POST",headers:this.headerBuilder.build({traceparent:n,interactiveTransaction:o}),body:JSON.stringify(r),clientVersion:this.clientVersion},i);l.ok||qi("graphql response status",l.status),await this.handleError(await cr(l,this.clientVersion));let u=await l.json(),c=u.extensions;if(c&&this.propagateResponseExtensions(c),u.errors)throw u.errors.length===1?Zt(u.errors[0],this.config.clientVersion):new K(u.errors,{clientVersion:this.config.clientVersion});return u}})}async transaction(r,n,i){let o={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${o[r]} transaction`,callback:async({logHttpCall:s})=>{if(r==="start"){let a=JSON.stringify({max_wait:i?.maxWait??2e3,timeout:i?.timeout??5e3,isolation_level:i?.isolationLevel}),l=await this.url("transaction/start");s(l);let u=await et(l,{method:"POST",headers:this.headerBuilder.build({traceparent:n.traceparent}),body:a,clientVersion:this.clientVersion});await this.handleError(await cr(u,this.clientVersion));let c=await u.json(),p=c.extensions;p&&this.propagateResponseExtensions(p);let d=c.id,f=c["data-proxy"].endpoint;return{id:d,payload:{endpoint:f}}}else{let a=`${i.payload.endpoint}/${r}`;s(a);let l=await et(a,{method:"POST",headers:this.headerBuilder.build({traceparent:n.traceparent}),clientVersion:this.clientVersion});await this.handleError(await cr(l,this.clientVersion));let c=(await l.json()).extensions;c&&this.propagateResponseExtensions(c);return}}})}extractHostAndApiKey(){let r={clientVersion:this.clientVersion},n=Object.keys(this.inlineDatasources)[0],i=dn({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),o;try{o=new URL(i)}catch{throw new Ye(`Error validating datasource \`${n}\`: the URL must start with the protocol \`prisma://\``,r)}let{protocol:s,host:a,searchParams:l}=o;if(s!=="prisma:")throw new Ye(`Error validating datasource \`${n}\`: the URL must start with the protocol \`prisma://\``,r);let u=l.get("api_key");if(u===null||u.length<1)throw new Ye(`Error validating datasource \`${n}\`: the URL must contain a valid API key`,r);return[a,u]}metrics(){throw new Ze("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(r){for(let n=0;;n++){let i=o=>{this.logEmitter.emit("info",{message:`Calling ${o} (n=${n})`})};try{return await r.callback({logHttpCall:i})}catch(o){if(!(o instanceof ae)||!o.isRetryable)throw o;if(n>=La)throw o instanceof Tt?o.cause:o;this.logEmitter.emit("warn",{message:`Attempt ${n+1}/${La} failed for ${r.actionGerund}: ${o.message??"(unknown)"}`});let s=await Fa(n);this.logEmitter.emit("warn",{message:`Retrying after ${s}ms`})}}}async handleError(r){if(r instanceof Xe)throw await this.uploadSchema(),new Tt({clientVersion:this.clientVersion,cause:r});if(r)throw r}};var Ba=S(require("fs"));function $a(e){if(e?.kind==="itx")return e.options.id}var Bi=S(require("os")),qa=S(require("path"));var ji=Symbol("PrismaLibraryEngineCache");function cd(){let e=globalThis;return e[ji]===void 0&&(e[ji]={}),e[ji]}function pd(e){let t=cd();if(t[e]!==void 0)return t[e];let r=qa.default.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=Bi.default.constants.dlopen.RTLD_LAZY|Bi.default.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,r,i),t[e]=n.exports,n.exports}var fn=class{constructor(t){this.config=t}async loadLibrary(){let t=await Jn(),r=await Ca("library",this.config);try{return this.config.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>pd(r))}catch(n){let i=ri({e:n,platformInfo:t,id:r});throw new F(i,this.config.clientVersion)}}};var dd="P2036",Ce=D("prisma:client:libraryEngine");function md(e){return e.item_type==="query"&&"query"in e}function fd(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var Va=[...Hn,"native"],ja=0,mr=class extends vt{constructor(r,n=new fn(r)){super();try{this.datamodel=Ba.default.readFileSync(r.datamodelPath,"utf-8")}catch(s){throw s.stack.match(/\/\.next|\/next@|\/next\//)?new F(`Your schema.prisma could not be found, and we detected that you are using Next.js. -Find out why and learn how to fix this: https://pris.ly/d/schema-not-found-nextjs`,r.clientVersion):r.isBundled===!0?new F("Prisma Client could not find its `schema.prisma`. This is likely caused by a bundling step, which leads to `schema.prisma` not being copied near the resulting bundle. We would appreciate if you could take the time to share some information with us.\nPlease help us by answering a few questions: https://pris.ly/bundler-investigation-error",r.clientVersion):s}this.config=r,this.libraryStarted=!1,this.logQueries=r.logQueries??!1,this.logLevel=r.logLevel??"error",this.libraryLoader=n,this.logEmitter=r.logEmitter,r.enableDebugLogs&&(this.logLevel="debug");let i=Object.keys(r.overrideDatasources)[0],o=r.overrideDatasources[i]?.url;i!==void 0&&o!==void 0&&(this.datasourceOverrides={[i]:o}),this.libraryInstantiationPromise=this.instantiateLibrary(),this.checkForTooManyEngines()}checkForTooManyEngines(){ja===10&&console.warn(`${he("warn(prisma-client)")} This is the 10th instance of Prisma Client being started. Make sure this is intentional.`)}async transaction(r,n,i){await this.start();let o=JSON.stringify(n),s;if(r==="start"){let l=JSON.stringify({max_wait:i?.maxWait??2e3,timeout:i?.timeout??5e3,isolation_level:i?.isolationLevel});s=await this.engine?.startTransaction(l,o)}else r==="commit"?s=await this.engine?.commitTransaction(i.id,o):r==="rollback"&&(s=await this.engine?.rollbackTransaction(i.id,o));let a=this.parseEngineResponse(s);if(a.error_code)throw new U(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta});return a}async instantiateLibrary(){if(Ce("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;Vn(),this.platform=await this.getPlatform(),await this.loadEngine(),this.version()}async getPlatform(){if(this.platform)return this.platform;let r=await ut();if(!Va.includes(r))throw new F(`Unknown ${me("PRISMA_QUERY_ENGINE_LIBRARY")} ${me(ne(r))}. Possible binaryTargets: ${Ge(Va.join(", "))} or a path to the query engine library. -You may have to run ${Ge("prisma generate")} for your changes to take effect.`,this.config.clientVersion);return r}parseEngineResponse(r){if(!r)throw new K("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(r)}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.QueryEngineConstructor=this.library.QueryEngine);try{let r=new WeakRef(this),{adapter:n}=this.config;n&&Ce("Using driver adapter: %O",n),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"},i=>{r.deref()?.logger(i)},n),ja++}catch(r){let n=r,i=this.parseInitError(n.message);throw typeof i=="string"?n:new F(i.message,this.config.clientVersion,i.error_code)}}}logger(r){let n=this.parseEngineResponse(r);if(n){if("span"in n){this.config.tracingHelper.createEngineSpan(n);return}n.level=n?.level.toLowerCase()??"unknown",md(n)?this.logEmitter.emit("query",{timestamp:new Date,query:n.query,params:n.params,duration:Number(n.duration_ms),target:n.module_path}):fd(n)?this.loggerRustPanic=new ue(this.getErrorMessageWithLink(`${n.message}: ${n.reason} in ${n.file}:${n.line}:${n.column}`),this.config.clientVersion):this.logEmitter.emit(n.level,{timestamp:new Date,message:n.message,target:n.module_path})}}getErrorMessageWithLink(r){return ka({platform:this.platform,title:r,version:this.config.clientVersion,engineVersion:this.versionInfo?.commit,database:this.config.activeProvider,query:this.lastQuery})}parseInitError(r){try{return JSON.parse(r)}catch{}return r}parseRequestError(r){try{return JSON.parse(r)}catch{}return r}on(r,n){if(r==="beforeExit")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.');this.logEmitter.on(r,n)}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Ce(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let r=async()=>{Ce("library starting");try{let n={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(n)),this.libraryStarted=!0,Ce("library started")}catch(n){let i=this.parseInitError(n.message);throw typeof i=="string"?n:new F(i.message,this.config.clientVersion,i.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.config.tracingHelper.runInChildSpan("connect",r),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Ce("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let r=async()=>{await new Promise(i=>setTimeout(i,5)),Ce("library stopping");let n={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(n)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Ce("library stopped")};return this.libraryStoppingPromise=this.config.tracingHelper.runInChildSpan("disconnect",r),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(r){return this.library?.debugPanic(r)}async request(r,{traceparent:n,interactiveTransaction:i}){Ce(`sending request, this.libraryStarted: ${this.libraryStarted}`);let o=JSON.stringify({traceparent:n}),s=JSON.stringify(r);try{await this.start(),this.executingQueryPromise=this.engine?.query(s,o,i?.id),this.lastQuery=s;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0]):new K(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a,elapsed:0}}catch(a){if(a instanceof F)throw a;if(a.code==="GenericFailure"&&a.message?.startsWith("PANIC:"))throw new ue(this.getErrorMessageWithLink(a.message),this.config.clientVersion);let l=this.parseRequestError(a.message);throw typeof l=="string"?a:new K(`${l.message} -${l.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(r,{transaction:n,traceparent:i}){Ce("requestBatch");let o=pn(r,n);await this.start(),this.lastQuery=JSON.stringify(o),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:i}),$a(n));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0]):new K(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:l,errors:u}=a;if(Array.isArray(l))return l.map(c=>c.errors&&c.errors.length>0?this.loggerRustPanic??this.buildQueryError(c.errors[0]):{data:c,elapsed:0});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(a))}buildQueryError(r){if(r.user_facing_error.is_panic)return new ue(this.getErrorMessageWithLink(r.user_facing_error.message),this.config.clientVersion);if(r.user_facing_error.error_code===dd&&this.config.adapter){let n=r.user_facing_error.meta?.id;_r(typeof n=="number","Malformed external JS error received from the engine");let i=this.config.adapter.errorRegistry.consumeError(n);return _r(i,"External error with reported id was not registered"),i.error}return Zt(r,this.config.clientVersion)}async metrics(r){await this.start();let n=await this.engine.metrics(JSON.stringify(r));return r.format==="prometheus"?n:this.parseEngineResponse(n)}};function Ua(e,t){let r;try{r=dn({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...process.env},clientVersion:t.clientVersion})}catch{}e.noEngine!==!0&&r?.startsWith("prisma://")&&qt("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=Zn(t.generator);if(r?.startsWith("prisma://")||e.noEngine)return new dr(t);if(n==="library")return new mr(t);throw"binary",new X("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}function gn({generator:e}){return e?.previewFeatures??[]}var Wa=S(Ui());function Ja(e,t){let r=Ha(e),n=gd(r),i=hd(n);i?yn(i,t):t.addErrorMessage(()=>"Unknown error")}function Ha(e){return e.errors.flatMap(t=>t.kind==="Union"?Ha(t):[t])}function gd(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:yd(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function yd(e,t){return[...new Set(e.concat(t))]}function hd(e){return pi(e,(t,r)=>{let n=Qa(t),i=Qa(r);return n!==i?n-i:Ga(t)-Ga(r)})}function Qa(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Ga(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}var Se=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 hn=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(bt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function yn(e,t){switch(e.kind){case"IncludeAndSelect":xd(e,t);break;case"IncludeOnScalar":bd(e,t);break;case"EmptySelection":Ed(e,t);break;case"UnknownSelectionField":wd(e,t);break;case"UnknownArgument":Pd(e,t);break;case"UnknownInputField":vd(e,t);break;case"RequiredArgumentMissing":Td(e,t);break;case"InvalidArgumentType":Cd(e,t);break;case"InvalidArgumentValue":Ad(e,t);break;case"ValueTooLarge":Rd(e,t);break;case"SomeFieldsMissing":Md(e,t);break;case"TooManyFieldsGiven":Sd(e,t);break;case"Union":Ja(e,t);break;default:throw new Error("not implemented: "+e.kind)}}function xd(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath);r&&r instanceof Q&&(r.getField("include")?.markAsError(),r.getField("select")?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green("`include`")} or ${n.green("`select`")}, but ${n.red("not both")} at the same time.`)}function bd(e,t){let[r,n]=xn(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 Se(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)}. ${fr(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Ed(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Za(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${fr(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function wd(e,t){let[r,n]=xn(e.selectionPath),i=t.arguments.getDeepSelectionParent(r);i&&(i.value.getField(n)?.markAsError(),Za(i.value,e.outputType)),t.addErrorMessage(o=>{let s=[`Unknown field ${o.red(`\`${n}\``)}`];return i&&s.push(`for ${o.bold(i.kind)} statement`),s.push(`on model ${o.bold(`\`${e.outputType.name}\``)}.`),s.push(fr(o)),s.join(" ")})}function Pd(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof Q&&(n.getField(r)?.markAsError(),Id(n,e.arguments)),t.addErrorMessage(i=>za(i,r,e.arguments.map(o=>o.name)))}function vd(e,t){let[r,n]=xn(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(i instanceof Q){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r);o instanceof Q&&Xa(o,e.inputType)}t.addErrorMessage(o=>za(o,n,e.inputType.fields.map(s=>s.name)))}function za(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Fd(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(fr(e)),n.join(" ")}function Td(e,t){let r;t.addErrorMessage(l=>r?.value instanceof G&&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);if(!(n instanceof Q))return;let[i,o]=xn(e.argumentPath),s=new hn,a=n.getDeepFieldValue(i);if(a instanceof Q)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 Se(o,s).makeRequired())}else{let l=e.inputTypes.map(Ya).join(" | ");a.addSuggestion(new Se(o,l).makeRequired())}}function Ya(e){return e.kind==="list"?`${Ya(e.elementType)}[]`:e.name}function Cd(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof Q&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=bn("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 Ad(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath);n instanceof Q&&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=bn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Rd(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath),i;if(n instanceof Q){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof G&&(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 Md(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath);if(n instanceof Q){let i=n.getDeepFieldValue(e.argumentPath);i instanceof Q&&Xa(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")} ${bn("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(fr(i)),o.join(" ")})}function Sd(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath),i=[];if(n instanceof Q){let o=n.getDeepFieldValue(e.argumentPath);o instanceof Q&&(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 ${bn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Za(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new Se(r.name,"true"))}function Id(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new Se(r.name,r.typeNames.join(" | ")))}function Xa(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new Se(r.name,r.typeNames.join(" | ")))}function xn(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function fr({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function bn(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var kd=3;function Fd(e,t){let r=1/0,n;for(let i of t){let o=(0,Wa.default)(e,i);o>kd||o({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.model?.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)})}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};var nl=e=>({command:e});var il=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);function gr(e){try{return ol(e,"fast")}catch{return ol(e,"slow")}}function ol(e,t){return JSON.stringify(e.map(r=>jd(r,t)))}function jd(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:ft(e)?{prisma__type:"date",prisma__value:e.toJSON()}:Pe.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Bd(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?al(e):e}function Bd(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function al(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(sl);let t={};for(let r of Object.keys(e))t[r]=sl(e[r]);return t}function sl(e){return typeof e=="bigint"?e.toString():al(e)}var Ud=/^(\s*alter\s)/i,ll=D("prisma:client");function Gi(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Ud.exec(t))throw new Error(`Running ALTER using ${n} is not supported +`}function Dt({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 Tn=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 Tn{constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};function A(e,t){return{...e,isRetryable:t}}var _t=class extends se{constructor(r){super("This request must be retried",A(r,!0));this.name="ForcedRetryError";this.code="P5001"}};w(_t,"ForcedRetryError");var st=class extends se{constructor(r,n){super(r,A(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};w(st,"InvalidDatasourceError");var at=class extends se{constructor(r,n){super(r,A(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};w(at,"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 lt=class extends q{constructor(r){super("Schema needs to be uploaded",A(r,!0));this.name="SchemaMissingError";this.code="P5005"}};w(lt,"SchemaMissingError");var $i="This request could not be understood by the server",pr=class extends q{constructor(r,n,i){super(n||$i,A(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};w(pr,"BadRequestError");var dr=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(dr,"HealthcheckTimeoutError");var mr=class extends q{constructor(r,n,i){super(n,A(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};w(mr,"EngineStartupError");var fr=class extends q{constructor(r){super("Engine version is not supported",A(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};w(fr,"EngineVersionNotSupportedError");var qi="Request timed out",gr=class extends q{constructor(r,n=qi){super(n,A(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};w(gr,"GatewayTimeoutError");var rd="Interactive transaction error",hr=class extends q{constructor(r,n=rd){super(n,A(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};w(hr,"InteractiveTransactionError");var nd="Request parameters are invalid",yr=class extends q{constructor(r,n=nd){super(n,A(r,!1));this.name="InvalidRequestError";this.code="P5011"}};w(yr,"InvalidRequestError");var ji="Requested resource does not exist",br=class extends q{constructor(r,n=ji){super(n,A(r,!1));this.name="NotFoundError";this.code="P5003"}};w(br,"NotFoundError");var Vi="Unknown server error",Lt=class extends q{constructor(r,n,i){super(n||Vi,A(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};w(Lt,"ServerError");var Bi="Unauthorized, check your connection string",Er=class extends q{constructor(r,n=Bi){super(n,A(r,!1));this.name="UnauthorizedError";this.code="P5007"}};w(Er,"UnauthorizedError");var Ui="Usage exceeded, retry again later",wr=class extends q{constructor(r,n=Ui){super(n,A(r,!0));this.name="UsageExceededError";this.code="P5008"}};w(wr,"UsageExceededError");async function id(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 xr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await id(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 Lt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new lt(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new fr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new mr(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 dr(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 hr(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new yr(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Er(r,Ft(Bi,n));if(e.status===404)return new br(r,Ft(ji,n));if(e.status===429)throw new wr(r,Ft(Ui,n));if(e.status===504)throw new gr(r,Ft(qi,n));if(e.status>=500)throw new Lt(r,Ft(Vi,n));if(e.status>=400)throw new pr(r,Ft($i,n))}function Ft(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}function Oa(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 Ne="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function ka(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+=Ne[s]+Ne[a]+Ne[l]+Ne[u];return i==1?(c=t[o],s=(c&252)>>2,a=(c&3)<<4,r+=Ne[s]+Ne[a]+"=="):i==2&&(c=t[o]<<8|t[o+1],s=(c&64512)>>10,a=(c&1008)>>4,l=(c&15)<<2,r+=Ne[s]+Ne[a]+Ne[l]+"="),r}function Da(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 od(e){return e[0]*1e3+e[1]/1e6}function _a(e){return new Date(od(e))}var La={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var Pr=class extends se{constructor(r,n){super(`Cannot fetch data from service: +${r}`,A(n,!0));this.name="RequestError";this.code="P5010"}};w(Pr,"RequestError");async function ut(e,t,r=n=>n){let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(Gi)(e,t)}catch(i){let o=i.message??"Unknown error";throw new Pr(o,{clientVersion:n})}}function ad(e){return{...e.headers,"Content-Type":"application/json"}}function ld(e){return{method:e.method,headers:ad(e)}}function ud(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 Qi(t.headers)}}async function Gi(e,t={}){let r=cd("https"),n=ld(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(Gi(`${o}${p}`,t)):s(Gi(p,t))),u.on("data",d=>i.push(d)),u.on("end",()=>s(ud(i,u))),u.on("error",a)});l.on("error",a),l.end(t.body??"")})}var cd=typeof require<"u"?require:()=>{},Qi=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 pd=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Fa=F("prisma:client:dataproxyEngine");async function dd(e,t){let r=La["@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&&pd.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=md(`<=${a}.${l}.${u}`),p=await ut(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();Fa("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 at("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Na(e,t){let r=await dd(e,t);return Fa("version",r),r}function md(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Ma=3,Ji=F("prisma:client:dataproxyEngine"),Wi=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}},vr=class{constructor(t){this.name="DataProxyEngine";Da(t),this.config=t,this.env={...t.env,...typeof process<"u"?process.env:{}},this.inlineSchema=ka(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 Wi({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Na(t,this.config),Ji("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:_a(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 ut(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Ji("schema response status",r.status);let n=await xr(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=Et(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?ot(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 ut(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Ji("graphql response status",a.status),await this.handleError(await xr(a,this.clientVersion));let l=await a.json(),u=l.extensions;if(u&&this.propagateResponseExtensions(u),l.errors)throw l.errors.length===1?ot(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 ut(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await xr(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 ut(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await xr(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=Dt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new st(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:")throw new st(`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 st(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,l]}metrics(){throw new at("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>=Ma)throw i instanceof _t?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Ma} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Oa(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof lt)throw await this.uploadSchema(),new _t({clientVersion:this.clientVersion,cause:t});if(t)throw t}applyPendingMigrations(){throw new Error("Method not implemented.")}};function $a(e){if(e?.kind==="itx")return e.options.id}var Ki=k(require("os")),qa=k(require("path"));var Hi=Symbol("PrismaLibraryEngineCache");function fd(){let e=globalThis;return e[Hi]===void 0&&(e[Hi]={}),e[Hi]}function gd(e){let t=fd();if(t[e]!==void 0)return t[e];let r=qa.default.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=Ki.default.constants.dlopen.RTLD_LAZY|Ki.default.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,r,i),t[e]=n.exports,n.exports}var ja={async loadLibrary(e){let t=await Jn(),r=await va("library",e);try{return e.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>gd(r))}catch(n){let i=ii({e:n,platformInfo:t,id:r});throw new R(i,e.clientVersion)}}};var zi,Va={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 (${wn().prettyName})`,t);if(n===void 0)throw new R("WASM engine was unexpectedly `undefined`",t);zi===void 0&&(zi=(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 zi;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var hd="P2036",Ce=F("prisma:client:libraryEngine");function yd(e){return e.item_type==="query"&&"query"in e}function bd(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var Ba=[...Vn,"native"],Tr=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=r??ja,t.engineWasm!==void 0&&(this.libraryLoader=r??Va),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(Ed(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(Ce("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;jn(),this.binaryTarget=await this.getCurrentBinaryTarget(),await this.loadEngine(),this.version()}async getCurrentBinaryTarget(){{if(this.binaryTarget)return this.binaryTarget;let t=await tt();if(!Ba.includes(t))throw new R(`Unknown ${ce("PRISMA_QUERY_ENGINE_LIBRARY")} ${ce(W(t))}. Possible binaryTargets: ${Me(Ba.join(", "))} or a path to the query engine library. +You may have to run ${Me("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&&Ce("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",yd(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):bd(r)?this.loggerRustPanic=new le(Yi(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 Ce(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Ce("library starting");try{let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,Ce("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 Ce("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),Ce("library stopping");let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Ce("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}){Ce(`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(Yi(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}){Ce("requestBatch");let i=Et(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),$a(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(Yi(this,t.user_facing_error.message),this.config.clientVersion);let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:ot(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===hd&&this.config.adapter){let r=t.meta?.id;Wr(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return Wr(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 Ed(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function Yi(e,t){return Ia({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function Ua({copyEngine:e=!0},t){let r;try{r=Dt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...process.env},clientVersion:t.clientVersion})}catch{}e&&r?.startsWith("prisma://")&&Yt("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=Wt(t.generator),i=!!(r?.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o&&!1){let l;throw e?r?.startsWith("prisma://")?l=["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."]:l=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:l=["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(l.join(` +`),{clientVersion:t.clientVersion})}if(i)return new vr(t);if(s)return new Tr(t);throw new H("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}function Rn({generator:e}){return e?.previewFeatures??[]}function Nt(e){return e.substring(0,1).toLowerCase()+e.substring(1)}var Ka=k(Zi());function Wa(e,t,r){let n=Ha(e),i=wd(n),o=Pd(i);o?Cn(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Ha(e){return e.errors.flatMap(t=>t.kind==="Union"?Ha(t):[t])}function wd(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:xd(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function xd(e,t){return[...new Set(e.concat(t))]}function Pd(e){return hi(e,(t,r)=>{let n=Qa(t),i=Qa(r);return n!==i?n-i:Ja(t)-Ja(r)})}function Qa(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Ja(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 Rr=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 Cn(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":vd(e,t);break;case"IncludeOnScalar":Td(e,t);break;case"EmptySelection":Rd(e,t,r);break;case"UnknownSelectionField":Id(e,t);break;case"UnknownArgument":Od(e,t);break;case"UnknownInputField":kd(e,t);break;case"RequiredArgumentMissing":Dd(e,t);break;case"InvalidArgumentType":_d(e,t);break;case"InvalidArgumentValue":Ld(e,t);break;case"ValueTooLarge":Fd(e,t);break;case"SomeFieldsMissing":Nd(e,t);break;case"TooManyFieldsGiven":Md(e,t);break;case"Union":Wa(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function vd(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 Td(e,t){let[r,n]=Cr(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)}. ${Sr(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Rd(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Cd(e,t,i);return}if(n.hasField("select")){Sd(e,t);return}}if(r?.[Nt(e.outputType.name)]){Ad(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Cd(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 Sd(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Za(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Sr(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Ad(e,t){let r=new Rr;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]=Cr(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 Id(e,t){let[r,n]=Cr(e.selectionPath),i=t.arguments.getDeepSubSelectionValue(r)?.asObject(),o;if(i){let s=i.getFieldValue("select")?.asObject(),a=i.getFieldValue("include")?.asObject(),l=i.getFieldValue("omit")?.asObject();s?.hasField(n)?(o="select",s.getField(n)?.markAsError(),Za(s,e.outputType)):a?.hasField(n)?(o="include",a.getField(n)?.markAsError(),$d(a,e.outputType)):l?.hasField(n)&&(o="omit",l.getField(n)?.markAsError(),qd(l,e.outputType))}t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(Sr(s)),a.join(" ")})}function Od(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),jd(n,e.arguments)),t.addErrorMessage(i=>za(i,r,e.arguments.map(o=>o.name)))}function kd(e,t){let[r,n]=Cr(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Xa(o,e.inputType)}t.addErrorMessage(o=>za(o,n,e.inputType.fields.map(s=>s.name)))}function za(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Bd(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Sr(e)),n.join(" ")}function Dd(e,t){let r;t.addErrorMessage(l=>r?.value instanceof J&&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]=Cr(e.argumentPath),s=new Rr,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(Ya).join(" | ");a.addSuggestion(new ue(o,l).makeRequired())}}function Ya(e){return e.kind==="list"?`${Ya(e.elementType)}[]`:e.name}function _d(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=Sn("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 Ld(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=Sn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Fd(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 J&&(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 Nd(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&&Xa(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")} ${Sn("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(Sr(i)),o.join(" ")})}function Md(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 ${Sn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Za(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ue(r.name,"true"))}function $d(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ue(r.name,"true"))}function qd(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ue(r.name,"true"))}function jd(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ue(r.name,r.typeNames.join(" | ")))}function Xa(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 Cr(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Sr({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Sn(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Vd=3;function Bd(e,t){let r=1/0,n;for(let i of t){let o=(0,Ka.default)(e,i);o>Vd||o({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:De(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};var nl=e=>({command:e});var il=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);function Ir(e){try{return ol(e,"fast")}catch{return ol(e,"slow")}}function ol(e,t){return JSON.stringify(e.map(r=>Zd(r,t)))}function Zd(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:xt(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ve.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Xd(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?al(e):e}function Xd(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function al(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(sl);let t={};for(let r of Object.keys(e))t[r]=sl(e[r]);return t}function sl(e){return typeof e=="bigint"?e.toString():al(e)}var em=/^(\s*alter\s)/i,ll=F("prisma:client");function eo(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 Ji=({clientMethod:e,activeProvider:t,activeProviderFlavour:r})=>n=>{r!==void 0&&(t=r);let i="",o;if(Array.isArray(n)){let[s,...a]=n;i=s,o={values:gr(a||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{i=n.sql,o={values:gr(n.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{i=n.text,o={values:gr(n.values),__prismaRawParameters__:!0};break}case"sqlserver":{i=il(n),o={values:gr(n.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return o?.values?ll(`prisma.${e}(${i}, ${o.values})`):ll(`prisma.${e}(${i})`),{query:i,parameters:o}},ul={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 Hi(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??(n=pl(r(o))):pl(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 pl(e){return typeof e.then=="function"?e:Promise.resolve(e)}var dl={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Wi=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??dl}};function ml(e){return e.includes("tracing")?new Wi:dl}function fl(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}var Kd=["$connect","$disconnect","$on","$transaction","$use","$extends"],zi=Kd;function gl(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 wn=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 hl=S(li());function Pn(e){return typeof e.batchRequestIdx=="number"}function vn(e){return e===null?e:Array.isArray(e)?e.map(vn):typeof e=="object"?Qd(e)?Gd(e):pt(e,vn):e}function Qd(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Gd({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new Pe(t);case"Json":return JSON.parse(t);default:He(t,"Unknown tagged value")}}function yl(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Yi(e.query.arguments)),t.push(Yi(e.query.selection)),t.join("")}function Yi(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Yi(n)})`:r}).join(" ")})`}var Jd={aggregate:!1,aggregateRaw:!1,createMany:!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 Zi(e){return Jd[e]}var Tn=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;i{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(p=>p.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(p=>Zi(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Wd(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"?xl(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Zi(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:yl(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}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s})}}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}){if(Hd(t),zd(t,i)||t instanceof Re)throw t;if(t instanceof U&&Yd(t)){let a=bl(t.meta);En({args:o,errors:[a],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion})}let s=t.message;throw n&&(s=Pt({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:s})),s=this.sanitizeMessage(s),t.code?new U(s,{code:t.code,clientVersion:this.client._clientVersion,meta:t.meta,batchRequestIdx:t.batchRequestIdx}):t.isPanic?new ue(s,this.client._clientVersion):t instanceof K?new K(s,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx}):t instanceof F?new F(s,this.client._clientVersion):t instanceof ue?new ue(s,this.client._clientVersion):(t.clientVersion=this.client._clientVersion,t)}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,hl.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.values(t)[0],o=r.filter(a=>a!=="select"&&a!=="include"),s=vn(Ai(i,o));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function Wd(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:xl(e)};He(e,"Unknown transaction kind")}}function xl(e){return{id:e.id,payload:e.payload}}function zd(e,t){return Pn(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Yd(e){return e.code==="P2009"||e.code==="P2012"}function bl(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(bl)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}var El="5.4.2";var wl=El;function Pl(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=vl(t[n]);return r})}function vl({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return Buffer.from(t,"base64");case"decimal":return new Pe(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map(vl);default:return t}}var Rl=S(Ui());var q=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};E(q,"PrismaClientConstructorValidationError");var Tl=["datasources","datasourceUrl","errorFormat","adapter","log","__internal"],Cl=["pretty","colorless","minimal"],Al=["info","query","warn","error"],Xd={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new q(`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=Rt(r,t)||` Available datasources: ${t.join(", ")}`;throw new q(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new q(`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 q(`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 q(`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 q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!gn(t).includes("driverAdapters"))throw new q('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new q(`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 q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Cl.includes(e)){let t=Rt(e,Cl);throw new q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Al.includes(r)){let n=Rt(r,Al);throw new q(`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=Rt(i,o);throw new q(`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 q(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},__internal:e=>{if(!e)return;let t=["debug","hooks","engine","measurePerformance"];if(typeof e!="object")throw new q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Rt(r,t);throw new q(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Ml(e,t){for(let[r,n]of Object.entries(e)){if(!Tl.includes(r)){let i=Rt(r,Tl);throw new q(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Xd[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Rt(e,t){if(t.length===0||typeof e!="string")return"";let r=em(e,t);return r?` Did you mean "${r}"?`:""}function em(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Rl.default)(e,i)}));r.sort((i,o)=>i.distance{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(!Pn(c)){l(c);return}c.batchRequestIdx===u?l(c):(i||(i=c),a())})})}var Ue=D("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var tm={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},rm=Symbol.for("prisma.client.transaction.id"),nm={id:0,nextId(){return++this.id}};function Dl(e){class t{constructor(n){this._middlewares=new wn;this._createPrismaPromise=Hi();this.$extends=ra;xa(e),n&&Ml(n,e);let i=n?.adapter?fs(n.adapter):void 0,o=new Fl.EventEmitter().on("error",()=>{});this._extensions=ln.empty(),this._previewFeatures=gn(e),this._clientVersion=e.clientVersion??wl,this._activeProvider=e.activeProvider,this._tracingHelper=ml(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&yr.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&yr.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=!i&&_t(s,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},c=u.debug===!0;c&&D.enable("prisma:client");let p=yr.default.resolve(e.dirname,e.relativePath);Ol.default.existsSync(p)||(p=e.dirname),Ue("dirname",e.dirname),Ue("relativePath",e.relativePath),Ue("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:yr.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&&gl(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:[],clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:ba(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,logEmitter:o,isBundled:e.isBundled,adapter:i},Ue("clientVersion",e.clientVersion),this._engine=Ua(e,this._engineConfig),this._requestHandler=new Cn(this,o),l.log)for(let f of l.log){let y=typeof f=="string"?f:f.emit==="stdout"?f.level:null;y&&this.$on(y,g=>{$t.log(`${$t.tags[y]??""}`,g.message||g.query)})}this._metrics=new dt(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=zt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.on("beforeExit",i):this._engine.on(n,o=>{let s=o.fields;return i(n==="query"?{timestamp:o.timestamp,query:s?.query??o.query,params:s?.params??o.params,duration:s?.duration_ms??o.duration,target:o.target}:{timestamp:o.timestamp,message:s?.message??o.message,target:o.target})})}$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{Eo()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider,l=this._engineConfig.adapter?.flavour;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Ji({clientMethod:i,activeProvider:a,activeProviderFlavour:l}),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]=Il(n,i);return Gi(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new X("`$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=>(Gi(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new X(`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:nl,callsite:Ve(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider,l=this._engineConfig.adapter?.flavour;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Ji({clientMethod:i,activeProvider:a,activeProviderFlavour:l}),callsite:Ve(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(Pl)}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Il(n,i));throw new X("`$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})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=nm.nextId(),s=fl(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,p={kind:"batch",id:o,index:u,isolationLevel:c,lock:s};return l.requestTransaction?.(p)??l});return Sl(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s=await this._engine.transaction("start",o,i),a;try{let l={kind:"itx",...s};a=await n(this._createItxClient(l)),await this._engine.transaction("commit",o,s)}catch(l){throw await this._engine.transaction("rollback",o,s).catch(()=>{}),l}return a}_createItxClient(n){return zt(Ee(on(this),[re("_appliedParent",()=>this._appliedParent._createItxClient(n)),re("_createPrismaPromise",()=>Hi(n)),re(rm,()=>n.id),Gt(zi)]))}$transaction(n,i){let o;typeof n=="function"?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??tm,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,P=>c(u,T=>(P?.end(),l(T))));let{runInTransaction:p,args:d,...f}=u,y={...n,...f};d&&(y.args=i.middlewareArgsToRequestArgs(d)),n.transaction!==void 0&&p===!1&&delete y.transaction;let g=await ua(this,y);return y.model?oa({result:g,modelName:y.model,args:y.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):g};return this._tracingHelper.runInChildSpan(s.operation,()=>new kl.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 y={name:"serialize"},g=this._tracingHelper.runInChildSpan(y,()=>el({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion}));return D.enabled("prisma:client")&&(Ue("Prisma Client call:"),Ue(`prisma.${i}(${$s(n)})`),Ue("Generated request:"),Ue(JSON.stringify(g,null,2)+` -`)),c?.kind==="batch"&&await c.lock,this._requestHandler.request({protocolQuery:g,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(),customDataProxyFetch:f})}catch(y){throw y.clientVersion=this._clientVersion,y}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new X("`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)}}return t}function Il(e,t){return im(e)?[new oe(e,t),ul]:[e,cl]}function im(e){return Array.isArray(e)&&Array.isArray(e.raw)}var om=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function _l(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!om.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}function Nl(e){_t(e,{conflictCheck:"warn"})}0&&(module.exports={DMMF,DMMFClass,Debug,Decimal,Extensions,MetricsClient,NotFoundError,ObjectEnumValue,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,Types,defineDmmfProperty,empty,getPrismaClient,itxClientDenyList,join,makeStrictEnum,objectEnumNames,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); +`)}var to=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Ir(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Ir(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Ir(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=il(r),i={values:Ir(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?ll(`prisma.${e}(${n}, ${i.values})`):ll(`prisma.${e}(${n})`),{query:n,parameters:i}},ul={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ie(t,r)}},cl={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function ro(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=pl(r(o)):pl(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 pl(e){return typeof e.then=="function"?e:Promise.resolve(e)}var dl={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},no=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??dl}};function ml(e){return e.includes("tracing")?new no:dl}function fl(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}var tm=["$connect","$disconnect","$on","$transaction","$use","$extends"],gl=tm;function hl(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 In=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 El=k(mi());function On(e){return typeof e.batchRequestIdx=="number"}function kn(e){return e===null?e:Array.isArray(e)?e.map(kn):typeof e=="object"?rm(e)?nm(e):ht(e,kn):e}function rm(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function nm({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new ve(t);case"Json":return JSON.parse(t);default:De(t,"Unknown tagged value")}}function yl(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(io(e.query.arguments)),t.push(io(e.query.selection)),t.join("")}function io(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${io(n)})`:r}).join(" ")})`}var im={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 oo(e){return im[e]}var Dn=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;ict("bigint",r));case"bytes-array":return t.map(r=>ct("bytes",r));case"decimal-array":return t.map(r=>ct("decimal",r));case"datetime-array":return t.map(r=>ct("datetime",r));case"date-array":return t.map(r=>ct("date",r));case"time-array":return t.map(r=>ct("time",r));default:return t}}function bl(e){let t=[],r=om(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=>oo(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:am(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"?wl(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:oo(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:yl(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(sm(t),lm(t,i)||t instanceof _e)throw t;if(t instanceof V&&um(t)){let u=xl(t.meta);An({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=kt({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,El.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=_i(o,s),l=i==="queryRaw"?bl(a):kn(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function am(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:wl(e)};De(e,"Unknown transaction kind")}}function wl(e){return{id:e.id,payload:e.payload}}function lm(e,t){return On(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function um(e){return e.code==="P2009"||e.code==="P2012"}function xl(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(xl)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}var Pl="5.18.0";var vl=Pl;var Al=k(Zi());var L=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(L,"PrismaClientConstructorValidationError");var Tl=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Rl=["pretty","colorless","minimal"],Cl=["info","query","warn","error"],pm={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new L(`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=Mt(r,t)||` Available datasources: ${t.join(", ")}`;throw new L(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new L(`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 L(`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 L(`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 L('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Rn(t).includes("driverAdapters"))throw new L('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Wt()==="binary")throw new L('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 L(`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 L(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Rl.includes(e)){let t=Mt(e,Rl);throw new L(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new L(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Cl.includes(r)){let n=Mt(r,Cl);throw new L(`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=Mt(i,o);throw new L(`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 L(`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 L(`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 L(`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 L('"omit" option is expected to be an object.');if(e===null)throw new L('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=mm(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 L(fm(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new L(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Mt(r,t);throw new L(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Il(e,t){for(let[r,n]of Object.entries(e)){if(!Tl.includes(r)){let i=Mt(r,Tl);throw new L(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}pm[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new L('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Mt(e,t){if(t.length===0||typeof e!="string")return"";let r=dm(e,t);return r?` Did you mean "${r}"?`:""}function dm(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Al.default)(e,i)}));r.sort((i,o)=>i.distanceNt(n)===t);if(r)return e[r]}function fm(e,t){let r=It(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}=mn(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}function Ol(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(!On(c)){l(c);return}c.batchRequestIdx===u?l(c):(i||(i=c),a())})})}var Xe=F("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var gm={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},hm=Symbol.for("prisma.client.transaction.id"),ym={id:0,nextId(){return++this.id}};function Nl(e){class t{constructor(n){this._originalClient=this;this._middlewares=new In;this._createPrismaPromise=ro();this.$extends=Zs;e=n?.__internal?.configOverride?.(e)??e,ga(e),n&&Il(n,e);let i=new Ll.EventEmitter().on("error",()=>{});this._extensions=En.empty(),this._previewFeatures=Rn(e),this._clientVersion=e.clientVersion??vl,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=ml(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Or.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Or.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=xi(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&&Jt(o,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},c=u.debug===!0;c&&F.enable("prisma:client");let p=Or.default.resolve(e.dirname,e.relativePath);Fl.default.existsSync(p)||(p=e.dirname),Xe("dirname",e.dirname),Xe("relativePath",e.relativePath),Xe("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:Or.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&&hl(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:ha(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:Dt,getBatchRequestPayload:Et,prismaGraphQLToJSError:ot,PrismaClientUnknownRequestError:B,PrismaClientInitializationError:R,PrismaClientKnownRequestError:V,debug:F("prisma:client:accelerateEngine"),engineVersion:Dl.version,clientVersion:e.clientVersion}},Xe("clientVersion",e.clientVersion),this._engine=Ua(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=>{zt.log(`${zt.tags[g]??""}`,h.message||h.query)})}this._metrics=new yt(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=lr(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{Eo()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:to({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]=kl(n,i);return eo(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=>(eo(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:nl,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:to({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",...kl(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})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=ym.nextId(),s=fl(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 Ol(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 lr(xe(Ys(this),[re("_appliedParent",()=>this._appliedParent._createItxClient(n)),re("_createPrismaPromise",()=>ro(n)),re(hm,()=>n.id),bt(gl)]))}$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??gm,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 oa(this,g);return g.model?ta({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 _l.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,()=>el({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 F.enabled("prisma:client")&&(Xe("Prisma Client call:"),Xe(`prisma.${i}(${_s(n)})`),Xe("Generated request:"),Xe(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 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 kl(e,t){return bm(e)?[new ie(e,t),ul]:[e,cl]}function bm(e){return Array.isArray(e)&&Array.isArray(e.raw)}var Em=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Ml(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Em.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}function $l(e){Jt(e,{conflictCheck:"warn"})}0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); /*! Bundled license information: decimal.js/decimal.mjs: diff --git a/experiments/postgres/prisma/generated/client/runtime/react-native.js b/experiments/postgres/prisma/generated/client/runtime/react-native.js new file mode 100644 index 000000000..f9ef70c3f --- /dev/null +++ b/experiments/postgres/prisma/generated/client/runtime/react-native.js @@ -0,0 +1,80 @@ +"use strict";var Gs=Object.create;var Yt=Object.defineProperty;var Ws=Object.getOwnPropertyDescriptor;var Ks=Object.getOwnPropertyNames;var Hs=Object.getPrototypeOf,zs=Object.prototype.hasOwnProperty;var _e=(e,t)=>()=>(e&&(t=e(e=0)),t);var ge=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),bt=(e,t)=>{for(var r in t)Yt(e,r,{get:t[r],enumerable:!0})},jn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ks(t))!zs.call(e,i)&&i!==r&&Yt(e,i,{get:()=>t[i],enumerable:!(n=Ws(t,i))||n.enumerable});return e};var he=(e,t,r)=>(r=e!=null?Gs(Hs(e)):{},jn(t||!e||!e.__esModule?Yt(r,"default",{value:e,enumerable:!0}):r,e)),Ys=e=>jn(Yt({},"__esModule",{value:!0}),e);var y,c=_e(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var v,p=_e(()=>{"use strict";v=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=_e(()=>{"use strict";E=()=>{};E.prototype=E});var b,f=_e(()=>{"use strict";b=class{constructor(t){this.value=t}deref(){return this.value}}});var oi=ge(et=>{"use strict";m();c();p();d();f();var Jn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Zs=Jn(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 L=F===A?0:4-F%4;return[F,L]}function l(C){var A=a(C),F=A[0],L=A[1];return(F+L)*3/4-L}function u(C,A,F){return(A+F)*3/4-F}function g(C){var A,F=a(C),L=F[0],N=F[1],M=new n(u(C,L,N)),O=0,z=N>0?L-4:L,U;for(U=0;U>16&255,M[O++]=A>>8&255,M[O++]=A&255;return N===2&&(A=r[C.charCodeAt(U)]<<2|r[C.charCodeAt(U+1)]>>4,M[O++]=A&255),N===1&&(A=r[C.charCodeAt(U)]<<10|r[C.charCodeAt(U+1)]<<4|r[C.charCodeAt(U+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 x(C,A,F){for(var L,N=[],M=A;Mz?z:O+M));return L===1?(A=C[F-1],N.push(t[A>>2]+t[A<<4&63]+"==")):L===2&&(A=(C[F-2]<<8)+C[F-1],N.push(t[A>>10]+t[A>>4&63]+t[A<<2&63]+"=")),N.join("")}}),Xs=Jn(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,u=(1<>1,h=-7,x=n?o-1:0,S=n?-1:1,C=t[r+x];for(x+=S,s=C&(1<<-h)-1,C>>=-h,h+=l;h>0;s=s*256+t[r+x],x+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+x],x+=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+x>=1?r+=S/u:r+=S*Math.pow(2,1-x),r*u>=2&&(a++,u/=2),a+x>=h?(l=0,a=h):a+x>=1?(l=(r*u-1)*Math.pow(2,o),a=a+x):(l=r*Math.pow(2,x-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}}),Ur=Zs(),Ze=Xs(),Un=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;et.Buffer=T;et.SlowBuffer=oa;et.INSPECT_MAX_BYTES=50;var Zt=2147483647;et.kMaxLength=Zt;T.TYPED_ARRAY_SUPPORT=ea();!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 ea(){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 Re(e){if(e>Zt)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 Qr(e)}return Gn(e,t,r)}T.poolSize=8192;function Gn(e,t,r){if(typeof e=="string")return ra(e,t);if(ArrayBuffer.isView(e))return na(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 Kn(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=ia(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 Gn(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function Wn(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 ta(e,t,r){return Wn(e),e<=0?Re(e):t!==void 0?typeof r=="string"?Re(e).fill(t,r):Re(e).fill(t):Re(e)}T.alloc=function(e,t,r){return ta(e,t,r)};function Qr(e){return Wn(e),Re(e<0?0:Jr(e)|0)}T.allocUnsafe=function(e){return Qr(e)};T.allocUnsafeSlow=function(e){return Qr(e)};function ra(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=Hn(e,t)|0,n=Re(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function qr(e){let t=e.length<0?0:Jr(e.length)|0,r=Re(t);for(let n=0;n=Zt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Zt.toString(16)+" bytes");return e|0}function oa(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 Hn(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 Vr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return ii(e).length;default:if(i)return n?-1:Vr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=Hn;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 ha(this,t,r);case"utf8":case"utf-8":return Yn(this,t,r);case"ascii":return ma(this,t,r);case"latin1":case"binary":return ga(this,t,r);case"base64":return da(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ya(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Ve(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+=" ... "),""};Un&&(T.prototype[Un]=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,Wr(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:qn(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):qn(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function qn(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 aa(this,e,t,r);case"utf8":case"utf-8":return la(this,e,t,r);case"ascii":case"latin1":case"binary":return ua(this,e,t,r);case"base64":return ca(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pa(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 da(e,t,r){return t===0&&r===e.length?Ur.fromByteArray(e):Ur.fromByteArray(e.slice(t,r))}function Yn(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 Vn=4096;function fa(e){let t=e.length;if(t<=Vn)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=Le(function(e){e=e>>>0,Xe(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(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,Xe(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(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=Le(function(e){e=e>>>0,Xe(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(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,Xe(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Et(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),Ze.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||G(e,4,this.length),Ze.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||G(e,8,this.length),Ze.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||G(e,8,this.length),Ze.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 Zn(e,t,r,n,i){ni(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 Xn(e,t,r,n,i){ni(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=Le(function(e,t=0){return Zn(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Le(function(e,t=0){return Xn(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=Le(function(e,t=0){return Zn(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Le(function(e,t=0){return Xn(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 ti(e,t,r,n,i){return t=+t,r=r>>>0,i||ei(e,t,r,4,34028234663852886e22,-34028234663852886e22),Ze.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return ti(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return ti(this,e,t,!1,r)};function ri(e,t,r,n,i){return t=+t,r=r>>>0,i||ei(e,t,r,8,17976931348623157e292,-17976931348623157e292),Ze.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return ri(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return ri(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=Qn(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Qn(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function Qn(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 wa(e,t,r){Xe(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Et(t,e.length-(r+1))}function ni(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 Ye.ERR_OUT_OF_RANGE("value",a,e)}wa(n,i,o)}function Xe(e,t){if(typeof e!="number")throw new Ye.ERR_INVALID_ARG_TYPE(t,"number",e)}function Et(e,t,r){throw Math.floor(e)!==e?(Xe(e,r),new Ye.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Ye.ERR_BUFFER_OUT_OF_BOUNDS:new Ye.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var ba=/[^+/0-9A-Za-z-_]/g;function Ea(e){if(e=e.split("=")[0],e=e.trim().replace(ba,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Vr(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 xa(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function ii(e){return Ur.toByteArray(Ea(e))}function Xt(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 Wr(e){return e!==e}var Pa=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 Le(e){return typeof BigInt>"u"?Ta:e}function Ta(){throw new Error("BigInt not supported")}});var w,m=_e(()=>{"use strict";w=he(oi())});function Ca(){return!1}var Aa,Ra,er,zr=_e(()=>{"use strict";m();c();p();d();f();Aa={},Ra={existsSync:Ca,promises:Aa},er=Ra});function Ha(...e){return e.join("/")}function za(...e){return e.join("/")}var wi,Ya,Za,we,tn=_e(()=>{"use strict";m();c();p();d();f();wi="/",Ya={sep:wi},Za={resolve:Ha,posix:Ya,join:za,sep:wi},we=Za});var xi=ge((Ud,Ei)=>{"use strict";m();c();p();d();f();Ei.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Pi=ge((Wd,vi)=>{"use strict";m();c();p();d();f();var el=xi();vi.exports=e=>{let t=el(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var rr,Ti=_e(()=>{"use strict";m();c();p();d();f();rr=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 Ai=ge((Rf,Ci)=>{"use strict";m();c();p();d();f();Ci.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 Oi=ge((Bf,Si)=>{"use strict";m();c();p();d();f();Si.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 on=ge((Jf,ki)=>{"use strict";m();c();p();d();f();var ol=Oi();ki.exports=e=>typeof e=="string"?e.replace(ol(),""):e});var Fi=ge((um,ir)=>{"use strict";m();c();p();d();f();ir.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()};ir.exports.default=ir.exports});var Ii=ge((oy,ul)=>{ul.exports={name:"@prisma/engines-version",version:"5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4c784e32044a8a016d99474bd02a3b6123742169"},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 Ni=ge(()=>{"use strict";m();c();p();d();f()});var Mn=ge((YC,es)=>{"use strict";m();c();p();d();f();es.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;sXr,Decimal:()=>ve,Extensions:()=>Kr,MetricsClient:()=>rt,NotFoundError:()=>ke,PrismaClientInitializationError:()=>V,PrismaClientKnownRequestError:()=>W,PrismaClientRustPanicError:()=>ue,PrismaClientUnknownRequestError:()=>K,PrismaClientValidationError:()=>Y,Public:()=>Hr,Sql:()=>se,defineDmmfProperty:()=>Li,empty:()=>$i,getPrismaClient:()=>Vs,getRuntime:()=>Jo,join:()=>Di,makeStrictEnum:()=>Qs,objectEnumValues:()=>sr,raw:()=>mn,sqltag:()=>gn,warnEnvConflicts:()=>void 0,warnOnce:()=>Ft});module.exports=Ys(sp);m();c();p();d();f();var Kr={};bt(Kr,{defineExtension:()=>si,getExtensionContext:()=>ai});m();c();p();d();f();m();c();p();d();f();function si(e){return typeof e=="function"?e:t=>t.$extends(e)}m();c();p();d();f();function ai(e){return e}var Hr={};bt(Hr,{validator:()=>li});m();c();p();d();f();m();c();p();d();f();function li(...e){return t=>t}m();c();p();d();f();m();c();p();d();f();var tr={};bt(tr,{$:()=>fi,bgBlack:()=>Da,bgBlue:()=>Ua,bgCyan:()=>Va,bgGreen:()=>Ba,bgMagenta:()=>qa,bgRed:()=>$a,bgWhite:()=>Qa,bgYellow:()=>ja,black:()=>_a,blue:()=>Je,bold:()=>pe,cyan:()=>Se,dim:()=>xt,gray:()=>Ct,green:()=>Pt,grey:()=>Na,hidden:()=>Fa,inverse:()=>ka,italic:()=>Oa,magenta:()=>La,red:()=>Qe,reset:()=>Sa,strikethrough:()=>Ma,underline:()=>vt,white:()=>Ia,yellow:()=>Tt});m();c();p();d();f();var Yr,ui,ci,pi,di=!0;typeof y<"u"&&({FORCE_COLOR:Yr,NODE_DISABLE_COLORS:ui,NO_COLOR:ci,TERM:pi}=y.env||{},di=y.stdout&&y.stdout.isTTY);var fi={enabled:!ui&&ci==null&&pi!=="dumb"&&(Yr!=null&&Yr!=="0"||di)};function q(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!fi.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Sa=q(0,0),pe=q(1,22),xt=q(2,22),Oa=q(3,23),vt=q(4,24),ka=q(7,27),Fa=q(8,28),Ma=q(9,29),_a=q(30,39),Qe=q(31,39),Pt=q(32,39),Tt=q(33,39),Je=q(34,39),La=q(35,39),Se=q(36,39),Ia=q(37,39),Ct=q(90,39),Na=q(90,39),Da=q(40,49),$a=q(41,49),Ba=q(42,49),ja=q(43,49),Ua=q(44,49),qa=q(45,49),Va=q(46,49),Qa=q(47,49);m();c();p();d();f();var Ja=100,mi=["green","yellow","blue","magenta","cyan","red"],At=[],gi=Date.now(),Ga=0,Zr=typeof y<"u"?y.env:{};globalThis.DEBUG??=Zr.DEBUG??"";globalThis.DEBUG_COLORS??=Zr.DEBUG_COLORS?Zr.DEBUG_COLORS==="true":!0;var Rt={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 Wa(e){let t={color:mi[Ga++%mi.length],enabled:Rt.enabled(e),namespace:e,log:Rt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&At.push([o,...n]),At.length>Ja&&At.shift(),Rt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:Ka(g)),u=`+${Date.now()-gi}ms`;gi=Date.now(),globalThis.DEBUG_COLORS?a(tr[s](pe(o)),...l,tr[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Xr=new Proxy(Wa,{get:(e,t)=>Rt[t],set:(e,t,r)=>Rt[t]=r});function Ka(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 hi(e=7500){let t=At.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||={})})(Ie||={});m();c();p();d();f();tn();function rn(e){return we.sep===we.posix.sep?e:e.split(we.sep).join(we.posix.sep)}var kt={};bt(kt,{error:()=>nl,info:()=>rl,log:()=>tl,query:()=>il,should:()=>Ri,tags:()=>Ot,warn:()=>nn});m();c();p();d();f();var Ot={error:Qe("prisma:error"),warn:Tt("prisma:warn"),info:Se("prisma:info"),query:Je("prisma:query")},Ri={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function tl(...e){console.log(...e)}function nn(e,...t){Ri.warn()&&console.warn(`${Ot.warn} ${e}`,...t)}function rl(e,...t){console.info(`${Ot.info} ${e}`,...t)}function nl(e,...t){console.error(`${Ot.error} ${e}`,...t)}function il(e,...t){console.log(`${Ot.query} ${e}`,...t)}m();c();p();d();f();function nr(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 Oe(e,t){throw new Error(t)}m();c();p();d();f();function sn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}m();c();p();d();f();var an=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});m();c();p();d();f();function tt(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 ln(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Mi.has(e)||(Mi.add(e),nn(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 ke=class extends W{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};re(ke,"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 Y=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};re(Y,"PrismaClientValidationError");m();c();p();d();f();var rt=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();m();c();p();d();f();function Mt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Li(e,t){let r=Mt(()=>sl(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function sl(e){return{datamodel:{models:un(e.models),enums:un(e.enums),types:un(e.types)}}}function un(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}m();c();p();d();f();var or=Symbol(),cn=new WeakMap,Fe=class{constructor(t){t===or?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 Fe{_getNamespace(){return"NullTypes"}},Lt=class extends _t{};pn(Lt,"DbNull");var It=class extends _t{};pn(It,"JsonNull");var Nt=class extends _t{};pn(Nt,"AnyNull");var sr={classes:{DbNull:Lt,JsonNull:It,AnyNull:Nt},instances:{DbNull:new Lt(or),JsonNull:new It(or),AnyNull:new Nt(or)}};function pn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();function Dt(e){return{ok:!1,error:e,map(){return Dt(e)},flatMap(){return Dt(e)}}}var dn=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 dn,r=Ge(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ge(t,e.queryRaw.bind(e)),executeRaw:Ge(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>al(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=ll(t,e.getConnectionInfo.bind(e))),n},al=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ge(e,t.queryRaw.bind(t)),executeRaw:Ge(e,t.executeRaw.bind(t)),commit:Ge(e,t.commit.bind(t)),rollback:Ge(e,t.rollback.bind(t))});function Ge(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return Dt({kind:"GenericJs",id:i})}}}function ll(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return Dt({kind:"GenericJs",id:i})}}}var qs=he(Ii());var pO=he(Ni());Ti();zr();tn();m();c();p();d();f();var se=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 ar={enumerable:!0,configurable:!0,writable:!0};function lr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>ar,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Bi=Symbol.for("nodejs.util.inspect.custom");function Ee(e,t){let r=cl(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=ji(Reflect.ownKeys(o),r),a=ji(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?{...ar,...l?.getPropertyDescriptor(s)}:ar:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[Bi]=function(){let o={...this};return delete o[Bi],o},i}function cl(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 ji(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}m();c();p();d();f();function nt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}m();c();p();d();f();function ur(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}m();c();p();d();f();m();c();p();d();f();var it=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();function Ui(e){return e.substring(0,1).toLowerCase()+e.substring(1)}m();c();p();d();f();function ot(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function cr(e){return e.toString()!=="Invalid Date"}m();c();p();d();f();m();c();p();d();f();var st=9e15,Be=1e9,hn="0123456789abcdef",dr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",fr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",yn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-st,maxE:st,crypto:!1},Ji,Me,I=!0,gr="[DecimalError] ",$e=gr+"Invalid argument: ",Gi=gr+"Precision limit exceeded",Wi=gr+"crypto unavailable",Ki="[object Decimal]",te=Math.floor,J=Math.pow,pl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,dl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,fl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Hi=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fe=1e7,_=7,ml=9007199254740991,gl=dr.length-1,wn=fr.length-1,R={toStringTag:Ki};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($e+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())+_,n.rounding=1,r=hl(n,eo(n,r)),n.precision=e,n.rounding=t,k(Me==2||Me==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(I=!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 I=!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/_))*_,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/yr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=at(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=at(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/yr(5,e)),i=at(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,I=!1,r=r.times(r).minus(1).sqrt().plus(r),I=!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,I=!1,r=r.times(r).plus(1).sqrt().plus(r),I=!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,x=g.rounding;if(u.isFinite()){if(u.isZero())return new g(u);if(u.abs().eq(1)&&h+4<=wn)return s=de(g,h+4,x).times(.25),s.s=u.s,s}else{if(!u.s)return new g(NaN);if(h+4<=wn)return s=de(g,h+4,x).times(.5),s.s=u.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/_+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(I=!1,t=Math.ceil(a/_),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,x=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(I=!1,a=h+S,s=De(u,a),n=t?mr(g,a+10):De(e,a),l=j(s,n,a,1),Bt(l.d,i=h,x))do if(a+=10,s=De(u,a),n=t?mr(g,a+10):De(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(Bt(l.d,i+=10,x));return I=!0,k(l,h,x)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,x,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,x=e.d,a=C.precision,l=C.rounding,!u[0]||!x[0]){if(x[0])e.s=-e.s;else if(u[0])e=new C(S);else return new C(l===3?-0:0);return I?k(e,a,l):e}if(r=te(e.e/_),g=te(S.e/_),u=u.slice(),o=g-r,o){for(h=o<0,h?(t=u,o=-o,s=x.length):(t=x,r=g,s=u.length),n=Math.max(Math.ceil(a/_),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=x.length,h=n0;--n)u[s++]=0;for(n=x.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=hr(u,n),I?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($e+e);return r.d?(t=zi(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())+_,n.rounding=1,r=wl(n,eo(n,r)),n.precision=e,n.rounding=t,k(Me>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(I=!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 I=!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(Me==2||Me==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,x=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!x||!x[0]||!S||!S[0])return new h(!e.s||x&&!x[0]&&!S||S&&!S[0]&&!x?NaN:!x||!S?e.s/0:e.s*0);for(r=te(g.e/_)+te(e.e/_),l=x.length,u=S.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+S[n]*x[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=hr(o,r),I?k(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return xn(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:(ae(e,0,Be),t===void 0?t=n.rounding:ae(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=xe(n,!0):(ae(e,0,Be),t===void 0?t=i.rounding:ae(t,0,8),n=k(new i(n),e+1,t),r=xe(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=xe(i):(ae(e,0,Be),t===void 0?t=o.rounding:ae(t,0,8),n=k(new o(i),e+i.e+1,t),r=xe(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,x,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=zi(C)-S.e-1,s=o%_,t.d[0]=J(10,s<0?_+s:s),e==null)e=o>0?t:u;else{if(a=new A(e),!a.isInt()||a.lt(u))throw Error($e+a);e=a.gt(t)?o>0?t:u:a}for(I=!1,a=new A(Z(C)),g=A.precision,A.precision=o=C.length*_*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,x=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,I=!0,x};R.toHexadecimal=R.toHex=function(e,t){return xn(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:ae(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]?(I=!1,r=j(r,e,0,t,1).times(e),I=!0,k(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return xn(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/_),t>=e.d.length-1&&(r=u<0?-u:u)<=ml)return i=Yi(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):(I=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=bn(e.times(De(a,n+r)),n),i.d&&(i=k(i,n+5,1),Bt(i.d,n,o)&&(t=n+10,i=k(bn(e.times(De(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,I=!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=xe(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ae(e,1,Be),t===void 0?t=i.rounding:ae(t,0,8),n=k(new i(n),e,t),r=xe(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):(ae(e,1,Be),t===void 0?t=n.rounding:ae(t,0,8)),k(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=xe(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=xe(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($e+e)}function Bt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=_,i=0):(i=Math.ceil((t+1)/_),t%=_),o=J(10,_-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 pr(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/yr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=at(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,x,S,C,A,F,L,N,M,O,z,U,wt,Q,ie,Ae,X,ze,zt=n.constructor,jr=n.s==i.s?1:-1,ee=n.d,$=i.d;if(!ee||!ee[0]||!$||!$[0])return new zt(!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=_,g=te(n.e/S)-te(i.e/S)),X=$.length,ie=ee.length,L=new zt(jr),N=L.d=[],h=0;$[h]==(ee[h]||0);h++);if($[h]>(ee[h]||0)&&g--,o==null?(U=o=zt.precision,s=zt.rounding):a?U=o+(n.e-i.e)+1:U=o,U<0)N.push(1),C=!0;else{if(U=U/S+2|0,h=0,X==1){for(x=0,$=$[0],U++;(h1&&($=e($,x,l),ee=e(ee,x,l),X=$.length,ie=ee.length),Q=X,M=ee.slice(0,X),O=M.length;O=l/2&&++Ae;do x=0,u=t($,M,X,O),u<0?(z=M[0],X!=O&&(z=z*l+(M[1]||0)),x=z/Ae|0,x>1?(x>=l&&(x=l-1),A=e($,x,l),F=A.length,O=M.length,u=t(A,M,F,O),u==1&&(x--,r(A,X=10;x/=10)h++;L.e=h+g*S-1,k(L,a?o+L.e+1:o,s,C)}return L}}();function k(e,t,r,n){var i,o,s,a,l,u,g,h,x,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+=_,s=t,g=h[x=0],l=g/J(10,i-s-1)%10|0;else if(x=Math.ceil((o+1)/_),a=h.length,x>=a)if(n){for(;a++<=x;)h.push(0);g=l=0,i=1,o%=_,s=o-_+1}else break e;else{for(g=a=h[x],i=1;a>=10;a/=10)i++;o%=_,s=o-_+i,l=s<0?0:g/J(10,i-s-1)%10|0}if(n=n||t<0||h[x+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[x-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,(_-t%_)%_),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=x,a=1,x--):(h.length=x+1,a=J(10,_-o),h[x]=s>0?(g/J(10,i-s)%J(10,s)|0)*a:0),u)for(;;)if(x==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[x]+=a,h[x]!=fe)break;h[x--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return I&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Ne(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ne(-i-1)+o,r&&(n=r-s)>0&&(o+=Ne(n))):i>=s?(o+=Ne(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ne(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ne(n))),o}function hr(e,t){var r=e[0];for(t*=_;r>=10;r/=10)t++;return t}function mr(e,t,r){if(t>gl)throw I=!0,r&&(e.precision=r),Error(Gi);return k(new e(dr),t,1,!0)}function de(e,t,r){if(t>wn)throw Error(Gi);return k(new e(fr),t,r,!0)}function zi(e){var t=e.length-1,r=t*_+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 Ne(e){for(var t="";e--;)t+="0";return t}function Yi(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/_+4);for(I=!1;;){if(r%2&&(o=o.times(t),Vi(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),Vi(t.d,s)}return I=!0,o}function qi(e){return e.d[e.d.length-1]&1}function Zi(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new x(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(I=!1,l=C):l=t,a=new x(.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 x(1),x.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&&Bt(s.d,l-n,S,u))x.precision=l+=10,r=o=a=new x(1),g=0,u++;else return k(s,x.precision=C,S,I=!0);else return x.precision=C,s}s=a}}function De(e,t){var r,n,i,o,s,a,l,u,g,h,x,S=1,C=10,A=e,F=A.d,L=A.constructor,N=L.rounding,M=L.precision;if(A.s<0||!F||!F[0]||!A.e&&F[0]==1&&F.length==1)return new L(F&&!F[0]?-1/0:A.s!=1?NaN:F?0:A);if(t==null?(I=!1,g=M):g=t,L.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 L("0."+r),o++):A=new L(n+"."+r.slice(1))}else return u=mr(L,g+2,M).times(o+""),A=De(new L(n+"."+r.slice(1)),g-C).plus(u),L.precision=M,t==null?k(A,M,N,I=!0):A;for(h=A,l=s=A=j(A.minus(1),A.plus(1),g,1),x=k(A.times(A),g,1),i=3;;){if(s=k(s.times(x),g,1),u=l.plus(j(s,new L(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(mr(L,g+2,M).times(o+""))),l=j(l,new L(S),g,1),t==null)if(Bt(l.d,g-C,N,a))L.precision=g+=C,u=s=A=j(h.minus(1),h.plus(1),g,1),x=k(A.times(A),g,1),i=a=1;else return k(l,L.precision=M,N,I=!0);else return L.precision=M,l;l=u,i+=2}}function Xi(e){return String(e.s*e.s/0)}function En(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)%_,r<0&&(n+=_),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Hi.test(t))return En(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(fl.test(t))r=8;else throw Error($e+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=Yi(n,new n(r),o,o*2)),u=pr(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=hr(u,g),e.d=u,I=!1,s&&(e=j(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?J(2,l):Ke.pow(2,l))),I=!0,e)}function wl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:at(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/yr(5,r)),t=at(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 at(e,t,r,n,i){var o,s,a,l,u=1,g=e.precision,h=Math.ceil(g/_);for(I=!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 I=!0,s.d.length=h+1,s}function yr(e,t){for(var r=e;--t;)r*=e;return r}function eo(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 Me=n?4:1,t;if(r=t.divToInt(i),r.isZero())Me=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Me=qi(r)?n?2:3:n?4:1,t;Me=qi(r)?n?1:4:n?3:2}return t.minus(i).abs()}function xn(e,t,r,n){var i,o,s,a,l,u,g,h,x,S=e.constructor,C=r!==void 0;if(C?(ae(r,1,Be),n===void 0?n=S.rounding:ae(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=Xi(e);else{for(g=xe(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(".",""),x=new S(1),x.e=g.length-s,x.d=pr(xe(x),10,i),x.e=x.d.length),h=pr(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,x,r,n,0,i),h=e.d,o=e.e,u=Ji),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=pr(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 bl(e){return new this(e).abs()}function El(e){return new this(e).acos()}function xl(e){return new this(e).acosh()}function vl(e,t){return new this(e).plus(t)}function Pl(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=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 Sl(e){return new this(e).cbrt()}function Ol(e){return k(e=new this(e),e.e+1,2)}function kl(e,t,r){return new this(e).clamp(t,r)}function Fl(e){if(!e||typeof e!="object")throw Error(gr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Be,"rounding",0,8,"toExpNeg",-st,0,"toExpPos",0,st,"maxE",0,st,"minE",-st,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error($e+r+": "+n);if(r="crypto",i&&(this[r]=yn[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(Wi);else this[r]=!1;else throw Error($e+r+": "+n);return this}function Ml(e){return new this(e).cos()}function _l(e){return new this(e).cosh()}function to(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,Qi(o)){u.s=o.s,I?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;I?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(Wi);else for(;o=10;i/=10)n++;n<_&&(r-=_-n)}return s.e=r,s.d=a,s}function Kl(e){return k(e=new this(e),e.e+1,this.rounding)}function Hl(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function zl(e){return new this(e).sin()}function Yl(e){return new this(e).sinh()}function Zl(e){return new this(e).sqrt()}function Xl(e,t){return new this(e).sub(t)}function eu(){var e=0,t=arguments,r=new this(t[e]);for(I=!1;r.s&&++e`}};function ut(e){return e instanceof jt}m();c();p();d();f();m();c();p();d();f();var wr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};m();c();p();d();f();var br=e=>e,Er={bold:br,red:br,green:br,dim:br,enabled:!1},ro={bold:pe,red:Qe,green:Pt,dim:xt,enabled:!0},ct={write(e){e.writeLine(",")}};m();c();p();d();f();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)))})}};m();c();p();d();f();var je=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var pt=class extends je{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new wr(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(){}};m();c();p();d();f();var no=": ",xr=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()+no.length}write(t){let r=new Pe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(no).write(this.value)}};m();c();p();d();f();var dt=class e extends je{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 pt&&(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())))})}};m();c();p();d();f();var H=class extends je{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 vn=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 ft(e){return new vn(io(e))}function io(e){let t=new dt;for(let[r,n]of Object.entries(e)){let i=new xr(r,oo(n));t.addField(i)}return t}function oo(e){if(typeof e=="string")return new H(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new H(String(e));if(typeof e=="bigint")return new H(`${e}n`);if(e===null)return new H("null");if(e===void 0)return new H("undefined");if(lt(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=cr(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof Fe?new H(`Prisma.${e._getName()}`):ut(e)?new H(`prisma.${Ui(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?ou(e):typeof e=="object"?io(e):new H(Object.prototype.toString.call(e))}function ou(e){let t=new pt;for(let r of e)t.addItem(oo(r));return t}function vr(e,t){let r=t==="pretty"?ro:Er,n=e.renderAllMessages(r),i=new it(0,{colors:r}).write(e).toString();return{message:n,args:i}}function so(e){if(e===void 0)return"";let t=ft(e);return new it(0,{colors:Er}).write(t).toString()}m();c();p();d();f();var su="P2037";function Pr({error:e,user_facing_error:t},r,n){return t.error_code?new W(au(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 au(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===su&&(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 Ut="";function ao(e){var t=e.split(` +`);return t.reduce(function(r,n){var i=cu(n)||du(n)||gu(n)||bu(n)||yu(n);return i&&r.push(i),r},[])}var lu=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,uu=/\((\S*)(?::(\d+))(?::(\d+))\)/;function cu(e){var t=lu.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=uu.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]||Ut,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var pu=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function du(e){var t=pu.exec(e);return t?{file:t[2],methodName:t[1]||Ut,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var fu=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,mu=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function gu(e){var t=fu.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=mu.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||Ut,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var hu=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function yu(e){var t=hu.exec(e);return t?{file:t[3],methodName:t[1]||Ut,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var wu=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function bu(e){var t=wu.exec(e);return t?{file:t[2],methodName:t[1]||Ut,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Pn=class{getLocation(){return null}},Tn=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=ao(t).find(i=>{if(!i.file)return!1;let o=rn(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 Ue(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Pn:new Tn}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var lo={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function mt(e={}){let t=xu(e);return Object.entries(t).reduce((n,[i,o])=>(lo[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function xu(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Tr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function uo(e,t){let r=Tr(e);return t({action:"aggregate",unpacker:r,argsMapper:mt})(e)}m();c();p();d();f();function vu(e={}){let{select:t,...r}=e;return typeof t=="object"?mt({...r,_count:t}):mt({...r,_count:{_all:!0}})}function Pu(e={}){return typeof e.select=="object"?t=>Tr(e)(t)._count:t=>Tr(e)(t)._count._all}function co(e,t){return t({action:"count",unpacker:Pu(e),argsMapper:vu})(e)}m();c();p();d();f();function Tu(e={}){let t=mt(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 Cu(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function po(e,t){return t({action:"groupBy",unpacker:Cu(e),argsMapper:Tu})(e)}function fo(e,t,r){if(t==="aggregate")return n=>uo(n,r);if(t==="count")return n=>co(n,r);if(t==="groupBy")return n=>po(n,r)}m();c();p();d();f();function mo(e,t){let r=t.fields.filter(i=>!i.relationName),n=an(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")},...lr(Object.keys(n))})}m();c();p();d();f();m();c();p();d();f();var go=e=>Array.isArray(e)?e:e.split("."),Cn=(e,t)=>go(t).reduce((r,n)=>r&&r[n],e),ho=(e,t,r)=>go(t).reduceRight((n,i,o,s)=>Object.assign({},Cn(e,s.slice(0,o)),{[i]:n}),r);function Au(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Ru(e,t,r){return t===void 0?e??{}:ho(t,r,e||!0)}function An(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ue(e._errorFormat),g=Au(n,i),h=Ru(l,o,g),x=r({dataPath:g,callsite:u})(h),S=Su(e,t);return new Proxy(x,{get(C,A){if(!S.includes(A))return C[A];let L=[a[A].type,r,A],N=[g,h];return An(e,...L,...N)},...lr([...S,...Object.getOwnPropertyNames(x)])})}}function Su(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}m();c();p();d();f();m();c();p();d();f();var xo=he(Ai());m();c();p();d();f();zr();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var yo={keyword:Se,entity:Se,value:e=>pe(Je(e)),punctuation:Je,directive:Se,function:Se,variable:e=>pe(Je(e)),string:e=>pe(Pt(e)),boolean:Tt,number:Se,comment:Ct};var Ou=e=>e,Cr={},ku=0,D={manual:Cr.Prism&&Cr.Prism.manual,disableWorkerMessageHandler:Cr.Prism&&Cr.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(Ae instanceof me)continue;if(z&&Q!=t.length-1){N.lastIndex=ie;var h=N.exec(e);if(!h)break;var g=h.index+(O?h[1].length:0),x=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,Ae=e.slice(ie,l),h.index-=ie}else{N.lastIndex=0;var h=N.exec(Ae),u=1}if(!h){if(o)break;continue}O&&(U=h[1]?h[1].length:0);var g=h.index+U,h=h[0].slice(U),x=g+h.length,S=Ae.slice(0,g),C=Ae.slice(x);let X=[Q,u];S&&(++Q,ie+=S.length,X.push(S));let ze=new me(A,M?D.tokenize(h,M):h,wt,h,z);if(X.push(ze),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(""):Fu(e.type)(e.content)};function Fu(e){return yo[e]||Ou}function wo(e){return Mu(e,D.languages.javascript)}function Mu(e,t){return D.tokenize(e,t).map(n=>me.stringify(n)).join("")}m();c();p();d();f();var bo=he(Pi());function Eo(e){return(0,bo.default)(e)}var Ar=class e{static read(t){let r;try{r=er.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,Eo(n).split(` +`))}highlight(){let t=wo(this.toString());return new e(this.firstLineNumber,t.split(` +`))}toString(){return this.lines.join(` +`)}};var _u={red:Qe,gray:Ct,dim:xt,bold:pe,underline:vt,highlightSource:e=>e.highlight()},Lu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Iu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Nu({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=Iu({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=Ar.read(a.fileName)?.slice(l,a.lineNumber),g=u?.lineAt(a.lineNumber);if(u&&g){let h=$u(g),x=Du(g);if(!x)return s;s.functionName=`${x.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,C=>C.slice(0,x.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,xo.default)(i,C).slice(C)}}return s}function Du(e){let t=Object.keys(Ie.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 $u(e){let t=0;for(let r=0;r{if("rejectOnNotFound"in n.args){let o=gt({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new Y(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof W&&o.code==="P2025"?new ke(`No ${e} found`,t):o})}}m();c();p();d();f();function Te(e){return e.replace(/^./,t=>t.toLowerCase())}var qu=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Vu=["aggregate","count","groupBy"];function Rn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Qu(e,t),Gu(e,t),$t(r),ne("name",()=>t),ne("$name",()=>t),ne("$parent",()=>e._appliedParent)];return Ee({},n)}function Qu(e,t){let r=Te(t),n=Object.keys(Ie.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=vo(o,t,e._clientVersion,s);let a=l=>u=>{let g=Ue(e._errorFormat);return e._createPrismaPromise(h=>{let x={args:u,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:h,callsite:g};return s({...x,...l})})};return qu.includes(o)?An(e,t,a):Ju(i)?fo(e,i,a):a({})}}}function Ju(e){return Vu.includes(e)}function Gu(e,t){return We(ne("fields",()=>{let r=e._runtimeDataModel.models[t];return mo(t,r)}))}m();c();p();d();f();function Po(e){return e.replace(/^./,t=>t.toUpperCase())}var Sn=Symbol();function qt(e){let t=[Wu(e),ne(Sn,()=>e),ne("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push($t(r)),Ee(e,t)}function Wu(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Te),n=[...new Set(t.concat(r))];return We({getKeys(){return n},getPropertyValue(i){let o=Po(i);if(e._runtimeDataModel.models[o]!==void 0)return Rn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Rn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function To(e){return e[Sn]?e[Sn]:e}function Co(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)}m();c();p();d();f();m();c();p();d();f();function Ao({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(nt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(nt(u))}Ku(e,l.needs)&&s.push(Hu(l,Ee(e,s)))}return s.length>0||a.length>0?Ee(e,[...s,...a]):e}function Ku(e,t){return t.every(r=>sn(e,r))}function Hu(e,t){return We(ne(e.name,()=>e.compute(t)))}m();c();p();d();f();function Rr({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]=Rr({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function So({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Rr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=Te(l);return Ao({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 Oo(e){if(e instanceof se)return zu(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:Oo(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Io(o,l),a.args=s,Fo(e,a,r,n+1)}})})}function Mo(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 Fo(e,t,s)}function _o(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Lo(r,n,0,e):e(r)}}function Lo(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=Io(i,l),Lo(a,t,r+1,n)}})}var ko=e=>e;function Io(e=ko,t=ko){return r=>e(t(r))}m();c();p();d();f();m();c();p();d();f();function Do(e,t,r){let n=Te(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Yu({...e,...No(t.name,e,t.result.$allModels),...No(t.name,e,t.result[n])})}function Yu(e){let t=new be,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 tt(e,n=>({...n,needs:r(n.name,new Set)}))}function No(e,t,r){return r?tt(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Zu(t,o,i)})):{}}function Zu(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):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)r[i]=!0;return r}function Bo(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 Sr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new be;this.modelExtensionsCache=new be;this.queryCallbacksCache=new be;this.clientExtensions=Mt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Mt(()=>{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=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()}},Or=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Sr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Sr(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();var jo=le("prisma:client"),Uo={Vercel:"vercel","Netlify CI":"netlify"};function qo({postinstall:e,ciName:t,clientVersion:r}){if(jo("checkPlatformCaching:postinstall",e),jo("checkPlatformCaching:ciName",t),e===!0&&t&&t in Uo){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/${Uo[t]}-build`;throw console.error(n),new V(n,r)}}m();c();p();d();f();function Vo(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 Xu="Cloudflare-Workers",ec="node";function Qo(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Xu?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===ec?"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 Jo(){let e=Qo();return{id:e,prettyName:tc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}m();c();p();d();f();m();c();p();d();f();var On=he(on());m();c();p();d();f();function Go(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}m();c();p();d();f();function Wo(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 Ko=he(Fi());function Ho({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,Ko.default)({user:t,repo:r,template:n,title:e,body:i})}function zo({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=hi(6e3-(s?.length??0)),l=Wo((0,On.default)(a)),u=n?`# Description +\`\`\` +${n} +\`\`\``:"",g=(0,On.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?Go(s):""} +\`\`\` +`),h=Ho({title:r,body:g});return`${r} + +This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. + +${vt(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 kr({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 Yo(e){if(e?.kind==="itx")return e.options.id}m();c();p();d();f();var kn=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)}},Zo={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:kn}}};var rc="P2036",Ce=le("prisma:client:libraryEngine");function nc(e){return e.item_type==="query"&&"query"in e}function ic(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var uC=[...en,"native"],Qt=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=Zo,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(oc(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(Ce("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&&Ce("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",nc(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):ic(r)?this.loggerRustPanic=new ue(Fn(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 Ce(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Ce("library starting");try{let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,Ce("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 Ce("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),Ce("library stopping");let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Ce("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}){Ce(`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(Fn(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}){Ce("requestBatch");let i=ur(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),Yo(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(Fn(this,t.user_facing_error.message),this.config.clientVersion);let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:Pr(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===rc&&this.config.adapter){let r=t.meta?.id;nr(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return nr(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 oc(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function Fn(e,t){return zo({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function Xo({copyEngine:e=!0},t){let r;try{r=kr({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}e&&r?.startsWith("prisma://")&&Ft("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=St(t.generator),i=!!(r?.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o&&!1){let l;throw e?r?.startsWith("prisma://")?l=["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."]:l=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:l=["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 Y(l.join(` +`),{clientVersion:t.clientVersion})}return new Qt(t)}m();c();p();d();f();function Fr({generator:e}){return e?.previewFeatures??[]}m();c();p();d();f();m();c();p();d();f();function ht(e){return e.substring(0,1).toLowerCase()+e.substring(1)}m();c();p();d();f();m();c();p();d();f();var os=he(Mn());m();c();p();d();f();function ns(e,t,r){let n=is(e),i=sc(n),o=lc(i);o?Mr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function is(e){return e.errors.flatMap(t=>t.kind==="Union"?is(t):[t])}function sc(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:ac(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function ac(e,t){return[...new Set(e.concat(t))]}function lc(e){return ln(e,(t,r)=>{let n=ts(t),i=ts(r);return n!==i?n-i:rs(t)-rs(r)})}function ts(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function rs(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();var Jt=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 Mr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":uc(e,t);break;case"IncludeOnScalar":cc(e,t);break;case"EmptySelection":pc(e,t,r);break;case"UnknownSelectionField":gc(e,t);break;case"UnknownArgument":hc(e,t);break;case"UnknownInputField":yc(e,t);break;case"RequiredArgumentMissing":wc(e,t);break;case"InvalidArgumentType":bc(e,t);break;case"InvalidArgumentValue":Ec(e,t);break;case"ValueTooLarge":xc(e,t);break;case"SomeFieldsMissing":vc(e,t);break;case"TooManyFieldsGiven":Pc(e,t);break;case"Union":ns(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function uc(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 cc(e,t){let[r,n]=Gt(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)}. ${Wt(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function pc(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){dc(e,t,i);return}if(n.hasField("select")){fc(e,t);return}}if(r?.[ht(e.outputType.name)]){mc(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function dc(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 fc(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),ls(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Wt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function mc(e,t){let r=new Jt;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]=Gt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new dt;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 gc(e,t){let[r,n]=Gt(e.selectionPath),i=t.arguments.getDeepSubSelectionValue(r)?.asObject(),o;if(i){let s=i.getFieldValue("select")?.asObject(),a=i.getFieldValue("include")?.asObject(),l=i.getFieldValue("omit")?.asObject();s?.hasField(n)?(o="select",s.getField(n)?.markAsError(),ls(s,e.outputType)):a?.hasField(n)?(o="include",a.getField(n)?.markAsError(),Tc(a,e.outputType)):l?.hasField(n)&&(o="omit",l.getField(n)?.markAsError(),Cc(l,e.outputType))}t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(Wt(s)),a.join(" ")})}function hc(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Ac(n,e.arguments)),t.addErrorMessage(i=>ss(i,r,e.arguments.map(o=>o.name)))}function yc(e,t){let[r,n]=Gt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&us(o,e.inputType)}t.addErrorMessage(o=>ss(o,n,e.inputType.fields.map(s=>s.name)))}function ss(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Sc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Wt(e)),n.join(" ")}function wc(e,t){let r;t.addErrorMessage(l=>r?.value instanceof H&&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]=Gt(e.argumentPath),s=new Jt,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(as).join(" | ");a.addSuggestion(new ce(o,l).makeRequired())}}function as(e){return e.kind==="list"?`${as(e.elementType)}[]`:e.name}function bc(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=_r("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 Ec(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=_r("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function xc(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 H&&(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 vc(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&&us(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")} ${_r("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(Wt(i)),o.join(" ")})}function Pc(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 ${_r("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function ls(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ce(r.name,"true"))}function Tc(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ce(r.name,"true"))}function Cc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ce(r.name,"true"))}function Ac(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ce(r.name,r.typeNames.join(" | ")))}function us(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 Gt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Wt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function _r(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Rc=3;function Sc(e,t){let r=1/0,n;for(let i of t){let o=(0,os.default)(e,i);o>Rc||o({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?.[ht(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:Oe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};m();c();p();d();f();var fs=e=>({command:e});m();c();p();d();f();m();c();p();d();f();var ms=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);m();c();p();d();f();function Ht(e){try{return gs(e,"fast")}catch{return gs(e,"slow")}}function gs(e,t){return JSON.stringify(e.map(r=>$c(r,t)))}function $c(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:ot(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")}:Bc(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?ys(e):e}function Bc(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function ys(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(hs);let t={};for(let r of Object.keys(e))t[r]=hs(e[r]);return t}function hs(e){return typeof e=="bigint"?e.toString():ys(e)}var jc=/^(\s*alter\s)/i,ws=le("prisma:client");function Ln(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&jc.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 In=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Ht(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Ht(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Ht(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=ms(r),i={values:Ht(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?ws(`prisma.${e}(${n}, ${i.values})`):ws(`prisma.${e}(${n})`),{query:n,parameters:i}},bs={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new se(t,r)}},Es={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};m();c();p();d();f();function Nn(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=xs(r(o)):xs(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 xs(e){return typeof e.then=="function"?e:Promise.resolve(e)}m();c();p();d();f();var vs={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Dn=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??vs}};function Ps(e){return e.includes("tracing")?new Dn:vs}m();c();p();d();f();function Ts(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();var Uc=["$connect","$disconnect","$on","$transaction","$use","$extends"],Cs=Uc;m();c();p();d();f();function As(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 Ir=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 Os=he(on());m();c();p();d();f();function Nr(e){return typeof e.batchRequestIdx=="number"}m();c();p();d();f();function Dr(e){return e===null?e:Array.isArray(e)?e.map(Dr):typeof e=="object"?qc(e)?Vc(e):tt(e,Dr):e}function qc(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Vc({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return w.Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new ve(t);case"Json":return JSON.parse(t);default:Oe(t,"Unknown tagged value")}}m();c();p();d();f();function Rs(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push($n(e.query.arguments)),t.push($n(e.query.selection)),t.join("")}function $n(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${$n(n)})`:r}).join(" ")})`}m();c();p();d();f();var Qc={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 Bn(e){return Qc[e]}m();c();p();d();f();var $r=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 Ss(e){let t=[],r=Jc(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=>Bn(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Wc(o),containsWrite:u,customDataProxyFetch:i})).map((h,x)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[x],h)}catch(S){return S}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?ks(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Bn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Rs(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(Gc(t),Kc(t,i)||t instanceof ke)throw t;if(t instanceof W&&Hc(t)){let u=Fs(t.meta);Lr({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=gt({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,Os.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=Cn(o,s),l=i==="queryRaw"?Ss(a):Dr(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Wc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:ks(e)};Oe(e,"Unknown transaction kind")}}function ks(e){return{id:e.id,payload:e.payload}}function Kc(e,t){return Nr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Hc(e){return e.code==="P2009"||e.code==="P2012"}function Fs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Fs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}m();c();p();d();f();var Ms="5.18.0";var _s=Ms;m();c();p();d();f();var $s=he(Mn());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 Ls=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Is=["pretty","colorless","minimal"],Ns=["info","query","warn","error"],Yc={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=yt(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(!Fr(t).includes("driverAdapters"))throw new B('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(St()==="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(!Is.includes(e)){let t=yt(e,Is);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"&&!Ns.includes(r)){let n=yt(r,Ns);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=yt(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=Xc(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(ep(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=yt(r,t);throw new B(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Bs(e,t){for(let[r,n]of Object.entries(e)){if(!Ls.includes(r)){let i=yt(r,Ls);throw new B(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Yc[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 yt(e,t){if(t.length===0||typeof e!="string")return"";let r=Zc(e,t);return r?` Did you mean "${r}"?`:""}function Zc(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,$s.default)(e,i)}));r.sort((i,o)=>i.distanceht(n)===t);if(r)return e[r]}function ep(e,t){let r=ft(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}=vr(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}m();c();p();d();f();function js(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(!Nr(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 tp={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},rp=Symbol.for("prisma.client.transaction.id"),np={id:0,nextId(){return++this.id}};function Vs(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Ir;this._createPrismaPromise=Nn();this.$extends=Co;e=n?.__internal?.configOverride?.(e)??e,qo(e),n&&Bs(n,e);let i=new rr().on("error",()=>{});this._extensions=Or.empty(),this._previewFeatures=Fr(e),this._clientVersion=e.clientVersion??_s,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Ps(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);er.existsSync(h)||(h=e.dirname),qe("dirname",e.dirname),qe("relativePath",e.relativePath),qe("cwd",h);let x=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:x.allowTriggerPanic,datamodelPath:we.join(e.dirname,e.filename??"schema.prisma"),prismaPath:x.binaryPath??void 0,engineEndpoint:x.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&As(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:Vo(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:kr,getBatchRequestPayload:ur,prismaGraphQLToJSError:Pr,PrismaClientUnknownRequestError:K,PrismaClientInitializationError:V,PrismaClientKnownRequestError:W,debug:le("prisma:client:accelerateEngine"),engineVersion:qs.version,clientVersion:e.clientVersion}},qe("clientVersion",e.clientVersion),this._engine=Xo(e,this._engineConfig),this._requestHandler=new Br(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=>{kt.log(`${kt.tags[C]??""}`,A.message||A.query)})}this._metrics=new rt(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{yi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:In({clientMethod:i,activeProvider:a}),callsite:Ue(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Us(n,i);return Ln(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new Y("`$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=>(Ln(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new Y(`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:fs,callsite:Ue(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:In({clientMethod:i,activeProvider:a}),callsite:Ue(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",...Us(n,i));throw new Y("`$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})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=np.nextId(),s=Ts(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 js(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(Ee(To(this),[ne("_appliedParent",()=>this._appliedParent._createItxClient(n)),ne("_createPrismaPromise",()=>Nn(n)),ne(rp,()=>n.id),nt(Cs)]))}$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??tp,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,L=>(F?.end(),l(L))));let{runInTransaction:h,args:x,...S}=u,C={...n,...S};x&&(C.args=i.middlewareArgsToRequestArgs(x)),n.transaction!==void 0&&h===!1&&delete C.transaction;let A=await Mo(this,C);return C.model?So({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:x,customDataProxyFetch:S}){try{n=u?u(n):n;let C={name:"serialize"},A=this._tracingHelper.runInChildSpan(C,()=>cs({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}(${so(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:x,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 Y("`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 Us(e,t){return ip(e)?[new se(e,t),bs]:[e,Es]}function ip(e){return Array.isArray(e)&&Array.isArray(e.raw)}m();c();p();d();f();var op=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Qs(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!op.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,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); +//# sourceMappingURL=react-native.js.map diff --git a/experiments/postgres/prisma/generated/client/runtime/wasm.js b/experiments/postgres/prisma/generated/client/runtime/wasm.js new file mode 100644 index 000000000..cbb208250 --- /dev/null +++ b/experiments/postgres/prisma/generated/client/runtime/wasm.js @@ -0,0 +1,32 @@ +"use strict";var vo=Object.create;var Rt=Object.defineProperty;var To=Object.getOwnPropertyDescriptor;var Co=Object.getOwnPropertyNames;var Ro=Object.getPrototypeOf,Ao=Object.prototype.hasOwnProperty;var se=(e,t)=>()=>(e&&(t=e(e=0)),t);var _e=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),At=(e,t)=>{for(var r in t)Rt(e,r,{get:t[r],enumerable:!0})},Wr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Co(t))!Ao.call(e,i)&&i!==r&&Rt(e,i,{get:()=>t[i],enumerable:!(n=To(t,i))||n.enumerable});return e};var De=(e,t,r)=>(r=e!=null?vo(Ro(e)):{},Wr(t||!e||!e.__esModule?Rt(r,"default",{value:e,enumerable:!0}):r,e)),So=e=>Wr(Rt({},"__esModule",{value:!0}),e);function cr(e,t){if(t=t.toLowerCase(),t==="utf8"||t==="utf-8")return new h(Lo.encode(e));if(t==="base64"||t==="base64url")return e=e.replace(/-/g,"+").replace(/_/g,"/"),e=e.replace(/[^A-Za-z0-9+/]/g,""),new h([...atob(e)].map(r=>r.charCodeAt(0)));if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return new h([...e].map(r=>r.charCodeAt(0)));if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let r=new h(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(y=0){return $(y,"offset"),Y(y,"offset"),q(y,"offset",this.length-1),new DataView(this.buffer)[r[a]](y,u)},o=(a,u)=>function(y,T=0){let C=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),O=Mo[C];return $(T,"offset"),Y(T,"offset"),q(T,"offset",this.length-1),ko(y,"value",O[0],O[1]),new DataView(this.buffer)[r[a]](T,y,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 Hr(e){throw new Error(`Buffer polyfill does not implement "${e}"`)}function St(e,t){if(!(e instanceof Uint8Array))throw new TypeError(`The "${t}" argument must be an instance of Buffer or Uint8Array`)}function q(e,t,r=Do+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 $(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 ko(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 Kr(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 Fo(e,t="utf8"){return h.from(e,t)}var h,Mo,Lo,Io,_o,Do,b,mr,c=se(()=>{"use strict";h=class e extends Uint8Array{constructor(){super(...arguments);this._isBuffer=!0}get offset(){return this.byteOffset}static alloc(r,n=0,i="utf8"){return Kr(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 cr(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 _o.includes(r)}static compare(r,n){St(r,"buff1"),St(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 cr(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){$(r,"offset"),Y(r,"offset"),q(r,"offset",this.length-1),$(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){$(n,"offset"),Y(n,"offset"),q(n,"offset",this.length-1),$(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){q(n,"targetStart"),q(i,"sourceStart",this.length),q(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((y,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 Io.decode(this.slice(n,i));if(r==="base64"||r==="base64url"){let o=btoa(this.reduce((s,a)=>s+mr(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+mr(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"),"");Hr(`encoding "${r}"`)}toLocaleString(){return this.toString()}inspect(){return``}};Mo={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]},Lo=new TextEncoder,Io=new TextDecoder,_o=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],Do=4294967295;Oo(h.prototype);b=new Proxy(Fo,{construct(e,[t,r]){return h.from(t,r)},get(e,t){return h[t]}}),mr=String.fromCodePoint});var g,m=se(()=>{"use strict";g={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 Zr(e,t){var r,n,i,o,s,a,u,y,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,y=t.d,s=e.e,i=t.e,u=u.slice(),o=s-i,o){for(o<0?(n=u,o=-o,a=y.length):(n=y,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=y.length,a-o<0&&(o=a,n=y,y=u,u=n),r=0;o;)r=(u[--o]=u[o]+y[o]+r)/j|0,u[o]%=j;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(Ae+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(dr+V(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),y+=5;for(n=Math.log(Re(2,y))/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(ge(i,r,a)),ae(s.d).slice(0,a)===ae(o.d).slice(0,a)){for(;y--;)o=D(o.times(o),a);return T.precision=C,t==null?(U=!0,D(o,C)):o}o=s}}function V(e){for(var t=e.e*N,r=e.d[0];r>=10;r/=10)t++;return t}function pr(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 Ee(e){for(var t="";e--;)t+="0";return t}function et(e,t){var r,n,i,o,s,a,u,y,T,C=1,O=10,A=e,M=A.d,S=A.constructor,L=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,y=L):y=t,A.eq(10))return t==null&&(U=!0),pr(S,y);if(y+=O,S.precision=y,r=ae(M),n=r.charAt(0),o=V(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=V(A),n>1?(A=new S("0."+r),o++):A=new S(n+"."+r.slice(1))}else return u=pr(S,y+2,L).times(o+""),A=et(new S(n+"."+r.slice(1)),y-O).plus(u),S.precision=L,t==null?(U=!0,D(A,L)):A;for(a=s=A=ge(A.minus(Z),A.plus(Z),y),T=D(A.times(A),y),i=3;;){if(s=D(s.times(T),y),u=a.plus(ge(s,new S(i),y)),ae(u.d).slice(0,y)===ae(a.d).slice(0,y))return a=a.times(2),o!==0&&(a=a.plus(pr(S,y+2,L).times(o+""))),a=ge(a,new S(C),y),S.precision=L,t==null?(U=!0,D(a,L)):a;a=u,i+=2}}function zr(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=Ne(r/N),e.d=[],n=(r+1)%N,r<0&&(n+=N),nOt||e.e<-Ot))throw Error(dr+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,y,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,y=C[T=0];else{if(T=Math.ceil((n+1)/N),o=C.length,T>=o)return e;for(y=o=C[T],s=1;o>=10;o/=10)s++;n%=N,i=n-N+s}if(r!==void 0&&(o=Re(10,s-i-1),a=y/o%10|0,u=t<0||C[T+1]!==void 0||y%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?y/Re(10,s-i):0:C[T-1])%10&1||r==(e.s<0?8:7))),t<1||!C[0])return u?(o=V(e),C.length=1,t=t-o-1,C[0]=Re(10,(N-t%N)%N),e.e=Ne(-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=Re(10,N-n),C[T]=i>0?(y/Re(10,s-i)%Re(10,i)|0)*o:0),u)for(;;)if(T==0){(C[0]+=o)==j&&(C[0]=1,++e.e);break}else{if(C[T]+=o,C[T]!=j)break;C[T--]=0,o=1}for(n=C.length;C[--n]===0;)C.pop();if(U&&(e.e>Ot||e.e<-Ot))throw Error(dr+V(e));return e}function tn(e,t){var r,n,i,o,s,a,u,y,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,y=e.e,u=u.slice(),s=y-n,s){for(T=s<0,T?(r=u,s=-s,a=C.length):(r=C,n=y,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)+Ee(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ee(-i-1)+o,r&&(n=r-s)>0&&(o+=Ee(n))):i>=s?(o+=Ee(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ee(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ee(n))),e.s<0?"-"+o:o}function Yr(e,t){if(e.length>t)return e.length=t,!0}function rn(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(Ae+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 zr(s,o.toString())}else if(typeof o!="string")throw Error(Ae+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,Uo.test(o))zr(s,o);else throw Error(Ae+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=rn,i.config=i.set=Bo,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(Ae+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ae+r+": "+n);return this}var Fe,No,fr,U,re,Ae,dr,Ne,Re,Uo,Z,j,N,Xr,Ot,R,ge,fr,kt,nn=se(()=>{"use strict";c();m();p();d();f();l();Fe=1e9,No={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},U=!0,re="[DecimalError] ",Ae=re+"Invalid argument: ",dr=re+"Exponent out of range: ",Ne=Math.floor,Re=Math.pow,Uo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,j=1e7,N=7,Xr=9007199254740991,Ot=Ne(Xr/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 ge(this,new this.constructor(e))};R.dividedToIntegerBy=R.idiv=function(e){var t=this,r=t.constructor;return D(ge(t,new r(e),0,1),r.precision)};R.equals=R.eq=function(e){return!this.cmp(e)};R.exponent=function(){return V(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=ge(et(r,o),et(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?tn(t,e):Zr(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=ge(r,e,0,1).times(e),U=!0,r.minus(t)):D(new n(r),i)};R.naturalExponential=R.exp=function(){return en(this)};R.naturalLogarithm=R.ln=function(){return et(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?Zr(t,e):tn(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(Ae+e);if(t=V(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=V(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=Ne((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(ge(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,y,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,y=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%j|0,t=a/j|0;o[i]=(o[i]+t)%j|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,Fe),t===void 0?t=n.rounding:le(t,0,8),D(r,e+V(r)+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Se(n,!0):(le(e,0,Fe),t===void 0?t=i.rounding:le(t,0,8),n=D(new i(n),e+1,t),r=Se(n,!0,e+1)),r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Se(i):(le(e,0,Fe),t===void 0?t=o.rounding:le(t,0,8),n=D(new o(i),e+V(i)+1,t),r=Se(n.abs(),!1,e+V(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};R.toInteger=R.toint=function(){var e=this,t=e.constructor;return D(new t(e),V(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,y=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)<=Xr){for(i=new u(Z),t=Math.ceil(n/N+4),U=!1;r%2&&(i=i.times(a),Yr(i.d,t)),r=Ne(r/2),r!==0;)a=a.times(a),Yr(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(et(a,n+y)),U=!0,i=en(i),i.s=o,i};R.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=V(i),n=Se(i,r<=o.toExpNeg||r>=o.toExpPos)):(le(e,1,Fe),t===void 0?t=o.rounding:le(t,0,8),i=D(new o(i),e,t),r=V(i),n=Se(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,Fe),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=V(e),r=e.constructor;return Se(e,t<=r.toExpNeg||t>=r.toExpPos)};ge=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%j|0,s=o/j|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,y,T,C,O,A,M,S,L,ne,z,Ie,k,Ce,ur,ie,Tt,Ct=n.constructor,Po=n.s==i.s?1:-1,oe=n.d,B=i.d;if(!n.s)return new Ct(n);if(!i.s)throw Error(re+"Division by zero");for(u=n.e-i.e,ie=B.length,Ce=oe.length,A=new Ct(Po),M=A.d=[],y=0;B[y]==(oe[y]||0);)++y;if(B[y]>(oe[y]||0)&&--u,o==null?z=o=Ct.precision:s?z=o+(V(n)-V(i))+1:z=o,z<0)return new Ct(0);if(z=z/N+2|0,y=0,ie==1)for(T=0,B=B[0],z++;(y1&&(B=e(B,T),oe=e(oe,T),ie=B.length,Ce=oe.length),k=ie,S=oe.slice(0,ie),L=S.length;L=j/2&&++ur;do T=0,a=t(B,S,ie,L),a<0?(ne=S[0],ie!=L&&(ne=ne*j+(S[1]||0)),T=ne/ur|0,T>1?(T>=j&&(T=j-1),C=e(B,T),O=C.length,L=S.length,a=t(C,S,O,L),a==1&&(T--,r(C,ie{"use strict";nn();v=class extends kt{static isDecimal(t){return t instanceof kt}static random(t=20){{let n=crypto.getRandomValues(new Uint8Array(t)).reduce((i,o)=>i+o,"");return new kt(`0.${n.slice(0,t)}`)}}},ue=v});function $o(){return!1}var Vo,qo,ln,un=se(()=>{"use strict";c();m();p();d();f();l();Vo={},qo={existsSync:$o,promises:Vo},ln=qo});function Ko(...e){return e.join("/")}function Ho(...e){return e.join("/")}var vn,zo,Yo,rt,Tn=se(()=>{"use strict";c();m();p();d();f();l();vn="/",zo={sep:vn},Yo={resolve:Ko,posix:zo,join:Ho,sep:vn},rt=Yo});var _t,Rn=se(()=>{"use strict";c();m();p();d();f();l();_t=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 Sn=_e((Mc,An)=>{"use strict";c();m();p();d();f();l();An.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 Mn=_e((Jc,kn)=>{"use strict";c();m();p();d();f();l();kn.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 In=_e((Xc,Ln)=>{"use strict";c();m();p();d();f();l();var ns=Mn();Ln.exports=e=>typeof e=="string"?e.replace(ns(),""):e});var Nn=_e((Sf,as)=>{as.exports={name:"@prisma/engines-version",version:"5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"4c784e32044a8a016d99474bd02a3b6123742169"},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 Un=_e(()=>{"use strict";c();m();p();d();f();l()});var Br=_e((vC,Oi)=>{"use strict";c();m();p();d();f();l();Oi.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;swr,Decimal:()=>ue,Extensions:()=>gr,MetricsClient:()=>$e,NotFoundError:()=>ye,PrismaClientInitializationError:()=>I,PrismaClientKnownRequestError:()=>Q,PrismaClientRustPanicError:()=>be,PrismaClientUnknownRequestError:()=>J,PrismaClientValidationError:()=>G,Public:()=>hr,Sql:()=>X,defineDmmfProperty:()=>Fn,empty:()=>$n,getPrismaClient:()=>wo,getRuntime:()=>ve,join:()=>Bn,makeStrictEnum:()=>Eo,objectEnumValues:()=>Nt,raw:()=>kr,sqltag:()=>Mr,warnEnvConflicts:()=>void 0,warnOnce:()=>st});module.exports=So(Wa);c();m();p();d();f();l();var gr={};At(gr,{defineExtension:()=>on,getExtensionContext:()=>sn});c();m();p();d();f();l();c();m();p();d();f();l();function on(e){return typeof e=="function"?e:t=>t.$extends(e)}c();m();p();d();f();l();function sn(e){return e}var hr={};At(hr,{validator:()=>an});c();m();p();d();f();l();c();m();p();d();f();l();function an(...e){return t=>t}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var yr,cn,mn,pn,dn=!0;typeof g<"u"&&({FORCE_COLOR:yr,NODE_DISABLE_COLORS:cn,NO_COLOR:mn,TERM:pn}=g.env||{},dn=g.stdout&&g.stdout.isTTY);var jo={enabled:!cn&&mn==null&&pn!=="dumb"&&(yr!=null&&yr!=="0"||dn)};function F(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!jo.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Xl=F(0,0),Mt=F(1,22),Lt=F(2,22),Zl=F(3,23),fn=F(4,24),eu=F(7,27),tu=F(8,28),ru=F(9,29),nu=F(30,39),Ue=F(31,39),gn=F(32,39),hn=F(33,39),yn=F(34,39),iu=F(35,39),bn=F(36,39),ou=F(37,39),wn=F(90,39),su=F(90,39),au=F(40,49),lu=F(41,49),uu=F(42,49),cu=F(43,49),mu=F(44,49),pu=F(45,49),du=F(46,49),fu=F(47,49);c();m();p();d();f();l();var Qo=100,En=["green","yellow","blue","magenta","cyan","red"],It=[],xn=Date.now(),Jo=0,br=typeof g<"u"?g.env:{};globalThis.DEBUG??=br.DEBUG??"";globalThis.DEBUG_COLORS??=br.DEBUG_COLORS?br.DEBUG_COLORS==="true":!0;var tt={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 Go(e){let t={color:En[Jo++%En.length],enabled:tt.enabled(e),namespace:e,log:tt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&It.push([o,...n]),It.length>Qo&&It.shift(),tt.enabled(o)||i){let u=n.map(T=>typeof T=="string"?T:Wo(T)),y=`+${Date.now()-xn}ms`;xn=Date.now(),a(o,...u,y)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var wr=new Proxy(Go,{get:(e,t)=>tt[t],set:(e,t,r)=>tt[t]=r});function Wo(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 Pn(){It.length=0}var ee=wr;c();m();p();d();f();l();c();m();p();d();f();l();var Er=["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 Cn="library";function nt(e){let t=Xo();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":Cn)}function Xo(){let e=g.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 Oe;(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||={})})(Oe||={});var ot={};At(ot,{error:()=>ts,info:()=>es,log:()=>Zo,query:()=>rs,should:()=>On,tags:()=>it,warn:()=>xr});c();m();p();d();f();l();var it={error:Ue("prisma:error"),warn:hn("prisma:warn"),info:bn("prisma:info"),query:yn("prisma:query")},On={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function Zo(...e){console.log(...e)}function xr(e,...t){On.warn()&&console.warn(`${it.warn} ${e}`,...t)}function es(e,...t){console.info(`${it.info} ${e}`,...t)}function ts(e,...t){console.error(`${it.error} ${e}`,...t)}function rs(e,...t){console.log(`${it.query} ${e}`,...t)}c();m();p();d();f();l();function Dt(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 he(e,t){throw new Error(t)}c();m();p();d();f();l();function Pr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}c();m();p();d();f();l();var vr=(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 Tr(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{_n.has(e)||(_n.add(e),xr(t,...r))};c();m();p();d();f();l();var Q=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(Q,"PrismaClientKnownRequestError");var ye=class extends Q{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};K(ye,"NotFoundError");c();m();p();d();f();l();var I=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(I,"PrismaClientInitializationError");c();m();p();d();f();l();var be=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};K(be,"PrismaClientRustPanicError");c();m();p();d();f();l();var J=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(J,"PrismaClientUnknownRequestError");c();m();p();d();f();l();var G=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};K(G,"PrismaClientValidationError");c();m();p();d();f();l();var $e=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();c();m();p();d();f();l();function at(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Fn(e,t){let r=at(()=>is(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function is(e){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Cr(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}c();m();p();d();f();l();var Ft=Symbol(),Rr=new WeakMap,we=class{constructor(t){t===Ft?Rr.set(this,`Prisma.${this._getName()}`):Rr.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Rr.get(this)}},lt=class extends we{_getNamespace(){return"NullTypes"}},ut=class extends lt{};Ar(ut,"DbNull");var ct=class extends lt{};Ar(ct,"JsonNull");var mt=class extends lt{};Ar(mt,"AnyNull");var Nt={classes:{DbNull:ut,JsonNull:ct,AnyNull:mt},instances:{DbNull:new ut(Ft),JsonNull:new ct(Ft),AnyNull:new mt(Ft)}};function Ar(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}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 Sr=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}},Or=e=>{let t=new Sr,r=ke(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:ke(t,e.queryRaw.bind(e)),executeRaw:ke(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>os(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=ss(t,e.getConnectionInfo.bind(e))),n},os=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:ke(e,t.queryRaw.bind(t)),executeRaw:ke(e,t.executeRaw.bind(t)),commit:ke(e,t.commit.bind(t)),rollback:ke(e,t.rollback.bind(t))});function ke(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return pt({kind:"GenericJs",id:i})}}}function ss(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return pt({kind:"GenericJs",id:i})}}}var bo=De(Nn());var mO=De(Un());Rn();un();Tn();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 Ut={enumerable:!0,configurable:!0,writable:!0};function Bt(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Ut,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Vn=Symbol.for("nodejs.util.inspect.custom");function me(e,t){let r=ls(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=qn(Reflect.ownKeys(o),r),a=qn(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?{...Ut,...u?.getPropertyDescriptor(s)}:Ut:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[Vn]=function(){let o={...this};return delete o[Vn],o},i}function ls(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 qn(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}c();m();p();d();f();l();function Ve(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}c();m();p();d();f();l();function $t(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}c();m();p();d();f();l();c();m();p();d();f();l();var qe=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();function jn(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 Vt(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();var ft=class{constructor(t,r,n,i,o){this.modelName=t,this.name=r,this.typeName=n,this.isList=i,this.isEnum=o}_toGraphQLInputType(){let t=this.isList?"List":"",r=this.isEnum?"Enum":"";return`${t}${r}${this.typeName}FieldRefInput<${this.modelName}>`}};function Je(e){return e instanceof ft}c();m();p();d();f();l();c();m();p();d();f();l();var qt=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},Qn={bold:Mt,red:Ue,green:gn,dim:Lt,enabled:!0},Ge={write(e){e.writeLine(",")}};c();m();p();d();f();l();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)))})}};c();m();p();d();f();l();var xe=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var We=class extends xe{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new qt(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(Ge,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};c();m();p();d();f();l();var Jn=": ",Jt=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()+Jn.length}write(t){let r=new pe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Jn).write(this.value)}};c();m();p();d();f();l();var Ke=class e extends xe{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 We&&(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 pe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(Ge,[...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 xe{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 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 He(e){return new Lr(Gn(e))}function Gn(e){let t=new Ke;for(let[r,n]of Object.entries(e)){let i=new Jt(r,Wn(n));t.addField(i)}return t}function Wn(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=Vt(e)?e.toISOString():"Invalid Date";return new W(`new Date("${t}")`)}return e instanceof we?new W(`Prisma.${e._getName()}`):Je(e)?new W(`prisma.${jn(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?cs(e):typeof e=="object"?Gn(e):new W(Object.prototype.toString.call(e))}function cs(e){let t=new We;for(let r of e)t.addItem(Wn(r));return t}function Gt(e,t){let r=t==="pretty"?Qn:Qt,n=e.renderAllMessages(r),i=new qe(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Kn(e){if(e===void 0)return"";let t=He(e);return new qe(0,{colors:Qt}).write(t).toString()}c();m();p();d();f();l();var ms="P2037";function Wt({error:e,user_facing_error:t},r,n){return t.error_code?new Q(ps(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new J(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function ps(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===ms&&(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 Ir=class{getLocation(){return null}};function Pe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Ir}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var Hn={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function ze(e={}){let t=fs(e);return Object.entries(t).reduce((n,[i,o])=>(Hn[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function fs(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Kt(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function zn(e,t){let r=Kt(e);return t({action:"aggregate",unpacker:r,argsMapper:ze})(e)}c();m();p();d();f();l();function gs(e={}){let{select:t,...r}=e;return typeof t=="object"?ze({...r,_count:t}):ze({...r,_count:{_all:!0}})}function hs(e={}){return typeof e.select=="object"?t=>Kt(e)(t)._count:t=>Kt(e)(t)._count._all}function Yn(e,t){return t({action:"count",unpacker:hs(e),argsMapper:gs})(e)}c();m();p();d();f();l();function ys(e={}){let t=ze(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 bs(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Xn(e,t){return t({action:"groupBy",unpacker:bs(e),argsMapper:ys})(e)}function Zn(e,t,r){if(t==="aggregate")return n=>zn(n,r);if(t==="count")return n=>Yn(n,r);if(t==="groupBy")return n=>Xn(n,r)}c();m();p();d();f();l();function ei(e,t){let r=t.fields.filter(i=>!i.relationName),n=vr(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")},...Bt(Object.keys(n))})}c();m();p();d();f();l();c();m();p();d();f();l();var ti=e=>Array.isArray(e)?e:e.split("."),_r=(e,t)=>ti(t).reduce((r,n)=>r&&r[n],e),ri=(e,t,r)=>ti(t).reduceRight((n,i,o,s)=>Object.assign({},_r(e,s.slice(0,o)),{[i]:n}),r);function ws(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Es(e,t,r){return t===void 0?e??{}:ri(t,r,e||!0)}function Dr(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((u,y)=>({...u,[y.name]:y}),{});return u=>{let y=Pe(e._errorFormat),T=ws(n,i),C=Es(u,o,T),O=r({dataPath:T,callsite:y})(C),A=xs(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 Dr(e,...ne,...z)},...Bt([...A,...Object.getOwnPropertyNames(O)])})}}function xs(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}c();m();p();d();f();l();c();m();p();d();f();l();var Ps=De(Sn());var vs={red:Ue,gray:wn,dim:Lt,bold:Mt,underline:fn,highlightSource:e=>e.highlight()},Ts={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Cs({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Rs({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(As(t))),i){a.push("");let y=[i.toString()];o&&(y.push(o),y.push(s.dim(")"))),a.push(y.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function As(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function Ye(e){let t=e.showColors?vs:Ts,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Cs(e),Rs(r,t)}function ni(e,t,r,n){return e===Oe.ModelAction.findFirstOrThrow||e===Oe.ModelAction.findUniqueOrThrow?Ss(t,r,n):n}function Ss(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=Ye({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new G(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof Q&&o.code==="P2025"?new ye(`No ${e} found`,t):o})}}c();m();p();d();f();l();function de(e){return e.replace(/^./,t=>t.toLowerCase())}var Os=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],ks=["aggregate","count","groupBy"];function Fr(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Ms(e,t),Is(e,t),dt(r),H("name",()=>t),H("$name",()=>t),H("$parent",()=>e._appliedParent)];return me({},n)}function Ms(e,t){let r=de(t),n=Object.keys(Oe.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=u=>e._request(u);s=ni(o,t,e._clientVersion,s);let a=u=>y=>{let T=Pe(e._errorFormat);return e._createPrismaPromise(C=>{let O={args:y,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:C,callsite:T};return s({...O,...u})})};return Os.includes(o)?Dr(e,t,a):Ls(i)?Zn(e,i,a):a({})}}}function Ls(e){return ks.includes(e)}function Is(e,t){return Me(H("fields",()=>{let r=e._runtimeDataModel.models[t];return ei(t,r)}))}c();m();p();d();f();l();function ii(e){return e.replace(/^./,t=>t.toUpperCase())}var Nr=Symbol();function gt(e){let t=[_s(e),H(Nr,()=>e),H("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(dt(r)),me(e,t)}function _s(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(de),n=[...new Set(t.concat(r))];return Me({getKeys(){return n},getPropertyValue(i){let o=ii(i);if(e._runtimeDataModel.models[o]!==void 0)return Fr(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Fr(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function oi(e){return e[Nr]?e[Nr]:e}function si(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)}c();m();p();d();f();l();c();m();p();d();f();l();function ai({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 y=u.needs.filter(T=>n[T]);y.length>0&&a.push(Ve(y))}else if(r){if(!r[u.name])continue;let y=u.needs.filter(T=>!r[T]);y.length>0&&a.push(Ve(y))}Ds(e,u.needs)&&s.push(Fs(u,me(e,s)))}return s.length>0||a.length>0?me(e,[...s,...a]):e}function Ds(e,t){return t.every(r=>Pr(e,r))}function Fs(e,t){return Me(H(e.name,()=>e.compute(t)))}c();m();p();d();f();l();function Ht({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 y=typeof s=="object"?s:{};t[o]=Ht({visitor:i,result:t[o],args:y,modelName:u.type,runtimeDataModel:n})}}function ui({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Ht({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,u,y)=>{let T=de(u);return ai({result:a,modelName:T,select:y.select,omit:y.select?void 0:{...o?.[T],...y.omit},extensions:n})}})}c();m();p();d();f();l();c();m();p();d();f();l();l();function ci(e){if(e instanceof X)return Ns(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:ci(t.args??{}),__internalParams:t,query:(s,a=t)=>{let u=a.customDataProxyFetch;return a.customDataProxyFetch=hi(o,u),a.args=s,pi(e,a,r,n+1)}})})}function di(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 pi(e,t,s)}function fi(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=hi(i,u),gi(a,t,r+1,n)}})}var mi=e=>e;function hi(e=mi,t=mi){return r=>e(t(r))}c();m();p();d();f();l();c();m();p();d();f();l();function bi(e,t,r){let n=de(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Us({...e,...yi(t.name,e,t.result.$allModels),...yi(t.name,e,t.result[n])})}function Us(e){let t=new ce,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 yi(e,t,r){return r?Be(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Bs(t,o,i)})):{}}function Bs(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function wi(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 Ei(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 zt=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new ce;this.modelExtensionsCache=new ce;this.queryCallbacksCache=new ce;this.clientExtensions=at(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=at(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>bi(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=de(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()}},Yt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new zt(t))}isEmpty(){return this.head===void 0}append(t){return new e(new zt(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();var xi=ee("prisma:client"),Pi={Vercel:"vercel","Netlify CI":"netlify"};function vi({postinstall:e,ciName:t,clientVersion:r}){if(xi("checkPlatformCaching:postinstall",e),xi("checkPlatformCaching:ciName",t),e===!0&&t&&t in Pi){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/${Pi[t]}-build`;throw console.error(n),new I(n,r)}}c();m();p();d();f();l();function Ti(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 $s="Cloudflare-Workers",Vs="node";function Ci(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===$s?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Vs?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var qs={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 ve(){let e=Ci();return{id:e,prettyName:qs[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}c();m();p();d();f();l();c();m();p();d();f();l();function Xt({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 ve().id==="workerd"?new I(`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 I(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new I("error: Missing URL environment variable, value, or override.",n);return i}c();m();p();d();f();l();c();m();p();d();f();l();function Ri(e){if(e?.kind==="itx")return e.options.id}c();m();p();d();f();l();var Ur,Ai={async loadLibrary(e){let{clientVersion:t,adapter:r,engineWasm:n}=e;if(r===void 0)throw new I(`The \`adapter\` option for \`PrismaClient\` is required in this context (${ve().prettyName})`,t);if(n===void 0)throw new I("WASM engine was unexpectedly `undefined`",t);Ur===void 0&&(Ur=(async()=>{let o=n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new I("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 Ur;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var js="P2036",fe=ee("prisma:client:libraryEngine");function Qs(e){return e.item_type==="query"&&"query"in e}function Js(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var ET=[...Er,"native"],yt=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=r??Ai,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(Gs(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new Q(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(fe("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.loadEngine(),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new J("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new J("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&&fe("Using driver adapter: %O",r),this.engine=new this.QueryEngineConstructor({datamodel:this.datamodel,env:g.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 I(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",Qs(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(Js(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 fe(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{fe("library starting");try{let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,fe("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(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 fe("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),fe("library stopping");let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,fe("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}){fe(`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 J(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s,elapsed:0}}catch(s){if(s instanceof I)throw s;s.code==="GenericFailure"&&s.message?.startsWith("PANIC:");let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new J(`${a.message} +${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){fe("requestBatch");let i=$t(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),Ri(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new J(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:u}=s;if(Array.isArray(a))return a.map(y=>y.errors&&y.errors.length>0?this.loggerRustPanic??this.buildQueryError(y.errors[0]):{data:y,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:Wt(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===js&&this.config.adapter){let r=t.meta?.id;Dt(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return Dt(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 Gs(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}c();m();p();d();f();l();var bt="Accelerate has not been setup correctly. Make sure your client is using `.$extends(withAccelerate())`. See https://pris.ly/d/accelerate-getting-started",Zt=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 I(bt,this.config.clientVersion)}metrics(t){throw new I(bt,this.config.clientVersion)}request(t,r){throw new I(bt,this.config.clientVersion)}requestBatch(t,r){throw new I(bt,this.config.clientVersion)}applyPendingMigrations(){throw new I(bt,this.config.clientVersion)}};function Si({copyEngine:e=!0},t){let r;try{r=Xt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...g.env},clientVersion:t.clientVersion})}catch{}e&&r?.startsWith("prisma://")&&st("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=nt(t.generator),i=!!(r?.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o&&!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 G(u.join(` +`),{clientVersion:t.clientVersion})}if(o)return new yt(t);if(i)return new Zt(t);{let u=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${ve().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 G(u.join(` +`),{clientVersion:t.clientVersion})}throw new G("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}c();m();p();d();f();l();function er({generator:e}){return e?.previewFeatures??[]}c();m();p();d();f();l();c();m();p();d();f();l();function Xe(e){return e.substring(0,1).toLowerCase()+e.substring(1)}c();m();p();d();f();l();c();m();p();d();f();l();var _i=De(Br());c();m();p();d();f();l();function Li(e,t,r){let n=Ii(e),i=Ws(n),o=Hs(i);o?tr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Ii(e){return e.errors.flatMap(t=>t.kind==="Union"?Ii(t):[t])}function Ws(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:Ks(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Ks(e,t){return[...new Set(e.concat(t))]}function Hs(e){return Tr(e,(t,r)=>{let n=ki(t),i=ki(r);return n!==i?n-i:Mi(t)-Mi(r)})}function ki(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Mi(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();var wt=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(Ge,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function tr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":zs(e,t);break;case"IncludeOnScalar":Ys(e,t);break;case"EmptySelection":Xs(e,t,r);break;case"UnknownSelectionField":ra(e,t);break;case"UnknownArgument":na(e,t);break;case"UnknownInputField":ia(e,t);break;case"RequiredArgumentMissing":oa(e,t);break;case"InvalidArgumentType":sa(e,t);break;case"InvalidArgumentValue":aa(e,t);break;case"ValueTooLarge":la(e,t);break;case"SomeFieldsMissing":ua(e,t);break;case"TooManyFieldsGiven":ca(e,t);break;case"Union":Li(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function zs(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 Ys(e,t){let[r,n]=Et(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)}. ${xt(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Xs(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Zs(e,t,i);return}if(n.hasField("select")){ea(e,t);return}}if(r?.[Xe(e.outputType.name)]){ta(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Zs(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 ea(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Ni(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${xt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function ta(e,t){let r=new wt;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]=Et(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let u=a?.value.asObject()??new Ke;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 ra(e,t){let[r,n]=Et(e.selectionPath),i=t.arguments.getDeepSubSelectionValue(r)?.asObject(),o;if(i){let s=i.getFieldValue("select")?.asObject(),a=i.getFieldValue("include")?.asObject(),u=i.getFieldValue("omit")?.asObject();s?.hasField(n)?(o="select",s.getField(n)?.markAsError(),Ni(s,e.outputType)):a?.hasField(n)?(o="include",a.getField(n)?.markAsError(),ma(a,e.outputType)):u?.hasField(n)&&(o="omit",u.getField(n)?.markAsError(),pa(u,e.outputType))}t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(xt(s)),a.join(" ")})}function na(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),da(n,e.arguments)),t.addErrorMessage(i=>Di(i,r,e.arguments.map(o=>o.name)))}function ia(e,t){let[r,n]=Et(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Ui(o,e.inputType)}t.addErrorMessage(o=>Di(o,n,e.inputType.fields.map(s=>s.name)))}function Di(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=ga(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(xt(e)),n.join(" ")}function oa(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]=Et(e.argumentPath),s=new wt,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(Fi).join(" | ");a.addSuggestion(new te(o,u).makeRequired())}}function Fi(e){return e.kind==="list"?`${Fi(e.elementType)}[]`:e.name}function sa(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=rr("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 aa(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=rr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function la(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 ua(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&&Ui(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")} ${rr("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(xt(i)),o.join(" ")})}function ca(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 ${rr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Ni(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new te(r.name,"true"))}function ma(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new te(r.name,"true"))}function pa(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new te(r.name,"true"))}function da(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new te(r.name,r.typeNames.join(" | ")))}function Ui(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 Et(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function xt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function rr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var fa=3;function ga(e,t){let r=1/0,n;for(let i of t){let o=(0,_i.default)(e,i);o>fa||o({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?.[Xe(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:he(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 qi=e=>({command:e});c();m();p();d();f();l();c();m();p();d();f();l();var ji=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);c();m();p();d();f();l();l();function vt(e){try{return Qi(e,"fast")}catch{return Qi(e,"slow")}}function Qi(e,t){return JSON.stringify(e.map(r=>Ca(r,t)))}function Ca(e,t){return 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")}:Ra(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:b.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Gi(e):e}function Ra(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Gi(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ji);let t={};for(let r of Object.keys(e))t[r]=Ji(e[r]);return t}function Ji(e){return typeof e=="bigint"?e.toString():Gi(e)}var Aa=/^(\s*alter\s)/i,Wi=ee("prisma:client");function Vr(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Aa.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 qr=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:vt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:vt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:vt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=ji(r),i={values:vt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Wi(`prisma.${e}(${n}, ${i.values})`):Wi(`prisma.${e}(${n})`),{query:n,parameters:i}},Ki={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new X(t,r)}},Hi={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};c();m();p();d();f();l();function jr(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=zi(r(o)):zi(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 zi(e){return typeof e.then=="function"?e:Promise.resolve(e)}c();m();p();d();f();l();var Yi={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Qr=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??Yi}};function Xi(e){return e.includes("tracing")?new Qr:Yi}c();m();p();d();f();l();function Zi(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();var Sa=["$connect","$disconnect","$on","$transaction","$use","$extends"],eo=Sa;c();m();p();d();f();l();function to(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 ir=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 io=De(In());c();m();p();d();f();l();function or(e){return typeof e.batchRequestIdx=="number"}c();m();p();d();f();l();l();function sr(e){return e===null?e:Array.isArray(e)?e.map(sr):typeof e=="object"?Oa(e)?ka(e):Be(e,sr):e}function Oa(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function ka({$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:he(t,"Unknown tagged value")}}c();m();p();d();f();l();function ro(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Jr(e.query.arguments)),t.push(Jr(e.query.selection)),t.join("")}function Jr(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Jr(n)})`:r}).join(" ")})`}c();m();p();d();f();l();var Ma={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 Gr(e){return Ma[e]}c();m();p();d();f();l();var ar=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,g.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 no(e){let t=[],r=La(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),y=n.some(C=>Gr(C.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:u,transaction:_a(o),containsWrite:y,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"?oo(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Gr(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:ro(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 g.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(Ia(t),Da(t,i)||t instanceof ye)throw t;if(t instanceof Q&&Fa(t)){let y=so(t.meta);nr({args:o,errors:[y],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let u=t.message;if(n&&(u=Ye({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:u})),u=this.sanitizeMessage(u),t.code){let y=s?{modelName:s,...t.meta}:t.meta;throw new Q(u,{code:t.code,clientVersion:this.client._clientVersion,meta:y,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new be(u,this.client._clientVersion);if(t instanceof J)throw new J(u,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof I)throw new I(u,this.client._clientVersion);if(t instanceof be)throw new be(u,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,io.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(y=>y!=="select"&&y!=="include"),a=_r(o,s),u=i==="queryRaw"?no(a):sr(a);return n?n(u):u}get[Symbol.toStringTag](){return"RequestHandler"}};function _a(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:oo(e)};he(e,"Unknown transaction kind")}}function oo(e){return{id:e.id,payload:e.payload}}function Da(e,t){return or(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Fa(e){return e.code==="P2009"||e.code==="P2012"}function so(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(so)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}c();m();p();d();f();l();var ao="5.18.0";var lo=ao;c();m();p();d();f();l();var fo=De(Br());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 uo=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],co=["pretty","colorless","minimal"],mo=["info","query","warn","error"],Ua={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=Ze(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(!er(t).includes("driverAdapters"))throw new _('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(nt()==="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(!co.includes(e)){let t=Ze(e,co);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"&&!mo.includes(r)){let n=Ze(r,mo);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=Ze(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=$a(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(y=>y.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 _(Va(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=Ze(r,t);throw new _(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function go(e,t){for(let[r,n]of Object.entries(e)){if(!uo.includes(r)){let i=Ze(r,uo);throw new _(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Ua[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 Ze(e,t){if(t.length===0||typeof e!="string")return"";let r=Ba(e,t);return r?` Did you mean "${r}"?`:""}function Ba(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,fo.default)(e,i)}));r.sort((i,o)=>i.distanceXe(n)===t);if(r)return e[r]}function Va(e,t){let r=He(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}=Gt(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}c();m();p();d();f();l();function ho(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=y=>{o||(o=!0,r(y))};for(let y=0;y{n[y]=T,a()},T=>{if(!or(T)){u(T);return}T.batchRequestIdx===y?u(T):(i||(i=T),a())})})}var Te=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var qa={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},ja=Symbol.for("prisma.client.transaction.id"),Qa={id:0,nextId(){return++this.id}};function wo(e){class t{constructor(n){this._originalClient=this;this._middlewares=new ir;this._createPrismaPromise=jr();this.$extends=si;e=n?.__internal?.configOverride?.(e)??e,vi(e),n&&go(n,e);let i=new _t().on("error",()=>{});this._extensions=Yt.empty(),this._previewFeatures=er(e),this._clientVersion=e.clientVersion??lo,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Xi(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&rt.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&rt.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=Or(n.adapter);let u=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==u)throw new I(`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 I("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??{},y=u.__internal??{},T=y.debug===!0;T&&ee.enable("prisma:client");let C=rt.resolve(e.dirname,e.relativePath);ln.existsSync(C)||(C=e.dirname),Te("dirname",e.dirname),Te("relativePath",e.relativePath),Te("cwd",C);let O=y.engine||{};if(u.errorFormat?this._errorFormat=u.errorFormat:g.env.NODE_ENV==="production"?this._errorFormat="minimal":g.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:rt.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&&to(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:Ti(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:Xt,getBatchRequestPayload:$t,prismaGraphQLToJSError:Wt,PrismaClientUnknownRequestError:J,PrismaClientInitializationError:I,PrismaClientKnownRequestError:Q,debug:ee("prisma:client:accelerateEngine"),engineVersion:bo.version,clientVersion:e.clientVersion}},Te("clientVersion",e.clientVersion),this._engine=Si(e,this._engineConfig),this._requestHandler=new lr(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=>{ot.log(`${ot.tags[M]??""}`,S.message||S.query)})}this._metrics=new $e(this._engine)}catch(u){throw u.clientVersion=this._clientVersion,u}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{Pn()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:qr({clientMethod:i,activeProvider:a}),callsite:Pe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=yo(n,i);return Vr(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new G("`$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=>(Vr(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new G(`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:qi,callsite:Pe(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:qr({clientMethod:i,activeProvider:a}),callsite:Pe(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",...yo(n,i));throw new G("`$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})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Qa.nextId(),s=Zi(n.length),a=n.map((u,y)=>{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:y,isolationLevel:T,lock:s};return u.requestTransaction?.(C)??u});return ho(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 y={kind:"itx",...a};u=await n(this._createItxClient(y)),await this._engine.transaction("commit",o,a)}catch(y){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),y}return u}_createItxClient(n){return gt(me(oi(this),[H("_appliedParent",()=>this._appliedParent._createItxClient(n)),H("_createPrismaPromise",()=>jr(n)),H(ja,()=>n.id),Ve(eo)]))}$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??qa,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 y=>{let T=this._middlewares.get(++a);if(T)return this._tracingHelper.runInChildSpan(s.middleware,L=>T(y,ne=>(L?.end(),u(ne))));let{runInTransaction:C,args:O,...A}=y,M={...n,...A};O&&(M.args=i.middlewareArgsToRequestArgs(O)),n.transaction!==void 0&&C===!1&&delete M.transaction;let S=await di(this,M);return M.model?ui({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:y,transaction:T,unpacker:C,otelParentCtx:O,customDataProxyFetch:A}){try{n=y?y(n):n;let M={name:"serialize"},S=this._tracingHelper.runInChildSpan(M,()=>Bi({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")&&(Te("Prisma Client call:"),Te(`prisma.${i}(${Kn(n)})`),Te("Generated request:"),Te(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 G("`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 yo(e,t){return Ja(e)?[new X(e,t),Ki]:[e,Hi]}function Ja(e){return Array.isArray(e)&&Array.isArray(e.raw)}c();m();p();d();f();l();var Ga=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Eo(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Ga.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,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); +//# sourceMappingURL=wasm.js.map diff --git a/experiments/postgres/prisma/generated/client/wasm.d.ts b/experiments/postgres/prisma/generated/client/wasm.d.ts new file mode 100644 index 000000000..34c616106 --- /dev/null +++ b/experiments/postgres/prisma/generated/client/wasm.d.ts @@ -0,0 +1 @@ +export * from './index' \ No newline at end of file diff --git a/experiments/postgres/prisma/generated/client/wasm.js b/experiments/postgres/prisma/generated/client/wasm.js new file mode 100644 index 000000000..64bec277e --- /dev/null +++ b/experiments/postgres/prisma/generated/client/wasm.js @@ -0,0 +1,329 @@ + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + Decimal, + objectEnumValues, + makeStrictEnum, + Public, + getRuntime, +} = require('./runtime/index-browser.js') + + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: 5.18.0 + * Query Engine version: 4c784e32044a8a016d99474bd02a3b6123742169 + */ +Prisma.prismaVersion = { + client: "5.18.0", + engine: "4c784e32044a8a016d99474bd02a3b6123742169" +} + +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.UserScalarFieldEnum = { + id: 'id', + email: 'email', + name: 'name', + age: 'age', + balance: 'balance', + amount: 'amount', + role: 'role', + grades: 'grades', + aliases: 'aliases' +}; + +exports.Prisma.PostScalarFieldEnum = { + uuid: 'uuid', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + published: 'published', + title: 'title', + subtitle: 'subtitle', + content: 'content', + authorId: 'authorId', + editorId: 'editorId', + kind: 'kind', + metadata: 'metadata' +}; + +exports.Prisma.CategoryScalarFieldEnum = { + name: 'name', + slug: 'slug', + number: 'number' +}; + +exports.Prisma.PatientScalarFieldEnum = { + firstName: 'firstName', + lastName: 'lastName', + email: 'email' +}; + +exports.Prisma.MovieScalarFieldEnum = { + directorFirstName: 'directorFirstName', + directorLastName: 'directorLastName', + title: 'title' +}; + +exports.Prisma.DirectorScalarFieldEnum = { + firstName: 'firstName', + lastName: 'lastName' +}; + +exports.Prisma.ProblemScalarFieldEnum = { + id: 'id', + problemText: 'problemText', + creatorId: 'creatorId' +}; + +exports.Prisma.CreatorScalarFieldEnum = { + id: 'id', + name: 'name' +}; + +exports.Prisma.NativeTypeModelScalarFieldEnum = { + id: 'id', + bigInt: 'bigInt', + byteA: 'byteA', + decimal: 'decimal' +}; + +exports.Prisma.EquipmentScalarFieldEnum = { + id: 'id', + name: 'name' +}; + +exports.Prisma.HiddenScalarFieldEnum = { + id: 'id', + name: 'name' +}; + +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.UserOrderByRelevanceFieldEnum = { + email: 'email', + name: 'name', + aliases: 'aliases' +}; + +exports.Prisma.JsonNullValueFilter = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull, + AnyNull: Prisma.AnyNull +}; + +exports.Prisma.postOrderByRelevanceFieldEnum = { + uuid: 'uuid', + title: 'title', + subtitle: 'subtitle', + content: 'content' +}; + +exports.Prisma.CategoryOrderByRelevanceFieldEnum = { + name: 'name', + slug: 'slug' +}; + +exports.Prisma.PatientOrderByRelevanceFieldEnum = { + firstName: 'firstName', + lastName: 'lastName', + email: 'email' +}; + +exports.Prisma.MovieOrderByRelevanceFieldEnum = { + directorFirstName: 'directorFirstName', + directorLastName: 'directorLastName', + title: 'title' +}; + +exports.Prisma.DirectorOrderByRelevanceFieldEnum = { + firstName: 'firstName', + lastName: 'lastName' +}; + +exports.Prisma.ProblemOrderByRelevanceFieldEnum = { + problemText: 'problemText' +}; + +exports.Prisma.CreatorOrderByRelevanceFieldEnum = { + name: 'name' +}; + +exports.Prisma.EquipmentOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name' +}; + +exports.Prisma.HiddenOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name' +}; +exports.Role = exports.$Enums.Role = { + USER: 'USER', + ADMIN: 'ADMIN' +}; + +exports.PostKind = exports.$Enums.PostKind = { + BLOG: 'BLOG', + ADVERT: 'ADVERT' +}; + +exports.Prisma.ModelName = { + User: 'User', + post: 'post', + Category: 'Category', + Patient: 'Patient', + Movie: 'Movie', + Director: 'Director', + Problem: 'Problem', + Creator: 'Creator', + NativeTypeModel: 'NativeTypeModel', + Equipment: 'Equipment', + Hidden: 'Hidden' +}; + +/** + * 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/experiments/postgres/prisma/generated/type-graphql/dmmf.json b/experiments/postgres/prisma/generated/type-graphql/dmmf.json index c5c302b7d..fbd6eaa12 100644 --- a/experiments/postgres/prisma/generated/type-graphql/dmmf.json +++ b/experiments/postgres/prisma/generated/type-graphql/dmmf.json @@ -216,7 +216,7 @@ "hasDefaultValue": true, "type": "String", "default": { - "name": "uuid", + "name": "uuid(4)", "args": [] }, "isGenerated": false, @@ -976,7 +976,146 @@ "documentation": "@@TypeGraphQL.omit(output: true)" } ], - "types": [] + "types": [], + "indexes": [ + { + "model": "User", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "id" + } + ] + }, + { + "model": "User", + "type": "unique", + "isDefinedOnField": true, + "fields": [ + { + "name": "email" + } + ] + }, + { + "model": "post", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "uuid" + } + ] + }, + { + "model": "Category", + "type": "unique", + "isDefinedOnField": false, + "name": "categoryCompoundUnique", + "fields": [ + { + "name": "slug" + }, + { + "name": "number" + } + ] + }, + { + "model": "Patient", + "type": "id", + "isDefinedOnField": false, + "fields": [ + { + "name": "firstName" + }, + { + "name": "lastName" + } + ] + }, + { + "model": "Movie", + "type": "id", + "isDefinedOnField": false, + "name": "movieCompoundId", + "fields": [ + { + "name": "directorFirstName" + }, + { + "name": "directorLastName" + }, + { + "name": "title" + } + ] + }, + { + "model": "Director", + "type": "id", + "isDefinedOnField": false, + "fields": [ + { + "name": "firstName" + }, + { + "name": "lastName" + } + ] + }, + { + "model": "Problem", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "id" + } + ] + }, + { + "model": "Creator", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "id" + } + ] + }, + { + "model": "NativeTypeModel", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "id" + } + ] + }, + { + "model": "Equipment", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "id" + } + ] + }, + { + "model": "Hidden", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "id" + } + ] + } + ] }, "schema": { "inputObjectTypes": { @@ -1229,7 +1368,7 @@ ] }, { - "name": "UserOrderByWithRelationAndSearchRelevanceInput", + "name": "UserOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -2372,7 +2511,7 @@ ] }, { - "name": "postOrderByWithRelationAndSearchRelevanceInput", + "name": "postOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -2545,7 +2684,7 @@ "isNullable": false, "inputTypes": [ { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -2558,7 +2697,7 @@ "isNullable": false, "inputTypes": [ { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -3517,7 +3656,7 @@ ] }, { - "name": "CategoryOrderByWithRelationAndSearchRelevanceInput", + "name": "CategoryOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -4058,7 +4197,7 @@ ] }, { - "name": "PatientOrderByWithRelationAndSearchRelevanceInput", + "name": "PatientOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -4592,7 +4731,7 @@ ] }, { - "name": "MovieOrderByWithRelationAndSearchRelevanceInput", + "name": "MovieOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -4643,7 +4782,7 @@ "isNullable": false, "inputTypes": [ { - "type": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "type": "DirectorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -5134,7 +5273,7 @@ ] }, { - "name": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "name": "DirectorOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -5655,7 +5794,7 @@ ] }, { - "name": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "name": "ProblemOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -5725,7 +5864,7 @@ "isNullable": false, "inputTypes": [ { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -6270,7 +6409,7 @@ ] }, { - "name": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "name": "CreatorOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -6815,7 +6954,7 @@ ] }, { - "name": "NativeTypeModelOrderByWithRelationAndSearchRelevanceInput", + "name": "NativeTypeModelOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -7439,7 +7578,7 @@ ] }, { - "name": "EquipmentOrderByWithRelationAndSearchRelevanceInput", + "name": "EquipmentOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -7882,7 +8021,7 @@ ] }, { - "name": "HiddenOrderByWithRelationAndSearchRelevanceInput", + "name": "HiddenOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -39175,13 +39314,13 @@ "isNullable": false, "inputTypes": [ { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -39275,13 +39414,13 @@ "isNullable": false, "inputTypes": [ { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -39375,13 +39514,13 @@ "isNullable": false, "inputTypes": [ { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -39475,13 +39614,13 @@ "isNullable": false, "inputTypes": [ { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -39706,13 +39845,13 @@ "isNullable": false, "inputTypes": [ { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -39806,13 +39945,13 @@ "isNullable": false, "inputTypes": [ { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -39906,13 +40045,13 @@ "isNullable": false, "inputTypes": [ { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -40006,13 +40145,13 @@ "isNullable": false, "inputTypes": [ { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -40237,13 +40376,13 @@ "isNullable": false, "inputTypes": [ { - "type": "CategoryOrderByWithRelationAndSearchRelevanceInput", + "type": "CategoryOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "CategoryOrderByWithRelationAndSearchRelevanceInput", + "type": "CategoryOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -40337,13 +40476,13 @@ "isNullable": false, "inputTypes": [ { - "type": "CategoryOrderByWithRelationAndSearchRelevanceInput", + "type": "CategoryOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "CategoryOrderByWithRelationAndSearchRelevanceInput", + "type": "CategoryOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -40437,13 +40576,13 @@ "isNullable": false, "inputTypes": [ { - "type": "CategoryOrderByWithRelationAndSearchRelevanceInput", + "type": "CategoryOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "CategoryOrderByWithRelationAndSearchRelevanceInput", + "type": "CategoryOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -40537,13 +40676,13 @@ "isNullable": false, "inputTypes": [ { - "type": "CategoryOrderByWithRelationAndSearchRelevanceInput", + "type": "CategoryOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "CategoryOrderByWithRelationAndSearchRelevanceInput", + "type": "CategoryOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -40768,13 +40907,13 @@ "isNullable": false, "inputTypes": [ { - "type": "PatientOrderByWithRelationAndSearchRelevanceInput", + "type": "PatientOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "PatientOrderByWithRelationAndSearchRelevanceInput", + "type": "PatientOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -40868,13 +41007,13 @@ "isNullable": false, "inputTypes": [ { - "type": "PatientOrderByWithRelationAndSearchRelevanceInput", + "type": "PatientOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "PatientOrderByWithRelationAndSearchRelevanceInput", + "type": "PatientOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -40968,13 +41107,13 @@ "isNullable": false, "inputTypes": [ { - "type": "PatientOrderByWithRelationAndSearchRelevanceInput", + "type": "PatientOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "PatientOrderByWithRelationAndSearchRelevanceInput", + "type": "PatientOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -41068,13 +41207,13 @@ "isNullable": false, "inputTypes": [ { - "type": "PatientOrderByWithRelationAndSearchRelevanceInput", + "type": "PatientOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "PatientOrderByWithRelationAndSearchRelevanceInput", + "type": "PatientOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -41299,13 +41438,13 @@ "isNullable": false, "inputTypes": [ { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -41399,13 +41538,13 @@ "isNullable": false, "inputTypes": [ { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -41499,13 +41638,13 @@ "isNullable": false, "inputTypes": [ { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -41599,13 +41738,13 @@ "isNullable": false, "inputTypes": [ { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -41830,13 +41969,13 @@ "isNullable": false, "inputTypes": [ { - "type": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "type": "DirectorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "type": "DirectorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -41930,13 +42069,13 @@ "isNullable": false, "inputTypes": [ { - "type": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "type": "DirectorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "type": "DirectorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -42030,13 +42169,13 @@ "isNullable": false, "inputTypes": [ { - "type": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "type": "DirectorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "type": "DirectorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -42130,13 +42269,13 @@ "isNullable": false, "inputTypes": [ { - "type": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "type": "DirectorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "type": "DirectorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -42361,13 +42500,13 @@ "isNullable": false, "inputTypes": [ { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -42461,13 +42600,13 @@ "isNullable": false, "inputTypes": [ { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -42561,13 +42700,13 @@ "isNullable": false, "inputTypes": [ { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -42661,13 +42800,13 @@ "isNullable": false, "inputTypes": [ { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -42892,13 +43031,13 @@ "isNullable": false, "inputTypes": [ { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -42992,13 +43131,13 @@ "isNullable": false, "inputTypes": [ { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -43092,13 +43231,13 @@ "isNullable": false, "inputTypes": [ { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -43192,13 +43331,13 @@ "isNullable": false, "inputTypes": [ { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -43423,13 +43562,13 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelOrderByWithRelationAndSearchRelevanceInput", + "type": "NativeTypeModelOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "NativeTypeModelOrderByWithRelationAndSearchRelevanceInput", + "type": "NativeTypeModelOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -43523,13 +43662,13 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelOrderByWithRelationAndSearchRelevanceInput", + "type": "NativeTypeModelOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "NativeTypeModelOrderByWithRelationAndSearchRelevanceInput", + "type": "NativeTypeModelOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -43623,13 +43762,13 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelOrderByWithRelationAndSearchRelevanceInput", + "type": "NativeTypeModelOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "NativeTypeModelOrderByWithRelationAndSearchRelevanceInput", + "type": "NativeTypeModelOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -43723,13 +43862,13 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelOrderByWithRelationAndSearchRelevanceInput", + "type": "NativeTypeModelOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "NativeTypeModelOrderByWithRelationAndSearchRelevanceInput", + "type": "NativeTypeModelOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -43954,13 +44093,13 @@ "isNullable": false, "inputTypes": [ { - "type": "EquipmentOrderByWithRelationAndSearchRelevanceInput", + "type": "EquipmentOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "EquipmentOrderByWithRelationAndSearchRelevanceInput", + "type": "EquipmentOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -44054,13 +44193,13 @@ "isNullable": false, "inputTypes": [ { - "type": "EquipmentOrderByWithRelationAndSearchRelevanceInput", + "type": "EquipmentOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "EquipmentOrderByWithRelationAndSearchRelevanceInput", + "type": "EquipmentOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -44154,13 +44293,13 @@ "isNullable": false, "inputTypes": [ { - "type": "EquipmentOrderByWithRelationAndSearchRelevanceInput", + "type": "EquipmentOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "EquipmentOrderByWithRelationAndSearchRelevanceInput", + "type": "EquipmentOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -44254,13 +44393,13 @@ "isNullable": false, "inputTypes": [ { - "type": "EquipmentOrderByWithRelationAndSearchRelevanceInput", + "type": "EquipmentOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "EquipmentOrderByWithRelationAndSearchRelevanceInput", + "type": "EquipmentOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -44485,13 +44624,13 @@ "isNullable": false, "inputTypes": [ { - "type": "HiddenOrderByWithRelationAndSearchRelevanceInput", + "type": "HiddenOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "HiddenOrderByWithRelationAndSearchRelevanceInput", + "type": "HiddenOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -44585,13 +44724,13 @@ "isNullable": false, "inputTypes": [ { - "type": "HiddenOrderByWithRelationAndSearchRelevanceInput", + "type": "HiddenOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "HiddenOrderByWithRelationAndSearchRelevanceInput", + "type": "HiddenOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -44685,13 +44824,13 @@ "isNullable": false, "inputTypes": [ { - "type": "HiddenOrderByWithRelationAndSearchRelevanceInput", + "type": "HiddenOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "HiddenOrderByWithRelationAndSearchRelevanceInput", + "type": "HiddenOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -44785,13 +44924,13 @@ "isNullable": false, "inputTypes": [ { - "type": "HiddenOrderByWithRelationAndSearchRelevanceInput", + "type": "HiddenOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "HiddenOrderByWithRelationAndSearchRelevanceInput", + "type": "HiddenOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -45136,6 +45275,49 @@ "isList": false } }, + { + "name": "createManyUserAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "UserCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "UserCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManyUserAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, { "name": "deleteOneUser", "args": [ @@ -45411,6 +45593,49 @@ "isList": false } }, + { + "name": "createManypostAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "postCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "postCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManypostAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, { "name": "deleteOnepost", "args": [ @@ -45686,6 +45911,49 @@ "isList": false } }, + { + "name": "createManyCategoryAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "CategoryCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "CategoryCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManyCategoryAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, { "name": "deleteOneCategory", "args": [ @@ -45961,6 +46229,49 @@ "isList": false } }, + { + "name": "createManyPatientAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "PatientCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "PatientCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManyPatientAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, { "name": "deleteOnePatient", "args": [ @@ -46236,6 +46547,49 @@ "isList": false } }, + { + "name": "createManyMovieAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "MovieCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "MovieCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManyMovieAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, { "name": "deleteOneMovie", "args": [ @@ -46511,6 +46865,49 @@ "isList": false } }, + { + "name": "createManyDirectorAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "DirectorCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "DirectorCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManyDirectorAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, { "name": "deleteOneDirector", "args": [ @@ -46786,6 +47183,49 @@ "isList": false } }, + { + "name": "createManyProblemAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "ProblemCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "ProblemCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManyProblemAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, { "name": "deleteOneProblem", "args": [ @@ -47062,239 +47502,7 @@ } }, { - "name": "deleteOneCreator", - "args": [ - { - "name": "where", - "isRequired": true, - "isNullable": false, - "inputTypes": [ - { - "type": "CreatorWhereUniqueInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - } - ], - "isNullable": true, - "outputType": { - "type": "Creator", - "namespace": "model", - "location": "outputObjectTypes", - "isList": false - } - }, - { - "name": "updateOneCreator", - "args": [ - { - "name": "data", - "isRequired": true, - "isNullable": false, - "inputTypes": [ - { - "type": "CreatorUpdateInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - }, - { - "type": "CreatorUncheckedUpdateInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - }, - { - "name": "where", - "isRequired": true, - "isNullable": false, - "inputTypes": [ - { - "type": "CreatorWhereUniqueInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - } - ], - "isNullable": true, - "outputType": { - "type": "Creator", - "namespace": "model", - "location": "outputObjectTypes", - "isList": false - } - }, - { - "name": "updateManyCreator", - "args": [ - { - "name": "data", - "isRequired": true, - "isNullable": false, - "inputTypes": [ - { - "type": "CreatorUpdateManyMutationInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - }, - { - "type": "CreatorUncheckedUpdateManyInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - }, - { - "name": "where", - "isRequired": false, - "isNullable": false, - "inputTypes": [ - { - "type": "CreatorWhereInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - } - ], - "isNullable": false, - "outputType": { - "type": "AffectedRowsOutput", - "namespace": "prisma", - "location": "outputObjectTypes", - "isList": false - } - }, - { - "name": "deleteManyCreator", - "args": [ - { - "name": "where", - "isRequired": false, - "isNullable": false, - "inputTypes": [ - { - "type": "CreatorWhereInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - } - ], - "isNullable": false, - "outputType": { - "type": "AffectedRowsOutput", - "namespace": "prisma", - "location": "outputObjectTypes", - "isList": false - } - }, - { - "name": "createOneNativeTypeModel", - "args": [ - { - "name": "data", - "isRequired": false, - "isNullable": false, - "inputTypes": [ - { - "type": "NativeTypeModelCreateInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - }, - { - "type": "NativeTypeModelUncheckedCreateInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - } - ], - "isNullable": false, - "outputType": { - "type": "NativeTypeModel", - "namespace": "model", - "location": "outputObjectTypes", - "isList": false - } - }, - { - "name": "upsertOneNativeTypeModel", - "args": [ - { - "name": "where", - "isRequired": true, - "isNullable": false, - "inputTypes": [ - { - "type": "NativeTypeModelWhereUniqueInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - }, - { - "name": "create", - "isRequired": true, - "isNullable": false, - "inputTypes": [ - { - "type": "NativeTypeModelCreateInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - }, - { - "type": "NativeTypeModelUncheckedCreateInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - }, - { - "name": "update", - "isRequired": true, - "isNullable": false, - "inputTypes": [ - { - "type": "NativeTypeModelUpdateInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - }, - { - "type": "NativeTypeModelUncheckedUpdateInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - } - ], - "isNullable": false, - "outputType": { - "type": "NativeTypeModel", - "namespace": "model", - "location": "outputObjectTypes", - "isList": false - } - }, - { - "name": "createManyNativeTypeModel", + "name": "createManyCreatorAndReturn", "args": [ { "name": "data", @@ -47302,13 +47510,13 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelCreateManyInput", + "type": "CreatorCreateManyInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false }, { - "type": "NativeTypeModelCreateManyInput", + "type": "CreatorCreateManyInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true @@ -47330,14 +47538,14 @@ ], "isNullable": false, "outputType": { - "type": "AffectedRowsOutput", - "namespace": "prisma", + "type": "CreateManyCreatorAndReturnOutputType", + "namespace": "model", "location": "outputObjectTypes", - "isList": false + "isList": true } }, { - "name": "deleteOneNativeTypeModel", + "name": "deleteOneCreator", "args": [ { "name": "where", @@ -47345,7 +47553,7 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelWhereUniqueInput", + "type": "CreatorWhereUniqueInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47355,14 +47563,14 @@ ], "isNullable": true, "outputType": { - "type": "NativeTypeModel", + "type": "Creator", "namespace": "model", "location": "outputObjectTypes", "isList": false } }, { - "name": "updateOneNativeTypeModel", + "name": "updateOneCreator", "args": [ { "name": "data", @@ -47370,13 +47578,13 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelUpdateInput", + "type": "CreatorUpdateInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false }, { - "type": "NativeTypeModelUncheckedUpdateInput", + "type": "CreatorUncheckedUpdateInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47389,7 +47597,7 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelWhereUniqueInput", + "type": "CreatorWhereUniqueInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47399,14 +47607,14 @@ ], "isNullable": true, "outputType": { - "type": "NativeTypeModel", + "type": "Creator", "namespace": "model", "location": "outputObjectTypes", "isList": false } }, { - "name": "updateManyNativeTypeModel", + "name": "updateManyCreator", "args": [ { "name": "data", @@ -47414,13 +47622,13 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelUpdateManyMutationInput", + "type": "CreatorUpdateManyMutationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false }, { - "type": "NativeTypeModelUncheckedUpdateManyInput", + "type": "CreatorUncheckedUpdateManyInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47433,7 +47641,7 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelWhereInput", + "type": "CreatorWhereInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47450,7 +47658,7 @@ } }, { - "name": "deleteManyNativeTypeModel", + "name": "deleteManyCreator", "args": [ { "name": "where", @@ -47458,7 +47666,7 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelWhereInput", + "type": "CreatorWhereInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47475,7 +47683,7 @@ } }, { - "name": "createOneEquipment", + "name": "createOneNativeTypeModel", "args": [ { "name": "data", @@ -47483,13 +47691,13 @@ "isNullable": false, "inputTypes": [ { - "type": "EquipmentCreateInput", + "type": "NativeTypeModelCreateInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false }, { - "type": "EquipmentUncheckedCreateInput", + "type": "NativeTypeModelUncheckedCreateInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47499,14 +47707,14 @@ ], "isNullable": false, "outputType": { - "type": "Equipment", + "type": "NativeTypeModel", "namespace": "model", "location": "outputObjectTypes", "isList": false } }, { - "name": "upsertOneEquipment", + "name": "upsertOneNativeTypeModel", "args": [ { "name": "where", @@ -47514,7 +47722,7 @@ "isNullable": false, "inputTypes": [ { - "type": "EquipmentWhereUniqueInput", + "type": "NativeTypeModelWhereUniqueInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47527,13 +47735,13 @@ "isNullable": false, "inputTypes": [ { - "type": "EquipmentCreateInput", + "type": "NativeTypeModelCreateInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false }, { - "type": "EquipmentUncheckedCreateInput", + "type": "NativeTypeModelUncheckedCreateInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47546,13 +47754,13 @@ "isNullable": false, "inputTypes": [ { - "type": "EquipmentUpdateInput", + "type": "NativeTypeModelUpdateInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false }, { - "type": "EquipmentUncheckedUpdateInput", + "type": "NativeTypeModelUncheckedUpdateInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47562,14 +47770,14 @@ ], "isNullable": false, "outputType": { - "type": "Equipment", + "type": "NativeTypeModel", "namespace": "model", "location": "outputObjectTypes", "isList": false } }, { - "name": "createManyEquipment", + "name": "createManyNativeTypeModel", "args": [ { "name": "data", @@ -47577,13 +47785,13 @@ "isNullable": false, "inputTypes": [ { - "type": "EquipmentCreateManyInput", + "type": "NativeTypeModelCreateManyInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false }, { - "type": "EquipmentCreateManyInput", + "type": "NativeTypeModelCreateManyInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true @@ -47611,6 +47819,367 @@ "isList": false } }, + { + "name": "createManyNativeTypeModelAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "NativeTypeModelCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "NativeTypeModelCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManyNativeTypeModelAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, + { + "name": "deleteOneNativeTypeModel", + "args": [ + { + "name": "where", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "NativeTypeModelWhereUniqueInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": true, + "outputType": { + "type": "NativeTypeModel", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "updateOneNativeTypeModel", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "NativeTypeModelUpdateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "NativeTypeModelUncheckedUpdateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "where", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "NativeTypeModelWhereUniqueInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": true, + "outputType": { + "type": "NativeTypeModel", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "updateManyNativeTypeModel", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "NativeTypeModelUpdateManyMutationInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "NativeTypeModelUncheckedUpdateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "where", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "NativeTypeModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "AffectedRowsOutput", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "deleteManyNativeTypeModel", + "args": [ + { + "name": "where", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "NativeTypeModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "AffectedRowsOutput", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "createOneEquipment", + "args": [ + { + "name": "data", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "EquipmentCreateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "EquipmentUncheckedCreateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "Equipment", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "upsertOneEquipment", + "args": [ + { + "name": "where", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "EquipmentWhereUniqueInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "create", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "EquipmentCreateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "EquipmentUncheckedCreateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "update", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "EquipmentUpdateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "EquipmentUncheckedUpdateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "Equipment", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "createManyEquipment", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "EquipmentCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "EquipmentCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "AffectedRowsOutput", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "createManyEquipmentAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "EquipmentCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "EquipmentCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManyEquipmentAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, { "name": "deleteOneEquipment", "args": [ @@ -47886,6 +48455,49 @@ "isList": false } }, + { + "name": "createManyHiddenAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "HiddenCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "HiddenCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManyHiddenAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, { "name": "deleteOneHidden", "args": [ @@ -51814,13 +52426,13 @@ "isNullable": false, "inputTypes": [ { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -51914,13 +52526,13 @@ "isNullable": false, "inputTypes": [ { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -52318,13 +52930,13 @@ "isNullable": false, "inputTypes": [ { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -52464,13 +53076,13 @@ "isNullable": false, "inputTypes": [ { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -52625,13 +53237,13 @@ "isNullable": false, "inputTypes": [ { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -52725,13 +53337,13 @@ "isNullable": false, "inputTypes": [ { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -52910,6 +53522,575 @@ } } ] + }, + { + "name": "CreateManyUserAndReturnOutputType", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "email", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "name", + "args": [], + "isNullable": true, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "age", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "balance", + "args": [], + "isNullable": false, + "outputType": { + "type": "Float", + "location": "scalar", + "isList": false + } + }, + { + "name": "amount", + "args": [], + "isNullable": false, + "outputType": { + "type": "Float", + "location": "scalar", + "isList": false + } + }, + { + "name": "role", + "args": [], + "isNullable": false, + "outputType": { + "type": "Role", + "namespace": "model", + "location": "enumTypes", + "isList": false + } + }, + { + "name": "grades", + "args": [], + "isNullable": true, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": true + } + }, + { + "name": "aliases", + "args": [], + "isNullable": true, + "outputType": { + "type": "String", + "location": "scalar", + "isList": true + } + } + ] + }, + { + "name": "CreateManypostAndReturnOutputType", + "fields": [ + { + "name": "uuid", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "createdAt", + "args": [], + "isNullable": false, + "outputType": { + "type": "DateTime", + "location": "scalar", + "isList": false + } + }, + { + "name": "updatedAt", + "args": [], + "isNullable": false, + "outputType": { + "type": "DateTime", + "location": "scalar", + "isList": false + } + }, + { + "name": "published", + "args": [], + "isNullable": false, + "outputType": { + "type": "Boolean", + "location": "scalar", + "isList": false + } + }, + { + "name": "title", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "subtitle", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "content", + "args": [], + "isNullable": true, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "authorId", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "editorId", + "args": [], + "isNullable": true, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "kind", + "args": [], + "isNullable": true, + "outputType": { + "type": "PostKind", + "namespace": "model", + "location": "enumTypes", + "isList": false + } + }, + { + "name": "metadata", + "args": [], + "isNullable": false, + "outputType": { + "type": "Json", + "location": "scalar", + "isList": false + } + }, + { + "name": "author", + "args": [], + "isNullable": false, + "outputType": { + "type": "User", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "editor", + "args": [ + { + "name": "where", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "UserWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": true, + "outputType": { + "type": "User", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + } + ] + }, + { + "name": "CreateManyCategoryAndReturnOutputType", + "fields": [ + { + "name": "name", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "slug", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "number", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + } + ] + }, + { + "name": "CreateManyPatientAndReturnOutputType", + "fields": [ + { + "name": "firstName", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "lastName", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "email", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + } + ] + }, + { + "name": "CreateManyMovieAndReturnOutputType", + "fields": [ + { + "name": "directorFirstName", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "directorLastName", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "title", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "director", + "args": [], + "isNullable": false, + "outputType": { + "type": "Director", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + } + ] + }, + { + "name": "CreateManyDirectorAndReturnOutputType", + "fields": [ + { + "name": "firstName", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "lastName", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + } + ] + }, + { + "name": "CreateManyProblemAndReturnOutputType", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "problemText", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "creatorId", + "args": [], + "isNullable": true, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "creator", + "args": [ + { + "name": "where", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "CreatorWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": true, + "outputType": { + "type": "Creator", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + } + ] + }, + { + "name": "CreateManyCreatorAndReturnOutputType", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "name", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + } + ] + }, + { + "name": "CreateManyNativeTypeModelAndReturnOutputType", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "bigInt", + "args": [], + "isNullable": true, + "outputType": { + "type": "BigInt", + "location": "scalar", + "isList": false + } + }, + { + "name": "byteA", + "args": [], + "isNullable": true, + "outputType": { + "type": "Bytes", + "location": "scalar", + "isList": false + } + }, + { + "name": "decimal", + "args": [], + "isNullable": true, + "outputType": { + "type": "Decimal", + "location": "scalar", + "isList": false + } + } + ] + }, + { + "name": "CreateManyEquipmentAndReturnOutputType", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "name", + "args": [], + "isNullable": true, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + } + ] + }, + { + "name": "CreateManyHiddenAndReturnOutputType", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "name", + "args": [], + "isNullable": true, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + } + ] } ] }, @@ -53884,6 +55065,7 @@ "model": "User", "aggregate": "aggregateUser", "createMany": "createManyUser", + "createManyAndReturn": "createManyUserAndReturn", "createOne": "createOneUser", "deleteMany": "deleteManyUser", "deleteOne": "deleteOneUser", @@ -53901,6 +55083,7 @@ "model": "post", "aggregate": "aggregatepost", "createMany": "createManypost", + "createManyAndReturn": "createManypostAndReturn", "createOne": "createOnepost", "deleteMany": "deleteManypost", "deleteOne": "deleteOnepost", @@ -53918,6 +55101,7 @@ "model": "Category", "aggregate": "aggregateCategory", "createMany": "createManyCategory", + "createManyAndReturn": "createManyCategoryAndReturn", "createOne": "createOneCategory", "deleteMany": "deleteManyCategory", "deleteOne": "deleteOneCategory", @@ -53935,6 +55119,7 @@ "model": "Patient", "aggregate": "aggregatePatient", "createMany": "createManyPatient", + "createManyAndReturn": "createManyPatientAndReturn", "createOne": "createOnePatient", "deleteMany": "deleteManyPatient", "deleteOne": "deleteOnePatient", @@ -53952,6 +55137,7 @@ "model": "Movie", "aggregate": "aggregateMovie", "createMany": "createManyMovie", + "createManyAndReturn": "createManyMovieAndReturn", "createOne": "createOneMovie", "deleteMany": "deleteManyMovie", "deleteOne": "deleteOneMovie", @@ -53969,6 +55155,7 @@ "model": "Director", "aggregate": "aggregateDirector", "createMany": "createManyDirector", + "createManyAndReturn": "createManyDirectorAndReturn", "createOne": "createOneDirector", "deleteMany": "deleteManyDirector", "deleteOne": "deleteOneDirector", @@ -53986,6 +55173,7 @@ "model": "Problem", "aggregate": "aggregateProblem", "createMany": "createManyProblem", + "createManyAndReturn": "createManyProblemAndReturn", "createOne": "createOneProblem", "deleteMany": "deleteManyProblem", "deleteOne": "deleteOneProblem", @@ -54003,6 +55191,7 @@ "model": "Creator", "aggregate": "aggregateCreator", "createMany": "createManyCreator", + "createManyAndReturn": "createManyCreatorAndReturn", "createOne": "createOneCreator", "deleteMany": "deleteManyCreator", "deleteOne": "deleteOneCreator", @@ -54020,6 +55209,7 @@ "model": "NativeTypeModel", "aggregate": "aggregateNativeTypeModel", "createMany": "createManyNativeTypeModel", + "createManyAndReturn": "createManyNativeTypeModelAndReturn", "createOne": "createOneNativeTypeModel", "deleteMany": "deleteManyNativeTypeModel", "deleteOne": "deleteOneNativeTypeModel", @@ -54037,6 +55227,7 @@ "model": "Equipment", "aggregate": "aggregateEquipment", "createMany": "createManyEquipment", + "createManyAndReturn": "createManyEquipmentAndReturn", "createOne": "createOneEquipment", "deleteMany": "deleteManyEquipment", "deleteOne": "deleteOneEquipment", @@ -54054,6 +55245,7 @@ "model": "Hidden", "aggregate": "aggregateHidden", "createMany": "createManyHidden", + "createManyAndReturn": "createManyHiddenAndReturn", "createOne": "createOneHidden", "deleteMany": "deleteManyHidden", "deleteOne": "deleteOneHidden", diff --git a/experiments/postgres/prisma/generated/type-graphql/enhance.ts b/experiments/postgres/prisma/generated/type-graphql/enhance.ts index b34db3649..818b957f7 100644 --- a/experiments/postgres/prisma/generated/type-graphql/enhance.ts +++ b/experiments/postgres/prisma/generated/type-graphql/enhance.ts @@ -27,6 +27,7 @@ const actionResolversMap = { MainUser: { aggregateMainUser: actionResolvers.AggregateMainUserResolver, createManyMainUser: actionResolvers.CreateManyMainUserResolver, + createManyAndReturnMainUser: actionResolvers.CreateManyAndReturnMainUserResolver, createOneMainUser: actionResolvers.CreateOneMainUserResolver, deleteManyMainUser: actionResolvers.DeleteManyMainUserResolver, deleteOneMainUser: actionResolvers.DeleteOneMainUserResolver, @@ -43,6 +44,7 @@ const actionResolversMap = { Post: { aggregatePost: actionResolvers.AggregatePostResolver, createManyPost: actionResolvers.CreateManyPostResolver, + createManyAndReturnPost: actionResolvers.CreateManyAndReturnPostResolver, createOnePost: actionResolvers.CreateOnePostResolver, deleteManyPost: actionResolvers.DeleteManyPostResolver, deleteOnePost: actionResolvers.DeleteOnePostResolver, @@ -59,6 +61,7 @@ const actionResolversMap = { Category: { aggregateCategory: actionResolvers.AggregateCategoryResolver, createManyCategory: actionResolvers.CreateManyCategoryResolver, + createManyAndReturnCategory: actionResolvers.CreateManyAndReturnCategoryResolver, createOneCategory: actionResolvers.CreateOneCategoryResolver, deleteManyCategory: actionResolvers.DeleteManyCategoryResolver, deleteOneCategory: actionResolvers.DeleteOneCategoryResolver, @@ -75,6 +78,7 @@ const actionResolversMap = { Patient: { aggregatePatient: actionResolvers.AggregatePatientResolver, createManyPatient: actionResolvers.CreateManyPatientResolver, + createManyAndReturnPatient: actionResolvers.CreateManyAndReturnPatientResolver, createOnePatient: actionResolvers.CreateOnePatientResolver, deleteManyPatient: actionResolvers.DeleteManyPatientResolver, deleteOnePatient: actionResolvers.DeleteOnePatientResolver, @@ -91,6 +95,7 @@ const actionResolversMap = { Movie: { aggregateMovie: actionResolvers.AggregateMovieResolver, createManyMovie: actionResolvers.CreateManyMovieResolver, + createManyAndReturnMovie: actionResolvers.CreateManyAndReturnMovieResolver, createOneMovie: actionResolvers.CreateOneMovieResolver, deleteManyMovie: actionResolvers.DeleteManyMovieResolver, deleteOneMovie: actionResolvers.DeleteOneMovieResolver, @@ -107,6 +112,7 @@ const actionResolversMap = { Director: { aggregateDirector: actionResolvers.AggregateDirectorResolver, createManyDirector: actionResolvers.CreateManyDirectorResolver, + createManyAndReturnDirector: actionResolvers.CreateManyAndReturnDirectorResolver, createOneDirector: actionResolvers.CreateOneDirectorResolver, deleteManyDirector: actionResolvers.DeleteManyDirectorResolver, deleteOneDirector: actionResolvers.DeleteOneDirectorResolver, @@ -123,6 +129,7 @@ const actionResolversMap = { Problem: { aggregateProblem: actionResolvers.AggregateProblemResolver, createManyProblem: actionResolvers.CreateManyProblemResolver, + createManyAndReturnProblem: actionResolvers.CreateManyAndReturnProblemResolver, createOneProblem: actionResolvers.CreateOneProblemResolver, deleteManyProblem: actionResolvers.DeleteManyProblemResolver, deleteOneProblem: actionResolvers.DeleteOneProblemResolver, @@ -139,6 +146,7 @@ const actionResolversMap = { Creator: { aggregateCreator: actionResolvers.AggregateCreatorResolver, createManyCreator: actionResolvers.CreateManyCreatorResolver, + createManyAndReturnCreator: actionResolvers.CreateManyAndReturnCreatorResolver, createOneCreator: actionResolvers.CreateOneCreatorResolver, deleteManyCreator: actionResolvers.DeleteManyCreatorResolver, deleteOneCreator: actionResolvers.DeleteOneCreatorResolver, @@ -155,6 +163,7 @@ const actionResolversMap = { NativeTypeModel: { aggregateNativeTypeModel: actionResolvers.AggregateNativeTypeModelResolver, createManyNativeTypeModel: actionResolvers.CreateManyNativeTypeModelResolver, + createManyAndReturnNativeTypeModel: actionResolvers.CreateManyAndReturnNativeTypeModelResolver, createOneNativeTypeModel: actionResolvers.CreateOneNativeTypeModelResolver, deleteManyNativeTypeModel: actionResolvers.DeleteManyNativeTypeModelResolver, deleteOneNativeTypeModel: actionResolvers.DeleteOneNativeTypeModelResolver, @@ -171,6 +180,7 @@ const actionResolversMap = { Equipment: { aggregateEquipment: actionResolvers.AggregateEquipmentResolver, createManyEquipment: actionResolvers.CreateManyEquipmentResolver, + createManyAndReturnEquipment: actionResolvers.CreateManyAndReturnEquipmentResolver, createOneEquipment: actionResolvers.CreateOneEquipmentResolver, deleteManyEquipment: actionResolvers.DeleteManyEquipmentResolver, deleteOneEquipment: actionResolvers.DeleteOneEquipmentResolver, @@ -187,6 +197,7 @@ const actionResolversMap = { Hidden: { aggregateHidden: actionResolvers.AggregateHiddenResolver, createManyHidden: actionResolvers.CreateManyHiddenResolver, + createManyAndReturnHidden: actionResolvers.CreateManyAndReturnHiddenResolver, createOneHidden: actionResolvers.CreateOneHiddenResolver, deleteManyHidden: actionResolvers.DeleteManyHiddenResolver, deleteOneHidden: actionResolvers.DeleteOneHiddenResolver, @@ -202,21 +213,22 @@ const actionResolversMap = { } }; const crudResolversInfo = { - MainUser: ["aggregateMainUser", "createManyMainUser", "createOneMainUser", "deleteManyMainUser", "deleteOneMainUser", "findFirstMainUser", "findFirstMainUserOrThrow", "mainUsers", "mainUser", "getMainUser", "groupByMainUser", "updateManyMainUser", "updateOneMainUser", "upsertOneMainUser"], - Post: ["aggregatePost", "createManyPost", "createOnePost", "deleteManyPost", "deleteOnePost", "findFirstPost", "findFirstPostOrThrow", "posts", "post", "getPost", "groupByPost", "updateManyPost", "updateOnePost", "upsertOnePost"], - Category: ["aggregateCategory", "createManyCategory", "createOneCategory", "deleteManyCategory", "deleteOneCategory", "findFirstCategory", "findFirstCategoryOrThrow", "categories", "category", "getCategory", "groupByCategory", "updateManyCategory", "updateOneCategory", "upsertOneCategory"], - Patient: ["aggregatePatient", "createManyPatient", "createOnePatient", "deleteManyPatient", "deleteOnePatient", "findFirstPatient", "findFirstPatientOrThrow", "patients", "patient", "getPatient", "groupByPatient", "updateManyPatient", "updateOnePatient", "upsertOnePatient"], - Movie: ["aggregateMovie", "createManyMovie", "createOneMovie", "deleteManyMovie", "deleteOneMovie", "findFirstMovie", "findFirstMovieOrThrow", "movies", "movie", "getMovie", "groupByMovie", "updateManyMovie", "updateOneMovie", "upsertOneMovie"], - Director: ["aggregateDirector", "createManyDirector", "createOneDirector", "deleteManyDirector", "deleteOneDirector", "findFirstDirector", "findFirstDirectorOrThrow", "directors", "director", "getDirector", "groupByDirector", "updateManyDirector", "updateOneDirector", "upsertOneDirector"], - Problem: ["aggregateProblem", "createManyProblem", "createOneProblem", "deleteManyProblem", "deleteOneProblem", "findFirstProblem", "findFirstProblemOrThrow", "problems", "problem", "getProblem", "groupByProblem", "updateManyProblem", "updateOneProblem", "upsertOneProblem"], - Creator: ["aggregateCreator", "createManyCreator", "createOneCreator", "deleteManyCreator", "deleteOneCreator", "findFirstCreator", "findFirstCreatorOrThrow", "creators", "creator", "getCreator", "groupByCreator", "updateManyCreator", "updateOneCreator", "upsertOneCreator"], - NativeTypeModel: ["aggregateNativeTypeModel", "createManyNativeTypeModel", "createOneNativeTypeModel", "deleteManyNativeTypeModel", "deleteOneNativeTypeModel", "findFirstNativeTypeModel", "findFirstNativeTypeModelOrThrow", "nativeTypeModels", "nativeTypeModel", "getNativeTypeModel", "groupByNativeTypeModel", "updateManyNativeTypeModel", "updateOneNativeTypeModel", "upsertOneNativeTypeModel"], - Equipment: ["aggregateEquipment", "createManyEquipment", "createOneEquipment", "deleteManyEquipment", "deleteOneEquipment", "findFirstEquipment", "findFirstEquipmentOrThrow", "equipments", "equipment", "getEquipment", "groupByEquipment", "updateManyEquipment", "updateOneEquipment", "upsertOneEquipment"], - Hidden: ["aggregateHidden", "createManyHidden", "createOneHidden", "deleteManyHidden", "deleteOneHidden", "findFirstHidden", "findFirstHiddenOrThrow", "hiddens", "hidden", "getHidden", "groupByHidden", "updateManyHidden", "updateOneHidden", "upsertOneHidden"] + MainUser: ["aggregateMainUser", "createManyMainUser", "createManyAndReturnMainUser", "createOneMainUser", "deleteManyMainUser", "deleteOneMainUser", "findFirstMainUser", "findFirstMainUserOrThrow", "mainUsers", "mainUser", "getMainUser", "groupByMainUser", "updateManyMainUser", "updateOneMainUser", "upsertOneMainUser"], + Post: ["aggregatePost", "createManyPost", "createManyAndReturnPost", "createOnePost", "deleteManyPost", "deleteOnePost", "findFirstPost", "findFirstPostOrThrow", "posts", "post", "getPost", "groupByPost", "updateManyPost", "updateOnePost", "upsertOnePost"], + Category: ["aggregateCategory", "createManyCategory", "createManyAndReturnCategory", "createOneCategory", "deleteManyCategory", "deleteOneCategory", "findFirstCategory", "findFirstCategoryOrThrow", "categories", "category", "getCategory", "groupByCategory", "updateManyCategory", "updateOneCategory", "upsertOneCategory"], + Patient: ["aggregatePatient", "createManyPatient", "createManyAndReturnPatient", "createOnePatient", "deleteManyPatient", "deleteOnePatient", "findFirstPatient", "findFirstPatientOrThrow", "patients", "patient", "getPatient", "groupByPatient", "updateManyPatient", "updateOnePatient", "upsertOnePatient"], + Movie: ["aggregateMovie", "createManyMovie", "createManyAndReturnMovie", "createOneMovie", "deleteManyMovie", "deleteOneMovie", "findFirstMovie", "findFirstMovieOrThrow", "movies", "movie", "getMovie", "groupByMovie", "updateManyMovie", "updateOneMovie", "upsertOneMovie"], + Director: ["aggregateDirector", "createManyDirector", "createManyAndReturnDirector", "createOneDirector", "deleteManyDirector", "deleteOneDirector", "findFirstDirector", "findFirstDirectorOrThrow", "directors", "director", "getDirector", "groupByDirector", "updateManyDirector", "updateOneDirector", "upsertOneDirector"], + Problem: ["aggregateProblem", "createManyProblem", "createManyAndReturnProblem", "createOneProblem", "deleteManyProblem", "deleteOneProblem", "findFirstProblem", "findFirstProblemOrThrow", "problems", "problem", "getProblem", "groupByProblem", "updateManyProblem", "updateOneProblem", "upsertOneProblem"], + Creator: ["aggregateCreator", "createManyCreator", "createManyAndReturnCreator", "createOneCreator", "deleteManyCreator", "deleteOneCreator", "findFirstCreator", "findFirstCreatorOrThrow", "creators", "creator", "getCreator", "groupByCreator", "updateManyCreator", "updateOneCreator", "upsertOneCreator"], + NativeTypeModel: ["aggregateNativeTypeModel", "createManyNativeTypeModel", "createManyAndReturnNativeTypeModel", "createOneNativeTypeModel", "deleteManyNativeTypeModel", "deleteOneNativeTypeModel", "findFirstNativeTypeModel", "findFirstNativeTypeModelOrThrow", "nativeTypeModels", "nativeTypeModel", "getNativeTypeModel", "groupByNativeTypeModel", "updateManyNativeTypeModel", "updateOneNativeTypeModel", "upsertOneNativeTypeModel"], + Equipment: ["aggregateEquipment", "createManyEquipment", "createManyAndReturnEquipment", "createOneEquipment", "deleteManyEquipment", "deleteOneEquipment", "findFirstEquipment", "findFirstEquipmentOrThrow", "equipments", "equipment", "getEquipment", "groupByEquipment", "updateManyEquipment", "updateOneEquipment", "upsertOneEquipment"], + Hidden: ["aggregateHidden", "createManyHidden", "createManyAndReturnHidden", "createOneHidden", "deleteManyHidden", "deleteOneHidden", "findFirstHidden", "findFirstHiddenOrThrow", "hiddens", "hidden", "getHidden", "groupByHidden", "updateManyHidden", "updateOneHidden", "upsertOneHidden"] }; const argsInfo = { AggregateMainUserArgs: ["where", "orderBy", "cursor", "take", "skip"], CreateManyMainUserArgs: ["data", "skipDuplicates"], + CreateManyAndReturnMainUserArgs: ["data", "skipDuplicates"], CreateOneMainUserArgs: ["data"], DeleteManyMainUserArgs: ["where"], DeleteOneMainUserArgs: ["where"], @@ -231,6 +243,7 @@ const argsInfo = { UpsertOneMainUserArgs: ["where", "create", "update"], AggregatePostArgs: ["where", "orderBy", "cursor", "take", "skip"], CreateManyPostArgs: ["data", "skipDuplicates"], + CreateManyAndReturnPostArgs: ["data", "skipDuplicates"], CreateOnePostArgs: ["data"], DeleteManyPostArgs: ["where"], DeleteOnePostArgs: ["where"], @@ -245,6 +258,7 @@ const argsInfo = { UpsertOnePostArgs: ["where", "create", "update"], AggregateCategoryArgs: ["where", "orderBy", "cursor", "take", "skip"], CreateManyCategoryArgs: ["data", "skipDuplicates"], + CreateManyAndReturnCategoryArgs: ["data", "skipDuplicates"], CreateOneCategoryArgs: ["data"], DeleteManyCategoryArgs: ["where"], DeleteOneCategoryArgs: ["where"], @@ -259,6 +273,7 @@ const argsInfo = { UpsertOneCategoryArgs: ["where", "create", "update"], AggregatePatientArgs: ["where", "orderBy", "cursor", "take", "skip"], CreateManyPatientArgs: ["data", "skipDuplicates"], + CreateManyAndReturnPatientArgs: ["data", "skipDuplicates"], CreateOnePatientArgs: ["data"], DeleteManyPatientArgs: ["where"], DeleteOnePatientArgs: ["where"], @@ -273,6 +288,7 @@ const argsInfo = { UpsertOnePatientArgs: ["where", "create", "update"], AggregateMovieArgs: ["where", "orderBy", "cursor", "take", "skip"], CreateManyMovieArgs: ["data", "skipDuplicates"], + CreateManyAndReturnMovieArgs: ["data", "skipDuplicates"], CreateOneMovieArgs: ["data"], DeleteManyMovieArgs: ["where"], DeleteOneMovieArgs: ["where"], @@ -287,6 +303,7 @@ const argsInfo = { UpsertOneMovieArgs: ["where", "create", "update"], AggregateDirectorArgs: ["where", "orderBy", "cursor", "take", "skip"], CreateManyDirectorArgs: ["data", "skipDuplicates"], + CreateManyAndReturnDirectorArgs: ["data", "skipDuplicates"], CreateOneDirectorArgs: ["data"], DeleteManyDirectorArgs: ["where"], DeleteOneDirectorArgs: ["where"], @@ -301,6 +318,7 @@ const argsInfo = { UpsertOneDirectorArgs: ["where", "create", "update"], AggregateProblemArgs: ["where", "orderBy", "cursor", "take", "skip"], CreateManyProblemArgs: ["data", "skipDuplicates"], + CreateManyAndReturnProblemArgs: ["data", "skipDuplicates"], CreateOneProblemArgs: ["data"], DeleteManyProblemArgs: ["where"], DeleteOneProblemArgs: ["where"], @@ -315,6 +333,7 @@ const argsInfo = { UpsertOneProblemArgs: ["where", "create", "update"], AggregateCreatorArgs: ["where", "orderBy", "cursor", "take", "skip"], CreateManyCreatorArgs: ["data", "skipDuplicates"], + CreateManyAndReturnCreatorArgs: ["data", "skipDuplicates"], CreateOneCreatorArgs: ["data"], DeleteManyCreatorArgs: ["where"], DeleteOneCreatorArgs: ["where"], @@ -329,6 +348,7 @@ const argsInfo = { UpsertOneCreatorArgs: ["where", "create", "update"], AggregateNativeTypeModelArgs: ["where", "orderBy", "cursor", "take", "skip"], CreateManyNativeTypeModelArgs: ["data", "skipDuplicates"], + CreateManyAndReturnNativeTypeModelArgs: ["data", "skipDuplicates"], CreateOneNativeTypeModelArgs: ["data"], DeleteManyNativeTypeModelArgs: ["where"], DeleteOneNativeTypeModelArgs: ["where"], @@ -343,6 +363,7 @@ const argsInfo = { UpsertOneNativeTypeModelArgs: ["where", "create", "update"], AggregateEquipmentArgs: ["where", "orderBy", "cursor", "take", "skip"], CreateManyEquipmentArgs: ["data", "skipDuplicates"], + CreateManyAndReturnEquipmentArgs: ["data", "skipDuplicates"], CreateOneEquipmentArgs: ["data"], DeleteManyEquipmentArgs: ["where"], DeleteOneEquipmentArgs: ["where"], @@ -357,6 +378,7 @@ const argsInfo = { UpsertOneEquipmentArgs: ["where", "create", "update"], AggregateHiddenArgs: ["where", "orderBy", "cursor", "take", "skip"], CreateManyHiddenArgs: ["data", "skipDuplicates"], + CreateManyAndReturnHiddenArgs: ["data", "skipDuplicates"], CreateOneHiddenArgs: ["data"], DeleteManyHiddenArgs: ["where"], DeleteOneHiddenArgs: ["where"], @@ -394,7 +416,7 @@ export function applyResolversEnhanceMap( resolversEnhanceMap: ResolversEnhanceMap, ) { const mutationOperationPrefixes = [ - "createOne", "createMany", "deleteOne", "updateOne", "deleteMany", "updateMany", "upsertOne" + "createOne", "createMany", "createManyAndReturn", "deleteOne", "updateOne", "deleteMany", "updateMany", "upsertOne" ]; for (const resolversEnhanceMapKey of Object.keys(resolversEnhanceMap)) { const modelName = resolversEnhanceMapKey as keyof typeof resolversEnhanceMap; @@ -681,7 +703,18 @@ const outputsInfo = { EquipmentMaxAggregate: ["id", "name"], HiddenCountAggregate: ["id", "name", "_all"], HiddenMinAggregate: ["id", "name"], - HiddenMaxAggregate: ["id", "name"] + HiddenMaxAggregate: ["id", "name"], + CreateManyAndReturnMainUser: ["id", "email", "name", "age", "balance", "amount", "role", "grades", "aliases"], + CreateManyAndReturnPost: ["uuid", "createdAt", "updatedAt", "published", "title", "subtitle", "content", "authorId", "editorId", "kind", "metadata", "author", "editor"], + CreateManyAndReturnCategory: ["name", "slug", "number"], + CreateManyAndReturnPatient: ["firstName", "lastName", "email"], + CreateManyAndReturnMovie: ["directorFirstName", "directorLastName", "title", "director"], + CreateManyAndReturnDirector: ["firstName", "lastName"], + CreateManyAndReturnProblem: ["id", "problemText", "creatorId", "creator"], + CreateManyAndReturnCreator: ["id", "name"], + CreateManyAndReturnNativeTypeModel: ["id", "bigInt", "byteA", "decimal"], + CreateManyAndReturnEquipment: ["id", "name"], + CreateManyAndReturnHidden: ["id", "name"] }; type OutputTypesNames = keyof typeof outputTypes; @@ -723,57 +756,57 @@ export function applyOutputTypesEnhanceMap( const inputsInfo = { MainUserWhereInput: ["AND", "OR", "NOT", "id", "email", "firstName", "age", "accountBalance", "amount", "role", "grades", "aliases", "clientPosts", "editorPosts"], - MainUserOrderByWithRelationAndSearchRelevanceInput: ["id", "email", "firstName", "age", "accountBalance", "amount", "role", "grades", "aliases", "clientPosts", "editorPosts", "_relevance"], + MainUserOrderByWithRelationInput: ["id", "email", "firstName", "age", "accountBalance", "amount", "role", "grades", "aliases", "clientPosts", "editorPosts", "_relevance"], MainUserWhereUniqueInput: ["id", "email", "AND", "OR", "NOT", "firstName", "age", "accountBalance", "amount", "role", "grades", "aliases", "clientPosts", "editorPosts"], MainUserOrderByWithAggregationInput: ["id", "email", "firstName", "age", "accountBalance", "amount", "role", "grades", "aliases", "_count", "_avg", "_max", "_min", "_sum"], MainUserScalarWhereWithAggregatesInput: ["AND", "OR", "NOT", "id", "email", "firstName", "age", "accountBalance", "amount", "role", "grades", "aliases"], PostWhereInput: ["AND", "OR", "NOT", "uuid", "createdAt", "updatedAt", "isPublished", "title", "subtitle", "content", "authorId", "editorId", "kind", "metadata", "author", "editor"], - PostOrderByWithRelationAndSearchRelevanceInput: ["uuid", "createdAt", "updatedAt", "isPublished", "title", "subtitle", "content", "authorId", "editorId", "kind", "metadata", "author", "editor", "_relevance"], + PostOrderByWithRelationInput: ["uuid", "createdAt", "updatedAt", "isPublished", "title", "subtitle", "content", "authorId", "editorId", "kind", "metadata", "author", "editor", "_relevance"], PostWhereUniqueInput: ["uuid", "AND", "OR", "NOT", "createdAt", "updatedAt", "isPublished", "title", "subtitle", "content", "authorId", "editorId", "kind", "metadata", "author", "editor"], PostOrderByWithAggregationInput: ["uuid", "createdAt", "updatedAt", "isPublished", "title", "subtitle", "content", "authorId", "editorId", "kind", "metadata", "_count", "_avg", "_max", "_min", "_sum"], PostScalarWhereWithAggregatesInput: ["AND", "OR", "NOT", "uuid", "createdAt", "updatedAt", "isPublished", "title", "subtitle", "content", "authorId", "editorId", "kind", "metadata"], CategoryWhereInput: ["AND", "OR", "NOT", "name", "slug", "number"], - CategoryOrderByWithRelationAndSearchRelevanceInput: ["name", "slug", "number", "_relevance"], + CategoryOrderByWithRelationInput: ["name", "slug", "number", "_relevance"], CategoryWhereUniqueInput: ["categoryCompoundUnique", "AND", "OR", "NOT", "name", "slug", "number"], CategoryOrderByWithAggregationInput: ["name", "slug", "number", "_count", "_avg", "_max", "_min", "_sum"], CategoryScalarWhereWithAggregatesInput: ["AND", "OR", "NOT", "name", "slug", "number"], PatientWhereInput: ["AND", "OR", "NOT", "firstName", "lastName", "email"], - PatientOrderByWithRelationAndSearchRelevanceInput: ["firstName", "lastName", "email", "_relevance"], + PatientOrderByWithRelationInput: ["firstName", "lastName", "email", "_relevance"], PatientWhereUniqueInput: ["firstName_lastName", "AND", "OR", "NOT", "firstName", "lastName", "email"], PatientOrderByWithAggregationInput: ["firstName", "lastName", "email", "_count", "_max", "_min"], PatientScalarWhereWithAggregatesInput: ["AND", "OR", "NOT", "firstName", "lastName", "email"], MovieWhereInput: ["AND", "OR", "NOT", "directorFirstName", "directorLastName", "title", "director"], - MovieOrderByWithRelationAndSearchRelevanceInput: ["directorFirstName", "directorLastName", "title", "director", "_relevance"], + MovieOrderByWithRelationInput: ["directorFirstName", "directorLastName", "title", "director", "_relevance"], MovieWhereUniqueInput: ["movieCompoundId", "AND", "OR", "NOT", "directorFirstName", "directorLastName", "title", "director"], MovieOrderByWithAggregationInput: ["directorFirstName", "directorLastName", "title", "_count", "_max", "_min"], MovieScalarWhereWithAggregatesInput: ["AND", "OR", "NOT", "directorFirstName", "directorLastName", "title"], DirectorWhereInput: ["AND", "OR", "NOT", "firstName", "lastName", "movies"], - DirectorOrderByWithRelationAndSearchRelevanceInput: ["firstName", "lastName", "movies", "_relevance"], + DirectorOrderByWithRelationInput: ["firstName", "lastName", "movies", "_relevance"], DirectorWhereUniqueInput: ["firstName_lastName", "AND", "OR", "NOT", "firstName", "lastName", "movies"], DirectorOrderByWithAggregationInput: ["firstName", "lastName", "_count", "_max", "_min"], DirectorScalarWhereWithAggregatesInput: ["AND", "OR", "NOT", "firstName", "lastName"], ProblemWhereInput: ["AND", "OR", "NOT", "id", "problemText", "creatorId", "likedBy", "creator"], - ProblemOrderByWithRelationAndSearchRelevanceInput: ["id", "problemText", "creatorId", "likedBy", "creator", "_relevance"], + ProblemOrderByWithRelationInput: ["id", "problemText", "creatorId", "likedBy", "creator", "_relevance"], ProblemWhereUniqueInput: ["id", "AND", "OR", "NOT", "problemText", "creatorId", "likedBy", "creator"], ProblemOrderByWithAggregationInput: ["id", "problemText", "creatorId", "_count", "_avg", "_max", "_min", "_sum"], ProblemScalarWhereWithAggregatesInput: ["AND", "OR", "NOT", "id", "problemText", "creatorId"], CreatorWhereInput: ["AND", "OR", "NOT", "id", "name", "likes", "problems"], - CreatorOrderByWithRelationAndSearchRelevanceInput: ["id", "name", "likes", "problems", "_relevance"], + CreatorOrderByWithRelationInput: ["id", "name", "likes", "problems", "_relevance"], CreatorWhereUniqueInput: ["id", "AND", "OR", "NOT", "name", "likes", "problems"], CreatorOrderByWithAggregationInput: ["id", "name", "_count", "_avg", "_max", "_min", "_sum"], CreatorScalarWhereWithAggregatesInput: ["AND", "OR", "NOT", "id", "name"], NativeTypeModelWhereInput: ["AND", "OR", "NOT", "id", "bigInt", "byteA", "decimal"], - NativeTypeModelOrderByWithRelationAndSearchRelevanceInput: ["id", "bigInt", "byteA", "decimal"], + NativeTypeModelOrderByWithRelationInput: ["id", "bigInt", "byteA", "decimal"], NativeTypeModelWhereUniqueInput: ["id", "AND", "OR", "NOT", "bigInt", "byteA", "decimal"], NativeTypeModelOrderByWithAggregationInput: ["id", "bigInt", "byteA", "decimal", "_count", "_avg", "_max", "_min", "_sum"], NativeTypeModelScalarWhereWithAggregatesInput: ["AND", "OR", "NOT", "id", "bigInt", "byteA", "decimal"], EquipmentWhereInput: ["AND", "OR", "NOT", "id", "name"], - EquipmentOrderByWithRelationAndSearchRelevanceInput: ["id", "name", "_relevance"], + EquipmentOrderByWithRelationInput: ["id", "name", "_relevance"], EquipmentWhereUniqueInput: ["id", "AND", "OR", "NOT", "name"], EquipmentOrderByWithAggregationInput: ["id", "name", "_count", "_max", "_min"], EquipmentScalarWhereWithAggregatesInput: ["AND", "OR", "NOT", "id", "name"], HiddenWhereInput: ["AND", "OR", "NOT", "id", "name"], - HiddenOrderByWithRelationAndSearchRelevanceInput: ["id", "name", "_relevance"], + HiddenOrderByWithRelationInput: ["id", "name", "_relevance"], HiddenWhereUniqueInput: ["id", "AND", "OR", "NOT", "name"], HiddenOrderByWithAggregationInput: ["id", "name", "_count", "_max", "_min"], HiddenScalarWhereWithAggregatesInput: ["AND", "OR", "NOT", "id", "name"], diff --git a/experiments/postgres/prisma/generated/type-graphql/prisma-client-dmmf.json b/experiments/postgres/prisma/generated/type-graphql/prisma-client-dmmf.json index c5c302b7d..fbd6eaa12 100644 --- a/experiments/postgres/prisma/generated/type-graphql/prisma-client-dmmf.json +++ b/experiments/postgres/prisma/generated/type-graphql/prisma-client-dmmf.json @@ -216,7 +216,7 @@ "hasDefaultValue": true, "type": "String", "default": { - "name": "uuid", + "name": "uuid(4)", "args": [] }, "isGenerated": false, @@ -976,7 +976,146 @@ "documentation": "@@TypeGraphQL.omit(output: true)" } ], - "types": [] + "types": [], + "indexes": [ + { + "model": "User", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "id" + } + ] + }, + { + "model": "User", + "type": "unique", + "isDefinedOnField": true, + "fields": [ + { + "name": "email" + } + ] + }, + { + "model": "post", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "uuid" + } + ] + }, + { + "model": "Category", + "type": "unique", + "isDefinedOnField": false, + "name": "categoryCompoundUnique", + "fields": [ + { + "name": "slug" + }, + { + "name": "number" + } + ] + }, + { + "model": "Patient", + "type": "id", + "isDefinedOnField": false, + "fields": [ + { + "name": "firstName" + }, + { + "name": "lastName" + } + ] + }, + { + "model": "Movie", + "type": "id", + "isDefinedOnField": false, + "name": "movieCompoundId", + "fields": [ + { + "name": "directorFirstName" + }, + { + "name": "directorLastName" + }, + { + "name": "title" + } + ] + }, + { + "model": "Director", + "type": "id", + "isDefinedOnField": false, + "fields": [ + { + "name": "firstName" + }, + { + "name": "lastName" + } + ] + }, + { + "model": "Problem", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "id" + } + ] + }, + { + "model": "Creator", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "id" + } + ] + }, + { + "model": "NativeTypeModel", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "id" + } + ] + }, + { + "model": "Equipment", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "id" + } + ] + }, + { + "model": "Hidden", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "id" + } + ] + } + ] }, "schema": { "inputObjectTypes": { @@ -1229,7 +1368,7 @@ ] }, { - "name": "UserOrderByWithRelationAndSearchRelevanceInput", + "name": "UserOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -2372,7 +2511,7 @@ ] }, { - "name": "postOrderByWithRelationAndSearchRelevanceInput", + "name": "postOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -2545,7 +2684,7 @@ "isNullable": false, "inputTypes": [ { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -2558,7 +2697,7 @@ "isNullable": false, "inputTypes": [ { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -3517,7 +3656,7 @@ ] }, { - "name": "CategoryOrderByWithRelationAndSearchRelevanceInput", + "name": "CategoryOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -4058,7 +4197,7 @@ ] }, { - "name": "PatientOrderByWithRelationAndSearchRelevanceInput", + "name": "PatientOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -4592,7 +4731,7 @@ ] }, { - "name": "MovieOrderByWithRelationAndSearchRelevanceInput", + "name": "MovieOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -4643,7 +4782,7 @@ "isNullable": false, "inputTypes": [ { - "type": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "type": "DirectorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -5134,7 +5273,7 @@ ] }, { - "name": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "name": "DirectorOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -5655,7 +5794,7 @@ ] }, { - "name": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "name": "ProblemOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -5725,7 +5864,7 @@ "isNullable": false, "inputTypes": [ { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -6270,7 +6409,7 @@ ] }, { - "name": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "name": "CreatorOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -6815,7 +6954,7 @@ ] }, { - "name": "NativeTypeModelOrderByWithRelationAndSearchRelevanceInput", + "name": "NativeTypeModelOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -7439,7 +7578,7 @@ ] }, { - "name": "EquipmentOrderByWithRelationAndSearchRelevanceInput", + "name": "EquipmentOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -7882,7 +8021,7 @@ ] }, { - "name": "HiddenOrderByWithRelationAndSearchRelevanceInput", + "name": "HiddenOrderByWithRelationInput", "constraints": { "maxNumFields": 1, "minNumFields": 0 @@ -39175,13 +39314,13 @@ "isNullable": false, "inputTypes": [ { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -39275,13 +39414,13 @@ "isNullable": false, "inputTypes": [ { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -39375,13 +39514,13 @@ "isNullable": false, "inputTypes": [ { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -39475,13 +39614,13 @@ "isNullable": false, "inputTypes": [ { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "UserOrderByWithRelationAndSearchRelevanceInput", + "type": "UserOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -39706,13 +39845,13 @@ "isNullable": false, "inputTypes": [ { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -39806,13 +39945,13 @@ "isNullable": false, "inputTypes": [ { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -39906,13 +40045,13 @@ "isNullable": false, "inputTypes": [ { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -40006,13 +40145,13 @@ "isNullable": false, "inputTypes": [ { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -40237,13 +40376,13 @@ "isNullable": false, "inputTypes": [ { - "type": "CategoryOrderByWithRelationAndSearchRelevanceInput", + "type": "CategoryOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "CategoryOrderByWithRelationAndSearchRelevanceInput", + "type": "CategoryOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -40337,13 +40476,13 @@ "isNullable": false, "inputTypes": [ { - "type": "CategoryOrderByWithRelationAndSearchRelevanceInput", + "type": "CategoryOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "CategoryOrderByWithRelationAndSearchRelevanceInput", + "type": "CategoryOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -40437,13 +40576,13 @@ "isNullable": false, "inputTypes": [ { - "type": "CategoryOrderByWithRelationAndSearchRelevanceInput", + "type": "CategoryOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "CategoryOrderByWithRelationAndSearchRelevanceInput", + "type": "CategoryOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -40537,13 +40676,13 @@ "isNullable": false, "inputTypes": [ { - "type": "CategoryOrderByWithRelationAndSearchRelevanceInput", + "type": "CategoryOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "CategoryOrderByWithRelationAndSearchRelevanceInput", + "type": "CategoryOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -40768,13 +40907,13 @@ "isNullable": false, "inputTypes": [ { - "type": "PatientOrderByWithRelationAndSearchRelevanceInput", + "type": "PatientOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "PatientOrderByWithRelationAndSearchRelevanceInput", + "type": "PatientOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -40868,13 +41007,13 @@ "isNullable": false, "inputTypes": [ { - "type": "PatientOrderByWithRelationAndSearchRelevanceInput", + "type": "PatientOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "PatientOrderByWithRelationAndSearchRelevanceInput", + "type": "PatientOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -40968,13 +41107,13 @@ "isNullable": false, "inputTypes": [ { - "type": "PatientOrderByWithRelationAndSearchRelevanceInput", + "type": "PatientOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "PatientOrderByWithRelationAndSearchRelevanceInput", + "type": "PatientOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -41068,13 +41207,13 @@ "isNullable": false, "inputTypes": [ { - "type": "PatientOrderByWithRelationAndSearchRelevanceInput", + "type": "PatientOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "PatientOrderByWithRelationAndSearchRelevanceInput", + "type": "PatientOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -41299,13 +41438,13 @@ "isNullable": false, "inputTypes": [ { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -41399,13 +41538,13 @@ "isNullable": false, "inputTypes": [ { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -41499,13 +41638,13 @@ "isNullable": false, "inputTypes": [ { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -41599,13 +41738,13 @@ "isNullable": false, "inputTypes": [ { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -41830,13 +41969,13 @@ "isNullable": false, "inputTypes": [ { - "type": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "type": "DirectorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "type": "DirectorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -41930,13 +42069,13 @@ "isNullable": false, "inputTypes": [ { - "type": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "type": "DirectorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "type": "DirectorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -42030,13 +42169,13 @@ "isNullable": false, "inputTypes": [ { - "type": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "type": "DirectorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "type": "DirectorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -42130,13 +42269,13 @@ "isNullable": false, "inputTypes": [ { - "type": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "type": "DirectorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "DirectorOrderByWithRelationAndSearchRelevanceInput", + "type": "DirectorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -42361,13 +42500,13 @@ "isNullable": false, "inputTypes": [ { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -42461,13 +42600,13 @@ "isNullable": false, "inputTypes": [ { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -42561,13 +42700,13 @@ "isNullable": false, "inputTypes": [ { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -42661,13 +42800,13 @@ "isNullable": false, "inputTypes": [ { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -42892,13 +43031,13 @@ "isNullable": false, "inputTypes": [ { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -42992,13 +43131,13 @@ "isNullable": false, "inputTypes": [ { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -43092,13 +43231,13 @@ "isNullable": false, "inputTypes": [ { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -43192,13 +43331,13 @@ "isNullable": false, "inputTypes": [ { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -43423,13 +43562,13 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelOrderByWithRelationAndSearchRelevanceInput", + "type": "NativeTypeModelOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "NativeTypeModelOrderByWithRelationAndSearchRelevanceInput", + "type": "NativeTypeModelOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -43523,13 +43662,13 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelOrderByWithRelationAndSearchRelevanceInput", + "type": "NativeTypeModelOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "NativeTypeModelOrderByWithRelationAndSearchRelevanceInput", + "type": "NativeTypeModelOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -43623,13 +43762,13 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelOrderByWithRelationAndSearchRelevanceInput", + "type": "NativeTypeModelOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "NativeTypeModelOrderByWithRelationAndSearchRelevanceInput", + "type": "NativeTypeModelOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -43723,13 +43862,13 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelOrderByWithRelationAndSearchRelevanceInput", + "type": "NativeTypeModelOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "NativeTypeModelOrderByWithRelationAndSearchRelevanceInput", + "type": "NativeTypeModelOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -43954,13 +44093,13 @@ "isNullable": false, "inputTypes": [ { - "type": "EquipmentOrderByWithRelationAndSearchRelevanceInput", + "type": "EquipmentOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "EquipmentOrderByWithRelationAndSearchRelevanceInput", + "type": "EquipmentOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -44054,13 +44193,13 @@ "isNullable": false, "inputTypes": [ { - "type": "EquipmentOrderByWithRelationAndSearchRelevanceInput", + "type": "EquipmentOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "EquipmentOrderByWithRelationAndSearchRelevanceInput", + "type": "EquipmentOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -44154,13 +44293,13 @@ "isNullable": false, "inputTypes": [ { - "type": "EquipmentOrderByWithRelationAndSearchRelevanceInput", + "type": "EquipmentOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "EquipmentOrderByWithRelationAndSearchRelevanceInput", + "type": "EquipmentOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -44254,13 +44393,13 @@ "isNullable": false, "inputTypes": [ { - "type": "EquipmentOrderByWithRelationAndSearchRelevanceInput", + "type": "EquipmentOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "EquipmentOrderByWithRelationAndSearchRelevanceInput", + "type": "EquipmentOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -44485,13 +44624,13 @@ "isNullable": false, "inputTypes": [ { - "type": "HiddenOrderByWithRelationAndSearchRelevanceInput", + "type": "HiddenOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "HiddenOrderByWithRelationAndSearchRelevanceInput", + "type": "HiddenOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -44585,13 +44724,13 @@ "isNullable": false, "inputTypes": [ { - "type": "HiddenOrderByWithRelationAndSearchRelevanceInput", + "type": "HiddenOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "HiddenOrderByWithRelationAndSearchRelevanceInput", + "type": "HiddenOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -44685,13 +44824,13 @@ "isNullable": false, "inputTypes": [ { - "type": "HiddenOrderByWithRelationAndSearchRelevanceInput", + "type": "HiddenOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "HiddenOrderByWithRelationAndSearchRelevanceInput", + "type": "HiddenOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -44785,13 +44924,13 @@ "isNullable": false, "inputTypes": [ { - "type": "HiddenOrderByWithRelationAndSearchRelevanceInput", + "type": "HiddenOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "HiddenOrderByWithRelationAndSearchRelevanceInput", + "type": "HiddenOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -45136,6 +45275,49 @@ "isList": false } }, + { + "name": "createManyUserAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "UserCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "UserCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManyUserAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, { "name": "deleteOneUser", "args": [ @@ -45411,6 +45593,49 @@ "isList": false } }, + { + "name": "createManypostAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "postCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "postCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManypostAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, { "name": "deleteOnepost", "args": [ @@ -45686,6 +45911,49 @@ "isList": false } }, + { + "name": "createManyCategoryAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "CategoryCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "CategoryCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManyCategoryAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, { "name": "deleteOneCategory", "args": [ @@ -45961,6 +46229,49 @@ "isList": false } }, + { + "name": "createManyPatientAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "PatientCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "PatientCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManyPatientAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, { "name": "deleteOnePatient", "args": [ @@ -46236,6 +46547,49 @@ "isList": false } }, + { + "name": "createManyMovieAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "MovieCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "MovieCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManyMovieAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, { "name": "deleteOneMovie", "args": [ @@ -46511,6 +46865,49 @@ "isList": false } }, + { + "name": "createManyDirectorAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "DirectorCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "DirectorCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManyDirectorAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, { "name": "deleteOneDirector", "args": [ @@ -46786,6 +47183,49 @@ "isList": false } }, + { + "name": "createManyProblemAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "ProblemCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "ProblemCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManyProblemAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, { "name": "deleteOneProblem", "args": [ @@ -47062,239 +47502,7 @@ } }, { - "name": "deleteOneCreator", - "args": [ - { - "name": "where", - "isRequired": true, - "isNullable": false, - "inputTypes": [ - { - "type": "CreatorWhereUniqueInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - } - ], - "isNullable": true, - "outputType": { - "type": "Creator", - "namespace": "model", - "location": "outputObjectTypes", - "isList": false - } - }, - { - "name": "updateOneCreator", - "args": [ - { - "name": "data", - "isRequired": true, - "isNullable": false, - "inputTypes": [ - { - "type": "CreatorUpdateInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - }, - { - "type": "CreatorUncheckedUpdateInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - }, - { - "name": "where", - "isRequired": true, - "isNullable": false, - "inputTypes": [ - { - "type": "CreatorWhereUniqueInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - } - ], - "isNullable": true, - "outputType": { - "type": "Creator", - "namespace": "model", - "location": "outputObjectTypes", - "isList": false - } - }, - { - "name": "updateManyCreator", - "args": [ - { - "name": "data", - "isRequired": true, - "isNullable": false, - "inputTypes": [ - { - "type": "CreatorUpdateManyMutationInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - }, - { - "type": "CreatorUncheckedUpdateManyInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - }, - { - "name": "where", - "isRequired": false, - "isNullable": false, - "inputTypes": [ - { - "type": "CreatorWhereInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - } - ], - "isNullable": false, - "outputType": { - "type": "AffectedRowsOutput", - "namespace": "prisma", - "location": "outputObjectTypes", - "isList": false - } - }, - { - "name": "deleteManyCreator", - "args": [ - { - "name": "where", - "isRequired": false, - "isNullable": false, - "inputTypes": [ - { - "type": "CreatorWhereInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - } - ], - "isNullable": false, - "outputType": { - "type": "AffectedRowsOutput", - "namespace": "prisma", - "location": "outputObjectTypes", - "isList": false - } - }, - { - "name": "createOneNativeTypeModel", - "args": [ - { - "name": "data", - "isRequired": false, - "isNullable": false, - "inputTypes": [ - { - "type": "NativeTypeModelCreateInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - }, - { - "type": "NativeTypeModelUncheckedCreateInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - } - ], - "isNullable": false, - "outputType": { - "type": "NativeTypeModel", - "namespace": "model", - "location": "outputObjectTypes", - "isList": false - } - }, - { - "name": "upsertOneNativeTypeModel", - "args": [ - { - "name": "where", - "isRequired": true, - "isNullable": false, - "inputTypes": [ - { - "type": "NativeTypeModelWhereUniqueInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - }, - { - "name": "create", - "isRequired": true, - "isNullable": false, - "inputTypes": [ - { - "type": "NativeTypeModelCreateInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - }, - { - "type": "NativeTypeModelUncheckedCreateInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - }, - { - "name": "update", - "isRequired": true, - "isNullable": false, - "inputTypes": [ - { - "type": "NativeTypeModelUpdateInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - }, - { - "type": "NativeTypeModelUncheckedUpdateInput", - "namespace": "prisma", - "location": "inputObjectTypes", - "isList": false - } - ] - } - ], - "isNullable": false, - "outputType": { - "type": "NativeTypeModel", - "namespace": "model", - "location": "outputObjectTypes", - "isList": false - } - }, - { - "name": "createManyNativeTypeModel", + "name": "createManyCreatorAndReturn", "args": [ { "name": "data", @@ -47302,13 +47510,13 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelCreateManyInput", + "type": "CreatorCreateManyInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false }, { - "type": "NativeTypeModelCreateManyInput", + "type": "CreatorCreateManyInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true @@ -47330,14 +47538,14 @@ ], "isNullable": false, "outputType": { - "type": "AffectedRowsOutput", - "namespace": "prisma", + "type": "CreateManyCreatorAndReturnOutputType", + "namespace": "model", "location": "outputObjectTypes", - "isList": false + "isList": true } }, { - "name": "deleteOneNativeTypeModel", + "name": "deleteOneCreator", "args": [ { "name": "where", @@ -47345,7 +47553,7 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelWhereUniqueInput", + "type": "CreatorWhereUniqueInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47355,14 +47563,14 @@ ], "isNullable": true, "outputType": { - "type": "NativeTypeModel", + "type": "Creator", "namespace": "model", "location": "outputObjectTypes", "isList": false } }, { - "name": "updateOneNativeTypeModel", + "name": "updateOneCreator", "args": [ { "name": "data", @@ -47370,13 +47578,13 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelUpdateInput", + "type": "CreatorUpdateInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false }, { - "type": "NativeTypeModelUncheckedUpdateInput", + "type": "CreatorUncheckedUpdateInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47389,7 +47597,7 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelWhereUniqueInput", + "type": "CreatorWhereUniqueInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47399,14 +47607,14 @@ ], "isNullable": true, "outputType": { - "type": "NativeTypeModel", + "type": "Creator", "namespace": "model", "location": "outputObjectTypes", "isList": false } }, { - "name": "updateManyNativeTypeModel", + "name": "updateManyCreator", "args": [ { "name": "data", @@ -47414,13 +47622,13 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelUpdateManyMutationInput", + "type": "CreatorUpdateManyMutationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false }, { - "type": "NativeTypeModelUncheckedUpdateManyInput", + "type": "CreatorUncheckedUpdateManyInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47433,7 +47641,7 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelWhereInput", + "type": "CreatorWhereInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47450,7 +47658,7 @@ } }, { - "name": "deleteManyNativeTypeModel", + "name": "deleteManyCreator", "args": [ { "name": "where", @@ -47458,7 +47666,7 @@ "isNullable": false, "inputTypes": [ { - "type": "NativeTypeModelWhereInput", + "type": "CreatorWhereInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47475,7 +47683,7 @@ } }, { - "name": "createOneEquipment", + "name": "createOneNativeTypeModel", "args": [ { "name": "data", @@ -47483,13 +47691,13 @@ "isNullable": false, "inputTypes": [ { - "type": "EquipmentCreateInput", + "type": "NativeTypeModelCreateInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false }, { - "type": "EquipmentUncheckedCreateInput", + "type": "NativeTypeModelUncheckedCreateInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47499,14 +47707,14 @@ ], "isNullable": false, "outputType": { - "type": "Equipment", + "type": "NativeTypeModel", "namespace": "model", "location": "outputObjectTypes", "isList": false } }, { - "name": "upsertOneEquipment", + "name": "upsertOneNativeTypeModel", "args": [ { "name": "where", @@ -47514,7 +47722,7 @@ "isNullable": false, "inputTypes": [ { - "type": "EquipmentWhereUniqueInput", + "type": "NativeTypeModelWhereUniqueInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47527,13 +47735,13 @@ "isNullable": false, "inputTypes": [ { - "type": "EquipmentCreateInput", + "type": "NativeTypeModelCreateInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false }, { - "type": "EquipmentUncheckedCreateInput", + "type": "NativeTypeModelUncheckedCreateInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47546,13 +47754,13 @@ "isNullable": false, "inputTypes": [ { - "type": "EquipmentUpdateInput", + "type": "NativeTypeModelUpdateInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false }, { - "type": "EquipmentUncheckedUpdateInput", + "type": "NativeTypeModelUncheckedUpdateInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -47562,14 +47770,14 @@ ], "isNullable": false, "outputType": { - "type": "Equipment", + "type": "NativeTypeModel", "namespace": "model", "location": "outputObjectTypes", "isList": false } }, { - "name": "createManyEquipment", + "name": "createManyNativeTypeModel", "args": [ { "name": "data", @@ -47577,13 +47785,13 @@ "isNullable": false, "inputTypes": [ { - "type": "EquipmentCreateManyInput", + "type": "NativeTypeModelCreateManyInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false }, { - "type": "EquipmentCreateManyInput", + "type": "NativeTypeModelCreateManyInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true @@ -47611,6 +47819,367 @@ "isList": false } }, + { + "name": "createManyNativeTypeModelAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "NativeTypeModelCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "NativeTypeModelCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManyNativeTypeModelAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, + { + "name": "deleteOneNativeTypeModel", + "args": [ + { + "name": "where", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "NativeTypeModelWhereUniqueInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": true, + "outputType": { + "type": "NativeTypeModel", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "updateOneNativeTypeModel", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "NativeTypeModelUpdateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "NativeTypeModelUncheckedUpdateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "where", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "NativeTypeModelWhereUniqueInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": true, + "outputType": { + "type": "NativeTypeModel", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "updateManyNativeTypeModel", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "NativeTypeModelUpdateManyMutationInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "NativeTypeModelUncheckedUpdateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "where", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "NativeTypeModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "AffectedRowsOutput", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "deleteManyNativeTypeModel", + "args": [ + { + "name": "where", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "NativeTypeModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "AffectedRowsOutput", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "createOneEquipment", + "args": [ + { + "name": "data", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "EquipmentCreateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "EquipmentUncheckedCreateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "Equipment", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "upsertOneEquipment", + "args": [ + { + "name": "where", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "EquipmentWhereUniqueInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "create", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "EquipmentCreateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "EquipmentUncheckedCreateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "update", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "EquipmentUpdateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "EquipmentUncheckedUpdateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "Equipment", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "createManyEquipment", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "EquipmentCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "EquipmentCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "AffectedRowsOutput", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "createManyEquipmentAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "EquipmentCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "EquipmentCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManyEquipmentAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, { "name": "deleteOneEquipment", "args": [ @@ -47886,6 +48455,49 @@ "isList": false } }, + { + "name": "createManyHiddenAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "HiddenCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "HiddenCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManyHiddenAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, { "name": "deleteOneHidden", "args": [ @@ -51814,13 +52426,13 @@ "isNullable": false, "inputTypes": [ { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -51914,13 +52526,13 @@ "isNullable": false, "inputTypes": [ { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "postOrderByWithRelationAndSearchRelevanceInput", + "type": "postOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -52318,13 +52930,13 @@ "isNullable": false, "inputTypes": [ { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "MovieOrderByWithRelationAndSearchRelevanceInput", + "type": "MovieOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -52464,13 +53076,13 @@ "isNullable": false, "inputTypes": [ { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "CreatorOrderByWithRelationAndSearchRelevanceInput", + "type": "CreatorOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -52625,13 +53237,13 @@ "isNullable": false, "inputTypes": [ { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -52725,13 +53337,13 @@ "isNullable": false, "inputTypes": [ { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": true }, { - "type": "ProblemOrderByWithRelationAndSearchRelevanceInput", + "type": "ProblemOrderByWithRelationInput", "namespace": "prisma", "location": "inputObjectTypes", "isList": false @@ -52910,6 +53522,575 @@ } } ] + }, + { + "name": "CreateManyUserAndReturnOutputType", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "email", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "name", + "args": [], + "isNullable": true, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "age", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "balance", + "args": [], + "isNullable": false, + "outputType": { + "type": "Float", + "location": "scalar", + "isList": false + } + }, + { + "name": "amount", + "args": [], + "isNullable": false, + "outputType": { + "type": "Float", + "location": "scalar", + "isList": false + } + }, + { + "name": "role", + "args": [], + "isNullable": false, + "outputType": { + "type": "Role", + "namespace": "model", + "location": "enumTypes", + "isList": false + } + }, + { + "name": "grades", + "args": [], + "isNullable": true, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": true + } + }, + { + "name": "aliases", + "args": [], + "isNullable": true, + "outputType": { + "type": "String", + "location": "scalar", + "isList": true + } + } + ] + }, + { + "name": "CreateManypostAndReturnOutputType", + "fields": [ + { + "name": "uuid", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "createdAt", + "args": [], + "isNullable": false, + "outputType": { + "type": "DateTime", + "location": "scalar", + "isList": false + } + }, + { + "name": "updatedAt", + "args": [], + "isNullable": false, + "outputType": { + "type": "DateTime", + "location": "scalar", + "isList": false + } + }, + { + "name": "published", + "args": [], + "isNullable": false, + "outputType": { + "type": "Boolean", + "location": "scalar", + "isList": false + } + }, + { + "name": "title", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "subtitle", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "content", + "args": [], + "isNullable": true, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "authorId", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "editorId", + "args": [], + "isNullable": true, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "kind", + "args": [], + "isNullable": true, + "outputType": { + "type": "PostKind", + "namespace": "model", + "location": "enumTypes", + "isList": false + } + }, + { + "name": "metadata", + "args": [], + "isNullable": false, + "outputType": { + "type": "Json", + "location": "scalar", + "isList": false + } + }, + { + "name": "author", + "args": [], + "isNullable": false, + "outputType": { + "type": "User", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "editor", + "args": [ + { + "name": "where", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "UserWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": true, + "outputType": { + "type": "User", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + } + ] + }, + { + "name": "CreateManyCategoryAndReturnOutputType", + "fields": [ + { + "name": "name", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "slug", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "number", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + } + ] + }, + { + "name": "CreateManyPatientAndReturnOutputType", + "fields": [ + { + "name": "firstName", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "lastName", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "email", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + } + ] + }, + { + "name": "CreateManyMovieAndReturnOutputType", + "fields": [ + { + "name": "directorFirstName", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "directorLastName", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "title", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "director", + "args": [], + "isNullable": false, + "outputType": { + "type": "Director", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + } + ] + }, + { + "name": "CreateManyDirectorAndReturnOutputType", + "fields": [ + { + "name": "firstName", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "lastName", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + } + ] + }, + { + "name": "CreateManyProblemAndReturnOutputType", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "problemText", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "creatorId", + "args": [], + "isNullable": true, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "creator", + "args": [ + { + "name": "where", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "CreatorWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": true, + "outputType": { + "type": "Creator", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + } + ] + }, + { + "name": "CreateManyCreatorAndReturnOutputType", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "name", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + } + ] + }, + { + "name": "CreateManyNativeTypeModelAndReturnOutputType", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "bigInt", + "args": [], + "isNullable": true, + "outputType": { + "type": "BigInt", + "location": "scalar", + "isList": false + } + }, + { + "name": "byteA", + "args": [], + "isNullable": true, + "outputType": { + "type": "Bytes", + "location": "scalar", + "isList": false + } + }, + { + "name": "decimal", + "args": [], + "isNullable": true, + "outputType": { + "type": "Decimal", + "location": "scalar", + "isList": false + } + } + ] + }, + { + "name": "CreateManyEquipmentAndReturnOutputType", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "name", + "args": [], + "isNullable": true, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + } + ] + }, + { + "name": "CreateManyHiddenAndReturnOutputType", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": false, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + }, + { + "name": "name", + "args": [], + "isNullable": true, + "outputType": { + "type": "String", + "location": "scalar", + "isList": false + } + } + ] } ] }, @@ -53884,6 +55065,7 @@ "model": "User", "aggregate": "aggregateUser", "createMany": "createManyUser", + "createManyAndReturn": "createManyUserAndReturn", "createOne": "createOneUser", "deleteMany": "deleteManyUser", "deleteOne": "deleteOneUser", @@ -53901,6 +55083,7 @@ "model": "post", "aggregate": "aggregatepost", "createMany": "createManypost", + "createManyAndReturn": "createManypostAndReturn", "createOne": "createOnepost", "deleteMany": "deleteManypost", "deleteOne": "deleteOnepost", @@ -53918,6 +55101,7 @@ "model": "Category", "aggregate": "aggregateCategory", "createMany": "createManyCategory", + "createManyAndReturn": "createManyCategoryAndReturn", "createOne": "createOneCategory", "deleteMany": "deleteManyCategory", "deleteOne": "deleteOneCategory", @@ -53935,6 +55119,7 @@ "model": "Patient", "aggregate": "aggregatePatient", "createMany": "createManyPatient", + "createManyAndReturn": "createManyPatientAndReturn", "createOne": "createOnePatient", "deleteMany": "deleteManyPatient", "deleteOne": "deleteOnePatient", @@ -53952,6 +55137,7 @@ "model": "Movie", "aggregate": "aggregateMovie", "createMany": "createManyMovie", + "createManyAndReturn": "createManyMovieAndReturn", "createOne": "createOneMovie", "deleteMany": "deleteManyMovie", "deleteOne": "deleteOneMovie", @@ -53969,6 +55155,7 @@ "model": "Director", "aggregate": "aggregateDirector", "createMany": "createManyDirector", + "createManyAndReturn": "createManyDirectorAndReturn", "createOne": "createOneDirector", "deleteMany": "deleteManyDirector", "deleteOne": "deleteOneDirector", @@ -53986,6 +55173,7 @@ "model": "Problem", "aggregate": "aggregateProblem", "createMany": "createManyProblem", + "createManyAndReturn": "createManyProblemAndReturn", "createOne": "createOneProblem", "deleteMany": "deleteManyProblem", "deleteOne": "deleteOneProblem", @@ -54003,6 +55191,7 @@ "model": "Creator", "aggregate": "aggregateCreator", "createMany": "createManyCreator", + "createManyAndReturn": "createManyCreatorAndReturn", "createOne": "createOneCreator", "deleteMany": "deleteManyCreator", "deleteOne": "deleteOneCreator", @@ -54020,6 +55209,7 @@ "model": "NativeTypeModel", "aggregate": "aggregateNativeTypeModel", "createMany": "createManyNativeTypeModel", + "createManyAndReturn": "createManyNativeTypeModelAndReturn", "createOne": "createOneNativeTypeModel", "deleteMany": "deleteManyNativeTypeModel", "deleteOne": "deleteOneNativeTypeModel", @@ -54037,6 +55227,7 @@ "model": "Equipment", "aggregate": "aggregateEquipment", "createMany": "createManyEquipment", + "createManyAndReturn": "createManyEquipmentAndReturn", "createOne": "createOneEquipment", "deleteMany": "deleteManyEquipment", "deleteOne": "deleteOneEquipment", @@ -54054,6 +55245,7 @@ "model": "Hidden", "aggregate": "aggregateHidden", "createMany": "createManyHidden", + "createManyAndReturn": "createManyHiddenAndReturn", "createOne": "createOneHidden", "deleteMany": "deleteManyHidden", "deleteOne": "deleteOneHidden", diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/CategoryCrudResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/CategoryCrudResolver.ts index 29a787100..bb401c48e 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/CategoryCrudResolver.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/CategoryCrudResolver.ts @@ -1,6 +1,7 @@ import * as TypeGraphQL from "type-graphql"; import type { GraphQLResolveInfo } from "graphql"; import { AggregateCategoryArgs } from "./args/AggregateCategoryArgs"; +import { CreateManyAndReturnCategoryArgs } from "./args/CreateManyAndReturnCategoryArgs"; import { CreateManyCategoryArgs } from "./args/CreateManyCategoryArgs"; import { CreateOneCategoryArgs } from "./args/CreateOneCategoryArgs"; import { DeleteManyCategoryArgs } from "./args/DeleteManyCategoryArgs"; @@ -19,6 +20,7 @@ import { Category } from "../../../models/Category"; import { AffectedRowsOutput } from "../../outputs/AffectedRowsOutput"; import { AggregateCategory } from "../../outputs/AggregateCategory"; import { CategoryGroupBy } from "../../outputs/CategoryGroupBy"; +import { CreateManyAndReturnCategory } from "../../outputs/CreateManyAndReturnCategory"; @TypeGraphQL.Resolver(_of => Category) export class CategoryCrudResolver { @@ -43,6 +45,17 @@ export class CategoryCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnCategory], { + nullable: false + }) + async createManyAndReturnCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnCategoryArgs) args: CreateManyAndReturnCategoryArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).category.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => Category, { nullable: false }) diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/CreateManyAndReturnCategoryResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/CreateManyAndReturnCategoryResolver.ts new file mode 100644 index 000000000..a92adcb86 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/CreateManyAndReturnCategoryResolver.ts @@ -0,0 +1,20 @@ +import * as TypeGraphQL from "type-graphql"; +import type { GraphQLResolveInfo } from "graphql"; +import { CreateManyAndReturnCategoryArgs } from "./args/CreateManyAndReturnCategoryArgs"; +import { Category } from "../../../models/Category"; +import { CreateManyAndReturnCategory } from "../../outputs/CreateManyAndReturnCategory"; +import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldIntoSelectRelationsCount } from "../../../helpers"; + +@TypeGraphQL.Resolver(_of => Category) +export class CreateManyAndReturnCategoryResolver { + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnCategory], { + nullable: false + }) + async createManyAndReturnCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnCategoryArgs) args: CreateManyAndReturnCategoryArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).category.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/AggregateCategoryArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/AggregateCategoryArgs.ts index 147558059..a5fdac8cc 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/AggregateCategoryArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/AggregateCategoryArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { CategoryOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/CategoryOrderByWithRelationAndSearchRelevanceInput"; +import { CategoryOrderByWithRelationInput } from "../../../inputs/CategoryOrderByWithRelationInput"; import { CategoryWhereInput } from "../../../inputs/CategoryWhereInput"; import { CategoryWhereUniqueInput } from "../../../inputs/CategoryWhereUniqueInput"; @@ -11,10 +11,10 @@ export class AggregateCategoryArgs { }) where?: CategoryWhereInput | undefined; - @TypeGraphQL.Field(_type => [CategoryOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [CategoryOrderByWithRelationInput], { nullable: true }) - orderBy?: CategoryOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: CategoryOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => CategoryWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/CreateManyAndReturnCategoryArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/CreateManyAndReturnCategoryArgs.ts new file mode 100644 index 000000000..77715a3a0 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/CreateManyAndReturnCategoryArgs.ts @@ -0,0 +1,16 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { CategoryCreateManyInput } from "../../../inputs/CategoryCreateManyInput"; + +@TypeGraphQL.ArgsType() +export class CreateManyAndReturnCategoryArgs { + @TypeGraphQL.Field(_type => [CategoryCreateManyInput], { + nullable: false + }) + data!: CategoryCreateManyInput[]; + + @TypeGraphQL.Field(_type => Boolean, { + nullable: true + }) + skipDuplicates?: boolean | undefined; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/FindFirstCategoryArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/FindFirstCategoryArgs.ts index e3f3617ad..284015435 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/FindFirstCategoryArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/FindFirstCategoryArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { CategoryOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/CategoryOrderByWithRelationAndSearchRelevanceInput"; +import { CategoryOrderByWithRelationInput } from "../../../inputs/CategoryOrderByWithRelationInput"; import { CategoryWhereInput } from "../../../inputs/CategoryWhereInput"; import { CategoryWhereUniqueInput } from "../../../inputs/CategoryWhereUniqueInput"; import { CategoryScalarFieldEnum } from "../../../../enums/CategoryScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstCategoryArgs { }) where?: CategoryWhereInput | undefined; - @TypeGraphQL.Field(_type => [CategoryOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [CategoryOrderByWithRelationInput], { nullable: true }) - orderBy?: CategoryOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: CategoryOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => CategoryWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/FindFirstCategoryOrThrowArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/FindFirstCategoryOrThrowArgs.ts index ee607b12b..7eaaf71fb 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/FindFirstCategoryOrThrowArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/FindFirstCategoryOrThrowArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { CategoryOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/CategoryOrderByWithRelationAndSearchRelevanceInput"; +import { CategoryOrderByWithRelationInput } from "../../../inputs/CategoryOrderByWithRelationInput"; import { CategoryWhereInput } from "../../../inputs/CategoryWhereInput"; import { CategoryWhereUniqueInput } from "../../../inputs/CategoryWhereUniqueInput"; import { CategoryScalarFieldEnum } from "../../../../enums/CategoryScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstCategoryOrThrowArgs { }) where?: CategoryWhereInput | undefined; - @TypeGraphQL.Field(_type => [CategoryOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [CategoryOrderByWithRelationInput], { nullable: true }) - orderBy?: CategoryOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: CategoryOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => CategoryWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/FindManyCategoryArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/FindManyCategoryArgs.ts index 09812c625..b9f0f05a9 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/FindManyCategoryArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/FindManyCategoryArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { CategoryOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/CategoryOrderByWithRelationAndSearchRelevanceInput"; +import { CategoryOrderByWithRelationInput } from "../../../inputs/CategoryOrderByWithRelationInput"; import { CategoryWhereInput } from "../../../inputs/CategoryWhereInput"; import { CategoryWhereUniqueInput } from "../../../inputs/CategoryWhereUniqueInput"; import { CategoryScalarFieldEnum } from "../../../../enums/CategoryScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindManyCategoryArgs { }) where?: CategoryWhereInput | undefined; - @TypeGraphQL.Field(_type => [CategoryOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [CategoryOrderByWithRelationInput], { nullable: true }) - orderBy?: CategoryOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: CategoryOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => CategoryWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/index.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/index.ts index 7cfffd426..ba3cbd3f8 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/index.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Category/args/index.ts @@ -1,4 +1,5 @@ export { AggregateCategoryArgs } from "./AggregateCategoryArgs"; +export { CreateManyAndReturnCategoryArgs } from "./CreateManyAndReturnCategoryArgs"; export { CreateManyCategoryArgs } from "./CreateManyCategoryArgs"; export { CreateOneCategoryArgs } from "./CreateOneCategoryArgs"; export { DeleteManyCategoryArgs } from "./DeleteManyCategoryArgs"; diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/CreateManyAndReturnCreatorResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/CreateManyAndReturnCreatorResolver.ts new file mode 100644 index 000000000..8ffaddc7d --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/CreateManyAndReturnCreatorResolver.ts @@ -0,0 +1,20 @@ +import * as TypeGraphQL from "type-graphql"; +import type { GraphQLResolveInfo } from "graphql"; +import { CreateManyAndReturnCreatorArgs } from "./args/CreateManyAndReturnCreatorArgs"; +import { Creator } from "../../../models/Creator"; +import { CreateManyAndReturnCreator } from "../../outputs/CreateManyAndReturnCreator"; +import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldIntoSelectRelationsCount } from "../../../helpers"; + +@TypeGraphQL.Resolver(_of => Creator) +export class CreateManyAndReturnCreatorResolver { + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnCreator], { + nullable: false + }) + async createManyAndReturnCreator(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnCreatorArgs) args: CreateManyAndReturnCreatorArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).creator.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/CreatorCrudResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/CreatorCrudResolver.ts index 6e889d670..6dd0785e2 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/CreatorCrudResolver.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/CreatorCrudResolver.ts @@ -1,6 +1,7 @@ import * as TypeGraphQL from "type-graphql"; import type { GraphQLResolveInfo } from "graphql"; import { AggregateCreatorArgs } from "./args/AggregateCreatorArgs"; +import { CreateManyAndReturnCreatorArgs } from "./args/CreateManyAndReturnCreatorArgs"; import { CreateManyCreatorArgs } from "./args/CreateManyCreatorArgs"; import { CreateOneCreatorArgs } from "./args/CreateOneCreatorArgs"; import { DeleteManyCreatorArgs } from "./args/DeleteManyCreatorArgs"; @@ -18,6 +19,7 @@ import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldI import { Creator } from "../../../models/Creator"; import { AffectedRowsOutput } from "../../outputs/AffectedRowsOutput"; import { AggregateCreator } from "../../outputs/AggregateCreator"; +import { CreateManyAndReturnCreator } from "../../outputs/CreateManyAndReturnCreator"; import { CreatorGroupBy } from "../../outputs/CreatorGroupBy"; @TypeGraphQL.Resolver(_of => Creator) @@ -43,6 +45,17 @@ export class CreatorCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnCreator], { + nullable: false + }) + async createManyAndReturnCreator(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnCreatorArgs) args: CreateManyAndReturnCreatorArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).creator.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => Creator, { nullable: false }) diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/AggregateCreatorArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/AggregateCreatorArgs.ts index 1131c1c23..6b507bb11 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/AggregateCreatorArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/AggregateCreatorArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { CreatorOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/CreatorOrderByWithRelationAndSearchRelevanceInput"; +import { CreatorOrderByWithRelationInput } from "../../../inputs/CreatorOrderByWithRelationInput"; import { CreatorWhereInput } from "../../../inputs/CreatorWhereInput"; import { CreatorWhereUniqueInput } from "../../../inputs/CreatorWhereUniqueInput"; @@ -11,10 +11,10 @@ export class AggregateCreatorArgs { }) where?: CreatorWhereInput | undefined; - @TypeGraphQL.Field(_type => [CreatorOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [CreatorOrderByWithRelationInput], { nullable: true }) - orderBy?: CreatorOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: CreatorOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => CreatorWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/CreateManyAndReturnCreatorArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/CreateManyAndReturnCreatorArgs.ts new file mode 100644 index 000000000..8b216b476 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/CreateManyAndReturnCreatorArgs.ts @@ -0,0 +1,16 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { CreatorCreateManyInput } from "../../../inputs/CreatorCreateManyInput"; + +@TypeGraphQL.ArgsType() +export class CreateManyAndReturnCreatorArgs { + @TypeGraphQL.Field(_type => [CreatorCreateManyInput], { + nullable: false + }) + data!: CreatorCreateManyInput[]; + + @TypeGraphQL.Field(_type => Boolean, { + nullable: true + }) + skipDuplicates?: boolean | undefined; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/FindFirstCreatorArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/FindFirstCreatorArgs.ts index fce570e9a..ae878168a 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/FindFirstCreatorArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/FindFirstCreatorArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { CreatorOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/CreatorOrderByWithRelationAndSearchRelevanceInput"; +import { CreatorOrderByWithRelationInput } from "../../../inputs/CreatorOrderByWithRelationInput"; import { CreatorWhereInput } from "../../../inputs/CreatorWhereInput"; import { CreatorWhereUniqueInput } from "../../../inputs/CreatorWhereUniqueInput"; import { CreatorScalarFieldEnum } from "../../../../enums/CreatorScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstCreatorArgs { }) where?: CreatorWhereInput | undefined; - @TypeGraphQL.Field(_type => [CreatorOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [CreatorOrderByWithRelationInput], { nullable: true }) - orderBy?: CreatorOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: CreatorOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => CreatorWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/FindFirstCreatorOrThrowArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/FindFirstCreatorOrThrowArgs.ts index 6f7a1612c..2c6668c9f 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/FindFirstCreatorOrThrowArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/FindFirstCreatorOrThrowArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { CreatorOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/CreatorOrderByWithRelationAndSearchRelevanceInput"; +import { CreatorOrderByWithRelationInput } from "../../../inputs/CreatorOrderByWithRelationInput"; import { CreatorWhereInput } from "../../../inputs/CreatorWhereInput"; import { CreatorWhereUniqueInput } from "../../../inputs/CreatorWhereUniqueInput"; import { CreatorScalarFieldEnum } from "../../../../enums/CreatorScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstCreatorOrThrowArgs { }) where?: CreatorWhereInput | undefined; - @TypeGraphQL.Field(_type => [CreatorOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [CreatorOrderByWithRelationInput], { nullable: true }) - orderBy?: CreatorOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: CreatorOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => CreatorWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/FindManyCreatorArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/FindManyCreatorArgs.ts index 779b65135..207a93721 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/FindManyCreatorArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/FindManyCreatorArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { CreatorOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/CreatorOrderByWithRelationAndSearchRelevanceInput"; +import { CreatorOrderByWithRelationInput } from "../../../inputs/CreatorOrderByWithRelationInput"; import { CreatorWhereInput } from "../../../inputs/CreatorWhereInput"; import { CreatorWhereUniqueInput } from "../../../inputs/CreatorWhereUniqueInput"; import { CreatorScalarFieldEnum } from "../../../../enums/CreatorScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindManyCreatorArgs { }) where?: CreatorWhereInput | undefined; - @TypeGraphQL.Field(_type => [CreatorOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [CreatorOrderByWithRelationInput], { nullable: true }) - orderBy?: CreatorOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: CreatorOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => CreatorWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/index.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/index.ts index c5a545496..1bf10744a 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/index.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Creator/args/index.ts @@ -1,4 +1,5 @@ export { AggregateCreatorArgs } from "./AggregateCreatorArgs"; +export { CreateManyAndReturnCreatorArgs } from "./CreateManyAndReturnCreatorArgs"; export { CreateManyCreatorArgs } from "./CreateManyCreatorArgs"; export { CreateOneCreatorArgs } from "./CreateOneCreatorArgs"; export { DeleteManyCreatorArgs } from "./DeleteManyCreatorArgs"; diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/CreateManyAndReturnDirectorResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/CreateManyAndReturnDirectorResolver.ts new file mode 100644 index 000000000..3c4ada1e8 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/CreateManyAndReturnDirectorResolver.ts @@ -0,0 +1,20 @@ +import * as TypeGraphQL from "type-graphql"; +import type { GraphQLResolveInfo } from "graphql"; +import { CreateManyAndReturnDirectorArgs } from "./args/CreateManyAndReturnDirectorArgs"; +import { Director } from "../../../models/Director"; +import { CreateManyAndReturnDirector } from "../../outputs/CreateManyAndReturnDirector"; +import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldIntoSelectRelationsCount } from "../../../helpers"; + +@TypeGraphQL.Resolver(_of => Director) +export class CreateManyAndReturnDirectorResolver { + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnDirector], { + nullable: false + }) + async createManyAndReturnDirector(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnDirectorArgs) args: CreateManyAndReturnDirectorArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).director.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/DirectorCrudResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/DirectorCrudResolver.ts index 25ad9a9a2..0459fea9c 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/DirectorCrudResolver.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/DirectorCrudResolver.ts @@ -1,6 +1,7 @@ import * as TypeGraphQL from "type-graphql"; import type { GraphQLResolveInfo } from "graphql"; import { AggregateDirectorArgs } from "./args/AggregateDirectorArgs"; +import { CreateManyAndReturnDirectorArgs } from "./args/CreateManyAndReturnDirectorArgs"; import { CreateManyDirectorArgs } from "./args/CreateManyDirectorArgs"; import { CreateOneDirectorArgs } from "./args/CreateOneDirectorArgs"; import { DeleteManyDirectorArgs } from "./args/DeleteManyDirectorArgs"; @@ -18,6 +19,7 @@ import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldI import { Director } from "../../../models/Director"; import { AffectedRowsOutput } from "../../outputs/AffectedRowsOutput"; import { AggregateDirector } from "../../outputs/AggregateDirector"; +import { CreateManyAndReturnDirector } from "../../outputs/CreateManyAndReturnDirector"; import { DirectorGroupBy } from "../../outputs/DirectorGroupBy"; @TypeGraphQL.Resolver(_of => Director) @@ -43,6 +45,17 @@ export class DirectorCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnDirector], { + nullable: false + }) + async createManyAndReturnDirector(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnDirectorArgs) args: CreateManyAndReturnDirectorArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).director.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => Director, { nullable: false }) diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/AggregateDirectorArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/AggregateDirectorArgs.ts index 88adb8a15..dbc7b0702 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/AggregateDirectorArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/AggregateDirectorArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { DirectorOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/DirectorOrderByWithRelationAndSearchRelevanceInput"; +import { DirectorOrderByWithRelationInput } from "../../../inputs/DirectorOrderByWithRelationInput"; import { DirectorWhereInput } from "../../../inputs/DirectorWhereInput"; import { DirectorWhereUniqueInput } from "../../../inputs/DirectorWhereUniqueInput"; @@ -11,10 +11,10 @@ export class AggregateDirectorArgs { }) where?: DirectorWhereInput | undefined; - @TypeGraphQL.Field(_type => [DirectorOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [DirectorOrderByWithRelationInput], { nullable: true }) - orderBy?: DirectorOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: DirectorOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => DirectorWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/CreateManyAndReturnDirectorArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/CreateManyAndReturnDirectorArgs.ts new file mode 100644 index 000000000..34089706c --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/CreateManyAndReturnDirectorArgs.ts @@ -0,0 +1,16 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { DirectorCreateManyInput } from "../../../inputs/DirectorCreateManyInput"; + +@TypeGraphQL.ArgsType() +export class CreateManyAndReturnDirectorArgs { + @TypeGraphQL.Field(_type => [DirectorCreateManyInput], { + nullable: false + }) + data!: DirectorCreateManyInput[]; + + @TypeGraphQL.Field(_type => Boolean, { + nullable: true + }) + skipDuplicates?: boolean | undefined; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/FindFirstDirectorArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/FindFirstDirectorArgs.ts index 26422cd82..5c7bdb22a 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/FindFirstDirectorArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/FindFirstDirectorArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { DirectorOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/DirectorOrderByWithRelationAndSearchRelevanceInput"; +import { DirectorOrderByWithRelationInput } from "../../../inputs/DirectorOrderByWithRelationInput"; import { DirectorWhereInput } from "../../../inputs/DirectorWhereInput"; import { DirectorWhereUniqueInput } from "../../../inputs/DirectorWhereUniqueInput"; import { DirectorScalarFieldEnum } from "../../../../enums/DirectorScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstDirectorArgs { }) where?: DirectorWhereInput | undefined; - @TypeGraphQL.Field(_type => [DirectorOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [DirectorOrderByWithRelationInput], { nullable: true }) - orderBy?: DirectorOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: DirectorOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => DirectorWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/FindFirstDirectorOrThrowArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/FindFirstDirectorOrThrowArgs.ts index c63df7481..c337bd70f 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/FindFirstDirectorOrThrowArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/FindFirstDirectorOrThrowArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { DirectorOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/DirectorOrderByWithRelationAndSearchRelevanceInput"; +import { DirectorOrderByWithRelationInput } from "../../../inputs/DirectorOrderByWithRelationInput"; import { DirectorWhereInput } from "../../../inputs/DirectorWhereInput"; import { DirectorWhereUniqueInput } from "../../../inputs/DirectorWhereUniqueInput"; import { DirectorScalarFieldEnum } from "../../../../enums/DirectorScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstDirectorOrThrowArgs { }) where?: DirectorWhereInput | undefined; - @TypeGraphQL.Field(_type => [DirectorOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [DirectorOrderByWithRelationInput], { nullable: true }) - orderBy?: DirectorOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: DirectorOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => DirectorWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/FindManyDirectorArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/FindManyDirectorArgs.ts index a7e05ca0a..98fb20c15 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/FindManyDirectorArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/FindManyDirectorArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { DirectorOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/DirectorOrderByWithRelationAndSearchRelevanceInput"; +import { DirectorOrderByWithRelationInput } from "../../../inputs/DirectorOrderByWithRelationInput"; import { DirectorWhereInput } from "../../../inputs/DirectorWhereInput"; import { DirectorWhereUniqueInput } from "../../../inputs/DirectorWhereUniqueInput"; import { DirectorScalarFieldEnum } from "../../../../enums/DirectorScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindManyDirectorArgs { }) where?: DirectorWhereInput | undefined; - @TypeGraphQL.Field(_type => [DirectorOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [DirectorOrderByWithRelationInput], { nullable: true }) - orderBy?: DirectorOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: DirectorOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => DirectorWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/index.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/index.ts index 02c75b7bd..f3d6f15e9 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/index.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Director/args/index.ts @@ -1,4 +1,5 @@ export { AggregateDirectorArgs } from "./AggregateDirectorArgs"; +export { CreateManyAndReturnDirectorArgs } from "./CreateManyAndReturnDirectorArgs"; export { CreateManyDirectorArgs } from "./CreateManyDirectorArgs"; export { CreateOneDirectorArgs } from "./CreateOneDirectorArgs"; export { DeleteManyDirectorArgs } from "./DeleteManyDirectorArgs"; diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/CreateManyAndReturnEquipmentResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/CreateManyAndReturnEquipmentResolver.ts new file mode 100644 index 000000000..900ae12e7 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/CreateManyAndReturnEquipmentResolver.ts @@ -0,0 +1,20 @@ +import * as TypeGraphQL from "type-graphql"; +import type { GraphQLResolveInfo } from "graphql"; +import { CreateManyAndReturnEquipmentArgs } from "./args/CreateManyAndReturnEquipmentArgs"; +import { Equipment } from "../../../models/Equipment"; +import { CreateManyAndReturnEquipment } from "../../outputs/CreateManyAndReturnEquipment"; +import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldIntoSelectRelationsCount } from "../../../helpers"; + +@TypeGraphQL.Resolver(_of => Equipment) +export class CreateManyAndReturnEquipmentResolver { + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnEquipment], { + nullable: false + }) + async createManyAndReturnEquipment(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnEquipmentArgs) args: CreateManyAndReturnEquipmentArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).equipment.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/EquipmentCrudResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/EquipmentCrudResolver.ts index cdf766a3b..4a440f717 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/EquipmentCrudResolver.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/EquipmentCrudResolver.ts @@ -1,6 +1,7 @@ import * as TypeGraphQL from "type-graphql"; import type { GraphQLResolveInfo } from "graphql"; import { AggregateEquipmentArgs } from "./args/AggregateEquipmentArgs"; +import { CreateManyAndReturnEquipmentArgs } from "./args/CreateManyAndReturnEquipmentArgs"; import { CreateManyEquipmentArgs } from "./args/CreateManyEquipmentArgs"; import { CreateOneEquipmentArgs } from "./args/CreateOneEquipmentArgs"; import { DeleteManyEquipmentArgs } from "./args/DeleteManyEquipmentArgs"; @@ -18,6 +19,7 @@ import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldI import { Equipment } from "../../../models/Equipment"; import { AffectedRowsOutput } from "../../outputs/AffectedRowsOutput"; import { AggregateEquipment } from "../../outputs/AggregateEquipment"; +import { CreateManyAndReturnEquipment } from "../../outputs/CreateManyAndReturnEquipment"; import { EquipmentGroupBy } from "../../outputs/EquipmentGroupBy"; @TypeGraphQL.Resolver(_of => Equipment) @@ -43,6 +45,17 @@ export class EquipmentCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnEquipment], { + nullable: false + }) + async createManyAndReturnEquipment(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnEquipmentArgs) args: CreateManyAndReturnEquipmentArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).equipment.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => Equipment, { nullable: false }) diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/AggregateEquipmentArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/AggregateEquipmentArgs.ts index 4686e47a9..c6c76df1d 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/AggregateEquipmentArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/AggregateEquipmentArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { EquipmentOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/EquipmentOrderByWithRelationAndSearchRelevanceInput"; +import { EquipmentOrderByWithRelationInput } from "../../../inputs/EquipmentOrderByWithRelationInput"; import { EquipmentWhereInput } from "../../../inputs/EquipmentWhereInput"; import { EquipmentWhereUniqueInput } from "../../../inputs/EquipmentWhereUniqueInput"; @@ -11,10 +11,10 @@ export class AggregateEquipmentArgs { }) where?: EquipmentWhereInput | undefined; - @TypeGraphQL.Field(_type => [EquipmentOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [EquipmentOrderByWithRelationInput], { nullable: true }) - orderBy?: EquipmentOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: EquipmentOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => EquipmentWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/CreateManyAndReturnEquipmentArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/CreateManyAndReturnEquipmentArgs.ts new file mode 100644 index 000000000..0af6f24f2 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/CreateManyAndReturnEquipmentArgs.ts @@ -0,0 +1,16 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { EquipmentCreateManyInput } from "../../../inputs/EquipmentCreateManyInput"; + +@TypeGraphQL.ArgsType() +export class CreateManyAndReturnEquipmentArgs { + @TypeGraphQL.Field(_type => [EquipmentCreateManyInput], { + nullable: false + }) + data!: EquipmentCreateManyInput[]; + + @TypeGraphQL.Field(_type => Boolean, { + nullable: true + }) + skipDuplicates?: boolean | undefined; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/FindFirstEquipmentArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/FindFirstEquipmentArgs.ts index 3b32ca6ac..c059ffcb4 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/FindFirstEquipmentArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/FindFirstEquipmentArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { EquipmentOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/EquipmentOrderByWithRelationAndSearchRelevanceInput"; +import { EquipmentOrderByWithRelationInput } from "../../../inputs/EquipmentOrderByWithRelationInput"; import { EquipmentWhereInput } from "../../../inputs/EquipmentWhereInput"; import { EquipmentWhereUniqueInput } from "../../../inputs/EquipmentWhereUniqueInput"; import { EquipmentScalarFieldEnum } from "../../../../enums/EquipmentScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstEquipmentArgs { }) where?: EquipmentWhereInput | undefined; - @TypeGraphQL.Field(_type => [EquipmentOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [EquipmentOrderByWithRelationInput], { nullable: true }) - orderBy?: EquipmentOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: EquipmentOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => EquipmentWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/FindFirstEquipmentOrThrowArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/FindFirstEquipmentOrThrowArgs.ts index c71135108..c32bf6d24 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/FindFirstEquipmentOrThrowArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/FindFirstEquipmentOrThrowArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { EquipmentOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/EquipmentOrderByWithRelationAndSearchRelevanceInput"; +import { EquipmentOrderByWithRelationInput } from "../../../inputs/EquipmentOrderByWithRelationInput"; import { EquipmentWhereInput } from "../../../inputs/EquipmentWhereInput"; import { EquipmentWhereUniqueInput } from "../../../inputs/EquipmentWhereUniqueInput"; import { EquipmentScalarFieldEnum } from "../../../../enums/EquipmentScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstEquipmentOrThrowArgs { }) where?: EquipmentWhereInput | undefined; - @TypeGraphQL.Field(_type => [EquipmentOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [EquipmentOrderByWithRelationInput], { nullable: true }) - orderBy?: EquipmentOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: EquipmentOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => EquipmentWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/FindManyEquipmentArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/FindManyEquipmentArgs.ts index b215e10cf..679a0b58b 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/FindManyEquipmentArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/FindManyEquipmentArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { EquipmentOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/EquipmentOrderByWithRelationAndSearchRelevanceInput"; +import { EquipmentOrderByWithRelationInput } from "../../../inputs/EquipmentOrderByWithRelationInput"; import { EquipmentWhereInput } from "../../../inputs/EquipmentWhereInput"; import { EquipmentWhereUniqueInput } from "../../../inputs/EquipmentWhereUniqueInput"; import { EquipmentScalarFieldEnum } from "../../../../enums/EquipmentScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindManyEquipmentArgs { }) where?: EquipmentWhereInput | undefined; - @TypeGraphQL.Field(_type => [EquipmentOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [EquipmentOrderByWithRelationInput], { nullable: true }) - orderBy?: EquipmentOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: EquipmentOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => EquipmentWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/index.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/index.ts index 111395e4d..0008350cf 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/index.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Equipment/args/index.ts @@ -1,4 +1,5 @@ export { AggregateEquipmentArgs } from "./AggregateEquipmentArgs"; +export { CreateManyAndReturnEquipmentArgs } from "./CreateManyAndReturnEquipmentArgs"; export { CreateManyEquipmentArgs } from "./CreateManyEquipmentArgs"; export { CreateOneEquipmentArgs } from "./CreateOneEquipmentArgs"; export { DeleteManyEquipmentArgs } from "./DeleteManyEquipmentArgs"; diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/CreateManyAndReturnHiddenResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/CreateManyAndReturnHiddenResolver.ts new file mode 100644 index 000000000..acfa263a7 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/CreateManyAndReturnHiddenResolver.ts @@ -0,0 +1,20 @@ +import * as TypeGraphQL from "type-graphql"; +import type { GraphQLResolveInfo } from "graphql"; +import { CreateManyAndReturnHiddenArgs } from "./args/CreateManyAndReturnHiddenArgs"; +import { Hidden } from "../../../models/Hidden"; +import { CreateManyAndReturnHidden } from "../../outputs/CreateManyAndReturnHidden"; +import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldIntoSelectRelationsCount } from "../../../helpers"; + +@TypeGraphQL.Resolver(_of => Hidden) +export class CreateManyAndReturnHiddenResolver { + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnHidden], { + nullable: false + }) + async createManyAndReturnHidden(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnHiddenArgs) args: CreateManyAndReturnHiddenArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).hidden.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/HiddenCrudResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/HiddenCrudResolver.ts index 434e38e38..cb1469d12 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/HiddenCrudResolver.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/HiddenCrudResolver.ts @@ -1,6 +1,7 @@ import * as TypeGraphQL from "type-graphql"; import type { GraphQLResolveInfo } from "graphql"; import { AggregateHiddenArgs } from "./args/AggregateHiddenArgs"; +import { CreateManyAndReturnHiddenArgs } from "./args/CreateManyAndReturnHiddenArgs"; import { CreateManyHiddenArgs } from "./args/CreateManyHiddenArgs"; import { CreateOneHiddenArgs } from "./args/CreateOneHiddenArgs"; import { DeleteManyHiddenArgs } from "./args/DeleteManyHiddenArgs"; @@ -18,6 +19,7 @@ import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldI import { Hidden } from "../../../models/Hidden"; import { AffectedRowsOutput } from "../../outputs/AffectedRowsOutput"; import { AggregateHidden } from "../../outputs/AggregateHidden"; +import { CreateManyAndReturnHidden } from "../../outputs/CreateManyAndReturnHidden"; import { HiddenGroupBy } from "../../outputs/HiddenGroupBy"; @TypeGraphQL.Resolver(_of => Hidden) @@ -43,6 +45,17 @@ export class HiddenCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnHidden], { + nullable: false + }) + async createManyAndReturnHidden(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnHiddenArgs) args: CreateManyAndReturnHiddenArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).hidden.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => Hidden, { nullable: false }) diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/AggregateHiddenArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/AggregateHiddenArgs.ts index 12d186c69..340b18614 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/AggregateHiddenArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/AggregateHiddenArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { HiddenOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/HiddenOrderByWithRelationAndSearchRelevanceInput"; +import { HiddenOrderByWithRelationInput } from "../../../inputs/HiddenOrderByWithRelationInput"; import { HiddenWhereInput } from "../../../inputs/HiddenWhereInput"; import { HiddenWhereUniqueInput } from "../../../inputs/HiddenWhereUniqueInput"; @@ -11,10 +11,10 @@ export class AggregateHiddenArgs { }) where?: HiddenWhereInput | undefined; - @TypeGraphQL.Field(_type => [HiddenOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [HiddenOrderByWithRelationInput], { nullable: true }) - orderBy?: HiddenOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: HiddenOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => HiddenWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/CreateManyAndReturnHiddenArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/CreateManyAndReturnHiddenArgs.ts new file mode 100644 index 000000000..169ca23f4 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/CreateManyAndReturnHiddenArgs.ts @@ -0,0 +1,16 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { HiddenCreateManyInput } from "../../../inputs/HiddenCreateManyInput"; + +@TypeGraphQL.ArgsType() +export class CreateManyAndReturnHiddenArgs { + @TypeGraphQL.Field(_type => [HiddenCreateManyInput], { + nullable: false + }) + data!: HiddenCreateManyInput[]; + + @TypeGraphQL.Field(_type => Boolean, { + nullable: true + }) + skipDuplicates?: boolean | undefined; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/FindFirstHiddenArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/FindFirstHiddenArgs.ts index 593a2339a..0c04cde4f 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/FindFirstHiddenArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/FindFirstHiddenArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { HiddenOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/HiddenOrderByWithRelationAndSearchRelevanceInput"; +import { HiddenOrderByWithRelationInput } from "../../../inputs/HiddenOrderByWithRelationInput"; import { HiddenWhereInput } from "../../../inputs/HiddenWhereInput"; import { HiddenWhereUniqueInput } from "../../../inputs/HiddenWhereUniqueInput"; import { HiddenScalarFieldEnum } from "../../../../enums/HiddenScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstHiddenArgs { }) where?: HiddenWhereInput | undefined; - @TypeGraphQL.Field(_type => [HiddenOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [HiddenOrderByWithRelationInput], { nullable: true }) - orderBy?: HiddenOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: HiddenOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => HiddenWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/FindFirstHiddenOrThrowArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/FindFirstHiddenOrThrowArgs.ts index aea9d0e9d..3438d446c 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/FindFirstHiddenOrThrowArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/FindFirstHiddenOrThrowArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { HiddenOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/HiddenOrderByWithRelationAndSearchRelevanceInput"; +import { HiddenOrderByWithRelationInput } from "../../../inputs/HiddenOrderByWithRelationInput"; import { HiddenWhereInput } from "../../../inputs/HiddenWhereInput"; import { HiddenWhereUniqueInput } from "../../../inputs/HiddenWhereUniqueInput"; import { HiddenScalarFieldEnum } from "../../../../enums/HiddenScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstHiddenOrThrowArgs { }) where?: HiddenWhereInput | undefined; - @TypeGraphQL.Field(_type => [HiddenOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [HiddenOrderByWithRelationInput], { nullable: true }) - orderBy?: HiddenOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: HiddenOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => HiddenWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/FindManyHiddenArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/FindManyHiddenArgs.ts index 404be40d8..3b882d7e6 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/FindManyHiddenArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/FindManyHiddenArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { HiddenOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/HiddenOrderByWithRelationAndSearchRelevanceInput"; +import { HiddenOrderByWithRelationInput } from "../../../inputs/HiddenOrderByWithRelationInput"; import { HiddenWhereInput } from "../../../inputs/HiddenWhereInput"; import { HiddenWhereUniqueInput } from "../../../inputs/HiddenWhereUniqueInput"; import { HiddenScalarFieldEnum } from "../../../../enums/HiddenScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindManyHiddenArgs { }) where?: HiddenWhereInput | undefined; - @TypeGraphQL.Field(_type => [HiddenOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [HiddenOrderByWithRelationInput], { nullable: true }) - orderBy?: HiddenOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: HiddenOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => HiddenWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/index.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/index.ts index 25dc1de1d..975670407 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/index.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Hidden/args/index.ts @@ -1,4 +1,5 @@ export { AggregateHiddenArgs } from "./AggregateHiddenArgs"; +export { CreateManyAndReturnHiddenArgs } from "./CreateManyAndReturnHiddenArgs"; export { CreateManyHiddenArgs } from "./CreateManyHiddenArgs"; export { CreateOneHiddenArgs } from "./CreateOneHiddenArgs"; export { DeleteManyHiddenArgs } from "./DeleteManyHiddenArgs"; diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/CreateManyAndReturnMainUserResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/CreateManyAndReturnMainUserResolver.ts new file mode 100644 index 000000000..3e3575c88 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/CreateManyAndReturnMainUserResolver.ts @@ -0,0 +1,20 @@ +import * as TypeGraphQL from "type-graphql"; +import type { GraphQLResolveInfo } from "graphql"; +import { CreateManyAndReturnMainUserArgs } from "./args/CreateManyAndReturnMainUserArgs"; +import { MainUser } from "../../../models/MainUser"; +import { CreateManyAndReturnMainUser } from "../../outputs/CreateManyAndReturnMainUser"; +import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldIntoSelectRelationsCount } from "../../../helpers"; + +@TypeGraphQL.Resolver(_of => MainUser) +export class CreateManyAndReturnMainUserResolver { + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnMainUser], { + nullable: false + }) + async createManyAndReturnMainUser(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnMainUserArgs) args: CreateManyAndReturnMainUserArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).user.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/MainUserCrudResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/MainUserCrudResolver.ts index 89aa602a2..c4fd00b00 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/MainUserCrudResolver.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/MainUserCrudResolver.ts @@ -1,6 +1,7 @@ import * as TypeGraphQL from "type-graphql"; import type { GraphQLResolveInfo } from "graphql"; import { AggregateMainUserArgs } from "./args/AggregateMainUserArgs"; +import { CreateManyAndReturnMainUserArgs } from "./args/CreateManyAndReturnMainUserArgs"; import { CreateManyMainUserArgs } from "./args/CreateManyMainUserArgs"; import { CreateOneMainUserArgs } from "./args/CreateOneMainUserArgs"; import { DeleteManyMainUserArgs } from "./args/DeleteManyMainUserArgs"; @@ -18,6 +19,7 @@ import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldI import { MainUser } from "../../../models/MainUser"; import { AffectedRowsOutput } from "../../outputs/AffectedRowsOutput"; import { AggregateMainUser } from "../../outputs/AggregateMainUser"; +import { CreateManyAndReturnMainUser } from "../../outputs/CreateManyAndReturnMainUser"; import { MainUserGroupBy } from "../../outputs/MainUserGroupBy"; @TypeGraphQL.Resolver(_of => MainUser) @@ -43,6 +45,17 @@ export class MainUserCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnMainUser], { + nullable: false + }) + async createManyAndReturnMainUser(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnMainUserArgs) args: CreateManyAndReturnMainUserArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).user.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => MainUser, { nullable: false }) diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/AggregateMainUserArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/AggregateMainUserArgs.ts index 81223f7ac..ca9c0288b 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/AggregateMainUserArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/AggregateMainUserArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { MainUserOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/MainUserOrderByWithRelationAndSearchRelevanceInput"; +import { MainUserOrderByWithRelationInput } from "../../../inputs/MainUserOrderByWithRelationInput"; import { MainUserWhereInput } from "../../../inputs/MainUserWhereInput"; import { MainUserWhereUniqueInput } from "../../../inputs/MainUserWhereUniqueInput"; @@ -11,10 +11,10 @@ export class AggregateMainUserArgs { }) where?: MainUserWhereInput | undefined; - @TypeGraphQL.Field(_type => [MainUserOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [MainUserOrderByWithRelationInput], { nullable: true }) - orderBy?: MainUserOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: MainUserOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => MainUserWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/CreateManyAndReturnMainUserArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/CreateManyAndReturnMainUserArgs.ts new file mode 100644 index 000000000..60e27eddf --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/CreateManyAndReturnMainUserArgs.ts @@ -0,0 +1,16 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { MainUserCreateManyInput } from "../../../inputs/MainUserCreateManyInput"; + +@TypeGraphQL.ArgsType() +export class CreateManyAndReturnMainUserArgs { + @TypeGraphQL.Field(_type => [MainUserCreateManyInput], { + nullable: false + }) + data!: MainUserCreateManyInput[]; + + @TypeGraphQL.Field(_type => Boolean, { + nullable: true + }) + skipDuplicates?: boolean | undefined; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/FindFirstMainUserArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/FindFirstMainUserArgs.ts index 1db58e5b4..1b992ba7a 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/FindFirstMainUserArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/FindFirstMainUserArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { MainUserOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/MainUserOrderByWithRelationAndSearchRelevanceInput"; +import { MainUserOrderByWithRelationInput } from "../../../inputs/MainUserOrderByWithRelationInput"; import { MainUserWhereInput } from "../../../inputs/MainUserWhereInput"; import { MainUserWhereUniqueInput } from "../../../inputs/MainUserWhereUniqueInput"; import { MainUserScalarFieldEnum } from "../../../../enums/MainUserScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstMainUserArgs { }) where?: MainUserWhereInput | undefined; - @TypeGraphQL.Field(_type => [MainUserOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [MainUserOrderByWithRelationInput], { nullable: true }) - orderBy?: MainUserOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: MainUserOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => MainUserWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/FindFirstMainUserOrThrowArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/FindFirstMainUserOrThrowArgs.ts index 31d1e396f..6e23ebf78 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/FindFirstMainUserOrThrowArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/FindFirstMainUserOrThrowArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { MainUserOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/MainUserOrderByWithRelationAndSearchRelevanceInput"; +import { MainUserOrderByWithRelationInput } from "../../../inputs/MainUserOrderByWithRelationInput"; import { MainUserWhereInput } from "../../../inputs/MainUserWhereInput"; import { MainUserWhereUniqueInput } from "../../../inputs/MainUserWhereUniqueInput"; import { MainUserScalarFieldEnum } from "../../../../enums/MainUserScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstMainUserOrThrowArgs { }) where?: MainUserWhereInput | undefined; - @TypeGraphQL.Field(_type => [MainUserOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [MainUserOrderByWithRelationInput], { nullable: true }) - orderBy?: MainUserOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: MainUserOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => MainUserWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/FindManyMainUserArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/FindManyMainUserArgs.ts index 5c1cfa6e5..a381e3c1b 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/FindManyMainUserArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/FindManyMainUserArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { MainUserOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/MainUserOrderByWithRelationAndSearchRelevanceInput"; +import { MainUserOrderByWithRelationInput } from "../../../inputs/MainUserOrderByWithRelationInput"; import { MainUserWhereInput } from "../../../inputs/MainUserWhereInput"; import { MainUserWhereUniqueInput } from "../../../inputs/MainUserWhereUniqueInput"; import { MainUserScalarFieldEnum } from "../../../../enums/MainUserScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindManyMainUserArgs { }) where?: MainUserWhereInput | undefined; - @TypeGraphQL.Field(_type => [MainUserOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [MainUserOrderByWithRelationInput], { nullable: true }) - orderBy?: MainUserOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: MainUserOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => MainUserWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/index.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/index.ts index c52f27040..7809cd117 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/index.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/MainUser/args/index.ts @@ -1,4 +1,5 @@ export { AggregateMainUserArgs } from "./AggregateMainUserArgs"; +export { CreateManyAndReturnMainUserArgs } from "./CreateManyAndReturnMainUserArgs"; export { CreateManyMainUserArgs } from "./CreateManyMainUserArgs"; export { CreateOneMainUserArgs } from "./CreateOneMainUserArgs"; export { DeleteManyMainUserArgs } from "./DeleteManyMainUserArgs"; diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/CreateManyAndReturnMovieResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/CreateManyAndReturnMovieResolver.ts new file mode 100644 index 000000000..254f924b5 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/CreateManyAndReturnMovieResolver.ts @@ -0,0 +1,20 @@ +import * as TypeGraphQL from "type-graphql"; +import type { GraphQLResolveInfo } from "graphql"; +import { CreateManyAndReturnMovieArgs } from "./args/CreateManyAndReturnMovieArgs"; +import { Movie } from "../../../models/Movie"; +import { CreateManyAndReturnMovie } from "../../outputs/CreateManyAndReturnMovie"; +import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldIntoSelectRelationsCount } from "../../../helpers"; + +@TypeGraphQL.Resolver(_of => Movie) +export class CreateManyAndReturnMovieResolver { + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnMovie], { + nullable: false + }) + async createManyAndReturnMovie(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnMovieArgs) args: CreateManyAndReturnMovieArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).movie.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/MovieCrudResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/MovieCrudResolver.ts index e29a06e9e..84d166e70 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/MovieCrudResolver.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/MovieCrudResolver.ts @@ -1,6 +1,7 @@ import * as TypeGraphQL from "type-graphql"; import type { GraphQLResolveInfo } from "graphql"; import { AggregateMovieArgs } from "./args/AggregateMovieArgs"; +import { CreateManyAndReturnMovieArgs } from "./args/CreateManyAndReturnMovieArgs"; import { CreateManyMovieArgs } from "./args/CreateManyMovieArgs"; import { CreateOneMovieArgs } from "./args/CreateOneMovieArgs"; import { DeleteManyMovieArgs } from "./args/DeleteManyMovieArgs"; @@ -18,6 +19,7 @@ import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldI import { Movie } from "../../../models/Movie"; import { AffectedRowsOutput } from "../../outputs/AffectedRowsOutput"; import { AggregateMovie } from "../../outputs/AggregateMovie"; +import { CreateManyAndReturnMovie } from "../../outputs/CreateManyAndReturnMovie"; import { MovieGroupBy } from "../../outputs/MovieGroupBy"; @TypeGraphQL.Resolver(_of => Movie) @@ -43,6 +45,17 @@ export class MovieCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnMovie], { + nullable: false + }) + async createManyAndReturnMovie(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnMovieArgs) args: CreateManyAndReturnMovieArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).movie.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => Movie, { nullable: false }) diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/AggregateMovieArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/AggregateMovieArgs.ts index b414b4266..fe91cf51f 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/AggregateMovieArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/AggregateMovieArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { MovieOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/MovieOrderByWithRelationAndSearchRelevanceInput"; +import { MovieOrderByWithRelationInput } from "../../../inputs/MovieOrderByWithRelationInput"; import { MovieWhereInput } from "../../../inputs/MovieWhereInput"; import { MovieWhereUniqueInput } from "../../../inputs/MovieWhereUniqueInput"; @@ -11,10 +11,10 @@ export class AggregateMovieArgs { }) where?: MovieWhereInput | undefined; - @TypeGraphQL.Field(_type => [MovieOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [MovieOrderByWithRelationInput], { nullable: true }) - orderBy?: MovieOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: MovieOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => MovieWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/CreateManyAndReturnMovieArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/CreateManyAndReturnMovieArgs.ts new file mode 100644 index 000000000..834870679 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/CreateManyAndReturnMovieArgs.ts @@ -0,0 +1,16 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { MovieCreateManyInput } from "../../../inputs/MovieCreateManyInput"; + +@TypeGraphQL.ArgsType() +export class CreateManyAndReturnMovieArgs { + @TypeGraphQL.Field(_type => [MovieCreateManyInput], { + nullable: false + }) + data!: MovieCreateManyInput[]; + + @TypeGraphQL.Field(_type => Boolean, { + nullable: true + }) + skipDuplicates?: boolean | undefined; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/FindFirstMovieArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/FindFirstMovieArgs.ts index 3b6a61f2a..86081e127 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/FindFirstMovieArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/FindFirstMovieArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { MovieOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/MovieOrderByWithRelationAndSearchRelevanceInput"; +import { MovieOrderByWithRelationInput } from "../../../inputs/MovieOrderByWithRelationInput"; import { MovieWhereInput } from "../../../inputs/MovieWhereInput"; import { MovieWhereUniqueInput } from "../../../inputs/MovieWhereUniqueInput"; import { MovieScalarFieldEnum } from "../../../../enums/MovieScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstMovieArgs { }) where?: MovieWhereInput | undefined; - @TypeGraphQL.Field(_type => [MovieOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [MovieOrderByWithRelationInput], { nullable: true }) - orderBy?: MovieOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: MovieOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => MovieWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/FindFirstMovieOrThrowArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/FindFirstMovieOrThrowArgs.ts index fa2f19714..e61e6345f 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/FindFirstMovieOrThrowArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/FindFirstMovieOrThrowArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { MovieOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/MovieOrderByWithRelationAndSearchRelevanceInput"; +import { MovieOrderByWithRelationInput } from "../../../inputs/MovieOrderByWithRelationInput"; import { MovieWhereInput } from "../../../inputs/MovieWhereInput"; import { MovieWhereUniqueInput } from "../../../inputs/MovieWhereUniqueInput"; import { MovieScalarFieldEnum } from "../../../../enums/MovieScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstMovieOrThrowArgs { }) where?: MovieWhereInput | undefined; - @TypeGraphQL.Field(_type => [MovieOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [MovieOrderByWithRelationInput], { nullable: true }) - orderBy?: MovieOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: MovieOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => MovieWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/FindManyMovieArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/FindManyMovieArgs.ts index a272f9417..d09e71a79 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/FindManyMovieArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/FindManyMovieArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { MovieOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/MovieOrderByWithRelationAndSearchRelevanceInput"; +import { MovieOrderByWithRelationInput } from "../../../inputs/MovieOrderByWithRelationInput"; import { MovieWhereInput } from "../../../inputs/MovieWhereInput"; import { MovieWhereUniqueInput } from "../../../inputs/MovieWhereUniqueInput"; import { MovieScalarFieldEnum } from "../../../../enums/MovieScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindManyMovieArgs { }) where?: MovieWhereInput | undefined; - @TypeGraphQL.Field(_type => [MovieOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [MovieOrderByWithRelationInput], { nullable: true }) - orderBy?: MovieOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: MovieOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => MovieWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/index.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/index.ts index e0ce7289e..da1ae5389 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/index.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Movie/args/index.ts @@ -1,4 +1,5 @@ export { AggregateMovieArgs } from "./AggregateMovieArgs"; +export { CreateManyAndReturnMovieArgs } from "./CreateManyAndReturnMovieArgs"; export { CreateManyMovieArgs } from "./CreateManyMovieArgs"; export { CreateOneMovieArgs } from "./CreateOneMovieArgs"; export { DeleteManyMovieArgs } from "./DeleteManyMovieArgs"; diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/CreateManyAndReturnNativeTypeModelResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/CreateManyAndReturnNativeTypeModelResolver.ts new file mode 100644 index 000000000..47ddc804b --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/CreateManyAndReturnNativeTypeModelResolver.ts @@ -0,0 +1,20 @@ +import * as TypeGraphQL from "type-graphql"; +import type { GraphQLResolveInfo } from "graphql"; +import { CreateManyAndReturnNativeTypeModelArgs } from "./args/CreateManyAndReturnNativeTypeModelArgs"; +import { NativeTypeModel } from "../../../models/NativeTypeModel"; +import { CreateManyAndReturnNativeTypeModel } from "../../outputs/CreateManyAndReturnNativeTypeModel"; +import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldIntoSelectRelationsCount } from "../../../helpers"; + +@TypeGraphQL.Resolver(_of => NativeTypeModel) +export class CreateManyAndReturnNativeTypeModelResolver { + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnNativeTypeModel], { + nullable: false + }) + async createManyAndReturnNativeTypeModel(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnNativeTypeModelArgs) args: CreateManyAndReturnNativeTypeModelArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).nativeTypeModel.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/NativeTypeModelCrudResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/NativeTypeModelCrudResolver.ts index 15de32554..ee5fdf04a 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/NativeTypeModelCrudResolver.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/NativeTypeModelCrudResolver.ts @@ -1,6 +1,7 @@ import * as TypeGraphQL from "type-graphql"; import type { GraphQLResolveInfo } from "graphql"; import { AggregateNativeTypeModelArgs } from "./args/AggregateNativeTypeModelArgs"; +import { CreateManyAndReturnNativeTypeModelArgs } from "./args/CreateManyAndReturnNativeTypeModelArgs"; import { CreateManyNativeTypeModelArgs } from "./args/CreateManyNativeTypeModelArgs"; import { CreateOneNativeTypeModelArgs } from "./args/CreateOneNativeTypeModelArgs"; import { DeleteManyNativeTypeModelArgs } from "./args/DeleteManyNativeTypeModelArgs"; @@ -18,6 +19,7 @@ import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldI import { NativeTypeModel } from "../../../models/NativeTypeModel"; import { AffectedRowsOutput } from "../../outputs/AffectedRowsOutput"; import { AggregateNativeTypeModel } from "../../outputs/AggregateNativeTypeModel"; +import { CreateManyAndReturnNativeTypeModel } from "../../outputs/CreateManyAndReturnNativeTypeModel"; import { NativeTypeModelGroupBy } from "../../outputs/NativeTypeModelGroupBy"; @TypeGraphQL.Resolver(_of => NativeTypeModel) @@ -43,6 +45,17 @@ export class NativeTypeModelCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnNativeTypeModel], { + nullable: false + }) + async createManyAndReturnNativeTypeModel(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnNativeTypeModelArgs) args: CreateManyAndReturnNativeTypeModelArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).nativeTypeModel.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => NativeTypeModel, { nullable: false }) diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/AggregateNativeTypeModelArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/AggregateNativeTypeModelArgs.ts index 4c6f557e2..352226fc7 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/AggregateNativeTypeModelArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/AggregateNativeTypeModelArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { NativeTypeModelOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/NativeTypeModelOrderByWithRelationAndSearchRelevanceInput"; +import { NativeTypeModelOrderByWithRelationInput } from "../../../inputs/NativeTypeModelOrderByWithRelationInput"; import { NativeTypeModelWhereInput } from "../../../inputs/NativeTypeModelWhereInput"; import { NativeTypeModelWhereUniqueInput } from "../../../inputs/NativeTypeModelWhereUniqueInput"; @@ -11,10 +11,10 @@ export class AggregateNativeTypeModelArgs { }) where?: NativeTypeModelWhereInput | undefined; - @TypeGraphQL.Field(_type => [NativeTypeModelOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [NativeTypeModelOrderByWithRelationInput], { nullable: true }) - orderBy?: NativeTypeModelOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: NativeTypeModelOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => NativeTypeModelWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/CreateManyAndReturnNativeTypeModelArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/CreateManyAndReturnNativeTypeModelArgs.ts new file mode 100644 index 000000000..336cc67db --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/CreateManyAndReturnNativeTypeModelArgs.ts @@ -0,0 +1,16 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { NativeTypeModelCreateManyInput } from "../../../inputs/NativeTypeModelCreateManyInput"; + +@TypeGraphQL.ArgsType() +export class CreateManyAndReturnNativeTypeModelArgs { + @TypeGraphQL.Field(_type => [NativeTypeModelCreateManyInput], { + nullable: false + }) + data!: NativeTypeModelCreateManyInput[]; + + @TypeGraphQL.Field(_type => Boolean, { + nullable: true + }) + skipDuplicates?: boolean | undefined; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/FindFirstNativeTypeModelArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/FindFirstNativeTypeModelArgs.ts index fc65c8691..70b3d35be 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/FindFirstNativeTypeModelArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/FindFirstNativeTypeModelArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { NativeTypeModelOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/NativeTypeModelOrderByWithRelationAndSearchRelevanceInput"; +import { NativeTypeModelOrderByWithRelationInput } from "../../../inputs/NativeTypeModelOrderByWithRelationInput"; import { NativeTypeModelWhereInput } from "../../../inputs/NativeTypeModelWhereInput"; import { NativeTypeModelWhereUniqueInput } from "../../../inputs/NativeTypeModelWhereUniqueInput"; import { NativeTypeModelScalarFieldEnum } from "../../../../enums/NativeTypeModelScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstNativeTypeModelArgs { }) where?: NativeTypeModelWhereInput | undefined; - @TypeGraphQL.Field(_type => [NativeTypeModelOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [NativeTypeModelOrderByWithRelationInput], { nullable: true }) - orderBy?: NativeTypeModelOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: NativeTypeModelOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => NativeTypeModelWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/FindFirstNativeTypeModelOrThrowArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/FindFirstNativeTypeModelOrThrowArgs.ts index a99e5217e..cf228d773 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/FindFirstNativeTypeModelOrThrowArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/FindFirstNativeTypeModelOrThrowArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { NativeTypeModelOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/NativeTypeModelOrderByWithRelationAndSearchRelevanceInput"; +import { NativeTypeModelOrderByWithRelationInput } from "../../../inputs/NativeTypeModelOrderByWithRelationInput"; import { NativeTypeModelWhereInput } from "../../../inputs/NativeTypeModelWhereInput"; import { NativeTypeModelWhereUniqueInput } from "../../../inputs/NativeTypeModelWhereUniqueInput"; import { NativeTypeModelScalarFieldEnum } from "../../../../enums/NativeTypeModelScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstNativeTypeModelOrThrowArgs { }) where?: NativeTypeModelWhereInput | undefined; - @TypeGraphQL.Field(_type => [NativeTypeModelOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [NativeTypeModelOrderByWithRelationInput], { nullable: true }) - orderBy?: NativeTypeModelOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: NativeTypeModelOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => NativeTypeModelWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/FindManyNativeTypeModelArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/FindManyNativeTypeModelArgs.ts index b9b87162f..0b447b926 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/FindManyNativeTypeModelArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/FindManyNativeTypeModelArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { NativeTypeModelOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/NativeTypeModelOrderByWithRelationAndSearchRelevanceInput"; +import { NativeTypeModelOrderByWithRelationInput } from "../../../inputs/NativeTypeModelOrderByWithRelationInput"; import { NativeTypeModelWhereInput } from "../../../inputs/NativeTypeModelWhereInput"; import { NativeTypeModelWhereUniqueInput } from "../../../inputs/NativeTypeModelWhereUniqueInput"; import { NativeTypeModelScalarFieldEnum } from "../../../../enums/NativeTypeModelScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindManyNativeTypeModelArgs { }) where?: NativeTypeModelWhereInput | undefined; - @TypeGraphQL.Field(_type => [NativeTypeModelOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [NativeTypeModelOrderByWithRelationInput], { nullable: true }) - orderBy?: NativeTypeModelOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: NativeTypeModelOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => NativeTypeModelWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/index.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/index.ts index 4118a26ff..33fa68844 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/index.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/NativeTypeModel/args/index.ts @@ -1,4 +1,5 @@ export { AggregateNativeTypeModelArgs } from "./AggregateNativeTypeModelArgs"; +export { CreateManyAndReturnNativeTypeModelArgs } from "./CreateManyAndReturnNativeTypeModelArgs"; export { CreateManyNativeTypeModelArgs } from "./CreateManyNativeTypeModelArgs"; export { CreateOneNativeTypeModelArgs } from "./CreateOneNativeTypeModelArgs"; export { DeleteManyNativeTypeModelArgs } from "./DeleteManyNativeTypeModelArgs"; diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/CreateManyAndReturnPatientResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/CreateManyAndReturnPatientResolver.ts new file mode 100644 index 000000000..89e643f80 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/CreateManyAndReturnPatientResolver.ts @@ -0,0 +1,20 @@ +import * as TypeGraphQL from "type-graphql"; +import type { GraphQLResolveInfo } from "graphql"; +import { CreateManyAndReturnPatientArgs } from "./args/CreateManyAndReturnPatientArgs"; +import { Patient } from "../../../models/Patient"; +import { CreateManyAndReturnPatient } from "../../outputs/CreateManyAndReturnPatient"; +import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldIntoSelectRelationsCount } from "../../../helpers"; + +@TypeGraphQL.Resolver(_of => Patient) +export class CreateManyAndReturnPatientResolver { + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnPatient], { + nullable: false + }) + async createManyAndReturnPatient(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnPatientArgs) args: CreateManyAndReturnPatientArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).patient.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/PatientCrudResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/PatientCrudResolver.ts index 936074114..303c3d090 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/PatientCrudResolver.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/PatientCrudResolver.ts @@ -1,6 +1,7 @@ import * as TypeGraphQL from "type-graphql"; import type { GraphQLResolveInfo } from "graphql"; import { AggregatePatientArgs } from "./args/AggregatePatientArgs"; +import { CreateManyAndReturnPatientArgs } from "./args/CreateManyAndReturnPatientArgs"; import { CreateManyPatientArgs } from "./args/CreateManyPatientArgs"; import { CreateOnePatientArgs } from "./args/CreateOnePatientArgs"; import { DeleteManyPatientArgs } from "./args/DeleteManyPatientArgs"; @@ -18,6 +19,7 @@ import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldI import { Patient } from "../../../models/Patient"; import { AffectedRowsOutput } from "../../outputs/AffectedRowsOutput"; import { AggregatePatient } from "../../outputs/AggregatePatient"; +import { CreateManyAndReturnPatient } from "../../outputs/CreateManyAndReturnPatient"; import { PatientGroupBy } from "../../outputs/PatientGroupBy"; @TypeGraphQL.Resolver(_of => Patient) @@ -43,6 +45,17 @@ export class PatientCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnPatient], { + nullable: false + }) + async createManyAndReturnPatient(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnPatientArgs) args: CreateManyAndReturnPatientArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).patient.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => Patient, { nullable: false }) diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/AggregatePatientArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/AggregatePatientArgs.ts index b72fc72e6..33307f740 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/AggregatePatientArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/AggregatePatientArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { PatientOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/PatientOrderByWithRelationAndSearchRelevanceInput"; +import { PatientOrderByWithRelationInput } from "../../../inputs/PatientOrderByWithRelationInput"; import { PatientWhereInput } from "../../../inputs/PatientWhereInput"; import { PatientWhereUniqueInput } from "../../../inputs/PatientWhereUniqueInput"; @@ -11,10 +11,10 @@ export class AggregatePatientArgs { }) where?: PatientWhereInput | undefined; - @TypeGraphQL.Field(_type => [PatientOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [PatientOrderByWithRelationInput], { nullable: true }) - orderBy?: PatientOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: PatientOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => PatientWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/CreateManyAndReturnPatientArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/CreateManyAndReturnPatientArgs.ts new file mode 100644 index 000000000..f5fd18883 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/CreateManyAndReturnPatientArgs.ts @@ -0,0 +1,16 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { PatientCreateManyInput } from "../../../inputs/PatientCreateManyInput"; + +@TypeGraphQL.ArgsType() +export class CreateManyAndReturnPatientArgs { + @TypeGraphQL.Field(_type => [PatientCreateManyInput], { + nullable: false + }) + data!: PatientCreateManyInput[]; + + @TypeGraphQL.Field(_type => Boolean, { + nullable: true + }) + skipDuplicates?: boolean | undefined; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/FindFirstPatientArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/FindFirstPatientArgs.ts index 9bef866c3..279f2a071 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/FindFirstPatientArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/FindFirstPatientArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { PatientOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/PatientOrderByWithRelationAndSearchRelevanceInput"; +import { PatientOrderByWithRelationInput } from "../../../inputs/PatientOrderByWithRelationInput"; import { PatientWhereInput } from "../../../inputs/PatientWhereInput"; import { PatientWhereUniqueInput } from "../../../inputs/PatientWhereUniqueInput"; import { PatientScalarFieldEnum } from "../../../../enums/PatientScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstPatientArgs { }) where?: PatientWhereInput | undefined; - @TypeGraphQL.Field(_type => [PatientOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [PatientOrderByWithRelationInput], { nullable: true }) - orderBy?: PatientOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: PatientOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => PatientWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/FindFirstPatientOrThrowArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/FindFirstPatientOrThrowArgs.ts index ef6edb73e..3bfc88f82 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/FindFirstPatientOrThrowArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/FindFirstPatientOrThrowArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { PatientOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/PatientOrderByWithRelationAndSearchRelevanceInput"; +import { PatientOrderByWithRelationInput } from "../../../inputs/PatientOrderByWithRelationInput"; import { PatientWhereInput } from "../../../inputs/PatientWhereInput"; import { PatientWhereUniqueInput } from "../../../inputs/PatientWhereUniqueInput"; import { PatientScalarFieldEnum } from "../../../../enums/PatientScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstPatientOrThrowArgs { }) where?: PatientWhereInput | undefined; - @TypeGraphQL.Field(_type => [PatientOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [PatientOrderByWithRelationInput], { nullable: true }) - orderBy?: PatientOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: PatientOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => PatientWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/FindManyPatientArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/FindManyPatientArgs.ts index 30225f431..4d67c3648 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/FindManyPatientArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/FindManyPatientArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { PatientOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/PatientOrderByWithRelationAndSearchRelevanceInput"; +import { PatientOrderByWithRelationInput } from "../../../inputs/PatientOrderByWithRelationInput"; import { PatientWhereInput } from "../../../inputs/PatientWhereInput"; import { PatientWhereUniqueInput } from "../../../inputs/PatientWhereUniqueInput"; import { PatientScalarFieldEnum } from "../../../../enums/PatientScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindManyPatientArgs { }) where?: PatientWhereInput | undefined; - @TypeGraphQL.Field(_type => [PatientOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [PatientOrderByWithRelationInput], { nullable: true }) - orderBy?: PatientOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: PatientOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => PatientWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/index.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/index.ts index fff4cca4f..575ffd483 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/index.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Patient/args/index.ts @@ -1,4 +1,5 @@ export { AggregatePatientArgs } from "./AggregatePatientArgs"; +export { CreateManyAndReturnPatientArgs } from "./CreateManyAndReturnPatientArgs"; export { CreateManyPatientArgs } from "./CreateManyPatientArgs"; export { CreateOnePatientArgs } from "./CreateOnePatientArgs"; export { DeleteManyPatientArgs } from "./DeleteManyPatientArgs"; diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/CreateManyAndReturnPostResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/CreateManyAndReturnPostResolver.ts new file mode 100644 index 000000000..2874e8192 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/CreateManyAndReturnPostResolver.ts @@ -0,0 +1,20 @@ +import * as TypeGraphQL from "type-graphql"; +import type { GraphQLResolveInfo } from "graphql"; +import { CreateManyAndReturnPostArgs } from "./args/CreateManyAndReturnPostArgs"; +import { Post } from "../../../models/Post"; +import { CreateManyAndReturnPost } from "../../outputs/CreateManyAndReturnPost"; +import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldIntoSelectRelationsCount } from "../../../helpers"; + +@TypeGraphQL.Resolver(_of => Post) +export class CreateManyAndReturnPostResolver { + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnPost], { + nullable: false + }) + async createManyAndReturnPost(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnPostArgs) args: CreateManyAndReturnPostArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).post.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/PostCrudResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/PostCrudResolver.ts index 4a27d8e1e..a21ecf77b 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/PostCrudResolver.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/PostCrudResolver.ts @@ -1,6 +1,7 @@ import * as TypeGraphQL from "type-graphql"; import type { GraphQLResolveInfo } from "graphql"; import { AggregatePostArgs } from "./args/AggregatePostArgs"; +import { CreateManyAndReturnPostArgs } from "./args/CreateManyAndReturnPostArgs"; import { CreateManyPostArgs } from "./args/CreateManyPostArgs"; import { CreateOnePostArgs } from "./args/CreateOnePostArgs"; import { DeleteManyPostArgs } from "./args/DeleteManyPostArgs"; @@ -18,6 +19,7 @@ import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldI import { Post } from "../../../models/Post"; import { AffectedRowsOutput } from "../../outputs/AffectedRowsOutput"; import { AggregatePost } from "../../outputs/AggregatePost"; +import { CreateManyAndReturnPost } from "../../outputs/CreateManyAndReturnPost"; import { PostGroupBy } from "../../outputs/PostGroupBy"; @TypeGraphQL.Resolver(_of => Post) @@ -43,6 +45,17 @@ export class PostCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnPost], { + nullable: false + }) + async createManyAndReturnPost(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnPostArgs) args: CreateManyAndReturnPostArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).post.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => Post, { nullable: false }) diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/AggregatePostArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/AggregatePostArgs.ts index 65416d94a..6f44256b5 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/AggregatePostArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/AggregatePostArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { PostOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/PostOrderByWithRelationAndSearchRelevanceInput"; +import { PostOrderByWithRelationInput } from "../../../inputs/PostOrderByWithRelationInput"; import { PostWhereInput } from "../../../inputs/PostWhereInput"; import { PostWhereUniqueInput } from "../../../inputs/PostWhereUniqueInput"; @@ -11,10 +11,10 @@ export class AggregatePostArgs { }) where?: PostWhereInput | undefined; - @TypeGraphQL.Field(_type => [PostOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [PostOrderByWithRelationInput], { nullable: true }) - orderBy?: PostOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: PostOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => PostWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/CreateManyAndReturnPostArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/CreateManyAndReturnPostArgs.ts new file mode 100644 index 000000000..c5729da26 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/CreateManyAndReturnPostArgs.ts @@ -0,0 +1,16 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { PostCreateManyInput } from "../../../inputs/PostCreateManyInput"; + +@TypeGraphQL.ArgsType() +export class CreateManyAndReturnPostArgs { + @TypeGraphQL.Field(_type => [PostCreateManyInput], { + nullable: false + }) + data!: PostCreateManyInput[]; + + @TypeGraphQL.Field(_type => Boolean, { + nullable: true + }) + skipDuplicates?: boolean | undefined; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/FindFirstPostArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/FindFirstPostArgs.ts index ff488c565..05fbb8fc6 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/FindFirstPostArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/FindFirstPostArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { PostOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/PostOrderByWithRelationAndSearchRelevanceInput"; +import { PostOrderByWithRelationInput } from "../../../inputs/PostOrderByWithRelationInput"; import { PostWhereInput } from "../../../inputs/PostWhereInput"; import { PostWhereUniqueInput } from "../../../inputs/PostWhereUniqueInput"; import { PostScalarFieldEnum } from "../../../../enums/PostScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstPostArgs { }) where?: PostWhereInput | undefined; - @TypeGraphQL.Field(_type => [PostOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [PostOrderByWithRelationInput], { nullable: true }) - orderBy?: PostOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: PostOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => PostWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/FindFirstPostOrThrowArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/FindFirstPostOrThrowArgs.ts index 0bac3a53a..ade4bc334 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/FindFirstPostOrThrowArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/FindFirstPostOrThrowArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { PostOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/PostOrderByWithRelationAndSearchRelevanceInput"; +import { PostOrderByWithRelationInput } from "../../../inputs/PostOrderByWithRelationInput"; import { PostWhereInput } from "../../../inputs/PostWhereInput"; import { PostWhereUniqueInput } from "../../../inputs/PostWhereUniqueInput"; import { PostScalarFieldEnum } from "../../../../enums/PostScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstPostOrThrowArgs { }) where?: PostWhereInput | undefined; - @TypeGraphQL.Field(_type => [PostOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [PostOrderByWithRelationInput], { nullable: true }) - orderBy?: PostOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: PostOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => PostWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/FindManyPostArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/FindManyPostArgs.ts index 8884f0732..5b69ee78c 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/FindManyPostArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/FindManyPostArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { PostOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/PostOrderByWithRelationAndSearchRelevanceInput"; +import { PostOrderByWithRelationInput } from "../../../inputs/PostOrderByWithRelationInput"; import { PostWhereInput } from "../../../inputs/PostWhereInput"; import { PostWhereUniqueInput } from "../../../inputs/PostWhereUniqueInput"; import { PostScalarFieldEnum } from "../../../../enums/PostScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindManyPostArgs { }) where?: PostWhereInput | undefined; - @TypeGraphQL.Field(_type => [PostOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [PostOrderByWithRelationInput], { nullable: true }) - orderBy?: PostOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: PostOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => PostWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/index.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/index.ts index c1644880a..3df3a6ff7 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/index.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Post/args/index.ts @@ -1,4 +1,5 @@ export { AggregatePostArgs } from "./AggregatePostArgs"; +export { CreateManyAndReturnPostArgs } from "./CreateManyAndReturnPostArgs"; export { CreateManyPostArgs } from "./CreateManyPostArgs"; export { CreateOnePostArgs } from "./CreateOnePostArgs"; export { DeleteManyPostArgs } from "./DeleteManyPostArgs"; diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/CreateManyAndReturnProblemResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/CreateManyAndReturnProblemResolver.ts new file mode 100644 index 000000000..5b17b1b33 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/CreateManyAndReturnProblemResolver.ts @@ -0,0 +1,20 @@ +import * as TypeGraphQL from "type-graphql"; +import type { GraphQLResolveInfo } from "graphql"; +import { CreateManyAndReturnProblemArgs } from "./args/CreateManyAndReturnProblemArgs"; +import { Problem } from "../../../models/Problem"; +import { CreateManyAndReturnProblem } from "../../outputs/CreateManyAndReturnProblem"; +import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldIntoSelectRelationsCount } from "../../../helpers"; + +@TypeGraphQL.Resolver(_of => Problem) +export class CreateManyAndReturnProblemResolver { + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnProblem], { + nullable: false + }) + async createManyAndReturnProblem(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnProblemArgs) args: CreateManyAndReturnProblemArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).problem.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/ProblemCrudResolver.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/ProblemCrudResolver.ts index 10f7fceec..4805fcb1f 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/ProblemCrudResolver.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/ProblemCrudResolver.ts @@ -1,6 +1,7 @@ import * as TypeGraphQL from "type-graphql"; import type { GraphQLResolveInfo } from "graphql"; import { AggregateProblemArgs } from "./args/AggregateProblemArgs"; +import { CreateManyAndReturnProblemArgs } from "./args/CreateManyAndReturnProblemArgs"; import { CreateManyProblemArgs } from "./args/CreateManyProblemArgs"; import { CreateOneProblemArgs } from "./args/CreateOneProblemArgs"; import { DeleteManyProblemArgs } from "./args/DeleteManyProblemArgs"; @@ -18,6 +19,7 @@ import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldI import { Problem } from "../../../models/Problem"; import { AffectedRowsOutput } from "../../outputs/AffectedRowsOutput"; import { AggregateProblem } from "../../outputs/AggregateProblem"; +import { CreateManyAndReturnProblem } from "../../outputs/CreateManyAndReturnProblem"; import { ProblemGroupBy } from "../../outputs/ProblemGroupBy"; @TypeGraphQL.Resolver(_of => Problem) @@ -43,6 +45,17 @@ export class ProblemCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnProblem], { + nullable: false + }) + async createManyAndReturnProblem(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnProblemArgs) args: CreateManyAndReturnProblemArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).problem.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => Problem, { nullable: false }) diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/AggregateProblemArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/AggregateProblemArgs.ts index cc53391e1..6434217da 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/AggregateProblemArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/AggregateProblemArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { ProblemOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/ProblemOrderByWithRelationAndSearchRelevanceInput"; +import { ProblemOrderByWithRelationInput } from "../../../inputs/ProblemOrderByWithRelationInput"; import { ProblemWhereInput } from "../../../inputs/ProblemWhereInput"; import { ProblemWhereUniqueInput } from "../../../inputs/ProblemWhereUniqueInput"; @@ -11,10 +11,10 @@ export class AggregateProblemArgs { }) where?: ProblemWhereInput | undefined; - @TypeGraphQL.Field(_type => [ProblemOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [ProblemOrderByWithRelationInput], { nullable: true }) - orderBy?: ProblemOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: ProblemOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => ProblemWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/CreateManyAndReturnProblemArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/CreateManyAndReturnProblemArgs.ts new file mode 100644 index 000000000..599b380ce --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/CreateManyAndReturnProblemArgs.ts @@ -0,0 +1,16 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { ProblemCreateManyInput } from "../../../inputs/ProblemCreateManyInput"; + +@TypeGraphQL.ArgsType() +export class CreateManyAndReturnProblemArgs { + @TypeGraphQL.Field(_type => [ProblemCreateManyInput], { + nullable: false + }) + data!: ProblemCreateManyInput[]; + + @TypeGraphQL.Field(_type => Boolean, { + nullable: true + }) + skipDuplicates?: boolean | undefined; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/FindFirstProblemArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/FindFirstProblemArgs.ts index ec02cf671..9875c77c6 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/FindFirstProblemArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/FindFirstProblemArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { ProblemOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/ProblemOrderByWithRelationAndSearchRelevanceInput"; +import { ProblemOrderByWithRelationInput } from "../../../inputs/ProblemOrderByWithRelationInput"; import { ProblemWhereInput } from "../../../inputs/ProblemWhereInput"; import { ProblemWhereUniqueInput } from "../../../inputs/ProblemWhereUniqueInput"; import { ProblemScalarFieldEnum } from "../../../../enums/ProblemScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstProblemArgs { }) where?: ProblemWhereInput | undefined; - @TypeGraphQL.Field(_type => [ProblemOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [ProblemOrderByWithRelationInput], { nullable: true }) - orderBy?: ProblemOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: ProblemOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => ProblemWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/FindFirstProblemOrThrowArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/FindFirstProblemOrThrowArgs.ts index 8c9ef49ba..0d7894782 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/FindFirstProblemOrThrowArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/FindFirstProblemOrThrowArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { ProblemOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/ProblemOrderByWithRelationAndSearchRelevanceInput"; +import { ProblemOrderByWithRelationInput } from "../../../inputs/ProblemOrderByWithRelationInput"; import { ProblemWhereInput } from "../../../inputs/ProblemWhereInput"; import { ProblemWhereUniqueInput } from "../../../inputs/ProblemWhereUniqueInput"; import { ProblemScalarFieldEnum } from "../../../../enums/ProblemScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindFirstProblemOrThrowArgs { }) where?: ProblemWhereInput | undefined; - @TypeGraphQL.Field(_type => [ProblemOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [ProblemOrderByWithRelationInput], { nullable: true }) - orderBy?: ProblemOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: ProblemOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => ProblemWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/FindManyProblemArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/FindManyProblemArgs.ts index 2671081be..bfbf8253b 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/FindManyProblemArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/FindManyProblemArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { ProblemOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/ProblemOrderByWithRelationAndSearchRelevanceInput"; +import { ProblemOrderByWithRelationInput } from "../../../inputs/ProblemOrderByWithRelationInput"; import { ProblemWhereInput } from "../../../inputs/ProblemWhereInput"; import { ProblemWhereUniqueInput } from "../../../inputs/ProblemWhereUniqueInput"; import { ProblemScalarFieldEnum } from "../../../../enums/ProblemScalarFieldEnum"; @@ -12,10 +12,10 @@ export class FindManyProblemArgs { }) where?: ProblemWhereInput | undefined; - @TypeGraphQL.Field(_type => [ProblemOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [ProblemOrderByWithRelationInput], { nullable: true }) - orderBy?: ProblemOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: ProblemOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => ProblemWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/index.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/index.ts index 3be7580e9..61a44aea6 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/index.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/Problem/args/index.ts @@ -1,4 +1,5 @@ export { AggregateProblemArgs } from "./AggregateProblemArgs"; +export { CreateManyAndReturnProblemArgs } from "./CreateManyAndReturnProblemArgs"; export { CreateManyProblemArgs } from "./CreateManyProblemArgs"; export { CreateOneProblemArgs } from "./CreateOneProblemArgs"; export { DeleteManyProblemArgs } from "./DeleteManyProblemArgs"; diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/resolvers-actions.index.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/resolvers-actions.index.ts index eddf32a66..2fcfb3e34 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/resolvers-actions.index.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/crud/resolvers-actions.index.ts @@ -1,5 +1,6 @@ export { AggregateCategoryResolver } from "./Category/AggregateCategoryResolver"; export { CreateManyCategoryResolver } from "./Category/CreateManyCategoryResolver"; +export { CreateManyAndReturnCategoryResolver } from "./Category/CreateManyAndReturnCategoryResolver"; export { CreateOneCategoryResolver } from "./Category/CreateOneCategoryResolver"; export { DeleteManyCategoryResolver } from "./Category/DeleteManyCategoryResolver"; export { DeleteOneCategoryResolver } from "./Category/DeleteOneCategoryResolver"; @@ -14,6 +15,7 @@ export { UpdateOneCategoryResolver } from "./Category/UpdateOneCategoryResolver" export { UpsertOneCategoryResolver } from "./Category/UpsertOneCategoryResolver"; export { AggregateCreatorResolver } from "./Creator/AggregateCreatorResolver"; export { CreateManyCreatorResolver } from "./Creator/CreateManyCreatorResolver"; +export { CreateManyAndReturnCreatorResolver } from "./Creator/CreateManyAndReturnCreatorResolver"; export { CreateOneCreatorResolver } from "./Creator/CreateOneCreatorResolver"; export { DeleteManyCreatorResolver } from "./Creator/DeleteManyCreatorResolver"; export { DeleteOneCreatorResolver } from "./Creator/DeleteOneCreatorResolver"; @@ -28,6 +30,7 @@ export { UpdateOneCreatorResolver } from "./Creator/UpdateOneCreatorResolver"; export { UpsertOneCreatorResolver } from "./Creator/UpsertOneCreatorResolver"; export { AggregateDirectorResolver } from "./Director/AggregateDirectorResolver"; export { CreateManyDirectorResolver } from "./Director/CreateManyDirectorResolver"; +export { CreateManyAndReturnDirectorResolver } from "./Director/CreateManyAndReturnDirectorResolver"; export { CreateOneDirectorResolver } from "./Director/CreateOneDirectorResolver"; export { DeleteManyDirectorResolver } from "./Director/DeleteManyDirectorResolver"; export { DeleteOneDirectorResolver } from "./Director/DeleteOneDirectorResolver"; @@ -42,6 +45,7 @@ export { UpdateOneDirectorResolver } from "./Director/UpdateOneDirectorResolver" export { UpsertOneDirectorResolver } from "./Director/UpsertOneDirectorResolver"; export { AggregateEquipmentResolver } from "./Equipment/AggregateEquipmentResolver"; export { CreateManyEquipmentResolver } from "./Equipment/CreateManyEquipmentResolver"; +export { CreateManyAndReturnEquipmentResolver } from "./Equipment/CreateManyAndReturnEquipmentResolver"; export { CreateOneEquipmentResolver } from "./Equipment/CreateOneEquipmentResolver"; export { DeleteManyEquipmentResolver } from "./Equipment/DeleteManyEquipmentResolver"; export { DeleteOneEquipmentResolver } from "./Equipment/DeleteOneEquipmentResolver"; @@ -56,6 +60,7 @@ export { UpdateOneEquipmentResolver } from "./Equipment/UpdateOneEquipmentResolv export { UpsertOneEquipmentResolver } from "./Equipment/UpsertOneEquipmentResolver"; export { AggregateHiddenResolver } from "./Hidden/AggregateHiddenResolver"; export { CreateManyHiddenResolver } from "./Hidden/CreateManyHiddenResolver"; +export { CreateManyAndReturnHiddenResolver } from "./Hidden/CreateManyAndReturnHiddenResolver"; export { CreateOneHiddenResolver } from "./Hidden/CreateOneHiddenResolver"; export { DeleteManyHiddenResolver } from "./Hidden/DeleteManyHiddenResolver"; export { DeleteOneHiddenResolver } from "./Hidden/DeleteOneHiddenResolver"; @@ -70,6 +75,7 @@ export { UpdateOneHiddenResolver } from "./Hidden/UpdateOneHiddenResolver"; export { UpsertOneHiddenResolver } from "./Hidden/UpsertOneHiddenResolver"; export { AggregateMainUserResolver } from "./MainUser/AggregateMainUserResolver"; export { CreateManyMainUserResolver } from "./MainUser/CreateManyMainUserResolver"; +export { CreateManyAndReturnMainUserResolver } from "./MainUser/CreateManyAndReturnMainUserResolver"; export { CreateOneMainUserResolver } from "./MainUser/CreateOneMainUserResolver"; export { DeleteManyMainUserResolver } from "./MainUser/DeleteManyMainUserResolver"; export { DeleteOneMainUserResolver } from "./MainUser/DeleteOneMainUserResolver"; @@ -84,6 +90,7 @@ export { UpdateOneMainUserResolver } from "./MainUser/UpdateOneMainUserResolver" export { UpsertOneMainUserResolver } from "./MainUser/UpsertOneMainUserResolver"; export { AggregateMovieResolver } from "./Movie/AggregateMovieResolver"; export { CreateManyMovieResolver } from "./Movie/CreateManyMovieResolver"; +export { CreateManyAndReturnMovieResolver } from "./Movie/CreateManyAndReturnMovieResolver"; export { CreateOneMovieResolver } from "./Movie/CreateOneMovieResolver"; export { DeleteManyMovieResolver } from "./Movie/DeleteManyMovieResolver"; export { DeleteOneMovieResolver } from "./Movie/DeleteOneMovieResolver"; @@ -98,6 +105,7 @@ export { UpdateOneMovieResolver } from "./Movie/UpdateOneMovieResolver"; export { UpsertOneMovieResolver } from "./Movie/UpsertOneMovieResolver"; export { AggregateNativeTypeModelResolver } from "./NativeTypeModel/AggregateNativeTypeModelResolver"; export { CreateManyNativeTypeModelResolver } from "./NativeTypeModel/CreateManyNativeTypeModelResolver"; +export { CreateManyAndReturnNativeTypeModelResolver } from "./NativeTypeModel/CreateManyAndReturnNativeTypeModelResolver"; export { CreateOneNativeTypeModelResolver } from "./NativeTypeModel/CreateOneNativeTypeModelResolver"; export { DeleteManyNativeTypeModelResolver } from "./NativeTypeModel/DeleteManyNativeTypeModelResolver"; export { DeleteOneNativeTypeModelResolver } from "./NativeTypeModel/DeleteOneNativeTypeModelResolver"; @@ -112,6 +120,7 @@ export { UpdateOneNativeTypeModelResolver } from "./NativeTypeModel/UpdateOneNat export { UpsertOneNativeTypeModelResolver } from "./NativeTypeModel/UpsertOneNativeTypeModelResolver"; export { AggregatePatientResolver } from "./Patient/AggregatePatientResolver"; export { CreateManyPatientResolver } from "./Patient/CreateManyPatientResolver"; +export { CreateManyAndReturnPatientResolver } from "./Patient/CreateManyAndReturnPatientResolver"; export { CreateOnePatientResolver } from "./Patient/CreateOnePatientResolver"; export { DeleteManyPatientResolver } from "./Patient/DeleteManyPatientResolver"; export { DeleteOnePatientResolver } from "./Patient/DeleteOnePatientResolver"; @@ -126,6 +135,7 @@ export { UpdateOnePatientResolver } from "./Patient/UpdateOnePatientResolver"; export { UpsertOnePatientResolver } from "./Patient/UpsertOnePatientResolver"; export { AggregatePostResolver } from "./Post/AggregatePostResolver"; export { CreateManyPostResolver } from "./Post/CreateManyPostResolver"; +export { CreateManyAndReturnPostResolver } from "./Post/CreateManyAndReturnPostResolver"; export { CreateOnePostResolver } from "./Post/CreateOnePostResolver"; export { DeleteManyPostResolver } from "./Post/DeleteManyPostResolver"; export { DeleteOnePostResolver } from "./Post/DeleteOnePostResolver"; @@ -140,6 +150,7 @@ export { UpdateOnePostResolver } from "./Post/UpdateOnePostResolver"; export { UpsertOnePostResolver } from "./Post/UpsertOnePostResolver"; export { AggregateProblemResolver } from "./Problem/AggregateProblemResolver"; export { CreateManyProblemResolver } from "./Problem/CreateManyProblemResolver"; +export { CreateManyAndReturnProblemResolver } from "./Problem/CreateManyAndReturnProblemResolver"; export { CreateOneProblemResolver } from "./Problem/CreateOneProblemResolver"; export { DeleteManyProblemResolver } from "./Problem/DeleteManyProblemResolver"; export { DeleteOneProblemResolver } from "./Problem/DeleteOneProblemResolver"; diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/CategoryOrderByWithRelationAndSearchRelevanceInput.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/CategoryOrderByWithRelationInput.ts similarity index 84% rename from experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/CategoryOrderByWithRelationAndSearchRelevanceInput.ts rename to experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/CategoryOrderByWithRelationInput.ts index 1dd29753f..34ff0f0bd 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/CategoryOrderByWithRelationAndSearchRelevanceInput.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/CategoryOrderByWithRelationInput.ts @@ -5,8 +5,8 @@ import { DecimalJSScalar } from "../../scalars"; import { CategoryOrderByRelevanceInput } from "../inputs/CategoryOrderByRelevanceInput"; import { SortOrder } from "../../enums/SortOrder"; -@TypeGraphQL.InputType("CategoryOrderByWithRelationAndSearchRelevanceInput", {}) -export class CategoryOrderByWithRelationAndSearchRelevanceInput { +@TypeGraphQL.InputType("CategoryOrderByWithRelationInput", {}) +export class CategoryOrderByWithRelationInput { @TypeGraphQL.Field(_type => SortOrder, { nullable: true }) diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/CreatorOrderByWithRelationAndSearchRelevanceInput.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/CreatorOrderByWithRelationInput.ts similarity index 88% rename from experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/CreatorOrderByWithRelationAndSearchRelevanceInput.ts rename to experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/CreatorOrderByWithRelationInput.ts index ca82c50f3..18f87eba7 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/CreatorOrderByWithRelationAndSearchRelevanceInput.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/CreatorOrderByWithRelationInput.ts @@ -6,8 +6,8 @@ import { CreatorOrderByRelevanceInput } from "../inputs/CreatorOrderByRelevanceI import { ProblemOrderByRelationAggregateInput } from "../inputs/ProblemOrderByRelationAggregateInput"; import { SortOrder } from "../../enums/SortOrder"; -@TypeGraphQL.InputType("CreatorOrderByWithRelationAndSearchRelevanceInput", {}) -export class CreatorOrderByWithRelationAndSearchRelevanceInput { +@TypeGraphQL.InputType("CreatorOrderByWithRelationInput", {}) +export class CreatorOrderByWithRelationInput { @TypeGraphQL.Field(_type => SortOrder, { nullable: true }) diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/DirectorOrderByWithRelationAndSearchRelevanceInput.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/DirectorOrderByWithRelationInput.ts similarity index 86% rename from experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/DirectorOrderByWithRelationAndSearchRelevanceInput.ts rename to experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/DirectorOrderByWithRelationInput.ts index e2a233101..f335b739b 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/DirectorOrderByWithRelationAndSearchRelevanceInput.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/DirectorOrderByWithRelationInput.ts @@ -6,8 +6,8 @@ import { DirectorOrderByRelevanceInput } from "../inputs/DirectorOrderByRelevanc import { MovieOrderByRelationAggregateInput } from "../inputs/MovieOrderByRelationAggregateInput"; import { SortOrder } from "../../enums/SortOrder"; -@TypeGraphQL.InputType("DirectorOrderByWithRelationAndSearchRelevanceInput", {}) -export class DirectorOrderByWithRelationAndSearchRelevanceInput { +@TypeGraphQL.InputType("DirectorOrderByWithRelationInput", {}) +export class DirectorOrderByWithRelationInput { @TypeGraphQL.Field(_type => SortOrder, { nullable: true }) diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/EquipmentOrderByWithRelationAndSearchRelevanceInput.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/EquipmentOrderByWithRelationInput.ts similarity index 83% rename from experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/EquipmentOrderByWithRelationAndSearchRelevanceInput.ts rename to experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/EquipmentOrderByWithRelationInput.ts index e3deb9351..f778374b0 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/EquipmentOrderByWithRelationAndSearchRelevanceInput.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/EquipmentOrderByWithRelationInput.ts @@ -6,8 +6,8 @@ import { EquipmentOrderByRelevanceInput } from "../inputs/EquipmentOrderByReleva import { SortOrderInput } from "../inputs/SortOrderInput"; import { SortOrder } from "../../enums/SortOrder"; -@TypeGraphQL.InputType("EquipmentOrderByWithRelationAndSearchRelevanceInput", {}) -export class EquipmentOrderByWithRelationAndSearchRelevanceInput { +@TypeGraphQL.InputType("EquipmentOrderByWithRelationInput", {}) +export class EquipmentOrderByWithRelationInput { @TypeGraphQL.Field(_type => SortOrder, { nullable: true }) diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/HiddenOrderByWithRelationAndSearchRelevanceInput.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/HiddenOrderByWithRelationInput.ts similarity index 83% rename from experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/HiddenOrderByWithRelationAndSearchRelevanceInput.ts rename to experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/HiddenOrderByWithRelationInput.ts index f502c49fb..9acf01c5d 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/HiddenOrderByWithRelationAndSearchRelevanceInput.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/HiddenOrderByWithRelationInput.ts @@ -6,8 +6,8 @@ import { HiddenOrderByRelevanceInput } from "../inputs/HiddenOrderByRelevanceInp import { SortOrderInput } from "../inputs/SortOrderInput"; import { SortOrder } from "../../enums/SortOrder"; -@TypeGraphQL.InputType("HiddenOrderByWithRelationAndSearchRelevanceInput", {}) -export class HiddenOrderByWithRelationAndSearchRelevanceInput { +@TypeGraphQL.InputType("HiddenOrderByWithRelationInput", {}) +export class HiddenOrderByWithRelationInput { @TypeGraphQL.Field(_type => SortOrder, { nullable: true }) diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/MainUserOrderByWithRelationAndSearchRelevanceInput.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/MainUserOrderByWithRelationInput.ts similarity index 94% rename from experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/MainUserOrderByWithRelationAndSearchRelevanceInput.ts rename to experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/MainUserOrderByWithRelationInput.ts index ad4ad1581..aef2d83e7 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/MainUserOrderByWithRelationAndSearchRelevanceInput.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/MainUserOrderByWithRelationInput.ts @@ -7,8 +7,8 @@ import { PostOrderByRelationAggregateInput } from "../inputs/PostOrderByRelation import { SortOrderInput } from "../inputs/SortOrderInput"; import { SortOrder } from "../../enums/SortOrder"; -@TypeGraphQL.InputType("MainUserOrderByWithRelationAndSearchRelevanceInput", {}) -export class MainUserOrderByWithRelationAndSearchRelevanceInput { +@TypeGraphQL.InputType("MainUserOrderByWithRelationInput", {}) +export class MainUserOrderByWithRelationInput { @TypeGraphQL.Field(_type => SortOrder, { nullable: true }) diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/MovieOrderByWithRelationAndSearchRelevanceInput.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/MovieOrderByWithRelationInput.ts similarity index 65% rename from experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/MovieOrderByWithRelationAndSearchRelevanceInput.ts rename to experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/MovieOrderByWithRelationInput.ts index 513766d90..6aec43bea 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/MovieOrderByWithRelationAndSearchRelevanceInput.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/MovieOrderByWithRelationInput.ts @@ -2,12 +2,12 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; import { Prisma } from "../../../client"; import { DecimalJSScalar } from "../../scalars"; -import { DirectorOrderByWithRelationAndSearchRelevanceInput } from "../inputs/DirectorOrderByWithRelationAndSearchRelevanceInput"; +import { DirectorOrderByWithRelationInput } from "../inputs/DirectorOrderByWithRelationInput"; import { MovieOrderByRelevanceInput } from "../inputs/MovieOrderByRelevanceInput"; import { SortOrder } from "../../enums/SortOrder"; -@TypeGraphQL.InputType("MovieOrderByWithRelationAndSearchRelevanceInput", {}) -export class MovieOrderByWithRelationAndSearchRelevanceInput { +@TypeGraphQL.InputType("MovieOrderByWithRelationInput", {}) +export class MovieOrderByWithRelationInput { @TypeGraphQL.Field(_type => SortOrder, { nullable: true }) @@ -23,10 +23,10 @@ export class MovieOrderByWithRelationAndSearchRelevanceInput { }) title?: "asc" | "desc" | undefined; - @TypeGraphQL.Field(_type => DirectorOrderByWithRelationAndSearchRelevanceInput, { + @TypeGraphQL.Field(_type => DirectorOrderByWithRelationInput, { nullable: true }) - director?: DirectorOrderByWithRelationAndSearchRelevanceInput | undefined; + director?: DirectorOrderByWithRelationInput | undefined; @TypeGraphQL.Field(_type => MovieOrderByRelevanceInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/NativeTypeModelOrderByWithRelationAndSearchRelevanceInput.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/NativeTypeModelOrderByWithRelationInput.ts similarity index 82% rename from experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/NativeTypeModelOrderByWithRelationAndSearchRelevanceInput.ts rename to experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/NativeTypeModelOrderByWithRelationInput.ts index f134dd49f..5f4af7842 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/NativeTypeModelOrderByWithRelationAndSearchRelevanceInput.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/NativeTypeModelOrderByWithRelationInput.ts @@ -5,8 +5,8 @@ import { DecimalJSScalar } from "../../scalars"; import { SortOrderInput } from "../inputs/SortOrderInput"; import { SortOrder } from "../../enums/SortOrder"; -@TypeGraphQL.InputType("NativeTypeModelOrderByWithRelationAndSearchRelevanceInput", {}) -export class NativeTypeModelOrderByWithRelationAndSearchRelevanceInput { +@TypeGraphQL.InputType("NativeTypeModelOrderByWithRelationInput", {}) +export class NativeTypeModelOrderByWithRelationInput { @TypeGraphQL.Field(_type => SortOrder, { nullable: true }) diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/PatientOrderByWithRelationAndSearchRelevanceInput.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/PatientOrderByWithRelationInput.ts similarity index 84% rename from experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/PatientOrderByWithRelationAndSearchRelevanceInput.ts rename to experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/PatientOrderByWithRelationInput.ts index 36184c5f2..20053439d 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/PatientOrderByWithRelationAndSearchRelevanceInput.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/PatientOrderByWithRelationInput.ts @@ -5,8 +5,8 @@ import { DecimalJSScalar } from "../../scalars"; import { PatientOrderByRelevanceInput } from "../inputs/PatientOrderByRelevanceInput"; import { SortOrder } from "../../enums/SortOrder"; -@TypeGraphQL.InputType("PatientOrderByWithRelationAndSearchRelevanceInput", {}) -export class PatientOrderByWithRelationAndSearchRelevanceInput { +@TypeGraphQL.InputType("PatientOrderByWithRelationInput", {}) +export class PatientOrderByWithRelationInput { @TypeGraphQL.Field(_type => SortOrder, { nullable: true }) diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/PostOrderByWithRelationAndSearchRelevanceInput.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/PostOrderByWithRelationInput.ts similarity index 73% rename from experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/PostOrderByWithRelationAndSearchRelevanceInput.ts rename to experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/PostOrderByWithRelationInput.ts index aed1cce40..08f5ed138 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/PostOrderByWithRelationAndSearchRelevanceInput.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/PostOrderByWithRelationInput.ts @@ -2,13 +2,13 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; import { Prisma } from "../../../client"; import { DecimalJSScalar } from "../../scalars"; -import { MainUserOrderByWithRelationAndSearchRelevanceInput } from "../inputs/MainUserOrderByWithRelationAndSearchRelevanceInput"; +import { MainUserOrderByWithRelationInput } from "../inputs/MainUserOrderByWithRelationInput"; import { PostOrderByRelevanceInput } from "../inputs/PostOrderByRelevanceInput"; import { SortOrderInput } from "../inputs/SortOrderInput"; import { SortOrder } from "../../enums/SortOrder"; -@TypeGraphQL.InputType("PostOrderByWithRelationAndSearchRelevanceInput", {}) -export class PostOrderByWithRelationAndSearchRelevanceInput { +@TypeGraphQL.InputType("PostOrderByWithRelationInput", {}) +export class PostOrderByWithRelationInput { @TypeGraphQL.Field(_type => SortOrder, { nullable: true }) @@ -59,15 +59,15 @@ export class PostOrderByWithRelationAndSearchRelevanceInput { }) metadata?: "asc" | "desc" | undefined; - @TypeGraphQL.Field(_type => MainUserOrderByWithRelationAndSearchRelevanceInput, { + @TypeGraphQL.Field(_type => MainUserOrderByWithRelationInput, { nullable: true }) - author?: MainUserOrderByWithRelationAndSearchRelevanceInput | undefined; + author?: MainUserOrderByWithRelationInput | undefined; - @TypeGraphQL.Field(_type => MainUserOrderByWithRelationAndSearchRelevanceInput, { + @TypeGraphQL.Field(_type => MainUserOrderByWithRelationInput, { nullable: true }) - editor?: MainUserOrderByWithRelationAndSearchRelevanceInput | undefined; + editor?: MainUserOrderByWithRelationInput | undefined; @TypeGraphQL.Field(_type => PostOrderByRelevanceInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/ProblemOrderByWithRelationAndSearchRelevanceInput.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/ProblemOrderByWithRelationInput.ts similarity index 72% rename from experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/ProblemOrderByWithRelationAndSearchRelevanceInput.ts rename to experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/ProblemOrderByWithRelationInput.ts index a59bace22..2bfcaf153 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/ProblemOrderByWithRelationAndSearchRelevanceInput.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/ProblemOrderByWithRelationInput.ts @@ -3,13 +3,13 @@ import * as GraphQLScalars from "graphql-scalars"; import { Prisma } from "../../../client"; import { DecimalJSScalar } from "../../scalars"; import { CreatorOrderByRelationAggregateInput } from "../inputs/CreatorOrderByRelationAggregateInput"; -import { CreatorOrderByWithRelationAndSearchRelevanceInput } from "../inputs/CreatorOrderByWithRelationAndSearchRelevanceInput"; +import { CreatorOrderByWithRelationInput } from "../inputs/CreatorOrderByWithRelationInput"; import { ProblemOrderByRelevanceInput } from "../inputs/ProblemOrderByRelevanceInput"; import { SortOrderInput } from "../inputs/SortOrderInput"; import { SortOrder } from "../../enums/SortOrder"; -@TypeGraphQL.InputType("ProblemOrderByWithRelationAndSearchRelevanceInput", {}) -export class ProblemOrderByWithRelationAndSearchRelevanceInput { +@TypeGraphQL.InputType("ProblemOrderByWithRelationInput", {}) +export class ProblemOrderByWithRelationInput { @TypeGraphQL.Field(_type => SortOrder, { nullable: true }) @@ -30,10 +30,10 @@ export class ProblemOrderByWithRelationAndSearchRelevanceInput { }) likedBy?: CreatorOrderByRelationAggregateInput | undefined; - @TypeGraphQL.Field(_type => CreatorOrderByWithRelationAndSearchRelevanceInput, { + @TypeGraphQL.Field(_type => CreatorOrderByWithRelationInput, { nullable: true }) - creator?: CreatorOrderByWithRelationAndSearchRelevanceInput | undefined; + creator?: CreatorOrderByWithRelationInput | undefined; @TypeGraphQL.Field(_type => ProblemOrderByRelevanceInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/index.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/index.ts index 731d73e1e..b2d7d9879 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/index.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/inputs/index.ts @@ -14,7 +14,7 @@ export { CategoryMaxOrderByAggregateInput } from "./CategoryMaxOrderByAggregateI export { CategoryMinOrderByAggregateInput } from "./CategoryMinOrderByAggregateInput"; export { CategoryOrderByRelevanceInput } from "./CategoryOrderByRelevanceInput"; export { CategoryOrderByWithAggregationInput } from "./CategoryOrderByWithAggregationInput"; -export { CategoryOrderByWithRelationAndSearchRelevanceInput } from "./CategoryOrderByWithRelationAndSearchRelevanceInput"; +export { CategoryOrderByWithRelationInput } from "./CategoryOrderByWithRelationInput"; export { CategoryScalarWhereWithAggregatesInput } from "./CategoryScalarWhereWithAggregatesInput"; export { CategorySumOrderByAggregateInput } from "./CategorySumOrderByAggregateInput"; export { CategoryUpdateInput } from "./CategoryUpdateInput"; @@ -38,7 +38,7 @@ export { CreatorNullableRelationFilter } from "./CreatorNullableRelationFilter"; export { CreatorOrderByRelationAggregateInput } from "./CreatorOrderByRelationAggregateInput"; export { CreatorOrderByRelevanceInput } from "./CreatorOrderByRelevanceInput"; export { CreatorOrderByWithAggregationInput } from "./CreatorOrderByWithAggregationInput"; -export { CreatorOrderByWithRelationAndSearchRelevanceInput } from "./CreatorOrderByWithRelationAndSearchRelevanceInput"; +export { CreatorOrderByWithRelationInput } from "./CreatorOrderByWithRelationInput"; export { CreatorScalarWhereInput } from "./CreatorScalarWhereInput"; export { CreatorScalarWhereWithAggregatesInput } from "./CreatorScalarWhereWithAggregatesInput"; export { CreatorSumOrderByAggregateInput } from "./CreatorSumOrderByAggregateInput"; @@ -71,7 +71,7 @@ export { DirectorMaxOrderByAggregateInput } from "./DirectorMaxOrderByAggregateI export { DirectorMinOrderByAggregateInput } from "./DirectorMinOrderByAggregateInput"; export { DirectorOrderByRelevanceInput } from "./DirectorOrderByRelevanceInput"; export { DirectorOrderByWithAggregationInput } from "./DirectorOrderByWithAggregationInput"; -export { DirectorOrderByWithRelationAndSearchRelevanceInput } from "./DirectorOrderByWithRelationAndSearchRelevanceInput"; +export { DirectorOrderByWithRelationInput } from "./DirectorOrderByWithRelationInput"; export { DirectorRelationFilter } from "./DirectorRelationFilter"; export { DirectorScalarWhereWithAggregatesInput } from "./DirectorScalarWhereWithAggregatesInput"; export { DirectorUpdateInput } from "./DirectorUpdateInput"; @@ -94,7 +94,7 @@ export { EquipmentMaxOrderByAggregateInput } from "./EquipmentMaxOrderByAggregat export { EquipmentMinOrderByAggregateInput } from "./EquipmentMinOrderByAggregateInput"; export { EquipmentOrderByRelevanceInput } from "./EquipmentOrderByRelevanceInput"; export { EquipmentOrderByWithAggregationInput } from "./EquipmentOrderByWithAggregationInput"; -export { EquipmentOrderByWithRelationAndSearchRelevanceInput } from "./EquipmentOrderByWithRelationAndSearchRelevanceInput"; +export { EquipmentOrderByWithRelationInput } from "./EquipmentOrderByWithRelationInput"; export { EquipmentScalarWhereWithAggregatesInput } from "./EquipmentScalarWhereWithAggregatesInput"; export { EquipmentUpdateInput } from "./EquipmentUpdateInput"; export { EquipmentUpdateManyMutationInput } from "./EquipmentUpdateManyMutationInput"; @@ -110,7 +110,7 @@ export { HiddenMaxOrderByAggregateInput } from "./HiddenMaxOrderByAggregateInput export { HiddenMinOrderByAggregateInput } from "./HiddenMinOrderByAggregateInput"; export { HiddenOrderByRelevanceInput } from "./HiddenOrderByRelevanceInput"; export { HiddenOrderByWithAggregationInput } from "./HiddenOrderByWithAggregationInput"; -export { HiddenOrderByWithRelationAndSearchRelevanceInput } from "./HiddenOrderByWithRelationAndSearchRelevanceInput"; +export { HiddenOrderByWithRelationInput } from "./HiddenOrderByWithRelationInput"; export { HiddenScalarWhereWithAggregatesInput } from "./HiddenScalarWhereWithAggregatesInput"; export { HiddenUpdateInput } from "./HiddenUpdateInput"; export { HiddenUpdateManyMutationInput } from "./HiddenUpdateManyMutationInput"; @@ -140,7 +140,7 @@ export { MainUserMaxOrderByAggregateInput } from "./MainUserMaxOrderByAggregateI export { MainUserMinOrderByAggregateInput } from "./MainUserMinOrderByAggregateInput"; export { MainUserOrderByRelevanceInput } from "./MainUserOrderByRelevanceInput"; export { MainUserOrderByWithAggregationInput } from "./MainUserOrderByWithAggregationInput"; -export { MainUserOrderByWithRelationAndSearchRelevanceInput } from "./MainUserOrderByWithRelationAndSearchRelevanceInput"; +export { MainUserOrderByWithRelationInput } from "./MainUserOrderByWithRelationInput"; export { MainUserRelationFilter } from "./MainUserRelationFilter"; export { MainUserScalarWhereWithAggregatesInput } from "./MainUserScalarWhereWithAggregatesInput"; export { MainUserSumOrderByAggregateInput } from "./MainUserSumOrderByAggregateInput"; @@ -173,7 +173,7 @@ export { MovieMovieCompoundIdCompoundUniqueInput } from "./MovieMovieCompoundIdC export { MovieOrderByRelationAggregateInput } from "./MovieOrderByRelationAggregateInput"; export { MovieOrderByRelevanceInput } from "./MovieOrderByRelevanceInput"; export { MovieOrderByWithAggregationInput } from "./MovieOrderByWithAggregationInput"; -export { MovieOrderByWithRelationAndSearchRelevanceInput } from "./MovieOrderByWithRelationAndSearchRelevanceInput"; +export { MovieOrderByWithRelationInput } from "./MovieOrderByWithRelationInput"; export { MovieScalarWhereInput } from "./MovieScalarWhereInput"; export { MovieScalarWhereWithAggregatesInput } from "./MovieScalarWhereWithAggregatesInput"; export { MovieUpdateInput } from "./MovieUpdateInput"; @@ -192,7 +192,7 @@ export { NativeTypeModelCreateManyInput } from "./NativeTypeModelCreateManyInput export { NativeTypeModelMaxOrderByAggregateInput } from "./NativeTypeModelMaxOrderByAggregateInput"; export { NativeTypeModelMinOrderByAggregateInput } from "./NativeTypeModelMinOrderByAggregateInput"; export { NativeTypeModelOrderByWithAggregationInput } from "./NativeTypeModelOrderByWithAggregationInput"; -export { NativeTypeModelOrderByWithRelationAndSearchRelevanceInput } from "./NativeTypeModelOrderByWithRelationAndSearchRelevanceInput"; +export { NativeTypeModelOrderByWithRelationInput } from "./NativeTypeModelOrderByWithRelationInput"; export { NativeTypeModelScalarWhereWithAggregatesInput } from "./NativeTypeModelScalarWhereWithAggregatesInput"; export { NativeTypeModelSumOrderByAggregateInput } from "./NativeTypeModelSumOrderByAggregateInput"; export { NativeTypeModelUpdateInput } from "./NativeTypeModelUpdateInput"; @@ -239,7 +239,7 @@ export { PatientMaxOrderByAggregateInput } from "./PatientMaxOrderByAggregateInp export { PatientMinOrderByAggregateInput } from "./PatientMinOrderByAggregateInput"; export { PatientOrderByRelevanceInput } from "./PatientOrderByRelevanceInput"; export { PatientOrderByWithAggregationInput } from "./PatientOrderByWithAggregationInput"; -export { PatientOrderByWithRelationAndSearchRelevanceInput } from "./PatientOrderByWithRelationAndSearchRelevanceInput"; +export { PatientOrderByWithRelationInput } from "./PatientOrderByWithRelationInput"; export { PatientScalarWhereWithAggregatesInput } from "./PatientScalarWhereWithAggregatesInput"; export { PatientUpdateInput } from "./PatientUpdateInput"; export { PatientUpdateManyMutationInput } from "./PatientUpdateManyMutationInput"; @@ -265,7 +265,7 @@ export { PostMinOrderByAggregateInput } from "./PostMinOrderByAggregateInput"; export { PostOrderByRelationAggregateInput } from "./PostOrderByRelationAggregateInput"; export { PostOrderByRelevanceInput } from "./PostOrderByRelevanceInput"; export { PostOrderByWithAggregationInput } from "./PostOrderByWithAggregationInput"; -export { PostOrderByWithRelationAndSearchRelevanceInput } from "./PostOrderByWithRelationAndSearchRelevanceInput"; +export { PostOrderByWithRelationInput } from "./PostOrderByWithRelationInput"; export { PostScalarWhereInput } from "./PostScalarWhereInput"; export { PostScalarWhereWithAggregatesInput } from "./PostScalarWhereWithAggregatesInput"; export { PostSumOrderByAggregateInput } from "./PostSumOrderByAggregateInput"; @@ -301,7 +301,7 @@ export { ProblemMinOrderByAggregateInput } from "./ProblemMinOrderByAggregateInp export { ProblemOrderByRelationAggregateInput } from "./ProblemOrderByRelationAggregateInput"; export { ProblemOrderByRelevanceInput } from "./ProblemOrderByRelevanceInput"; export { ProblemOrderByWithAggregationInput } from "./ProblemOrderByWithAggregationInput"; -export { ProblemOrderByWithRelationAndSearchRelevanceInput } from "./ProblemOrderByWithRelationAndSearchRelevanceInput"; +export { ProblemOrderByWithRelationInput } from "./ProblemOrderByWithRelationInput"; export { ProblemScalarWhereInput } from "./ProblemScalarWhereInput"; export { ProblemScalarWhereWithAggregatesInput } from "./ProblemScalarWhereWithAggregatesInput"; export { ProblemSumOrderByAggregateInput } from "./ProblemSumOrderByAggregateInput"; diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnCategory.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnCategory.ts new file mode 100644 index 000000000..ea131f30e --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnCategory.ts @@ -0,0 +1,22 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { Prisma } from "../../../client"; +import { DecimalJSScalar } from "../../scalars"; + +@TypeGraphQL.ObjectType("CreateManyAndReturnCategory", {}) +export class CreateManyAndReturnCategory { + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + name!: string; + + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + slug!: string; + + @TypeGraphQL.Field(_type => TypeGraphQL.Int, { + nullable: false + }) + number!: number; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnCreator.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnCreator.ts new file mode 100644 index 000000000..1997847c1 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnCreator.ts @@ -0,0 +1,17 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { Prisma } from "../../../client"; +import { DecimalJSScalar } from "../../scalars"; + +@TypeGraphQL.ObjectType("CreateManyAndReturnCreator", {}) +export class CreateManyAndReturnCreator { + @TypeGraphQL.Field(_type => TypeGraphQL.Int, { + nullable: false + }) + id!: number; + + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + name!: string; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnDirector.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnDirector.ts new file mode 100644 index 000000000..5c36d1b4b --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnDirector.ts @@ -0,0 +1,17 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { Prisma } from "../../../client"; +import { DecimalJSScalar } from "../../scalars"; + +@TypeGraphQL.ObjectType("CreateManyAndReturnDirector", {}) +export class CreateManyAndReturnDirector { + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + firstName!: string; + + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + lastName!: string; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnEquipment.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnEquipment.ts new file mode 100644 index 000000000..895202c86 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnEquipment.ts @@ -0,0 +1,17 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { Prisma } from "../../../client"; +import { DecimalJSScalar } from "../../scalars"; + +@TypeGraphQL.ObjectType("CreateManyAndReturnEquipment", {}) +export class CreateManyAndReturnEquipment { + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + id!: string; + + @TypeGraphQL.Field(_type => String, { + nullable: true + }) + name!: string | null; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnHidden.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnHidden.ts new file mode 100644 index 000000000..980afdcee --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnHidden.ts @@ -0,0 +1,17 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { Prisma } from "../../../client"; +import { DecimalJSScalar } from "../../scalars"; + +@TypeGraphQL.ObjectType("CreateManyAndReturnHidden", {}) +export class CreateManyAndReturnHidden { + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + id!: string; + + @TypeGraphQL.Field(_type => String, { + nullable: true + }) + name!: string | null; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnMainUser.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnMainUser.ts new file mode 100644 index 000000000..caf05306c --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnMainUser.ts @@ -0,0 +1,53 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { Prisma } from "../../../client"; +import { DecimalJSScalar } from "../../scalars"; +import { Role } from "../../enums/Role"; + +@TypeGraphQL.ObjectType("CreateManyAndReturnMainUser", {}) +export class CreateManyAndReturnMainUser { + @TypeGraphQL.Field(_type => TypeGraphQL.Int, { + nullable: false + }) + id!: number; + + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + email!: string; + + @TypeGraphQL.Field(_type => String, { + nullable: true + }) + name!: string | null; + + @TypeGraphQL.Field(_type => TypeGraphQL.Int, { + nullable: false + }) + age!: number; + + @TypeGraphQL.Field(_type => TypeGraphQL.Float, { + nullable: false + }) + balance!: number; + + @TypeGraphQL.Field(_type => TypeGraphQL.Float, { + nullable: false + }) + amount!: number; + + @TypeGraphQL.Field(_type => Role, { + nullable: false + }) + role!: "USER" | "ADMIN"; + + @TypeGraphQL.Field(_type => [TypeGraphQL.Int], { + nullable: true + }) + grades!: number[] | null; + + @TypeGraphQL.Field(_type => [String], { + nullable: true + }) + aliases!: string[] | null; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnMovie.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnMovie.ts new file mode 100644 index 000000000..05efb6e4f --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnMovie.ts @@ -0,0 +1,28 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { Prisma } from "../../../client"; +import { DecimalJSScalar } from "../../scalars"; +import { Director } from "../../models/Director"; + +@TypeGraphQL.ObjectType("CreateManyAndReturnMovie", {}) +export class CreateManyAndReturnMovie { + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + directorFirstName!: string; + + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + directorLastName!: string; + + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + title!: string; + + @TypeGraphQL.Field(_type => Director, { + nullable: false + }) + director!: Director; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnNativeTypeModel.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnNativeTypeModel.ts new file mode 100644 index 000000000..e891ab75c --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnNativeTypeModel.ts @@ -0,0 +1,27 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { Prisma } from "../../../client"; +import { DecimalJSScalar } from "../../scalars"; + +@TypeGraphQL.ObjectType("CreateManyAndReturnNativeTypeModel", {}) +export class CreateManyAndReturnNativeTypeModel { + @TypeGraphQL.Field(_type => TypeGraphQL.Int, { + nullable: false + }) + id!: number; + + @TypeGraphQL.Field(_type => GraphQLScalars.BigIntResolver, { + nullable: true + }) + bigInt!: bigint | null; + + @TypeGraphQL.Field(_type => GraphQLScalars.ByteResolver, { + nullable: true + }) + byteA!: Buffer | null; + + @TypeGraphQL.Field(_type => DecimalJSScalar, { + nullable: true + }) + decimal!: Prisma.Decimal | null; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnPatient.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnPatient.ts new file mode 100644 index 000000000..d5fadddab --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnPatient.ts @@ -0,0 +1,22 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { Prisma } from "../../../client"; +import { DecimalJSScalar } from "../../scalars"; + +@TypeGraphQL.ObjectType("CreateManyAndReturnPatient", {}) +export class CreateManyAndReturnPatient { + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + firstName!: string; + + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + lastName!: string; + + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + email!: string; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnPost.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnPost.ts new file mode 100644 index 000000000..06a81e690 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnPost.ts @@ -0,0 +1,80 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { Prisma } from "../../../client"; +import { DecimalJSScalar } from "../../scalars"; +import { CreateManyAndReturnPostEditorArgs } from "./args/CreateManyAndReturnPostEditorArgs"; +import { MainUser } from "../../models/MainUser"; +import { PostKind } from "../../enums/PostKind"; + +@TypeGraphQL.ObjectType("CreateManyAndReturnPost", {}) +export class CreateManyAndReturnPost { + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + uuid!: string; + + @TypeGraphQL.Field(_type => Date, { + nullable: false + }) + createdAt!: Date; + + @TypeGraphQL.Field(_type => Date, { + nullable: false + }) + updatedAt!: Date; + + @TypeGraphQL.Field(_type => Boolean, { + nullable: false + }) + published!: boolean; + + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + title!: string; + + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + subtitle!: string; + + @TypeGraphQL.Field(_type => String, { + nullable: true + }) + content!: string | null; + + @TypeGraphQL.Field(_type => TypeGraphQL.Int, { + nullable: false + }) + authorId!: number; + + @TypeGraphQL.Field(_type => TypeGraphQL.Int, { + nullable: true + }) + editorId!: number | null; + + @TypeGraphQL.Field(_type => PostKind, { + nullable: true + }) + kind!: "BLOG" | "ADVERT" | null; + + @TypeGraphQL.Field(_type => GraphQLScalars.JSONResolver, { + nullable: false + }) + metadata!: Prisma.JsonValue; + + @TypeGraphQL.Field(_type => MainUser, { + nullable: false + }) + author!: MainUser; + + editor!: MainUser | null; + + @TypeGraphQL.Field(_type => MainUser, { + name: "editor", + nullable: true + }) + getEditor(@TypeGraphQL.Root() root: CreateManyAndReturnPost, @TypeGraphQL.Args() args: CreateManyAndReturnPostEditorArgs): MainUser | null { + return root.editor; + } +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnProblem.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnProblem.ts new file mode 100644 index 000000000..27fdde06c --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/CreateManyAndReturnProblem.ts @@ -0,0 +1,34 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { Prisma } from "../../../client"; +import { DecimalJSScalar } from "../../scalars"; +import { CreateManyAndReturnProblemCreatorArgs } from "./args/CreateManyAndReturnProblemCreatorArgs"; +import { Creator } from "../../models/Creator"; + +@TypeGraphQL.ObjectType("CreateManyAndReturnProblem", {}) +export class CreateManyAndReturnProblem { + @TypeGraphQL.Field(_type => TypeGraphQL.Int, { + nullable: false + }) + id!: number; + + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + problemText!: string; + + @TypeGraphQL.Field(_type => TypeGraphQL.Int, { + nullable: true + }) + creatorId!: number | null; + + creator!: Creator | null; + + @TypeGraphQL.Field(_type => Creator, { + name: "creator", + nullable: true + }) + getCreator(@TypeGraphQL.Root() root: CreateManyAndReturnProblem, @TypeGraphQL.Args() args: CreateManyAndReturnProblemCreatorArgs): Creator | null { + return root.creator; + } +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/args/CreateManyAndReturnPostEditorArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/args/CreateManyAndReturnPostEditorArgs.ts new file mode 100644 index 000000000..85fe7427c --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/args/CreateManyAndReturnPostEditorArgs.ts @@ -0,0 +1,11 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { MainUserWhereInput } from "../../inputs/MainUserWhereInput"; + +@TypeGraphQL.ArgsType() +export class CreateManyAndReturnPostEditorArgs { + @TypeGraphQL.Field(_type => MainUserWhereInput, { + nullable: true + }) + where?: MainUserWhereInput | undefined; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/args/CreateManyAndReturnProblemCreatorArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/args/CreateManyAndReturnProblemCreatorArgs.ts new file mode 100644 index 000000000..9dad886e9 --- /dev/null +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/args/CreateManyAndReturnProblemCreatorArgs.ts @@ -0,0 +1,11 @@ +import * as TypeGraphQL from "type-graphql"; +import * as GraphQLScalars from "graphql-scalars"; +import { CreatorWhereInput } from "../../inputs/CreatorWhereInput"; + +@TypeGraphQL.ArgsType() +export class CreateManyAndReturnProblemCreatorArgs { + @TypeGraphQL.Field(_type => CreatorWhereInput, { + nullable: true + }) + where?: CreatorWhereInput | undefined; +} diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/args/index.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/args/index.ts index e8686aef7..ce153aec0 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/args/index.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/args/index.ts @@ -1,3 +1,5 @@ +export { CreateManyAndReturnPostEditorArgs } from "./CreateManyAndReturnPostEditorArgs"; +export { CreateManyAndReturnProblemCreatorArgs } from "./CreateManyAndReturnProblemCreatorArgs"; export { CreatorCountLikesArgs } from "./CreatorCountLikesArgs"; export { CreatorCountProblemsArgs } from "./CreatorCountProblemsArgs"; export { DirectorCountMoviesArgs } from "./DirectorCountMoviesArgs"; diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/index.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/index.ts index 5a843a05d..baea06749 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/index.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/outputs/index.ts @@ -16,6 +16,17 @@ export { CategoryGroupBy } from "./CategoryGroupBy"; export { CategoryMaxAggregate } from "./CategoryMaxAggregate"; export { CategoryMinAggregate } from "./CategoryMinAggregate"; export { CategorySumAggregate } from "./CategorySumAggregate"; +export { CreateManyAndReturnCategory } from "./CreateManyAndReturnCategory"; +export { CreateManyAndReturnCreator } from "./CreateManyAndReturnCreator"; +export { CreateManyAndReturnDirector } from "./CreateManyAndReturnDirector"; +export { CreateManyAndReturnEquipment } from "./CreateManyAndReturnEquipment"; +export { CreateManyAndReturnHidden } from "./CreateManyAndReturnHidden"; +export { CreateManyAndReturnMainUser } from "./CreateManyAndReturnMainUser"; +export { CreateManyAndReturnMovie } from "./CreateManyAndReturnMovie"; +export { CreateManyAndReturnNativeTypeModel } from "./CreateManyAndReturnNativeTypeModel"; +export { CreateManyAndReturnPatient } from "./CreateManyAndReturnPatient"; +export { CreateManyAndReturnPost } from "./CreateManyAndReturnPost"; +export { CreateManyAndReturnProblem } from "./CreateManyAndReturnProblem"; export { CreatorAvgAggregate } from "./CreatorAvgAggregate"; export { CreatorCount } from "./CreatorCount"; export { CreatorCountAggregate } from "./CreatorCountAggregate"; diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/Creator/args/CreatorLikesArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/Creator/args/CreatorLikesArgs.ts index 2974b047b..81f78d02c 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/Creator/args/CreatorLikesArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/Creator/args/CreatorLikesArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { ProblemOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/ProblemOrderByWithRelationAndSearchRelevanceInput"; +import { ProblemOrderByWithRelationInput } from "../../../inputs/ProblemOrderByWithRelationInput"; import { ProblemWhereInput } from "../../../inputs/ProblemWhereInput"; import { ProblemWhereUniqueInput } from "../../../inputs/ProblemWhereUniqueInput"; import { ProblemScalarFieldEnum } from "../../../../enums/ProblemScalarFieldEnum"; @@ -12,10 +12,10 @@ export class CreatorLikesArgs { }) where?: ProblemWhereInput | undefined; - @TypeGraphQL.Field(_type => [ProblemOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [ProblemOrderByWithRelationInput], { nullable: true }) - orderBy?: ProblemOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: ProblemOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => ProblemWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/Creator/args/CreatorProblemsArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/Creator/args/CreatorProblemsArgs.ts index 53c49ee79..e17abde76 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/Creator/args/CreatorProblemsArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/Creator/args/CreatorProblemsArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { ProblemOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/ProblemOrderByWithRelationAndSearchRelevanceInput"; +import { ProblemOrderByWithRelationInput } from "../../../inputs/ProblemOrderByWithRelationInput"; import { ProblemWhereInput } from "../../../inputs/ProblemWhereInput"; import { ProblemWhereUniqueInput } from "../../../inputs/ProblemWhereUniqueInput"; import { ProblemScalarFieldEnum } from "../../../../enums/ProblemScalarFieldEnum"; @@ -12,10 +12,10 @@ export class CreatorProblemsArgs { }) where?: ProblemWhereInput | undefined; - @TypeGraphQL.Field(_type => [ProblemOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [ProblemOrderByWithRelationInput], { nullable: true }) - orderBy?: ProblemOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: ProblemOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => ProblemWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/Director/args/DirectorMoviesArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/Director/args/DirectorMoviesArgs.ts index c92bbda93..ed130865b 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/Director/args/DirectorMoviesArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/Director/args/DirectorMoviesArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { MovieOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/MovieOrderByWithRelationAndSearchRelevanceInput"; +import { MovieOrderByWithRelationInput } from "../../../inputs/MovieOrderByWithRelationInput"; import { MovieWhereInput } from "../../../inputs/MovieWhereInput"; import { MovieWhereUniqueInput } from "../../../inputs/MovieWhereUniqueInput"; import { MovieScalarFieldEnum } from "../../../../enums/MovieScalarFieldEnum"; @@ -12,10 +12,10 @@ export class DirectorMoviesArgs { }) where?: MovieWhereInput | undefined; - @TypeGraphQL.Field(_type => [MovieOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [MovieOrderByWithRelationInput], { nullable: true }) - orderBy?: MovieOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: MovieOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => MovieWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/MainUser/args/MainUserPostsArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/MainUser/args/MainUserPostsArgs.ts index 14983cb1b..798a9a0bb 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/MainUser/args/MainUserPostsArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/MainUser/args/MainUserPostsArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { PostOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/PostOrderByWithRelationAndSearchRelevanceInput"; +import { PostOrderByWithRelationInput } from "../../../inputs/PostOrderByWithRelationInput"; import { PostWhereInput } from "../../../inputs/PostWhereInput"; import { PostWhereUniqueInput } from "../../../inputs/PostWhereUniqueInput"; import { PostScalarFieldEnum } from "../../../../enums/PostScalarFieldEnum"; @@ -12,10 +12,10 @@ export class MainUserPostsArgs { }) where?: PostWhereInput | undefined; - @TypeGraphQL.Field(_type => [PostOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [PostOrderByWithRelationInput], { nullable: true }) - orderBy?: PostOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: PostOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => PostWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/Problem/args/ProblemLikedByArgs.ts b/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/Problem/args/ProblemLikedByArgs.ts index 207667f43..17586d3f2 100644 --- a/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/Problem/args/ProblemLikedByArgs.ts +++ b/experiments/postgres/prisma/generated/type-graphql/resolvers/relations/Problem/args/ProblemLikedByArgs.ts @@ -1,6 +1,6 @@ import * as TypeGraphQL from "type-graphql"; import * as GraphQLScalars from "graphql-scalars"; -import { CreatorOrderByWithRelationAndSearchRelevanceInput } from "../../../inputs/CreatorOrderByWithRelationAndSearchRelevanceInput"; +import { CreatorOrderByWithRelationInput } from "../../../inputs/CreatorOrderByWithRelationInput"; import { CreatorWhereInput } from "../../../inputs/CreatorWhereInput"; import { CreatorWhereUniqueInput } from "../../../inputs/CreatorWhereUniqueInput"; import { CreatorScalarFieldEnum } from "../../../../enums/CreatorScalarFieldEnum"; @@ -12,10 +12,10 @@ export class ProblemLikedByArgs { }) where?: CreatorWhereInput | undefined; - @TypeGraphQL.Field(_type => [CreatorOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [CreatorOrderByWithRelationInput], { nullable: true }) - orderBy?: CreatorOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: CreatorOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => CreatorWhereUniqueInput, { nullable: true diff --git a/experiments/postgres/query.graphql b/experiments/postgres/query.graphql index 9c078f8c8..c63c96c72 100644 --- a/experiments/postgres/query.graphql +++ b/experiments/postgres/query.graphql @@ -59,7 +59,7 @@ query FindMainUsers { } query SortAllMainUsers { - mainUsers(orderBy: [{ firstName: asc }, { id: desc }]) { + mainUsers(orderBy: [{ firstName: { sort: asc } }, { id: desc }]) { ...MainUserData } } @@ -96,7 +96,7 @@ fragment PostData on Post { uuid createdAt updatedAt - published + isPublished title content kind @@ -192,62 +192,15 @@ query AggregateMainUser { } } -# # incompatible with useUncheckedScalarInputs -# mutation ConnectOrCreateExample { -# createPost( -# data: { -# title: "Test" -# subtitle: "Test test" -# metadata: {} -# published: true -# author: { -# connectOrCreate: { -# where: { id: 1 } -# create: { -# email: "test1@test.test" -# accountBalance: 0 -# role: ADMIN -# amount: 0 -# age: 11 -# } -# } -# } -# } +# mutation AtomicNumberOperations { +# updateOneMainUser( +# data: { accountBalance: { increment: 100 } } +# where: { email: "test1@test.test" } # ) { -# ...PostData -# author { -# ...MainUserData -# } +# ...MainUserData # } # } -# # incompatible with useUncheckedScalarInputs -# mutation UncheckedInputsExample { -# createPost( -# data: { -# title: "Test" -# subtitle: "Test test" -# metadata: {} -# published: true -# authorId: 1 -# } -# ) { -# ...PostData -# author { -# ...MainUserData -# } -# } -# } - -mutation AtomicNumberOperations { - updateOneMainUser( - data: { accountBalance: { increment: 100 } } - where: { email: "test1@test.test" } - ) { - ...MainUserData - } -} - query ForbiddenCategories { categories { name @@ -303,11 +256,11 @@ mutation InsertNativeTypesFields { } } -mutation AddGrade { - updateOneMainUser(where: { id: 1 }, data: { grades: { push: 5 } }) { - ...MainUserData - } -} +# mutation AddGrade { +# updateOneMainUser(where: { id: 1 }, data: { grades: { push: 5 } }) { +# ...MainUserData +# } +# } query CountByRelations { findFirstMainUser { @@ -330,7 +283,7 @@ query OrderByRelation { } query OrderByAggregateGroup { - groupByPost(by: kind, orderBy: { kind: desc }) { + groupByPost(by: kind, orderBy: { kind: { sort: desc } }) { kind _count { kind diff --git a/package-lock.json b/package-lock.json index 4103ae463..4168a3c04 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,58 +9,58 @@ "version": "0.27.2", "license": "MIT", "dependencies": { - "@prisma/generator-helper": "^5.4.2", - "@prisma/internals": "^5.4.2", + "@prisma/generator-helper": "^5.18.0", + "@prisma/internals": "^5.18.0", "pluralize": "^8.0.0", - "semver": "^7.5.4", - "ts-morph": "^20.0.0", - "tslib": "^2.6.2" + "semver": "^7.6.3", + "ts-morph": "^23.0.0", + "tslib": "^2.6.3" }, "bin": { "typegraphql-prisma": "lib/generator.js" }, "devDependencies": { "@jest/types": "^29.6.3", - "@prisma/client": "^5.4.2", - "@types/graphql-fields": "^1.3.8", - "@types/jest": "^29.5.6", - "@types/node": "^20.8.7", - "@types/pg": "^8.10.6", - "@types/pluralize": "0.0.32", - "@types/semver": "^7.5.3", - "@types/validator": "^13.11.3", - "directory-tree": "^3.5.1", + "@prisma/client": "^5.18.0", + "@types/graphql-fields": "^1.3.9", + "@types/jest": "^29.5.12", + "@types/node": "^22.1.0", + "@types/pg": "^8.11.6", + "@types/pluralize": "0.0.33", + "@types/semver": "^7.5.8", + "@types/validator": "^13.12.0", + "directory-tree": "^3.5.2", "env-cmd": "^10.1.0", - "graphql": "^16.8.1", + "graphql": "^16.9.0", "graphql-fields": "^2.0.3", - "graphql-scalars": "^1.22.4", + "graphql-scalars": "^1.23.0", "husky": "^8.0.3", "jest": "^29.7.0", - "lint-staged": "^15.0.1", - "pg": "^8.11.3", - "prettier": "^3.0.3", + "lint-staged": "^15.2.8", + "pg": "^8.12.0", + "prettier": "^3.3.3", "prettier-2": "npm:prettier@^2", - "prisma": "^5.4.2", - "reflect-metadata": "^0.1.13", - "ts-jest": "~29.1.1", - "ts-node": "^10.9.1", + "prisma": "^5.18.0", + "reflect-metadata": "0.1.13", + "ts-jest": "~29.2.4", + "ts-node": "^10.9.2", "ts-toolbelt": "^9.6.0", - "tslib": "^2.6.2", - "type-graphql": "2.0.0-beta.3", - "typescript": "~5.2.2" + "tslib": "^2.6.3", + "type-graphql": "2.0.0-rc.2", + "typescript": "~5.5.4" }, "engines": { - "node": ">=12.4" + "node": ">=20.11.1" }, "peerDependencies": { - "@prisma/client": "^5.0.0", - "@types/graphql-fields": "^1.3.8", + "@prisma/client": "^5.18.0", + "@types/graphql-fields": "^1.3.9", "@types/node": "*", "graphql-fields": "^2.0.3", - "graphql-scalars": "^1.22.4", - "prisma": "^5.0.0", - "tslib": "^2.6.2", - "type-graphql": "^1.1.1 || >=1.2.0-rc || >=2.0.0-beta" + "graphql-scalars": "^1.23.0", + "prisma": "^5.18.0", + "tslib": "^2.6.3", + "type-graphql": "^1.1.1 || >=1.2.0-rc || >=2.0.0-beta || >=2.0.0-rc" } }, "node_modules/@ampproject/remapping": { @@ -76,22 +76,9 @@ "node": ">=6.0.0" } }, - "node_modules/@antfu/ni": { - "version": "0.21.8", - "resolved": "https://registry.npmjs.org/@antfu/ni/-/ni-0.21.8.tgz", - "integrity": "sha512-90X8pU2szlvw0AJo9EZMbYc2eQKkmO7mAdC4tD4r5co2Mm56MT37MIG8EyB7p4WRheuzGxuLDxJ63mF6+Zajiw==", - "bin": { - "na": "bin/na.mjs", - "nci": "bin/nci.mjs", - "ni": "bin/ni.mjs", - "nlx": "bin/nlx.mjs", - "nr": "bin/nr.mjs", - "nu": "bin/nu.mjs", - "nun": "bin/nun.mjs" - } - }, "node_modules/@babel/code-frame": { "version": "7.18.6", + "dev": true, "license": "MIT", "dependencies": { "@babel/highlight": "^7.18.6" @@ -335,6 +322,7 @@ }, "node_modules/@babel/helper-validator-identifier": { "version": "7.19.1", + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -365,6 +353,7 @@ }, "node_modules/@babel/highlight": { "version": "7.18.6", + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.18.6", @@ -377,6 +366,7 @@ }, "node_modules/@babel/highlight/node_modules/ansi-styles": { "version": "3.2.1", + "dev": true, "license": "MIT", "dependencies": { "color-convert": "^1.9.0" @@ -387,6 +377,7 @@ }, "node_modules/@babel/highlight/node_modules/chalk": { "version": "2.4.2", + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", @@ -399,6 +390,7 @@ }, "node_modules/@babel/highlight/node_modules/color-convert": { "version": "1.9.3", + "dev": true, "license": "MIT", "dependencies": { "color-name": "1.1.3" @@ -406,10 +398,12 @@ }, "node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", + "dev": true, "license": "MIT" }, "node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -417,6 +411,7 @@ }, "node_modules/@babel/highlight/node_modules/supports-color": { "version": "5.5.0", + "dev": true, "license": "MIT", "dependencies": { "has-flag": "^3.0.0" @@ -689,6 +684,34 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@graphql-yoga/subscription": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@graphql-yoga/subscription/-/subscription-5.0.1.tgz", + "integrity": "sha512-1wCB1DfAnaLzS+IdoOzELGGnx1ODEg9nzQXFh4u2j02vAnne6d+v4A7HIH9EqzVdPLoAaMKXCZUUdKs+j3z1fg==", + "dev": true, + "dependencies": { + "@graphql-yoga/typed-event-target": "^3.0.0", + "@repeaterjs/repeater": "^3.0.4", + "@whatwg-node/events": "^0.1.0", + "tslib": "^2.5.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@graphql-yoga/typed-event-target": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@graphql-yoga/typed-event-target/-/typed-event-target-3.0.0.tgz", + "integrity": "sha512-w+liuBySifrstuHbFrHoHAEyVnDFVib+073q8AeAJ/qqJfvFvAwUPLLtNohR/WDVRgSasfXtl3dcNuVJWN+rjg==", + "dev": true, + "dependencies": { + "@repeaterjs/repeater": "^3.0.4", + "tslib": "^2.5.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1137,23 +1160,12 @@ "node": ">= 8" } }, - "node_modules/@opentelemetry/api": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.6.0.tgz", - "integrity": "sha512-OWlrQAnWn9577PhVgqjUvMr1pg57Bc4jv0iL4w0PRuOSRvq67rvHW9Ie/dZVMvCzhSCB+UxhcY/PmCmFj33Q+g==", - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/@prisma/client": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.4.2.tgz", - "integrity": "sha512-2xsPaz4EaMKj1WS9iW6MlPhmbqtBsXAOeVttSePp8vTFTtvzh2hZbDgswwBdSCgPzmmwF+tLB259QzggvCmJqA==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.18.0.tgz", + "integrity": "sha512-BWivkLh+af1kqC89zCJYkHsRcyWsM8/JHpsDMM76DjP3ZdEquJhXa4IeX+HkWPnwJ5FanxEJFZZDTWiDs/Kvyw==", "dev": true, "hasInstallScript": true, - "dependencies": { - "@prisma/engines-version": "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574" - }, "engines": { "node": ">=16.13" }, @@ -1167,189 +1179,92 @@ } }, "node_modules/@prisma/debug": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.4.2.tgz", - "integrity": "sha512-YRRi7beaX/sAQs0WQ/Y0LndfWynyodJKO0qF0Vj/KQ8aynmllpL7Hahdm4MVEy6eDPeoX7FWu/otkHRGKWmKSQ==", - "dependencies": { - "@types/debug": "4.1.9", - "debug": "4.3.4", - "strip-ansi": "6.0.1" - } + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.18.0.tgz", + "integrity": "sha512-f+ZvpTLidSo3LMJxQPVgAxdAjzv5OpzAo/eF8qZqbwvgi2F5cTOI9XCpdRzJYA0iGfajjwjOKKrVq64vkxEfUw==" }, "node_modules/@prisma/engines": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.4.2.tgz", - "integrity": "sha512-fqeucJ3LH0e1eyFdT0zRx+oETLancu5+n4lhiYECyEz6H2RDskPJHJYHkVc0LhkU4Uv7fuEnppKU3nVKNzMh8g==", - "hasInstallScript": true + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.18.0.tgz", + "integrity": "sha512-ofmpGLeJ2q2P0wa/XaEgTnX/IsLnvSp/gZts0zjgLNdBhfuj2lowOOPmDcfKljLQUXMvAek3lw5T01kHmCG8rg==", + "hasInstallScript": true, + "dependencies": { + "@prisma/debug": "5.18.0", + "@prisma/engines-version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "@prisma/fetch-engine": "5.18.0", + "@prisma/get-platform": "5.18.0" + } }, "node_modules/@prisma/engines-version": { - "version": "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574.tgz", - "integrity": "sha512-wvupDL4AA1vf4TQNANg7kR7y98ITqPsk6aacfBxZKtrJKRIsWjURHkZCGcQliHdqCiW/hGreO6d6ZuSv9MhdAA==", - "dev": true + "version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169.tgz", + "integrity": "sha512-a/+LpJj8vYU3nmtkg+N3X51ddbt35yYrRe8wqHTJtYQt7l1f8kjIBcCs6sHJvodW/EK5XGvboOiwm47fmNrbgg==" }, "node_modules/@prisma/fetch-engine": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.4.2.tgz", - "integrity": "sha512-Sox6sUb/CIcX5ZRLof53gFLv/muhOVQFAGQjPlnsSFhEu2d06uLZIWeOth4d7++qWgYxL5MJrFj+/uKaZdbpBw==", - "dependencies": { - "@prisma/debug": "5.4.2", - "@prisma/get-platform": "5.4.2", - "execa": "5.1.1", - "find-cache-dir": "3.3.2", - "fs-extra": "11.1.1", - "hasha": "5.2.2", - "http-proxy-agent": "7.0.0", - "https-proxy-agent": "7.0.2", - "kleur": "4.1.5", - "node-fetch": "2.7.0", - "p-filter": "2.1.0", - "p-map": "4.0.0", - "p-retry": "4.6.2", - "progress": "2.0.3", - "rimraf": "3.0.2", - "temp-dir": "2.0.0", - "tempy": "1.0.1" - } - }, - "node_modules/@prisma/fetch-engine/node_modules/kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", - "engines": { - "node": ">=6" + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.18.0.tgz", + "integrity": "sha512-I/3u0x2n31rGaAuBRx2YK4eB7R/1zCuayo2DGwSpGyrJWsZesrV7QVw7ND0/Suxeo/vLkJ5OwuBqHoCxvTHpOg==", + "dependencies": { + "@prisma/debug": "5.18.0", + "@prisma/engines-version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "@prisma/get-platform": "5.18.0" } }, "node_modules/@prisma/generator-helper": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/generator-helper/-/generator-helper-5.4.2.tgz", - "integrity": "sha512-UC2W3ZUs87jbdEOCmsQfCyGeuLA0oosAKgS+0vTCoZWnKUPGvMNxMqNPL08rpXTc1vwUFvl09R76ZVC3Zm7PHw==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/generator-helper/-/generator-helper-5.18.0.tgz", + "integrity": "sha512-3ffmrd9KE8ssg/fwyvfwMxrDAunLF8DLFjfwYnDRE7VaNIhkUVZwB77jAwpMCtukvCsAp14WGWu4itvLMzH3GQ==", "dependencies": { - "@prisma/debug": "5.4.2", - "@types/cross-spawn": "6.0.3", - "cross-spawn": "7.0.3", - "kleur": "4.1.5" - } - }, - "node_modules/@prisma/generator-helper/node_modules/kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", - "engines": { - "node": ">=6" + "@prisma/debug": "5.18.0" } }, "node_modules/@prisma/get-platform": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.4.2.tgz", - "integrity": "sha512-W3WCcNpZMD1Fjq3uXUDhs59eRLN953ymdsjBkfV0aL6MiW59md7pNfAuYp827n6u/3US9tQkr2xC3C8nMqLHrw==", - "dependencies": { - "@prisma/debug": "5.4.2", - "escape-string-regexp": "4.0.0", - "execa": "5.1.1", - "fs-jetpack": "5.1.0", - "kleur": "4.1.5", - "replace-string": "3.1.0", - "strip-ansi": "6.0.1", - "tempy": "1.0.1", - "terminal-link": "2.1.1", - "ts-pattern": "4.3.0" - } - }, - "node_modules/@prisma/get-platform/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@prisma/get-platform/node_modules/kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", - "engines": { - "node": ">=6" + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.18.0.tgz", + "integrity": "sha512-Tk+m7+uhqcKDgnMnFN0lRiH7Ewea0OEsZZs9pqXa7i3+7svS3FSCqDBCaM9x5fmhhkufiG0BtunJVDka+46DlA==", + "dependencies": { + "@prisma/debug": "5.18.0" } }, "node_modules/@prisma/internals": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/internals/-/internals-5.4.2.tgz", - "integrity": "sha512-CJSr7+UTYn2xMpiPdzCfRc0HycMh5NxEsipPOUG3TqXo2Bo6al2gzARLfCxJvRvbo/P4UheQo9QxTEnHROEP2w==", - "dependencies": { - "@antfu/ni": "0.21.8", - "@opentelemetry/api": "1.6.0", - "@prisma/debug": "5.4.2", - "@prisma/engines": "5.4.2", - "@prisma/fetch-engine": "5.4.2", - "@prisma/generator-helper": "5.4.2", - "@prisma/get-platform": "5.4.2", - "@prisma/prisma-schema-wasm": "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574", - "archiver": "5.3.2", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/internals/-/internals-5.18.0.tgz", + "integrity": "sha512-NYG69q0FxpPHXDtEM2GS5kU22IwgtriCceNH00dWP9dV7oHz23+8QWJMlDsICTR7gnULLCeS2gWBuXWTS1PRmA==", + "dependencies": { + "@prisma/debug": "5.18.0", + "@prisma/engines": "5.18.0", + "@prisma/fetch-engine": "5.18.0", + "@prisma/generator-helper": "5.18.0", + "@prisma/get-platform": "5.18.0", + "@prisma/prisma-schema-wasm": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "@prisma/schema-files-loader": "5.18.0", "arg": "5.0.2", - "checkpoint-client": "1.1.27", - "cli-truncate": "2.1.0", - "dotenv": "16.0.3", - "escape-string-regexp": "4.0.0", - "execa": "5.1.1", - "find-up": "5.0.0", - "fp-ts": "2.16.1", - "fs-extra": "11.1.1", - "fs-jetpack": "5.1.0", - "global-dirs": "3.0.1", - "globby": "11.1.0", - "indent-string": "4.0.0", - "is-windows": "1.0.2", - "is-wsl": "2.2.0", - "kleur": "4.1.5", - "new-github-issue-url": "0.2.1", - "node-fetch": "2.7.0", - "npm-packlist": "5.1.3", - "open": "7.4.2", - "p-map": "4.0.0", - "prompts": "2.4.2", - "read-pkg-up": "7.0.1", - "replace-string": "3.1.0", - "resolve": "1.22.4", - "string-width": "4.2.3", - "strip-ansi": "6.0.1", - "strip-indent": "3.0.0", - "temp-dir": "2.0.0", - "tempy": "1.0.1", - "terminal-link": "2.1.1", - "tmp": "0.2.1", - "ts-pattern": "4.3.0" + "prompts": "2.4.2" } }, "node_modules/@prisma/internals/node_modules/arg": { "version": "5.0.2", "license": "MIT" }, - "node_modules/@prisma/internals/node_modules/escape-string-regexp": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "node_modules/@prisma/prisma-schema-wasm": { + "version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "resolved": "https://registry.npmjs.org/@prisma/prisma-schema-wasm/-/prisma-schema-wasm-5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169.tgz", + "integrity": "sha512-2h7MDiYVXHVSdz0CylOUktVouPHRKUw5ciXz2r/oZsO2T6Zycez/eSvh4SKiKbHuxDq6SSb3R97mO7bjzh+NVQ==" }, - "node_modules/@prisma/internals/node_modules/kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", - "engines": { - "node": ">=6" + "node_modules/@prisma/schema-files-loader": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/schema-files-loader/-/schema-files-loader-5.18.0.tgz", + "integrity": "sha512-JtjPOZ8odMMr3etCcQ5kDsuljmckuNNCRMJglouPWSyzRbv4nOQJZCD4qPmoMUSoX0gwV7wGgwUw50XsoFYVzA==", + "dependencies": { + "@prisma/prisma-schema-wasm": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "fs-extra": "11.1.1" } }, - "node_modules/@prisma/prisma-schema-wasm": { - "version": "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574", - "resolved": "https://registry.npmjs.org/@prisma/prisma-schema-wasm/-/prisma-schema-wasm-5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574.tgz", - "integrity": "sha512-TDIMjDYx7Oh0OiA8kxldDBBJbycQW62RfmhYWI+HiAn4Ghy7GVHvxLQiksH78Vt4bkva562wPYV6zrhPYlTruA==" + "node_modules/@repeaterjs/repeater": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@repeaterjs/repeater/-/repeater-3.0.6.tgz", + "integrity": "sha512-Javneu5lsuhwNCryN+pXH93VPQ8g0dBX7wItHFgYiwQmzE1sVdg5tWHiOgHywzL2W21XQopa7IwIEnNbmeUJYA==", + "dev": true }, "node_modules/@sinclair/typebox": { "version": "0.27.8", @@ -1376,13 +1291,13 @@ } }, "node_modules/@ts-morph/common": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.21.0.tgz", - "integrity": "sha512-ES110Mmne5Vi4ypUKrtVQfXFDtCsDXiUiGxF6ILVlE90dDD4fdpC1LSjydl/ml7xJWKSDZwUYD2zkOePMSrPBA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.24.0.tgz", + "integrity": "sha512-c1xMmNHWpNselmpIqursHeOHHBTIsJLbB+NuovbTTRCNiTLEr/U9dbJ8qy0jd/O2x5pc3seWuOUN5R2IoOTp8A==", "dependencies": { - "fast-glob": "^3.2.12", - "minimatch": "^7.4.3", - "mkdirp": "^2.1.6", + "fast-glob": "^3.3.2", + "minimatch": "^9.0.4", + "mkdirp": "^3.0.1", "path-browserify": "^1.0.1" } }, @@ -1395,14 +1310,14 @@ } }, "node_modules/@ts-morph/common/node_modules/minimatch": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", - "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -1469,22 +1384,6 @@ "@babel/types": "^7.20.7" } }, - "node_modules/@types/cross-spawn": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@types/cross-spawn/-/cross-spawn-6.0.3.tgz", - "integrity": "sha512-BDAkU7WHHRHnvBf5z89lcvACsvkz/n7Tv+HyD/uW76O29HoH1Tk/W6iQrepaZVbisvlEek4ygwT8IW7ow9XLAA==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/debug": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.9.tgz", - "integrity": "sha512-8Hz50m2eoS56ldRlepxSBa6PWEVCtzUo/92HgLc2qTMnotJNIm7xP+UZhyWoYsyOdd5dxZ+NZLb24rsKyFs2ow==", - "dependencies": { - "@types/ms": "*" - } - }, "node_modules/@types/graceful-fs": { "version": "4.1.8", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.8.tgz", @@ -1495,9 +1394,9 @@ } }, "node_modules/@types/graphql-fields": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/@types/graphql-fields/-/graphql-fields-1.3.8.tgz", - "integrity": "sha512-XA3QT8f1THR3t77YT4EpFV/qF3GatLFODwUHvSmF0EjDmjxZY09yWrp9Gw6ju3zpJHGZUwN/p/HID7CaKwGHtw==", + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/@types/graphql-fields/-/graphql-fields-1.3.9.tgz", + "integrity": "sha512-HynTnp1HrE58uYcFcAK5UOfdrHSOIHDLCjvMU4yCmQLMj21uo7ZiZqnDGrD27pgCgHH5a1e8GYNK98Ndmma7ig==", "dev": true, "dependencies": { "graphql": "*" @@ -1525,36 +1424,28 @@ } }, "node_modules/@types/jest": { - "version": "29.5.6", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.6.tgz", - "integrity": "sha512-/t9NnzkOpXb4Nfvg17ieHE6EeSjDS2SGSpNYfoLbUAeL/EOueU/RSdOWFpfQTXBEM7BguYW1XQ0EbM+6RlIh6w==", + "version": "29.5.12", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", + "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", "dev": true, "dependencies": { "expect": "^29.0.0", "pretty-format": "^29.0.0" } }, - "node_modules/@types/ms": { - "version": "0.7.33", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.33.tgz", - "integrity": "sha512-AuHIyzR5Hea7ij0P9q7vx7xu4z0C28ucwjAZC0ja7JhINyCnOw8/DnvAPQQ9TfOlCtZAmCERKQX9+o1mgQhuOQ==" - }, "node_modules/@types/node": { - "version": "20.8.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.7.tgz", - "integrity": "sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", + "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", + "dev": true, "dependencies": { - "undici-types": "~5.25.1" + "undici-types": "~6.13.0" } }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.0", - "license": "MIT" - }, "node_modules/@types/pg": { - "version": "8.10.6", - "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.10.6.tgz", - "integrity": "sha512-L9VOuJzQJJAMjk+QZ3GA0gIdFxyWKMlw7rDh94LEibY0w7YmNNlM0wl9JUCsmr691YX6DYV18UfCmU1waYfxIw==", + "version": "8.11.6", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.11.6.tgz", + "integrity": "sha512-/2WmmBXHLsfRqzfHW7BNZ8SbYzE8OSk7i3WjFYvfgRHj7S1xj+16Je5fUKv3lVdVzk/zn9TXOqf+avFCFIE0yQ==", "dev": true, "dependencies": { "@types/node": "*", @@ -1620,20 +1511,15 @@ } }, "node_modules/@types/pluralize": { - "version": "0.0.32", - "resolved": "https://registry.npmjs.org/@types/pluralize/-/pluralize-0.0.32.tgz", - "integrity": "sha512-exDkoRIkWJlbRDRmtYDbI3ZUE28HwBwHe5VKn4mvpvMW7qIRDHO6URItErBsBSX7J8/PrDLSOHCcbUMFXwA6CA==", + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/pluralize/-/pluralize-0.0.33.tgz", + "integrity": "sha512-JOqsl+ZoCpP4e8TDke9W79FDcSgPAR0l6pixx2JHkhnRjvShyYiAYw2LVsnA7K08Y6DeOnaU6ujmENO4os/cYg==", "dev": true }, - "node_modules/@types/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==" - }, "node_modules/@types/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==", + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", "dev": true }, "node_modules/@types/stack-utils": { @@ -1643,9 +1529,9 @@ "dev": true }, "node_modules/@types/validator": { - "version": "13.11.3", - "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.11.3.tgz", - "integrity": "sha512-jxjhh33aTYDHnrV1vZ3AvWQHfrGx2f5UxKjaP13l5q04fG+/hCKKm0MfodIoCqxevhbcfBb6ZjynyHuQ/jueGQ==", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.12.0.tgz", + "integrity": "sha512-nH45Lk7oPIJ1RVOF6JgFI6Dy0QpHEzq4QecZhvguxYPDwT8c93prCMqAtiIttm39voZ+DDR+qkNnMpJmMBRqag==", "dev": true }, "node_modules/@types/yargs": { @@ -1661,6 +1547,18 @@ "dev": true, "license": "MIT" }, + "node_modules/@whatwg-node/events": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.2.tgz", + "integrity": "sha512-ApcWxkrs1WmEMS2CaLLFUEem/49erT3sxIVjpzU5f6zmVcnijtDSrhoK2zVobOIikZJdH63jdAXOrvjf6eOUNQ==", + "dev": true, + "dependencies": { + "tslib": "^2.6.3" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/acorn": { "version": "8.7.1", "dev": true, @@ -1680,32 +1578,11 @@ "node": ">=0.4.0" } }, - "node_modules/agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, "dependencies": { "type-fest": "^0.21.3" }, @@ -1720,6 +1597,7 @@ "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, "engines": { "node": ">=10" }, @@ -1729,6 +1607,7 @@ }, "node_modules/ansi-regex": { "version": "5.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -1736,6 +1615,7 @@ }, "node_modules/ansi-styles": { "version": "4.3.0", + "dev": true, "license": "MIT", "dependencies": { "color-convert": "^2.0.1" @@ -1760,57 +1640,6 @@ "node": ">= 8" } }, - "node_modules/archiver": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/archiver/-/archiver-5.3.2.tgz", - "integrity": "sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw==", - "dependencies": { - "archiver-utils": "^2.1.0", - "async": "^3.2.4", - "buffer-crc32": "^0.2.1", - "readable-stream": "^3.6.0", - "readdir-glob": "^1.1.2", - "tar-stream": "^2.2.0", - "zip-stream": "^4.1.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/archiver-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz", - "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", - "dependencies": { - "glob": "^7.1.4", - "graceful-fs": "^4.2.0", - "lazystream": "^1.0.0", - "lodash.defaults": "^4.2.0", - "lodash.difference": "^4.5.0", - "lodash.flatten": "^4.4.0", - "lodash.isplainobject": "^4.0.6", - "lodash.union": "^4.6.0", - "normalize-path": "^3.0.0", - "readable-stream": "^2.0.0" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/archiver-utils/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, "node_modules/arg": { "version": "4.1.3", "dev": true, @@ -1833,25 +1662,11 @@ "node": ">=6" } }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "engines": { - "node": ">=8" - } - }, - "node_modules/astral-regex": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/async": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==", + "dev": true }, "node_modules/babel-jest": { "version": "29.7.0", @@ -1948,37 +1763,9 @@ "version": "1.0.0", "license": "MIT" }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -1986,10 +1773,11 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "license": "MIT", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -2043,51 +1831,12 @@ "node-int64": "^0.4.0" } }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "engines": { - "node": "*" - } - }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, - "node_modules/buffer-writer": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2146,56 +1895,11 @@ "node": ">=10" } }, - "node_modules/checkpoint-client": { - "version": "1.1.27", - "resolved": "https://registry.npmjs.org/checkpoint-client/-/checkpoint-client-1.1.27.tgz", - "integrity": "sha512-xstymfUalJOv6ZvTtmkwP4ORJN36ikT4PvrIoLe3wstbYf87XIXCcZrSmbFQOjyB0v1qbBnCsAscDpfdZlCkFA==", - "dependencies": { - "ci-info": "3.8.0", - "env-paths": "2.2.1", - "make-dir": "4.0.0", - "ms": "2.1.3", - "node-fetch": "2.6.12", - "uuid": "9.0.0" - } - }, - "node_modules/checkpoint-client/node_modules/make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/checkpoint-client/node_modules/node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/ci-info": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "dev": true, "funding": [ { "type": "github", @@ -2225,59 +1929,104 @@ "validator": "^13.7.0" } }, - "node_modules/clean-stack": { - "version": "2.2.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/cli-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", - "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", "dev": true, "dependencies": { - "restore-cursor": "^4.0.0" + "restore-cursor": "^5.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cli-truncate": { - "version": "2.1.0", - "license": "MIT", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", + "dev": true, "dependencies": { - "slice-ansi": "^3.0.0", - "string-width": "^4.2.0" + "slice-ansi": "^5.0.0", + "string-width": "^7.0.0" }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "node_modules/cli-truncate/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "node_modules/cli-truncate/node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "node_modules/cli-truncate/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "dependencies": { @@ -2303,9 +2052,9 @@ } }, "node_modules/code-block-writer": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-12.0.0.tgz", - "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==" + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.2.tgz", + "integrity": "sha512-XfXzAGiStXSmCIwrkdfvc7FS5Dtj8yelCtyOf2p2skCAfvLd6zu0rGzuS9NSCO3bq1JKpFZ7tbKdKlcd5occQA==" }, "node_modules/collect-v8-coverage": { "version": "1.0.2", @@ -2315,6 +2064,7 @@ }, "node_modules/color-convert": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "color-name": "~1.1.4" @@ -2325,6 +2075,7 @@ }, "node_modules/color-name": { "version": "1.1.4", + "dev": true, "license": "MIT" }, "node_modules/colorette": { @@ -2434,35 +2185,17 @@ } }, "node_modules/commander": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", - "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", "dev": true, "engines": { - "node": ">=16" - } - }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==" - }, - "node_modules/compress-commons": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.2.tgz", - "integrity": "sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==", - "dependencies": { - "buffer-crc32": "^0.2.13", - "crc32-stream": "^4.0.2", - "normalize-path": "^3.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">= 10" + "node": ">=18" } }, "node_modules/concat-map": { "version": "0.0.1", + "dev": true, "license": "MIT" }, "node_modules/convert-source-map": { @@ -2471,34 +2204,6 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" - }, - "node_modules/crc-32": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", - "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", - "bin": { - "crc32": "bin/crc32.njs" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/crc32-stream": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.3.tgz", - "integrity": "sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw==", - "dependencies": { - "crc-32": "^1.2.0", - "readable-stream": "^3.4.0" - }, - "engines": { - "node": ">= 10" - } - }, "node_modules/create-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", @@ -2527,6 +2232,7 @@ }, "node_modules/cross-spawn": { "version": "7.0.3", + "dev": true, "license": "MIT", "dependencies": { "path-key": "^3.1.0", @@ -2537,17 +2243,11 @@ "node": ">= 8" } }, - "node_modules/crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", - "engines": { - "node": ">=8" - } - }, "node_modules/debug": { - "version": "4.3.4", - "license": "MIT", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -2562,6 +2262,7 @@ }, "node_modules/debug/node_modules/ms": { "version": "2.1.2", + "dev": true, "license": "MIT" }, "node_modules/dedent": { @@ -2595,27 +2296,6 @@ "node": ">=0.10.0" } }, - "node_modules/del": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", - "integrity": "sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==", - "dependencies": { - "globby": "^11.0.1", - "graceful-fs": "^4.2.4", - "is-glob": "^4.0.1", - "is-path-cwd": "^2.2.0", - "is-path-inside": "^3.0.2", - "p-map": "^4.0.0", - "rimraf": "^3.0.2", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -2642,21 +2322,10 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/directory-tree": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/directory-tree/-/directory-tree-3.5.1.tgz", - "integrity": "sha512-HqjZ49fDzUnKYUhHxVw9eKBqbQ+lL0v4kSBInlDlaktmLtGoV9tC54a6A0ZfYeIrkMHWTE6MwwmUXP477+UEKQ==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/directory-tree/-/directory-tree-3.5.2.tgz", + "integrity": "sha512-DsOqeZEHkZnZrVOJG3mE/J9M6J8PulImiC6I1ZpoprVlfno8GvLOPDMkxiJihklLK7B9aVudG463L1+S/kzjiw==", "dev": true, "dependencies": { "command-line-args": "^5.2.0", @@ -2669,19 +2338,21 @@ "node": ">=10.0" } }, - "node_modules/dotenv": { - "version": "16.0.3", - "license": "BSD-2-Clause", + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, "engines": { - "node": ">=12" + "node": ">=0.10.0" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, "node_modules/electron-to-chromium": { "version": "1.4.314", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.314.tgz", @@ -2702,16 +2373,9 @@ }, "node_modules/emoji-regex": { "version": "8.0.0", + "dev": true, "license": "MIT" }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dependencies": { - "once": "^1.4.0" - } - }, "node_modules/env-cmd": { "version": "10.1.0", "dev": true, @@ -2735,16 +2399,21 @@ "node": ">= 6" } }, - "node_modules/env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "node_modules/environment": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", + "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", + "dev": true, "engines": { - "node": ">=6" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/error-ex": { "version": "1.3.2", + "dev": true, "license": "MIT", "dependencies": { "is-arrayish": "^0.2.1" @@ -2761,6 +2430,7 @@ }, "node_modules/escape-string-regexp": { "version": "1.0.5", + "dev": true, "license": "MIT", "engines": { "node": ">=0.8.0" @@ -2787,6 +2457,7 @@ }, "node_modules/execa": { "version": "5.1.1", + "dev": true, "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", @@ -2832,9 +2503,9 @@ } }, "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -2852,9 +2523,9 @@ "license": "MIT" }, "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dependencies": { "reusify": "^1.0.4" } @@ -2868,30 +2539,45 @@ "bser": "2.1.1" } }, - "node_modules/fill-range": { - "version": "7.0.1", - "license": "MIT", + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, "dependencies": { - "to-regex-range": "^5.0.1" + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" + "to-regex-range": "^5.0.1" }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" } }, "node_modules/find-replace": { @@ -2905,30 +2591,6 @@ "node": ">=4.0.0" } }, - "node_modules/find-up": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/fp-ts": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-2.16.1.tgz", - "integrity": "sha512-by7U5W8dkIzcvDofUcO42yl9JbnHTEDBrzu3pt5fKT+Z4Oy85I21K80EYJYdjQGC2qum4Vo55Ag57iiIK4FYuA==" - }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" - }, "node_modules/fs-extra": { "version": "11.1.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", @@ -2942,35 +2604,9 @@ "node": ">=14.14" } }, - "node_modules/fs-jetpack": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/fs-jetpack/-/fs-jetpack-5.1.0.tgz", - "integrity": "sha512-Xn4fDhLydXkuzepZVsr02jakLlmoARPy+YWIclo4kh0GyNGUHnTqeH/w/qIsVn50dFxtp8otPL2t/HcPJBbxUA==", - "dependencies": { - "minimatch": "^5.1.0" - } - }, - "node_modules/fs-jetpack/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/fs-jetpack/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", + "dev": true, "license": "ISC" }, "node_modules/fsevents": { @@ -3005,6 +2641,18 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-east-asian-width": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", @@ -3016,6 +2664,7 @@ }, "node_modules/get-stream": { "version": "6.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -3028,6 +2677,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -3054,20 +2704,6 @@ "node": ">= 6" } }, - "node_modules/global-dirs": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", - "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", - "dependencies": { - "ini": "2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -3077,33 +2713,14 @@ "node": ">=4" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/graceful-fs": { "version": "4.2.9", "license": "ISC" }, "node_modules/graphql": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.8.1.tgz", - "integrity": "sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==", + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz", + "integrity": "sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==", "dev": true, "engines": { "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" @@ -3126,9 +2743,9 @@ } }, "node_modules/graphql-scalars": { - "version": "1.22.4", - "resolved": "https://registry.npmjs.org/graphql-scalars/-/graphql-scalars-1.22.4.tgz", - "integrity": "sha512-ILnv7jq5VKHLUyoaTFX7lgYrjCd6vTee9i8/B+D4zJKJT5TguOl0KkpPEbXHjmeor8AZYrVsrYUHdqRBMX1pjA==", + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/graphql-scalars/-/graphql-scalars-1.23.0.tgz", + "integrity": "sha512-YTRNcwitkn8CqYcleKOx9IvedA8JIERn8BRq21nlKgOr4NEcTaWEG0sT+H92eF3ALTFbPgsqfft4cw+MGgv0Gg==", "dev": true, "dependencies": { "tslib": "^2.5.0" @@ -3140,83 +2757,32 @@ "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" } }, - "node_modules/graphql-subscriptions": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "iterall": "^1.3.0" - }, - "peerDependencies": { - "graphql": "^15.7.2 || ^16.0.0" - } - }, "node_modules/has": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", + "dev": true, "engines": { "node": ">= 0.4.0" } }, "node_modules/has-flag": { "version": "4.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/hasha": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", - "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", - "dependencies": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/hosted-git-info": { - "version": "2.8.9", - "license": "ISC" - }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, - "node_modules/http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/human-signals": { "version": "2.1.0", + "dev": true, "license": "Apache-2.0", "engines": { "node": ">=10.17.0" @@ -3227,6 +2793,7 @@ "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", "dev": true, + "license": "MIT", "bin": { "husky": "lib/bin.js" }, @@ -3237,63 +2804,6 @@ "url": "https://github.com/sponsors/typicode" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "engines": { - "node": ">= 4" - } - }, - "node_modules/ignore-walk": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-5.0.1.tgz", - "integrity": "sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==", - "dependencies": { - "minimatch": "^5.0.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/ignore-walk/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/ignore-walk/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/import-local": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", @@ -3322,15 +2832,9 @@ "node": ">=0.8.19" } }, - "node_modules/indent-string": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/inflight": { "version": "1.0.6", + "dev": true, "license": "ISC", "dependencies": { "once": "^1.3.0", @@ -3339,24 +2843,19 @@ }, "node_modules/inherits": { "version": "2.0.4", + "dev": true, "license": "ISC" }, - "node_modules/ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", - "engines": { - "node": ">=10" - } - }, "node_modules/is-arrayish": { "version": "0.2.1", + "dev": true, "license": "MIT" }, "node_modules/is-core-module": { "version": "2.13.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "dev": true, "dependencies": { "has": "^1.0.3" }, @@ -3364,19 +2863,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-docker": { - "version": "2.2.1", - "license": "MIT", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -3387,6 +2873,7 @@ }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -3414,31 +2901,17 @@ }, "node_modules/is-number": { "version": "7.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "engines": { "node": ">=0.12.0" } }, - "node_modules/is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "engines": { - "node": ">=8" - } - }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, "engines": { "node": ">=8" }, @@ -3446,30 +2919,9 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-wsl": { - "version": "2.2.0", - "license": "MIT", - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" - }, "node_modules/isexe": { "version": "2.0.0", + "dev": true, "license": "ISC" }, "node_modules/istanbul-lib-coverage": { @@ -3562,10 +3014,23 @@ "node": ">=8" } }, - "node_modules/iterall": { - "version": "1.3.0", + "node_modules/jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", "dev": true, - "license": "MIT" + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } }, "node_modules/jest": { "version": "29.7.0", @@ -4124,6 +3589,7 @@ }, "node_modules/js-tokens": { "version": "4.0.0", + "dev": true, "license": "MIT" }, "node_modules/js-yaml": { @@ -4153,6 +3619,7 @@ }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", + "dev": true, "license": "MIT" }, "node_modules/json5": { @@ -4185,31 +3652,6 @@ "node": ">=6" } }, - "node_modules/lazystream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", - "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", - "dependencies": { - "readable-stream": "^2.0.5" - }, - "engines": { - "node": ">= 0.6.3" - } - }, - "node_modules/lazystream/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -4228,34 +3670,38 @@ "peer": true }, "node_modules/lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", + "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", "dev": true, "engines": { - "node": ">=10" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" } }, "node_modules/lines-and-columns": { "version": "1.1.6", + "dev": true, "license": "MIT" }, "node_modules/lint-staged": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.0.1.tgz", - "integrity": "sha512-2IU5OWmCaxch0X0+IBF4/v7sutpB+F3qoXbro43pYjQTOo5wumckjxoxn47pQBqqBsCWrD5HnI2uG/zJA7isew==", - "dev": true, - "dependencies": { - "chalk": "5.3.0", - "commander": "11.1.0", - "debug": "4.3.4", - "execa": "8.0.1", - "lilconfig": "2.1.0", - "listr2": "7.0.1", - "micromatch": "4.0.5", - "pidtree": "0.6.0", - "string-argv": "0.3.2", - "yaml": "2.3.2" + "version": "15.2.8", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.8.tgz", + "integrity": "sha512-PUWFf2zQzsd9EFU+kM1d7UP+AZDbKFKuj+9JNVTBkhUFhbg4MAt6WfyMMwBfM4lYqd4D2Jwac5iuTu9rVj4zCQ==", + "dev": true, + "dependencies": { + "chalk": "~5.3.0", + "commander": "~12.1.0", + "debug": "~4.3.6", + "execa": "~8.0.1", + "lilconfig": "~3.1.2", + "listr2": "~8.2.4", + "micromatch": "~4.0.7", + "pidtree": "~0.6.0", + "string-argv": "~0.3.2", + "yaml": "~2.5.0" }, "bin": { "lint-staged": "bin/lint-staged.js" @@ -4414,139 +3860,20 @@ } }, "node_modules/listr2": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-7.0.1.tgz", - "integrity": "sha512-nz+7hwgbDp8eWNoDgzdl4hA/xDSLrNRzPu1TLgOYs6l5Y+Ma6zVWWy9Oyt9TQFONwKoSPoka3H50D3vD5EuNwg==", + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.4.tgz", + "integrity": "sha512-opevsywziHd3zHCVQGAj8zu+Z3yHNkkoYhWIGnq54RrCVwLz0MozotJEDnKsIBLvkfLGN6BLOyAeRrYI0pKA4g==", "dev": true, "dependencies": { - "cli-truncate": "^3.1.0", + "cli-truncate": "^4.0.0", "colorette": "^2.0.20", "eventemitter3": "^5.0.1", - "log-update": "^5.0.1", - "rfdc": "^1.3.0", - "wrap-ansi": "^8.1.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/listr2/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/listr2/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/listr2/node_modules/cli-truncate": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", - "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", - "dev": true, - "dependencies": { - "slice-ansi": "^5.0.0", - "string-width": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/listr2/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "node_modules/listr2/node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/listr2/node_modules/slice-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/listr2/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/listr2/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" + "log-update": "^6.1.0", + "rfdc": "^1.4.1", + "wrap-ansi": "^9.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=18.0.0" } }, "node_modules/lodash.camelcase": { @@ -4554,70 +3881,45 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.defaults": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", - "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==" - }, - "node_modules/lodash.difference": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", - "integrity": "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==" - }, - "node_modules/lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==" - }, "node_modules/lodash.get": { "version": "4.4.2", "dev": true, "license": "MIT" }, - "node_modules/lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" - }, "node_modules/lodash.memoize": { "version": "4.1.2", "dev": true, "license": "MIT" }, - "node_modules/lodash.union": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", - "integrity": "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==" - }, "node_modules/log-update": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-5.0.1.tgz", - "integrity": "sha512-5UtUDQ/6edw4ofyljDNcOVJQ4c7OjDro4h3y8e1GQL5iYElYclVHJ3zeWchylvMaKnDbDilC8irOVyexnA/Slw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", + "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", "dev": true, "dependencies": { - "ansi-escapes": "^5.0.0", - "cli-cursor": "^4.0.0", - "slice-ansi": "^5.0.0", - "strip-ansi": "^7.0.1", - "wrap-ansi": "^8.0.1" + "ansi-escapes": "^7.0.0", + "cli-cursor": "^5.0.0", + "slice-ansi": "^7.1.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/log-update/node_modules/ansi-escapes": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-5.0.0.tgz", - "integrity": "sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz", + "integrity": "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==", "dev": true, "dependencies": { - "type-fest": "^1.0.2" + "environment": "^1.0.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -4648,28 +3950,31 @@ } }, "node_modules/log-update/node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", "dev": true, + "dependencies": { + "get-east-asian-width": "^1.0.0" + }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/log-update/node_modules/slice-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", "dev": true, "dependencies": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/chalk/slice-ansi?sponsor=1" @@ -4690,50 +3995,8 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/log-update/node_modules/type-fest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", - "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/make-dir": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/make-error": { - "version": "1.3.6", + "node_modules/make-error": { + "version": "1.3.6", "dev": true, "license": "ISC" }, @@ -4748,6 +4011,7 @@ }, "node_modules/merge-stream": { "version": "2.0.0", + "dev": true, "license": "MIT" }, "node_modules/merge2": { @@ -4759,10 +4023,11 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "license": "MIT", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -4771,22 +4036,29 @@ }, "node_modules/mimic-fn": { "version": "2.1.0", + "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, - "node_modules/min-indent": { - "version": "1.0.1", - "license": "MIT", + "node_modules/mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "dev": true, "engines": { - "node": ">=4" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -4795,9 +4067,9 @@ } }, "node_modules/mkdirp": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.6.tgz", - "integrity": "sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", "bin": { "mkdirp": "dist/cjs/src/bin.js" }, @@ -4808,44 +4080,12 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node_modules/new-github-issue-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/new-github-issue-url/-/new-github-issue-url-0.2.1.tgz", - "integrity": "sha512-md4cGoxuT4T4d/HDOXbrUHkTKrp/vp+m3aOA7XXVYwNsUNMK49g3SQicTSeV5GIz/5QVGAeYRAOlyp9OvlgsYA==", - "engines": { - "node": ">=10" - } - }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -4858,105 +4098,17 @@ "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", "dev": true }, - "node_modules/normalize-package-data": { - "version": "2.5.0", - "license": "BSD-2-Clause", - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.1", - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, "node_modules/normalize-path": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/npm-bundled": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-2.0.1.tgz", - "integrity": "sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==", - "dependencies": { - "npm-normalize-package-bin": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/npm-packlist": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.3.tgz", - "integrity": "sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==", - "dependencies": { - "glob": "^8.0.1", - "ignore-walk": "^5.0.1", - "npm-bundled": "^2.0.0", - "npm-normalize-package-bin": "^2.0.0" - }, - "bin": { - "npm-packlist": "bin/index.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/npm-packlist/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/npm-packlist/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/npm-packlist/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/npm-run-path": { "version": "4.0.1", + "dev": true, "license": "MIT", "dependencies": { "path-key": "^3.0.0" @@ -4973,6 +4125,7 @@ }, "node_modules/once": { "version": "1.4.0", + "dev": true, "license": "ISC", "dependencies": { "wrappy": "1" @@ -4980,6 +4133,7 @@ }, "node_modules/onetime": { "version": "5.1.2", + "dev": true, "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" @@ -4991,41 +4145,9 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/open": { - "version": "7.4.2", - "license": "MIT", - "dependencies": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-filter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", - "integrity": "sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==", - "dependencies": { - "p-map": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-filter/node_modules/p-map": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", - "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", - "engines": { - "node": ">=6" - } - }, "node_modules/p-limit": { "version": "3.1.0", + "dev": true, "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" @@ -5037,58 +4159,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-locate": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-map": { - "version": "4.0.0", - "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-retry": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", - "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", - "dependencies": { - "@types/retry": "0.12.0", - "retry": "^0.13.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/p-try": { "version": "2.2.0", + "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, - "node_modules/packet-reader": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/parse-json": { "version": "5.2.0", + "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.0.0", @@ -5110,6 +4191,7 @@ }, "node_modules/path-exists": { "version": "4.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -5117,6 +4199,7 @@ }, "node_modules/path-is-absolute": { "version": "1.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -5124,6 +4207,7 @@ }, "node_modules/path-key": { "version": "3.1.1", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -5131,27 +4215,18 @@ }, "node_modules/path-parse": { "version": "1.0.7", + "dev": true, "license": "MIT" }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "engines": { - "node": ">=8" - } - }, "node_modules/pg": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/pg/-/pg-8.11.3.tgz", - "integrity": "sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.12.0.tgz", + "integrity": "sha512-A+LHUSnwnxrnL/tZ+OLfqR1SxLN3c/pgDztZ47Rpbsd4jUytsTtwQo/TLPRzPJMp/1pbhYVhH9cuSZLAajNfjQ==", "dev": true, "dependencies": { - "buffer-writer": "2.0.0", - "packet-reader": "1.0.0", - "pg-connection-string": "^2.6.2", - "pg-pool": "^3.6.1", - "pg-protocol": "^1.6.0", + "pg-connection-string": "^2.6.4", + "pg-pool": "^3.6.2", + "pg-protocol": "^1.6.1", "pg-types": "^2.1.0", "pgpass": "1.x" }, @@ -5178,9 +4253,9 @@ "optional": true }, "node_modules/pg-connection-string": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.2.tgz", - "integrity": "sha512-ch6OwaeaPYcova4kKZ15sbJ2hKb/VP48ZD2gE7i1J+L4MspCtBMAx8nMgz7bksc7IojCIIWuEhHibSMFH8m8oA==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.4.tgz", + "integrity": "sha512-v+Z7W/0EO707aNMaAEfiGnGL9sxxumwLl2fJvCQtMn9Fxsg+lPpPkdcyBSv/KFgpGdYkMfn+EI1Or2EHjpgLCA==", "dev": true }, "node_modules/pg-int8": { @@ -5201,18 +4276,18 @@ } }, "node_modules/pg-pool": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.1.tgz", - "integrity": "sha512-jizsIzhkIitxCGfPRzJn1ZdcosIt3pz9Sh3V01fm1vZnbnCMgmGl5wvGGdNN2EL9Rmb0EcFoCkixH4Pu+sP9Og==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.2.tgz", + "integrity": "sha512-Htjbg8BlwXqSBQ9V8Vjtc+vzf/6fVUuak/3/XXKA9oxZprwW3IMDQTGHP+KDmVL7rtd+R1QjbnCFPuTHm3G4hg==", "dev": true, "peerDependencies": { "pg": ">=8.0" } }, "node_modules/pg-protocol": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.0.tgz", - "integrity": "sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.1.tgz", + "integrity": "sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg==", "dev": true }, "node_modules/pg-types": { @@ -5278,6 +4353,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, "dependencies": { "find-up": "^4.0.0" }, @@ -5289,6 +4365,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -5301,6 +4378,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, "dependencies": { "p-locate": "^4.1.0" }, @@ -5312,6 +4390,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, "dependencies": { "p-try": "^2.0.0" }, @@ -5326,6 +4405,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, "dependencies": { "p-limit": "^2.2.0" }, @@ -5382,9 +4462,9 @@ "dev": true }, "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -5439,13 +4519,13 @@ } }, "node_modules/prisma": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.4.2.tgz", - "integrity": "sha512-GDMZwZy7mysB2oXU+angQqJ90iaPFdD0rHaZNkn+dio5NRkGLmMqmXs31//tg/qXT3iB0cTQwnGGQNuirhSTZg==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.18.0.tgz", + "integrity": "sha512-+TrSIxZsh64OPOmaSgVPH7ALL9dfU0jceYaMJXsNrTkFHO7/3RANi5K2ZiPB1De9+KDxCWn7jvRq8y8pvk+o9g==", "dev": true, "hasInstallScript": true, "dependencies": { - "@prisma/engines": "5.4.2" + "@prisma/engines": "5.18.0" }, "bin": { "prisma": "build/index.js" @@ -5454,19 +4534,6 @@ "node": ">=16.13" } }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/prompts": { "version": "2.4.2", "license": "MIT", @@ -5519,87 +4586,9 @@ "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, - "node_modules/read-pkg": { - "version": "5.2.0", - "license": "MIT", - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg-up": { - "version": "7.0.1", - "license": "MIT", - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/find-up": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg-up/node_modules/locate-path": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg-up/node_modules/p-limit": { - "version": "2.3.0", - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/p-locate": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, "node_modules/readable-stream": { "version": "3.6.0", + "dev": true, "license": "MIT", "dependencies": { "inherits": "^2.0.3", @@ -5610,33 +4599,6 @@ "node": ">= 6" } }, - "node_modules/readdir-glob": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz", - "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", - "dependencies": { - "minimatch": "^5.1.0" - } - }, - "node_modules/readdir-glob/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/readdir-glob/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/reduce-flatten": { "version": "2.0.0", "dev": true, @@ -5650,17 +4612,6 @@ "dev": true, "license": "Apache-2.0" }, - "node_modules/replace-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/replace-string/-/replace-string-3.1.0.tgz", - "integrity": "sha512-yPpxc4ZR2makceA9hy/jHNqc7QVkd4Je/N0WRHm6bs3PtivPuPynxE5ejU/mp5EhnCv8+uZL7vhz8rkluSlx+Q==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -5674,6 +4625,7 @@ "version": "1.22.4", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", + "dev": true, "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", @@ -5717,27 +4669,46 @@ } }, "node_modules/restore-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", - "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", "dev": true, "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/retry": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", - "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "node_modules/restore-cursor/node_modules/onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "dev": true, + "dependencies": { + "mimic-function": "^5.0.0" + }, "engines": { - "node": ">= 4" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/reusify": { @@ -5750,24 +4721,11 @@ } }, "node_modules/rfdc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", - "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", "dev": true }, - "node_modules/rimraf": { - "version": "3.0.2", - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -5792,15 +4750,13 @@ }, "node_modules/safe-buffer": { "version": "5.1.2", + "dev": true, "license": "MIT" }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "bin": { "semver": "bin/semver.js" }, @@ -5810,6 +4766,7 @@ }, "node_modules/shebang-command": { "version": "2.0.0", + "dev": true, "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" @@ -5820,6 +4777,7 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -5827,6 +4785,7 @@ }, "node_modules/signal-exit": { "version": "3.0.7", + "dev": true, "license": "ISC" }, "node_modules/sisteransi": { @@ -5835,21 +4794,50 @@ }, "node_modules/slash": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/slice-ansi": { - "version": "3.0.0", - "license": "MIT", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "dev": true, "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/source-map": { @@ -5871,30 +4859,6 @@ "source-map": "^0.6.0" } }, - "node_modules/spdx-correct": { - "version": "3.1.1", - "license": "Apache-2.0", - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "license": "CC-BY-3.0" - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "license": "MIT", - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.7", - "license": "CC0-1.0" - }, "node_modules/split2": { "version": "3.2.2", "dev": true, @@ -5932,6 +4896,7 @@ }, "node_modules/string_decoder": { "version": "1.1.1", + "dev": true, "license": "MIT", "dependencies": { "safe-buffer": "~5.1.0" @@ -5961,6 +4926,7 @@ }, "node_modules/string-width": { "version": "4.2.3", + "dev": true, "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", @@ -5973,6 +4939,7 @@ }, "node_modules/strip-ansi": { "version": "6.0.1", + "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" @@ -5992,21 +4959,12 @@ }, "node_modules/strip-final-newline": { "version": "2.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, - "node_modules/strip-indent": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "min-indent": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -6021,6 +4979,7 @@ }, "node_modules/supports-color": { "version": "7.2.0", + "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" @@ -6029,20 +4988,9 @@ "node": ">=8" } }, - "node_modules/supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -6081,73 +5029,6 @@ "node": ">=8" } }, - "node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/temp-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", - "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/tempy": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tempy/-/tempy-1.0.1.tgz", - "integrity": "sha512-biM9brNqxSc04Ee71hzFbryD11nX7VPhQQY32AdDmjFvodsRFz/3ufeoTZ6uYkRFfGo188tENcASNs3vTdsM0w==", - "dependencies": { - "del": "^6.0.0", - "is-stream": "^2.0.0", - "temp-dir": "^2.0.0", - "type-fest": "^0.16.0", - "unique-string": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/tempy/node_modules/type-fest": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.16.0.tgz", - "integrity": "sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -6162,16 +5043,6 @@ "node": ">=8" } }, - "node_modules/tmp": { - "version": "0.2.1", - "license": "MIT", - "dependencies": { - "rimraf": "^3.0.0" - }, - "engines": { - "node": ">=8.17.0" - } - }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -6189,7 +5060,8 @@ }, "node_modules/to-regex-range": { "version": "5.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dependencies": { "is-number": "^7.0.0" }, @@ -6197,18 +5069,14 @@ "node": ">=8.0" } }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, "node_modules/ts-jest": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.1.tgz", - "integrity": "sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==", + "version": "29.2.4", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.4.tgz", + "integrity": "sha512-3d6tgDyhCI29HlpwIq87sNuI+3Q6GLTTCeYRHCs7vDz+/3GCMwEtV9jezLyl4ZtnBgx00I7hm8PCP8cTksMGrw==", "dev": true, "dependencies": { "bs-logger": "0.x", + "ejs": "^3.1.10", "fast-json-stable-stringify": "2.x", "jest-util": "^29.0.0", "json5": "^2.2.3", @@ -6221,10 +5089,11 @@ "ts-jest": "cli.js" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" }, "peerDependencies": { "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0", "@jest/types": "^29.0.0", "babel-jest": "^29.0.0", "jest": "^29.0.0", @@ -6234,6 +5103,9 @@ "@babel/core": { "optional": true }, + "@jest/transform": { + "optional": true + }, "@jest/types": { "optional": true }, @@ -6246,18 +5118,19 @@ } }, "node_modules/ts-morph": { - "version": "20.0.0", - "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-20.0.0.tgz", - "integrity": "sha512-JVmEJy2Wow5n/84I3igthL9sudQ8qzjh/6i4tmYCm6IqYyKFlNbJZi7oBdjyqcWSWYRu3CtL0xbT6fS03ESZIg==", + "version": "23.0.0", + "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-23.0.0.tgz", + "integrity": "sha512-FcvFx7a9E8TUe6T3ShihXJLiJOiqyafzFKUO4aqIHDUCIvADdGNShcbc2W5PMr3LerXRv7mafvFZ9lRENxJmug==", "dependencies": { - "@ts-morph/common": "~0.21.0", - "code-block-writer": "^12.0.0" + "@ts-morph/common": "~0.24.0", + "code-block-writer": "^13.0.1" } }, "node_modules/ts-node": { - "version": "10.9.1", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, - "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -6296,11 +5169,6 @@ } } }, - "node_modules/ts-pattern": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-4.3.0.tgz", - "integrity": "sha512-pefrkcd4lmIVR0LA49Imjf9DYLK8vtWhqBPA3Ya1ir8xCW0O2yjL9dsCVvI7pCodLC5q7smNpEtDR2yVulQxOg==" - }, "node_modules/ts-toolbelt": { "version": "9.6.0", "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz", @@ -6308,9 +5176,9 @@ "dev": true }, "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", "dev": true }, "node_modules/type-detect": { @@ -6322,17 +5190,10 @@ "node": ">=4" } }, - "node_modules/type-fest": { - "version": "0.8.1", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, "node_modules/type-graphql": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/type-graphql/-/type-graphql-2.0.0-beta.3.tgz", - "integrity": "sha512-5HEiQaWHPYhPmbJuMmT+IZgjsnbNWsW37osUISwgr5EpcHZ4krLl8eBoOfjFya4mxAWYshlpSO1ahaucJQqM5g==", + "version": "2.0.0-rc.2", + "resolved": "https://registry.npmjs.org/type-graphql/-/type-graphql-2.0.0-rc.2.tgz", + "integrity": "sha512-DJ8erG1cmjteMrOhFIkBHOqRM+L+wCJxvNjbbj1Y+q2r4HZkB1qOSS4ZD4AaoAfRPAp1yU23gMtmzf0jen/FFA==", "dev": true, "funding": [ { @@ -6345,20 +5206,20 @@ } ], "dependencies": { + "@graphql-yoga/subscription": "^5.0.0", "@types/node": "*", - "@types/semver": "^7.5.0", + "@types/semver": "^7.5.6", "graphql-query-complexity": "^0.12.0", - "graphql-subscriptions": "^2.0.0", "semver": "^7.5.4", - "tslib": "^2.6.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">= 16.16.0" + "node": ">= 18.12.0" }, "peerDependencies": { "class-validator": ">=0.14.0", - "graphql": "^16.7.1", - "graphql-scalars": "^1.22.2" + "graphql": "^16.8.1", + "graphql-scalars": "^1.23.0" }, "peerDependenciesMeta": { "class-validator": { @@ -6367,9 +5228,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -6388,25 +5249,15 @@ } }, "node_modules/undici-types": { - "version": "5.25.3", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", - "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==" - }, - "node_modules/unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "dependencies": { - "crypto-random-string": "^2.0.0" - }, - "engines": { - "node": ">=8" - } + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==", + "dev": true }, "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "engines": { "node": ">= 10.0.0" } @@ -6439,16 +5290,9 @@ }, "node_modules/util-deprecate": { "version": "1.0.2", + "dev": true, "license": "MIT" }, - "node_modules/uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "dev": true, @@ -6468,14 +5312,6 @@ "node": ">=10.12.0" } }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "license": "Apache-2.0", - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, "node_modules/validator": { "version": "13.7.0", "dev": true, @@ -6495,22 +5331,9 @@ "makeerror": "1.0.12" } }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/which": { "version": "2.0.2", + "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" @@ -6543,17 +5366,17 @@ } }, "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", "dev": true, "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" @@ -6584,23 +5407,23 @@ } }, "node_modules/wrap-ansi/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", "dev": true }, "node_modules/wrap-ansi/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "dev": true, "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -6623,6 +5446,7 @@ }, "node_modules/wrappy": { "version": "1.0.2", + "dev": true, "license": "ISC" }, "node_modules/write-file-atomic": { @@ -6655,15 +5479,14 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, "node_modules/yaml": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.2.tgz", - "integrity": "sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.0.tgz", + "integrity": "sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==", "dev": true, + "bin": { + "yaml": "bin.mjs" + }, "engines": { "node": ">= 14" } @@ -6705,6 +5528,7 @@ }, "node_modules/yocto-queue": { "version": "0.1.0", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -6712,39 +5536,6 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } - }, - "node_modules/zip-stream": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.1.tgz", - "integrity": "sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==", - "dependencies": { - "archiver-utils": "^3.0.4", - "compress-commons": "^4.1.2", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/zip-stream/node_modules/archiver-utils": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-3.0.4.tgz", - "integrity": "sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw==", - "dependencies": { - "glob": "^7.2.3", - "graceful-fs": "^4.2.0", - "lazystream": "^1.0.0", - "lodash.defaults": "^4.2.0", - "lodash.difference": "^4.5.0", - "lodash.flatten": "^4.4.0", - "lodash.isplainobject": "^4.0.6", - "lodash.union": "^4.6.0", - "normalize-path": "^3.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">= 10" - } } }, "dependencies": { @@ -6758,13 +5549,9 @@ "@jridgewell/trace-mapping": "^0.3.9" } }, - "@antfu/ni": { - "version": "0.21.8", - "resolved": "https://registry.npmjs.org/@antfu/ni/-/ni-0.21.8.tgz", - "integrity": "sha512-90X8pU2szlvw0AJo9EZMbYc2eQKkmO7mAdC4tD4r5co2Mm56MT37MIG8EyB7p4WRheuzGxuLDxJ63mF6+Zajiw==" - }, "@babel/code-frame": { "version": "7.18.6", + "dev": true, "requires": { "@babel/highlight": "^7.18.6" } @@ -6954,7 +5741,8 @@ "dev": true }, "@babel/helper-validator-identifier": { - "version": "7.19.1" + "version": "7.19.1", + "dev": true }, "@babel/helper-validator-option": { "version": "7.21.0", @@ -6975,6 +5763,7 @@ }, "@babel/highlight": { "version": "7.18.6", + "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.18.6", "chalk": "^2.0.0", @@ -6983,12 +5772,14 @@ "dependencies": { "ansi-styles": { "version": "3.2.1", + "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { "version": "2.4.2", + "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -6997,18 +5788,22 @@ }, "color-convert": { "version": "1.9.3", + "dev": true, "requires": { "color-name": "1.1.3" } }, "color-name": { - "version": "1.1.3" + "version": "1.1.3", + "dev": true }, "has-flag": { - "version": "3.0.0" + "version": "3.0.0", + "dev": true }, "supports-color": { "version": "5.5.0", + "dev": true, "requires": { "has-flag": "^3.0.0" } @@ -7210,6 +6005,28 @@ } } }, + "@graphql-yoga/subscription": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@graphql-yoga/subscription/-/subscription-5.0.1.tgz", + "integrity": "sha512-1wCB1DfAnaLzS+IdoOzELGGnx1ODEg9nzQXFh4u2j02vAnne6d+v4A7HIH9EqzVdPLoAaMKXCZUUdKs+j3z1fg==", + "dev": true, + "requires": { + "@graphql-yoga/typed-event-target": "^3.0.0", + "@repeaterjs/repeater": "^3.0.4", + "@whatwg-node/events": "^0.1.0", + "tslib": "^2.5.2" + } + }, + "@graphql-yoga/typed-event-target": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@graphql-yoga/typed-event-target/-/typed-event-target-3.0.0.tgz", + "integrity": "sha512-w+liuBySifrstuHbFrHoHAEyVnDFVib+073q8AeAJ/qqJfvFvAwUPLLtNohR/WDVRgSasfXtl3dcNuVJWN+rjg==", + "dev": true, + "requires": { + "@repeaterjs/repeater": "^3.0.4", + "tslib": "^2.5.2" + } + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -7560,185 +6377,100 @@ "fastq": "^1.6.0" } }, - "@opentelemetry/api": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.6.0.tgz", - "integrity": "sha512-OWlrQAnWn9577PhVgqjUvMr1pg57Bc4jv0iL4w0PRuOSRvq67rvHW9Ie/dZVMvCzhSCB+UxhcY/PmCmFj33Q+g==" - }, "@prisma/client": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.4.2.tgz", - "integrity": "sha512-2xsPaz4EaMKj1WS9iW6MlPhmbqtBsXAOeVttSePp8vTFTtvzh2hZbDgswwBdSCgPzmmwF+tLB259QzggvCmJqA==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.18.0.tgz", + "integrity": "sha512-BWivkLh+af1kqC89zCJYkHsRcyWsM8/JHpsDMM76DjP3ZdEquJhXa4IeX+HkWPnwJ5FanxEJFZZDTWiDs/Kvyw==", "dev": true, - "requires": { - "@prisma/engines-version": "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574" - } + "requires": {} }, "@prisma/debug": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.4.2.tgz", - "integrity": "sha512-YRRi7beaX/sAQs0WQ/Y0LndfWynyodJKO0qF0Vj/KQ8aynmllpL7Hahdm4MVEy6eDPeoX7FWu/otkHRGKWmKSQ==", - "requires": { - "@types/debug": "4.1.9", - "debug": "4.3.4", - "strip-ansi": "6.0.1" - } + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.18.0.tgz", + "integrity": "sha512-f+ZvpTLidSo3LMJxQPVgAxdAjzv5OpzAo/eF8qZqbwvgi2F5cTOI9XCpdRzJYA0iGfajjwjOKKrVq64vkxEfUw==" }, "@prisma/engines": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.4.2.tgz", - "integrity": "sha512-fqeucJ3LH0e1eyFdT0zRx+oETLancu5+n4lhiYECyEz6H2RDskPJHJYHkVc0LhkU4Uv7fuEnppKU3nVKNzMh8g==" + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.18.0.tgz", + "integrity": "sha512-ofmpGLeJ2q2P0wa/XaEgTnX/IsLnvSp/gZts0zjgLNdBhfuj2lowOOPmDcfKljLQUXMvAek3lw5T01kHmCG8rg==", + "requires": { + "@prisma/debug": "5.18.0", + "@prisma/engines-version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "@prisma/fetch-engine": "5.18.0", + "@prisma/get-platform": "5.18.0" + } }, "@prisma/engines-version": { - "version": "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574.tgz", - "integrity": "sha512-wvupDL4AA1vf4TQNANg7kR7y98ITqPsk6aacfBxZKtrJKRIsWjURHkZCGcQliHdqCiW/hGreO6d6ZuSv9MhdAA==", - "dev": true + "version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169.tgz", + "integrity": "sha512-a/+LpJj8vYU3nmtkg+N3X51ddbt35yYrRe8wqHTJtYQt7l1f8kjIBcCs6sHJvodW/EK5XGvboOiwm47fmNrbgg==" }, "@prisma/fetch-engine": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.4.2.tgz", - "integrity": "sha512-Sox6sUb/CIcX5ZRLof53gFLv/muhOVQFAGQjPlnsSFhEu2d06uLZIWeOth4d7++qWgYxL5MJrFj+/uKaZdbpBw==", - "requires": { - "@prisma/debug": "5.4.2", - "@prisma/get-platform": "5.4.2", - "execa": "5.1.1", - "find-cache-dir": "3.3.2", - "fs-extra": "11.1.1", - "hasha": "5.2.2", - "http-proxy-agent": "7.0.0", - "https-proxy-agent": "7.0.2", - "kleur": "4.1.5", - "node-fetch": "2.7.0", - "p-filter": "2.1.0", - "p-map": "4.0.0", - "p-retry": "4.6.2", - "progress": "2.0.3", - "rimraf": "3.0.2", - "temp-dir": "2.0.0", - "tempy": "1.0.1" - }, - "dependencies": { - "kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==" - } + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.18.0.tgz", + "integrity": "sha512-I/3u0x2n31rGaAuBRx2YK4eB7R/1zCuayo2DGwSpGyrJWsZesrV7QVw7ND0/Suxeo/vLkJ5OwuBqHoCxvTHpOg==", + "requires": { + "@prisma/debug": "5.18.0", + "@prisma/engines-version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "@prisma/get-platform": "5.18.0" } }, "@prisma/generator-helper": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/generator-helper/-/generator-helper-5.4.2.tgz", - "integrity": "sha512-UC2W3ZUs87jbdEOCmsQfCyGeuLA0oosAKgS+0vTCoZWnKUPGvMNxMqNPL08rpXTc1vwUFvl09R76ZVC3Zm7PHw==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/generator-helper/-/generator-helper-5.18.0.tgz", + "integrity": "sha512-3ffmrd9KE8ssg/fwyvfwMxrDAunLF8DLFjfwYnDRE7VaNIhkUVZwB77jAwpMCtukvCsAp14WGWu4itvLMzH3GQ==", "requires": { - "@prisma/debug": "5.4.2", - "@types/cross-spawn": "6.0.3", - "cross-spawn": "7.0.3", - "kleur": "4.1.5" - }, - "dependencies": { - "kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==" - } + "@prisma/debug": "5.18.0" } }, "@prisma/get-platform": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.4.2.tgz", - "integrity": "sha512-W3WCcNpZMD1Fjq3uXUDhs59eRLN953ymdsjBkfV0aL6MiW59md7pNfAuYp827n6u/3US9tQkr2xC3C8nMqLHrw==", - "requires": { - "@prisma/debug": "5.4.2", - "escape-string-regexp": "4.0.0", - "execa": "5.1.1", - "fs-jetpack": "5.1.0", - "kleur": "4.1.5", - "replace-string": "3.1.0", - "strip-ansi": "6.0.1", - "tempy": "1.0.1", - "terminal-link": "2.1.1", - "ts-pattern": "4.3.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" - }, - "kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==" - } + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.18.0.tgz", + "integrity": "sha512-Tk+m7+uhqcKDgnMnFN0lRiH7Ewea0OEsZZs9pqXa7i3+7svS3FSCqDBCaM9x5fmhhkufiG0BtunJVDka+46DlA==", + "requires": { + "@prisma/debug": "5.18.0" } }, "@prisma/internals": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@prisma/internals/-/internals-5.4.2.tgz", - "integrity": "sha512-CJSr7+UTYn2xMpiPdzCfRc0HycMh5NxEsipPOUG3TqXo2Bo6al2gzARLfCxJvRvbo/P4UheQo9QxTEnHROEP2w==", - "requires": { - "@antfu/ni": "0.21.8", - "@opentelemetry/api": "1.6.0", - "@prisma/debug": "5.4.2", - "@prisma/engines": "5.4.2", - "@prisma/fetch-engine": "5.4.2", - "@prisma/generator-helper": "5.4.2", - "@prisma/get-platform": "5.4.2", - "@prisma/prisma-schema-wasm": "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574", - "archiver": "5.3.2", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/internals/-/internals-5.18.0.tgz", + "integrity": "sha512-NYG69q0FxpPHXDtEM2GS5kU22IwgtriCceNH00dWP9dV7oHz23+8QWJMlDsICTR7gnULLCeS2gWBuXWTS1PRmA==", + "requires": { + "@prisma/debug": "5.18.0", + "@prisma/engines": "5.18.0", + "@prisma/fetch-engine": "5.18.0", + "@prisma/generator-helper": "5.18.0", + "@prisma/get-platform": "5.18.0", + "@prisma/prisma-schema-wasm": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "@prisma/schema-files-loader": "5.18.0", "arg": "5.0.2", - "checkpoint-client": "1.1.27", - "cli-truncate": "2.1.0", - "dotenv": "16.0.3", - "escape-string-regexp": "4.0.0", - "execa": "5.1.1", - "find-up": "5.0.0", - "fp-ts": "2.16.1", - "fs-extra": "11.1.1", - "fs-jetpack": "5.1.0", - "global-dirs": "3.0.1", - "globby": "11.1.0", - "indent-string": "4.0.0", - "is-windows": "1.0.2", - "is-wsl": "2.2.0", - "kleur": "4.1.5", - "new-github-issue-url": "0.2.1", - "node-fetch": "2.7.0", - "npm-packlist": "5.1.3", - "open": "7.4.2", - "p-map": "4.0.0", - "prompts": "2.4.2", - "read-pkg-up": "7.0.1", - "replace-string": "3.1.0", - "resolve": "1.22.4", - "string-width": "4.2.3", - "strip-ansi": "6.0.1", - "strip-indent": "3.0.0", - "temp-dir": "2.0.0", - "tempy": "1.0.1", - "terminal-link": "2.1.1", - "tmp": "0.2.1", - "ts-pattern": "4.3.0" + "prompts": "2.4.2" }, "dependencies": { "arg": { "version": "5.0.2" - }, - "escape-string-regexp": { - "version": "4.0.0" - }, - "kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==" } } }, "@prisma/prisma-schema-wasm": { - "version": "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574", - "resolved": "https://registry.npmjs.org/@prisma/prisma-schema-wasm/-/prisma-schema-wasm-5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574.tgz", - "integrity": "sha512-TDIMjDYx7Oh0OiA8kxldDBBJbycQW62RfmhYWI+HiAn4Ghy7GVHvxLQiksH78Vt4bkva562wPYV6zrhPYlTruA==" + "version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "resolved": "https://registry.npmjs.org/@prisma/prisma-schema-wasm/-/prisma-schema-wasm-5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169.tgz", + "integrity": "sha512-2h7MDiYVXHVSdz0CylOUktVouPHRKUw5ciXz2r/oZsO2T6Zycez/eSvh4SKiKbHuxDq6SSb3R97mO7bjzh+NVQ==" + }, + "@prisma/schema-files-loader": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@prisma/schema-files-loader/-/schema-files-loader-5.18.0.tgz", + "integrity": "sha512-JtjPOZ8odMMr3etCcQ5kDsuljmckuNNCRMJglouPWSyzRbv4nOQJZCD4qPmoMUSoX0gwV7wGgwUw50XsoFYVzA==", + "requires": { + "@prisma/prisma-schema-wasm": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169", + "fs-extra": "11.1.1" + } + }, + "@repeaterjs/repeater": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@repeaterjs/repeater/-/repeater-3.0.6.tgz", + "integrity": "sha512-Javneu5lsuhwNCryN+pXH93VPQ8g0dBX7wItHFgYiwQmzE1sVdg5tWHiOgHywzL2W21XQopa7IwIEnNbmeUJYA==", + "dev": true }, "@sinclair/typebox": { "version": "0.27.8", @@ -7765,13 +6497,13 @@ } }, "@ts-morph/common": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.21.0.tgz", - "integrity": "sha512-ES110Mmne5Vi4ypUKrtVQfXFDtCsDXiUiGxF6ILVlE90dDD4fdpC1LSjydl/ml7xJWKSDZwUYD2zkOePMSrPBA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.24.0.tgz", + "integrity": "sha512-c1xMmNHWpNselmpIqursHeOHHBTIsJLbB+NuovbTTRCNiTLEr/U9dbJ8qy0jd/O2x5pc3seWuOUN5R2IoOTp8A==", "requires": { - "fast-glob": "^3.2.12", - "minimatch": "^7.4.3", - "mkdirp": "^2.1.6", + "fast-glob": "^3.3.2", + "minimatch": "^9.0.4", + "mkdirp": "^3.0.1", "path-browserify": "^1.0.1" }, "dependencies": { @@ -7784,9 +6516,9 @@ } }, "minimatch": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", - "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "requires": { "brace-expansion": "^2.0.1" } @@ -7850,22 +6582,6 @@ "@babel/types": "^7.20.7" } }, - "@types/cross-spawn": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@types/cross-spawn/-/cross-spawn-6.0.3.tgz", - "integrity": "sha512-BDAkU7WHHRHnvBf5z89lcvACsvkz/n7Tv+HyD/uW76O29HoH1Tk/W6iQrepaZVbisvlEek4ygwT8IW7ow9XLAA==", - "requires": { - "@types/node": "*" - } - }, - "@types/debug": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.9.tgz", - "integrity": "sha512-8Hz50m2eoS56ldRlepxSBa6PWEVCtzUo/92HgLc2qTMnotJNIm7xP+UZhyWoYsyOdd5dxZ+NZLb24rsKyFs2ow==", - "requires": { - "@types/ms": "*" - } - }, "@types/graceful-fs": { "version": "4.1.8", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.8.tgz", @@ -7876,9 +6592,9 @@ } }, "@types/graphql-fields": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/@types/graphql-fields/-/graphql-fields-1.3.8.tgz", - "integrity": "sha512-XA3QT8f1THR3t77YT4EpFV/qF3GatLFODwUHvSmF0EjDmjxZY09yWrp9Gw6ju3zpJHGZUwN/p/HID7CaKwGHtw==", + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/@types/graphql-fields/-/graphql-fields-1.3.9.tgz", + "integrity": "sha512-HynTnp1HrE58uYcFcAK5UOfdrHSOIHDLCjvMU4yCmQLMj21uo7ZiZqnDGrD27pgCgHH5a1e8GYNK98Ndmma7ig==", "dev": true, "requires": { "graphql": "*" @@ -7903,35 +6619,28 @@ } }, "@types/jest": { - "version": "29.5.6", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.6.tgz", - "integrity": "sha512-/t9NnzkOpXb4Nfvg17ieHE6EeSjDS2SGSpNYfoLbUAeL/EOueU/RSdOWFpfQTXBEM7BguYW1XQ0EbM+6RlIh6w==", + "version": "29.5.12", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", + "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", "dev": true, "requires": { "expect": "^29.0.0", "pretty-format": "^29.0.0" } }, - "@types/ms": { - "version": "0.7.33", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.33.tgz", - "integrity": "sha512-AuHIyzR5Hea7ij0P9q7vx7xu4z0C28ucwjAZC0ja7JhINyCnOw8/DnvAPQQ9TfOlCtZAmCERKQX9+o1mgQhuOQ==" - }, "@types/node": { - "version": "20.8.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.7.tgz", - "integrity": "sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", + "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", + "dev": true, "requires": { - "undici-types": "~5.25.1" + "undici-types": "~6.13.0" } }, - "@types/normalize-package-data": { - "version": "2.4.0" - }, "@types/pg": { - "version": "8.10.6", - "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.10.6.tgz", - "integrity": "sha512-L9VOuJzQJJAMjk+QZ3GA0gIdFxyWKMlw7rDh94LEibY0w7YmNNlM0wl9JUCsmr691YX6DYV18UfCmU1waYfxIw==", + "version": "8.11.6", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.11.6.tgz", + "integrity": "sha512-/2WmmBXHLsfRqzfHW7BNZ8SbYzE8OSk7i3WjFYvfgRHj7S1xj+16Je5fUKv3lVdVzk/zn9TXOqf+avFCFIE0yQ==", "dev": true, "requires": { "@types/node": "*", @@ -7984,20 +6693,15 @@ } }, "@types/pluralize": { - "version": "0.0.32", - "resolved": "https://registry.npmjs.org/@types/pluralize/-/pluralize-0.0.32.tgz", - "integrity": "sha512-exDkoRIkWJlbRDRmtYDbI3ZUE28HwBwHe5VKn4mvpvMW7qIRDHO6URItErBsBSX7J8/PrDLSOHCcbUMFXwA6CA==", - "dev": true - }, - "@types/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==" + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/pluralize/-/pluralize-0.0.33.tgz", + "integrity": "sha512-JOqsl+ZoCpP4e8TDke9W79FDcSgPAR0l6pixx2JHkhnRjvShyYiAYw2LVsnA7K08Y6DeOnaU6ujmENO4os/cYg==", + "dev": true }, "@types/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==", + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", "dev": true }, "@types/stack-utils": { @@ -8007,9 +6711,9 @@ "dev": true }, "@types/validator": { - "version": "13.11.3", - "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.11.3.tgz", - "integrity": "sha512-jxjhh33aTYDHnrV1vZ3AvWQHfrGx2f5UxKjaP13l5q04fG+/hCKKm0MfodIoCqxevhbcfBb6ZjynyHuQ/jueGQ==", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.12.0.tgz", + "integrity": "sha512-nH45Lk7oPIJ1RVOF6JgFI6Dy0QpHEzq4QecZhvguxYPDwT8c93prCMqAtiIttm39voZ+DDR+qkNnMpJmMBRqag==", "dev": true }, "@types/yargs": { @@ -8023,6 +6727,15 @@ "version": "21.0.0", "dev": true }, + "@whatwg-node/events": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.2.tgz", + "integrity": "sha512-ApcWxkrs1WmEMS2CaLLFUEem/49erT3sxIVjpzU5f6zmVcnijtDSrhoK2zVobOIikZJdH63jdAXOrvjf6eOUNQ==", + "dev": true, + "requires": { + "tslib": "^2.6.3" + } + }, "acorn": { "version": "8.7.1", "dev": true @@ -8031,25 +6744,11 @@ "version": "8.2.0", "dev": true }, - "agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", - "requires": { - "debug": "^4.3.4" - } - }, - "aggregate-error": { - "version": "3.1.0", - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } - }, "ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, "requires": { "type-fest": "^0.21.3" }, @@ -8057,15 +6756,18 @@ "type-fest": { "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==" + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true } } }, "ansi-regex": { - "version": "5.0.1" + "version": "5.0.1", + "dev": true }, "ansi-styles": { "version": "4.3.0", + "dev": true, "requires": { "color-convert": "^2.0.1" } @@ -8080,53 +6782,6 @@ "picomatch": "^2.0.4" } }, - "archiver": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/archiver/-/archiver-5.3.2.tgz", - "integrity": "sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw==", - "requires": { - "archiver-utils": "^2.1.0", - "async": "^3.2.4", - "buffer-crc32": "^0.2.1", - "readable-stream": "^3.6.0", - "readdir-glob": "^1.1.2", - "tar-stream": "^2.2.0", - "zip-stream": "^4.1.0" - } - }, - "archiver-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz", - "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", - "requires": { - "glob": "^7.1.4", - "graceful-fs": "^4.2.0", - "lazystream": "^1.0.0", - "lodash.defaults": "^4.2.0", - "lodash.difference": "^4.5.0", - "lodash.flatten": "^4.4.0", - "lodash.isplainobject": "^4.0.6", - "lodash.union": "^4.6.0", - "normalize-path": "^3.0.0", - "readable-stream": "^2.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - } - } - }, "arg": { "version": "4.1.3", "dev": true @@ -8144,18 +6799,11 @@ "version": "3.1.0", "dev": true }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" - }, - "astral-regex": { - "version": "2.0.0" - }, "async": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==", + "dev": true }, "babel-jest": { "version": "29.7.0", @@ -8230,32 +6878,20 @@ "balanced-match": { "version": "1.0.0" }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, "brace-expansion": { "version": "1.1.11", + "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "braces": { - "version": "3.0.2", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "browserslist": { @@ -8286,30 +6922,12 @@ "node-int64": "^0.4.0" } }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==" - }, "buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, - "buffer-writer": { - "version": "2.0.0", - "dev": true - }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -8342,41 +6960,11 @@ "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true }, - "checkpoint-client": { - "version": "1.1.27", - "resolved": "https://registry.npmjs.org/checkpoint-client/-/checkpoint-client-1.1.27.tgz", - "integrity": "sha512-xstymfUalJOv6ZvTtmkwP4ORJN36ikT4PvrIoLe3wstbYf87XIXCcZrSmbFQOjyB0v1qbBnCsAscDpfdZlCkFA==", - "requires": { - "ci-info": "3.8.0", - "env-paths": "2.2.1", - "make-dir": "4.0.0", - "ms": "2.1.3", - "node-fetch": "2.6.12", - "uuid": "9.0.0" - }, - "dependencies": { - "make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "requires": { - "semver": "^7.5.3" - } - }, - "node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", - "requires": { - "whatwg-url": "^5.0.0" - } - } - } - }, "ci-info": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", - "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==" + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "dev": true }, "cjs-module-lexer": { "version": "1.2.3", @@ -8397,23 +6985,57 @@ "validator": "^13.7.0" } }, - "clean-stack": { - "version": "2.2.0" - }, "cli-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", - "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", "dev": true, "requires": { - "restore-cursor": "^4.0.0" + "restore-cursor": "^5.0.0" } }, "cli-truncate": { - "version": "2.1.0", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", + "dev": true, "requires": { - "slice-ansi": "^3.0.0", - "string-width": "^4.2.0" + "slice-ansi": "^5.0.0", + "string-width": "^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "requires": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + } } }, "cliui": { @@ -8447,9 +7069,9 @@ "dev": true }, "code-block-writer": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-12.0.0.tgz", - "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==" + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.2.tgz", + "integrity": "sha512-XfXzAGiStXSmCIwrkdfvc7FS5Dtj8yelCtyOf2p2skCAfvLd6zu0rGzuS9NSCO3bq1JKpFZ7tbKdKlcd5occQA==" }, "collect-v8-coverage": { "version": "1.0.2", @@ -8459,12 +7081,14 @@ }, "color-convert": { "version": "2.0.1", + "dev": true, "requires": { "color-name": "~1.1.4" } }, "color-name": { - "version": "1.1.4" + "version": "1.1.4", + "dev": true }, "colorette": { "version": "2.0.20", @@ -8541,29 +7165,14 @@ } }, "commander": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", - "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", "dev": true }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==" - }, - "compress-commons": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.2.tgz", - "integrity": "sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==", - "requires": { - "buffer-crc32": "^0.2.13", - "crc32-stream": "^4.0.2", - "normalize-path": "^3.0.0", - "readable-stream": "^3.6.0" - } - }, "concat-map": { - "version": "0.0.1" + "version": "0.0.1", + "dev": true }, "convert-source-map": { "version": "2.0.0", @@ -8571,25 +7180,6 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, - "core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" - }, - "crc-32": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", - "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==" - }, - "crc32-stream": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.3.tgz", - "integrity": "sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw==", - "requires": { - "crc-32": "^1.2.0", - "readable-stream": "^3.4.0" - } - }, "create-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", @@ -8611,25 +7201,25 @@ }, "cross-spawn": { "version": "7.0.3", + "dev": true, "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, - "crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==" - }, "debug": { - "version": "4.3.4", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, "requires": { "ms": "2.1.2" }, "dependencies": { "ms": { - "version": "2.1.2" + "version": "2.1.2", + "dev": true } } }, @@ -8650,21 +7240,6 @@ "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true }, - "del": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", - "integrity": "sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==", - "requires": { - "globby": "^11.0.1", - "graceful-fs": "^4.2.4", - "is-glob": "^4.0.1", - "is-path-cwd": "^2.2.0", - "is-path-inside": "^3.0.2", - "p-map": "^4.0.0", - "rimraf": "^3.0.2", - "slash": "^3.0.0" - } - }, "detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -8681,32 +7256,24 @@ "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "requires": { - "path-type": "^4.0.0" - } - }, "directory-tree": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/directory-tree/-/directory-tree-3.5.1.tgz", - "integrity": "sha512-HqjZ49fDzUnKYUhHxVw9eKBqbQ+lL0v4kSBInlDlaktmLtGoV9tC54a6A0ZfYeIrkMHWTE6MwwmUXP477+UEKQ==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/directory-tree/-/directory-tree-3.5.2.tgz", + "integrity": "sha512-DsOqeZEHkZnZrVOJG3mE/J9M6J8PulImiC6I1ZpoprVlfno8GvLOPDMkxiJihklLK7B9aVudG463L1+S/kzjiw==", "dev": true, "requires": { "command-line-args": "^5.2.0", "command-line-usage": "^6.1.1" } }, - "dotenv": { - "version": "16.0.3" - }, - "eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true + "ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "requires": { + "jake": "^10.8.5" + } }, "electron-to-chromium": { "version": "1.4.314", @@ -8721,15 +7288,8 @@ "dev": true }, "emoji-regex": { - "version": "8.0.0" - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "requires": { - "once": "^1.4.0" - } + "version": "8.0.0", + "dev": true }, "env-cmd": { "version": "10.1.0", @@ -8745,13 +7305,15 @@ } } }, - "env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==" + "environment": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", + "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", + "dev": true }, "error-ex": { "version": "1.3.2", + "dev": true, "requires": { "is-arrayish": "^0.2.1" } @@ -8763,7 +7325,8 @@ "dev": true }, "escape-string-regexp": { - "version": "1.0.5" + "version": "1.0.5", + "dev": true }, "esprima": { "version": "4.0.1", @@ -8779,6 +7342,7 @@ }, "execa": { "version": "5.1.1", + "dev": true, "requires": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -8811,9 +7375,9 @@ } }, "fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -8827,9 +7391,9 @@ "dev": true }, "fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "requires": { "reusify": "^1.0.4" } @@ -8843,20 +7407,41 @@ "bser": "2.1.1" } }, - "fill-range": { - "version": "7.0.1", + "filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, "requires": { - "to-regex-range": "^5.0.1" + "minimatch": "^5.0.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } } }, - "find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" + "to-regex-range": "^5.0.1" } }, "find-replace": { @@ -8866,23 +7451,6 @@ "array-back": "^3.0.1" } }, - "find-up": { - "version": "5.0.0", - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "fp-ts": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-2.16.1.tgz", - "integrity": "sha512-by7U5W8dkIzcvDofUcO42yl9JbnHTEDBrzu3pt5fKT+Z4Oy85I21K80EYJYdjQGC2qum4Vo55Ag57iiIK4FYuA==" - }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" - }, "fs-extra": { "version": "11.1.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", @@ -8893,34 +7461,9 @@ "universalify": "^2.0.0" } }, - "fs-jetpack": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/fs-jetpack/-/fs-jetpack-5.1.0.tgz", - "integrity": "sha512-Xn4fDhLydXkuzepZVsr02jakLlmoARPy+YWIclo4kh0GyNGUHnTqeH/w/qIsVn50dFxtp8otPL2t/HcPJBbxUA==", - "requires": { - "minimatch": "^5.1.0" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "requires": { - "balanced-match": "^1.0.0" - } - }, - "minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "requires": { - "brace-expansion": "^2.0.1" - } - } - } - }, "fs.realpath": { - "version": "1.0.0" + "version": "1.0.0", + "dev": true }, "fsevents": { "version": "2.3.3", @@ -8941,6 +7484,12 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "get-east-asian-width": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", + "dev": true + }, "get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", @@ -8948,12 +7497,14 @@ "dev": true }, "get-stream": { - "version": "6.0.1" + "version": "6.0.1", + "dev": true }, "glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -8971,40 +7522,19 @@ "is-glob": "^4.0.1" } }, - "global-dirs": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", - "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", - "requires": { - "ini": "2.0.0" - } - }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - } - }, "graceful-fs": { "version": "4.2.9" }, "graphql": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.8.1.tgz", - "integrity": "sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==", + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz", + "integrity": "sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==", "dev": true }, "graphql-fields": { @@ -9019,67 +7549,33 @@ } }, "graphql-scalars": { - "version": "1.22.4", - "resolved": "https://registry.npmjs.org/graphql-scalars/-/graphql-scalars-1.22.4.tgz", - "integrity": "sha512-ILnv7jq5VKHLUyoaTFX7lgYrjCd6vTee9i8/B+D4zJKJT5TguOl0KkpPEbXHjmeor8AZYrVsrYUHdqRBMX1pjA==", + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/graphql-scalars/-/graphql-scalars-1.23.0.tgz", + "integrity": "sha512-YTRNcwitkn8CqYcleKOx9IvedA8JIERn8BRq21nlKgOr4NEcTaWEG0sT+H92eF3ALTFbPgsqfft4cw+MGgv0Gg==", "dev": true, "requires": { "tslib": "^2.5.0" } }, - "graphql-subscriptions": { - "version": "2.0.0", - "dev": true, - "requires": { - "iterall": "^1.3.0" - } - }, "has": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", - "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==" + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", + "dev": true }, "has-flag": { - "version": "4.0.0" - }, - "hasha": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", - "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", - "requires": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - } - }, - "hosted-git-info": { - "version": "2.8.9" - }, - "html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "version": "4.0.0", "dev": true }, - "http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", - "requires": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - } - }, - "https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", - "requires": { - "agent-base": "^7.0.2", - "debug": "4" - } + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true }, "human-signals": { - "version": "2.1.0" + "version": "2.1.0", + "dev": true }, "husky": { "version": "8.0.3", @@ -9087,42 +7583,6 @@ "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", "dev": true }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==" - }, - "ignore-walk": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-5.0.1.tgz", - "integrity": "sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==", - "requires": { - "minimatch": "^5.0.1" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "requires": { - "balanced-match": "^1.0.0" - } - }, - "minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "requires": { - "brace-expansion": "^2.0.1" - } - } - } - }, "import-local": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", @@ -9139,45 +7599,39 @@ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true }, - "indent-string": { - "version": "4.0.0" - }, "inflight": { "version": "1.0.6", + "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" } }, "inherits": { - "version": "2.0.4" - }, - "ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==" + "version": "2.0.4", + "dev": true }, "is-arrayish": { - "version": "0.2.1" + "version": "0.2.1", + "dev": true }, "is-core-module": { "version": "2.13.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "dev": true, "requires": { "has": "^1.0.3" } }, - "is-docker": { - "version": "2.2.1" - }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" }, "is-fullwidth-code-point": { - "version": "3.0.0" + "version": "3.0.0", + "dev": true }, "is-generator-fn": { "version": "2.1.0", @@ -9194,39 +7648,19 @@ } }, "is-number": { - "version": "7.0.0" - }, - "is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==" - }, - "is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==" + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, "is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" - }, - "is-windows": { - "version": "1.0.2" - }, - "is-wsl": { - "version": "2.2.0", - "requires": { - "is-docker": "^2.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true }, "isexe": { - "version": "2.0.0" + "version": "2.0.0", + "dev": true }, "istanbul-lib-coverage": { "version": "3.2.0", @@ -9298,9 +7732,17 @@ "istanbul-lib-report": "^3.0.0" } }, - "iterall": { - "version": "1.3.0", - "dev": true + "jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "dev": true, + "requires": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + } }, "jest": { "version": "29.7.0", @@ -9729,7 +8171,8 @@ } }, "js-tokens": { - "version": "4.0.0" + "version": "4.0.0", + "dev": true }, "js-yaml": { "version": "3.14.1", @@ -9748,7 +8191,8 @@ "dev": true }, "json-parse-even-better-errors": { - "version": "2.3.1" + "version": "2.3.1", + "dev": true }, "json5": { "version": "2.2.3", @@ -9768,30 +8212,6 @@ "kleur": { "version": "3.0.3" }, - "lazystream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", - "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", - "requires": { - "readable-stream": "^2.0.5" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - } - } - }, "leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -9807,30 +8227,31 @@ "peer": true }, "lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", + "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", "dev": true }, "lines-and-columns": { - "version": "1.1.6" + "version": "1.1.6", + "dev": true }, "lint-staged": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.0.1.tgz", - "integrity": "sha512-2IU5OWmCaxch0X0+IBF4/v7sutpB+F3qoXbro43pYjQTOo5wumckjxoxn47pQBqqBsCWrD5HnI2uG/zJA7isew==", + "version": "15.2.8", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.8.tgz", + "integrity": "sha512-PUWFf2zQzsd9EFU+kM1d7UP+AZDbKFKuj+9JNVTBkhUFhbg4MAt6WfyMMwBfM4lYqd4D2Jwac5iuTu9rVj4zCQ==", "dev": true, "requires": { - "chalk": "5.3.0", - "commander": "11.1.0", - "debug": "4.3.4", - "execa": "8.0.1", - "lilconfig": "2.1.0", - "listr2": "7.0.1", - "micromatch": "4.0.5", - "pidtree": "0.6.0", - "string-argv": "0.3.2", - "yaml": "2.3.2" + "chalk": "~5.3.0", + "commander": "~12.1.0", + "debug": "~4.3.6", + "execa": "~8.0.1", + "lilconfig": "~3.1.2", + "listr2": "~8.2.4", + "micromatch": "~4.0.7", + "pidtree": "~0.6.0", + "string-argv": "~0.3.2", + "yaml": "~2.5.0" }, "dependencies": { "chalk": { @@ -9919,148 +8340,51 @@ } }, "listr2": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-7.0.1.tgz", - "integrity": "sha512-nz+7hwgbDp8eWNoDgzdl4hA/xDSLrNRzPu1TLgOYs6l5Y+Ma6zVWWy9Oyt9TQFONwKoSPoka3H50D3vD5EuNwg==", + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.4.tgz", + "integrity": "sha512-opevsywziHd3zHCVQGAj8zu+Z3yHNkkoYhWIGnq54RrCVwLz0MozotJEDnKsIBLvkfLGN6BLOyAeRrYI0pKA4g==", "dev": true, "requires": { - "cli-truncate": "^3.1.0", + "cli-truncate": "^4.0.0", "colorette": "^2.0.20", "eventemitter3": "^5.0.1", - "log-update": "^5.0.1", - "rfdc": "^1.3.0", - "wrap-ansi": "^8.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true - }, - "ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true - }, - "cli-truncate": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", - "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", - "dev": true, - "requires": { - "slice-ansi": "^5.0.0", - "string-width": "^5.0.0" - } - }, - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", - "dev": true - }, - "slice-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", - "dev": true, - "requires": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" - } - }, - "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - } - }, - "strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "requires": { - "ansi-regex": "^6.0.1" - } - } - } - }, - "locate-path": { - "version": "6.0.0", - "requires": { - "p-locate": "^5.0.0" + "log-update": "^6.1.0", + "rfdc": "^1.4.1", + "wrap-ansi": "^9.0.0" } }, "lodash.camelcase": { "version": "4.3.0", "dev": true }, - "lodash.defaults": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", - "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==" - }, - "lodash.difference": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", - "integrity": "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==" - }, - "lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==" - }, "lodash.get": { "version": "4.4.2", "dev": true }, - "lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" - }, "lodash.memoize": { "version": "4.1.2", "dev": true }, - "lodash.union": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", - "integrity": "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==" - }, "log-update": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-5.0.1.tgz", - "integrity": "sha512-5UtUDQ/6edw4ofyljDNcOVJQ4c7OjDro4h3y8e1GQL5iYElYclVHJ3zeWchylvMaKnDbDilC8irOVyexnA/Slw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", + "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", "dev": true, "requires": { - "ansi-escapes": "^5.0.0", - "cli-cursor": "^4.0.0", - "slice-ansi": "^5.0.0", - "strip-ansi": "^7.0.1", - "wrap-ansi": "^8.0.1" + "ansi-escapes": "^7.0.0", + "cli-cursor": "^5.0.0", + "slice-ansi": "^7.1.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" }, "dependencies": { "ansi-escapes": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-5.0.0.tgz", - "integrity": "sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz", + "integrity": "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==", "dev": true, "requires": { - "type-fest": "^1.0.2" + "environment": "^1.0.0" } }, "ansi-regex": { @@ -10076,19 +8400,22 @@ "dev": true }, "is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", - "dev": true + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", + "dev": true, + "requires": { + "get-east-asian-width": "^1.0.0" + } }, "slice-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", "dev": true, "requires": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" } }, "strip-ansi": { @@ -10099,29 +8426,6 @@ "requires": { "ansi-regex": "^6.0.1" } - }, - "type-fest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", - "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", - "dev": true - } - } - }, - "lru-cache": { - "version": "6.0.0", - "requires": { - "yallist": "^4.0.0" - } - }, - "make-dir": { - "version": "3.1.0", - "requires": { - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0" } } }, @@ -10139,7 +8443,8 @@ } }, "merge-stream": { - "version": "2.0.0" + "version": "2.0.0", + "dev": true }, "merge2": { "version": "1.4.1", @@ -10147,35 +8452,37 @@ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" }, "micromatch": { - "version": "4.0.5", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", "requires": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "mimic-fn": { - "version": "2.1.0" + "version": "2.1.0", + "dev": true }, - "min-indent": { - "version": "1.0.1" + "mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "dev": true }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, "mkdirp": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.6.tgz", - "integrity": "sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==" - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==" }, "natural-compare": { "version": "1.4.0", @@ -10183,19 +8490,6 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "new-github-issue-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/new-github-issue-url/-/new-github-issue-url-0.2.1.tgz", - "integrity": "sha512-md4cGoxuT4T4d/HDOXbrUHkTKrp/vp+m3aOA7XXVYwNsUNMK49g3SQicTSeV5GIz/5QVGAeYRAOlyp9OvlgsYA==" - }, - "node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "requires": { - "whatwg-url": "^5.0.0" - } - }, "node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -10208,159 +8502,51 @@ "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", "dev": true }, - "normalize-package-data": { - "version": "2.5.0", - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1" - } - } - }, "normalize-path": { - "version": "3.0.0" - }, - "npm-bundled": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-2.0.1.tgz", - "integrity": "sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==", - "requires": { - "npm-normalize-package-bin": "^2.0.0" - } - }, - "npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==" - }, - "npm-packlist": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.3.tgz", - "integrity": "sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==", - "requires": { - "glob": "^8.0.1", - "ignore-walk": "^5.0.1", - "npm-bundled": "^2.0.0", - "npm-normalize-package-bin": "^2.0.0" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "requires": { - "balanced-match": "^1.0.0" - } - }, - "glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - } - }, - "minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "requires": { - "brace-expansion": "^2.0.1" - } - } - } + "version": "3.0.0", + "dev": true }, "npm-run-path": { "version": "4.0.1", + "dev": true, "requires": { "path-key": "^3.0.0" } }, "obuf": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", - "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", - "dev": true - }, - "once": { - "version": "1.4.0", - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "5.1.2", - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "open": { - "version": "7.4.2", - "requires": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" - } - }, - "p-filter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", - "integrity": "sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==", - "requires": { - "p-map": "^2.0.0" - }, - "dependencies": { - "p-map": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", - "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==" - } - } - }, - "p-limit": { - "version": "3.1.0", - "requires": { - "yocto-queue": "^0.1.0" - } + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", + "dev": true }, - "p-locate": { - "version": "5.0.0", + "once": { + "version": "1.4.0", + "dev": true, "requires": { - "p-limit": "^3.0.2" + "wrappy": "1" } }, - "p-map": { - "version": "4.0.0", + "onetime": { + "version": "5.1.2", + "dev": true, "requires": { - "aggregate-error": "^3.0.0" + "mimic-fn": "^2.1.0" } }, - "p-retry": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", - "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", + "p-limit": { + "version": "3.1.0", + "dev": true, "requires": { - "@types/retry": "0.12.0", - "retry": "^0.13.1" + "yocto-queue": "^0.1.0" } }, "p-try": { - "version": "2.2.0" - }, - "packet-reader": { - "version": "1.0.0", + "version": "2.2.0", "dev": true }, "parse-json": { "version": "5.2.0", + "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -10374,34 +8560,31 @@ "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" }, "path-exists": { - "version": "4.0.0" + "version": "4.0.0", + "dev": true }, "path-is-absolute": { - "version": "1.0.1" + "version": "1.0.1", + "dev": true }, "path-key": { - "version": "3.1.1" + "version": "3.1.1", + "dev": true }, "path-parse": { - "version": "1.0.7" - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" + "version": "1.0.7", + "dev": true }, "pg": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/pg/-/pg-8.11.3.tgz", - "integrity": "sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.12.0.tgz", + "integrity": "sha512-A+LHUSnwnxrnL/tZ+OLfqR1SxLN3c/pgDztZ47Rpbsd4jUytsTtwQo/TLPRzPJMp/1pbhYVhH9cuSZLAajNfjQ==", "dev": true, "requires": { - "buffer-writer": "2.0.0", - "packet-reader": "1.0.0", "pg-cloudflare": "^1.1.1", - "pg-connection-string": "^2.6.2", - "pg-pool": "^3.6.1", - "pg-protocol": "^1.6.0", + "pg-connection-string": "^2.6.4", + "pg-pool": "^3.6.2", + "pg-protocol": "^1.6.1", "pg-types": "^2.1.0", "pgpass": "1.x" } @@ -10414,9 +8597,9 @@ "optional": true }, "pg-connection-string": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.2.tgz", - "integrity": "sha512-ch6OwaeaPYcova4kKZ15sbJ2hKb/VP48ZD2gE7i1J+L4MspCtBMAx8nMgz7bksc7IojCIIWuEhHibSMFH8m8oA==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.4.tgz", + "integrity": "sha512-v+Z7W/0EO707aNMaAEfiGnGL9sxxumwLl2fJvCQtMn9Fxsg+lPpPkdcyBSv/KFgpGdYkMfn+EI1Or2EHjpgLCA==", "dev": true }, "pg-int8": { @@ -10430,16 +8613,16 @@ "dev": true }, "pg-pool": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.1.tgz", - "integrity": "sha512-jizsIzhkIitxCGfPRzJn1ZdcosIt3pz9Sh3V01fm1vZnbnCMgmGl5wvGGdNN2EL9Rmb0EcFoCkixH4Pu+sP9Og==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.2.tgz", + "integrity": "sha512-Htjbg8BlwXqSBQ9V8Vjtc+vzf/6fVUuak/3/XXKA9oxZprwW3IMDQTGHP+KDmVL7rtd+R1QjbnCFPuTHm3G4hg==", "dev": true, "requires": {} }, "pg-protocol": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.0.tgz", - "integrity": "sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.1.tgz", + "integrity": "sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg==", "dev": true }, "pg-types": { @@ -10483,6 +8666,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, "requires": { "find-up": "^4.0.0" }, @@ -10491,6 +8675,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, "requires": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -10500,6 +8685,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, "requires": { "p-locate": "^4.1.0" } @@ -10508,6 +8694,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, "requires": { "p-try": "^2.0.0" } @@ -10516,6 +8703,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, "requires": { "p-limit": "^2.2.0" } @@ -10551,9 +8739,9 @@ "dev": true }, "prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "dev": true }, "prettier-2": { @@ -10582,24 +8770,14 @@ } }, "prisma": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.4.2.tgz", - "integrity": "sha512-GDMZwZy7mysB2oXU+angQqJ90iaPFdD0rHaZNkn+dio5NRkGLmMqmXs31//tg/qXT3iB0cTQwnGGQNuirhSTZg==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.18.0.tgz", + "integrity": "sha512-+TrSIxZsh64OPOmaSgVPH7ALL9dfU0jceYaMJXsNrTkFHO7/3RANi5K2ZiPB1De9+KDxCWn7jvRq8y8pvk+o9g==", "dev": true, "requires": { - "@prisma/engines": "5.4.2" + "@prisma/engines": "5.18.0" } }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" - }, "prompts": { "version": "2.4.2", "requires": { @@ -10624,89 +8802,15 @@ "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, - "read-pkg": { - "version": "5.2.0", - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "type-fest": { - "version": "0.6.0" - } - } - }, - "read-pkg-up": { - "version": "7.0.1", - "requires": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "requires": { - "p-limit": "^2.2.0" - } - } - } - }, "readable-stream": { "version": "3.6.0", + "dev": true, "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, - "readdir-glob": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz", - "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", - "requires": { - "minimatch": "^5.1.0" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "requires": { - "balanced-match": "^1.0.0" - } - }, - "minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "requires": { - "brace-expansion": "^2.0.1" - } - } - } - }, "reduce-flatten": { "version": "2.0.0", "dev": true @@ -10715,11 +8819,6 @@ "version": "0.1.13", "dev": true }, - "replace-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/replace-string/-/replace-string-3.1.0.tgz", - "integrity": "sha512-yPpxc4ZR2makceA9hy/jHNqc7QVkd4Je/N0WRHm6bs3PtivPuPynxE5ejU/mp5EhnCv8+uZL7vhz8rkluSlx+Q==" - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -10730,6 +8829,7 @@ "version": "1.22.4", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", + "dev": true, "requires": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", @@ -10758,37 +8858,43 @@ "dev": true }, "restore-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", - "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", "dev": true, "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "dependencies": { + "onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "dev": true, + "requires": { + "mimic-function": "^5.0.0" + } + }, + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + } } }, - "retry": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", - "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==" - }, "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" }, "rfdc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", - "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", "dev": true }, - "rimraf": { - "version": "3.0.2", - "requires": { - "glob": "^7.1.3" - } - }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -10798,40 +8904,58 @@ } }, "safe-buffer": { - "version": "5.1.2" + "version": "5.1.2", + "dev": true }, "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "requires": { - "lru-cache": "^6.0.0" - } + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==" }, "shebang-command": { "version": "2.0.0", + "dev": true, "requires": { "shebang-regex": "^3.0.0" } }, "shebang-regex": { - "version": "3.0.0" + "version": "3.0.0", + "dev": true }, "signal-exit": { - "version": "3.0.7" + "version": "3.0.7", + "dev": true }, "sisteransi": { "version": "1.0.5" }, "slash": { - "version": "3.0.0" + "version": "3.0.0", + "dev": true }, "slice-ansi": { - "version": "3.0.0", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "dev": true, "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "dev": true + } } }, "source-map": { @@ -10850,26 +8974,6 @@ "source-map": "^0.6.0" } }, - "spdx-correct": { - "version": "3.1.1", - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0" - }, - "spdx-expression-parse": { - "version": "3.0.1", - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.7" - }, "split2": { "version": "3.2.2", "dev": true, @@ -10902,6 +9006,7 @@ }, "string_decoder": { "version": "1.1.1", + "dev": true, "requires": { "safe-buffer": "~5.1.0" } @@ -10924,6 +9029,7 @@ }, "string-width": { "version": "4.2.3", + "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -10932,6 +9038,7 @@ }, "strip-ansi": { "version": "6.0.1", + "dev": true, "requires": { "ansi-regex": "^5.0.1" } @@ -10943,13 +9050,8 @@ "dev": true }, "strip-final-newline": { - "version": "2.0.0" - }, - "strip-indent": { - "version": "3.0.0", - "requires": { - "min-indent": "^1.0.0" - } + "version": "2.0.0", + "dev": true }, "strip-json-comments": { "version": "3.1.1", @@ -10959,21 +9061,14 @@ }, "supports-color": { "version": "7.2.0", + "dev": true, "requires": { "has-flag": "^4.0.0" } }, - "supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", - "requires": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - } - }, "supports-preserve-symlinks-flag": { - "version": "1.0.0" + "version": "1.0.0", + "dev": true }, "table-layout": { "version": "1.0.2", @@ -10995,51 +9090,6 @@ } } }, - "tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "requires": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - } - }, - "temp-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", - "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==" - }, - "tempy": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tempy/-/tempy-1.0.1.tgz", - "integrity": "sha512-biM9brNqxSc04Ee71hzFbryD11nX7VPhQQY32AdDmjFvodsRFz/3ufeoTZ6uYkRFfGo188tENcASNs3vTdsM0w==", - "requires": { - "del": "^6.0.0", - "is-stream": "^2.0.0", - "temp-dir": "^2.0.0", - "type-fest": "^0.16.0", - "unique-string": "^2.0.0" - }, - "dependencies": { - "type-fest": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.16.0.tgz", - "integrity": "sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==" - } - } - }, - "terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "requires": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - } - }, "test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -11051,12 +9101,6 @@ "minimatch": "^3.0.4" } }, - "tmp": { - "version": "0.2.1", - "requires": { - "rimraf": "^3.0.0" - } - }, "tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -11071,22 +9115,20 @@ }, "to-regex-range": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "requires": { "is-number": "^7.0.0" } }, - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, "ts-jest": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.1.tgz", - "integrity": "sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==", + "version": "29.2.4", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.4.tgz", + "integrity": "sha512-3d6tgDyhCI29HlpwIq87sNuI+3Q6GLTTCeYRHCs7vDz+/3GCMwEtV9jezLyl4ZtnBgx00I7hm8PCP8cTksMGrw==", "dev": true, "requires": { "bs-logger": "0.x", + "ejs": "^3.1.10", "fast-json-stable-stringify": "2.x", "jest-util": "^29.0.0", "json5": "^2.2.3", @@ -11097,16 +9139,18 @@ } }, "ts-morph": { - "version": "20.0.0", - "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-20.0.0.tgz", - "integrity": "sha512-JVmEJy2Wow5n/84I3igthL9sudQ8qzjh/6i4tmYCm6IqYyKFlNbJZi7oBdjyqcWSWYRu3CtL0xbT6fS03ESZIg==", + "version": "23.0.0", + "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-23.0.0.tgz", + "integrity": "sha512-FcvFx7a9E8TUe6T3ShihXJLiJOiqyafzFKUO4aqIHDUCIvADdGNShcbc2W5PMr3LerXRv7mafvFZ9lRENxJmug==", "requires": { - "@ts-morph/common": "~0.21.0", - "code-block-writer": "^12.0.0" + "@ts-morph/common": "~0.24.0", + "code-block-writer": "^13.0.1" } }, "ts-node": { - "version": "10.9.1", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "requires": { "@cspotcode/source-map-support": "^0.8.0", @@ -11124,11 +9168,6 @@ "yn": "3.1.1" } }, - "ts-pattern": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-4.3.0.tgz", - "integrity": "sha512-pefrkcd4lmIVR0LA49Imjf9DYLK8vtWhqBPA3Ya1ir8xCW0O2yjL9dsCVvI7pCodLC5q7smNpEtDR2yVulQxOg==" - }, "ts-toolbelt": { "version": "9.6.0", "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz", @@ -11136,9 +9175,9 @@ "dev": true }, "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", "dev": true }, "type-detect": { @@ -11147,27 +9186,24 @@ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, - "type-fest": { - "version": "0.8.1" - }, "type-graphql": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/type-graphql/-/type-graphql-2.0.0-beta.3.tgz", - "integrity": "sha512-5HEiQaWHPYhPmbJuMmT+IZgjsnbNWsW37osUISwgr5EpcHZ4krLl8eBoOfjFya4mxAWYshlpSO1ahaucJQqM5g==", + "version": "2.0.0-rc.2", + "resolved": "https://registry.npmjs.org/type-graphql/-/type-graphql-2.0.0-rc.2.tgz", + "integrity": "sha512-DJ8erG1cmjteMrOhFIkBHOqRM+L+wCJxvNjbbj1Y+q2r4HZkB1qOSS4ZD4AaoAfRPAp1yU23gMtmzf0jen/FFA==", "dev": true, "requires": { + "@graphql-yoga/subscription": "^5.0.0", "@types/node": "*", - "@types/semver": "^7.5.0", + "@types/semver": "^7.5.6", "graphql-query-complexity": "^0.12.0", - "graphql-subscriptions": "^2.0.0", "semver": "^7.5.4", - "tslib": "^2.6.0" + "tslib": "^2.6.2" } }, "typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "dev": true }, "typical": { @@ -11175,22 +9211,15 @@ "dev": true }, "undici-types": { - "version": "5.25.3", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", - "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==" - }, - "unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "requires": { - "crypto-random-string": "^2.0.0" - } + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==", + "dev": true }, "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==" }, "update-browserslist-db": { "version": "1.0.10", @@ -11203,12 +9232,8 @@ } }, "util-deprecate": { - "version": "1.0.2" - }, - "uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==" + "version": "1.0.2", + "dev": true }, "v8-compile-cache-lib": { "version": "3.0.1", @@ -11225,13 +9250,6 @@ "convert-source-map": "^2.0.0" } }, - "validate-npm-package-license": { - "version": "3.0.4", - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, "validator": { "version": "13.7.0", "dev": true, @@ -11247,22 +9265,9 @@ "makeerror": "1.0.12" } }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "which": { "version": "2.0.2", + "dev": true, "requires": { "isexe": "^2.0.0" } @@ -11282,14 +9287,14 @@ } }, "wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", "dev": true, "requires": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" }, "dependencies": { "ansi-regex": { @@ -11305,20 +9310,20 @@ "dev": true }, "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", "dev": true }, "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "dev": true, "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" } }, "strip-ansi": { @@ -11333,7 +9338,8 @@ } }, "wrappy": { - "version": "1.0.2" + "version": "1.0.2", + "dev": true }, "write-file-atomic": { "version": "4.0.2", @@ -11355,13 +9361,10 @@ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, - "yallist": { - "version": "4.0.0" - }, "yaml": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.2.tgz", - "integrity": "sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.0.tgz", + "integrity": "sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==", "dev": true }, "yargs": { @@ -11390,36 +9393,8 @@ "dev": true }, "yocto-queue": { - "version": "0.1.0" - }, - "zip-stream": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.1.tgz", - "integrity": "sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==", - "requires": { - "archiver-utils": "^3.0.4", - "compress-commons": "^4.1.2", - "readable-stream": "^3.6.0" - }, - "dependencies": { - "archiver-utils": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-3.0.4.tgz", - "integrity": "sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw==", - "requires": { - "glob": "^7.2.3", - "graceful-fs": "^4.2.0", - "lazystream": "^1.0.0", - "lodash.defaults": "^4.2.0", - "lodash.difference": "^4.5.0", - "lodash.flatten": "^4.4.0", - "lodash.isplainobject": "^4.0.6", - "lodash.union": "^4.6.0", - "normalize-path": "^3.0.0", - "readable-stream": "^3.6.0" - } - } - } + "version": "0.1.0", + "dev": true } } } diff --git a/package.json b/package.json index 065374da5..1d567d315 100644 --- a/package.json +++ b/package.json @@ -19,56 +19,56 @@ "typegraphql-prisma": "lib/generator.js" }, "peerDependencies": { - "@prisma/client": "^5.0.0", - "@types/graphql-fields": "^1.3.8", + "@prisma/client": "^5.18.0", + "@types/graphql-fields": "^1.3.9", "@types/node": "*", "graphql-fields": "^2.0.3", - "graphql-scalars": "^1.22.4", - "prisma": "^5.0.0", - "tslib": "^2.6.2", - "type-graphql": "^1.1.1 || >=1.2.0-rc || >=2.0.0-beta" + "graphql-scalars": "^1.23.0", + "prisma": "^5.18.0", + "tslib": "^2.6.3", + "type-graphql": "^1.1.1 || >=1.2.0-rc || >=2.0.0-beta || >=2.0.0-rc" }, "dependencies": { - "@prisma/generator-helper": "^5.4.2", - "@prisma/internals": "^5.4.2", + "@prisma/generator-helper": "^5.18.0", + "@prisma/internals": "^5.18.0", "pluralize": "^8.0.0", - "semver": "^7.5.4", - "ts-morph": "^20.0.0", - "tslib": "^2.6.2" + "semver": "^7.6.3", + "ts-morph": "^23.0.0", + "tslib": "^2.6.3" }, "devDependencies": { "@jest/types": "^29.6.3", - "@prisma/client": "^5.4.2", - "@types/graphql-fields": "^1.3.8", - "@types/jest": "^29.5.6", - "@types/node": "^20.8.7", - "@types/pg": "^8.10.6", - "@types/pluralize": "0.0.32", - "@types/semver": "^7.5.3", - "@types/validator": "^13.11.3", - "directory-tree": "^3.5.1", + "@prisma/client": "^5.18.0", + "@types/graphql-fields": "^1.3.9", + "@types/jest": "^29.5.12", + "@types/node": "^22.1.0", + "@types/pg": "^8.11.6", + "@types/pluralize": "0.0.33", + "@types/semver": "^7.5.8", + "@types/validator": "^13.12.0", + "directory-tree": "^3.5.2", "env-cmd": "^10.1.0", - "graphql": "^16.8.1", + "graphql": "^16.9.0", "graphql-fields": "^2.0.3", - "graphql-scalars": "^1.22.4", + "graphql-scalars": "^1.23.0", "husky": "^8.0.3", "jest": "^29.7.0", - "lint-staged": "^15.0.1", - "pg": "^8.11.3", - "prettier": "^3.0.3", + "lint-staged": "^15.2.8", + "pg": "^8.12.0", + "prettier": "^3.3.3", "prettier-2": "npm:prettier@^2", - "prisma": "^5.4.2", - "reflect-metadata": "^0.1.13", - "ts-jest": "~29.1.1", - "ts-node": "^10.9.1", + "prisma": "^5.18.0", + "reflect-metadata": "0.1.13", + "ts-jest": "~29.2.4", + "ts-node": "^10.9.2", "ts-toolbelt": "^9.6.0", - "tslib": "^2.6.2", - "type-graphql": "2.0.0-beta.3", - "typescript": "~5.2.2" + "tslib": "^2.6.3", + "type-graphql": "2.0.0-rc.2", + "typescript": "~5.5.4" }, "license": "MIT", "engines": { - "node": ">=12.4" + "node": ">=20.11.1" }, "author": { "name": "Michał Lytek", diff --git a/src/generator/args-class.ts b/src/generator/args-class.ts index 041d4ab6f..82e86d069 100644 --- a/src/generator/args-class.ts +++ b/src/generator/args-class.ts @@ -19,7 +19,7 @@ import { DMMF } from "./dmmf/types"; export default function generateArgsTypeClassFromArgs( project: Project, generateDirPath: string, - fields: DMMF.SchemaArg[], + fields: readonly DMMF.SchemaArg[], argsTypeName: string, dmmfDocument: DmmfDocument, inputImportsLevel = 3, diff --git a/src/generator/config.ts b/src/generator/config.ts index 51e536ef7..b90248a3c 100644 --- a/src/generator/config.ts +++ b/src/generator/config.ts @@ -21,6 +21,7 @@ export type SupportedQueries = (typeof supportedQueryActions)[number]; export const supportedMutationActions = [ "createOne", "createMany", + "createManyAndReturn", "deleteOne", "updateOne", "deleteMany", diff --git a/src/generator/dmmf/transform.ts b/src/generator/dmmf/transform.ts index 22a4a2040..85da59b17 100644 --- a/src/generator/dmmf/transform.ts +++ b/src/generator/dmmf/transform.ts @@ -42,7 +42,7 @@ export function transformSchema( } export function transformMappings( - mapping: PrismaDMMF.ModelMapping[], + mapping: readonly PrismaDMMF.ModelMapping[], dmmfDocument: DmmfDocument, options: GeneratorOptions, ): DMMF.ModelMapping[] { @@ -89,8 +89,8 @@ function transformModelField(dmmfDocument: DmmfDocument) { field.kind === "enum" ? "enumTypes" : field.kind === "object" - ? "outputObjectTypes" - : "scalar"; + ? "outputObjectTypes" + : "scalar"; if (typeof field.type !== "string") { throw new Error( `[Internal Generator Error] Unexpected 'field.type' value: "${field.type}""`, @@ -183,15 +183,17 @@ function transformInputType(dmmfDocument: DmmfDocument) { const isOmitted = !modelField?.isOmitted.input ? false : typeof modelField.isOmitted.input === "boolean" - ? modelField.isOmitted.input - : (modelField.isOmitted.input.includes(InputOmitSetting.Create) && - inputType.name.includes("Create")) || - (modelField.isOmitted.input.includes(InputOmitSetting.Update) && - inputType.name.includes("Update")) || - (modelField.isOmitted.input.includes(InputOmitSetting.Where) && - inputType.name.includes("Where")) || - (modelField.isOmitted.input.includes(InputOmitSetting.OrderBy) && - inputType.name.includes("OrderBy")); + ? modelField.isOmitted.input + : (modelField.isOmitted.input.includes(InputOmitSetting.Create) && + inputType.name.includes("Create")) || + (modelField.isOmitted.input.includes(InputOmitSetting.Update) && + inputType.name.includes("Update")) || + (modelField.isOmitted.input.includes(InputOmitSetting.Where) && + inputType.name.includes("Where")) || + (modelField.isOmitted.input.includes( + InputOmitSetting.OrderBy, + ) && + inputType.name.includes("OrderBy")); return { ...field, selectedInputType, @@ -290,6 +292,18 @@ export function getMappedOutputTypeName( return `Aggregate${modelTypeName}`; } + if ( + outputTypeName.startsWith("CreateMany") && + outputTypeName.endsWith("AndReturnOutputType") + ) { + const modelTypeName = dmmfDocument.getModelTypeName( + outputTypeName + .replace("CreateMany", "") + .replace("AndReturnOutputType", ""), + ); + return `CreateManyAndReturn${modelTypeName}`; + } + if (dmmfDocument.isModelName(outputTypeName)) { return dmmfDocument.getModelTypeName(outputTypeName)!; } @@ -395,9 +409,11 @@ function transformMapping( } function selectInputTypeFromTypes(dmmfDocument: DmmfDocument) { - return (inputTypes: PrismaDMMF.InputTypeRef[]): DMMF.SchemaArgInputType => { + return ( + inputTypes: readonly PrismaDMMF.InputTypeRef[], + ): DMMF.SchemaArgInputType => { const { useUncheckedScalarInputs, useSimpleInputs } = dmmfDocument.options; - let possibleInputTypes: PrismaDMMF.InputTypeRef[]; + let possibleInputTypes: readonly PrismaDMMF.InputTypeRef[]; possibleInputTypes = inputTypes.filter( it => it.location === "inputObjectTypes" && diff --git a/src/generator/dmmf/types.ts b/src/generator/dmmf/types.ts index bfe4da357..348b59efb 100644 --- a/src/generator/dmmf/types.ts +++ b/src/generator/dmmf/types.ts @@ -1,14 +1,18 @@ import { InputOmitSetting } from "../config"; +export type ReadonlyDeep = { + +readonly [K in keyof O]: ReadonlyDeep; +}; + export namespace DMMF { - export interface Document { + export type Document = ReadonlyDeep<{ datamodel: Datamodel; schema: Schema; // mappings: Mappings; // additional props: modelMappings: ModelMapping[]; - } - export interface Enum { + }>; + export type Enum = ReadonlyDeep<{ name: string; // values: EnumValue[]; dbName?: string | null; @@ -17,21 +21,21 @@ export namespace DMMF { typeName: string; docs: string | undefined; valuesMap: Array<{ name: string; value: string }>; - } - export interface Datamodel { + }>; + export type Datamodel = ReadonlyDeep<{ models: Model[]; enums: Enum[]; types: Model[]; - } - export interface UniqueIndex { + }>; + export type UniqueIndex = ReadonlyDeep<{ name: string; fields: string[]; - } - export interface PrimaryKey { + }>; + export type PrimaryKey = ReadonlyDeep<{ name: string | null; fields: string[]; - } - export interface Model { + }>; + export type Model = ReadonlyDeep<{ name: string; dbName: string | null; fields: ModelField[]; @@ -45,7 +49,7 @@ export namespace DMMF { docs: string | undefined; plural: string | undefined; isOmitted: { output: boolean }; - } + }>; export type FieldKind = "scalar" | "object" | "enum" | "unsupported"; export type FieldNamespace = "model" | "prisma"; export type FieldLocation = @@ -55,7 +59,7 @@ export namespace DMMF { | "enumTypes" | "fieldRefTypes"; // Field - export interface ModelField { + export type ModelField = ReadonlyDeep<{ // kind: FieldKind; name: string; isRequired: boolean; @@ -70,7 +74,7 @@ export namespace DMMF { hasDefaultValue: boolean; default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[]; relationFromFields?: string[]; - relationToFields?: any[]; + relationToFields?: string[]; relationOnDelete?: string; relationName?: string; // documentation?: string; @@ -83,13 +87,13 @@ export namespace DMMF { fieldTSType: string; docs: string | undefined; isOmitted: { input: boolean | InputOmitSetting[]; output: boolean }; - } - export interface FieldDefault { + }>; + export type FieldDefault = ReadonlyDeep<{ name: string; args: any[]; - } + }>; export type FieldDefaultScalar = string | boolean | number; - export interface Schema { + export type Schema = ReadonlyDeep<{ rootQueryType?: string; rootMutationType?: string; inputTypes: InputType[]; @@ -98,17 +102,17 @@ export namespace DMMF { // fieldRefTypes: { // prisma?: FieldRefType[]; // }; - } - export interface Query { + }>; + export type Query = ReadonlyDeep<{ name: string; args: SchemaArg[]; output: QueryOutput; - } - export interface QueryOutput { + }>; + export type QueryOutput = ReadonlyDeep<{ name: string; isRequired: boolean; isList: boolean; - } + }>; export type TypeRef = { isList: boolean; type: string; @@ -119,15 +123,15 @@ export namespace DMMF { "scalar" | "inputObjectTypes" | "enumTypes" | "fieldRefTypes" >; export type ArgType = string | InputType | Enum; - export interface SchemaArgInputType { + export type SchemaArgInputType = ReadonlyDeep<{ isList: boolean; // type: ArgType; location: FieldLocation; namespace?: FieldNamespace; // additional props type: string; - } - export interface SchemaArg { + }>; + export type SchemaArg = ReadonlyDeep<{ name: string; comment?: string; isNullable: boolean; @@ -141,15 +145,15 @@ export namespace DMMF { fieldTSType: string; hasMappedName: boolean; isOmitted: boolean; - } - export interface OutputType { + }>; + export type OutputType = ReadonlyDeep<{ name: string; // fields: SchemaField[]; // additional props: fields: OutputSchemaField[]; typeName: string; - } - export interface SchemaField { + }>; + export type SchemaField = ReadonlyDeep<{ name: string; isNullable?: boolean; // outputType: OutputTypeRef; @@ -161,29 +165,30 @@ export namespace DMMF { typeGraphQLType: string; fieldTSType: string; isRequired: boolean; - } + }>; export type OutputTypeRef = TypeRef< "scalar" | "outputObjectTypes" | "enumTypes" >; - export interface Deprecation { + export type Deprecation = ReadonlyDeep<{ sinceVersion: string; reason: string; plannedRemovalVersion?: string; - } + }>; // named subtype of SchemaField->outputType - export interface TypeInfo { + export type TypeInfo = ReadonlyDeep<{ // type: string | OutputType | SchemaEnum; isList: boolean; location: FieldLocation; namespace?: FieldNamespace; // additional props: type: string; - } + }>; // additional type - export interface OutputSchemaField extends SchemaField { - argsTypeName: string | undefined; - } - export interface InputType { + export type OutputSchemaField = SchemaField & + ReadonlyDeep<{ + argsTypeName: string | undefined; + }>; + export type InputType = ReadonlyDeep<{ name: string; constraints: { maxNumFields: number | null; @@ -195,14 +200,14 @@ export namespace DMMF { fields: SchemaArg[]; // additional props: typeName: string; - } - export interface FieldRefType { + }>; + export type FieldRefType = ReadonlyDeep<{ name: string; allowTypes: FieldRefAllowType[]; fields: SchemaArg[]; - } + }>; export type FieldRefAllowType = TypeRef<"scalar" | "enumTypes">; - export interface ModelMapping { + export type ModelMapping = ReadonlyDeep<{ // model: string; // plural: string; // findUnique?: string | null; @@ -212,6 +217,7 @@ export namespace DMMF { // findMany?: string | null; // createOne?: string | null; // createMany?: string | null; + // createManyAndReturn?: string | null; // updateOne?: string | null; // updateMany?: string | null; // upsertOne?: string | null; @@ -229,7 +235,7 @@ export namespace DMMF { collectionName: string; resolverName: string; modelTypeName: string; - } + }>; export enum ModelAction { findUnique = "findUnique", findUniqueOrThrow = "findUniqueOrThrow", @@ -238,6 +244,7 @@ export namespace DMMF { findMany = "findMany", createOne = "createOne", createMany = "createMany", + createManyAndReturn = "createManyAndReturn", updateOne = "updateOne", updateMany = "updateMany", upsertOne = "upsertOne", @@ -250,7 +257,7 @@ export namespace DMMF { aggregateRaw = "aggregateRaw", } // additional type - export interface Action { + export type Action = ReadonlyDeep<{ name: string; fieldName: string; kind: ModelAction; @@ -262,17 +269,18 @@ export namespace DMMF { actionResolverName: string; returnTSType: string; typeGraphQLType: string; - } + }>; // additional type - export interface RelationModel { + export type RelationModel = ReadonlyDeep<{ model: Model; outputType: OutputType; relationFields: RelationField[]; resolverName: string; - } + }>; // additional type - export interface RelationField extends ModelField { - outputTypeField: OutputSchemaField; - argsTypeName: string | undefined; - } + export type RelationField = ModelField & + ReadonlyDeep<{ + outputTypeField: OutputSchemaField; + argsTypeName: string | undefined; + }>; } diff --git a/src/generator/generate-enhance.ts b/src/generator/generate-enhance.ts index f339e84db..e750b8129 100644 --- a/src/generator/generate-enhance.ts +++ b/src/generator/generate-enhance.ts @@ -14,11 +14,11 @@ import { DMMF } from "./dmmf/types"; export function generateEnhanceMap( sourceFile: SourceFile, dmmfDocument: DmmfDocument, - modelMappings: DMMF.ModelMapping[], - relationModels: DMMF.RelationModel[], - models: DMMF.Model[], - inputs: DMMF.InputType[], - outputs: DMMF.OutputType[], + modelMappings: readonly DMMF.ModelMapping[], + relationModels: readonly DMMF.RelationModel[], + models: readonly DMMF.Model[], + inputs: readonly DMMF.InputType[], + outputs: readonly DMMF.OutputType[], ) { const hasRelations = relationModels.length > 0; diff --git a/src/generator/type-class.ts b/src/generator/type-class.ts index a50eb4f03..654c81d4f 100644 --- a/src/generator/type-class.ts +++ b/src/generator/type-class.ts @@ -19,6 +19,7 @@ import { generatePrismaNamespaceImport, generateOutputsImports, generateCustomScalarsImport, + generateModelsImports, } from "./imports"; import { DmmfDocument } from "./dmmf/dmmf-document"; import { DMMF } from "./dmmf/types"; @@ -36,9 +37,16 @@ export function generateOutputTypeClassFromType( const sourceFile = project.createSourceFile(filePath, undefined, { overwrite: true, }); + const fieldArgsTypeNames = type.fields .filter(it => it.argsTypeName) .map(it => it.argsTypeName!); + const outputObjectTypes = type.fields.filter( + field => field.outputType.location === "outputObjectTypes", + ); + const outputObjectModelTypes = outputObjectTypes.filter(field => + dmmfDocument.isModelTypeName(field.outputType.type), + ); generateTypeGraphQLImport(sourceFile); generateGraphQLScalarsImport(sourceFile); @@ -47,11 +55,16 @@ export function generateOutputTypeClassFromType( generateArgsImports(sourceFile, fieldArgsTypeNames, 0); generateOutputsImports( sourceFile, - type.fields - .filter(field => field.outputType.location === "outputObjectTypes") + outputObjectTypes + .filter(field => !outputObjectModelTypes.includes(field)) .map(field => field.outputType.type), 1, ); + generateModelsImports( + sourceFile, + outputObjectModelTypes.map(field => field.outputType.type), + 2, + ); generateEnumsImports( sourceFile, type.fields diff --git a/tests/functional/__snapshots__/integration.ts.snap b/tests/functional/__snapshots__/integration.ts.snap index c1aa10834..c4348fdbc 100644 --- a/tests/functional/__snapshots__/integration.ts.snap +++ b/tests/functional/__snapshots__/integration.ts.snap @@ -32,6 +32,19 @@ enum Color { RED } +type CreateManyAndReturnPost { + author: User! + authorId: Int! + color: Color! + content: String! + uuid: String! +} + +type CreateManyAndReturnUser { + id: Int! + name: String +} + input EnumColorFieldUpdateOperationsInput { set: Color } @@ -81,6 +94,8 @@ input IntWithAggregatesFilter { } type Mutation { + createManyAndReturnPost(data: [PostCreateManyInput!]!, skipDuplicates: Boolean): [CreateManyAndReturnPost!]! + createManyAndReturnUser(data: [UserCreateManyInput!]!, skipDuplicates: Boolean): [CreateManyAndReturnUser!]! createManyPost(data: [PostCreateManyInput!]!, skipDuplicates: Boolean): AffectedRowsOutput! createManyUser(data: [UserCreateManyInput!]!, skipDuplicates: Boolean): AffectedRowsOutput! createOnePost(data: PostCreateInput!): Post! @@ -787,6 +802,7 @@ exports[`generator integration should generates TypeGraphQL classes files to out [crud] [Post] AggregatePostResolver.ts + CreateManyAndReturnPostResolver.ts CreateManyPostResolver.ts CreateOnePostResolver.ts DeleteManyPostResolver.ts @@ -803,6 +819,7 @@ exports[`generator integration should generates TypeGraphQL classes files to out UpsertOnePostResolver.ts [args] AggregatePostArgs.ts + CreateManyAndReturnPostArgs.ts CreateManyPostArgs.ts CreateOnePostArgs.ts DeleteManyPostArgs.ts @@ -819,6 +836,7 @@ exports[`generator integration should generates TypeGraphQL classes files to out index.ts [User] AggregateUserResolver.ts + CreateManyAndReturnUserResolver.ts CreateManyUserResolver.ts CreateOneUserResolver.ts DeleteManyUserResolver.ts @@ -835,6 +853,7 @@ exports[`generator integration should generates TypeGraphQL classes files to out UserCrudResolver.ts [args] AggregateUserArgs.ts + CreateManyAndReturnUserArgs.ts CreateManyUserArgs.ts CreateOneUserArgs.ts DeleteManyUserArgs.ts @@ -931,6 +950,8 @@ exports[`generator integration should generates TypeGraphQL classes files to out AffectedRowsOutput.ts AggregatePost.ts AggregateUser.ts + CreateManyAndReturnPost.ts + CreateManyAndReturnUser.ts PostAvgAggregate.ts PostCountAggregate.ts PostGroupBy.ts diff --git a/tests/regression/__snapshots__/crud.ts.snap b/tests/regression/__snapshots__/crud.ts.snap index 022a9615d..99e13b209 100644 --- a/tests/regression/__snapshots__/crud.ts.snap +++ b/tests/regression/__snapshots__/crud.ts.snap @@ -1,5 +1,29 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`crud should properly generate actions resolver classes for prisma model: CreateManyAndReturnUserResolver 1`] = ` +"import * as TypeGraphQL from \\"type-graphql\\"; +import type { GraphQLResolveInfo } from \\"graphql\\"; +import { CreateManyAndReturnUserArgs } from \\"./args/CreateManyAndReturnUserArgs\\"; +import { User } from \\"../../../models/User\\"; +import { CreateManyAndReturnUser } from \\"../../outputs/CreateManyAndReturnUser\\"; +import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldIntoSelectRelationsCount } from \\"../../../helpers\\"; + +@TypeGraphQL.Resolver(_of => User) +export class CreateManyAndReturnUserResolver { + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnUser], { + nullable: false + }) + async createManyAndReturnUser(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: CreateManyAndReturnUserArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).user.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } +} +" +`; + exports[`crud should properly generate actions resolver classes for prisma model: CreateManyUserResolver 1`] = ` "import * as TypeGraphQL from \\"type-graphql\\"; import type { GraphQLResolveInfo } from \\"graphql\\"; @@ -315,6 +339,7 @@ export class UpsertOneUserResolver { exports[`crud should properly generate actions resolver classes for prisma model: actionsIndex 1`] = ` "export { AggregateUserResolver } from \\"./User/AggregateUserResolver\\"; export { CreateManyUserResolver } from \\"./User/CreateManyUserResolver\\"; +export { CreateManyAndReturnUserResolver } from \\"./User/CreateManyAndReturnUserResolver\\"; export { CreateOneUserResolver } from \\"./User/CreateOneUserResolver\\"; export { DeleteManyUserResolver } from \\"./User/DeleteManyUserResolver\\"; export { DeleteOneUserResolver } from \\"./User/DeleteOneUserResolver\\"; @@ -377,6 +402,26 @@ export class AggregateUserArgs { " `; +exports[`crud should properly generate args classes for every method of crud resolver: CreateManyAndReturnUserArgs 1`] = ` +"import * as TypeGraphQL from \\"type-graphql\\"; +import * as GraphQLScalars from \\"graphql-scalars\\"; +import { UserCreateManyInput } from \\"../../../inputs/UserCreateManyInput\\"; + +@TypeGraphQL.ArgsType() +export class CreateManyAndReturnUserArgs { + @TypeGraphQL.Field(_type => [UserCreateManyInput], { + nullable: false + }) + data!: UserCreateManyInput[]; + + @TypeGraphQL.Field(_type => Boolean, { + nullable: true + }) + skipDuplicates?: boolean | undefined; +} +" +`; + exports[`crud should properly generate args classes for every method of crud resolver: CreateManyUserArgs 1`] = ` "import * as TypeGraphQL from \\"type-graphql\\"; import * as GraphQLScalars from \\"graphql-scalars\\"; @@ -646,6 +691,7 @@ export class GroupByUserArgs { exports[`crud should properly generate args classes for every method of crud resolver: Index 1`] = ` "export { AggregateUserArgs } from \\"./AggregateUserArgs\\"; +export { CreateManyAndReturnUserArgs } from \\"./CreateManyAndReturnUserArgs\\"; export { CreateManyUserArgs } from \\"./CreateManyUserArgs\\"; export { CreateOneUserArgs } from \\"./CreateOneUserArgs\\"; export { DeleteManyUserArgs } from \\"./DeleteManyUserArgs\\"; @@ -899,6 +945,7 @@ export class FindManyFirstModelArgs { exports[`crud should properly generate args classes for sorting by many-to-many relation fields: index 1`] = ` "export { AggregateFirstModelArgs } from \\"./AggregateFirstModelArgs\\"; +export { CreateManyAndReturnFirstModelArgs } from \\"./CreateManyAndReturnFirstModelArgs\\"; export { CreateManyFirstModelArgs } from \\"./CreateManyFirstModelArgs\\"; export { CreateOneFirstModelArgs } from \\"./CreateOneFirstModelArgs\\"; export { DeleteManyFirstModelArgs } from \\"./DeleteManyFirstModelArgs\\"; @@ -1040,6 +1087,7 @@ export class FindManySecondModelArgs { exports[`crud should properly generate args classes for sorting by one-to-many relation fields: index 1`] = ` "export { AggregateSecondModelArgs } from \\"./AggregateSecondModelArgs\\"; +export { CreateManyAndReturnSecondModelArgs } from \\"./CreateManyAndReturnSecondModelArgs\\"; export { CreateManySecondModelArgs } from \\"./CreateManySecondModelArgs\\"; export { CreateOneSecondModelArgs } from \\"./CreateOneSecondModelArgs\\"; export { DeleteManySecondModelArgs } from \\"./DeleteManySecondModelArgs\\"; @@ -1067,6 +1115,7 @@ exports[`crud should properly generate resolver class for single prisma model: U "import * as TypeGraphQL from \\"type-graphql\\"; import type { GraphQLResolveInfo } from \\"graphql\\"; import { AggregateUserArgs } from \\"./args/AggregateUserArgs\\"; +import { CreateManyAndReturnUserArgs } from \\"./args/CreateManyAndReturnUserArgs\\"; import { CreateManyUserArgs } from \\"./args/CreateManyUserArgs\\"; import { CreateOneUserArgs } from \\"./args/CreateOneUserArgs\\"; import { DeleteManyUserArgs } from \\"./args/DeleteManyUserArgs\\"; @@ -1084,6 +1133,7 @@ import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldI import { User } from \\"../../../models/User\\"; import { AffectedRowsOutput } from \\"../../outputs/AffectedRowsOutput\\"; import { AggregateUser } from \\"../../outputs/AggregateUser\\"; +import { CreateManyAndReturnUser } from \\"../../outputs/CreateManyAndReturnUser\\"; import { UserGroupBy } from \\"../../outputs/UserGroupBy\\"; @TypeGraphQL.Resolver(_of => User) @@ -1109,6 +1159,17 @@ export class UserCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnUser], { + nullable: false + }) + async createManyAndReturnUser(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: CreateManyAndReturnUserArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).user.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => User, { nullable: false }) @@ -1249,6 +1310,7 @@ export class UserCrudResolver { exports[`crud should properly generate resolver class for single prisma model: actionsIndex 1`] = ` "export { AggregateUserResolver } from \\"./User/AggregateUserResolver\\"; export { CreateManyUserResolver } from \\"./User/CreateManyUserResolver\\"; +export { CreateManyAndReturnUserResolver } from \\"./User/CreateManyAndReturnUserResolver\\"; export { CreateOneUserResolver } from \\"./User/CreateOneUserResolver\\"; export { DeleteManyUserResolver } from \\"./User/DeleteManyUserResolver\\"; export { DeleteOneUserResolver } from \\"./User/DeleteOneUserResolver\\"; @@ -1300,6 +1362,7 @@ exports[`crud should properly generate resolver class when cannot pluralize mode "import * as TypeGraphQL from \\"type-graphql\\"; import type { GraphQLResolveInfo } from \\"graphql\\"; import { AggregateStaffArgs } from \\"./args/AggregateStaffArgs\\"; +import { CreateManyAndReturnStaffArgs } from \\"./args/CreateManyAndReturnStaffArgs\\"; import { CreateManyStaffArgs } from \\"./args/CreateManyStaffArgs\\"; import { CreateOneStaffArgs } from \\"./args/CreateOneStaffArgs\\"; import { DeleteManyStaffArgs } from \\"./args/DeleteManyStaffArgs\\"; @@ -1317,6 +1380,7 @@ import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldI import { Staff } from \\"../../../models/Staff\\"; import { AffectedRowsOutput } from \\"../../outputs/AffectedRowsOutput\\"; import { AggregateStaff } from \\"../../outputs/AggregateStaff\\"; +import { CreateManyAndReturnStaff } from \\"../../outputs/CreateManyAndReturnStaff\\"; import { StaffGroupBy } from \\"../../outputs/StaffGroupBy\\"; @TypeGraphQL.Resolver(_of => Staff) @@ -1342,6 +1406,17 @@ export class StaffCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnStaff], { + nullable: false + }) + async createManyAndReturnStaff(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: CreateManyAndReturnStaffArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).staff.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => Staff, { nullable: false }) @@ -1483,6 +1558,7 @@ exports[`crud should properly generate resolver class when cannot pluralize mode "import * as TypeGraphQL from \\"type-graphql\\"; import type { GraphQLResolveInfo } from \\"graphql\\"; import { AggregateStaffArgs } from \\"./args/AggregateStaffArgs\\"; +import { CreateManyAndReturnStaffArgs } from \\"./args/CreateManyAndReturnStaffArgs\\"; import { CreateManyStaffArgs } from \\"./args/CreateManyStaffArgs\\"; import { CreateOneStaffArgs } from \\"./args/CreateOneStaffArgs\\"; import { DeleteManyStaffArgs } from \\"./args/DeleteManyStaffArgs\\"; @@ -1500,6 +1576,7 @@ import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldI import { Staff } from \\"../../../models/Staff\\"; import { AffectedRowsOutput } from \\"../../outputs/AffectedRowsOutput\\"; import { AggregateStaff } from \\"../../outputs/AggregateStaff\\"; +import { CreateManyAndReturnStaff } from \\"../../outputs/CreateManyAndReturnStaff\\"; import { StaffGroupBy } from \\"../../outputs/StaffGroupBy\\"; @TypeGraphQL.Resolver(_of => Staff) @@ -1525,6 +1602,17 @@ export class StaffCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnStaff], { + nullable: false + }) + async createManyAndReturnStaff(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: CreateManyAndReturnStaffArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).staff.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => Staff, { nullable: false }) @@ -1712,6 +1800,7 @@ exports[`crud should properly generate resolver class when useOriginalMapping is "import * as TypeGraphQL from \\"type-graphql\\"; import type { GraphQLResolveInfo } from \\"graphql\\"; import { AggregateUserArgs } from \\"./args/AggregateUserArgs\\"; +import { CreateManyAndReturnUserArgs } from \\"./args/CreateManyAndReturnUserArgs\\"; import { CreateManyUserArgs } from \\"./args/CreateManyUserArgs\\"; import { CreateOneUserArgs } from \\"./args/CreateOneUserArgs\\"; import { DeleteManyUserArgs } from \\"./args/DeleteManyUserArgs\\"; @@ -1729,6 +1818,7 @@ import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldI import { User } from \\"../../../models/User\\"; import { AffectedRowsOutput } from \\"../../outputs/AffectedRowsOutput\\"; import { AggregateUser } from \\"../../outputs/AggregateUser\\"; +import { CreateManyAndReturnUser } from \\"../../outputs/CreateManyAndReturnUser\\"; import { UserGroupBy } from \\"../../outputs/UserGroupBy\\"; @TypeGraphQL.Resolver(_of => User) @@ -1754,6 +1844,17 @@ export class UserCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnUser], { + nullable: false + }) + async createManyAndReturnUser(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: CreateManyAndReturnUserArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).user.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => User, { nullable: false }) @@ -1895,6 +1996,7 @@ exports[`crud when emitRedundantTypesInfo is set to true should properly generat "import * as TypeGraphQL from \\"type-graphql\\"; import type { GraphQLResolveInfo } from \\"graphql\\"; import { AggregateUserArgs } from \\"./args/AggregateUserArgs\\"; +import { CreateManyAndReturnUserArgs } from \\"./args/CreateManyAndReturnUserArgs\\"; import { CreateManyUserArgs } from \\"./args/CreateManyUserArgs\\"; import { CreateOneUserArgs } from \\"./args/CreateOneUserArgs\\"; import { DeleteManyUserArgs } from \\"./args/DeleteManyUserArgs\\"; @@ -1912,6 +2014,7 @@ import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldI import { User } from \\"../../../models/User\\"; import { AffectedRowsOutput } from \\"../../outputs/AffectedRowsOutput\\"; import { AggregateUser } from \\"../../outputs/AggregateUser\\"; +import { CreateManyAndReturnUser } from \\"../../outputs/CreateManyAndReturnUser\\"; import { UserGroupBy } from \\"../../outputs/UserGroupBy\\"; @TypeGraphQL.Resolver(_of => User) @@ -1937,6 +2040,17 @@ export class UserCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnUser], { + nullable: false + }) + async createManyAndReturnUser(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_type => CreateManyAndReturnUserArgs) args: CreateManyAndReturnUserArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).user.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => User, { nullable: false }) @@ -2081,6 +2195,7 @@ exports.UserCrudResolver = void 0; const tslib_1 = require(\\"tslib\\"); const TypeGraphQL = tslib_1.__importStar(require(\\"type-graphql\\")); const AggregateUserArgs_1 = require(\\"./args/AggregateUserArgs\\"); +const CreateManyAndReturnUserArgs_1 = require(\\"./args/CreateManyAndReturnUserArgs\\"); const CreateManyUserArgs_1 = require(\\"./args/CreateManyUserArgs\\"); const CreateOneUserArgs_1 = require(\\"./args/CreateOneUserArgs\\"); const DeleteManyUserArgs_1 = require(\\"./args/DeleteManyUserArgs\\"); @@ -2098,6 +2213,7 @@ const helpers_1 = require(\\"../../../helpers\\"); const User_1 = require(\\"../../../models/User\\"); const AffectedRowsOutput_1 = require(\\"../../outputs/AffectedRowsOutput\\"); const AggregateUser_1 = require(\\"../../outputs/AggregateUser\\"); +const CreateManyAndReturnUser_1 = require(\\"../../outputs/CreateManyAndReturnUser\\"); const UserGroupBy_1 = require(\\"../../outputs/UserGroupBy\\"); let UserCrudResolver = class UserCrudResolver { async aggregateUser(ctx, info, args) { @@ -2113,6 +2229,13 @@ let UserCrudResolver = class UserCrudResolver { ...(_count && (0, helpers_1.transformCountFieldIntoSelectRelationsCount)(_count)), }); } + async createManyAndReturnUser(ctx, info, args) { + const { _count } = (0, helpers_1.transformInfoIntoPrismaArgs)(info); + return (0, helpers_1.getPrismaFromContext)(ctx).user.createManyAndReturn({ + ...args, + ...(_count && (0, helpers_1.transformCountFieldIntoSelectRelationsCount)(_count)), + }); + } async createOneUser(ctx, info, args) { const { _count } = (0, helpers_1.transformInfoIntoPrismaArgs)(info); return (0, helpers_1.getPrismaFromContext)(ctx).user.create({ @@ -2221,6 +2344,17 @@ tslib_1.__decorate([ tslib_1.__metadata(\\"design:paramtypes\\", [Object, Object, CreateManyUserArgs_1.CreateManyUserArgs]), tslib_1.__metadata(\\"design:returntype\\", Promise) ], UserCrudResolver.prototype, \\"createManyUser\\", null); +tslib_1.__decorate([ + TypeGraphQL.Mutation(_returns => [CreateManyAndReturnUser_1.CreateManyAndReturnUser], { + nullable: false + }), + tslib_1.__param(0, TypeGraphQL.Ctx()), + tslib_1.__param(1, TypeGraphQL.Info()), + tslib_1.__param(2, TypeGraphQL.Args()), + tslib_1.__metadata(\\"design:type\\", Function), + tslib_1.__metadata(\\"design:paramtypes\\", [Object, Object, CreateManyAndReturnUserArgs_1.CreateManyAndReturnUserArgs]), + tslib_1.__metadata(\\"design:returntype\\", Promise) +], UserCrudResolver.prototype, \\"createManyAndReturnUser\\", null); tslib_1.__decorate([ TypeGraphQL.Mutation(_returns => User_1.User, { nullable: false @@ -2363,6 +2497,7 @@ exports[`crud when formatGeneratedCode is set to 'prettier' should properly form "import * as TypeGraphQL from \\"type-graphql\\"; import type { GraphQLResolveInfo } from \\"graphql\\"; import { AggregateUserArgs } from \\"./args/AggregateUserArgs\\"; +import { CreateManyAndReturnUserArgs } from \\"./args/CreateManyAndReturnUserArgs\\"; import { CreateManyUserArgs } from \\"./args/CreateManyUserArgs\\"; import { CreateOneUserArgs } from \\"./args/CreateOneUserArgs\\"; import { DeleteManyUserArgs } from \\"./args/DeleteManyUserArgs\\"; @@ -2384,6 +2519,7 @@ import { import { User } from \\"../../../models/User\\"; import { AffectedRowsOutput } from \\"../../outputs/AffectedRowsOutput\\"; import { AggregateUser } from \\"../../outputs/AggregateUser\\"; +import { CreateManyAndReturnUser } from \\"../../outputs/CreateManyAndReturnUser\\"; import { UserGroupBy } from \\"../../outputs/UserGroupBy\\"; @TypeGraphQL.Resolver(_of => User) @@ -2417,6 +2553,21 @@ export class UserCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnUser], { + nullable: false, + }) + async createManyAndReturnUser( + @TypeGraphQL.Ctx() ctx: any, + @TypeGraphQL.Info() info: GraphQLResolveInfo, + @TypeGraphQL.Args() args: CreateManyAndReturnUserArgs, + ): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).user.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => User, { nullable: false, }) @@ -2609,6 +2760,7 @@ exports[`crud when formatGeneratedCode is set to false should not format generat "import * as TypeGraphQL from \\"type-graphql\\"; import type { GraphQLResolveInfo } from \\"graphql\\"; import { AggregateUserArgs } from \\"./args/AggregateUserArgs\\"; +import { CreateManyAndReturnUserArgs } from \\"./args/CreateManyAndReturnUserArgs\\"; import { CreateManyUserArgs } from \\"./args/CreateManyUserArgs\\"; import { CreateOneUserArgs } from \\"./args/CreateOneUserArgs\\"; import { DeleteManyUserArgs } from \\"./args/DeleteManyUserArgs\\"; @@ -2626,6 +2778,7 @@ import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldI import { User } from \\"../../../models/User\\"; import { AffectedRowsOutput } from \\"../../outputs/AffectedRowsOutput\\"; import { AggregateUser } from \\"../../outputs/AggregateUser\\"; +import { CreateManyAndReturnUser } from \\"../../outputs/CreateManyAndReturnUser\\"; import { UserGroupBy } from \\"../../outputs/UserGroupBy\\"; @TypeGraphQL.Resolver(_of => User) @@ -2651,6 +2804,17 @@ export class UserCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnUser], { + nullable: false + }) + async createManyAndReturnUser(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: CreateManyAndReturnUserArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).user.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => User, { nullable: false }) @@ -2811,6 +2975,30 @@ export class AggregateClientResolver { " `; +exports[`crud when model is renamed should properly generate actions resolver classes for prisma model: CreateManyAndReturnClientResolver 1`] = ` +"import * as TypeGraphQL from \\"type-graphql\\"; +import type { GraphQLResolveInfo } from \\"graphql\\"; +import { CreateManyAndReturnClientArgs } from \\"./args/CreateManyAndReturnClientArgs\\"; +import { Client } from \\"../../../models/Client\\"; +import { CreateManyAndReturnClient } from \\"../../outputs/CreateManyAndReturnClient\\"; +import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldIntoSelectRelationsCount } from \\"../../../helpers\\"; + +@TypeGraphQL.Resolver(_of => Client) +export class CreateManyAndReturnClientResolver { + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnClient], { + nullable: false + }) + async createManyAndReturnClient(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: CreateManyAndReturnClientArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).user.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } +} +" +`; + exports[`crud when model is renamed should properly generate actions resolver classes for prisma model: CreateManyClientResolver 1`] = ` "import * as TypeGraphQL from \\"type-graphql\\"; import type { GraphQLResolveInfo } from \\"graphql\\"; @@ -3122,6 +3310,26 @@ export class CreateOneClientArgs { " `; +exports[`crud when model is renamed should properly generate args classes for every method of crud resolver: CreateManyAndReturnClientArgs 1`] = ` +"import * as TypeGraphQL from \\"type-graphql\\"; +import * as GraphQLScalars from \\"graphql-scalars\\"; +import { ClientCreateManyInput } from \\"../../../inputs/ClientCreateManyInput\\"; + +@TypeGraphQL.ArgsType() +export class CreateManyAndReturnClientArgs { + @TypeGraphQL.Field(_type => [ClientCreateManyInput], { + nullable: false + }) + data!: ClientCreateManyInput[]; + + @TypeGraphQL.Field(_type => Boolean, { + nullable: true + }) + skipDuplicates?: boolean | undefined; +} +" +`; + exports[`crud when model is renamed should properly generate args classes for every method of crud resolver: CreateManyClientArgs 1`] = ` "import * as TypeGraphQL from \\"type-graphql\\"; import * as GraphQLScalars from \\"graphql-scalars\\"; @@ -3318,6 +3526,7 @@ export class GroupByClientArgs { exports[`crud when model is renamed should properly generate args classes for every method of crud resolver: Index 1`] = ` "export { AggregateClientArgs } from \\"./AggregateClientArgs\\"; +export { CreateManyAndReturnClientArgs } from \\"./CreateManyAndReturnClientArgs\\"; export { CreateManyClientArgs } from \\"./CreateManyClientArgs\\"; export { CreateOneClientArgs } from \\"./CreateOneClientArgs\\"; export { DeleteManyClientArgs } from \\"./DeleteManyClientArgs\\"; @@ -3430,6 +3639,7 @@ exports[`crud when model is renamed should properly generate resolver class for "import * as TypeGraphQL from \\"type-graphql\\"; import type { GraphQLResolveInfo } from \\"graphql\\"; import { AggregateClientArgs } from \\"./args/AggregateClientArgs\\"; +import { CreateManyAndReturnClientArgs } from \\"./args/CreateManyAndReturnClientArgs\\"; import { CreateManyClientArgs } from \\"./args/CreateManyClientArgs\\"; import { CreateOneClientArgs } from \\"./args/CreateOneClientArgs\\"; import { DeleteManyClientArgs } from \\"./args/DeleteManyClientArgs\\"; @@ -3448,6 +3658,7 @@ import { Client } from \\"../../../models/Client\\"; import { AffectedRowsOutput } from \\"../../outputs/AffectedRowsOutput\\"; import { AggregateClient } from \\"../../outputs/AggregateClient\\"; import { ClientGroupBy } from \\"../../outputs/ClientGroupBy\\"; +import { CreateManyAndReturnClient } from \\"../../outputs/CreateManyAndReturnClient\\"; @TypeGraphQL.Resolver(_of => Client) export class ClientCrudResolver { @@ -3472,6 +3683,17 @@ export class ClientCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnClient], { + nullable: false + }) + async createManyAndReturnClient(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: CreateManyAndReturnClientArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).user.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => Client, { nullable: false }) @@ -3639,6 +3861,7 @@ exports[`crud when model is renamed should properly generate resolver class for "import * as TypeGraphQL from \\"type-graphql\\"; import type { GraphQLResolveInfo } from \\"graphql\\"; import { AggregateMainUserArgs } from \\"./args/AggregateMainUserArgs\\"; +import { CreateManyAndReturnMainUserArgs } from \\"./args/CreateManyAndReturnMainUserArgs\\"; import { CreateManyMainUserArgs } from \\"./args/CreateManyMainUserArgs\\"; import { CreateOneMainUserArgs } from \\"./args/CreateOneMainUserArgs\\"; import { DeleteManyMainUserArgs } from \\"./args/DeleteManyMainUserArgs\\"; @@ -3656,6 +3879,7 @@ import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldI import { MainUser } from \\"../../../models/MainUser\\"; import { AffectedRowsOutput } from \\"../../outputs/AffectedRowsOutput\\"; import { AggregateMainUser } from \\"../../outputs/AggregateMainUser\\"; +import { CreateManyAndReturnMainUser } from \\"../../outputs/CreateManyAndReturnMainUser\\"; import { MainUserGroupBy } from \\"../../outputs/MainUserGroupBy\\"; @TypeGraphQL.Resolver(_of => MainUser) @@ -3681,6 +3905,17 @@ export class MainUserCrudResolver { }); } + @TypeGraphQL.Mutation(_returns => [CreateManyAndReturnMainUser], { + nullable: false + }) + async createManyAndReturnMainUser(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: CreateManyAndReturnMainUserArgs): Promise { + const { _count } = transformInfoIntoPrismaArgs(info); + return getPrismaFromContext(ctx).user.createManyAndReturn({ + ...args, + ...(_count && transformCountFieldIntoSelectRelationsCount(_count)), + }); + } + @TypeGraphQL.Mutation(_returns => MainUser, { nullable: false }) diff --git a/tests/regression/__snapshots__/emit-only.ts.snap b/tests/regression/__snapshots__/emit-only.ts.snap index fc5141f1f..231bc80fa 100644 --- a/tests/regression/__snapshots__/emit-only.ts.snap +++ b/tests/regression/__snapshots__/emit-only.ts.snap @@ -20,6 +20,7 @@ const actionResolversMap = { User: { aggregateUser: actionResolvers.AggregateUserResolver, createManyUser: actionResolvers.CreateManyUserResolver, + createManyAndReturnUser: actionResolvers.CreateManyAndReturnUserResolver, createOneUser: actionResolvers.CreateOneUserResolver, deleteManyUser: actionResolvers.DeleteManyUserResolver, deleteOneUser: actionResolvers.DeleteOneUserResolver, @@ -36,6 +37,7 @@ const actionResolversMap = { Post: { aggregatePost: actionResolvers.AggregatePostResolver, createManyPost: actionResolvers.CreateManyPostResolver, + createManyAndReturnPost: actionResolvers.CreateManyAndReturnPostResolver, createOnePost: actionResolvers.CreateOnePostResolver, deleteManyPost: actionResolvers.DeleteManyPostResolver, deleteOnePost: actionResolvers.DeleteOnePostResolver, @@ -51,12 +53,13 @@ const actionResolversMap = { } }; const crudResolversInfo = { - User: [\\"aggregateUser\\", \\"createManyUser\\", \\"createOneUser\\", \\"deleteManyUser\\", \\"deleteOneUser\\", \\"findFirstUser\\", \\"findFirstUserOrThrow\\", \\"users\\", \\"user\\", \\"getUser\\", \\"groupByUser\\", \\"updateManyUser\\", \\"updateOneUser\\", \\"upsertOneUser\\"], - Post: [\\"aggregatePost\\", \\"createManyPost\\", \\"createOnePost\\", \\"deleteManyPost\\", \\"deleteOnePost\\", \\"findFirstPost\\", \\"findFirstPostOrThrow\\", \\"posts\\", \\"post\\", \\"getPost\\", \\"groupByPost\\", \\"updateManyPost\\", \\"updateOnePost\\", \\"upsertOnePost\\"] + User: [\\"aggregateUser\\", \\"createManyUser\\", \\"createManyAndReturnUser\\", \\"createOneUser\\", \\"deleteManyUser\\", \\"deleteOneUser\\", \\"findFirstUser\\", \\"findFirstUserOrThrow\\", \\"users\\", \\"user\\", \\"getUser\\", \\"groupByUser\\", \\"updateManyUser\\", \\"updateOneUser\\", \\"upsertOneUser\\"], + Post: [\\"aggregatePost\\", \\"createManyPost\\", \\"createManyAndReturnPost\\", \\"createOnePost\\", \\"deleteManyPost\\", \\"deleteOnePost\\", \\"findFirstPost\\", \\"findFirstPostOrThrow\\", \\"posts\\", \\"post\\", \\"getPost\\", \\"groupByPost\\", \\"updateManyPost\\", \\"updateOnePost\\", \\"upsertOnePost\\"] }; const argsInfo = { AggregateUserArgs: [\\"where\\", \\"orderBy\\", \\"cursor\\", \\"take\\", \\"skip\\"], CreateManyUserArgs: [\\"data\\", \\"skipDuplicates\\"], + CreateManyAndReturnUserArgs: [\\"data\\", \\"skipDuplicates\\"], CreateOneUserArgs: [\\"data\\"], DeleteManyUserArgs: [\\"where\\"], DeleteOneUserArgs: [\\"where\\"], @@ -71,6 +74,7 @@ const argsInfo = { UpsertOneUserArgs: [\\"where\\", \\"create\\", \\"update\\"], AggregatePostArgs: [\\"where\\", \\"orderBy\\", \\"cursor\\", \\"take\\", \\"skip\\"], CreateManyPostArgs: [\\"data\\", \\"skipDuplicates\\"], + CreateManyAndReturnPostArgs: [\\"data\\", \\"skipDuplicates\\"], CreateOnePostArgs: [\\"data\\"], DeleteManyPostArgs: [\\"where\\"], DeleteOnePostArgs: [\\"where\\"], @@ -108,7 +112,7 @@ export function applyResolversEnhanceMap( resolversEnhanceMap: ResolversEnhanceMap, ) { const mutationOperationPrefixes = [ - \\"createOne\\", \\"createMany\\", \\"deleteOne\\", \\"updateOne\\", \\"deleteMany\\", \\"updateMany\\", \\"upsertOne\\" + \\"createOne\\", \\"createMany\\", \\"createManyAndReturn\\", \\"deleteOne\\", \\"updateOne\\", \\"deleteMany\\", \\"updateMany\\", \\"upsertOne\\" ]; for (const resolversEnhanceMapKey of Object.keys(resolversEnhanceMap)) { const modelName = resolversEnhanceMapKey as keyof typeof resolversEnhanceMap; @@ -275,7 +279,9 @@ const outputsInfo = { PostAvgAggregate: [\\"authorId\\"], PostSumAggregate: [\\"authorId\\"], PostMinAggregate: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\", \\"authorId\\"], - PostMaxAggregate: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\", \\"authorId\\"] + PostMaxAggregate: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\", \\"authorId\\"], + CreateManyAndReturnUser: [\\"id\\", \\"email\\"], + CreateManyAndReturnPost: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\", \\"authorId\\", \\"metadata\\", \\"author\\"] }; type OutputTypesNames = keyof typeof outputTypes; @@ -484,6 +490,7 @@ exports[`emitOnly generator option when both 'crudResolvers' and \`inputs\` is s [crud] [Post] AggregatePostResolver.ts + CreateManyAndReturnPostResolver.ts CreateManyPostResolver.ts CreateOnePostResolver.ts DeleteManyPostResolver.ts @@ -500,6 +507,7 @@ exports[`emitOnly generator option when both 'crudResolvers' and \`inputs\` is s UpsertOnePostResolver.ts [args] AggregatePostArgs.ts + CreateManyAndReturnPostArgs.ts CreateManyPostArgs.ts CreateOnePostArgs.ts DeleteManyPostArgs.ts @@ -516,6 +524,7 @@ exports[`emitOnly generator option when both 'crudResolvers' and \`inputs\` is s index.ts [User] AggregateUserResolver.ts + CreateManyAndReturnUserResolver.ts CreateManyUserResolver.ts CreateOneUserResolver.ts DeleteManyUserResolver.ts @@ -532,6 +541,7 @@ exports[`emitOnly generator option when both 'crudResolvers' and \`inputs\` is s UserCrudResolver.ts [args] AggregateUserArgs.ts + CreateManyAndReturnUserArgs.ts CreateManyUserArgs.ts CreateOneUserArgs.ts DeleteManyUserArgs.ts @@ -636,6 +646,8 @@ exports[`emitOnly generator option when both 'crudResolvers' and \`inputs\` is s AffectedRowsOutput.ts AggregatePost.ts AggregateUser.ts + CreateManyAndReturnPost.ts + CreateManyAndReturnUser.ts PostAvgAggregate.ts PostCountAggregate.ts PostGroupBy.ts @@ -677,6 +689,7 @@ const actionResolversMap = { User: { aggregateUser: actionResolvers.AggregateUserResolver, createManyUser: actionResolvers.CreateManyUserResolver, + createManyAndReturnUser: actionResolvers.CreateManyAndReturnUserResolver, createOneUser: actionResolvers.CreateOneUserResolver, deleteManyUser: actionResolvers.DeleteManyUserResolver, deleteOneUser: actionResolvers.DeleteOneUserResolver, @@ -693,6 +706,7 @@ const actionResolversMap = { Post: { aggregatePost: actionResolvers.AggregatePostResolver, createManyPost: actionResolvers.CreateManyPostResolver, + createManyAndReturnPost: actionResolvers.CreateManyAndReturnPostResolver, createOnePost: actionResolvers.CreateOnePostResolver, deleteManyPost: actionResolvers.DeleteManyPostResolver, deleteOnePost: actionResolvers.DeleteOnePostResolver, @@ -708,12 +722,13 @@ const actionResolversMap = { } }; const crudResolversInfo = { - User: [\\"aggregateUser\\", \\"createManyUser\\", \\"createOneUser\\", \\"deleteManyUser\\", \\"deleteOneUser\\", \\"findFirstUser\\", \\"findFirstUserOrThrow\\", \\"users\\", \\"user\\", \\"getUser\\", \\"groupByUser\\", \\"updateManyUser\\", \\"updateOneUser\\", \\"upsertOneUser\\"], - Post: [\\"aggregatePost\\", \\"createManyPost\\", \\"createOnePost\\", \\"deleteManyPost\\", \\"deleteOnePost\\", \\"findFirstPost\\", \\"findFirstPostOrThrow\\", \\"posts\\", \\"post\\", \\"getPost\\", \\"groupByPost\\", \\"updateManyPost\\", \\"updateOnePost\\", \\"upsertOnePost\\"] + User: [\\"aggregateUser\\", \\"createManyUser\\", \\"createManyAndReturnUser\\", \\"createOneUser\\", \\"deleteManyUser\\", \\"deleteOneUser\\", \\"findFirstUser\\", \\"findFirstUserOrThrow\\", \\"users\\", \\"user\\", \\"getUser\\", \\"groupByUser\\", \\"updateManyUser\\", \\"updateOneUser\\", \\"upsertOneUser\\"], + Post: [\\"aggregatePost\\", \\"createManyPost\\", \\"createManyAndReturnPost\\", \\"createOnePost\\", \\"deleteManyPost\\", \\"deleteOnePost\\", \\"findFirstPost\\", \\"findFirstPostOrThrow\\", \\"posts\\", \\"post\\", \\"getPost\\", \\"groupByPost\\", \\"updateManyPost\\", \\"updateOnePost\\", \\"upsertOnePost\\"] }; const argsInfo = { AggregateUserArgs: [\\"where\\", \\"orderBy\\", \\"cursor\\", \\"take\\", \\"skip\\"], CreateManyUserArgs: [\\"data\\", \\"skipDuplicates\\"], + CreateManyAndReturnUserArgs: [\\"data\\", \\"skipDuplicates\\"], CreateOneUserArgs: [\\"data\\"], DeleteManyUserArgs: [\\"where\\"], DeleteOneUserArgs: [\\"where\\"], @@ -728,6 +743,7 @@ const argsInfo = { UpsertOneUserArgs: [\\"where\\", \\"create\\", \\"update\\"], AggregatePostArgs: [\\"where\\", \\"orderBy\\", \\"cursor\\", \\"take\\", \\"skip\\"], CreateManyPostArgs: [\\"data\\", \\"skipDuplicates\\"], + CreateManyAndReturnPostArgs: [\\"data\\", \\"skipDuplicates\\"], CreateOnePostArgs: [\\"data\\"], DeleteManyPostArgs: [\\"where\\"], DeleteOnePostArgs: [\\"where\\"], @@ -765,7 +781,7 @@ export function applyResolversEnhanceMap( resolversEnhanceMap: ResolversEnhanceMap, ) { const mutationOperationPrefixes = [ - \\"createOne\\", \\"createMany\\", \\"deleteOne\\", \\"updateOne\\", \\"deleteMany\\", \\"updateMany\\", \\"upsertOne\\" + \\"createOne\\", \\"createMany\\", \\"createManyAndReturn\\", \\"deleteOne\\", \\"updateOne\\", \\"deleteMany\\", \\"updateMany\\", \\"upsertOne\\" ]; for (const resolversEnhanceMapKey of Object.keys(resolversEnhanceMap)) { const modelName = resolversEnhanceMapKey as keyof typeof resolversEnhanceMap; @@ -932,7 +948,9 @@ const outputsInfo = { PostAvgAggregate: [\\"authorId\\"], PostSumAggregate: [\\"authorId\\"], PostMinAggregate: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\", \\"authorId\\"], - PostMaxAggregate: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\", \\"authorId\\"] + PostMaxAggregate: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\", \\"authorId\\"], + CreateManyAndReturnUser: [\\"id\\", \\"email\\"], + CreateManyAndReturnPost: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\", \\"authorId\\", \\"metadata\\", \\"author\\"] }; type OutputTypesNames = keyof typeof outputTypes; @@ -1141,6 +1159,7 @@ exports[`emitOnly generator option when only 'crudResolvers' is set should gener [crud] [Post] AggregatePostResolver.ts + CreateManyAndReturnPostResolver.ts CreateManyPostResolver.ts CreateOnePostResolver.ts DeleteManyPostResolver.ts @@ -1157,6 +1176,7 @@ exports[`emitOnly generator option when only 'crudResolvers' is set should gener UpsertOnePostResolver.ts [args] AggregatePostArgs.ts + CreateManyAndReturnPostArgs.ts CreateManyPostArgs.ts CreateOnePostArgs.ts DeleteManyPostArgs.ts @@ -1173,6 +1193,7 @@ exports[`emitOnly generator option when only 'crudResolvers' is set should gener index.ts [User] AggregateUserResolver.ts + CreateManyAndReturnUserResolver.ts CreateManyUserResolver.ts CreateOneUserResolver.ts DeleteManyUserResolver.ts @@ -1189,6 +1210,7 @@ exports[`emitOnly generator option when only 'crudResolvers' is set should gener UserCrudResolver.ts [args] AggregateUserArgs.ts + CreateManyAndReturnUserArgs.ts CreateManyUserArgs.ts CreateOneUserArgs.ts DeleteManyUserArgs.ts @@ -1293,6 +1315,8 @@ exports[`emitOnly generator option when only 'crudResolvers' is set should gener AffectedRowsOutput.ts AggregatePost.ts AggregateUser.ts + CreateManyAndReturnPost.ts + CreateManyAndReturnUser.ts PostAvgAggregate.ts PostCountAggregate.ts PostGroupBy.ts @@ -1837,7 +1861,9 @@ const outputsInfo = { PostAvgAggregate: [\\"authorId\\"], PostSumAggregate: [\\"authorId\\"], PostMinAggregate: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\", \\"authorId\\"], - PostMaxAggregate: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\", \\"authorId\\"] + PostMaxAggregate: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\", \\"authorId\\"], + CreateManyAndReturnUser: [\\"id\\", \\"email\\"], + CreateManyAndReturnPost: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\", \\"authorId\\", \\"metadata\\", \\"author\\"] }; type OutputTypesNames = keyof typeof outputTypes; @@ -1911,6 +1937,8 @@ exports[`emitOnly generator option when only 'outputs' is set should generate pr AffectedRowsOutput.ts AggregatePost.ts AggregateUser.ts + CreateManyAndReturnPost.ts + CreateManyAndReturnUser.ts PostAvgAggregate.ts PostCountAggregate.ts PostGroupBy.ts diff --git a/tests/regression/__snapshots__/enhance.ts.snap b/tests/regression/__snapshots__/enhance.ts.snap index 2bff6822a..be0e5de57 100644 --- a/tests/regression/__snapshots__/enhance.ts.snap +++ b/tests/regression/__snapshots__/enhance.ts.snap @@ -21,6 +21,7 @@ const actionResolversMap = { Client: { aggregateClient: actionResolvers.AggregateClientResolver, createManyClient: actionResolvers.CreateManyClientResolver, + createManyAndReturnClient: actionResolvers.CreateManyAndReturnClientResolver, createOneClient: actionResolvers.CreateOneClientResolver, deleteManyClient: actionResolvers.DeleteManyClientResolver, deleteOneClient: actionResolvers.DeleteOneClientResolver, @@ -37,6 +38,7 @@ const actionResolversMap = { Post: { aggregatePost: actionResolvers.AggregatePostResolver, createManyPost: actionResolvers.CreateManyPostResolver, + createManyAndReturnPost: actionResolvers.CreateManyAndReturnPostResolver, createOnePost: actionResolvers.CreateOnePostResolver, deleteManyPost: actionResolvers.DeleteManyPostResolver, deleteOnePost: actionResolvers.DeleteOnePostResolver, @@ -52,12 +54,13 @@ const actionResolversMap = { } }; const crudResolversInfo = { - Client: [\\"aggregateClient\\", \\"createManyClient\\", \\"createOneClient\\", \\"deleteManyClient\\", \\"deleteOneClient\\", \\"findFirstClient\\", \\"findFirstClientOrThrow\\", \\"clients\\", \\"client\\", \\"getClient\\", \\"groupByClient\\", \\"updateManyClient\\", \\"updateOneClient\\", \\"upsertOneClient\\"], - Post: [\\"aggregatePost\\", \\"createManyPost\\", \\"createOnePost\\", \\"deleteManyPost\\", \\"deleteOnePost\\", \\"findFirstPost\\", \\"findFirstPostOrThrow\\", \\"posts\\", \\"post\\", \\"getPost\\", \\"groupByPost\\", \\"updateManyPost\\", \\"updateOnePost\\", \\"upsertOnePost\\"] + Client: [\\"aggregateClient\\", \\"createManyClient\\", \\"createManyAndReturnClient\\", \\"createOneClient\\", \\"deleteManyClient\\", \\"deleteOneClient\\", \\"findFirstClient\\", \\"findFirstClientOrThrow\\", \\"clients\\", \\"client\\", \\"getClient\\", \\"groupByClient\\", \\"updateManyClient\\", \\"updateOneClient\\", \\"upsertOneClient\\"], + Post: [\\"aggregatePost\\", \\"createManyPost\\", \\"createManyAndReturnPost\\", \\"createOnePost\\", \\"deleteManyPost\\", \\"deleteOnePost\\", \\"findFirstPost\\", \\"findFirstPostOrThrow\\", \\"posts\\", \\"post\\", \\"getPost\\", \\"groupByPost\\", \\"updateManyPost\\", \\"updateOnePost\\", \\"upsertOnePost\\"] }; const argsInfo = { AggregateClientArgs: [\\"where\\", \\"orderBy\\", \\"cursor\\", \\"take\\", \\"skip\\"], CreateManyClientArgs: [\\"data\\", \\"skipDuplicates\\"], + CreateManyAndReturnClientArgs: [\\"data\\", \\"skipDuplicates\\"], CreateOneClientArgs: [\\"data\\"], DeleteManyClientArgs: [\\"where\\"], DeleteOneClientArgs: [\\"where\\"], @@ -72,6 +75,7 @@ const argsInfo = { UpsertOneClientArgs: [\\"where\\", \\"create\\", \\"update\\"], AggregatePostArgs: [\\"where\\", \\"orderBy\\", \\"cursor\\", \\"take\\", \\"skip\\"], CreateManyPostArgs: [\\"data\\", \\"skipDuplicates\\"], + CreateManyAndReturnPostArgs: [\\"data\\", \\"skipDuplicates\\"], CreateOnePostArgs: [\\"data\\"], DeleteManyPostArgs: [\\"where\\"], DeleteOnePostArgs: [\\"where\\"], @@ -109,7 +113,7 @@ export function applyResolversEnhanceMap( resolversEnhanceMap: ResolversEnhanceMap, ) { const mutationOperationPrefixes = [ - \\"createOne\\", \\"createMany\\", \\"deleteOne\\", \\"updateOne\\", \\"deleteMany\\", \\"updateMany\\", \\"upsertOne\\" + \\"createOne\\", \\"createMany\\", \\"createManyAndReturn\\", \\"deleteOne\\", \\"updateOne\\", \\"deleteMany\\", \\"updateMany\\", \\"upsertOne\\" ]; for (const resolversEnhanceMapKey of Object.keys(resolversEnhanceMap)) { const modelName = resolversEnhanceMapKey as keyof typeof resolversEnhanceMap; @@ -323,7 +327,9 @@ const outputsInfo = { PostAvgAggregate: [\\"authorId\\"], PostSumAggregate: [\\"authorId\\"], PostMinAggregate: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\", \\"authorId\\"], - PostMaxAggregate: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\", \\"authorId\\"] + PostMaxAggregate: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\", \\"authorId\\"], + CreateManyAndReturnClient: [\\"id\\", \\"email\\"], + CreateManyAndReturnPost: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\", \\"authorId\\", \\"metadata\\", \\"author\\"] }; type OutputTypesNames = keyof typeof outputTypes; @@ -532,6 +538,7 @@ const actionResolversMap = { Post: { aggregatePost: actionResolvers.AggregatePostResolver, createManyPost: actionResolvers.CreateManyPostResolver, + createManyAndReturnPost: actionResolvers.CreateManyAndReturnPostResolver, createOnePost: actionResolvers.CreateOnePostResolver, deleteManyPost: actionResolvers.DeleteManyPostResolver, deleteOnePost: actionResolvers.DeleteOnePostResolver, @@ -547,11 +554,12 @@ const actionResolversMap = { } }; const crudResolversInfo = { - Post: [\\"aggregatePost\\", \\"createManyPost\\", \\"createOnePost\\", \\"deleteManyPost\\", \\"deleteOnePost\\", \\"findFirstPost\\", \\"findFirstPostOrThrow\\", \\"posts\\", \\"post\\", \\"getPost\\", \\"groupByPost\\", \\"updateManyPost\\", \\"updateOnePost\\", \\"upsertOnePost\\"] + Post: [\\"aggregatePost\\", \\"createManyPost\\", \\"createManyAndReturnPost\\", \\"createOnePost\\", \\"deleteManyPost\\", \\"deleteOnePost\\", \\"findFirstPost\\", \\"findFirstPostOrThrow\\", \\"posts\\", \\"post\\", \\"getPost\\", \\"groupByPost\\", \\"updateManyPost\\", \\"updateOnePost\\", \\"upsertOnePost\\"] }; const argsInfo = { AggregatePostArgs: [\\"where\\", \\"orderBy\\", \\"cursor\\", \\"take\\", \\"skip\\"], CreateManyPostArgs: [\\"data\\", \\"skipDuplicates\\"], + CreateManyAndReturnPostArgs: [\\"data\\", \\"skipDuplicates\\"], CreateOnePostArgs: [\\"data\\"], DeleteManyPostArgs: [\\"where\\"], DeleteOnePostArgs: [\\"where\\"], @@ -589,7 +597,7 @@ export function applyResolversEnhanceMap( resolversEnhanceMap: ResolversEnhanceMap, ) { const mutationOperationPrefixes = [ - \\"createOne\\", \\"createMany\\", \\"deleteOne\\", \\"updateOne\\", \\"deleteMany\\", \\"updateMany\\", \\"upsertOne\\" + \\"createOne\\", \\"createMany\\", \\"createManyAndReturn\\", \\"deleteOne\\", \\"updateOne\\", \\"deleteMany\\", \\"updateMany\\", \\"upsertOne\\" ]; for (const resolversEnhanceMapKey of Object.keys(resolversEnhanceMap)) { const modelName = resolversEnhanceMapKey as keyof typeof resolversEnhanceMap; @@ -745,7 +753,8 @@ const outputsInfo = { AffectedRowsOutput: [\\"count\\"], PostCountAggregate: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\", \\"metadata\\", \\"_all\\"], PostMinAggregate: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\"], - PostMaxAggregate: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\"] + PostMaxAggregate: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\"], + CreateManyAndReturnPost: [\\"uuid\\", \\"createdAt\\", \\"updatedAt\\", \\"published\\", \\"title\\", \\"content\\", \\"metadata\\"] }; type OutputTypesNames = keyof typeof outputTypes; diff --git a/tests/regression/__snapshots__/inputs.ts.snap b/tests/regression/__snapshots__/inputs.ts.snap index bfaa028e5..0c50ccc96 100644 --- a/tests/regression/__snapshots__/inputs.ts.snap +++ b/tests/regression/__snapshots__/inputs.ts.snap @@ -6795,7 +6795,7 @@ export class FirstModelOrderByRelevanceInput { " `; -exports[`inputs when \`fullTextSearch\` preview feature is enabled should properly generate input type classes with relevance and string search field: FirstModelOrderByWithRelationAndSearchRelevanceInput 1`] = ` +exports[`inputs when \`fullTextSearch\` preview feature is enabled should properly generate input type classes with relevance and string search field: FirstModelOrderByWithRelationInput 1`] = ` "import * as TypeGraphQL from \\"type-graphql\\"; import * as GraphQLScalars from \\"graphql-scalars\\"; import { Prisma } from \\"../../../../helpers/prisma-client-mock\\"; @@ -6804,8 +6804,8 @@ import { FirstModelOrderByRelevanceInput } from \\"../inputs/FirstModelOrderByRe import { SecondModelOrderByRelationAggregateInput } from \\"../inputs/SecondModelOrderByRelationAggregateInput\\"; import { SortOrder } from \\"../../enums/SortOrder\\"; -@TypeGraphQL.InputType(\\"FirstModelOrderByWithRelationAndSearchRelevanceInput\\", {}) -export class FirstModelOrderByWithRelationAndSearchRelevanceInput { +@TypeGraphQL.InputType(\\"FirstModelOrderByWithRelationInput\\", {}) +export class FirstModelOrderByWithRelationInput { @TypeGraphQL.Field(_type => SortOrder, { nullable: true }) @@ -6995,7 +6995,7 @@ export { FirstModelMaxOrderByAggregateInput } from \\"./FirstModelMaxOrderByAggr export { FirstModelMinOrderByAggregateInput } from \\"./FirstModelMinOrderByAggregateInput\\"; export { FirstModelOrderByRelevanceInput } from \\"./FirstModelOrderByRelevanceInput\\"; export { FirstModelOrderByWithAggregationInput } from \\"./FirstModelOrderByWithAggregationInput\\"; -export { FirstModelOrderByWithRelationAndSearchRelevanceInput } from \\"./FirstModelOrderByWithRelationAndSearchRelevanceInput\\"; +export { FirstModelOrderByWithRelationInput } from \\"./FirstModelOrderByWithRelationInput\\"; export { FirstModelRelationFilter } from \\"./FirstModelRelationFilter\\"; export { FirstModelScalarWhereWithAggregatesInput } from \\"./FirstModelScalarWhereWithAggregatesInput\\"; export { FirstModelSumOrderByAggregateInput } from \\"./FirstModelSumOrderByAggregateInput\\"; @@ -7034,7 +7034,7 @@ export { SecondModelMinOrderByAggregateInput } from \\"./SecondModelMinOrderByAg export { SecondModelOrderByRelationAggregateInput } from \\"./SecondModelOrderByRelationAggregateInput\\"; export { SecondModelOrderByRelevanceInput } from \\"./SecondModelOrderByRelevanceInput\\"; export { SecondModelOrderByWithAggregationInput } from \\"./SecondModelOrderByWithAggregationInput\\"; -export { SecondModelOrderByWithRelationAndSearchRelevanceInput } from \\"./SecondModelOrderByWithRelationAndSearchRelevanceInput\\"; +export { SecondModelOrderByWithRelationInput } from \\"./SecondModelOrderByWithRelationInput\\"; export { SecondModelScalarWhereInput } from \\"./SecondModelScalarWhereInput\\"; export { SecondModelScalarWhereWithAggregatesInput } from \\"./SecondModelScalarWhereWithAggregatesInput\\"; export { SecondModelSumOrderByAggregateInput } from \\"./SecondModelSumOrderByAggregateInput\\"; diff --git a/tests/regression/__snapshots__/outputs.ts.snap b/tests/regression/__snapshots__/outputs.ts.snap index 3108d92d2..125508138 100644 --- a/tests/regression/__snapshots__/outputs.ts.snap +++ b/tests/regression/__snapshots__/outputs.ts.snap @@ -41,6 +41,42 @@ export class AggregateExample { " `; +exports[`outputs should properly generate aggregate classes for model with lowercase name: CreateManyAndReturnExample 1`] = ` +"import * as TypeGraphQL from \\"type-graphql\\"; +import * as GraphQLScalars from \\"graphql-scalars\\"; +import { Prisma } from \\"../../../../helpers/prisma-client-mock\\"; +import { DecimalJSScalar } from \\"../../scalars\\"; + +@TypeGraphQL.ObjectType(\\"CreateManyAndReturnExample\\", {}) +export class CreateManyAndReturnExample { + @TypeGraphQL.Field(_type => TypeGraphQL.Int, { + nullable: false + }) + intIdField!: number; + + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + stringField!: string; + + @TypeGraphQL.Field(_type => TypeGraphQL.Float, { + nullable: false + }) + floatField!: number; + + @TypeGraphQL.Field(_type => Boolean, { + nullable: false + }) + booleanField!: boolean; + + @TypeGraphQL.Field(_type => Date, { + nullable: false + }) + dateField!: Date; +} +" +`; + exports[`outputs should properly generate aggregate classes for model with lowercase name: ExampleAvgAggregate 1`] = ` "import * as TypeGraphQL from \\"type-graphql\\"; import * as GraphQLScalars from \\"graphql-scalars\\"; @@ -199,6 +235,7 @@ export class ExampleSumAggregate { exports[`outputs should properly generate aggregate classes for model with lowercase name: outputs index 1`] = ` "export { AffectedRowsOutput } from \\"./AffectedRowsOutput\\"; export { AggregateExample } from \\"./AggregateExample\\"; +export { CreateManyAndReturnExample } from \\"./CreateManyAndReturnExample\\"; export { ExampleAvgAggregate } from \\"./ExampleAvgAggregate\\"; export { ExampleCountAggregate } from \\"./ExampleCountAggregate\\"; export { ExampleGroupBy } from \\"./ExampleGroupBy\\"; @@ -249,6 +286,42 @@ export class AggregateExample { " `; +exports[`outputs should properly generate aggregate classes for renamed model: CreateManyAndReturnExample 1`] = ` +"import * as TypeGraphQL from \\"type-graphql\\"; +import * as GraphQLScalars from \\"graphql-scalars\\"; +import { Prisma } from \\"../../../../helpers/prisma-client-mock\\"; +import { DecimalJSScalar } from \\"../../scalars\\"; + +@TypeGraphQL.ObjectType(\\"CreateManyAndReturnExample\\", {}) +export class CreateManyAndReturnExample { + @TypeGraphQL.Field(_type => TypeGraphQL.Int, { + nullable: false + }) + intIdField!: number; + + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + stringField!: string; + + @TypeGraphQL.Field(_type => TypeGraphQL.Float, { + nullable: false + }) + floatField!: number; + + @TypeGraphQL.Field(_type => Boolean, { + nullable: false + }) + booleanField!: boolean; + + @TypeGraphQL.Field(_type => Date, { + nullable: false + }) + dateField!: Date; +} +" +`; + exports[`outputs should properly generate aggregate classes for renamed model: ExampleAvgAggregate 1`] = ` "import * as TypeGraphQL from \\"type-graphql\\"; import * as GraphQLScalars from \\"graphql-scalars\\"; @@ -407,6 +480,7 @@ export class ExampleSumAggregate { exports[`outputs should properly generate aggregate classes for renamed model: outputs index 1`] = ` "export { AffectedRowsOutput } from \\"./AffectedRowsOutput\\"; export { AggregateExample } from \\"./AggregateExample\\"; +export { CreateManyAndReturnExample } from \\"./CreateManyAndReturnExample\\"; export { ExampleAvgAggregate } from \\"./ExampleAvgAggregate\\"; export { ExampleCountAggregate } from \\"./ExampleCountAggregate\\"; export { ExampleGroupBy } from \\"./ExampleGroupBy\\"; @@ -442,6 +516,8 @@ exports[`outputs should properly generate count classes for relation fields with "export { AffectedRowsOutput } from \\"./AffectedRowsOutput\\"; export { AggregateFirstModel } from \\"./AggregateFirstModel\\"; export { AggregateSecondModel } from \\"./AggregateSecondModel\\"; +export { CreateManyAndReturnFirstModel } from \\"./CreateManyAndReturnFirstModel\\"; +export { CreateManyAndReturnSecondModel } from \\"./CreateManyAndReturnSecondModel\\"; export { FirstModelAvgAggregate } from \\"./FirstModelAvgAggregate\\"; export { FirstModelCount } from \\"./FirstModelCount\\"; export { FirstModelCountAggregate } from \\"./FirstModelCountAggregate\\"; @@ -485,6 +561,8 @@ exports[`outputs should properly generate count classes for relation fields: out "export { AffectedRowsOutput } from \\"./AffectedRowsOutput\\"; export { AggregateFirstModel } from \\"./AggregateFirstModel\\"; export { AggregateSecondModel } from \\"./AggregateSecondModel\\"; +export { CreateManyAndReturnFirstModel } from \\"./CreateManyAndReturnFirstModel\\"; +export { CreateManyAndReturnSecondModel } from \\"./CreateManyAndReturnSecondModel\\"; export { FirstModelAvgAggregate } from \\"./FirstModelAvgAggregate\\"; export { FirstModelCount } from \\"./FirstModelCount\\"; export { FirstModelCountAggregate } from \\"./FirstModelCountAggregate\\"; @@ -559,6 +637,47 @@ export class AggregateSample { " `; +exports[`outputs should properly generate output type classes: CreateManyAndReturnSample 1`] = ` +"import * as TypeGraphQL from \\"type-graphql\\"; +import * as GraphQLScalars from \\"graphql-scalars\\"; +import { Prisma } from \\"../../../../helpers/prisma-client-mock\\"; +import { DecimalJSScalar } from \\"../../scalars\\"; + +@TypeGraphQL.ObjectType(\\"CreateManyAndReturnSample\\", {}) +export class CreateManyAndReturnSample { + @TypeGraphQL.Field(_type => TypeGraphQL.Int, { + nullable: false + }) + intIdField!: number; + + @TypeGraphQL.Field(_type => String, { + nullable: false + }) + stringField!: string; + + @TypeGraphQL.Field(_type => TypeGraphQL.Float, { + nullable: false + }) + floatField!: number; + + @TypeGraphQL.Field(_type => Boolean, { + nullable: false + }) + booleanField!: boolean; + + @TypeGraphQL.Field(_type => Date, { + nullable: false + }) + dateField!: Date; + + @TypeGraphQL.Field(_type => [TypeGraphQL.Int], { + nullable: true + }) + intArrayField!: number[] | null; +} +" +`; + exports[`outputs should properly generate output type classes: SampleAvgAggregate 1`] = ` "import * as TypeGraphQL from \\"type-graphql\\"; import * as GraphQLScalars from \\"graphql-scalars\\"; @@ -803,6 +922,7 @@ export class SampleSumAggregate { exports[`outputs should properly generate output type classes: outputs index 1`] = ` "export { AffectedRowsOutput } from \\"./AffectedRowsOutput\\"; export { AggregateSample } from \\"./AggregateSample\\"; +export { CreateManyAndReturnSample } from \\"./CreateManyAndReturnSample\\"; export { SampleAvgAggregate } from \\"./SampleAvgAggregate\\"; export { SampleCountAggregate } from \\"./SampleCountAggregate\\"; export { SampleGroupBy } from \\"./SampleGroupBy\\"; diff --git a/tests/regression/__snapshots__/relations.ts.snap b/tests/regression/__snapshots__/relations.ts.snap index c65b01926..229fa769f 100644 --- a/tests/regression/__snapshots__/relations.ts.snap +++ b/tests/regression/__snapshots__/relations.ts.snap @@ -643,7 +643,7 @@ export class UserRelationsResolver { exports[`relations resolvers generation when \`fullTextSearch\` preview feature is enabled should properly generate args type classes using SearchRelevanceInput: FirstModelSecondModelsFieldArgs 1`] = ` "import * as TypeGraphQL from \\"type-graphql\\"; import * as GraphQLScalars from \\"graphql-scalars\\"; -import { SecondModelOrderByWithRelationAndSearchRelevanceInput } from \\"../../../inputs/SecondModelOrderByWithRelationAndSearchRelevanceInput\\"; +import { SecondModelOrderByWithRelationInput } from \\"../../../inputs/SecondModelOrderByWithRelationInput\\"; import { SecondModelWhereInput } from \\"../../../inputs/SecondModelWhereInput\\"; import { SecondModelWhereUniqueInput } from \\"../../../inputs/SecondModelWhereUniqueInput\\"; import { SecondModelScalarFieldEnum } from \\"../../../../enums/SecondModelScalarFieldEnum\\"; @@ -655,10 +655,10 @@ export class FirstModelSecondModelsFieldArgs { }) where?: SecondModelWhereInput | undefined; - @TypeGraphQL.Field(_type => [SecondModelOrderByWithRelationAndSearchRelevanceInput], { + @TypeGraphQL.Field(_type => [SecondModelOrderByWithRelationInput], { nullable: true }) - orderBy?: SecondModelOrderByWithRelationAndSearchRelevanceInput[] | undefined; + orderBy?: SecondModelOrderByWithRelationInput[] | undefined; @TypeGraphQL.Field(_type => SecondModelWhereUniqueInput, { nullable: true diff --git a/tests/regression/__snapshots__/structure.ts.snap b/tests/regression/__snapshots__/structure.ts.snap index 04b1450e4..095195e77 100644 --- a/tests/regression/__snapshots__/structure.ts.snap +++ b/tests/regression/__snapshots__/structure.ts.snap @@ -38,6 +38,8 @@ exports[`structure should generate *.js and *.d.ts files when emitTranspiledCode [Post] AggregatePostResolver.d.ts AggregatePostResolver.js + CreateManyAndReturnPostResolver.d.ts + CreateManyAndReturnPostResolver.js CreateManyPostResolver.d.ts CreateManyPostResolver.js CreateOnePostResolver.d.ts @@ -69,6 +71,8 @@ exports[`structure should generate *.js and *.d.ts files when emitTranspiledCode [args] AggregatePostArgs.d.ts AggregatePostArgs.js + CreateManyAndReturnPostArgs.d.ts + CreateManyAndReturnPostArgs.js CreateManyPostArgs.d.ts CreateManyPostArgs.js CreateOnePostArgs.d.ts @@ -100,6 +104,8 @@ exports[`structure should generate *.js and *.d.ts files when emitTranspiledCode [User] AggregateUserResolver.d.ts AggregateUserResolver.js + CreateManyAndReturnUserResolver.d.ts + CreateManyAndReturnUserResolver.js CreateManyUserResolver.d.ts CreateManyUserResolver.js CreateOneUserResolver.d.ts @@ -131,6 +137,8 @@ exports[`structure should generate *.js and *.d.ts files when emitTranspiledCode [args] AggregateUserArgs.d.ts AggregateUserArgs.js + CreateManyAndReturnUserArgs.d.ts + CreateManyAndReturnUserArgs.js CreateManyUserArgs.d.ts CreateManyUserArgs.js CreateOneUserArgs.d.ts @@ -321,6 +329,10 @@ exports[`structure should generate *.js and *.d.ts files when emitTranspiledCode AggregatePost.js AggregateUser.d.ts AggregateUser.js + CreateManyAndReturnPost.d.ts + CreateManyAndReturnPost.js + CreateManyAndReturnUser.d.ts + CreateManyAndReturnUser.js PostAvgAggregate.d.ts PostAvgAggregate.js PostCountAggregate.d.ts @@ -400,6 +412,7 @@ exports[`structure should generate proper folders and file names when model is r [crud] [RenamedPost] AggregateRenamedPostResolver.ts + CreateManyAndReturnRenamedPostResolver.ts CreateManyRenamedPostResolver.ts CreateOneRenamedPostResolver.ts DeleteManyRenamedPostResolver.ts @@ -416,6 +429,7 @@ exports[`structure should generate proper folders and file names when model is r UpsertOneRenamedPostResolver.ts [args] AggregateRenamedPostArgs.ts + CreateManyAndReturnRenamedPostArgs.ts CreateManyRenamedPostArgs.ts CreateOneRenamedPostArgs.ts DeleteManyRenamedPostArgs.ts @@ -432,6 +446,7 @@ exports[`structure should generate proper folders and file names when model is r index.ts [RenamedUser] AggregateRenamedUserResolver.ts + CreateManyAndReturnRenamedUserResolver.ts CreateManyRenamedUserResolver.ts CreateOneRenamedUserResolver.ts DeleteManyRenamedUserResolver.ts @@ -448,6 +463,7 @@ exports[`structure should generate proper folders and file names when model is r UpsertOneRenamedUserResolver.ts [args] AggregateRenamedUserArgs.ts + CreateManyAndReturnRenamedUserArgs.ts CreateManyRenamedUserArgs.ts CreateOneRenamedUserArgs.ts DeleteManyRenamedUserArgs.ts @@ -544,6 +560,8 @@ exports[`structure should generate proper folders and file names when model is r AffectedRowsOutput.ts AggregateRenamedPost.ts AggregateRenamedUser.ts + CreateManyAndReturnRenamedPost.ts + CreateManyAndReturnRenamedUser.ts RenamedPostAvgAggregate.ts RenamedPostCountAggregate.ts RenamedPostGroupBy.ts @@ -599,6 +617,7 @@ exports[`structure should generate proper folders structure and file names for c [crud] [Post] AggregatePostResolver.ts + CreateManyAndReturnPostResolver.ts CreateManyPostResolver.ts CreateOnePostResolver.ts DeleteManyPostResolver.ts @@ -615,6 +634,7 @@ exports[`structure should generate proper folders structure and file names for c UpsertOnePostResolver.ts [args] AggregatePostArgs.ts + CreateManyAndReturnPostArgs.ts CreateManyPostArgs.ts CreateOnePostArgs.ts DeleteManyPostArgs.ts @@ -631,6 +651,7 @@ exports[`structure should generate proper folders structure and file names for c index.ts [User] AggregateUserResolver.ts + CreateManyAndReturnUserResolver.ts CreateManyUserResolver.ts CreateOneUserResolver.ts DeleteManyUserResolver.ts @@ -647,6 +668,7 @@ exports[`structure should generate proper folders structure and file names for c UserCrudResolver.ts [args] AggregateUserArgs.ts + CreateManyAndReturnUserArgs.ts CreateManyUserArgs.ts CreateOneUserArgs.ts DeleteManyUserArgs.ts @@ -743,6 +765,8 @@ exports[`structure should generate proper folders structure and file names for c AffectedRowsOutput.ts AggregatePost.ts AggregateUser.ts + CreateManyAndReturnPost.ts + CreateManyAndReturnUser.ts PostAvgAggregate.ts PostCountAggregate.ts PostGroupBy.ts diff --git a/tests/regression/crud.ts b/tests/regression/crud.ts index bd8a95950..94c12b09e 100644 --- a/tests/regression/crud.ts +++ b/tests/regression/crud.ts @@ -177,6 +177,9 @@ describe("crud", () => { const createManyUserArgsTSFile = await readGeneratedFile( "/resolvers/crud/User/args/CreateManyUserArgs.ts", ); + const createManyAndReturnUserArgsTSFile = await readGeneratedFile( + "/resolvers/crud/User/args/CreateManyAndReturnUserArgs.ts", + ); const indexTSFile = await readGeneratedFile( "/resolvers/crud/User/args/index.ts", ); @@ -199,6 +202,9 @@ describe("crud", () => { expect(upsertOneUserArgsTSFile).toMatchSnapshot("UpsertOneUserArgs"); expect(groupByUserArgsTSFile).toMatchSnapshot("GroupByUserArgs"); expect(createManyUserArgsTSFile).toMatchSnapshot("CreateManyUserArgs"); + expect(createManyAndReturnUserArgsTSFile).toMatchSnapshot( + "CreateManyAndReturnUserArgs", + ); expect(indexTSFile).toMatchSnapshot("Index"); }); @@ -252,6 +258,9 @@ describe("crud", () => { const createManyUserResolverTSFile = await readGeneratedFile( "/resolvers/crud/User/CreateManyUserResolver.ts", ); + const createManyAndReturnUserResolverTSFile = await readGeneratedFile( + "/resolvers/crud/User/CreateManyAndReturnUserResolver.ts", + ); const indexTSFile = await readGeneratedFile("/resolvers/crud/index.ts"); const argsIndexTSFile = await readGeneratedFile( "/resolvers/crud/args.index.ts", @@ -298,6 +307,9 @@ describe("crud", () => { expect(createManyUserResolverTSFile).toMatchSnapshot( "CreateManyUserResolver", ); + expect(createManyAndReturnUserResolverTSFile).toMatchSnapshot( + "CreateManyAndReturnUserResolver", + ); expect(indexTSFile).toMatchSnapshot("Index"); expect(argsIndexTSFile).toMatchSnapshot("argsIndex"); expect(crudIndexTSFile).toMatchSnapshot("crudIndex"); @@ -381,6 +393,9 @@ describe("crud", () => { const createManyClientArgsTSFile = await readGeneratedFile( "/resolvers/crud/Client/args/CreateManyClientArgs.ts", ); + const createManyAndReturnClientArgsTSFile = await readGeneratedFile( + "/resolvers/crud/Client/args/CreateManyAndReturnClientArgs.ts", + ); const indexTSFile = await readGeneratedFile( "/resolvers/crud/Client/args/index.ts", ); @@ -405,6 +420,9 @@ describe("crud", () => { expect(createManyClientArgsTSFile).toMatchSnapshot( "CreateManyClientArgs", ); + expect(createManyAndReturnClientArgsTSFile).toMatchSnapshot( + "CreateManyAndReturnClientArgs", + ); expect(indexTSFile).toMatchSnapshot("Index"); }); @@ -462,6 +480,9 @@ describe("crud", () => { const createManyClientResolverTSFile = await readGeneratedFile( "/resolvers/crud/Client/CreateManyClientResolver.ts", ); + const createManyAndReturnClientResolverTSFile = await readGeneratedFile( + "/resolvers/crud/Client/CreateManyAndReturnClientResolver.ts", + ); expect(createOneClientResolverTSFile).toMatchSnapshot( "CreateOneClientResolver", @@ -499,6 +520,9 @@ describe("crud", () => { expect(createManyClientResolverTSFile).toMatchSnapshot( "CreateManyClientResolver", ); + expect(createManyAndReturnClientResolverTSFile).toMatchSnapshot( + "CreateManyAndReturnClientResolver", + ); }); it("should properly generate resolver class for single prisma model", async () => { diff --git a/tests/regression/inputs.ts b/tests/regression/inputs.ts index 5eab7d325..14df27199 100644 --- a/tests/regression/inputs.ts +++ b/tests/regression/inputs.ts @@ -1396,10 +1396,9 @@ describe("inputs", () => { const orderByRelevanceInputTSFile = await readGeneratedFile( "/resolvers/inputs/FirstModelOrderByRelevanceInput.ts", ); - const orderByWithRelationAndSearchRelevanceInputTSFile = - await readGeneratedFile( - "/resolvers/inputs/FirstModelOrderByWithRelationAndSearchRelevanceInput.ts", - ); + const orderByWithRelationInputTSFile = await readGeneratedFile( + "/resolvers/inputs/FirstModelOrderByWithRelationInput.ts", + ); const nestedStringFilterTSFile = await readGeneratedFile( "/resolvers/inputs/NestedStringFilter.ts", ); @@ -1411,8 +1410,8 @@ describe("inputs", () => { expect(orderByRelevanceInputTSFile).toMatchSnapshot( "FirstModelOrderByRelevanceInput", ); - expect(orderByWithRelationAndSearchRelevanceInputTSFile).toMatchSnapshot( - "FirstModelOrderByWithRelationAndSearchRelevanceInput", + expect(orderByWithRelationInputTSFile).toMatchSnapshot( + "FirstModelOrderByWithRelationInput", ); expect(nestedStringFilterTSFile).toMatchSnapshot("NestedStringFilter"); expect(stringFilterTSFile).toMatchSnapshot("StringFilter"); diff --git a/tests/regression/outputs.ts b/tests/regression/outputs.ts index ed9b01233..0c6aa1b6c 100644 --- a/tests/regression/outputs.ts +++ b/tests/regression/outputs.ts @@ -53,6 +53,9 @@ describe("outputs", () => { const sampleGroupByTSFile = await readGeneratedFile( "/resolvers/outputs/SampleGroupBy.ts", ); + const createManyAndReturnSampleTSFile = await readGeneratedFile( + "/resolvers/outputs/CreateManyAndReturnSample.ts", + ); const outputsIndexTSFile = await readGeneratedFile( "/resolvers/outputs/index.ts", ); @@ -65,6 +68,9 @@ describe("outputs", () => { expect(maxAggregateTSFile).toMatchSnapshot("SampleMaxAggregate"); expect(affectedRowsOutputTSFile).toMatchSnapshot("AffectedRowsOutput"); expect(sampleGroupByTSFile).toMatchSnapshot("SampleGroupBy"); + expect(createManyAndReturnSampleTSFile).toMatchSnapshot( + "CreateManyAndReturnSample", + ); expect(outputsIndexTSFile).toMatchSnapshot("outputs index"); }); @@ -99,6 +105,9 @@ describe("outputs", () => { const maxAggregateTSFile = await readGeneratedFile( "/resolvers/outputs/ExampleMaxAggregate.ts", ); + const createManyAndReturnExampleTSFile = await readGeneratedFile( + "/resolvers/outputs/CreateManyAndReturnExample.ts", + ); const outputsIndexTSFile = await readGeneratedFile( "/resolvers/outputs/index.ts", ); @@ -109,6 +118,9 @@ describe("outputs", () => { expect(sumAggregateTSFile).toMatchSnapshot("ExampleSumAggregate"); expect(minAggregateTSFile).toMatchSnapshot("ExampleMinAggregate"); expect(maxAggregateTSFile).toMatchSnapshot("ExampleMaxAggregate"); + expect(createManyAndReturnExampleTSFile).toMatchSnapshot( + "CreateManyAndReturnExample", + ); expect(outputsIndexTSFile).toMatchSnapshot("outputs index"); }); @@ -142,6 +154,9 @@ describe("outputs", () => { const maxAggregateTSFile = await readGeneratedFile( "/resolvers/outputs/ExampleMaxAggregate.ts", ); + const createManyAndReturnTSFile = await readGeneratedFile( + "/resolvers/outputs/CreateManyAndReturnExample.ts", + ); const outputsIndexTSFile = await readGeneratedFile( "/resolvers/outputs/index.ts", ); @@ -152,6 +167,9 @@ describe("outputs", () => { expect(sumAggregateTSFile).toMatchSnapshot("ExampleSumAggregate"); expect(minAggregateTSFile).toMatchSnapshot("ExampleMinAggregate"); expect(maxAggregateTSFile).toMatchSnapshot("ExampleMaxAggregate"); + expect(createManyAndReturnTSFile).toMatchSnapshot( + "CreateManyAndReturnExample", + ); expect(outputsIndexTSFile).toMatchSnapshot("outputs index"); });