diff --git a/prisma/schema.prisma b/prisma/schema.prisma index b2c24f7..6680311 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -45,9 +45,11 @@ model User { confirmedSchedules Schedule[] @relation("ConfirmedSchedules") mapVoteChoices MapVoteStep[] @relation("VoteStepChooser") - - status UserStatus @default(offline) // 👈 neu - lastActiveAt DateTime? // optional: wann zuletzt aktiv + + status UserStatus @default(offline) // 👈 neu + lastActiveAt DateTime? // optional: wann zuletzt aktiv + + readyAcceptances MatchReady[] @relation("MatchReadyUser") } enum UserStatus { @@ -56,7 +58,6 @@ enum UserStatus { offline } - model Team { id String @id @default(uuid()) name String @unique @@ -148,12 +149,14 @@ model Match { bestOf Int @default(3) // 1 | 3 | 5 – app-seitig validieren matchDate DateTime? // geplante Startzeit (separat von demoDate) - mapVote MapVote? + mapVote MapVote? createdAt DateTime @default(now()) updatedAt DateTime @updatedAt schedule Schedule? + + readyAcceptances MatchReady[] @relation("MatchReadyMatch") } model MatchPlayer { @@ -318,13 +321,13 @@ model MapVote { matchId String @unique match Match @relation(fields: [matchId], references: [id]) - bestOf Int @default(3) + bestOf Int @default(3) mapPool String[] - currentIdx Int @default(0) - locked Boolean @default(false) + currentIdx Int @default(0) + locked Boolean @default(false) opensAt DateTime? - - leadMinutes Int @default(60) + + leadMinutes Int @default(60) adminEditingBy String? adminEditingSince DateTime? @@ -356,3 +359,14 @@ model MapVoteStep { @@index([chosenBy]) } +model MatchReady { + matchId String + steamId String + acceptedAt DateTime @default(now()) + + match Match @relation("MatchReadyMatch", fields: [matchId], references: [id]) + user User @relation("MatchReadyUser", fields: [steamId], references: [steamId]) + + @@id([matchId, steamId]) + @@index([steamId]) +} diff --git a/public/assets/img/mapicons/ar_baggage.webp b/public/assets/img/mapicons/ar_baggage.webp deleted file mode 100644 index b57cb81..0000000 Binary files a/public/assets/img/mapicons/ar_baggage.webp and /dev/null differ diff --git a/public/assets/img/mapicons/ar_pool_day.webp b/public/assets/img/mapicons/ar_pool_day.webp deleted file mode 100644 index 58d0041..0000000 Binary files a/public/assets/img/mapicons/ar_pool_day.webp and /dev/null differ diff --git a/public/assets/img/mapicons/ar_shoots.webp b/public/assets/img/mapicons/ar_shoots.webp deleted file mode 100644 index 7beacff..0000000 Binary files a/public/assets/img/mapicons/ar_shoots.webp and /dev/null differ diff --git a/public/assets/img/mapicons/cs_agency.webp b/public/assets/img/mapicons/cs_agency.webp deleted file mode 100644 index fd98c6b..0000000 Binary files a/public/assets/img/mapicons/cs_agency.webp and /dev/null differ diff --git a/public/assets/img/mapicons/cs_italy.webp b/public/assets/img/mapicons/cs_italy.webp deleted file mode 100644 index 502577b..0000000 Binary files a/public/assets/img/mapicons/cs_italy.webp and /dev/null differ diff --git a/public/assets/img/mapicons/cs_office.webp b/public/assets/img/mapicons/cs_office.webp deleted file mode 100644 index c275ab2..0000000 Binary files a/public/assets/img/mapicons/cs_office.webp and /dev/null differ diff --git a/public/assets/img/mapicons/de_ancient.webp b/public/assets/img/mapicons/de_ancient.webp deleted file mode 100644 index d1fd8d1..0000000 Binary files a/public/assets/img/mapicons/de_ancient.webp and /dev/null differ diff --git a/public/assets/img/mapicons/de_anubis.webp b/public/assets/img/mapicons/de_anubis.webp deleted file mode 100644 index 2bbe4b3..0000000 Binary files a/public/assets/img/mapicons/de_anubis.webp and /dev/null differ diff --git a/public/assets/img/mapicons/de_brewery.webp b/public/assets/img/mapicons/de_brewery.webp deleted file mode 100644 index 01acddb..0000000 Binary files a/public/assets/img/mapicons/de_brewery.webp and /dev/null differ diff --git a/public/assets/img/mapicons/de_dogtown.webp b/public/assets/img/mapicons/de_dogtown.webp deleted file mode 100644 index c618e2f..0000000 Binary files a/public/assets/img/mapicons/de_dogtown.webp and /dev/null differ diff --git a/public/assets/img/mapicons/de_dust2.webp b/public/assets/img/mapicons/de_dust2.webp deleted file mode 100644 index 2f533cf..0000000 Binary files a/public/assets/img/mapicons/de_dust2.webp and /dev/null differ diff --git a/public/assets/img/mapicons/de_grail.webp b/public/assets/img/mapicons/de_grail.webp deleted file mode 100644 index 1350177..0000000 Binary files a/public/assets/img/mapicons/de_grail.webp and /dev/null differ diff --git a/public/assets/img/mapicons/de_inferno.webp b/public/assets/img/mapicons/de_inferno.webp deleted file mode 100644 index 91f1256..0000000 Binary files a/public/assets/img/mapicons/de_inferno.webp and /dev/null differ diff --git a/public/assets/img/mapicons/de_jura.webp b/public/assets/img/mapicons/de_jura.webp deleted file mode 100644 index 8019818..0000000 Binary files a/public/assets/img/mapicons/de_jura.webp and /dev/null differ diff --git a/public/assets/img/mapicons/de_mirage.webp b/public/assets/img/mapicons/de_mirage.webp deleted file mode 100644 index 50792dd..0000000 Binary files a/public/assets/img/mapicons/de_mirage.webp and /dev/null differ diff --git a/public/assets/img/mapicons/de_nuke.webp b/public/assets/img/mapicons/de_nuke.webp deleted file mode 100644 index a79102b..0000000 Binary files a/public/assets/img/mapicons/de_nuke.webp and /dev/null differ diff --git a/public/assets/img/mapicons/de_overpass.webp b/public/assets/img/mapicons/de_overpass.webp deleted file mode 100644 index 24fee5d..0000000 Binary files a/public/assets/img/mapicons/de_overpass.webp and /dev/null differ diff --git a/public/assets/img/mapicons/de_train.webp b/public/assets/img/mapicons/de_train.webp deleted file mode 100644 index 205b7ae..0000000 Binary files a/public/assets/img/mapicons/de_train.webp and /dev/null differ diff --git a/public/assets/img/mapicons/de_vertigo.webp b/public/assets/img/mapicons/de_vertigo.webp deleted file mode 100644 index c0b253f..0000000 Binary files a/public/assets/img/mapicons/de_vertigo.webp and /dev/null differ diff --git a/public/assets/img/mapicons/lobby_mapveto.webp b/public/assets/img/mapicons/lobby_mapveto.webp deleted file mode 100644 index 38b3e3e..0000000 Binary files a/public/assets/img/mapicons/lobby_mapveto.webp and /dev/null differ diff --git a/public/assets/img/mapicons/map_icon_ar_baggage.svg b/public/assets/img/mapicons/map_icon_ar_baggage.svg new file mode 100644 index 0000000..3241ddb --- /dev/null +++ b/public/assets/img/mapicons/map_icon_ar_baggage.svg @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/img/mapicons/map_icon_ar_pool_day.svg b/public/assets/img/mapicons/map_icon_ar_pool_day.svg new file mode 100644 index 0000000..0b5f2c3 --- /dev/null +++ b/public/assets/img/mapicons/map_icon_ar_pool_day.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/img/mapicons/map_icon_ar_shoots.svg b/public/assets/img/mapicons/map_icon_ar_shoots.svg new file mode 100644 index 0000000..2b785ab --- /dev/null +++ b/public/assets/img/mapicons/map_icon_ar_shoots.svg @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/img/mapicons/map_icon_ar_shoots_night.svg b/public/assets/img/mapicons/map_icon_ar_shoots_night.svg new file mode 100644 index 0000000..ba91d66 --- /dev/null +++ b/public/assets/img/mapicons/map_icon_ar_shoots_night.svg @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/img/mapicons/map_icon_cs_agency.svg b/public/assets/img/mapicons/map_icon_cs_agency.svg new file mode 100644 index 0000000..b589850 --- /dev/null +++ b/public/assets/img/mapicons/map_icon_cs_agency.svg @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/assets/img/mapicons/map_icon_cs_italy.svg b/public/assets/img/mapicons/map_icon_cs_italy.svg new file mode 100644 index 0000000..a4ec6f9 --- /dev/null +++ b/public/assets/img/mapicons/map_icon_cs_italy.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/img/mapicons/map_icon_cs_office.svg b/public/assets/img/mapicons/map_icon_cs_office.svg new file mode 100644 index 0000000..6eda1e2 --- /dev/null +++ b/public/assets/img/mapicons/map_icon_cs_office.svg @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/img/mapicons/map_icon_de_ancient.svg b/public/assets/img/mapicons/map_icon_de_ancient.svg new file mode 100644 index 0000000..11f68c1 --- /dev/null +++ b/public/assets/img/mapicons/map_icon_de_ancient.svg @@ -0,0 +1,435 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/img/mapicons/map_icon_de_ancient_night.svg b/public/assets/img/mapicons/map_icon_de_ancient_night.svg new file mode 100644 index 0000000..bb61367 --- /dev/null +++ b/public/assets/img/mapicons/map_icon_de_ancient_night.svg @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/img/mapicons/map_icon_de_anubis.svg b/public/assets/img/mapicons/map_icon_de_anubis.svg new file mode 100644 index 0000000..5d003cf --- /dev/null +++ b/public/assets/img/mapicons/map_icon_de_anubis.svg @@ -0,0 +1,331 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/img/mapicons/map_icon_de_brewery.svg b/public/assets/img/mapicons/map_icon_de_brewery.svg new file mode 100644 index 0000000..54d2477 --- /dev/null +++ b/public/assets/img/mapicons/map_icon_de_brewery.svg @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/assets/img/mapicons/map_icon_de_dogtown.svg b/public/assets/img/mapicons/map_icon_de_dogtown.svg new file mode 100644 index 0000000..4fdab8f --- /dev/null +++ b/public/assets/img/mapicons/map_icon_de_dogtown.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/img/mapicons/map_icon_de_dust.svg b/public/assets/img/mapicons/map_icon_de_dust.svg new file mode 100644 index 0000000..954e24b --- /dev/null +++ b/public/assets/img/mapicons/map_icon_de_dust.svg @@ -0,0 +1,266 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/img/mapicons/map_icon_de_dust2.svg b/public/assets/img/mapicons/map_icon_de_dust2.svg new file mode 100644 index 0000000..bcba5a0 --- /dev/null +++ b/public/assets/img/mapicons/map_icon_de_dust2.svg @@ -0,0 +1,2851 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/img/mapicons/map_icon_de_grail.svg b/public/assets/img/mapicons/map_icon_de_grail.svg new file mode 100644 index 0000000..7826620 --- /dev/null +++ b/public/assets/img/mapicons/map_icon_de_grail.svg @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/assets/img/mapicons/map_icon_de_inferno.svg b/public/assets/img/mapicons/map_icon_de_inferno.svg new file mode 100644 index 0000000..e5b7326 --- /dev/null +++ b/public/assets/img/mapicons/map_icon_de_inferno.svg @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/img/mapicons/map_icon_de_jura.svg b/public/assets/img/mapicons/map_icon_de_jura.svg new file mode 100644 index 0000000..04906dd --- /dev/null +++ b/public/assets/img/mapicons/map_icon_de_jura.svg @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/assets/img/mapicons/map_icon_de_mirage.svg b/public/assets/img/mapicons/map_icon_de_mirage.svg new file mode 100644 index 0000000..4462b53 --- /dev/null +++ b/public/assets/img/mapicons/map_icon_de_mirage.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/img/mapicons/map_icon_de_nuke.svg b/public/assets/img/mapicons/map_icon_de_nuke.svg new file mode 100644 index 0000000..eac7bd7 --- /dev/null +++ b/public/assets/img/mapicons/map_icon_de_nuke.svg @@ -0,0 +1,712 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/img/mapicons/map_icon_de_overpass.svg b/public/assets/img/mapicons/map_icon_de_overpass.svg new file mode 100644 index 0000000..7ad2f60 --- /dev/null +++ b/public/assets/img/mapicons/map_icon_de_overpass.svg @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/img/mapicons/map_icon_de_train.svg b/public/assets/img/mapicons/map_icon_de_train.svg new file mode 100644 index 0000000..846d2c4 --- /dev/null +++ b/public/assets/img/mapicons/map_icon_de_train.svg @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/img/mapicons/map_icon_de_vertigo.svg b/public/assets/img/mapicons/map_icon_de_vertigo.svg new file mode 100644 index 0000000..eb4134b --- /dev/null +++ b/public/assets/img/mapicons/map_icon_de_vertigo.svg @@ -0,0 +1,782 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/img/mapicons/map_icon_lobby_mapveto.svg b/public/assets/img/mapicons/map_icon_lobby_mapveto.svg new file mode 100644 index 0000000..168a960 --- /dev/null +++ b/public/assets/img/mapicons/map_icon_lobby_mapveto.svg @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + diff --git a/public/assets/img/mapicons/map_icon_none_png.png b/public/assets/img/mapicons/map_icon_none_png.png new file mode 100644 index 0000000..0a586c3 Binary files /dev/null and b/public/assets/img/mapicons/map_icon_none_png.png differ diff --git a/public/assets/img/maps/de_ancient/1.webp b/public/assets/img/maps/de_ancient/1.webp deleted file mode 100644 index 37d68d1..0000000 Binary files a/public/assets/img/maps/de_ancient/1.webp and /dev/null differ diff --git a/public/assets/img/maps/de_ancient/2.webp b/public/assets/img/maps/de_ancient/2.webp deleted file mode 100644 index 80c1914..0000000 Binary files a/public/assets/img/maps/de_ancient/2.webp and /dev/null differ diff --git a/public/assets/img/maps/de_ancient/3.webp b/public/assets/img/maps/de_ancient/3.webp deleted file mode 100644 index 2b54673..0000000 Binary files a/public/assets/img/maps/de_ancient/3.webp and /dev/null differ diff --git a/public/assets/img/maps/de_ancient/4.webp b/public/assets/img/maps/de_ancient/4.webp deleted file mode 100644 index d47d688..0000000 Binary files a/public/assets/img/maps/de_ancient/4.webp and /dev/null differ diff --git a/public/assets/img/maps/de_ancient/5.webp b/public/assets/img/maps/de_ancient/5.webp deleted file mode 100644 index 9bb93d9..0000000 Binary files a/public/assets/img/maps/de_ancient/5.webp and /dev/null differ diff --git a/public/assets/img/maps/de_ancient/6.webp b/public/assets/img/maps/de_ancient/6.webp deleted file mode 100644 index 9a797d9..0000000 Binary files a/public/assets/img/maps/de_ancient/6.webp and /dev/null differ diff --git a/public/assets/img/maps/de_ancient/de_ancient_1_png.webp b/public/assets/img/maps/de_ancient/de_ancient_1_png.webp new file mode 100644 index 0000000..0c16aed Binary files /dev/null and b/public/assets/img/maps/de_ancient/de_ancient_1_png.webp differ diff --git a/public/assets/img/maps/de_ancient/de_ancient_2_png.webp b/public/assets/img/maps/de_ancient/de_ancient_2_png.webp new file mode 100644 index 0000000..e321698 Binary files /dev/null and b/public/assets/img/maps/de_ancient/de_ancient_2_png.webp differ diff --git a/public/assets/img/maps/de_ancient/de_ancient_3_png.webp b/public/assets/img/maps/de_ancient/de_ancient_3_png.webp new file mode 100644 index 0000000..c763d15 Binary files /dev/null and b/public/assets/img/maps/de_ancient/de_ancient_3_png.webp differ diff --git a/public/assets/img/maps/de_ancient/de_ancient_4_png.webp b/public/assets/img/maps/de_ancient/de_ancient_4_png.webp new file mode 100644 index 0000000..c0e7ab7 Binary files /dev/null and b/public/assets/img/maps/de_ancient/de_ancient_4_png.webp differ diff --git a/public/assets/img/maps/de_ancient/de_ancient_png.webp b/public/assets/img/maps/de_ancient/de_ancient_png.webp new file mode 100644 index 0000000..d1631ef Binary files /dev/null and b/public/assets/img/maps/de_ancient/de_ancient_png.webp differ diff --git a/public/assets/img/maps/de_anubis/1.webp b/public/assets/img/maps/de_anubis/1.webp deleted file mode 100644 index a2c9950..0000000 Binary files a/public/assets/img/maps/de_anubis/1.webp and /dev/null differ diff --git a/public/assets/img/maps/de_anubis/2.webp b/public/assets/img/maps/de_anubis/2.webp deleted file mode 100644 index 8654751..0000000 Binary files a/public/assets/img/maps/de_anubis/2.webp and /dev/null differ diff --git a/public/assets/img/maps/de_anubis/3.webp b/public/assets/img/maps/de_anubis/3.webp deleted file mode 100644 index 55d4d77..0000000 Binary files a/public/assets/img/maps/de_anubis/3.webp and /dev/null differ diff --git a/public/assets/img/maps/de_anubis/4.webp b/public/assets/img/maps/de_anubis/4.webp deleted file mode 100644 index 7ca5f82..0000000 Binary files a/public/assets/img/maps/de_anubis/4.webp and /dev/null differ diff --git a/public/assets/img/maps/de_anubis/5.webp b/public/assets/img/maps/de_anubis/5.webp deleted file mode 100644 index 7aa0743..0000000 Binary files a/public/assets/img/maps/de_anubis/5.webp and /dev/null differ diff --git a/public/assets/img/maps/de_anubis/6.webp b/public/assets/img/maps/de_anubis/6.webp deleted file mode 100644 index 6dac34a..0000000 Binary files a/public/assets/img/maps/de_anubis/6.webp and /dev/null differ diff --git a/public/assets/img/maps/de_anubis/de_anubis_1_png.webp b/public/assets/img/maps/de_anubis/de_anubis_1_png.webp new file mode 100644 index 0000000..9bea32b Binary files /dev/null and b/public/assets/img/maps/de_anubis/de_anubis_1_png.webp differ diff --git a/public/assets/img/maps/de_anubis/de_anubis_2_png.webp b/public/assets/img/maps/de_anubis/de_anubis_2_png.webp new file mode 100644 index 0000000..10fdf43 Binary files /dev/null and b/public/assets/img/maps/de_anubis/de_anubis_2_png.webp differ diff --git a/public/assets/img/maps/de_anubis/de_anubis_3_png.webp b/public/assets/img/maps/de_anubis/de_anubis_3_png.webp new file mode 100644 index 0000000..97240ee Binary files /dev/null and b/public/assets/img/maps/de_anubis/de_anubis_3_png.webp differ diff --git a/public/assets/img/maps/de_anubis/de_anubis_4_png.webp b/public/assets/img/maps/de_anubis/de_anubis_4_png.webp new file mode 100644 index 0000000..014f98d Binary files /dev/null and b/public/assets/img/maps/de_anubis/de_anubis_4_png.webp differ diff --git a/public/assets/img/maps/de_anubis/de_anubis_5_png.webp b/public/assets/img/maps/de_anubis/de_anubis_5_png.webp new file mode 100644 index 0000000..5108411 Binary files /dev/null and b/public/assets/img/maps/de_anubis/de_anubis_5_png.webp differ diff --git a/public/assets/img/maps/de_anubis/de_anubis_png.webp b/public/assets/img/maps/de_anubis/de_anubis_png.webp new file mode 100644 index 0000000..7e5d967 Binary files /dev/null and b/public/assets/img/maps/de_anubis/de_anubis_png.webp differ diff --git a/public/assets/img/maps/de_dust2/1.webp b/public/assets/img/maps/de_dust2/1.webp deleted file mode 100644 index 0d1efcc..0000000 Binary files a/public/assets/img/maps/de_dust2/1.webp and /dev/null differ diff --git a/public/assets/img/maps/de_dust2/2.webp b/public/assets/img/maps/de_dust2/2.webp deleted file mode 100644 index 57845c9..0000000 Binary files a/public/assets/img/maps/de_dust2/2.webp and /dev/null differ diff --git a/public/assets/img/maps/de_dust2/3.webp b/public/assets/img/maps/de_dust2/3.webp deleted file mode 100644 index 4b34804..0000000 Binary files a/public/assets/img/maps/de_dust2/3.webp and /dev/null differ diff --git a/public/assets/img/maps/de_dust2/4.webp b/public/assets/img/maps/de_dust2/4.webp deleted file mode 100644 index ff205e3..0000000 Binary files a/public/assets/img/maps/de_dust2/4.webp and /dev/null differ diff --git a/public/assets/img/maps/de_dust2/de_dust2_1_png.webp b/public/assets/img/maps/de_dust2/de_dust2_1_png.webp new file mode 100644 index 0000000..4297632 Binary files /dev/null and b/public/assets/img/maps/de_dust2/de_dust2_1_png.webp differ diff --git a/public/assets/img/maps/de_dust2/de_dust2_2_png.webp b/public/assets/img/maps/de_dust2/de_dust2_2_png.webp new file mode 100644 index 0000000..927cb8e Binary files /dev/null and b/public/assets/img/maps/de_dust2/de_dust2_2_png.webp differ diff --git a/public/assets/img/maps/de_dust2/de_dust2_3_png.webp b/public/assets/img/maps/de_dust2/de_dust2_3_png.webp new file mode 100644 index 0000000..332857f Binary files /dev/null and b/public/assets/img/maps/de_dust2/de_dust2_3_png.webp differ diff --git a/public/assets/img/maps/de_dust2/de_dust2_png.webp b/public/assets/img/maps/de_dust2/de_dust2_png.webp new file mode 100644 index 0000000..279590a Binary files /dev/null and b/public/assets/img/maps/de_dust2/de_dust2_png.webp differ diff --git a/public/assets/img/maps/de_grail/1.webp b/public/assets/img/maps/de_grail/1.webp deleted file mode 100644 index a0a4c64..0000000 Binary files a/public/assets/img/maps/de_grail/1.webp and /dev/null differ diff --git a/public/assets/img/maps/de_grail/2.webp b/public/assets/img/maps/de_grail/2.webp deleted file mode 100644 index c3a5dac..0000000 Binary files a/public/assets/img/maps/de_grail/2.webp and /dev/null differ diff --git a/public/assets/img/maps/de_grail/3.webp b/public/assets/img/maps/de_grail/3.webp deleted file mode 100644 index 3ebee45..0000000 Binary files a/public/assets/img/maps/de_grail/3.webp and /dev/null differ diff --git a/public/assets/img/maps/de_grail/4.webp b/public/assets/img/maps/de_grail/4.webp deleted file mode 100644 index b8a384d..0000000 Binary files a/public/assets/img/maps/de_grail/4.webp and /dev/null differ diff --git a/public/assets/img/maps/de_grail/5.webp b/public/assets/img/maps/de_grail/5.webp deleted file mode 100644 index 7d0cec1..0000000 Binary files a/public/assets/img/maps/de_grail/5.webp and /dev/null differ diff --git a/public/assets/img/maps/de_grail/6.webp b/public/assets/img/maps/de_grail/6.webp deleted file mode 100644 index 8a8f026..0000000 Binary files a/public/assets/img/maps/de_grail/6.webp and /dev/null differ diff --git a/public/assets/img/maps/de_grail/de_grail_1_png.webp b/public/assets/img/maps/de_grail/de_grail_1_png.webp new file mode 100644 index 0000000..d134ad1 Binary files /dev/null and b/public/assets/img/maps/de_grail/de_grail_1_png.webp differ diff --git a/public/assets/img/maps/de_grail/de_grail_2_png.webp b/public/assets/img/maps/de_grail/de_grail_2_png.webp new file mode 100644 index 0000000..cbb4604 Binary files /dev/null and b/public/assets/img/maps/de_grail/de_grail_2_png.webp differ diff --git a/public/assets/img/maps/de_grail/de_grail_3_png.webp b/public/assets/img/maps/de_grail/de_grail_3_png.webp new file mode 100644 index 0000000..1f9a8ca Binary files /dev/null and b/public/assets/img/maps/de_grail/de_grail_3_png.webp differ diff --git a/public/assets/img/maps/de_grail/de_grail_4_png.webp b/public/assets/img/maps/de_grail/de_grail_4_png.webp new file mode 100644 index 0000000..a4ba415 Binary files /dev/null and b/public/assets/img/maps/de_grail/de_grail_4_png.webp differ diff --git a/public/assets/img/maps/de_grail/de_grail_png.webp b/public/assets/img/maps/de_grail/de_grail_png.webp new file mode 100644 index 0000000..f884227 Binary files /dev/null and b/public/assets/img/maps/de_grail/de_grail_png.webp differ diff --git a/public/assets/img/maps/de_inferno/1.webp b/public/assets/img/maps/de_inferno/1.webp deleted file mode 100644 index 046aebd..0000000 Binary files a/public/assets/img/maps/de_inferno/1.webp and /dev/null differ diff --git a/public/assets/img/maps/de_inferno/2.webp b/public/assets/img/maps/de_inferno/2.webp deleted file mode 100644 index 40a5b8a..0000000 Binary files a/public/assets/img/maps/de_inferno/2.webp and /dev/null differ diff --git a/public/assets/img/maps/de_inferno/3.webp b/public/assets/img/maps/de_inferno/3.webp deleted file mode 100644 index b0b832d..0000000 Binary files a/public/assets/img/maps/de_inferno/3.webp and /dev/null differ diff --git a/public/assets/img/maps/de_inferno/4.webp b/public/assets/img/maps/de_inferno/4.webp deleted file mode 100644 index 530a940..0000000 Binary files a/public/assets/img/maps/de_inferno/4.webp and /dev/null differ diff --git a/public/assets/img/maps/de_inferno/5.webp b/public/assets/img/maps/de_inferno/5.webp deleted file mode 100644 index 80ec9bd..0000000 Binary files a/public/assets/img/maps/de_inferno/5.webp and /dev/null differ diff --git a/public/assets/img/maps/de_inferno/6.webp b/public/assets/img/maps/de_inferno/6.webp deleted file mode 100644 index 90e4a57..0000000 Binary files a/public/assets/img/maps/de_inferno/6.webp and /dev/null differ diff --git a/public/assets/img/maps/de_inferno/de_inferno_1_png.webp b/public/assets/img/maps/de_inferno/de_inferno_1_png.webp new file mode 100644 index 0000000..d3adc51 Binary files /dev/null and b/public/assets/img/maps/de_inferno/de_inferno_1_png.webp differ diff --git a/public/assets/img/maps/de_inferno/de_inferno_2_png.webp b/public/assets/img/maps/de_inferno/de_inferno_2_png.webp new file mode 100644 index 0000000..c556433 Binary files /dev/null and b/public/assets/img/maps/de_inferno/de_inferno_2_png.webp differ diff --git a/public/assets/img/maps/de_inferno/de_inferno_3_png.webp b/public/assets/img/maps/de_inferno/de_inferno_3_png.webp new file mode 100644 index 0000000..57418d7 Binary files /dev/null and b/public/assets/img/maps/de_inferno/de_inferno_3_png.webp differ diff --git a/public/assets/img/maps/de_inferno/de_inferno_4_png.webp b/public/assets/img/maps/de_inferno/de_inferno_4_png.webp new file mode 100644 index 0000000..c81f653 Binary files /dev/null and b/public/assets/img/maps/de_inferno/de_inferno_4_png.webp differ diff --git a/public/assets/img/maps/de_inferno/de_inferno_png.webp b/public/assets/img/maps/de_inferno/de_inferno_png.webp new file mode 100644 index 0000000..8acc682 Binary files /dev/null and b/public/assets/img/maps/de_inferno/de_inferno_png.webp differ diff --git a/public/assets/img/maps/de_jura/1.webp b/public/assets/img/maps/de_jura/1.webp deleted file mode 100644 index 7f09d50..0000000 Binary files a/public/assets/img/maps/de_jura/1.webp and /dev/null differ diff --git a/public/assets/img/maps/de_jura/2.webp b/public/assets/img/maps/de_jura/2.webp deleted file mode 100644 index 3676640..0000000 Binary files a/public/assets/img/maps/de_jura/2.webp and /dev/null differ diff --git a/public/assets/img/maps/de_jura/3.webp b/public/assets/img/maps/de_jura/3.webp deleted file mode 100644 index 90b86b0..0000000 Binary files a/public/assets/img/maps/de_jura/3.webp and /dev/null differ diff --git a/public/assets/img/maps/de_jura/4.webp b/public/assets/img/maps/de_jura/4.webp deleted file mode 100644 index f5fb7a3..0000000 Binary files a/public/assets/img/maps/de_jura/4.webp and /dev/null differ diff --git a/public/assets/img/maps/de_jura/5.webp b/public/assets/img/maps/de_jura/5.webp deleted file mode 100644 index 781e29a..0000000 Binary files a/public/assets/img/maps/de_jura/5.webp and /dev/null differ diff --git a/public/assets/img/maps/de_jura/6.webp b/public/assets/img/maps/de_jura/6.webp deleted file mode 100644 index 54ece11..0000000 Binary files a/public/assets/img/maps/de_jura/6.webp and /dev/null differ diff --git a/public/assets/img/maps/de_jura/7.webp b/public/assets/img/maps/de_jura/7.webp deleted file mode 100644 index 02367d2..0000000 Binary files a/public/assets/img/maps/de_jura/7.webp and /dev/null differ diff --git a/public/assets/img/maps/de_jura/8.webp b/public/assets/img/maps/de_jura/8.webp deleted file mode 100644 index a287318..0000000 Binary files a/public/assets/img/maps/de_jura/8.webp and /dev/null differ diff --git a/public/assets/img/maps/de_jura/de_jura_1_png.webp b/public/assets/img/maps/de_jura/de_jura_1_png.webp new file mode 100644 index 0000000..a3d3736 Binary files /dev/null and b/public/assets/img/maps/de_jura/de_jura_1_png.webp differ diff --git a/public/assets/img/maps/de_jura/de_jura_2_png.webp b/public/assets/img/maps/de_jura/de_jura_2_png.webp new file mode 100644 index 0000000..e5a53d3 Binary files /dev/null and b/public/assets/img/maps/de_jura/de_jura_2_png.webp differ diff --git a/public/assets/img/maps/de_jura/de_jura_3_png.webp b/public/assets/img/maps/de_jura/de_jura_3_png.webp new file mode 100644 index 0000000..8572ef5 Binary files /dev/null and b/public/assets/img/maps/de_jura/de_jura_3_png.webp differ diff --git a/public/assets/img/maps/de_jura/de_jura_4_png.webp b/public/assets/img/maps/de_jura/de_jura_4_png.webp new file mode 100644 index 0000000..52fbabb Binary files /dev/null and b/public/assets/img/maps/de_jura/de_jura_4_png.webp differ diff --git a/public/assets/img/maps/de_jura/de_jura_png.webp b/public/assets/img/maps/de_jura/de_jura_png.webp new file mode 100644 index 0000000..35b5b86 Binary files /dev/null and b/public/assets/img/maps/de_jura/de_jura_png.webp differ diff --git a/public/assets/img/maps/de_mirage/1.webp b/public/assets/img/maps/de_mirage/1.webp deleted file mode 100644 index 93ef305..0000000 Binary files a/public/assets/img/maps/de_mirage/1.webp and /dev/null differ diff --git a/public/assets/img/maps/de_mirage/2.webp b/public/assets/img/maps/de_mirage/2.webp deleted file mode 100644 index b7565bb..0000000 Binary files a/public/assets/img/maps/de_mirage/2.webp and /dev/null differ diff --git a/public/assets/img/maps/de_mirage/3.webp b/public/assets/img/maps/de_mirage/3.webp deleted file mode 100644 index df18a8c..0000000 Binary files a/public/assets/img/maps/de_mirage/3.webp and /dev/null differ diff --git a/public/assets/img/maps/de_mirage/4.webp b/public/assets/img/maps/de_mirage/4.webp deleted file mode 100644 index ab0392e..0000000 Binary files a/public/assets/img/maps/de_mirage/4.webp and /dev/null differ diff --git a/public/assets/img/maps/de_mirage/5.webp b/public/assets/img/maps/de_mirage/5.webp deleted file mode 100644 index cf7a750..0000000 Binary files a/public/assets/img/maps/de_mirage/5.webp and /dev/null differ diff --git a/public/assets/img/maps/de_mirage/6.webp b/public/assets/img/maps/de_mirage/6.webp deleted file mode 100644 index f50b585..0000000 Binary files a/public/assets/img/maps/de_mirage/6.webp and /dev/null differ diff --git a/public/assets/img/maps/de_mirage/de_mirage_1_png.webp b/public/assets/img/maps/de_mirage/de_mirage_1_png.webp new file mode 100644 index 0000000..86ef218 Binary files /dev/null and b/public/assets/img/maps/de_mirage/de_mirage_1_png.webp differ diff --git a/public/assets/img/maps/de_mirage/de_mirage_2_png.webp b/public/assets/img/maps/de_mirage/de_mirage_2_png.webp new file mode 100644 index 0000000..867bc40 Binary files /dev/null and b/public/assets/img/maps/de_mirage/de_mirage_2_png.webp differ diff --git a/public/assets/img/maps/de_mirage/de_mirage_3_png.webp b/public/assets/img/maps/de_mirage/de_mirage_3_png.webp new file mode 100644 index 0000000..1f08529 Binary files /dev/null and b/public/assets/img/maps/de_mirage/de_mirage_3_png.webp differ diff --git a/public/assets/img/maps/de_mirage/de_mirage_4_png.webp b/public/assets/img/maps/de_mirage/de_mirage_4_png.webp new file mode 100644 index 0000000..e7d5624 Binary files /dev/null and b/public/assets/img/maps/de_mirage/de_mirage_4_png.webp differ diff --git a/public/assets/img/maps/de_mirage/de_mirage_png.webp b/public/assets/img/maps/de_mirage/de_mirage_png.webp new file mode 100644 index 0000000..bebd297 Binary files /dev/null and b/public/assets/img/maps/de_mirage/de_mirage_png.webp differ diff --git a/public/assets/img/maps/de_nuke/1.webp b/public/assets/img/maps/de_nuke/1.webp deleted file mode 100644 index fa5dfda..0000000 Binary files a/public/assets/img/maps/de_nuke/1.webp and /dev/null differ diff --git a/public/assets/img/maps/de_nuke/2.webp b/public/assets/img/maps/de_nuke/2.webp deleted file mode 100644 index c29aa2d..0000000 Binary files a/public/assets/img/maps/de_nuke/2.webp and /dev/null differ diff --git a/public/assets/img/maps/de_nuke/3.webp b/public/assets/img/maps/de_nuke/3.webp deleted file mode 100644 index c886a87..0000000 Binary files a/public/assets/img/maps/de_nuke/3.webp and /dev/null differ diff --git a/public/assets/img/maps/de_nuke/4.webp b/public/assets/img/maps/de_nuke/4.webp deleted file mode 100644 index 9aaef8d..0000000 Binary files a/public/assets/img/maps/de_nuke/4.webp and /dev/null differ diff --git a/public/assets/img/maps/de_nuke/5.webp b/public/assets/img/maps/de_nuke/5.webp deleted file mode 100644 index 17cb3b9..0000000 Binary files a/public/assets/img/maps/de_nuke/5.webp and /dev/null differ diff --git a/public/assets/img/maps/de_nuke/6.webp b/public/assets/img/maps/de_nuke/6.webp deleted file mode 100644 index b44ccbc..0000000 Binary files a/public/assets/img/maps/de_nuke/6.webp and /dev/null differ diff --git a/public/assets/img/maps/de_nuke/de_nuke_1_png.webp b/public/assets/img/maps/de_nuke/de_nuke_1_png.webp new file mode 100644 index 0000000..d4c1c5b Binary files /dev/null and b/public/assets/img/maps/de_nuke/de_nuke_1_png.webp differ diff --git a/public/assets/img/maps/de_nuke/de_nuke_2_png.webp b/public/assets/img/maps/de_nuke/de_nuke_2_png.webp new file mode 100644 index 0000000..66d3202 Binary files /dev/null and b/public/assets/img/maps/de_nuke/de_nuke_2_png.webp differ diff --git a/public/assets/img/maps/de_nuke/de_nuke_3_png.webp b/public/assets/img/maps/de_nuke/de_nuke_3_png.webp new file mode 100644 index 0000000..fafcbcc Binary files /dev/null and b/public/assets/img/maps/de_nuke/de_nuke_3_png.webp differ diff --git a/public/assets/img/maps/de_nuke/de_nuke_4_png.webp b/public/assets/img/maps/de_nuke/de_nuke_4_png.webp new file mode 100644 index 0000000..1123e65 Binary files /dev/null and b/public/assets/img/maps/de_nuke/de_nuke_4_png.webp differ diff --git a/public/assets/img/maps/de_nuke/de_nuke_png.webp b/public/assets/img/maps/de_nuke/de_nuke_png.webp new file mode 100644 index 0000000..d920344 Binary files /dev/null and b/public/assets/img/maps/de_nuke/de_nuke_png.webp differ diff --git a/public/assets/img/maps/de_overpass/1.webp b/public/assets/img/maps/de_overpass/1.webp deleted file mode 100644 index fe5c2bc..0000000 Binary files a/public/assets/img/maps/de_overpass/1.webp and /dev/null differ diff --git a/public/assets/img/maps/de_overpass/2.webp b/public/assets/img/maps/de_overpass/2.webp deleted file mode 100644 index cf6da9a..0000000 Binary files a/public/assets/img/maps/de_overpass/2.webp and /dev/null differ diff --git a/public/assets/img/maps/de_overpass/3.webp b/public/assets/img/maps/de_overpass/3.webp deleted file mode 100644 index 6bbbd34..0000000 Binary files a/public/assets/img/maps/de_overpass/3.webp and /dev/null differ diff --git a/public/assets/img/maps/de_overpass/4.webp b/public/assets/img/maps/de_overpass/4.webp deleted file mode 100644 index 4dc6dd2..0000000 Binary files a/public/assets/img/maps/de_overpass/4.webp and /dev/null differ diff --git a/public/assets/img/maps/de_overpass/5.webp b/public/assets/img/maps/de_overpass/5.webp deleted file mode 100644 index 025951a..0000000 Binary files a/public/assets/img/maps/de_overpass/5.webp and /dev/null differ diff --git a/public/assets/img/maps/de_overpass/6.webp b/public/assets/img/maps/de_overpass/6.webp deleted file mode 100644 index bc87aa6..0000000 Binary files a/public/assets/img/maps/de_overpass/6.webp and /dev/null differ diff --git a/public/assets/img/maps/de_overpass/7.webp b/public/assets/img/maps/de_overpass/7.webp deleted file mode 100644 index 068d5c5..0000000 Binary files a/public/assets/img/maps/de_overpass/7.webp and /dev/null differ diff --git a/public/assets/img/maps/de_overpass/8.webp b/public/assets/img/maps/de_overpass/8.webp deleted file mode 100644 index 9b7585e..0000000 Binary files a/public/assets/img/maps/de_overpass/8.webp and /dev/null differ diff --git a/public/assets/img/maps/de_overpass/de_overpass_1_png.webp b/public/assets/img/maps/de_overpass/de_overpass_1_png.webp new file mode 100644 index 0000000..09f0b1c Binary files /dev/null and b/public/assets/img/maps/de_overpass/de_overpass_1_png.webp differ diff --git a/public/assets/img/maps/de_overpass/de_overpass_2_png.webp b/public/assets/img/maps/de_overpass/de_overpass_2_png.webp new file mode 100644 index 0000000..96ca2b7 Binary files /dev/null and b/public/assets/img/maps/de_overpass/de_overpass_2_png.webp differ diff --git a/public/assets/img/maps/de_overpass/de_overpass_3_png.webp b/public/assets/img/maps/de_overpass/de_overpass_3_png.webp new file mode 100644 index 0000000..b6472f3 Binary files /dev/null and b/public/assets/img/maps/de_overpass/de_overpass_3_png.webp differ diff --git a/public/assets/img/maps/de_overpass/de_overpass_4_png.webp b/public/assets/img/maps/de_overpass/de_overpass_4_png.webp new file mode 100644 index 0000000..672a0c1 Binary files /dev/null and b/public/assets/img/maps/de_overpass/de_overpass_4_png.webp differ diff --git a/public/assets/img/maps/de_overpass/de_overpass_5_png.webp b/public/assets/img/maps/de_overpass/de_overpass_5_png.webp new file mode 100644 index 0000000..34dc6ba Binary files /dev/null and b/public/assets/img/maps/de_overpass/de_overpass_5_png.webp differ diff --git a/public/assets/img/maps/de_overpass/de_overpass_png.webp b/public/assets/img/maps/de_overpass/de_overpass_png.webp new file mode 100644 index 0000000..23cc86e Binary files /dev/null and b/public/assets/img/maps/de_overpass/de_overpass_png.webp differ diff --git a/public/assets/img/maps/de_train/1.webp b/public/assets/img/maps/de_train/1.webp deleted file mode 100644 index 875a4a8..0000000 Binary files a/public/assets/img/maps/de_train/1.webp and /dev/null differ diff --git a/public/assets/img/maps/de_train/2.webp b/public/assets/img/maps/de_train/2.webp deleted file mode 100644 index 8d946cd..0000000 Binary files a/public/assets/img/maps/de_train/2.webp and /dev/null differ diff --git a/public/assets/img/maps/de_train/3.webp b/public/assets/img/maps/de_train/3.webp deleted file mode 100644 index 66b3b31..0000000 Binary files a/public/assets/img/maps/de_train/3.webp and /dev/null differ diff --git a/public/assets/img/maps/de_train/4.webp b/public/assets/img/maps/de_train/4.webp deleted file mode 100644 index bba7277..0000000 Binary files a/public/assets/img/maps/de_train/4.webp and /dev/null differ diff --git a/public/assets/img/maps/de_train/5.webp b/public/assets/img/maps/de_train/5.webp deleted file mode 100644 index e6f7e51..0000000 Binary files a/public/assets/img/maps/de_train/5.webp and /dev/null differ diff --git a/public/assets/img/maps/de_train/6.webp b/public/assets/img/maps/de_train/6.webp deleted file mode 100644 index f96fab9..0000000 Binary files a/public/assets/img/maps/de_train/6.webp and /dev/null differ diff --git a/public/assets/img/maps/de_train/de_train_1_png.webp b/public/assets/img/maps/de_train/de_train_1_png.webp new file mode 100644 index 0000000..2023a98 Binary files /dev/null and b/public/assets/img/maps/de_train/de_train_1_png.webp differ diff --git a/public/assets/img/maps/de_train/de_train_2_png.webp b/public/assets/img/maps/de_train/de_train_2_png.webp new file mode 100644 index 0000000..e2b00dc Binary files /dev/null and b/public/assets/img/maps/de_train/de_train_2_png.webp differ diff --git a/public/assets/img/maps/de_train/de_train_3_png.webp b/public/assets/img/maps/de_train/de_train_3_png.webp new file mode 100644 index 0000000..1b4d7bd Binary files /dev/null and b/public/assets/img/maps/de_train/de_train_3_png.webp differ diff --git a/public/assets/img/maps/de_train/de_train_4_png.webp b/public/assets/img/maps/de_train/de_train_4_png.webp new file mode 100644 index 0000000..7767248 Binary files /dev/null and b/public/assets/img/maps/de_train/de_train_4_png.webp differ diff --git a/public/assets/img/maps/de_train/de_train_png.webp b/public/assets/img/maps/de_train/de_train_png.webp new file mode 100644 index 0000000..9f86caa Binary files /dev/null and b/public/assets/img/maps/de_train/de_train_png.webp differ diff --git a/public/assets/img/maps/de_vertigo/1.webp b/public/assets/img/maps/de_vertigo/1.webp deleted file mode 100644 index c881b22..0000000 Binary files a/public/assets/img/maps/de_vertigo/1.webp and /dev/null differ diff --git a/public/assets/img/maps/de_vertigo/2.webp b/public/assets/img/maps/de_vertigo/2.webp deleted file mode 100644 index b800476..0000000 Binary files a/public/assets/img/maps/de_vertigo/2.webp and /dev/null differ diff --git a/public/assets/img/maps/de_vertigo/3.webp b/public/assets/img/maps/de_vertigo/3.webp deleted file mode 100644 index 075a58f..0000000 Binary files a/public/assets/img/maps/de_vertigo/3.webp and /dev/null differ diff --git a/public/assets/img/maps/de_vertigo/4.webp b/public/assets/img/maps/de_vertigo/4.webp deleted file mode 100644 index 5dcd125..0000000 Binary files a/public/assets/img/maps/de_vertigo/4.webp and /dev/null differ diff --git a/public/assets/img/maps/de_vertigo/5.webp b/public/assets/img/maps/de_vertigo/5.webp deleted file mode 100644 index 8f2b6d6..0000000 Binary files a/public/assets/img/maps/de_vertigo/5.webp and /dev/null differ diff --git a/public/assets/img/maps/de_vertigo/6.webp b/public/assets/img/maps/de_vertigo/6.webp deleted file mode 100644 index 01541e6..0000000 Binary files a/public/assets/img/maps/de_vertigo/6.webp and /dev/null differ diff --git a/public/assets/img/maps/de_vertigo/de_vertigo_1_png.webp b/public/assets/img/maps/de_vertigo/de_vertigo_1_png.webp new file mode 100644 index 0000000..9507621 Binary files /dev/null and b/public/assets/img/maps/de_vertigo/de_vertigo_1_png.webp differ diff --git a/public/assets/img/maps/de_vertigo/de_vertigo_2_png.webp b/public/assets/img/maps/de_vertigo/de_vertigo_2_png.webp new file mode 100644 index 0000000..8654626 Binary files /dev/null and b/public/assets/img/maps/de_vertigo/de_vertigo_2_png.webp differ diff --git a/public/assets/img/maps/de_vertigo/de_vertigo_3_png.webp b/public/assets/img/maps/de_vertigo/de_vertigo_3_png.webp new file mode 100644 index 0000000..3984312 Binary files /dev/null and b/public/assets/img/maps/de_vertigo/de_vertigo_3_png.webp differ diff --git a/public/assets/img/maps/de_vertigo/de_vertigo_4_png.webp b/public/assets/img/maps/de_vertigo/de_vertigo_4_png.webp new file mode 100644 index 0000000..323cf5c Binary files /dev/null and b/public/assets/img/maps/de_vertigo/de_vertigo_4_png.webp differ diff --git a/public/assets/img/maps/de_vertigo/de_vertigo_png.webp b/public/assets/img/maps/de_vertigo/de_vertigo_png.webp new file mode 100644 index 0000000..b6785fb Binary files /dev/null and b/public/assets/img/maps/de_vertigo/de_vertigo_png.webp differ diff --git a/public/assets/img/maps/lobby_mapveto_png.webp b/public/assets/img/maps/lobby_mapveto_png.webp new file mode 100644 index 0000000..c143941 Binary files /dev/null and b/public/assets/img/maps/lobby_mapveto_png.webp differ diff --git a/public/assets/img/radar/de_anubis/de_anubis_radar_psd.png b/public/assets/img/radar/de_anubis/de_anubis_radar_psd.png index 3d19d0a..1b573ff 100644 Binary files a/public/assets/img/radar/de_anubis/de_anubis_radar_psd.png and b/public/assets/img/radar/de_anubis/de_anubis_radar_psd.png differ diff --git a/public/assets/img/radar/de_nuke/de_nuke_lower_radar_psd.png b/public/assets/img/radar/de_nuke/de_nuke_lower_radar_psd.png index 60f20da..60fa463 100644 Binary files a/public/assets/img/radar/de_nuke/de_nuke_lower_radar_psd.png and b/public/assets/img/radar/de_nuke/de_nuke_lower_radar_psd.png differ diff --git a/public/assets/img/radar/de_nuke/de_nuke_radar_psd.png b/public/assets/img/radar/de_nuke/de_nuke_radar_psd.png index 8cc5eac..02135fd 100644 Binary files a/public/assets/img/radar/de_nuke/de_nuke_radar_psd.png and b/public/assets/img/radar/de_nuke/de_nuke_radar_psd.png differ diff --git a/public/assets/img/radar/de_overpass/de_overpass_radar_psd.png b/public/assets/img/radar/de_overpass/de_overpass_radar_psd.png index 1566cab..235914d 100644 Binary files a/public/assets/img/radar/de_overpass/de_overpass_radar_psd.png and b/public/assets/img/radar/de_overpass/de_overpass_radar_psd.png differ diff --git a/public/assets/img/radar/default_png.png b/public/assets/img/radar/default_png.png new file mode 100644 index 0000000..3e99566 Binary files /dev/null and b/public/assets/img/radar/default_png.png differ diff --git a/public/assets/sounds/accept.wav b/public/assets/sounds/loading.wav similarity index 100% rename from public/assets/sounds/accept.wav rename to public/assets/sounds/loading.wav diff --git a/public/assets/sounds/menu_accept.wav b/public/assets/sounds/menu_accept.wav new file mode 100644 index 0000000..1d97da6 Binary files /dev/null and b/public/assets/sounds/menu_accept.wav differ diff --git a/src/app/api/matches/[matchId]/mapvote/reset/route.ts b/src/app/api/matches/[matchId]/mapvote/reset/route.ts index 904df52..571c319 100644 --- a/src/app/api/matches/[matchId]/mapvote/reset/route.ts +++ b/src/app/api/matches/[matchId]/mapvote/reset/route.ts @@ -77,14 +77,11 @@ export async function POST(req: NextRequest, { params }: { params: { matchId: st return NextResponse.json({ message: 'Map-Vote nicht gefunden' }, { status: 404 }) } - // optional: nur Admins erlauben – falls gewünscht: - // if (!me.isAdmin) return NextResponse.json({ message: 'Nur Admins dürfen resetten' }, { status: 403 }) - const vote = match.mapVote // Reset in einer Transaktion await prisma.$transaction(async (tx) => { - // alle Steps zurücksetzen + // 1) alle Map-Vote-Schritte zurücksetzen await Promise.all( vote.steps.map(s => tx.mapVoteStep.update({ @@ -94,7 +91,7 @@ export async function POST(req: NextRequest, { params }: { params: { matchId: st ) ) - // Vote Zustand zurücksetzen + // 2) Vote-Zustand zurücksetzen await tx.mapVote.update({ where: { id: vote.id }, data : { @@ -104,6 +101,11 @@ export async function POST(req: NextRequest, { params }: { params: { matchId: st adminEditingSince: null, }, }) + + // 3) ✅ Ready-Status (Acceptances) für dieses Match löschen + await tx.matchReady.deleteMany({ + where: { matchId }, + }) }) const updated = await prisma.mapVote.findUnique({ @@ -114,11 +116,15 @@ export async function POST(req: NextRequest, { params }: { params: { matchId: st return NextResponse.json({ message: 'Reset fehlgeschlagen' }, { status: 500 }) } - // Events: zuerst map-vote-updated (UI neu laden) - await sendServerSSEMessage({ type: 'map-vote-updated', matchId }) + // 🔔 Events: + // a) Map-Vote-Update (UI neu laden) + await sendServerSSEMessage({ type: 'map-vote-updated', payload: { matchId } }) - // dann map-vote-reset (globale Overlays schließen, lokale Flags löschen) - await sendServerSSEMessage({ type: 'map-vote-reset', matchId }) + // b) Ready-Update (damit Ready-UI/Counter sofort 0/total zeigt) + await sendServerSSEMessage({ type: 'ready-updated', payload: { matchId } }) + + // c) Map-Vote-Reset (Overlays schließen, LocalFlags löschen) + await sendServerSSEMessage({ type: 'map-vote-reset', payload: { matchId } }) const mapVisuals = buildMapVisuals(match.id, updated.mapPool) diff --git a/src/app/api/matches/[matchId]/mapvote/route.ts b/src/app/api/matches/[matchId]/mapvote/route.ts index b8e866c..34a6b94 100644 --- a/src/app/api/matches/[matchId]/mapvote/route.ts +++ b/src/app/api/matches/[matchId]/mapvote/route.ts @@ -1,4 +1,4 @@ -// /app/api/matches/[id]/mapvote/route.ts +// /app/api/matches/[matchId]/mapvote/route.ts import { NextResponse, NextRequest } from 'next/server' import { getServerSession } from 'next-auth' @@ -240,26 +240,25 @@ function computeAvailableMaps(mapPool: string[], steps: Array<{ map: string | nu /* ---------- Visuals: deterministisches zufälliges Bild pro Map & Match ---------- */ function buildMapVisuals(matchId: string, mapPool: string[]) { - const visuals: Record = {} + const visuals: Record = {} for (const key of mapPool) { const opt = MAP_OPTIONS.find(o => o.key === key) const label = opt?.label ?? key const imgs = opt?.images ?? [] - let bg = `/assets/img/maps/${key}/1.jpg` - + let bg = `/assets/img/maps/${key}/${key}_1_png.webp` if (imgs.length > 0) { - // deterministischer Index auf Basis von matchId+key const h = createHash('sha256').update(`${matchId}:${key}`).digest('hex') - const n = parseInt(h.slice(0, 8), 16) // 32-bit + const n = parseInt(h.slice(0, 8), 16) const idx = n % imgs.length bg = imgs[idx] } - - visuals[key] = { label, bg } + const logo = opt?.icon ?? `/assets/img/mapicons/map_icon_${key}.svg` // ⬅️ neu + visuals[key] = { label, bg, logo } } return visuals } + function uniq(arr: T[]) { return Array.from(new Set(arr)) } diff --git a/src/app/api/matches/[matchId]/ready/route.ts b/src/app/api/matches/[matchId]/ready/route.ts new file mode 100644 index 0000000..485f843 --- /dev/null +++ b/src/app/api/matches/[matchId]/ready/route.ts @@ -0,0 +1,153 @@ +import { NextRequest, NextResponse } from 'next/server' +import { getServerSession } from 'next-auth' +import { authOptions } from '@/app/lib/auth' +import { prisma } from '@/app/lib/prisma' +import { sendServerSSEMessage } from '@/app/lib/sse-server-client' + +export const runtime = 'nodejs' +export const dynamic = 'force-dynamic' + +/** ---- Helpers: Spieler-Liste aus Match bauen ---- */ +function shapeUser(u: any) { + if (!u) return null + return { + steamId: u.steamId, + name : u.name ?? '', + avatar : u.avatar ?? '/assets/img/avatars/default_steam_avatar.jpg', + } +} + +function buildParticipants(match: any) { + const teamAUsers = (match.teamAUsers ?? []).map(shapeUser).filter(Boolean) + const teamBUsers = (match.teamBUsers ?? []).map(shapeUser).filter(Boolean) + + // Fallback: aus match.players → user ziehen, falls teamA/B leer wären + const fromPlayers = (match.players ?? []) + .map((mp: any) => mp?.user) + .map(shapeUser) + .filter(Boolean) + + // deduplizieren – Teamzuordnung merken + const seen = new Set() + const out: Array<{steamId: string; name: string; avatar: string; team: 'A'|'B'|null}> = [] + + for (const u of teamAUsers) { + if (!u || seen.has(u.steamId)) continue + seen.add(u.steamId) + out.push({ ...u, team: 'A' }) + } + for (const u of teamBUsers) { + if (!u || seen.has(u.steamId)) continue + seen.add(u.steamId) + out.push({ ...u, team: 'B' }) + } + for (const u of fromPlayers) { + if (!u || seen.has(u.steamId)) continue + seen.add(u.steamId) + out.push({ ...u, team: null }) + } + return out +} + +/** ---- GET: Status lesen ---- */ +export async function GET(req: NextRequest, { params }: { params: { matchId: string } }) { + try { + const matchId = params.matchId + if (!matchId) return NextResponse.json({ message: 'Missing matchId' }, { status: 400 }) + + // ⬇️ Session holen, um myReady zu berechnen + const session = await getServerSession(authOptions(req)) + const me = session?.user as { steamId?: string } | undefined + const mySteamId = me?.steamId + + const match = await prisma.match.findUnique({ + where: { id: matchId }, + include: { + teamA: true, + teamB: true, + teamAUsers: true, + teamBUsers: true, + players: { include: { user: true } }, + }, + }) + if (!match) return NextResponse.json({ message: 'Match nicht gefunden' }, { status: 404 }) + + const participants = buildParticipants(match) + const readyRows = await prisma.matchReady.findMany({ + where: { matchId }, + select: { steamId: true, acceptedAt: true }, + }) + + const readyMap: Record = {} + for (const r of readyRows) readyMap[r.steamId] = r.acceptedAt.toISOString() + + const total = participants.length + const countReady = participants.filter(p => !!readyMap[p.steamId]).length + + // ⬇️ neu: eigener Ready-Status + const myReady = !!(mySteamId && readyMap[mySteamId]) + + return NextResponse.json({ + participants, + ready: readyMap, + total, + countReady, + myReady, // <-- neu + }, { headers: { 'Cache-Control': 'no-store' } }) + } catch (e) { + console.error('[match-ready][GET] error', e) + return NextResponse.json({ message: 'Fehler beim Laden' }, { status: 500 }) + } +} + +/** ---- POST: mich als bereit markieren ---- */ +export async function POST(req: NextRequest, { params }: { params: { matchId: string } }) { + try { + const session = await getServerSession(authOptions(req)) + const me = session?.user as { steamId?: string } | undefined + if (!me?.steamId) return NextResponse.json({ message: 'Nicht eingeloggt' }, { status: 401 }) + + const matchId = params.matchId + if (!matchId) return NextResponse.json({ message: 'Missing matchId' }, { status: 400 }) + + // --- Intent-Schutz: Header + Body müssen passen --- + const hdr = req.headers.get('X-Ready-Accept') + let body: any = null + try { body = await req.json() } catch {} + if (hdr !== '1' || body?.intent !== 'accept') { + return NextResponse.json({ message: 'Invalid ready intent' }, { status: 400 }) + } + + // --- Nur Teilnehmer dürfen ready sein --- + const match = await prisma.match.findUnique({ + where: { id: matchId }, + include: { teamAUsers: true, teamBUsers: true, players: { include: { user: true } } }, + }) + if (!match) return NextResponse.json({ message: 'Match nicht gefunden' }, { status: 404 }) + + const participants = new Set([ + ...match.teamAUsers.map(u => u.steamId), + ...match.teamBUsers.map(u => u.steamId), + ...match.players.map(p => p.user?.steamId).filter(Boolean) as string[], + ]) + if (!participants.has(me.steamId)) { + return NextResponse.json({ message: 'Not a participant' }, { status: 403 }) + } + + // --- Idempotent upsert: nur dann „ready“, wenn Intent korrekt war --- + await prisma.matchReady.upsert({ + where: { matchId_steamId: { matchId, steamId: me.steamId } }, + create: { matchId, steamId: me.steamId }, + update: { acceptedAt: new Date() }, + }) + + await sendServerSSEMessage({ + type: 'ready-updated', + payload: { matchId, steamId: me.steamId, acceptedAt: new Date().toISOString() }, + }) + return NextResponse.json({ ok: true }) + } catch (e) { + console.error('[match-ready][POST] error', e) + return NextResponse.json({ message: 'Aktion fehlgeschlagen' }, { status: 500 }) + } +} diff --git a/src/app/components/AudioPrimer.tsx b/src/app/components/AudioPrimer.tsx index 7cf7765..4e9b97c 100644 --- a/src/app/components/AudioPrimer.tsx +++ b/src/app/components/AudioPrimer.tsx @@ -11,7 +11,8 @@ export default function AudioPrimer() { await Promise.all([ sound.load('ready', '/assets/sounds/cs2_game_ready.wav'), sound.load('beep', '/assets/sounds/beep.wav'), - sound.load('accept', '/assets/sounds/accept.wav'), + sound.load('loading', '/assets/sounds/loading.wav'), + sound.load('menu_accept', '/assets/sounds/menu_accept.wav'), ]); } window.removeEventListener('pointerdown', onFirstGesture); diff --git a/src/app/components/LoadingSpinner.tsx b/src/app/components/LoadingSpinner.tsx index 0e6c7b6..f423898 100644 --- a/src/app/components/LoadingSpinner.tsx +++ b/src/app/components/LoadingSpinner.tsx @@ -4,7 +4,7 @@ export default function LoadingSpinner() { return ( -
+
(null) /* -------- Timers / open window -------- */ - // ⚠️ Wichtig: hier keine Date.now()-abhängigen Ausgaben im SSR! - - // stabile Basiszeit aus Props (SSR-safe; kein Date.now()) const matchBaseTs = useMemo(() => { const raw = match.matchDate ?? match.demoDate ?? null return raw ? new Date(raw).getTime() : null }, [match.matchDate, match.demoDate]) - // vom Server geliefertes opensAt (hat Vorrang) const opensAtTsFromServer = useMemo(() => { return state?.opensAt ? new Date(state.opensAt).getTime() : null }, [state?.opensAt]) @@ -72,14 +68,11 @@ export default function MapVotePanel({ match }: Props) { return matchBaseTs != null ? matchBaseTs - 60 * 60 * 1000 : null }, [matchBaseTs]) - // Reihenfolge: SSE-Override → Server-Stand → Fallback const openTs = opensAtOverrideTs ?? opensAtTsFromServer ?? fallbackOpensAtTs ?? null - // Mount-Flag, damit wir den Countdown erst clientseitig laufen lassen const [mounted, setMounted] = useState(false) useEffect(() => { setMounted(true) }, []) - // Countdown-State (nur nach Mount updaten, sekundensynchron) const [msLeft, setMsLeft] = useState(0) useEffect(() => { if (!mounted) return @@ -88,7 +81,6 @@ export default function MapVotePanel({ match }: Props) { const update = () => setMsLeft(Math.max(openTs - Date.now(), 0)) update() - // an Sekundengrenze koppeln const drift = 1000 - (Date.now() % 1000) let intervalId: number | null = null const timeoutId = window.setTimeout(() => { @@ -112,7 +104,6 @@ export default function MapVotePanel({ match }: Props) { if (overlayOpen && overlayIsForThisMatch) setOverlayShownOnce(true) }, [overlayOpen, overlayIsForThisMatch]) - // Auf „match-ready“ reagieren → Overlay nach 3s öffnen useEffect(() => { if (!lastEvent) return if (lastEvent.type !== 'match-ready') return @@ -122,7 +113,7 @@ export default function MapVotePanel({ match }: Props) { showWithDelay({ matchId: match.id, mapLabel: fm?.label ?? 'Erste Map', - mapBg: fm?.bg ?? '/assets/img/maps/cs2.webp', + mapBg: fm?.bg ?? '/assets/img/maps/lobby_mapveto_png.webp', nextHref: `/match-details/${match.id}/radar`, }, 3000) }, [lastEvent, match.id, showWithDelay]) @@ -150,18 +141,15 @@ export default function MapVotePanel({ match }: Props) { useEffect(() => { load() }, [load]) - // 🔔 Reagiere auf alle relevanten Match-Events (inkl. match-updated) useEffect(() => { if (!lastEvent) return - // robustes Unwrapping (doppelte payload) const unwrap = (e: any) => e?.payload?.payload ?? e?.payload ?? e const evt = unwrap(lastEvent) const type = lastEvent.type ?? evt?.type if (evt?.matchId !== match.id) return - // ⬅️ Nur noch map-vote-updated für Counter/opensAt if (type === 'map-vote-updated') { const { opensAt, leadMinutes } = evt ?? {} if (opensAt) { @@ -175,14 +163,10 @@ export default function MapVotePanel({ match }: Props) { } } - // ⬅️ Nur Map-Vote-Events triggern ein Reload (kein match-updated mehr) const MAPVOTE_REFRESH = new Set(['map-vote-updated', 'map-vote-reset', 'map-vote-admin-edit']) - if (MAPVOTE_REFRESH.has(type)) { - load() - } + if (MAPVOTE_REFRESH.has(type)) load() }, [lastEvent, match.id, load, matchBaseTs]) - /* -------- Admin-Edit Mirror -------- */ const adminEditingBy = state?.adminEdit?.by ?? null const adminEditingEnabled = !!state?.adminEdit?.enabled @@ -226,11 +210,9 @@ export default function MapVotePanel({ match }: Props) { const fmt = (k: string) => state?.mapVisuals?.[k]?.label ?? k - // Statusleiste (locked): Spinner solange Overlay noch nicht (für dieses Match) gezeigt, dann ✅ const showDone = !!state?.locked && (overlayShownOnce || !overlayIsForThisMatch) const showLockedSpinner = !!state?.locked && !showDone - // Page-level Loading/Error const showPageLoading = isLoading && !state const showError = !!error && !state @@ -261,7 +243,6 @@ export default function MapVotePanel({ match }: Props) { alert(j.message ?? 'Aktion fehlgeschlagen') return } - // Optimistisches Update setState(prev => prev ? { @@ -337,7 +318,8 @@ export default function MapVotePanel({ match }: Props) { } if (holdMapRef.current === map) { resetHold() - setProgressByMap(prev => ({ ...prev, [map]: 0 }))} + setProgressByMap(prev => ({ ...prev, [map]: 0 })) + } }, [progressByMap, resetHold, finishAndSubmit]) const onTouchStart = (map: string, allowed: boolean) => (e: React.TouchEvent) => { @@ -427,7 +409,11 @@ export default function MapVotePanel({ match }: Props) { [playersB] ) - /* -------- Left/Right selection -------- */ + const amInTeamA = !!mySteamId && playersA.some(p => p.user?.steamId === mySteamId) + const amInTeamB = !!mySteamId && playersB.some(p => p.user?.steamId === mySteamId) + const myTeamId = amInTeamA ? match.teamA?.id : amInTeamB ? match.teamB?.id : null + + // Links/Rechts anhand des eigenen Teams let teamLeftKey: 'teamA' | 'teamB' = 'teamA' let teamRightKey: 'teamA' | 'teamB' = 'teamB' if (mySteamId && playersB.some(p => p.user?.steamId === mySteamId)) { @@ -435,21 +421,24 @@ export default function MapVotePanel({ match }: Props) { teamRightKey = 'teamA' } - const teamLeft = match[teamLeftKey] - const teamRight = match[teamRightKey] + const teamLeft = (match as any)[teamLeftKey] + const teamRight = (match as any)[teamRightKey] const playersLeft = teamLeftKey === 'teamA' ? playersA : playersB const playersRight = teamRightKey === 'teamA' ? playersA : playersB const rankLeft = teamLeftKey === 'teamA' ? teamAPlayersForRank : teamBPlayersForRank const rankRight = teamRightKey === 'teamA' ? teamAPlayersForRank : teamBPlayersForRank + const leftTeamId = state?.teams?.[teamLeftKey]?.id ?? teamLeft?.id + const rightTeamId = state?.teams?.[teamRightKey]?.id ?? teamRight?.id + const leftIsActiveTurn = !!currentStep?.teamId && - currentStep.teamId === (state?.teams?.[teamLeftKey]?.id ?? teamLeft?.id) && + currentStep.teamId === leftTeamId && !state?.locked const rightIsActiveTurn = !!currentStep?.teamId && - currentStep.teamId === (state?.teams?.[teamRightKey]?.id ?? teamRight?.id) && + currentStep.teamId === rightTeamId && !state?.locked /* -------- Sorted map pool -------- */ @@ -568,12 +557,40 @@ export default function MapVotePanel({ match }: Props) { })()} ) : ( - - {currentStep?.action === 'ban' - ? '🚫 Dein Team darf bannen' - : currentStep?.action === 'pick' - ? '✅ Dein Team darf picken' - : 'Du bist dran'} + + {(() => { + if (!currentStep) return 'Warte auf nächsten Schritt' + + const tId = currentStep.teamId + const tName = + tId === state?.teams?.teamA?.id ? state?.teams?.teamA?.name ?? match.teamA?.name : + tId === state?.teams?.teamB?.id ? state?.teams?.teamB?.name ?? match.teamB?.name : + 'Unbekanntes Team' + + if (isMyTurn) { + return currentStep.action === 'ban' + ? '🚫 Dein Team darf bannen' + : currentStep.action === 'pick' + ? '✅ Dein Team darf picken' + : 'Du bist dran' + } + + // ⬇️ Icon vor den Text packen + return ( + <> + {(currentStep.action === 'ban' || currentStep.action === 'pick') && ( + + )} + {currentStep.action === 'ban' + ? `${tName} bannt` + : currentStep.action === 'pick' + ? `${tName} pickt` + : `${tName} ist dran`} + + ) + })()} ) ) : ( @@ -600,34 +617,41 @@ export default function MapVotePanel({ match }: Props) { {/* Hauptbereich */} {state && (
- {/* Linke Spalte */} -
+ {/* Linke Spalte (immer dein Team) */} +
- {match.teamA?.name -
-
{match.teamA?.name ?? 'Team'}
+ {teamLeft?.name +
+
{teamLeft?.name ?? 'Team'}
- ({ premierRank: p.stats?.rankNew ?? 0 })) as any} /> +
- {playersA.map((p: MatchPlayer) => ( + {playersLeft.map((p: MatchPlayer) => ( router.push(`/profile/${p.user.steamId}`)} - isLeader={(state?.teams?.teamA?.leader?.steamId ?? match.teamA?.leader?.steamId) === p.user.steamId} - isActiveTurn={!!currentStep?.teamId && currentStep.teamId === (state?.teams?.teamA?.id ?? match.teamA?.id) && !state.locked} + isLeader={(state?.teams?.[teamLeftKey]?.leader?.steamId ?? teamLeft?.leader?.steamId) === p.user.steamId} + isActiveTurn={leftIsActiveTurn} /> ))}
@@ -662,7 +686,7 @@ export default function MapVotePanel({ match }: Props) { const visualDisabled = `bg-white dark:bg-neutral-900 border-neutral-300 dark:border-neutral-700 cursor-not-allowed ${isFrozenByAdmin ? 'opacity-60' : ''}` const visualClasses = taken ? visualTaken : isAvailable ? visualAvailable : visualDisabled - // für DECIDER den „Chooser“ ermitteln (letztes Ban davor) + // DECIDER-Chooser (letztes Ban davor) const steps = state?.steps ?? [] const decIdx = steps.findIndex(s => s.action === 'decider') let deciderChooserTeamId: string | null = null @@ -676,12 +700,11 @@ export default function MapVotePanel({ match }: Props) { const effectiveTeamId = status === 'decider' ? deciderChooserTeamId : decision?.teamId ?? null - const pickedByLeft = (status === 'pick' || status === 'decider') && effectiveTeamId === match.teamA?.id - const pickedByRight = (status === 'pick' || status === 'decider') && effectiveTeamId === match.teamB?.id + const pickedByLeft = (status === 'pick' || status === 'decider') && effectiveTeamId === leftTeamId + const pickedByRight = (status === 'pick' || status === 'decider') && effectiveTeamId === rightTeamId - const bg = state?.mapVisuals?.[map]?.bg ?? `/assets/img/maps/${map}/1.jpg` + const bg = state?.mapVisuals?.[map]?.bg ?? `/assets/img/maps/${map}/${map}_1_png.webp` - // ⬇️ Fortschritt aus den TOP-LEVEL Hooks nutzen const progress = progressByMap[map] ?? 0 const showProgress = isAvailable && progress > 0 && progress < 1 @@ -692,7 +715,11 @@ export default function MapVotePanel({ match }: Props) { return (
  • {pickedByLeft ? ( - {match.teamA?.name + {teamLeft?.name ) :
    } {pickedByRight ? ( - {match.teamB?.name + {teamRight?.name ) :
    }
  • ) @@ -757,34 +788,41 @@ export default function MapVotePanel({ match }: Props) { - {/* Rechte Spalte */} -
    + {/* Rechte Spalte (Gegner) */} +
    - ({ premierRank: p.stats?.rankNew ?? 0 })) as any} /> +
    -
    {match.teamB?.name ?? 'Team'}
    +
    {teamRight?.name ?? 'Team'}
    - {match.teamB?.name + {teamRight?.name
    - {playersB.map((p: MatchPlayer) => ( + {playersRight.map((p: MatchPlayer) => ( router.push(`/profile/${p.user.steamId}`)} - isLeader={(state?.teams?.teamB?.leader?.steamId ?? match.teamB?.leader?.steamId) === p.user.steamId} - isActiveTurn={!!currentStep?.teamId && currentStep.teamId === (state?.teams?.teamB?.id ?? match.teamB?.id) && !state.locked} + isLeader={(state?.teams?.[teamRightKey]?.leader?.steamId ?? teamRight?.leader?.steamId) === p.user.steamId} + isActiveTurn={rightIsActiveTurn} /> ))}
    @@ -801,7 +839,8 @@ export default function MapVotePanel({ match }: Props) { const chosenSteps = (state.steps ?? []).filter( s => (s.action === 'pick' || s.action === 'decider') && s.map ) - // ermitteln, wer beim DECIDER "zählt" + + // wer „entscheidet“ beim Decider (letztes Ban davor) const steps = state?.steps ?? [] const decIdx = steps.findIndex(s => s.action === 'decider') let chooserTeamId: string | null = null @@ -812,8 +851,8 @@ export default function MapVotePanel({ match }: Props) { } } - const teamLeftLogo = getTeamLogo(match.teamA?.logo) - const teamRightLogo = getTeamLogo(match.teamB?.logo) + const teamLeftLogo = getTeamLogo(teamLeft?.logo) + const teamRightLogo = getTeamLogo(teamRight?.logo) return ( @@ -823,13 +862,29 @@ export default function MapVotePanel({ match }: Props) { const action = step?.action as ('pick' | 'decider') | undefined const mapKey = step?.map const label = mapKey ? fmt(mapKey) : '?' - const bg = mapKey ? (state.mapVisuals?.[mapKey]?.bg ?? `/assets/img/maps/${mapKey}/1.jpg`) : null - const pickTeamId = action === 'pick' ? (step?.teamId ?? null) - : action === 'decider' ? chooserTeamId - : null - const pickedByLeft = pickTeamId && pickTeamId === match.teamA?.id - const pickedByRight = pickTeamId && pickTeamId === match.teamB?.id - const sideLogo = pickedByLeft ? teamLeftLogo : pickedByRight ? teamRightLogo : null + const visuals = mapKey ? state.mapVisuals?.[mapKey] : undefined + const bg = visuals?.bg ?? (mapKey ? `/assets/img/maps/${mapKey}/${mapKey}_1_png.webp` : null) + const mapLogo = mapKey + ? (MAP_OPTIONS.find(o => o.key === mapKey)?.icon + ?? `/assets/img/mapicons/map_icon_${mapKey}.svg`) // Fallback + : null + + const pickTeamId = + action === 'pick' ? (step?.teamId ?? null) + : action === 'decider' ? chooserTeamId + : null + + // Nummer des Picks: zähle nur vorherige Picks + const pickNumber = + action === 'pick' + ? chosenSteps.slice(0, idx).filter(s => s.action === 'pick').length + 1 + : null + + const pickedByLeft = (action === 'pick' || action === 'decider') && pickTeamId === leftTeamId + const pickedByRight = (action === 'pick' || action === 'decider') && pickTeamId === rightTeamId + const cornerLogo = pickedByLeft ? teamLeftLogo : pickedByRight ? teamRightLogo : null + const cornerPos = 'right-2 top-2' + const frameClasses = action === 'pick' ? 'ring-2 ring-green-500' : action === 'decider' ? 'ring-2 ring-blue-500' @@ -849,14 +904,55 @@ export default function MapVotePanel({ match }: Props) { 'bg-neutral-200 dark:bg-neutral-800' ].join(' ')} > - {bg && ({label})} -
    -
    - - {label} + {/* Hintergrundbild */} + {bg && ( + {label} + )} +
    + + {/* Team-Logo in der Ecke (Picker) */} + {cornerLogo && ( + Picker-Team + )} + + {/* Pick-Nummer oben links (nur für Picks) */} + {typeof pickNumber === 'number' && ( + + {pickNumber} - {sideLogo && ( - Team + )} + + {/* Map-Logo zentriert (Fallback: Label) */} +
    + {mapLogo ? ( + <> + {label} + + {label} + + + ) : ( + + {label} + )}
    diff --git a/src/app/components/MatchReadyOverlay.tsx b/src/app/components/MatchReadyOverlay.tsx index d9e997b..4e21464 100644 --- a/src/app/components/MatchReadyOverlay.tsx +++ b/src/app/components/MatchReadyOverlay.tsx @@ -1,18 +1,28 @@ +// MatchReadyOverlay.tsx 'use client' -import { useEffect, useMemo, useRef, useState } from 'react' +import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { sound } from '@/app/lib/soundManager' +import { useSSEStore } from '@/app/lib/useSSEStore' +import { useSession } from 'next-auth/react' +import LoadingSpinner from './LoadingSpinner' +import { MAP_OPTIONS } from '../lib/mapOptions' +import type { MapOption } from '../lib/mapOptions' type Props = { open: boolean + matchId: string mapLabel: string mapBg: string onAccept: () => void | Promise deadlineAt?: number onTimeout?: () => void forceGif?: boolean + connectHref?: string } +type Presence = 'online' | 'away' | 'offline' + function fmt(ms: number) { const sec = Math.max(0, Math.ceil(ms / 1000)) const m = Math.floor(sec / 60) @@ -22,26 +32,162 @@ function fmt(ms: number) { export default function MatchReadyOverlay({ open, + matchId, mapLabel, mapBg, onAccept, deadlineAt, onTimeout, forceGif, + connectHref = 'steam://connect/cs2.ironieopen.de:27015/ironie', }: Props) { + const { data: session } = useSession() + const mySteamId = session?.user?.steamId + const { lastEvent } = useSSEStore() + const [now, setNow] = useState(() => Date.now()) const [startedAt] = useState(() => Date.now()) - const fallbackDeadline = useMemo(() => startedAt + 30_000, [startedAt]) + const fallbackDeadline = useMemo(() => startedAt + 20_000, [startedAt]) const effectiveDeadline = deadlineAt ?? fallbackDeadline const rest = Math.max(0, effectiveDeadline - now) + // UI-States + const [accepted, setAccepted] = useState(false) + const [finished, setFinished] = useState(false) + const [showWaitHint, setShowWaitHint] = useState(false) + const [connecting, setConnecting] = useState(false) + const isVisible = open || accepted || showWaitHint + + const [showBackdrop, setShowBackdrop] = useState(false) + const [showContent, setShowContent] = useState(false) + + // Ready-Listen-Status + type Participant = { steamId: string; name: string; avatar: string; team: 'A' | 'B' | null } + const [participants, setParticipants] = useState([]) + const [readyMap, setReadyMap] = useState>({}) + const [total, setTotal] = useState(0) + const [countReady, setCountReady] = useState(0) + + // Presence-Map (SSE) + const [statusMap, setStatusMap] = useState>({}) + + const prevCountReadyRef = useRef(0) + const ignoreNextIncreaseRef = useRef(false) + + // ----- AUDIO ----- + const beepsRef = useRef | null>(null) + const audioStartedRef = useRef(false) + + const stopBeeps = () => { if (beepsRef.current) { clearInterval(beepsRef.current); beepsRef.current = null } } + + const ensureAudioUnlocked = async () => { + try { + if (typeof (sound as any).ensureUnlocked === 'function') { await (sound as any).ensureUnlocked(); return true } + if (typeof (sound as any).unlock === 'function') { await (sound as any).unlock(); return true } + const ctx = (sound as any).ctx || (sound as any).audioContext + if (ctx && typeof ctx.resume === 'function' && ctx.state !== 'running') await ctx.resume() + return true + } catch { return false } + } + + const startBeeps = () => { + try { sound.play('ready') } catch {} + stopBeeps() + beepsRef.current = setInterval(() => { try { sound.play('beep') } catch {} }, 1000) + } + + const playMenuAccept = () => { + try { (sound as any).play?.('menu_accept') } catch {} + try { new Audio('/assets/sounds/menu_accept.wav').play() } catch {} + } + + // NUR nach Acceptance laden/aktualisieren + const loadReady = useCallback(async () => { + try { + const r = await fetch(`/api/matches/${matchId}/ready`, { cache: 'no-store' }) + if (!r.ok) return + const j = await r.json() + setParticipants(j.participants ?? []) + setReadyMap(j.ready ?? {}) + setTotal(j.total ?? 0) + setCountReady(j.countReady ?? 0) + } catch {} + }, [matchId]) + + // ---- Accept-Handling ---- + const postingRef = useRef(false) + + const onAcceptClick = async () => { + if (postingRef.current) return + postingRef.current = true + try { + stopBeeps() + playMenuAccept() + + const res = await fetch(`/api/matches/${matchId}/ready`, { + method: 'POST', + headers: { 'Content-Type': 'application/json', 'X-Ready-Accept': '1' }, + cache: 'no-store', + body: JSON.stringify({ intent: 'accept' }), + }) + if (!res.ok) return + + setAccepted(true) + try { await onAccept() } catch {} + await loadReady() + } finally { + postingRef.current = false + } + } + + // Backdrop zuerst faden, dann Content + useEffect(() => { + if (!isVisible) { setShowBackdrop(false); setShowContent(false); return } + setShowBackdrop(true) + const id = setTimeout(() => setShowContent(true), 2000) + return () => clearTimeout(id) + }, [isVisible]) + + if (!isVisible) return null + + // Nach Accept ein kurzer Refresh + useEffect(() => { + if (!accepted) return + const id = setTimeout(loadReady, 250) + return () => clearTimeout(id) + }, [accepted, loadReady]) + + // SSE + useEffect(() => { + if (!lastEvent) return + const type = (lastEvent as any).type ?? (lastEvent as any)?.payload?.type + const payload = (lastEvent as any).payload?.payload ?? (lastEvent as any).payload ?? lastEvent + + if (type === 'ready-updated' && payload?.matchId === matchId) { + if (accepted) { + const otherSteamId = payload?.steamId as string | undefined + if (otherSteamId && otherSteamId !== mySteamId) playMenuAccept() + } + loadReady() + return + } + + if (type === 'user-status-updated') { + const steamId: string | undefined = payload?.steamId ?? payload?.user?.steamId + const status = payload?.status as Presence | undefined + if (steamId && (status === 'online' || status === 'away' || status === 'offline')) { + setStatusMap(prev => (prev[steamId] === status ? prev : { ...prev, [steamId]: status })) + } + } + }, [accepted, lastEvent, matchId, mySteamId, loadReady]) + // ----- simple mount animation flags ----- const [fadeIn, setFadeIn] = useState(false) useEffect(() => { - if (!open) { setFadeIn(false); return } + if (!isVisible) { setFadeIn(false); return } const id = requestAnimationFrame(() => setFadeIn(true)) return () => cancelAnimationFrame(id) - }, [open]) + }, [isVisible]) // ----- motion layer (video/gif) ----- const prefersReducedMotion = useMemo( @@ -49,18 +195,16 @@ export default function MatchReadyOverlay({ [] ) const videoRef = useRef(null) - const [useGif, setUseGif] = useState(!!forceGif || !!prefersReducedMotion) + const [useGif, setUseGif] = useState(() => !!forceGif || !!prefersReducedMotion) useEffect(() => { - if (!open) return + if (!isVisible) return if (forceGif || prefersReducedMotion) { setUseGif(true); return } const tryPlay = async () => { const v = videoRef.current if (!v) return - try { - await v.play() - setUseGif(false) - } catch { + try { await v.play(); setUseGif(false) } + catch { setUseGif(true) const once = async () => { try { await v.play(); setUseGif(false) } catch {} @@ -73,212 +217,255 @@ export default function MatchReadyOverlay({ } const id = setTimeout(tryPlay, 0) return () => clearTimeout(id) - }, [open, forceGif, prefersReducedMotion]) + }, [isVisible, forceGif, prefersReducedMotion]) useEffect(() => { - if (!open) { - const v = videoRef.current - if (v) { - try { v.pause() } catch {} - v.removeAttribute('src') - while (v.firstChild) v.removeChild(v.firstChild) - } + if (isVisible) return + const v = videoRef.current + if (v) { + try { v.pause() } catch {} + v.removeAttribute('src') + while (v.firstChild) v.removeChild(v.firstChild) } - }, [open]) - - // ----- AUDIO ----- - const beepsRef = useRef | null>(null) - const audioStartedRef = useRef(false) - - const stopBeeps = () => { - if (beepsRef.current) { - clearInterval(beepsRef.current) - beepsRef.current = null - } - } - - // Versuche den AudioContext zu entsperren – robust gegen unterschiedliche soundManager-Implementationen - const ensureAudioUnlocked = async () => { - try { - // bevorzugt eigene API des soundManagers - if (typeof (sound as any).ensureUnlocked === 'function') { - await (sound as any).ensureUnlocked() - return true - } - if (typeof (sound as any).unlock === 'function') { - await (sound as any).unlock() - return true - } - // generischer Fallback - const ctx = (sound as any).ctx || (sound as any).audioContext - if (ctx && typeof ctx.resume === 'function' && ctx.state !== 'running') { - await ctx.resume() - } - return !ctx || ctx.state === 'running' - } catch { - return false - } - } - - // Beeps starten (1x ready + Intervall) - const startBeeps = () => { - try { sound.play('ready') } catch {} - stopBeeps() - beepsRef.current = setInterval(() => { - try { sound.play('beep') } catch {} - }, 1000) - } + }, [isVisible]) + // ----- AUDIO: Beeps starten/stoppen ----- useEffect(() => { - if (!open) { - stopBeeps() - audioStartedRef.current = false - return - } + if (!isVisible) { stopBeeps(); audioStartedRef.current = false; return } if (audioStartedRef.current) return - - let cleanupListener = () => {} - + let cleanup = () => {} ;(async () => { const ok = await ensureAudioUnlocked() - if (ok) { - audioStartedRef.current = true - startBeeps() - return - } - // Fallback: auf erste Geste warten und dann starten - const onFirstGesture = async () => { + if (ok) { audioStartedRef.current = true; startBeeps(); return } + const onGesture = async () => { const ok2 = await ensureAudioUnlocked() - if (ok2) { - audioStartedRef.current = true - startBeeps() - } - window.removeEventListener('pointerdown', onFirstGesture) - window.removeEventListener('keydown', onFirstGesture) + if (ok2) { audioStartedRef.current = true; startBeeps() } + window.removeEventListener('pointerdown', onGesture) + window.removeEventListener('keydown', onGesture) } - window.addEventListener('pointerdown', onFirstGesture, { once: true }) - window.addEventListener('keydown', onFirstGesture, { once: true }) - cleanupListener = () => { - window.removeEventListener('pointerdown', onFirstGesture) - window.removeEventListener('keydown', onFirstGesture) + window.addEventListener('pointerdown', onGesture, { once: true }) + window.addEventListener('keydown', onGesture, { once: true }) + cleanup = () => { + window.removeEventListener('pointerdown', onGesture) + window.removeEventListener('keydown', onGesture) } })() - - return () => { cleanupListener(); stopBeeps() } - }, [open]) + return () => { cleanup(); stopBeeps() } + }, [isVisible]) // ----- countdown / timeout ----- const rafRef = useRef(null) useEffect(() => { - if (!open) return + if (!isVisible) return const step = () => { const t = Date.now() setNow(t) - if (effectiveDeadline - t <= 0) { + if (effectiveDeadline - t <= 0 && !finished) { stopBeeps() - onTimeout?.() + setFinished(true) + + if (accepted) { + setConnecting(true) + try { sound.play('loading') } catch {} + + const doConnect = () => { + try { window.location.href = connectHref } + catch { + try { + const a = document.createElement('a') + a.href = connectHref + document.body.appendChild(a) + a.click() + a.remove() + } catch {} + } + try { onTimeout?.() } catch {} + } + setTimeout(doConnect, 2000) + } else { + setShowWaitHint(true) + } return } rafRef.current = requestAnimationFrame(step) } rafRef.current = requestAnimationFrame(step) return () => { if (rafRef.current) cancelAnimationFrame(rafRef.current) } - }, [open, effectiveDeadline, onTimeout]) + }, [isVisible, effectiveDeadline, accepted, finished, connectHref, onTimeout]) - if (!open) return null + // ---- Präsenz → Rahmenfarbe ---- + const borderByPresence = (s: Presence | undefined): string => { + switch (s) { + case 'online': return 'border-[#2ecc71]' + case 'away': return 'border-yellow-400' + case 'offline': + default: return 'border-white/20' + } + } - return ( -
    - {/* Backdrop mit Fade-In */} -
    + // 🔎 Map-Icon aus MAP_OPTIONS ermitteln + const mapIconUrl = useMemo(() => { + const norm = (s?: string | null) => (s ?? '').trim().toLowerCase() + const keyFromBg = /\/maps\/([^/]+)\//.exec(mapBg ?? '')?.[1] - {/* Content-Frame mit kleinem Scale/Fade */} -
    - {/* Map im Frame */} - {mapLabel} + const byKey = keyFromBg ? MAP_OPTIONS.find(o => o.key === keyFromBg) : undefined + const byLabel = mapLabel ? MAP_OPTIONS.find(o => norm(o.label) === norm(mapLabel)) : undefined + const byImage = mapBg ? MAP_OPTIONS.find(o => o.images.includes(mapBg)) : undefined - {/* Deko-Layer: Video oder GIF */} - {useGif ? ( -
    - -
    -
    - ) : ( - - )} + const opt = byKey ?? byLabel ?? byImage + return opt?.icon ?? '/assets/img/mapicons/map_icon_lobby_mapveto.svg' + }, [mapBg, mapLabel]) - {/* Inhalt */} -
    -
    - IHR SPIEL IST BEREIT! - -
    + // --- UI Helpers --- + const ReadyRow = () => ( +
    +
    +
    + {Array.from({ length: Math.max(total, 10) }, (_, i) => { + const p = participants[i] + const isReady = p ? !!readyMap[p.steamId] : false + const presence: Presence = (p && statusMap[p.steamId]) || 'offline' + const borderCls = borderByPresence(presence) -
    - - - {mapLabel} - -
    - - - -
    - {fmt(rest)} -
    + return ( +
    + {p ? ( + <> + {p.name} + {!isReady &&
    } + + ) : ( +
    + + + +
    + )} +
    + ) + })}
    +
    + {countReady} / {total} Spieler bereit +
    +
    + ) + + return ( +
    + {/* Backdrop: 2s-Fade */} +
    + + {/* Content erst nach Backdrop-Delay */} + {showContent && ( +
    + {/* Map */} + {mapLabel} + + {/* Deko-Layer */} + {useGif ? ( +
    + +
    +
    + ) : ( + + )} + + {/* Inhalt */} +
    +
    + DEIN SPIEL IST BEREIT! + +
    + + {/* ⬇️ Icon aus MAP_OPTIONS + Label */} +
    + {`${mapLabel} + {mapLabel} +
    + + {/* Accept / ReadyRow / WaitHint */} + {accepted ? ( +
    + +
    + ) : showWaitHint ? ( +
    +
    + Dein Team wartet auf dich! +
    + + Verbinden + +
    + ) : ( + + )} + + {/* Countdown oder Verbinde-Status */} +
    + {connecting ? ( + + + Verbinde… + + ) : ( + {fmt(rest)} + )} +
    +
    +
    + )}
    ) } diff --git a/src/app/components/ReadyOverlayHost.tsx b/src/app/components/ReadyOverlayHost.tsx index 73fe4b5..b662a65 100644 --- a/src/app/components/ReadyOverlayHost.tsx +++ b/src/app/components/ReadyOverlayHost.tsx @@ -77,13 +77,12 @@ export default function ReadyOverlayHost() { const label = lastEvent.payload?.firstMap?.label ?? '?' const bg = lastEvent.payload?.firstMap?.bg ?? '/assets/img/maps/cs2.webp' - // 3s Delay + Zielroute mitgeben: showWithDelay( { matchId: m, mapLabel: label, mapBg: bg, - nextHref: `/match-details/${m}/radar`, // <- WICHTIG + nextHref: `/match-details/${m}/radar`, }, 3000 ) @@ -101,7 +100,7 @@ export default function ReadyOverlayHost() { matchId: m, mapLabel: firstMap.label, mapBg: firstMap.bg, - nextHref: `/match-details/${m}/radar`, // <- WICHTIG + nextHref: `/match-details/${m}/radar`, }, 3000 ) @@ -125,14 +124,17 @@ export default function ReadyOverlayHost() { return ( { - // optional: Backend informieren + // Backend optional informieren (Overlay bleibt offen!) // await fetch(`/api/matches/${data.matchId}/ready-accept`, { method: 'POST' }).catch(() => {}) markAccepted(data.matchId) - hide() - router.push(data.nextHref ?? `/match-details/${data.matchId}/radar`) // <- WICHTIG + + // ❌ NICHT mehr schließen oder navigieren + // hide() + // router.push(data.nextHref ?? `/match-details/${data.matchId}/radar`) }} /> ) diff --git a/src/app/components/UserActivityTracker.tsx b/src/app/components/UserActivityTracker.tsx index e2531e6..8fa7fd2 100644 --- a/src/app/components/UserActivityTracker.tsx +++ b/src/app/components/UserActivityTracker.tsx @@ -1,3 +1,5 @@ +// UserActivityTracker.tsx + 'use client' import { useEffect, useRef } from 'react' diff --git a/src/app/components/UserAvatarWithStatus.tsx b/src/app/components/UserAvatarWithStatus.tsx index 4df1edc..0f1825f 100644 --- a/src/app/components/UserAvatarWithStatus.tsx +++ b/src/app/components/UserAvatarWithStatus.tsx @@ -85,7 +85,7 @@ export default function UserAvatarWithStatus({ className={clsx( 'flex items-center justify-center rounded-full transition', showStatus - ? ['ring-2 ring-offset-1 ring-offset-white dark:ring-offset-neutral-900', statusRing] + ? ['ring-1 ring-offset-1 ring-offset-white dark:ring-offset-neutral-900', statusRing] : null )} style={{ width: size, height: size }} diff --git a/src/app/lib/mapOptions.ts b/src/app/lib/mapOptions.ts index bbd29b9..1d0b566 100644 --- a/src/app/lib/mapOptions.ts +++ b/src/app/lib/mapOptions.ts @@ -1,164 +1,162 @@ -// src/lib/mapOptions.ts export type MapOption = { key: string label: string active: boolean images: string[] + icon?: string // ⬅️ neu } +// Helper +const mapImgs = (key: string, files: string[]) => + files.map(name => `/assets/img/maps/${key}/${name}`) + +const iconFor = (key: string) => + `/assets/img/mapicons/map_icon_${key}.svg` + export const MAP_OPTIONS: MapOption[] = [ { key: 'de_train', label: 'Train', active: true, - images: [ - '/assets/img/maps/de_train/1.webp', - '/assets/img/maps/de_train/2.webp', - '/assets/img/maps/de_train/3.webp', - '/assets/img/maps/de_train/4.webp', - '/assets/img/maps/de_train/5.webp', - '/assets/img/maps/de_train/6.webp', - ], + images: mapImgs('de_train', [ + 'de_train_1_png.webp', + 'de_train_2_png.webp', + 'de_train_3_png.webp', + 'de_train_4_png.webp', + 'de_train_png.webp', + ]), + icon: iconFor('de_train'), }, { key: 'de_dust2', label: 'Dust 2', active: true, - images: [ - '/assets/img/maps/de_dust2/1.webp', - '/assets/img/maps/de_dust2/2.webp', - '/assets/img/maps/de_dust2/3.webp', - '/assets/img/maps/de_dust2/4.webp', - ], + images: mapImgs('de_dust2', [ + 'de_dust2_1_png.webp', + 'de_dust2_2_png.webp', + 'de_dust2_3_png.webp', + 'de_dust2_4_png.webp', + 'de_dust2_png.webp', + ]), + icon: iconFor('de_dust2'), }, { key: 'de_mirage', label: 'Mirage', active: true, - images: [ - '/assets/img/maps/de_mirage/1.webp', - '/assets/img/maps/de_mirage/2.webp', - '/assets/img/maps/de_mirage/3.webp', - '/assets/img/maps/de_mirage/4.webp', - '/assets/img/maps/de_mirage/5.webp', - '/assets/img/maps/de_mirage/6.webp', - ], + images: mapImgs('de_mirage', [ + 'de_mirage_1_png.webp', + 'de_mirage_2_png.webp', + 'de_mirage_3_png.webp', + 'de_mirage_4_png.webp', + ]), + icon: iconFor('de_mirage'), }, { key: 'de_nuke', label: 'Nuke', active: true, - images: [ - '/assets/img/maps/de_nuke/1.webp', - '/assets/img/maps/de_nuke/2.webp', - '/assets/img/maps/de_nuke/3.webp', - '/assets/img/maps/de_nuke/4.webp', - '/assets/img/maps/de_nuke/5.webp', - '/assets/img/maps/de_nuke/6.webp', - ], + images: mapImgs('de_nuke', [ + 'de_nuke_1_png.webp', + 'de_nuke_2_png.webp', + 'de_nuke_3_png.webp', + 'de_nuke_4_png.webp', + 'de_nuke_png.webp', + ]), + icon: iconFor('de_nuke'), }, { key: 'de_ancient', label: 'Ancient', active: true, - images: [ - '/assets/img/maps/de_ancient/1.webp', - '/assets/img/maps/de_ancient/2.webp', - '/assets/img/maps/de_ancient/3.webp', - '/assets/img/maps/de_ancient/4.webp', - '/assets/img/maps/de_ancient/5.webp', - '/assets/img/maps/de_ancient/6.webp', - ], + images: mapImgs('de_ancient', [ + 'de_ancient_1_png.webp', + 'de_ancient_2_png.webp', + 'de_ancient_3_png.webp', + 'de_ancient_4_png.webp', + ]), + icon: iconFor('de_ancient'), }, { key: 'de_inferno', label: 'Inferno', active: true, - images: [ - '/assets/img/maps/de_inferno/1.webp', - '/assets/img/maps/de_inferno/2.webp', - '/assets/img/maps/de_inferno/3.webp', - '/assets/img/maps/de_inferno/4.webp', - '/assets/img/maps/de_inferno/5.webp', - '/assets/img/maps/de_inferno/6.webp', - ], + images: mapImgs('de_inferno', [ + 'de_inferno_1_png.webp', + 'de_inferno_2_png.webp', + 'de_inferno_3_png.webp', + ]), + icon: iconFor('de_inferno'), }, { key: 'de_overpass', label: 'Overpass', active: true, - images: [ - '/assets/img/maps/de_overpass/1.webp', - '/assets/img/maps/de_overpass/2.webp', - '/assets/img/maps/de_overpass/3.webp', - '/assets/img/maps/de_overpass/4.webp', - '/assets/img/maps/de_overpass/5.webp', - '/assets/img/maps/de_overpass/6.webp', - '/assets/img/maps/de_overpass/7.webp', - '/assets/img/maps/de_overpass/8.webp', - ], + images: mapImgs('de_overpass', [ + 'de_overpass_1_png.webp', + 'de_overpass_2_png.webp', + 'de_overpass_3_png.webp', + 'de_overpass_4_png.webp', + 'de_overpass_5_png.webp', + 'de_overpass_png.webp', + ]), + icon: iconFor('de_overpass'), }, { key: 'de_anubis', label: 'Anubis', active: false, - images: [ - '/assets/img/maps/de_anubis/1.webp', - '/assets/img/maps/de_anubis/2.webp', - '/assets/img/maps/de_anubis/3.webp', - '/assets/img/maps/de_anubis/4.webp', - '/assets/img/maps/de_anubis/5.webp', - '/assets/img/maps/de_anubis/6.webp', - ], + images: mapImgs('de_anubis', [ + 'de_anubis_1_png.webp', + 'de_anubis_2_png.webp', + 'de_anubis_3_png.webp', + 'de_anubis_4_png.webp', + 'de_anubis_5_png.webp', + ]), + icon: iconFor('de_anubis'), }, { key: 'de_grail', label: 'Grail', active: false, - images: [ - '/assets/img/maps/de_grail/1.webp', - '/assets/img/maps/de_grail/2.webp', - '/assets/img/maps/de_grail/3.webp', - '/assets/img/maps/de_grail/4.webp', - '/assets/img/maps/de_grail/5.webp', - '/assets/img/maps/de_grail/6.webp', - ], + images: mapImgs('de_grail', [ + 'de_grail_1_png.webp', + 'de_grail_2_png.webp', + 'de_grail_3_png.webp', + 'de_grail_4_png.webp', + ]), + icon: iconFor('de_grail'), }, { key: 'de_jura', label: 'Jura', active: false, - images: [ - '/assets/img/maps/de_jura/1.webp', - '/assets/img/maps/de_jura/2.webp', - '/assets/img/maps/de_jura/3.webp', - '/assets/img/maps/de_jura/4.webp', - '/assets/img/maps/de_jura/5.webp', - '/assets/img/maps/de_jura/6.webp', - '/assets/img/maps/de_jura/7.webp', - '/assets/img/maps/de_jura/8.webp', - ], + images: mapImgs('de_jura', [ + 'de_jura_1_png.webp', + 'de_jura_2_png.webp', + 'de_jura_3_png.webp', + 'de_jura_4_png.webp', + ]), + icon: iconFor('de_jura'), }, { key: 'de_vertigo', label: 'Vertigo', active: false, - images: [ - '/assets/img/maps/de_vertigo/1.webp', - '/assets/img/maps/de_vertigo/2.webp', - '/assets/img/maps/de_vertigo/3.webp', - '/assets/img/maps/de_vertigo/4.webp', - '/assets/img/maps/de_vertigo/5.webp', - '/assets/img/maps/de_vertigo/6.webp', - ], + images: mapImgs('de_vertigo', [ + 'de_vertigo_1_png.webp', + 'de_vertigo_2_png.webp', + 'de_vertigo_3_png.webp', + 'de_vertigo_4_png.webp', + 'de_vertigo_png.webp', + ]), + icon: iconFor('de_vertigo'), }, { key: 'lobby_mapvote', label: 'Pick/Ban', active: true, - images: [ - '/assets/img/maps/lobby_mapvote/1.webp', - '/assets/img/maps/lobby_mapvote/2.webp', - ], + images: ['/assets/img/maps/lobby_mapveto_png.webp'], + icon: '/assets/img/mapicons/map_icon_lobby_mapveto.svg', }, ] diff --git a/src/app/lib/sseEvents.ts b/src/app/lib/sseEvents.ts index 58c2170..4340cf4 100644 --- a/src/app/lib/sseEvents.ts +++ b/src/app/lib/sseEvents.ts @@ -31,6 +31,7 @@ export const SSE_EVENT_TYPES = [ 'user-status-updated', 'match-ready', 'map-vote-reset', + 'ready-updated', ] as const; export type SSEEventType = typeof SSE_EVENT_TYPES[number]; @@ -84,6 +85,7 @@ export const MATCH_EVENTS = makeEventSet([ 'map-vote-admin-edit', 'match-ready', 'map-vote-reset', + 'ready-updated', ] as const); // Events, die das NotificationCenter betreffen diff --git a/src/generated/prisma/edge.js b/src/generated/prisma/edge.js index b454172..e755d8a 100644 --- a/src/generated/prisma/edge.js +++ b/src/generated/prisma/edge.js @@ -35,12 +35,12 @@ exports.Prisma = Prisma exports.$Enums = {} /** - * Prisma Client JS version: 6.14.0 - * Query Engine version: 717184b7b35ea05dfa71a3236b7af656013e1e49 + * Prisma Client JS version: 6.15.0 + * Query Engine version: 85179d7826409ee107a6ba334b5e305ae3fba9fb */ Prisma.prismaVersion = { - client: "6.14.0", - engine: "717184b7b35ea05dfa71a3236b7af656013e1e49" + client: "6.15.0", + engine: "85179d7826409ee107a6ba334b5e305ae3fba9fb" } Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; @@ -276,6 +276,12 @@ exports.Prisma.MapVoteStepScalarFieldEnum = { chosenBy: 'chosenBy' }; +exports.Prisma.MatchReadyScalarFieldEnum = { + matchId: 'matchId', + steamId: 'steamId', + acceptedAt: 'acceptedAt' +}; + exports.Prisma.SortOrder = { asc: 'asc', desc: 'desc' @@ -334,7 +340,8 @@ exports.Prisma.ModelName = { DemoFile: 'DemoFile', ServerRequest: 'ServerRequest', MapVote: 'MapVote', - MapVoteStep: 'MapVoteStep' + MapVoteStep: 'MapVoteStep', + MatchReady: 'MatchReady' }; /** * Create the Client @@ -369,8 +376,8 @@ const config = { "schemaEnvPath": "../../../.env" }, "relativePath": "../../../prisma", - "clientVersion": "6.14.0", - "engineVersion": "717184b7b35ea05dfa71a3236b7af656013e1e49", + "clientVersion": "6.15.0", + "engineVersion": "85179d7826409ee107a6ba334b5e305ae3fba9fb", "datasourceNames": [ "db" ], @@ -383,13 +390,13 @@ const config = { } } }, - "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../src/generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n//\n// ──────────────────────────────────────────────\n// 🧑 Benutzer, Teams & Verwaltung\n// ──────────────────────────────────────────────\n//\n\nmodel User {\n steamId String @id\n name String?\n avatar String?\n location String?\n isAdmin Boolean @default(false)\n\n teamId String?\n team Team? @relation(\"UserTeam\", fields: [teamId], references: [id])\n ledTeam Team? @relation(\"TeamLeader\")\n\n matchesAsTeamA Match[] @relation(\"TeamAPlayers\")\n matchesAsTeamB Match[] @relation(\"TeamBPlayers\")\n\n premierRank Int?\n authCode String?\n lastKnownShareCode String?\n lastKnownShareCodeDate DateTime?\n createdAt DateTime @default(now())\n\n invites TeamInvite[] @relation(\"UserInvitations\")\n notifications Notification[]\n matchPlayers MatchPlayer[]\n serverRequests ServerRequest[] @relation(\"MatchRequests\")\n rankHistory RankHistory[] @relation(\"UserRankHistory\")\n demoFiles DemoFile[]\n\n createdSchedules Schedule[] @relation(\"CreatedSchedules\")\n confirmedSchedules Schedule[] @relation(\"ConfirmedSchedules\")\n\n mapVoteChoices MapVoteStep[] @relation(\"VoteStepChooser\")\n\n status UserStatus @default(offline) // 👈 neu\n lastActiveAt DateTime? // optional: wann zuletzt aktiv\n}\n\nenum UserStatus {\n online\n away\n offline\n}\n\nmodel Team {\n id String @id @default(uuid())\n name String @unique\n logo String?\n leaderId String? @unique\n createdAt DateTime @default(now())\n\n activePlayers String[]\n inactivePlayers String[]\n\n leader User? @relation(\"TeamLeader\", fields: [leaderId], references: [steamId])\n members User[] @relation(\"UserTeam\")\n invites TeamInvite[]\n matchPlayers MatchPlayer[]\n\n matchesAsTeamA Match[] @relation(\"MatchTeamA\")\n matchesAsTeamB Match[] @relation(\"MatchTeamB\")\n\n schedulesAsTeamA Schedule[] @relation(\"ScheduleTeamA\")\n schedulesAsTeamB Schedule[] @relation(\"ScheduleTeamB\")\n\n mapVoteSteps MapVoteStep[] @relation(\"VoteStepTeam\")\n}\n\nmodel TeamInvite {\n id String @id @default(uuid())\n steamId String\n teamId String\n type String\n createdAt DateTime @default(now())\n\n user User @relation(\"UserInvitations\", fields: [steamId], references: [steamId])\n team Team @relation(fields: [teamId], references: [id])\n}\n\nmodel Notification {\n id String @id @default(uuid())\n steamId String\n title String?\n message String\n read Boolean @default(false)\n persistent Boolean @default(false)\n actionType String?\n actionData String?\n createdAt DateTime @default(now())\n\n user User @relation(fields: [steamId], references: [steamId])\n}\n\n//\n// ──────────────────────────────────────────────\n// 🎮 Matches & Spieler\n// ──────────────────────────────────────────────\n//\n\n// ──────────────────────────────────────────────\n// 🎮 Matches\n// ──────────────────────────────────────────────\n\nmodel Match {\n id String @id @default(uuid())\n title String\n matchType String @default(\"community\")\n map String?\n description String?\n scoreA Int?\n scoreB Int?\n\n teamAId String?\n teamA Team? @relation(\"MatchTeamA\", fields: [teamAId], references: [id])\n\n teamBId String?\n teamB Team? @relation(\"MatchTeamB\", fields: [teamBId], references: [id])\n\n teamAUsers User[] @relation(\"TeamAPlayers\")\n teamBUsers User[] @relation(\"TeamBPlayers\")\n\n filePath String?\n demoFile DemoFile?\n demoDate DateTime?\n demoData Json?\n\n players MatchPlayer[]\n rankUpdates RankHistory[] @relation(\"MatchRankHistory\")\n\n roundCount Int?\n roundHistory Json?\n winnerTeam String?\n\n bestOf Int @default(3) // 1 | 3 | 5 – app-seitig validieren\n matchDate DateTime? // geplante Startzeit (separat von demoDate)\n mapVote MapVote?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n schedule Schedule?\n}\n\nmodel MatchPlayer {\n id String @id @default(uuid())\n steamId String\n matchId String\n teamId String?\n team Team? @relation(fields: [teamId], references: [id])\n\n match Match @relation(fields: [matchId], references: [id])\n user User @relation(fields: [steamId], references: [steamId])\n\n stats PlayerStats?\n\n createdAt DateTime @default(now())\n\n @@unique([matchId, steamId])\n}\n\nmodel PlayerStats {\n id String @id @default(uuid())\n matchId String\n steamId String\n\n kills Int\n assists Int\n deaths Int\n headshotPct Float\n\n totalDamage Float @default(0)\n utilityDamage Int @default(0)\n flashAssists Int @default(0)\n mvps Int @default(0)\n mvpEliminations Int @default(0)\n mvpDefuse Int @default(0)\n mvpPlant Int @default(0)\n knifeKills Int @default(0)\n zeusKills Int @default(0)\n wallbangKills Int @default(0)\n smokeKills Int @default(0)\n headshots Int @default(0)\n noScopes Int @default(0)\n blindKills Int @default(0)\n\n aim Int @default(0)\n\n oneK Int @default(0)\n twoK Int @default(0)\n threeK Int @default(0)\n fourK Int @default(0)\n fiveK Int @default(0)\n\n rankOld Int?\n rankNew Int?\n rankChange Int?\n winCount Int?\n\n matchPlayer MatchPlayer @relation(fields: [matchId, steamId], references: [matchId, steamId])\n\n @@unique([matchId, steamId])\n}\n\nmodel RankHistory {\n id String @id @default(uuid())\n steamId String\n matchId String?\n\n rankOld Int\n rankNew Int\n delta Int\n winCount Int\n\n createdAt DateTime @default(now())\n\n user User @relation(\"UserRankHistory\", fields: [steamId], references: [steamId])\n match Match? @relation(\"MatchRankHistory\", fields: [matchId], references: [id])\n}\n\nmodel Schedule {\n id String @id @default(uuid())\n title String\n description String?\n map String?\n date DateTime\n status ScheduleStatus @default(PENDING)\n\n teamAId String?\n teamA Team? @relation(\"ScheduleTeamA\", fields: [teamAId], references: [id])\n\n teamBId String?\n teamB Team? @relation(\"ScheduleTeamB\", fields: [teamBId], references: [id])\n\n createdById String\n createdBy User @relation(\"CreatedSchedules\", fields: [createdById], references: [steamId])\n\n confirmedById String?\n confirmedBy User? @relation(\"ConfirmedSchedules\", fields: [confirmedById], references: [steamId])\n\n linkedMatchId String? @unique\n linkedMatch Match? @relation(fields: [linkedMatchId], references: [id])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nenum ScheduleStatus {\n PENDING\n CONFIRMED\n DECLINED\n CANCELLED\n COMPLETED\n}\n\n//\n// ──────────────────────────────────────────────\n// 📦 Demo-Dateien & CS2 Requests\n// ──────────────────────────────────────────────\n//\n\nmodel DemoFile {\n id String @id @default(uuid())\n matchId String @unique\n steamId String\n fileName String @unique\n filePath String\n parsed Boolean @default(false)\n\n createdAt DateTime @default(now())\n\n match Match @relation(fields: [matchId], references: [id])\n user User @relation(fields: [steamId], references: [steamId])\n}\n\nmodel ServerRequest {\n id String @id @default(uuid())\n steamId String\n matchId String\n reservationId BigInt\n tvPort BigInt\n processed Boolean @default(false)\n failed Boolean @default(false)\n\n createdAt DateTime @default(now())\n\n user User @relation(\"MatchRequests\", fields: [steamId], references: [steamId])\n\n @@unique([steamId, matchId])\n}\n\n// ──────────────────────────────────────────────\n// 🗺️ Map-Vote\n// ──────────────────────────────────────────────\n\nenum MapVoteAction {\n BAN\n PICK\n DECIDER\n}\n\nmodel MapVote {\n id String @id @default(uuid())\n matchId String @unique\n match Match @relation(fields: [matchId], references: [id])\n\n bestOf Int @default(3)\n mapPool String[]\n currentIdx Int @default(0)\n locked Boolean @default(false)\n opensAt DateTime?\n\n leadMinutes Int @default(60)\n\n adminEditingBy String?\n adminEditingSince DateTime?\n\n steps MapVoteStep[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel MapVoteStep {\n id String @id @default(uuid())\n voteId String\n order Int\n action MapVoteAction\n\n teamId String?\n team Team? @relation(\"VoteStepTeam\", fields: [teamId], references: [id])\n\n map String?\n chosenAt DateTime?\n chosenBy String?\n chooser User? @relation(\"VoteStepChooser\", fields: [chosenBy], references: [steamId])\n\n vote MapVote @relation(fields: [voteId], references: [id])\n\n @@unique([voteId, order])\n @@index([teamId])\n @@index([chosenBy])\n}\n", - "inlineSchemaHash": "1e05457b6d67e4b38fde40329269fe298cd7d9a74bfe85d0b981e8ab739a8f28", + "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../src/generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n//\n// ──────────────────────────────────────────────\n// 🧑 Benutzer, Teams & Verwaltung\n// ──────────────────────────────────────────────\n//\n\nmodel User {\n steamId String @id\n name String?\n avatar String?\n location String?\n isAdmin Boolean @default(false)\n\n teamId String?\n team Team? @relation(\"UserTeam\", fields: [teamId], references: [id])\n ledTeam Team? @relation(\"TeamLeader\")\n\n matchesAsTeamA Match[] @relation(\"TeamAPlayers\")\n matchesAsTeamB Match[] @relation(\"TeamBPlayers\")\n\n premierRank Int?\n authCode String?\n lastKnownShareCode String?\n lastKnownShareCodeDate DateTime?\n createdAt DateTime @default(now())\n\n invites TeamInvite[] @relation(\"UserInvitations\")\n notifications Notification[]\n matchPlayers MatchPlayer[]\n serverRequests ServerRequest[] @relation(\"MatchRequests\")\n rankHistory RankHistory[] @relation(\"UserRankHistory\")\n demoFiles DemoFile[]\n\n createdSchedules Schedule[] @relation(\"CreatedSchedules\")\n confirmedSchedules Schedule[] @relation(\"ConfirmedSchedules\")\n\n mapVoteChoices MapVoteStep[] @relation(\"VoteStepChooser\")\n\n status UserStatus @default(offline) // 👈 neu\n lastActiveAt DateTime? // optional: wann zuletzt aktiv\n\n readyAcceptances MatchReady[] @relation(\"MatchReadyUser\")\n}\n\nenum UserStatus {\n online\n away\n offline\n}\n\nmodel Team {\n id String @id @default(uuid())\n name String @unique\n logo String?\n leaderId String? @unique\n createdAt DateTime @default(now())\n\n activePlayers String[]\n inactivePlayers String[]\n\n leader User? @relation(\"TeamLeader\", fields: [leaderId], references: [steamId])\n members User[] @relation(\"UserTeam\")\n invites TeamInvite[]\n matchPlayers MatchPlayer[]\n\n matchesAsTeamA Match[] @relation(\"MatchTeamA\")\n matchesAsTeamB Match[] @relation(\"MatchTeamB\")\n\n schedulesAsTeamA Schedule[] @relation(\"ScheduleTeamA\")\n schedulesAsTeamB Schedule[] @relation(\"ScheduleTeamB\")\n\n mapVoteSteps MapVoteStep[] @relation(\"VoteStepTeam\")\n}\n\nmodel TeamInvite {\n id String @id @default(uuid())\n steamId String\n teamId String\n type String\n createdAt DateTime @default(now())\n\n user User @relation(\"UserInvitations\", fields: [steamId], references: [steamId])\n team Team @relation(fields: [teamId], references: [id])\n}\n\nmodel Notification {\n id String @id @default(uuid())\n steamId String\n title String?\n message String\n read Boolean @default(false)\n persistent Boolean @default(false)\n actionType String?\n actionData String?\n createdAt DateTime @default(now())\n\n user User @relation(fields: [steamId], references: [steamId])\n}\n\n//\n// ──────────────────────────────────────────────\n// 🎮 Matches & Spieler\n// ──────────────────────────────────────────────\n//\n\n// ──────────────────────────────────────────────\n// 🎮 Matches\n// ──────────────────────────────────────────────\n\nmodel Match {\n id String @id @default(uuid())\n title String\n matchType String @default(\"community\")\n map String?\n description String?\n scoreA Int?\n scoreB Int?\n\n teamAId String?\n teamA Team? @relation(\"MatchTeamA\", fields: [teamAId], references: [id])\n\n teamBId String?\n teamB Team? @relation(\"MatchTeamB\", fields: [teamBId], references: [id])\n\n teamAUsers User[] @relation(\"TeamAPlayers\")\n teamBUsers User[] @relation(\"TeamBPlayers\")\n\n filePath String?\n demoFile DemoFile?\n demoDate DateTime?\n demoData Json?\n\n players MatchPlayer[]\n rankUpdates RankHistory[] @relation(\"MatchRankHistory\")\n\n roundCount Int?\n roundHistory Json?\n winnerTeam String?\n\n bestOf Int @default(3) // 1 | 3 | 5 – app-seitig validieren\n matchDate DateTime? // geplante Startzeit (separat von demoDate)\n mapVote MapVote?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n schedule Schedule?\n\n readyAcceptances MatchReady[] @relation(\"MatchReadyMatch\")\n}\n\nmodel MatchPlayer {\n id String @id @default(uuid())\n steamId String\n matchId String\n teamId String?\n team Team? @relation(fields: [teamId], references: [id])\n\n match Match @relation(fields: [matchId], references: [id])\n user User @relation(fields: [steamId], references: [steamId])\n\n stats PlayerStats?\n\n createdAt DateTime @default(now())\n\n @@unique([matchId, steamId])\n}\n\nmodel PlayerStats {\n id String @id @default(uuid())\n matchId String\n steamId String\n\n kills Int\n assists Int\n deaths Int\n headshotPct Float\n\n totalDamage Float @default(0)\n utilityDamage Int @default(0)\n flashAssists Int @default(0)\n mvps Int @default(0)\n mvpEliminations Int @default(0)\n mvpDefuse Int @default(0)\n mvpPlant Int @default(0)\n knifeKills Int @default(0)\n zeusKills Int @default(0)\n wallbangKills Int @default(0)\n smokeKills Int @default(0)\n headshots Int @default(0)\n noScopes Int @default(0)\n blindKills Int @default(0)\n\n aim Int @default(0)\n\n oneK Int @default(0)\n twoK Int @default(0)\n threeK Int @default(0)\n fourK Int @default(0)\n fiveK Int @default(0)\n\n rankOld Int?\n rankNew Int?\n rankChange Int?\n winCount Int?\n\n matchPlayer MatchPlayer @relation(fields: [matchId, steamId], references: [matchId, steamId])\n\n @@unique([matchId, steamId])\n}\n\nmodel RankHistory {\n id String @id @default(uuid())\n steamId String\n matchId String?\n\n rankOld Int\n rankNew Int\n delta Int\n winCount Int\n\n createdAt DateTime @default(now())\n\n user User @relation(\"UserRankHistory\", fields: [steamId], references: [steamId])\n match Match? @relation(\"MatchRankHistory\", fields: [matchId], references: [id])\n}\n\nmodel Schedule {\n id String @id @default(uuid())\n title String\n description String?\n map String?\n date DateTime\n status ScheduleStatus @default(PENDING)\n\n teamAId String?\n teamA Team? @relation(\"ScheduleTeamA\", fields: [teamAId], references: [id])\n\n teamBId String?\n teamB Team? @relation(\"ScheduleTeamB\", fields: [teamBId], references: [id])\n\n createdById String\n createdBy User @relation(\"CreatedSchedules\", fields: [createdById], references: [steamId])\n\n confirmedById String?\n confirmedBy User? @relation(\"ConfirmedSchedules\", fields: [confirmedById], references: [steamId])\n\n linkedMatchId String? @unique\n linkedMatch Match? @relation(fields: [linkedMatchId], references: [id])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nenum ScheduleStatus {\n PENDING\n CONFIRMED\n DECLINED\n CANCELLED\n COMPLETED\n}\n\n//\n// ──────────────────────────────────────────────\n// 📦 Demo-Dateien & CS2 Requests\n// ──────────────────────────────────────────────\n//\n\nmodel DemoFile {\n id String @id @default(uuid())\n matchId String @unique\n steamId String\n fileName String @unique\n filePath String\n parsed Boolean @default(false)\n\n createdAt DateTime @default(now())\n\n match Match @relation(fields: [matchId], references: [id])\n user User @relation(fields: [steamId], references: [steamId])\n}\n\nmodel ServerRequest {\n id String @id @default(uuid())\n steamId String\n matchId String\n reservationId BigInt\n tvPort BigInt\n processed Boolean @default(false)\n failed Boolean @default(false)\n\n createdAt DateTime @default(now())\n\n user User @relation(\"MatchRequests\", fields: [steamId], references: [steamId])\n\n @@unique([steamId, matchId])\n}\n\n// ──────────────────────────────────────────────\n// 🗺️ Map-Vote\n// ──────────────────────────────────────────────\n\nenum MapVoteAction {\n BAN\n PICK\n DECIDER\n}\n\nmodel MapVote {\n id String @id @default(uuid())\n matchId String @unique\n match Match @relation(fields: [matchId], references: [id])\n\n bestOf Int @default(3)\n mapPool String[]\n currentIdx Int @default(0)\n locked Boolean @default(false)\n opensAt DateTime?\n\n leadMinutes Int @default(60)\n\n adminEditingBy String?\n adminEditingSince DateTime?\n\n steps MapVoteStep[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel MapVoteStep {\n id String @id @default(uuid())\n voteId String\n order Int\n action MapVoteAction\n\n teamId String?\n team Team? @relation(\"VoteStepTeam\", fields: [teamId], references: [id])\n\n map String?\n chosenAt DateTime?\n chosenBy String?\n chooser User? @relation(\"VoteStepChooser\", fields: [chosenBy], references: [steamId])\n\n vote MapVote @relation(fields: [voteId], references: [id])\n\n @@unique([voteId, order])\n @@index([teamId])\n @@index([chosenBy])\n}\n\nmodel MatchReady {\n matchId String\n steamId String\n acceptedAt DateTime @default(now())\n\n match Match @relation(\"MatchReadyMatch\", fields: [matchId], references: [id])\n user User @relation(\"MatchReadyUser\", fields: [steamId], references: [steamId])\n\n @@id([matchId, steamId])\n @@index([steamId])\n}\n", + "inlineSchemaHash": "262382781db09c76873c9b1ff3d732b74b3425d84159b0d7a1939ca346cd7c0f", "copyEngine": true } config.dirname = '/' -config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"avatar\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"location\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isAdmin\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"UserTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledTeam\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"TeamLeader\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"TeamAPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"TeamBPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"premierRank\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"authCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastKnownShareCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastKnownShareCodeDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"invites\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TeamInvite\",\"nativeType\":null,\"relationName\":\"UserInvitations\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifications\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notification\",\"nativeType\":null,\"relationName\":\"NotificationToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"serverRequests\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ServerRequest\",\"nativeType\":null,\"relationName\":\"MatchRequests\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankHistory\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"RankHistory\",\"nativeType\":null,\"relationName\":\"UserRankHistory\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoFiles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DemoFile\",\"nativeType\":null,\"relationName\":\"DemoFileToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdSchedules\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"CreatedSchedules\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedSchedules\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ConfirmedSchedules\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVoteChoices\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteStep\",\"nativeType\":null,\"relationName\":\"VoteStepChooser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"UserStatus\",\"nativeType\":null,\"default\":\"offline\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastActiveAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Team\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"logo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leaderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"activePlayers\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"inactivePlayers\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leader\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamLeader\",\"relationFromFields\":[\"leaderId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"members\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"invites\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TeamInvite\",\"nativeType\":null,\"relationName\":\"TeamToTeamInvite\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchTeamA\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchTeamB\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schedulesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ScheduleTeamA\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schedulesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ScheduleTeamB\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVoteSteps\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteStep\",\"nativeType\":null,\"relationName\":\"VoteStepTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"TeamInvite\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserInvitations\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"TeamToTeamInvite\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Notification\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"message\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"read\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"persistent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actionType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actionData\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"NotificationToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Match\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"community\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scoreA\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scoreB\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamA\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchTeamA\",\"relationFromFields\":[\"teamAId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamB\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchTeamB\",\"relationFromFields\":[\"teamBId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamAPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamBPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"filePath\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoFile\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DemoFile\",\"nativeType\":null,\"relationName\":\"DemoFileToMatch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoData\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"players\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankUpdates\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"RankHistory\",\"nativeType\":null,\"relationName\":\"MatchRankHistory\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roundCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roundHistory\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winnerTeam\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bestOf\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVote\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVote\",\"nativeType\":null,\"relationName\":\"MapVoteToMatch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"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\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"schedule\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"MatchToSchedule\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MatchPlayer\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchPlayerToTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MatchPlayerToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stats\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PlayerStats\",\"nativeType\":null,\"relationName\":\"MatchPlayerToPlayerStats\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"matchId\",\"steamId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"matchId\",\"steamId\"]}],\"isGenerated\":false},\"PlayerStats\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"kills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"assists\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deaths\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headshotPct\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalDamage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Float\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"utilityDamage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"flashAssists\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvps\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpEliminations\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpDefuse\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpPlant\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"knifeKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"zeusKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wallbangKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"smokeKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headshots\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noScopes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"blindKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aim\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"oneK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"twoK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"threeK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fourK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fiveK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankOld\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankChange\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToPlayerStats\",\"relationFromFields\":[\"matchId\",\"steamId\"],\"relationToFields\":[\"matchId\",\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"matchId\",\"steamId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"matchId\",\"steamId\"]}],\"isGenerated\":false},\"RankHistory\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankOld\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"delta\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserRankHistory\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchRankHistory\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Schedule\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"date\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"ScheduleStatus\",\"nativeType\":null,\"default\":\"PENDING\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamA\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"ScheduleTeamA\",\"relationFromFields\":[\"teamAId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamB\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"ScheduleTeamB\",\"relationFromFields\":[\"teamBId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdById\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"CreatedSchedules\",\"relationFromFields\":[\"createdById\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedById\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedBy\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"ConfirmedSchedules\",\"relationFromFields\":[\"confirmedById\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"linkedMatchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"linkedMatch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToSchedule\",\"relationFromFields\":[\"linkedMatchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"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\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"DemoFile\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fileName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"filePath\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parsed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"DemoFileToMatch\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"DemoFileToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ServerRequest\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reservationId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tvPort\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"failed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MatchRequests\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"steamId\",\"matchId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"steamId\",\"matchId\"]}],\"isGenerated\":false},\"MapVote\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MapVoteToMatch\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bestOf\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapPool\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"currentIdx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"locked\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"opensAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leadMinutes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":60,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminEditingBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminEditingSince\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steps\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteStep\",\"nativeType\":null,\"relationName\":\"MapVoteToMapVoteStep\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"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\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MapVoteStep\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"voteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"action\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteAction\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"VoteStepTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chosenAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chosenBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chooser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"VoteStepChooser\",\"relationFromFields\":[\"chosenBy\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"vote\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVote\",\"nativeType\":null,\"relationName\":\"MapVoteToMapVoteStep\",\"relationFromFields\":[\"voteId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"voteId\",\"order\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"voteId\",\"order\"]}],\"isGenerated\":false}},\"enums\":{\"UserStatus\":{\"values\":[{\"name\":\"online\",\"dbName\":null},{\"name\":\"away\",\"dbName\":null},{\"name\":\"offline\",\"dbName\":null}],\"dbName\":null},\"ScheduleStatus\":{\"values\":[{\"name\":\"PENDING\",\"dbName\":null},{\"name\":\"CONFIRMED\",\"dbName\":null},{\"name\":\"DECLINED\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null},{\"name\":\"COMPLETED\",\"dbName\":null}],\"dbName\":null},\"MapVoteAction\":{\"values\":[{\"name\":\"BAN\",\"dbName\":null},{\"name\":\"PICK\",\"dbName\":null},{\"name\":\"DECIDER\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"avatar\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"location\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isAdmin\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"UserTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledTeam\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"TeamLeader\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"TeamAPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"TeamBPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"premierRank\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"authCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastKnownShareCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastKnownShareCodeDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"invites\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TeamInvite\",\"nativeType\":null,\"relationName\":\"UserInvitations\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifications\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notification\",\"nativeType\":null,\"relationName\":\"NotificationToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"serverRequests\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ServerRequest\",\"nativeType\":null,\"relationName\":\"MatchRequests\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankHistory\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"RankHistory\",\"nativeType\":null,\"relationName\":\"UserRankHistory\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoFiles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DemoFile\",\"nativeType\":null,\"relationName\":\"DemoFileToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdSchedules\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"CreatedSchedules\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedSchedules\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ConfirmedSchedules\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVoteChoices\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteStep\",\"nativeType\":null,\"relationName\":\"VoteStepChooser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"UserStatus\",\"nativeType\":null,\"default\":\"offline\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastActiveAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"readyAcceptances\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchReady\",\"nativeType\":null,\"relationName\":\"MatchReadyUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Team\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"logo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leaderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"activePlayers\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"inactivePlayers\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leader\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamLeader\",\"relationFromFields\":[\"leaderId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"members\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"invites\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TeamInvite\",\"nativeType\":null,\"relationName\":\"TeamToTeamInvite\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchTeamA\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchTeamB\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schedulesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ScheduleTeamA\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schedulesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ScheduleTeamB\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVoteSteps\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteStep\",\"nativeType\":null,\"relationName\":\"VoteStepTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"TeamInvite\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserInvitations\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"TeamToTeamInvite\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Notification\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"message\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"read\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"persistent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actionType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actionData\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"NotificationToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Match\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"community\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scoreA\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scoreB\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamA\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchTeamA\",\"relationFromFields\":[\"teamAId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamB\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchTeamB\",\"relationFromFields\":[\"teamBId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamAPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamBPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"filePath\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoFile\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DemoFile\",\"nativeType\":null,\"relationName\":\"DemoFileToMatch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoData\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"players\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankUpdates\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"RankHistory\",\"nativeType\":null,\"relationName\":\"MatchRankHistory\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roundCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roundHistory\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winnerTeam\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bestOf\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVote\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVote\",\"nativeType\":null,\"relationName\":\"MapVoteToMatch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"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\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"schedule\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"MatchToSchedule\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"readyAcceptances\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchReady\",\"nativeType\":null,\"relationName\":\"MatchReadyMatch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MatchPlayer\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchPlayerToTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MatchPlayerToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stats\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PlayerStats\",\"nativeType\":null,\"relationName\":\"MatchPlayerToPlayerStats\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"matchId\",\"steamId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"matchId\",\"steamId\"]}],\"isGenerated\":false},\"PlayerStats\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"kills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"assists\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deaths\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headshotPct\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalDamage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Float\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"utilityDamage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"flashAssists\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvps\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpEliminations\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpDefuse\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpPlant\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"knifeKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"zeusKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wallbangKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"smokeKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headshots\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noScopes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"blindKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aim\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"oneK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"twoK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"threeK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fourK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fiveK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankOld\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankChange\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToPlayerStats\",\"relationFromFields\":[\"matchId\",\"steamId\"],\"relationToFields\":[\"matchId\",\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"matchId\",\"steamId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"matchId\",\"steamId\"]}],\"isGenerated\":false},\"RankHistory\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankOld\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"delta\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserRankHistory\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchRankHistory\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Schedule\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"date\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"ScheduleStatus\",\"nativeType\":null,\"default\":\"PENDING\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamA\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"ScheduleTeamA\",\"relationFromFields\":[\"teamAId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamB\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"ScheduleTeamB\",\"relationFromFields\":[\"teamBId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdById\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"CreatedSchedules\",\"relationFromFields\":[\"createdById\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedById\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedBy\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"ConfirmedSchedules\",\"relationFromFields\":[\"confirmedById\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"linkedMatchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"linkedMatch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToSchedule\",\"relationFromFields\":[\"linkedMatchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"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\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"DemoFile\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fileName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"filePath\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parsed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"DemoFileToMatch\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"DemoFileToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ServerRequest\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reservationId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tvPort\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"failed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MatchRequests\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"steamId\",\"matchId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"steamId\",\"matchId\"]}],\"isGenerated\":false},\"MapVote\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MapVoteToMatch\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bestOf\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapPool\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"currentIdx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"locked\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"opensAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leadMinutes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":60,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminEditingBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminEditingSince\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steps\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteStep\",\"nativeType\":null,\"relationName\":\"MapVoteToMapVoteStep\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"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\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MapVoteStep\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"voteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"action\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteAction\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"VoteStepTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chosenAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chosenBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chooser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"VoteStepChooser\",\"relationFromFields\":[\"chosenBy\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"vote\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVote\",\"nativeType\":null,\"relationName\":\"MapVoteToMapVoteStep\",\"relationFromFields\":[\"voteId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"voteId\",\"order\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"voteId\",\"order\"]}],\"isGenerated\":false},\"MatchReady\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"acceptedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchReadyMatch\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MatchReadyUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"matchId\",\"steamId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{\"UserStatus\":{\"values\":[{\"name\":\"online\",\"dbName\":null},{\"name\":\"away\",\"dbName\":null},{\"name\":\"offline\",\"dbName\":null}],\"dbName\":null},\"ScheduleStatus\":{\"values\":[{\"name\":\"PENDING\",\"dbName\":null},{\"name\":\"CONFIRMED\",\"dbName\":null},{\"name\":\"DECLINED\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null},{\"name\":\"COMPLETED\",\"dbName\":null}],\"dbName\":null},\"MapVoteAction\":{\"values\":[{\"name\":\"BAN\",\"dbName\":null},{\"name\":\"PICK\",\"dbName\":null},{\"name\":\"DECIDER\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") defineDmmfProperty(exports.Prisma, config.runtimeDataModel) config.engineWasm = undefined config.compilerWasm = undefined diff --git a/src/generated/prisma/index-browser.js b/src/generated/prisma/index-browser.js index bc8f3c3..e4be08d 100644 --- a/src/generated/prisma/index-browser.js +++ b/src/generated/prisma/index-browser.js @@ -20,12 +20,12 @@ exports.Prisma = Prisma exports.$Enums = {} /** - * Prisma Client JS version: 6.14.0 - * Query Engine version: 717184b7b35ea05dfa71a3236b7af656013e1e49 + * Prisma Client JS version: 6.15.0 + * Query Engine version: 85179d7826409ee107a6ba334b5e305ae3fba9fb */ Prisma.prismaVersion = { - client: "6.14.0", - engine: "717184b7b35ea05dfa71a3236b7af656013e1e49" + client: "6.15.0", + engine: "85179d7826409ee107a6ba334b5e305ae3fba9fb" } Prisma.PrismaClientKnownRequestError = () => { @@ -304,6 +304,12 @@ exports.Prisma.MapVoteStepScalarFieldEnum = { chosenBy: 'chosenBy' }; +exports.Prisma.MatchReadyScalarFieldEnum = { + matchId: 'matchId', + steamId: 'steamId', + acceptedAt: 'acceptedAt' +}; + exports.Prisma.SortOrder = { asc: 'asc', desc: 'desc' @@ -362,7 +368,8 @@ exports.Prisma.ModelName = { DemoFile: 'DemoFile', ServerRequest: 'ServerRequest', MapVote: 'MapVote', - MapVoteStep: 'MapVoteStep' + MapVoteStep: 'MapVoteStep', + MatchReady: 'MatchReady' }; /** diff --git a/src/generated/prisma/index.d.ts b/src/generated/prisma/index.d.ts index 95f5980..b89bdf2 100644 --- a/src/generated/prisma/index.d.ts +++ b/src/generated/prisma/index.d.ts @@ -78,6 +78,11 @@ export type MapVote = $Result.DefaultSelection * */ export type MapVoteStep = $Result.DefaultSelection +/** + * Model MatchReady + * + */ +export type MatchReady = $Result.DefaultSelection /** * Enums @@ -372,6 +377,16 @@ export class PrismaClient< * ``` */ get mapVoteStep(): Prisma.MapVoteStepDelegate; + + /** + * `prisma.matchReady`: Exposes CRUD operations for the **MatchReady** model. + * Example usage: + * ```ts + * // Fetch zero or more MatchReadies + * const matchReadies = await prisma.matchReady.findMany() + * ``` + */ + get matchReady(): Prisma.MatchReadyDelegate; } export namespace Prisma { @@ -430,8 +445,8 @@ export namespace Prisma { export import Exact = $Public.Exact /** - * Prisma Client JS version: 6.14.0 - * Query Engine version: 717184b7b35ea05dfa71a3236b7af656013e1e49 + * Prisma Client JS version: 6.15.0 + * Query Engine version: 85179d7826409ee107a6ba334b5e305ae3fba9fb */ export type PrismaVersion = { client: string @@ -824,7 +839,8 @@ export namespace Prisma { DemoFile: 'DemoFile', ServerRequest: 'ServerRequest', MapVote: 'MapVote', - MapVoteStep: 'MapVoteStep' + MapVoteStep: 'MapVoteStep', + MatchReady: 'MatchReady' }; export type ModelName = (typeof ModelName)[keyof typeof ModelName] @@ -843,7 +859,7 @@ export namespace Prisma { omit: GlobalOmitOptions } meta: { - modelProps: "user" | "team" | "teamInvite" | "notification" | "match" | "matchPlayer" | "playerStats" | "rankHistory" | "schedule" | "demoFile" | "serverRequest" | "mapVote" | "mapVoteStep" + modelProps: "user" | "team" | "teamInvite" | "notification" | "match" | "matchPlayer" | "playerStats" | "rankHistory" | "schedule" | "demoFile" | "serverRequest" | "mapVote" | "mapVoteStep" | "matchReady" txIsolationLevel: Prisma.TransactionIsolationLevel } model: { @@ -1809,6 +1825,80 @@ export namespace Prisma { } } } + MatchReady: { + payload: Prisma.$MatchReadyPayload + fields: Prisma.MatchReadyFieldRefs + operations: { + findUnique: { + args: Prisma.MatchReadyFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.MatchReadyFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.MatchReadyFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.MatchReadyFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.MatchReadyFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.MatchReadyCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.MatchReadyCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.MatchReadyCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.MatchReadyDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.MatchReadyUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.MatchReadyDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.MatchReadyUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.MatchReadyUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.MatchReadyUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.MatchReadyAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.MatchReadyGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.MatchReadyCountArgs + result: $Utils.Optional | number + } + } + } } } & { other: { @@ -1914,6 +2004,7 @@ export namespace Prisma { serverRequest?: ServerRequestOmit mapVote?: MapVoteOmit mapVoteStep?: MapVoteStepOmit + matchReady?: MatchReadyOmit } /* Types for Logging */ @@ -2005,6 +2096,7 @@ export namespace Prisma { createdSchedules: number confirmedSchedules: number mapVoteChoices: number + readyAcceptances: number } export type UserCountOutputTypeSelect = { @@ -2019,6 +2111,7 @@ export namespace Prisma { createdSchedules?: boolean | UserCountOutputTypeCountCreatedSchedulesArgs confirmedSchedules?: boolean | UserCountOutputTypeCountConfirmedSchedulesArgs mapVoteChoices?: boolean | UserCountOutputTypeCountMapVoteChoicesArgs + readyAcceptances?: boolean | UserCountOutputTypeCountReadyAcceptancesArgs } // Custom InputTypes @@ -2109,6 +2202,13 @@ export namespace Prisma { where?: MapVoteStepWhereInput } + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountReadyAcceptancesArgs = { + where?: MatchReadyWhereInput + } + /** * Count Type TeamCountOutputType @@ -2213,6 +2313,7 @@ export namespace Prisma { teamBUsers: number players: number rankUpdates: number + readyAcceptances: number } export type MatchCountOutputTypeSelect = { @@ -2220,6 +2321,7 @@ export namespace Prisma { teamBUsers?: boolean | MatchCountOutputTypeCountTeamBUsersArgs players?: boolean | MatchCountOutputTypeCountPlayersArgs rankUpdates?: boolean | MatchCountOutputTypeCountRankUpdatesArgs + readyAcceptances?: boolean | MatchCountOutputTypeCountReadyAcceptancesArgs } // Custom InputTypes @@ -2261,6 +2363,13 @@ export namespace Prisma { where?: RankHistoryWhereInput } + /** + * MatchCountOutputType without action + */ + export type MatchCountOutputTypeCountReadyAcceptancesArgs = { + where?: MatchReadyWhereInput + } + /** * Count Type MapVoteCountOutputType @@ -2572,6 +2681,7 @@ export namespace Prisma { createdSchedules?: boolean | User$createdSchedulesArgs confirmedSchedules?: boolean | User$confirmedSchedulesArgs mapVoteChoices?: boolean | User$mapVoteChoicesArgs + readyAcceptances?: boolean | User$readyAcceptancesArgs _count?: boolean | UserCountOutputTypeDefaultArgs }, ExtArgs["result"]["user"]> @@ -2640,6 +2750,7 @@ export namespace Prisma { createdSchedules?: boolean | User$createdSchedulesArgs confirmedSchedules?: boolean | User$confirmedSchedulesArgs mapVoteChoices?: boolean | User$mapVoteChoicesArgs + readyAcceptances?: boolean | User$readyAcceptancesArgs _count?: boolean | UserCountOutputTypeDefaultArgs } export type UserIncludeCreateManyAndReturn = { @@ -2665,6 +2776,7 @@ export namespace Prisma { createdSchedules: Prisma.$SchedulePayload[] confirmedSchedules: Prisma.$SchedulePayload[] mapVoteChoices: Prisma.$MapVoteStepPayload[] + readyAcceptances: Prisma.$MatchReadyPayload[] } scalars: $Extensions.GetPayloadResult<{ steamId: string @@ -3087,6 +3199,7 @@ export namespace Prisma { createdSchedules = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> confirmedSchedules = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> mapVoteChoices = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + readyAcceptances = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -3826,6 +3939,30 @@ export namespace Prisma { distinct?: MapVoteStepScalarFieldEnum | MapVoteStepScalarFieldEnum[] } + /** + * User.readyAcceptances + */ + export type User$readyAcceptancesArgs = { + /** + * Select specific fields to fetch from the MatchReady + */ + select?: MatchReadySelect | null + /** + * Omit specific fields from the MatchReady + */ + omit?: MatchReadyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchReadyInclude | null + where?: MatchReadyWhereInput + orderBy?: MatchReadyOrderByWithRelationInput | MatchReadyOrderByWithRelationInput[] + cursor?: MatchReadyWhereUniqueInput + take?: number + skip?: number + distinct?: MatchReadyScalarFieldEnum | MatchReadyScalarFieldEnum[] + } + /** * User without action */ @@ -7665,6 +7802,7 @@ export namespace Prisma { rankUpdates?: boolean | Match$rankUpdatesArgs mapVote?: boolean | Match$mapVoteArgs schedule?: boolean | Match$scheduleArgs + readyAcceptances?: boolean | Match$readyAcceptancesArgs _count?: boolean | MatchCountOutputTypeDefaultArgs }, ExtArgs["result"]["match"]> @@ -7749,6 +7887,7 @@ export namespace Prisma { rankUpdates?: boolean | Match$rankUpdatesArgs mapVote?: boolean | Match$mapVoteArgs schedule?: boolean | Match$scheduleArgs + readyAcceptances?: boolean | Match$readyAcceptancesArgs _count?: boolean | MatchCountOutputTypeDefaultArgs } export type MatchIncludeCreateManyAndReturn = { @@ -7772,6 +7911,7 @@ export namespace Prisma { rankUpdates: Prisma.$RankHistoryPayload[] mapVote: Prisma.$MapVotePayload | null schedule: Prisma.$SchedulePayload | null + readyAcceptances: Prisma.$MatchReadyPayload[] } scalars: $Extensions.GetPayloadResult<{ id: string @@ -8196,6 +8336,7 @@ export namespace Prisma { rankUpdates = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> mapVote = {}>(args?: Subset>): Prisma__MapVoteClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> schedule = {}>(args?: Subset>): Prisma__ScheduleClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + readyAcceptances = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -8830,6 +8971,30 @@ export namespace Prisma { where?: ScheduleWhereInput } + /** + * Match.readyAcceptances + */ + export type Match$readyAcceptancesArgs = { + /** + * Select specific fields to fetch from the MatchReady + */ + select?: MatchReadySelect | null + /** + * Omit specific fields from the MatchReady + */ + omit?: MatchReadyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchReadyInclude | null + where?: MatchReadyWhereInput + orderBy?: MatchReadyOrderByWithRelationInput | MatchReadyOrderByWithRelationInput[] + cursor?: MatchReadyWhereUniqueInput + take?: number + skip?: number + distinct?: MatchReadyScalarFieldEnum | MatchReadyScalarFieldEnum[] + } + /** * Match without action */ @@ -18572,6 +18737,1046 @@ export namespace Prisma { } + /** + * Model MatchReady + */ + + export type AggregateMatchReady = { + _count: MatchReadyCountAggregateOutputType | null + _min: MatchReadyMinAggregateOutputType | null + _max: MatchReadyMaxAggregateOutputType | null + } + + export type MatchReadyMinAggregateOutputType = { + matchId: string | null + steamId: string | null + acceptedAt: Date | null + } + + export type MatchReadyMaxAggregateOutputType = { + matchId: string | null + steamId: string | null + acceptedAt: Date | null + } + + export type MatchReadyCountAggregateOutputType = { + matchId: number + steamId: number + acceptedAt: number + _all: number + } + + + export type MatchReadyMinAggregateInputType = { + matchId?: true + steamId?: true + acceptedAt?: true + } + + export type MatchReadyMaxAggregateInputType = { + matchId?: true + steamId?: true + acceptedAt?: true + } + + export type MatchReadyCountAggregateInputType = { + matchId?: true + steamId?: true + acceptedAt?: true + _all?: true + } + + export type MatchReadyAggregateArgs = { + /** + * Filter which MatchReady to aggregate. + */ + where?: MatchReadyWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MatchReadies to fetch. + */ + orderBy?: MatchReadyOrderByWithRelationInput | MatchReadyOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: MatchReadyWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MatchReadies from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MatchReadies. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned MatchReadies + **/ + _count?: true | MatchReadyCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: MatchReadyMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: MatchReadyMaxAggregateInputType + } + + export type GetMatchReadyAggregateType = { + [P in keyof T & keyof AggregateMatchReady]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type MatchReadyGroupByArgs = { + where?: MatchReadyWhereInput + orderBy?: MatchReadyOrderByWithAggregationInput | MatchReadyOrderByWithAggregationInput[] + by: MatchReadyScalarFieldEnum[] | MatchReadyScalarFieldEnum + having?: MatchReadyScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: MatchReadyCountAggregateInputType | true + _min?: MatchReadyMinAggregateInputType + _max?: MatchReadyMaxAggregateInputType + } + + export type MatchReadyGroupByOutputType = { + matchId: string + steamId: string + acceptedAt: Date + _count: MatchReadyCountAggregateOutputType | null + _min: MatchReadyMinAggregateOutputType | null + _max: MatchReadyMaxAggregateOutputType | null + } + + type GetMatchReadyGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof MatchReadyGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type MatchReadySelect = $Extensions.GetSelect<{ + matchId?: boolean + steamId?: boolean + acceptedAt?: boolean + match?: boolean | MatchDefaultArgs + user?: boolean | UserDefaultArgs + }, ExtArgs["result"]["matchReady"]> + + export type MatchReadySelectCreateManyAndReturn = $Extensions.GetSelect<{ + matchId?: boolean + steamId?: boolean + acceptedAt?: boolean + match?: boolean | MatchDefaultArgs + user?: boolean | UserDefaultArgs + }, ExtArgs["result"]["matchReady"]> + + export type MatchReadySelectUpdateManyAndReturn = $Extensions.GetSelect<{ + matchId?: boolean + steamId?: boolean + acceptedAt?: boolean + match?: boolean | MatchDefaultArgs + user?: boolean | UserDefaultArgs + }, ExtArgs["result"]["matchReady"]> + + export type MatchReadySelectScalar = { + matchId?: boolean + steamId?: boolean + acceptedAt?: boolean + } + + export type MatchReadyOmit = $Extensions.GetOmit<"matchId" | "steamId" | "acceptedAt", ExtArgs["result"]["matchReady"]> + export type MatchReadyInclude = { + match?: boolean | MatchDefaultArgs + user?: boolean | UserDefaultArgs + } + export type MatchReadyIncludeCreateManyAndReturn = { + match?: boolean | MatchDefaultArgs + user?: boolean | UserDefaultArgs + } + export type MatchReadyIncludeUpdateManyAndReturn = { + match?: boolean | MatchDefaultArgs + user?: boolean | UserDefaultArgs + } + + export type $MatchReadyPayload = { + name: "MatchReady" + objects: { + match: Prisma.$MatchPayload + user: Prisma.$UserPayload + } + scalars: $Extensions.GetPayloadResult<{ + matchId: string + steamId: string + acceptedAt: Date + }, ExtArgs["result"]["matchReady"]> + composites: {} + } + + type MatchReadyGetPayload = $Result.GetResult + + type MatchReadyCountArgs = + Omit & { + select?: MatchReadyCountAggregateInputType | true + } + + export interface MatchReadyDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['MatchReady'], meta: { name: 'MatchReady' } } + /** + * Find zero or one MatchReady that matches the filter. + * @param {MatchReadyFindUniqueArgs} args - Arguments to find a MatchReady + * @example + * // Get one MatchReady + * const matchReady = await prisma.matchReady.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__MatchReadyClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one MatchReady that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {MatchReadyFindUniqueOrThrowArgs} args - Arguments to find a MatchReady + * @example + * // Get one MatchReady + * const matchReady = await prisma.matchReady.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__MatchReadyClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first MatchReady 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 {MatchReadyFindFirstArgs} args - Arguments to find a MatchReady + * @example + * // Get one MatchReady + * const matchReady = await prisma.matchReady.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__MatchReadyClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first MatchReady that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchReadyFindFirstOrThrowArgs} args - Arguments to find a MatchReady + * @example + * // Get one MatchReady + * const matchReady = await prisma.matchReady.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__MatchReadyClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more MatchReadies 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 {MatchReadyFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all MatchReadies + * const matchReadies = await prisma.matchReady.findMany() + * + * // Get first 10 MatchReadies + * const matchReadies = await prisma.matchReady.findMany({ take: 10 }) + * + * // Only select the `matchId` + * const matchReadyWithMatchIdOnly = await prisma.matchReady.findMany({ select: { matchId: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a MatchReady. + * @param {MatchReadyCreateArgs} args - Arguments to create a MatchReady. + * @example + * // Create one MatchReady + * const MatchReady = await prisma.matchReady.create({ + * data: { + * // ... data to create a MatchReady + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__MatchReadyClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many MatchReadies. + * @param {MatchReadyCreateManyArgs} args - Arguments to create many MatchReadies. + * @example + * // Create many MatchReadies + * const matchReady = await prisma.matchReady.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many MatchReadies and returns the data saved in the database. + * @param {MatchReadyCreateManyAndReturnArgs} args - Arguments to create many MatchReadies. + * @example + * // Create many MatchReadies + * const matchReady = await prisma.matchReady.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many MatchReadies and only return the `matchId` + * const matchReadyWithMatchIdOnly = await prisma.matchReady.createManyAndReturn({ + * select: { matchId: 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", GlobalOmitOptions>> + + /** + * Delete a MatchReady. + * @param {MatchReadyDeleteArgs} args - Arguments to delete one MatchReady. + * @example + * // Delete one MatchReady + * const MatchReady = await prisma.matchReady.delete({ + * where: { + * // ... filter to delete one MatchReady + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__MatchReadyClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one MatchReady. + * @param {MatchReadyUpdateArgs} args - Arguments to update one MatchReady. + * @example + * // Update one MatchReady + * const matchReady = await prisma.matchReady.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__MatchReadyClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more MatchReadies. + * @param {MatchReadyDeleteManyArgs} args - Arguments to filter MatchReadies to delete. + * @example + * // Delete a few MatchReadies + * const { count } = await prisma.matchReady.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more MatchReadies. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchReadyUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many MatchReadies + * const matchReady = await prisma.matchReady.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more MatchReadies and returns the data updated in the database. + * @param {MatchReadyUpdateManyAndReturnArgs} args - Arguments to update many MatchReadies. + * @example + * // Update many MatchReadies + * const matchReady = await prisma.matchReady.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more MatchReadies and only return the `matchId` + * const matchReadyWithMatchIdOnly = await prisma.matchReady.updateManyAndReturn({ + * select: { matchId: true }, + * where: { + * // ... provide filter here + * }, + * 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 + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one MatchReady. + * @param {MatchReadyUpsertArgs} args - Arguments to update or create a MatchReady. + * @example + * // Update or create a MatchReady + * const matchReady = await prisma.matchReady.upsert({ + * create: { + * // ... data to create a MatchReady + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the MatchReady we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__MatchReadyClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of MatchReadies. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchReadyCountArgs} args - Arguments to filter MatchReadies to count. + * @example + * // Count the number of MatchReadies + * const count = await prisma.matchReady.count({ + * where: { + * // ... the filter for the MatchReadies we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a MatchReady. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchReadyAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by MatchReady. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchReadyGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends MatchReadyGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: MatchReadyGroupByArgs['orderBy'] } + : { orderBy?: MatchReadyGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetMatchReadyGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the MatchReady model + */ + readonly fields: MatchReadyFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for MatchReady. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__MatchReadyClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + match = {}>(args?: Subset>): Prisma__MatchClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the MatchReady model + */ + interface MatchReadyFieldRefs { + readonly matchId: FieldRef<"MatchReady", 'String'> + readonly steamId: FieldRef<"MatchReady", 'String'> + readonly acceptedAt: FieldRef<"MatchReady", 'DateTime'> + } + + + // Custom InputTypes + /** + * MatchReady findUnique + */ + export type MatchReadyFindUniqueArgs = { + /** + * Select specific fields to fetch from the MatchReady + */ + select?: MatchReadySelect | null + /** + * Omit specific fields from the MatchReady + */ + omit?: MatchReadyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchReadyInclude | null + /** + * Filter, which MatchReady to fetch. + */ + where: MatchReadyWhereUniqueInput + } + + /** + * MatchReady findUniqueOrThrow + */ + export type MatchReadyFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the MatchReady + */ + select?: MatchReadySelect | null + /** + * Omit specific fields from the MatchReady + */ + omit?: MatchReadyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchReadyInclude | null + /** + * Filter, which MatchReady to fetch. + */ + where: MatchReadyWhereUniqueInput + } + + /** + * MatchReady findFirst + */ + export type MatchReadyFindFirstArgs = { + /** + * Select specific fields to fetch from the MatchReady + */ + select?: MatchReadySelect | null + /** + * Omit specific fields from the MatchReady + */ + omit?: MatchReadyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchReadyInclude | null + /** + * Filter, which MatchReady to fetch. + */ + where?: MatchReadyWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MatchReadies to fetch. + */ + orderBy?: MatchReadyOrderByWithRelationInput | MatchReadyOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for MatchReadies. + */ + cursor?: MatchReadyWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MatchReadies from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MatchReadies. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of MatchReadies. + */ + distinct?: MatchReadyScalarFieldEnum | MatchReadyScalarFieldEnum[] + } + + /** + * MatchReady findFirstOrThrow + */ + export type MatchReadyFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the MatchReady + */ + select?: MatchReadySelect | null + /** + * Omit specific fields from the MatchReady + */ + omit?: MatchReadyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchReadyInclude | null + /** + * Filter, which MatchReady to fetch. + */ + where?: MatchReadyWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MatchReadies to fetch. + */ + orderBy?: MatchReadyOrderByWithRelationInput | MatchReadyOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for MatchReadies. + */ + cursor?: MatchReadyWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MatchReadies from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MatchReadies. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of MatchReadies. + */ + distinct?: MatchReadyScalarFieldEnum | MatchReadyScalarFieldEnum[] + } + + /** + * MatchReady findMany + */ + export type MatchReadyFindManyArgs = { + /** + * Select specific fields to fetch from the MatchReady + */ + select?: MatchReadySelect | null + /** + * Omit specific fields from the MatchReady + */ + omit?: MatchReadyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchReadyInclude | null + /** + * Filter, which MatchReadies to fetch. + */ + where?: MatchReadyWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MatchReadies to fetch. + */ + orderBy?: MatchReadyOrderByWithRelationInput | MatchReadyOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing MatchReadies. + */ + cursor?: MatchReadyWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MatchReadies from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MatchReadies. + */ + skip?: number + distinct?: MatchReadyScalarFieldEnum | MatchReadyScalarFieldEnum[] + } + + /** + * MatchReady create + */ + export type MatchReadyCreateArgs = { + /** + * Select specific fields to fetch from the MatchReady + */ + select?: MatchReadySelect | null + /** + * Omit specific fields from the MatchReady + */ + omit?: MatchReadyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchReadyInclude | null + /** + * The data needed to create a MatchReady. + */ + data: XOR + } + + /** + * MatchReady createMany + */ + export type MatchReadyCreateManyArgs = { + /** + * The data used to create many MatchReadies. + */ + data: MatchReadyCreateManyInput | MatchReadyCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * MatchReady createManyAndReturn + */ + export type MatchReadyCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the MatchReady + */ + select?: MatchReadySelectCreateManyAndReturn | null + /** + * Omit specific fields from the MatchReady + */ + omit?: MatchReadyOmit | null + /** + * The data used to create many MatchReadies. + */ + data: MatchReadyCreateManyInput | MatchReadyCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchReadyIncludeCreateManyAndReturn | null + } + + /** + * MatchReady update + */ + export type MatchReadyUpdateArgs = { + /** + * Select specific fields to fetch from the MatchReady + */ + select?: MatchReadySelect | null + /** + * Omit specific fields from the MatchReady + */ + omit?: MatchReadyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchReadyInclude | null + /** + * The data needed to update a MatchReady. + */ + data: XOR + /** + * Choose, which MatchReady to update. + */ + where: MatchReadyWhereUniqueInput + } + + /** + * MatchReady updateMany + */ + export type MatchReadyUpdateManyArgs = { + /** + * The data used to update MatchReadies. + */ + data: XOR + /** + * Filter which MatchReadies to update + */ + where?: MatchReadyWhereInput + /** + * Limit how many MatchReadies to update. + */ + limit?: number + } + + /** + * MatchReady updateManyAndReturn + */ + export type MatchReadyUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the MatchReady + */ + select?: MatchReadySelectUpdateManyAndReturn | null + /** + * Omit specific fields from the MatchReady + */ + omit?: MatchReadyOmit | null + /** + * The data used to update MatchReadies. + */ + data: XOR + /** + * Filter which MatchReadies to update + */ + where?: MatchReadyWhereInput + /** + * Limit how many MatchReadies to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchReadyIncludeUpdateManyAndReturn | null + } + + /** + * MatchReady upsert + */ + export type MatchReadyUpsertArgs = { + /** + * Select specific fields to fetch from the MatchReady + */ + select?: MatchReadySelect | null + /** + * Omit specific fields from the MatchReady + */ + omit?: MatchReadyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchReadyInclude | null + /** + * The filter to search for the MatchReady to update in case it exists. + */ + where: MatchReadyWhereUniqueInput + /** + * In case the MatchReady found by the `where` argument doesn't exist, create a new MatchReady with this data. + */ + create: XOR + /** + * In case the MatchReady was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * MatchReady delete + */ + export type MatchReadyDeleteArgs = { + /** + * Select specific fields to fetch from the MatchReady + */ + select?: MatchReadySelect | null + /** + * Omit specific fields from the MatchReady + */ + omit?: MatchReadyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchReadyInclude | null + /** + * Filter which MatchReady to delete. + */ + where: MatchReadyWhereUniqueInput + } + + /** + * MatchReady deleteMany + */ + export type MatchReadyDeleteManyArgs = { + /** + * Filter which MatchReadies to delete + */ + where?: MatchReadyWhereInput + /** + * Limit how many MatchReadies to delete. + */ + limit?: number + } + + /** + * MatchReady without action + */ + export type MatchReadyDefaultArgs = { + /** + * Select specific fields to fetch from the MatchReady + */ + select?: MatchReadySelect | null + /** + * Omit specific fields from the MatchReady + */ + omit?: MatchReadyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchReadyInclude | null + } + + /** * Enums */ @@ -18809,6 +20014,15 @@ export namespace Prisma { export type MapVoteStepScalarFieldEnum = (typeof MapVoteStepScalarFieldEnum)[keyof typeof MapVoteStepScalarFieldEnum] + export const MatchReadyScalarFieldEnum: { + matchId: 'matchId', + steamId: 'steamId', + acceptedAt: 'acceptedAt' + }; + + export type MatchReadyScalarFieldEnum = (typeof MatchReadyScalarFieldEnum)[keyof typeof MatchReadyScalarFieldEnum] + + export const SortOrder: { asc: 'asc', desc: 'desc' @@ -19021,6 +20235,7 @@ export namespace Prisma { createdSchedules?: ScheduleListRelationFilter confirmedSchedules?: ScheduleListRelationFilter mapVoteChoices?: MapVoteStepListRelationFilter + readyAcceptances?: MatchReadyListRelationFilter } export type UserOrderByWithRelationInput = { @@ -19050,6 +20265,7 @@ export namespace Prisma { createdSchedules?: ScheduleOrderByRelationAggregateInput confirmedSchedules?: ScheduleOrderByRelationAggregateInput mapVoteChoices?: MapVoteStepOrderByRelationAggregateInput + readyAcceptances?: MatchReadyOrderByRelationAggregateInput } export type UserWhereUniqueInput = Prisma.AtLeast<{ @@ -19082,6 +20298,7 @@ export namespace Prisma { createdSchedules?: ScheduleListRelationFilter confirmedSchedules?: ScheduleListRelationFilter mapVoteChoices?: MapVoteStepListRelationFilter + readyAcceptances?: MatchReadyListRelationFilter }, "steamId"> export type UserOrderByWithAggregationInput = { @@ -19378,6 +20595,7 @@ export namespace Prisma { rankUpdates?: RankHistoryListRelationFilter mapVote?: XOR | null schedule?: XOR | null + readyAcceptances?: MatchReadyListRelationFilter } export type MatchOrderByWithRelationInput = { @@ -19409,6 +20627,7 @@ export namespace Prisma { rankUpdates?: RankHistoryOrderByRelationAggregateInput mapVote?: MapVoteOrderByWithRelationInput schedule?: ScheduleOrderByWithRelationInput + readyAcceptances?: MatchReadyOrderByRelationAggregateInput } export type MatchWhereUniqueInput = Prisma.AtLeast<{ @@ -19443,6 +20662,7 @@ export namespace Prisma { rankUpdates?: RankHistoryListRelationFilter mapVote?: XOR | null schedule?: XOR | null + readyAcceptances?: MatchReadyListRelationFilter }, "id"> export type MatchOrderByWithAggregationInput = { @@ -20247,6 +21467,55 @@ export namespace Prisma { chosenBy?: StringNullableWithAggregatesFilter<"MapVoteStep"> | string | null } + export type MatchReadyWhereInput = { + AND?: MatchReadyWhereInput | MatchReadyWhereInput[] + OR?: MatchReadyWhereInput[] + NOT?: MatchReadyWhereInput | MatchReadyWhereInput[] + matchId?: StringFilter<"MatchReady"> | string + steamId?: StringFilter<"MatchReady"> | string + acceptedAt?: DateTimeFilter<"MatchReady"> | Date | string + match?: XOR + user?: XOR + } + + export type MatchReadyOrderByWithRelationInput = { + matchId?: SortOrder + steamId?: SortOrder + acceptedAt?: SortOrder + match?: MatchOrderByWithRelationInput + user?: UserOrderByWithRelationInput + } + + export type MatchReadyWhereUniqueInput = Prisma.AtLeast<{ + matchId_steamId?: MatchReadyMatchIdSteamIdCompoundUniqueInput + AND?: MatchReadyWhereInput | MatchReadyWhereInput[] + OR?: MatchReadyWhereInput[] + NOT?: MatchReadyWhereInput | MatchReadyWhereInput[] + matchId?: StringFilter<"MatchReady"> | string + steamId?: StringFilter<"MatchReady"> | string + acceptedAt?: DateTimeFilter<"MatchReady"> | Date | string + match?: XOR + user?: XOR + }, "matchId_steamId"> + + export type MatchReadyOrderByWithAggregationInput = { + matchId?: SortOrder + steamId?: SortOrder + acceptedAt?: SortOrder + _count?: MatchReadyCountOrderByAggregateInput + _max?: MatchReadyMaxOrderByAggregateInput + _min?: MatchReadyMinOrderByAggregateInput + } + + export type MatchReadyScalarWhereWithAggregatesInput = { + AND?: MatchReadyScalarWhereWithAggregatesInput | MatchReadyScalarWhereWithAggregatesInput[] + OR?: MatchReadyScalarWhereWithAggregatesInput[] + NOT?: MatchReadyScalarWhereWithAggregatesInput | MatchReadyScalarWhereWithAggregatesInput[] + matchId?: StringWithAggregatesFilter<"MatchReady"> | string + steamId?: StringWithAggregatesFilter<"MatchReady"> | string + acceptedAt?: DateTimeWithAggregatesFilter<"MatchReady"> | Date | string + } + export type UserCreateInput = { steamId: string name?: string | null @@ -20273,6 +21542,7 @@ export namespace Prisma { createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutUserInput } export type UserUncheckedCreateInput = { @@ -20301,6 +21571,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutUserInput } export type UserUpdateInput = { @@ -20329,6 +21600,7 @@ export namespace Prisma { createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateInput = { @@ -20357,6 +21629,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutUserNestedInput } export type UserCreateManyInput = { @@ -20671,6 +21944,7 @@ export namespace Prisma { rankUpdates?: RankHistoryCreateNestedManyWithoutMatchInput mapVote?: MapVoteCreateNestedOneWithoutMatchInput schedule?: ScheduleCreateNestedOneWithoutLinkedMatchInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutMatchInput } export type MatchUncheckedCreateInput = { @@ -20700,6 +21974,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUncheckedCreateNestedManyWithoutMatchInput mapVote?: MapVoteUncheckedCreateNestedOneWithoutMatchInput schedule?: ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutMatchInput } export type MatchUpdateInput = { @@ -20729,6 +22004,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUpdateManyWithoutMatchNestedInput mapVote?: MapVoteUpdateOneWithoutMatchNestedInput schedule?: ScheduleUpdateOneWithoutLinkedMatchNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutMatchNestedInput } export type MatchUncheckedUpdateInput = { @@ -20758,6 +22034,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUncheckedUpdateManyWithoutMatchNestedInput mapVote?: MapVoteUncheckedUpdateOneWithoutMatchNestedInput schedule?: ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutMatchNestedInput } export type MatchCreateManyInput = { @@ -21623,6 +22900,46 @@ export namespace Prisma { chosenBy?: NullableStringFieldUpdateOperationsInput | string | null } + export type MatchReadyCreateInput = { + acceptedAt?: Date | string + match: MatchCreateNestedOneWithoutReadyAcceptancesInput + user: UserCreateNestedOneWithoutReadyAcceptancesInput + } + + export type MatchReadyUncheckedCreateInput = { + matchId: string + steamId: string + acceptedAt?: Date | string + } + + export type MatchReadyUpdateInput = { + acceptedAt?: DateTimeFieldUpdateOperationsInput | Date | string + match?: MatchUpdateOneRequiredWithoutReadyAcceptancesNestedInput + user?: UserUpdateOneRequiredWithoutReadyAcceptancesNestedInput + } + + export type MatchReadyUncheckedUpdateInput = { + matchId?: StringFieldUpdateOperationsInput | string + steamId?: StringFieldUpdateOperationsInput | string + acceptedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MatchReadyCreateManyInput = { + matchId: string + steamId: string + acceptedAt?: Date | string + } + + export type MatchReadyUpdateManyMutationInput = { + acceptedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MatchReadyUncheckedUpdateManyInput = { + matchId?: StringFieldUpdateOperationsInput | string + steamId?: StringFieldUpdateOperationsInput | string + acceptedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + export type StringFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> in?: string[] | ListStringFieldRefInput<$PrismaModel> @@ -21757,6 +23074,12 @@ export namespace Prisma { none?: MapVoteStepWhereInput } + export type MatchReadyListRelationFilter = { + every?: MatchReadyWhereInput + some?: MatchReadyWhereInput + none?: MatchReadyWhereInput + } + export type SortOrderInput = { sort: SortOrder nulls?: NullsOrder @@ -21798,6 +23121,10 @@ export namespace Prisma { _count?: SortOrder } + export type MatchReadyOrderByRelationAggregateInput = { + _count?: SortOrder + } + export type UserCountOrderByAggregateInput = { steamId?: SortOrder name?: SortOrder @@ -22823,6 +24150,29 @@ export namespace Prisma { _max?: NestedEnumMapVoteActionFilter<$PrismaModel> } + export type MatchReadyMatchIdSteamIdCompoundUniqueInput = { + matchId: string + steamId: string + } + + export type MatchReadyCountOrderByAggregateInput = { + matchId?: SortOrder + steamId?: SortOrder + acceptedAt?: SortOrder + } + + export type MatchReadyMaxOrderByAggregateInput = { + matchId?: SortOrder + steamId?: SortOrder + acceptedAt?: SortOrder + } + + export type MatchReadyMinOrderByAggregateInput = { + matchId?: SortOrder + steamId?: SortOrder + acceptedAt?: SortOrder + } + export type TeamCreateNestedOneWithoutMembersInput = { create?: XOR connectOrCreate?: TeamCreateOrConnectWithoutMembersInput @@ -22910,6 +24260,13 @@ export namespace Prisma { connect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] } + export type MatchReadyCreateNestedManyWithoutUserInput = { + create?: XOR | MatchReadyCreateWithoutUserInput[] | MatchReadyUncheckedCreateWithoutUserInput[] + connectOrCreate?: MatchReadyCreateOrConnectWithoutUserInput | MatchReadyCreateOrConnectWithoutUserInput[] + createMany?: MatchReadyCreateManyUserInputEnvelope + connect?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + } + export type TeamUncheckedCreateNestedOneWithoutLeaderInput = { create?: XOR connectOrCreate?: TeamCreateOrConnectWithoutLeaderInput @@ -22991,6 +24348,13 @@ export namespace Prisma { connect?: MapVoteStepWhereUniqueInput | MapVoteStepWhereUniqueInput[] } + export type MatchReadyUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | MatchReadyCreateWithoutUserInput[] | MatchReadyUncheckedCreateWithoutUserInput[] + connectOrCreate?: MatchReadyCreateOrConnectWithoutUserInput | MatchReadyCreateOrConnectWithoutUserInput[] + createMany?: MatchReadyCreateManyUserInputEnvelope + connect?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + } + export type StringFieldUpdateOperationsInput = { set?: string } @@ -23195,6 +24559,20 @@ export namespace Prisma { deleteMany?: MapVoteStepScalarWhereInput | MapVoteStepScalarWhereInput[] } + export type MatchReadyUpdateManyWithoutUserNestedInput = { + create?: XOR | MatchReadyCreateWithoutUserInput[] | MatchReadyUncheckedCreateWithoutUserInput[] + connectOrCreate?: MatchReadyCreateOrConnectWithoutUserInput | MatchReadyCreateOrConnectWithoutUserInput[] + upsert?: MatchReadyUpsertWithWhereUniqueWithoutUserInput | MatchReadyUpsertWithWhereUniqueWithoutUserInput[] + createMany?: MatchReadyCreateManyUserInputEnvelope + set?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + disconnect?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + delete?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + connect?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + update?: MatchReadyUpdateWithWhereUniqueWithoutUserInput | MatchReadyUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: MatchReadyUpdateManyWithWhereWithoutUserInput | MatchReadyUpdateManyWithWhereWithoutUserInput[] + deleteMany?: MatchReadyScalarWhereInput | MatchReadyScalarWhereInput[] + } + export type TeamUncheckedUpdateOneWithoutLeaderNestedInput = { create?: XOR connectOrCreate?: TeamCreateOrConnectWithoutLeaderInput @@ -23357,6 +24735,20 @@ export namespace Prisma { deleteMany?: MapVoteStepScalarWhereInput | MapVoteStepScalarWhereInput[] } + export type MatchReadyUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | MatchReadyCreateWithoutUserInput[] | MatchReadyUncheckedCreateWithoutUserInput[] + connectOrCreate?: MatchReadyCreateOrConnectWithoutUserInput | MatchReadyCreateOrConnectWithoutUserInput[] + upsert?: MatchReadyUpsertWithWhereUniqueWithoutUserInput | MatchReadyUpsertWithWhereUniqueWithoutUserInput[] + createMany?: MatchReadyCreateManyUserInputEnvelope + set?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + disconnect?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + delete?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + connect?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + update?: MatchReadyUpdateWithWhereUniqueWithoutUserInput | MatchReadyUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: MatchReadyUpdateManyWithWhereWithoutUserInput | MatchReadyUpdateManyWithWhereWithoutUserInput[] + deleteMany?: MatchReadyScalarWhereInput | MatchReadyScalarWhereInput[] + } + export type TeamCreateactivePlayersInput = { set: string[] } @@ -23825,6 +25217,13 @@ export namespace Prisma { connect?: ScheduleWhereUniqueInput } + export type MatchReadyCreateNestedManyWithoutMatchInput = { + create?: XOR | MatchReadyCreateWithoutMatchInput[] | MatchReadyUncheckedCreateWithoutMatchInput[] + connectOrCreate?: MatchReadyCreateOrConnectWithoutMatchInput | MatchReadyCreateOrConnectWithoutMatchInput[] + createMany?: MatchReadyCreateManyMatchInputEnvelope + connect?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + } + export type UserUncheckedCreateNestedManyWithoutMatchesAsTeamAInput = { create?: XOR | UserCreateWithoutMatchesAsTeamAInput[] | UserUncheckedCreateWithoutMatchesAsTeamAInput[] connectOrCreate?: UserCreateOrConnectWithoutMatchesAsTeamAInput | UserCreateOrConnectWithoutMatchesAsTeamAInput[] @@ -23869,6 +25268,13 @@ export namespace Prisma { connect?: ScheduleWhereUniqueInput } + export type MatchReadyUncheckedCreateNestedManyWithoutMatchInput = { + create?: XOR | MatchReadyCreateWithoutMatchInput[] | MatchReadyUncheckedCreateWithoutMatchInput[] + connectOrCreate?: MatchReadyCreateOrConnectWithoutMatchInput | MatchReadyCreateOrConnectWithoutMatchInput[] + createMany?: MatchReadyCreateManyMatchInputEnvelope + connect?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + } + export type IntFieldUpdateOperationsInput = { set?: number increment?: number @@ -23981,6 +25387,20 @@ export namespace Prisma { update?: XOR, ScheduleUncheckedUpdateWithoutLinkedMatchInput> } + export type MatchReadyUpdateManyWithoutMatchNestedInput = { + create?: XOR | MatchReadyCreateWithoutMatchInput[] | MatchReadyUncheckedCreateWithoutMatchInput[] + connectOrCreate?: MatchReadyCreateOrConnectWithoutMatchInput | MatchReadyCreateOrConnectWithoutMatchInput[] + upsert?: MatchReadyUpsertWithWhereUniqueWithoutMatchInput | MatchReadyUpsertWithWhereUniqueWithoutMatchInput[] + createMany?: MatchReadyCreateManyMatchInputEnvelope + set?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + disconnect?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + delete?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + connect?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + update?: MatchReadyUpdateWithWhereUniqueWithoutMatchInput | MatchReadyUpdateWithWhereUniqueWithoutMatchInput[] + updateMany?: MatchReadyUpdateManyWithWhereWithoutMatchInput | MatchReadyUpdateManyWithWhereWithoutMatchInput[] + deleteMany?: MatchReadyScalarWhereInput | MatchReadyScalarWhereInput[] + } + export type UserUncheckedUpdateManyWithoutMatchesAsTeamANestedInput = { create?: XOR | UserCreateWithoutMatchesAsTeamAInput[] | UserUncheckedCreateWithoutMatchesAsTeamAInput[] connectOrCreate?: UserCreateOrConnectWithoutMatchesAsTeamAInput | UserCreateOrConnectWithoutMatchesAsTeamAInput[] @@ -24065,6 +25485,20 @@ export namespace Prisma { update?: XOR, ScheduleUncheckedUpdateWithoutLinkedMatchInput> } + export type MatchReadyUncheckedUpdateManyWithoutMatchNestedInput = { + create?: XOR | MatchReadyCreateWithoutMatchInput[] | MatchReadyUncheckedCreateWithoutMatchInput[] + connectOrCreate?: MatchReadyCreateOrConnectWithoutMatchInput | MatchReadyCreateOrConnectWithoutMatchInput[] + upsert?: MatchReadyUpsertWithWhereUniqueWithoutMatchInput | MatchReadyUpsertWithWhereUniqueWithoutMatchInput[] + createMany?: MatchReadyCreateManyMatchInputEnvelope + set?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + disconnect?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + delete?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + connect?: MatchReadyWhereUniqueInput | MatchReadyWhereUniqueInput[] + update?: MatchReadyUpdateWithWhereUniqueWithoutMatchInput | MatchReadyUpdateWithWhereUniqueWithoutMatchInput[] + updateMany?: MatchReadyUpdateManyWithWhereWithoutMatchInput | MatchReadyUpdateManyWithWhereWithoutMatchInput[] + deleteMany?: MatchReadyScalarWhereInput | MatchReadyScalarWhereInput[] + } + export type TeamCreateNestedOneWithoutMatchPlayersInput = { create?: XOR connectOrCreate?: TeamCreateOrConnectWithoutMatchPlayersInput @@ -24440,6 +25874,34 @@ export namespace Prisma { update?: XOR, MapVoteUncheckedUpdateWithoutStepsInput> } + export type MatchCreateNestedOneWithoutReadyAcceptancesInput = { + create?: XOR + connectOrCreate?: MatchCreateOrConnectWithoutReadyAcceptancesInput + connect?: MatchWhereUniqueInput + } + + export type UserCreateNestedOneWithoutReadyAcceptancesInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutReadyAcceptancesInput + connect?: UserWhereUniqueInput + } + + export type MatchUpdateOneRequiredWithoutReadyAcceptancesNestedInput = { + create?: XOR + connectOrCreate?: MatchCreateOrConnectWithoutReadyAcceptancesInput + upsert?: MatchUpsertWithoutReadyAcceptancesInput + connect?: MatchWhereUniqueInput + update?: XOR, MatchUncheckedUpdateWithoutReadyAcceptancesInput> + } + + export type UserUpdateOneRequiredWithoutReadyAcceptancesNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutReadyAcceptancesInput + upsert?: UserUpsertWithoutReadyAcceptancesInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutReadyAcceptancesInput> + } + export type NestedStringFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> in?: string[] | ListStringFieldRefInput<$PrismaModel> @@ -24862,6 +26324,7 @@ export namespace Prisma { rankUpdates?: RankHistoryCreateNestedManyWithoutMatchInput mapVote?: MapVoteCreateNestedOneWithoutMatchInput schedule?: ScheduleCreateNestedOneWithoutLinkedMatchInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutMatchInput } export type MatchUncheckedCreateWithoutTeamAUsersInput = { @@ -24890,6 +26353,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUncheckedCreateNestedManyWithoutMatchInput mapVote?: MapVoteUncheckedCreateNestedOneWithoutMatchInput schedule?: ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutMatchInput } export type MatchCreateOrConnectWithoutTeamAUsersInput = { @@ -24923,6 +26387,7 @@ export namespace Prisma { rankUpdates?: RankHistoryCreateNestedManyWithoutMatchInput mapVote?: MapVoteCreateNestedOneWithoutMatchInput schedule?: ScheduleCreateNestedOneWithoutLinkedMatchInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutMatchInput } export type MatchUncheckedCreateWithoutTeamBUsersInput = { @@ -24951,6 +26416,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUncheckedCreateNestedManyWithoutMatchInput mapVote?: MapVoteUncheckedCreateNestedOneWithoutMatchInput schedule?: ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutMatchInput } export type MatchCreateOrConnectWithoutTeamBUsersInput = { @@ -25238,6 +26704,26 @@ export namespace Prisma { skipDuplicates?: boolean } + export type MatchReadyCreateWithoutUserInput = { + acceptedAt?: Date | string + match: MatchCreateNestedOneWithoutReadyAcceptancesInput + } + + export type MatchReadyUncheckedCreateWithoutUserInput = { + matchId: string + acceptedAt?: Date | string + } + + export type MatchReadyCreateOrConnectWithoutUserInput = { + where: MatchReadyWhereUniqueInput + create: XOR + } + + export type MatchReadyCreateManyUserInputEnvelope = { + data: MatchReadyCreateManyUserInput | MatchReadyCreateManyUserInput[] + skipDuplicates?: boolean + } + export type TeamUpsertWithoutMembersInput = { update: XOR create: XOR @@ -25640,6 +27126,31 @@ export namespace Prisma { chosenBy?: StringNullableFilter<"MapVoteStep"> | string | null } + export type MatchReadyUpsertWithWhereUniqueWithoutUserInput = { + where: MatchReadyWhereUniqueInput + update: XOR + create: XOR + } + + export type MatchReadyUpdateWithWhereUniqueWithoutUserInput = { + where: MatchReadyWhereUniqueInput + data: XOR + } + + export type MatchReadyUpdateManyWithWhereWithoutUserInput = { + where: MatchReadyScalarWhereInput + data: XOR + } + + export type MatchReadyScalarWhereInput = { + AND?: MatchReadyScalarWhereInput | MatchReadyScalarWhereInput[] + OR?: MatchReadyScalarWhereInput[] + NOT?: MatchReadyScalarWhereInput | MatchReadyScalarWhereInput[] + matchId?: StringFilter<"MatchReady"> | string + steamId?: StringFilter<"MatchReady"> | string + acceptedAt?: DateTimeFilter<"MatchReady"> | Date | string + } + export type UserCreateWithoutLedTeamInput = { steamId: string name?: string | null @@ -25665,6 +27176,7 @@ export namespace Prisma { createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutLedTeamInput = { @@ -25692,6 +27204,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutLedTeamInput = { @@ -25724,6 +27237,7 @@ export namespace Prisma { createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutTeamInput = { @@ -25751,6 +27265,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutTeamInput = { @@ -25839,6 +27354,7 @@ export namespace Prisma { rankUpdates?: RankHistoryCreateNestedManyWithoutMatchInput mapVote?: MapVoteCreateNestedOneWithoutMatchInput schedule?: ScheduleCreateNestedOneWithoutLinkedMatchInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutMatchInput } export type MatchUncheckedCreateWithoutTeamAInput = { @@ -25867,6 +27383,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUncheckedCreateNestedManyWithoutMatchInput mapVote?: MapVoteUncheckedCreateNestedOneWithoutMatchInput schedule?: ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutMatchInput } export type MatchCreateOrConnectWithoutTeamAInput = { @@ -25905,6 +27422,7 @@ export namespace Prisma { rankUpdates?: RankHistoryCreateNestedManyWithoutMatchInput mapVote?: MapVoteCreateNestedOneWithoutMatchInput schedule?: ScheduleCreateNestedOneWithoutLinkedMatchInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutMatchInput } export type MatchUncheckedCreateWithoutTeamBInput = { @@ -25933,6 +27451,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUncheckedCreateNestedManyWithoutMatchInput mapVote?: MapVoteUncheckedCreateNestedOneWithoutMatchInput schedule?: ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutMatchInput } export type MatchCreateOrConnectWithoutTeamBInput = { @@ -26091,6 +27610,7 @@ export namespace Prisma { createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutLedTeamInput = { @@ -26118,6 +27638,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutUserNestedInput } export type UserUpsertWithWhereUniqueWithoutTeamInput = { @@ -26292,6 +27813,7 @@ export namespace Prisma { createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutInvitesInput = { @@ -26319,6 +27841,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutInvitesInput = { @@ -26401,6 +27924,7 @@ export namespace Prisma { createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutInvitesInput = { @@ -26428,6 +27952,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutUserNestedInput } export type TeamUpsertWithoutInvitesInput = { @@ -26500,6 +28025,7 @@ export namespace Prisma { createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutNotificationsInput = { @@ -26527,6 +28053,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutNotificationsInput = { @@ -26570,6 +28097,7 @@ export namespace Prisma { createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutNotificationsInput = { @@ -26597,6 +28125,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutUserNestedInput } export type TeamCreateWithoutMatchesAsTeamAInput = { @@ -26702,6 +28231,7 @@ export namespace Prisma { createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutMatchesAsTeamAInput = { @@ -26729,6 +28259,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutMatchesAsTeamAInput = { @@ -26761,6 +28292,7 @@ export namespace Prisma { createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutMatchesAsTeamBInput = { @@ -26788,6 +28320,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutMatchesAsTeamBInput = { @@ -26944,6 +28477,26 @@ export namespace Prisma { create: XOR } + export type MatchReadyCreateWithoutMatchInput = { + acceptedAt?: Date | string + user: UserCreateNestedOneWithoutReadyAcceptancesInput + } + + export type MatchReadyUncheckedCreateWithoutMatchInput = { + steamId: string + acceptedAt?: Date | string + } + + export type MatchReadyCreateOrConnectWithoutMatchInput = { + where: MatchReadyWhereUniqueInput + create: XOR + } + + export type MatchReadyCreateManyMatchInputEnvelope = { + data: MatchReadyCreateManyMatchInput | MatchReadyCreateManyMatchInput[] + skipDuplicates?: boolean + } + export type TeamUpsertWithoutMatchesAsTeamAInput = { update: XOR create: XOR @@ -27209,6 +28762,22 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } + export type MatchReadyUpsertWithWhereUniqueWithoutMatchInput = { + where: MatchReadyWhereUniqueInput + update: XOR + create: XOR + } + + export type MatchReadyUpdateWithWhereUniqueWithoutMatchInput = { + where: MatchReadyWhereUniqueInput + data: XOR + } + + export type MatchReadyUpdateManyWithWhereWithoutMatchInput = { + where: MatchReadyScalarWhereInput + data: XOR + } + export type TeamCreateWithoutMatchPlayersInput = { id?: string name: string @@ -27274,6 +28843,7 @@ export namespace Prisma { rankUpdates?: RankHistoryCreateNestedManyWithoutMatchInput mapVote?: MapVoteCreateNestedOneWithoutMatchInput schedule?: ScheduleCreateNestedOneWithoutLinkedMatchInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutMatchInput } export type MatchUncheckedCreateWithoutPlayersInput = { @@ -27302,6 +28872,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUncheckedCreateNestedManyWithoutMatchInput mapVote?: MapVoteUncheckedCreateNestedOneWithoutMatchInput schedule?: ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutMatchInput } export type MatchCreateOrConnectWithoutPlayersInput = { @@ -27334,6 +28905,7 @@ export namespace Prisma { createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutMatchPlayersInput = { @@ -27361,6 +28933,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutMatchPlayersInput = { @@ -27519,6 +29092,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUpdateManyWithoutMatchNestedInput mapVote?: MapVoteUpdateOneWithoutMatchNestedInput schedule?: ScheduleUpdateOneWithoutLinkedMatchNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutMatchNestedInput } export type MatchUncheckedUpdateWithoutPlayersInput = { @@ -27547,6 +29121,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUncheckedUpdateManyWithoutMatchNestedInput mapVote?: MapVoteUncheckedUpdateOneWithoutMatchNestedInput schedule?: ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutMatchNestedInput } export type UserUpsertWithoutMatchPlayersInput = { @@ -27585,6 +29160,7 @@ export namespace Prisma { createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutMatchPlayersInput = { @@ -27612,6 +29188,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutUserNestedInput } export type PlayerStatsUpsertWithoutMatchPlayerInput = { @@ -27762,6 +29339,7 @@ export namespace Prisma { createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutRankHistoryInput = { @@ -27789,6 +29367,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutRankHistoryInput = { @@ -27822,6 +29401,7 @@ export namespace Prisma { players?: MatchPlayerCreateNestedManyWithoutMatchInput mapVote?: MapVoteCreateNestedOneWithoutMatchInput schedule?: ScheduleCreateNestedOneWithoutLinkedMatchInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutMatchInput } export type MatchUncheckedCreateWithoutRankUpdatesInput = { @@ -27850,6 +29430,7 @@ export namespace Prisma { players?: MatchPlayerUncheckedCreateNestedManyWithoutMatchInput mapVote?: MapVoteUncheckedCreateNestedOneWithoutMatchInput schedule?: ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutMatchInput } export type MatchCreateOrConnectWithoutRankUpdatesInput = { @@ -27893,6 +29474,7 @@ export namespace Prisma { createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutRankHistoryInput = { @@ -27920,6 +29502,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutUserNestedInput } export type MatchUpsertWithoutRankUpdatesInput = { @@ -27959,6 +29542,7 @@ export namespace Prisma { players?: MatchPlayerUpdateManyWithoutMatchNestedInput mapVote?: MapVoteUpdateOneWithoutMatchNestedInput schedule?: ScheduleUpdateOneWithoutLinkedMatchNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutMatchNestedInput } export type MatchUncheckedUpdateWithoutRankUpdatesInput = { @@ -27987,6 +29571,7 @@ export namespace Prisma { players?: MatchPlayerUncheckedUpdateManyWithoutMatchNestedInput mapVote?: MapVoteUncheckedUpdateOneWithoutMatchNestedInput schedule?: ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutMatchNestedInput } export type TeamCreateWithoutSchedulesAsTeamAInput = { @@ -28092,6 +29677,7 @@ export namespace Prisma { demoFiles?: DemoFileCreateNestedManyWithoutUserInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutCreatedSchedulesInput = { @@ -28119,6 +29705,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedCreateNestedManyWithoutUserInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutCreatedSchedulesInput = { @@ -28151,6 +29738,7 @@ export namespace Prisma { demoFiles?: DemoFileCreateNestedManyWithoutUserInput createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutConfirmedSchedulesInput = { @@ -28178,6 +29766,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedCreateNestedManyWithoutUserInput createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutConfirmedSchedulesInput = { @@ -28211,6 +29800,7 @@ export namespace Prisma { players?: MatchPlayerCreateNestedManyWithoutMatchInput rankUpdates?: RankHistoryCreateNestedManyWithoutMatchInput mapVote?: MapVoteCreateNestedOneWithoutMatchInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutMatchInput } export type MatchUncheckedCreateWithoutScheduleInput = { @@ -28239,6 +29829,7 @@ export namespace Prisma { players?: MatchPlayerUncheckedCreateNestedManyWithoutMatchInput rankUpdates?: RankHistoryUncheckedCreateNestedManyWithoutMatchInput mapVote?: MapVoteUncheckedCreateNestedOneWithoutMatchInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutMatchInput } export type MatchCreateOrConnectWithoutScheduleInput = { @@ -28372,6 +29963,7 @@ export namespace Prisma { demoFiles?: DemoFileUpdateManyWithoutUserNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutCreatedSchedulesInput = { @@ -28399,6 +29991,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedUpdateManyWithoutUserNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutUserNestedInput } export type UserUpsertWithoutConfirmedSchedulesInput = { @@ -28437,6 +30030,7 @@ export namespace Prisma { demoFiles?: DemoFileUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutConfirmedSchedulesInput = { @@ -28464,6 +30058,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutUserNestedInput } export type MatchUpsertWithoutScheduleInput = { @@ -28503,6 +30098,7 @@ export namespace Prisma { players?: MatchPlayerUpdateManyWithoutMatchNestedInput rankUpdates?: RankHistoryUpdateManyWithoutMatchNestedInput mapVote?: MapVoteUpdateOneWithoutMatchNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutMatchNestedInput } export type MatchUncheckedUpdateWithoutScheduleInput = { @@ -28531,6 +30127,7 @@ export namespace Prisma { players?: MatchPlayerUncheckedUpdateManyWithoutMatchNestedInput rankUpdates?: RankHistoryUncheckedUpdateManyWithoutMatchNestedInput mapVote?: MapVoteUncheckedUpdateOneWithoutMatchNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutMatchNestedInput } export type MatchCreateWithoutDemoFileInput = { @@ -28559,6 +30156,7 @@ export namespace Prisma { rankUpdates?: RankHistoryCreateNestedManyWithoutMatchInput mapVote?: MapVoteCreateNestedOneWithoutMatchInput schedule?: ScheduleCreateNestedOneWithoutLinkedMatchInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutMatchInput } export type MatchUncheckedCreateWithoutDemoFileInput = { @@ -28587,6 +30185,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUncheckedCreateNestedManyWithoutMatchInput mapVote?: MapVoteUncheckedCreateNestedOneWithoutMatchInput schedule?: ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutMatchInput } export type MatchCreateOrConnectWithoutDemoFileInput = { @@ -28619,6 +30218,7 @@ export namespace Prisma { createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutDemoFilesInput = { @@ -28646,6 +30246,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutDemoFilesInput = { @@ -28690,6 +30291,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUpdateManyWithoutMatchNestedInput mapVote?: MapVoteUpdateOneWithoutMatchNestedInput schedule?: ScheduleUpdateOneWithoutLinkedMatchNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutMatchNestedInput } export type MatchUncheckedUpdateWithoutDemoFileInput = { @@ -28718,6 +30320,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUncheckedUpdateManyWithoutMatchNestedInput mapVote?: MapVoteUncheckedUpdateOneWithoutMatchNestedInput schedule?: ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutMatchNestedInput } export type UserUpsertWithoutDemoFilesInput = { @@ -28756,6 +30359,7 @@ export namespace Prisma { createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutDemoFilesInput = { @@ -28783,6 +30387,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutUserNestedInput } export type UserCreateWithoutServerRequestsInput = { @@ -28810,6 +30415,7 @@ export namespace Prisma { createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutServerRequestsInput = { @@ -28837,6 +30443,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutServerRequestsInput = { @@ -28880,6 +30487,7 @@ export namespace Prisma { createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutServerRequestsInput = { @@ -28907,6 +30515,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutUserNestedInput } export type MatchCreateWithoutMapVoteInput = { @@ -28935,6 +30544,7 @@ export namespace Prisma { players?: MatchPlayerCreateNestedManyWithoutMatchInput rankUpdates?: RankHistoryCreateNestedManyWithoutMatchInput schedule?: ScheduleCreateNestedOneWithoutLinkedMatchInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutMatchInput } export type MatchUncheckedCreateWithoutMapVoteInput = { @@ -28963,6 +30573,7 @@ export namespace Prisma { players?: MatchPlayerUncheckedCreateNestedManyWithoutMatchInput rankUpdates?: RankHistoryUncheckedCreateNestedManyWithoutMatchInput schedule?: ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutMatchInput } export type MatchCreateOrConnectWithoutMapVoteInput = { @@ -29037,6 +30648,7 @@ export namespace Prisma { players?: MatchPlayerUpdateManyWithoutMatchNestedInput rankUpdates?: RankHistoryUpdateManyWithoutMatchNestedInput schedule?: ScheduleUpdateOneWithoutLinkedMatchNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutMatchNestedInput } export type MatchUncheckedUpdateWithoutMapVoteInput = { @@ -29065,6 +30677,7 @@ export namespace Prisma { players?: MatchPlayerUncheckedUpdateManyWithoutMatchNestedInput rankUpdates?: RankHistoryUncheckedUpdateManyWithoutMatchNestedInput schedule?: ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutMatchNestedInput } export type MapVoteStepUpsertWithWhereUniqueWithoutVoteInput = { @@ -29147,6 +30760,7 @@ export namespace Prisma { demoFiles?: DemoFileCreateNestedManyWithoutUserInput createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput + readyAcceptances?: MatchReadyCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutMapVoteChoicesInput = { @@ -29174,6 +30788,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedCreateNestedManyWithoutUserInput createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput + readyAcceptances?: MatchReadyUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutMapVoteChoicesInput = { @@ -29297,6 +30912,7 @@ export namespace Prisma { demoFiles?: DemoFileUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutMapVoteChoicesInput = { @@ -29324,6 +30940,7 @@ export namespace Prisma { demoFiles?: DemoFileUncheckedUpdateManyWithoutUserNestedInput createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutUserNestedInput } export type MapVoteUpsertWithoutStepsInput = { @@ -29367,6 +30984,266 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } + export type MatchCreateWithoutReadyAcceptancesInput = { + id?: string + title: string + matchType?: string + map?: string | null + description?: string | null + scoreA?: number | null + scoreB?: number | null + filePath?: string | null + demoDate?: Date | string | null + demoData?: NullableJsonNullValueInput | InputJsonValue + roundCount?: number | null + roundHistory?: NullableJsonNullValueInput | InputJsonValue + winnerTeam?: string | null + bestOf?: number + matchDate?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + teamA?: TeamCreateNestedOneWithoutMatchesAsTeamAInput + teamB?: TeamCreateNestedOneWithoutMatchesAsTeamBInput + teamAUsers?: UserCreateNestedManyWithoutMatchesAsTeamAInput + teamBUsers?: UserCreateNestedManyWithoutMatchesAsTeamBInput + demoFile?: DemoFileCreateNestedOneWithoutMatchInput + players?: MatchPlayerCreateNestedManyWithoutMatchInput + rankUpdates?: RankHistoryCreateNestedManyWithoutMatchInput + mapVote?: MapVoteCreateNestedOneWithoutMatchInput + schedule?: ScheduleCreateNestedOneWithoutLinkedMatchInput + } + + export type MatchUncheckedCreateWithoutReadyAcceptancesInput = { + id?: string + title: string + matchType?: string + map?: string | null + description?: string | null + scoreA?: number | null + scoreB?: number | null + teamAId?: string | null + teamBId?: string | null + filePath?: string | null + demoDate?: Date | string | null + demoData?: NullableJsonNullValueInput | InputJsonValue + roundCount?: number | null + roundHistory?: NullableJsonNullValueInput | InputJsonValue + winnerTeam?: string | null + bestOf?: number + matchDate?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + teamAUsers?: UserUncheckedCreateNestedManyWithoutMatchesAsTeamAInput + teamBUsers?: UserUncheckedCreateNestedManyWithoutMatchesAsTeamBInput + demoFile?: DemoFileUncheckedCreateNestedOneWithoutMatchInput + players?: MatchPlayerUncheckedCreateNestedManyWithoutMatchInput + rankUpdates?: RankHistoryUncheckedCreateNestedManyWithoutMatchInput + mapVote?: MapVoteUncheckedCreateNestedOneWithoutMatchInput + schedule?: ScheduleUncheckedCreateNestedOneWithoutLinkedMatchInput + } + + export type MatchCreateOrConnectWithoutReadyAcceptancesInput = { + where: MatchWhereUniqueInput + create: XOR + } + + export type UserCreateWithoutReadyAcceptancesInput = { + steamId: string + name?: string | null + avatar?: string | null + location?: string | null + isAdmin?: boolean + premierRank?: number | null + authCode?: string | null + lastKnownShareCode?: string | null + lastKnownShareCodeDate?: Date | string | null + createdAt?: Date | string + status?: $Enums.UserStatus + lastActiveAt?: Date | string | null + team?: TeamCreateNestedOneWithoutMembersInput + ledTeam?: TeamCreateNestedOneWithoutLeaderInput + matchesAsTeamA?: MatchCreateNestedManyWithoutTeamAUsersInput + matchesAsTeamB?: MatchCreateNestedManyWithoutTeamBUsersInput + invites?: TeamInviteCreateNestedManyWithoutUserInput + notifications?: NotificationCreateNestedManyWithoutUserInput + matchPlayers?: MatchPlayerCreateNestedManyWithoutUserInput + serverRequests?: ServerRequestCreateNestedManyWithoutUserInput + rankHistory?: RankHistoryCreateNestedManyWithoutUserInput + demoFiles?: DemoFileCreateNestedManyWithoutUserInput + createdSchedules?: ScheduleCreateNestedManyWithoutCreatedByInput + confirmedSchedules?: ScheduleCreateNestedManyWithoutConfirmedByInput + mapVoteChoices?: MapVoteStepCreateNestedManyWithoutChooserInput + } + + export type UserUncheckedCreateWithoutReadyAcceptancesInput = { + steamId: string + name?: string | null + avatar?: string | null + location?: string | null + isAdmin?: boolean + teamId?: string | null + premierRank?: number | null + authCode?: string | null + lastKnownShareCode?: string | null + lastKnownShareCodeDate?: Date | string | null + createdAt?: Date | string + status?: $Enums.UserStatus + lastActiveAt?: Date | string | null + ledTeam?: TeamUncheckedCreateNestedOneWithoutLeaderInput + matchesAsTeamA?: MatchUncheckedCreateNestedManyWithoutTeamAUsersInput + matchesAsTeamB?: MatchUncheckedCreateNestedManyWithoutTeamBUsersInput + invites?: TeamInviteUncheckedCreateNestedManyWithoutUserInput + notifications?: NotificationUncheckedCreateNestedManyWithoutUserInput + matchPlayers?: MatchPlayerUncheckedCreateNestedManyWithoutUserInput + serverRequests?: ServerRequestUncheckedCreateNestedManyWithoutUserInput + rankHistory?: RankHistoryUncheckedCreateNestedManyWithoutUserInput + demoFiles?: DemoFileUncheckedCreateNestedManyWithoutUserInput + createdSchedules?: ScheduleUncheckedCreateNestedManyWithoutCreatedByInput + confirmedSchedules?: ScheduleUncheckedCreateNestedManyWithoutConfirmedByInput + mapVoteChoices?: MapVoteStepUncheckedCreateNestedManyWithoutChooserInput + } + + export type UserCreateOrConnectWithoutReadyAcceptancesInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type MatchUpsertWithoutReadyAcceptancesInput = { + update: XOR + create: XOR + where?: MatchWhereInput + } + + export type MatchUpdateToOneWithWhereWithoutReadyAcceptancesInput = { + where?: MatchWhereInput + data: XOR + } + + export type MatchUpdateWithoutReadyAcceptancesInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + matchType?: StringFieldUpdateOperationsInput | string + map?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + scoreA?: NullableIntFieldUpdateOperationsInput | number | null + scoreB?: NullableIntFieldUpdateOperationsInput | number | null + filePath?: NullableStringFieldUpdateOperationsInput | string | null + demoDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + demoData?: NullableJsonNullValueInput | InputJsonValue + roundCount?: NullableIntFieldUpdateOperationsInput | number | null + roundHistory?: NullableJsonNullValueInput | InputJsonValue + winnerTeam?: NullableStringFieldUpdateOperationsInput | string | null + bestOf?: IntFieldUpdateOperationsInput | number + matchDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + teamA?: TeamUpdateOneWithoutMatchesAsTeamANestedInput + teamB?: TeamUpdateOneWithoutMatchesAsTeamBNestedInput + teamAUsers?: UserUpdateManyWithoutMatchesAsTeamANestedInput + teamBUsers?: UserUpdateManyWithoutMatchesAsTeamBNestedInput + demoFile?: DemoFileUpdateOneWithoutMatchNestedInput + players?: MatchPlayerUpdateManyWithoutMatchNestedInput + rankUpdates?: RankHistoryUpdateManyWithoutMatchNestedInput + mapVote?: MapVoteUpdateOneWithoutMatchNestedInput + schedule?: ScheduleUpdateOneWithoutLinkedMatchNestedInput + } + + export type MatchUncheckedUpdateWithoutReadyAcceptancesInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + matchType?: StringFieldUpdateOperationsInput | string + map?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + scoreA?: NullableIntFieldUpdateOperationsInput | number | null + scoreB?: NullableIntFieldUpdateOperationsInput | number | null + teamAId?: NullableStringFieldUpdateOperationsInput | string | null + teamBId?: NullableStringFieldUpdateOperationsInput | string | null + filePath?: NullableStringFieldUpdateOperationsInput | string | null + demoDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + demoData?: NullableJsonNullValueInput | InputJsonValue + roundCount?: NullableIntFieldUpdateOperationsInput | number | null + roundHistory?: NullableJsonNullValueInput | InputJsonValue + winnerTeam?: NullableStringFieldUpdateOperationsInput | string | null + bestOf?: IntFieldUpdateOperationsInput | number + matchDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + teamAUsers?: UserUncheckedUpdateManyWithoutMatchesAsTeamANestedInput + teamBUsers?: UserUncheckedUpdateManyWithoutMatchesAsTeamBNestedInput + demoFile?: DemoFileUncheckedUpdateOneWithoutMatchNestedInput + players?: MatchPlayerUncheckedUpdateManyWithoutMatchNestedInput + rankUpdates?: RankHistoryUncheckedUpdateManyWithoutMatchNestedInput + mapVote?: MapVoteUncheckedUpdateOneWithoutMatchNestedInput + schedule?: ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput + } + + export type UserUpsertWithoutReadyAcceptancesInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutReadyAcceptancesInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutReadyAcceptancesInput = { + steamId?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + avatar?: NullableStringFieldUpdateOperationsInput | string | null + location?: NullableStringFieldUpdateOperationsInput | string | null + isAdmin?: BoolFieldUpdateOperationsInput | boolean + premierRank?: NullableIntFieldUpdateOperationsInput | number | null + authCode?: NullableStringFieldUpdateOperationsInput | string | null + lastKnownShareCode?: NullableStringFieldUpdateOperationsInput | string | null + lastKnownShareCodeDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus + lastActiveAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + team?: TeamUpdateOneWithoutMembersNestedInput + ledTeam?: TeamUpdateOneWithoutLeaderNestedInput + matchesAsTeamA?: MatchUpdateManyWithoutTeamAUsersNestedInput + matchesAsTeamB?: MatchUpdateManyWithoutTeamBUsersNestedInput + invites?: TeamInviteUpdateManyWithoutUserNestedInput + notifications?: NotificationUpdateManyWithoutUserNestedInput + matchPlayers?: MatchPlayerUpdateManyWithoutUserNestedInput + serverRequests?: ServerRequestUpdateManyWithoutUserNestedInput + rankHistory?: RankHistoryUpdateManyWithoutUserNestedInput + demoFiles?: DemoFileUpdateManyWithoutUserNestedInput + createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput + confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput + mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput + } + + export type UserUncheckedUpdateWithoutReadyAcceptancesInput = { + steamId?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + avatar?: NullableStringFieldUpdateOperationsInput | string | null + location?: NullableStringFieldUpdateOperationsInput | string | null + isAdmin?: BoolFieldUpdateOperationsInput | boolean + teamId?: NullableStringFieldUpdateOperationsInput | string | null + premierRank?: NullableIntFieldUpdateOperationsInput | number | null + authCode?: NullableStringFieldUpdateOperationsInput | string | null + lastKnownShareCode?: NullableStringFieldUpdateOperationsInput | string | null + lastKnownShareCodeDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus + lastActiveAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + ledTeam?: TeamUncheckedUpdateOneWithoutLeaderNestedInput + matchesAsTeamA?: MatchUncheckedUpdateManyWithoutTeamAUsersNestedInput + matchesAsTeamB?: MatchUncheckedUpdateManyWithoutTeamBUsersNestedInput + invites?: TeamInviteUncheckedUpdateManyWithoutUserNestedInput + notifications?: NotificationUncheckedUpdateManyWithoutUserNestedInput + matchPlayers?: MatchPlayerUncheckedUpdateManyWithoutUserNestedInput + serverRequests?: ServerRequestUncheckedUpdateManyWithoutUserNestedInput + rankHistory?: RankHistoryUncheckedUpdateManyWithoutUserNestedInput + demoFiles?: DemoFileUncheckedUpdateManyWithoutUserNestedInput + createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput + confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput + mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput + } + export type TeamInviteCreateManyUserInput = { id?: string teamId: string @@ -29461,6 +31338,11 @@ export namespace Prisma { chosenAt?: Date | string | null } + export type MatchReadyCreateManyUserInput = { + matchId: string + acceptedAt?: Date | string + } + export type MatchUpdateWithoutTeamAUsersInput = { id?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string @@ -29487,6 +31369,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUpdateManyWithoutMatchNestedInput mapVote?: MapVoteUpdateOneWithoutMatchNestedInput schedule?: ScheduleUpdateOneWithoutLinkedMatchNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutMatchNestedInput } export type MatchUncheckedUpdateWithoutTeamAUsersInput = { @@ -29515,6 +31398,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUncheckedUpdateManyWithoutMatchNestedInput mapVote?: MapVoteUncheckedUpdateOneWithoutMatchNestedInput schedule?: ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutMatchNestedInput } export type MatchUncheckedUpdateManyWithoutTeamAUsersInput = { @@ -29565,6 +31449,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUpdateManyWithoutMatchNestedInput mapVote?: MapVoteUpdateOneWithoutMatchNestedInput schedule?: ScheduleUpdateOneWithoutLinkedMatchNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutMatchNestedInput } export type MatchUncheckedUpdateWithoutTeamBUsersInput = { @@ -29593,6 +31478,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUncheckedUpdateManyWithoutMatchNestedInput mapVote?: MapVoteUncheckedUpdateOneWithoutMatchNestedInput schedule?: ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutMatchNestedInput } export type MatchUncheckedUpdateManyWithoutTeamBUsersInput = { @@ -29901,6 +31787,21 @@ export namespace Prisma { chosenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null } + export type MatchReadyUpdateWithoutUserInput = { + acceptedAt?: DateTimeFieldUpdateOperationsInput | Date | string + match?: MatchUpdateOneRequiredWithoutReadyAcceptancesNestedInput + } + + export type MatchReadyUncheckedUpdateWithoutUserInput = { + matchId?: StringFieldUpdateOperationsInput | string + acceptedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MatchReadyUncheckedUpdateManyWithoutUserInput = { + matchId?: StringFieldUpdateOperationsInput | string + acceptedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + export type UserCreateManyTeamInput = { steamId: string name?: string | null @@ -30037,6 +31938,7 @@ export namespace Prisma { createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutTeamInput = { @@ -30064,6 +31966,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateManyWithoutTeamInput = { @@ -30151,6 +32054,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUpdateManyWithoutMatchNestedInput mapVote?: MapVoteUpdateOneWithoutMatchNestedInput schedule?: ScheduleUpdateOneWithoutLinkedMatchNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutMatchNestedInput } export type MatchUncheckedUpdateWithoutTeamAInput = { @@ -30179,6 +32083,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUncheckedUpdateManyWithoutMatchNestedInput mapVote?: MapVoteUncheckedUpdateOneWithoutMatchNestedInput schedule?: ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutMatchNestedInput } export type MatchUncheckedUpdateManyWithoutTeamAInput = { @@ -30228,6 +32133,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUpdateManyWithoutMatchNestedInput mapVote?: MapVoteUpdateOneWithoutMatchNestedInput schedule?: ScheduleUpdateOneWithoutLinkedMatchNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutMatchNestedInput } export type MatchUncheckedUpdateWithoutTeamBInput = { @@ -30256,6 +32162,7 @@ export namespace Prisma { rankUpdates?: RankHistoryUncheckedUpdateManyWithoutMatchNestedInput mapVote?: MapVoteUncheckedUpdateOneWithoutMatchNestedInput schedule?: ScheduleUncheckedUpdateOneWithoutLinkedMatchNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutMatchNestedInput } export type MatchUncheckedUpdateManyWithoutTeamBInput = { @@ -30416,6 +32323,11 @@ export namespace Prisma { createdAt?: Date | string } + export type MatchReadyCreateManyMatchInput = { + steamId: string + acceptedAt?: Date | string + } + export type UserUpdateWithoutMatchesAsTeamAInput = { steamId?: StringFieldUpdateOperationsInput | string name?: NullableStringFieldUpdateOperationsInput | string | null @@ -30441,6 +32353,7 @@ export namespace Prisma { createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutMatchesAsTeamAInput = { @@ -30468,6 +32381,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateManyWithoutMatchesAsTeamAInput = { @@ -30511,6 +32425,7 @@ export namespace Prisma { createdSchedules?: ScheduleUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutMatchesAsTeamBInput = { @@ -30538,6 +32453,7 @@ export namespace Prisma { createdSchedules?: ScheduleUncheckedUpdateManyWithoutCreatedByNestedInput confirmedSchedules?: ScheduleUncheckedUpdateManyWithoutConfirmedByNestedInput mapVoteChoices?: MapVoteStepUncheckedUpdateManyWithoutChooserNestedInput + readyAcceptances?: MatchReadyUncheckedUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateManyWithoutMatchesAsTeamBInput = { @@ -30609,6 +32525,21 @@ export namespace Prisma { createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } + export type MatchReadyUpdateWithoutMatchInput = { + acceptedAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutReadyAcceptancesNestedInput + } + + export type MatchReadyUncheckedUpdateWithoutMatchInput = { + steamId?: StringFieldUpdateOperationsInput | string + acceptedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MatchReadyUncheckedUpdateManyWithoutMatchInput = { + steamId?: StringFieldUpdateOperationsInput | string + acceptedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + export type MapVoteStepCreateManyVoteInput = { id?: string order: number diff --git a/src/generated/prisma/index.js b/src/generated/prisma/index.js index d679c94..d6397cb 100644 --- a/src/generated/prisma/index.js +++ b/src/generated/prisma/index.js @@ -35,12 +35,12 @@ exports.Prisma = Prisma exports.$Enums = {} /** - * Prisma Client JS version: 6.14.0 - * Query Engine version: 717184b7b35ea05dfa71a3236b7af656013e1e49 + * Prisma Client JS version: 6.15.0 + * Query Engine version: 85179d7826409ee107a6ba334b5e305ae3fba9fb */ Prisma.prismaVersion = { - client: "6.14.0", - engine: "717184b7b35ea05dfa71a3236b7af656013e1e49" + client: "6.15.0", + engine: "85179d7826409ee107a6ba334b5e305ae3fba9fb" } Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; @@ -277,6 +277,12 @@ exports.Prisma.MapVoteStepScalarFieldEnum = { chosenBy: 'chosenBy' }; +exports.Prisma.MatchReadyScalarFieldEnum = { + matchId: 'matchId', + steamId: 'steamId', + acceptedAt: 'acceptedAt' +}; + exports.Prisma.SortOrder = { asc: 'asc', desc: 'desc' @@ -335,7 +341,8 @@ exports.Prisma.ModelName = { DemoFile: 'DemoFile', ServerRequest: 'ServerRequest', MapVote: 'MapVote', - MapVoteStep: 'MapVoteStep' + MapVoteStep: 'MapVoteStep', + MatchReady: 'MatchReady' }; /** * Create the Client @@ -370,8 +377,8 @@ const config = { "schemaEnvPath": "../../../.env" }, "relativePath": "../../../prisma", - "clientVersion": "6.14.0", - "engineVersion": "717184b7b35ea05dfa71a3236b7af656013e1e49", + "clientVersion": "6.15.0", + "engineVersion": "85179d7826409ee107a6ba334b5e305ae3fba9fb", "datasourceNames": [ "db" ], @@ -384,8 +391,8 @@ const config = { } } }, - "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../src/generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n//\n// ──────────────────────────────────────────────\n// 🧑 Benutzer, Teams & Verwaltung\n// ──────────────────────────────────────────────\n//\n\nmodel User {\n steamId String @id\n name String?\n avatar String?\n location String?\n isAdmin Boolean @default(false)\n\n teamId String?\n team Team? @relation(\"UserTeam\", fields: [teamId], references: [id])\n ledTeam Team? @relation(\"TeamLeader\")\n\n matchesAsTeamA Match[] @relation(\"TeamAPlayers\")\n matchesAsTeamB Match[] @relation(\"TeamBPlayers\")\n\n premierRank Int?\n authCode String?\n lastKnownShareCode String?\n lastKnownShareCodeDate DateTime?\n createdAt DateTime @default(now())\n\n invites TeamInvite[] @relation(\"UserInvitations\")\n notifications Notification[]\n matchPlayers MatchPlayer[]\n serverRequests ServerRequest[] @relation(\"MatchRequests\")\n rankHistory RankHistory[] @relation(\"UserRankHistory\")\n demoFiles DemoFile[]\n\n createdSchedules Schedule[] @relation(\"CreatedSchedules\")\n confirmedSchedules Schedule[] @relation(\"ConfirmedSchedules\")\n\n mapVoteChoices MapVoteStep[] @relation(\"VoteStepChooser\")\n\n status UserStatus @default(offline) // 👈 neu\n lastActiveAt DateTime? // optional: wann zuletzt aktiv\n}\n\nenum UserStatus {\n online\n away\n offline\n}\n\nmodel Team {\n id String @id @default(uuid())\n name String @unique\n logo String?\n leaderId String? @unique\n createdAt DateTime @default(now())\n\n activePlayers String[]\n inactivePlayers String[]\n\n leader User? @relation(\"TeamLeader\", fields: [leaderId], references: [steamId])\n members User[] @relation(\"UserTeam\")\n invites TeamInvite[]\n matchPlayers MatchPlayer[]\n\n matchesAsTeamA Match[] @relation(\"MatchTeamA\")\n matchesAsTeamB Match[] @relation(\"MatchTeamB\")\n\n schedulesAsTeamA Schedule[] @relation(\"ScheduleTeamA\")\n schedulesAsTeamB Schedule[] @relation(\"ScheduleTeamB\")\n\n mapVoteSteps MapVoteStep[] @relation(\"VoteStepTeam\")\n}\n\nmodel TeamInvite {\n id String @id @default(uuid())\n steamId String\n teamId String\n type String\n createdAt DateTime @default(now())\n\n user User @relation(\"UserInvitations\", fields: [steamId], references: [steamId])\n team Team @relation(fields: [teamId], references: [id])\n}\n\nmodel Notification {\n id String @id @default(uuid())\n steamId String\n title String?\n message String\n read Boolean @default(false)\n persistent Boolean @default(false)\n actionType String?\n actionData String?\n createdAt DateTime @default(now())\n\n user User @relation(fields: [steamId], references: [steamId])\n}\n\n//\n// ──────────────────────────────────────────────\n// 🎮 Matches & Spieler\n// ──────────────────────────────────────────────\n//\n\n// ──────────────────────────────────────────────\n// 🎮 Matches\n// ──────────────────────────────────────────────\n\nmodel Match {\n id String @id @default(uuid())\n title String\n matchType String @default(\"community\")\n map String?\n description String?\n scoreA Int?\n scoreB Int?\n\n teamAId String?\n teamA Team? @relation(\"MatchTeamA\", fields: [teamAId], references: [id])\n\n teamBId String?\n teamB Team? @relation(\"MatchTeamB\", fields: [teamBId], references: [id])\n\n teamAUsers User[] @relation(\"TeamAPlayers\")\n teamBUsers User[] @relation(\"TeamBPlayers\")\n\n filePath String?\n demoFile DemoFile?\n demoDate DateTime?\n demoData Json?\n\n players MatchPlayer[]\n rankUpdates RankHistory[] @relation(\"MatchRankHistory\")\n\n roundCount Int?\n roundHistory Json?\n winnerTeam String?\n\n bestOf Int @default(3) // 1 | 3 | 5 – app-seitig validieren\n matchDate DateTime? // geplante Startzeit (separat von demoDate)\n mapVote MapVote?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n schedule Schedule?\n}\n\nmodel MatchPlayer {\n id String @id @default(uuid())\n steamId String\n matchId String\n teamId String?\n team Team? @relation(fields: [teamId], references: [id])\n\n match Match @relation(fields: [matchId], references: [id])\n user User @relation(fields: [steamId], references: [steamId])\n\n stats PlayerStats?\n\n createdAt DateTime @default(now())\n\n @@unique([matchId, steamId])\n}\n\nmodel PlayerStats {\n id String @id @default(uuid())\n matchId String\n steamId String\n\n kills Int\n assists Int\n deaths Int\n headshotPct Float\n\n totalDamage Float @default(0)\n utilityDamage Int @default(0)\n flashAssists Int @default(0)\n mvps Int @default(0)\n mvpEliminations Int @default(0)\n mvpDefuse Int @default(0)\n mvpPlant Int @default(0)\n knifeKills Int @default(0)\n zeusKills Int @default(0)\n wallbangKills Int @default(0)\n smokeKills Int @default(0)\n headshots Int @default(0)\n noScopes Int @default(0)\n blindKills Int @default(0)\n\n aim Int @default(0)\n\n oneK Int @default(0)\n twoK Int @default(0)\n threeK Int @default(0)\n fourK Int @default(0)\n fiveK Int @default(0)\n\n rankOld Int?\n rankNew Int?\n rankChange Int?\n winCount Int?\n\n matchPlayer MatchPlayer @relation(fields: [matchId, steamId], references: [matchId, steamId])\n\n @@unique([matchId, steamId])\n}\n\nmodel RankHistory {\n id String @id @default(uuid())\n steamId String\n matchId String?\n\n rankOld Int\n rankNew Int\n delta Int\n winCount Int\n\n createdAt DateTime @default(now())\n\n user User @relation(\"UserRankHistory\", fields: [steamId], references: [steamId])\n match Match? @relation(\"MatchRankHistory\", fields: [matchId], references: [id])\n}\n\nmodel Schedule {\n id String @id @default(uuid())\n title String\n description String?\n map String?\n date DateTime\n status ScheduleStatus @default(PENDING)\n\n teamAId String?\n teamA Team? @relation(\"ScheduleTeamA\", fields: [teamAId], references: [id])\n\n teamBId String?\n teamB Team? @relation(\"ScheduleTeamB\", fields: [teamBId], references: [id])\n\n createdById String\n createdBy User @relation(\"CreatedSchedules\", fields: [createdById], references: [steamId])\n\n confirmedById String?\n confirmedBy User? @relation(\"ConfirmedSchedules\", fields: [confirmedById], references: [steamId])\n\n linkedMatchId String? @unique\n linkedMatch Match? @relation(fields: [linkedMatchId], references: [id])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nenum ScheduleStatus {\n PENDING\n CONFIRMED\n DECLINED\n CANCELLED\n COMPLETED\n}\n\n//\n// ──────────────────────────────────────────────\n// 📦 Demo-Dateien & CS2 Requests\n// ──────────────────────────────────────────────\n//\n\nmodel DemoFile {\n id String @id @default(uuid())\n matchId String @unique\n steamId String\n fileName String @unique\n filePath String\n parsed Boolean @default(false)\n\n createdAt DateTime @default(now())\n\n match Match @relation(fields: [matchId], references: [id])\n user User @relation(fields: [steamId], references: [steamId])\n}\n\nmodel ServerRequest {\n id String @id @default(uuid())\n steamId String\n matchId String\n reservationId BigInt\n tvPort BigInt\n processed Boolean @default(false)\n failed Boolean @default(false)\n\n createdAt DateTime @default(now())\n\n user User @relation(\"MatchRequests\", fields: [steamId], references: [steamId])\n\n @@unique([steamId, matchId])\n}\n\n// ──────────────────────────────────────────────\n// 🗺️ Map-Vote\n// ──────────────────────────────────────────────\n\nenum MapVoteAction {\n BAN\n PICK\n DECIDER\n}\n\nmodel MapVote {\n id String @id @default(uuid())\n matchId String @unique\n match Match @relation(fields: [matchId], references: [id])\n\n bestOf Int @default(3)\n mapPool String[]\n currentIdx Int @default(0)\n locked Boolean @default(false)\n opensAt DateTime?\n\n leadMinutes Int @default(60)\n\n adminEditingBy String?\n adminEditingSince DateTime?\n\n steps MapVoteStep[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel MapVoteStep {\n id String @id @default(uuid())\n voteId String\n order Int\n action MapVoteAction\n\n teamId String?\n team Team? @relation(\"VoteStepTeam\", fields: [teamId], references: [id])\n\n map String?\n chosenAt DateTime?\n chosenBy String?\n chooser User? @relation(\"VoteStepChooser\", fields: [chosenBy], references: [steamId])\n\n vote MapVote @relation(fields: [voteId], references: [id])\n\n @@unique([voteId, order])\n @@index([teamId])\n @@index([chosenBy])\n}\n", - "inlineSchemaHash": "1e05457b6d67e4b38fde40329269fe298cd7d9a74bfe85d0b981e8ab739a8f28", + "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../src/generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n//\n// ──────────────────────────────────────────────\n// 🧑 Benutzer, Teams & Verwaltung\n// ──────────────────────────────────────────────\n//\n\nmodel User {\n steamId String @id\n name String?\n avatar String?\n location String?\n isAdmin Boolean @default(false)\n\n teamId String?\n team Team? @relation(\"UserTeam\", fields: [teamId], references: [id])\n ledTeam Team? @relation(\"TeamLeader\")\n\n matchesAsTeamA Match[] @relation(\"TeamAPlayers\")\n matchesAsTeamB Match[] @relation(\"TeamBPlayers\")\n\n premierRank Int?\n authCode String?\n lastKnownShareCode String?\n lastKnownShareCodeDate DateTime?\n createdAt DateTime @default(now())\n\n invites TeamInvite[] @relation(\"UserInvitations\")\n notifications Notification[]\n matchPlayers MatchPlayer[]\n serverRequests ServerRequest[] @relation(\"MatchRequests\")\n rankHistory RankHistory[] @relation(\"UserRankHistory\")\n demoFiles DemoFile[]\n\n createdSchedules Schedule[] @relation(\"CreatedSchedules\")\n confirmedSchedules Schedule[] @relation(\"ConfirmedSchedules\")\n\n mapVoteChoices MapVoteStep[] @relation(\"VoteStepChooser\")\n\n status UserStatus @default(offline) // 👈 neu\n lastActiveAt DateTime? // optional: wann zuletzt aktiv\n\n readyAcceptances MatchReady[] @relation(\"MatchReadyUser\")\n}\n\nenum UserStatus {\n online\n away\n offline\n}\n\nmodel Team {\n id String @id @default(uuid())\n name String @unique\n logo String?\n leaderId String? @unique\n createdAt DateTime @default(now())\n\n activePlayers String[]\n inactivePlayers String[]\n\n leader User? @relation(\"TeamLeader\", fields: [leaderId], references: [steamId])\n members User[] @relation(\"UserTeam\")\n invites TeamInvite[]\n matchPlayers MatchPlayer[]\n\n matchesAsTeamA Match[] @relation(\"MatchTeamA\")\n matchesAsTeamB Match[] @relation(\"MatchTeamB\")\n\n schedulesAsTeamA Schedule[] @relation(\"ScheduleTeamA\")\n schedulesAsTeamB Schedule[] @relation(\"ScheduleTeamB\")\n\n mapVoteSteps MapVoteStep[] @relation(\"VoteStepTeam\")\n}\n\nmodel TeamInvite {\n id String @id @default(uuid())\n steamId String\n teamId String\n type String\n createdAt DateTime @default(now())\n\n user User @relation(\"UserInvitations\", fields: [steamId], references: [steamId])\n team Team @relation(fields: [teamId], references: [id])\n}\n\nmodel Notification {\n id String @id @default(uuid())\n steamId String\n title String?\n message String\n read Boolean @default(false)\n persistent Boolean @default(false)\n actionType String?\n actionData String?\n createdAt DateTime @default(now())\n\n user User @relation(fields: [steamId], references: [steamId])\n}\n\n//\n// ──────────────────────────────────────────────\n// 🎮 Matches & Spieler\n// ──────────────────────────────────────────────\n//\n\n// ──────────────────────────────────────────────\n// 🎮 Matches\n// ──────────────────────────────────────────────\n\nmodel Match {\n id String @id @default(uuid())\n title String\n matchType String @default(\"community\")\n map String?\n description String?\n scoreA Int?\n scoreB Int?\n\n teamAId String?\n teamA Team? @relation(\"MatchTeamA\", fields: [teamAId], references: [id])\n\n teamBId String?\n teamB Team? @relation(\"MatchTeamB\", fields: [teamBId], references: [id])\n\n teamAUsers User[] @relation(\"TeamAPlayers\")\n teamBUsers User[] @relation(\"TeamBPlayers\")\n\n filePath String?\n demoFile DemoFile?\n demoDate DateTime?\n demoData Json?\n\n players MatchPlayer[]\n rankUpdates RankHistory[] @relation(\"MatchRankHistory\")\n\n roundCount Int?\n roundHistory Json?\n winnerTeam String?\n\n bestOf Int @default(3) // 1 | 3 | 5 – app-seitig validieren\n matchDate DateTime? // geplante Startzeit (separat von demoDate)\n mapVote MapVote?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n schedule Schedule?\n\n readyAcceptances MatchReady[] @relation(\"MatchReadyMatch\")\n}\n\nmodel MatchPlayer {\n id String @id @default(uuid())\n steamId String\n matchId String\n teamId String?\n team Team? @relation(fields: [teamId], references: [id])\n\n match Match @relation(fields: [matchId], references: [id])\n user User @relation(fields: [steamId], references: [steamId])\n\n stats PlayerStats?\n\n createdAt DateTime @default(now())\n\n @@unique([matchId, steamId])\n}\n\nmodel PlayerStats {\n id String @id @default(uuid())\n matchId String\n steamId String\n\n kills Int\n assists Int\n deaths Int\n headshotPct Float\n\n totalDamage Float @default(0)\n utilityDamage Int @default(0)\n flashAssists Int @default(0)\n mvps Int @default(0)\n mvpEliminations Int @default(0)\n mvpDefuse Int @default(0)\n mvpPlant Int @default(0)\n knifeKills Int @default(0)\n zeusKills Int @default(0)\n wallbangKills Int @default(0)\n smokeKills Int @default(0)\n headshots Int @default(0)\n noScopes Int @default(0)\n blindKills Int @default(0)\n\n aim Int @default(0)\n\n oneK Int @default(0)\n twoK Int @default(0)\n threeK Int @default(0)\n fourK Int @default(0)\n fiveK Int @default(0)\n\n rankOld Int?\n rankNew Int?\n rankChange Int?\n winCount Int?\n\n matchPlayer MatchPlayer @relation(fields: [matchId, steamId], references: [matchId, steamId])\n\n @@unique([matchId, steamId])\n}\n\nmodel RankHistory {\n id String @id @default(uuid())\n steamId String\n matchId String?\n\n rankOld Int\n rankNew Int\n delta Int\n winCount Int\n\n createdAt DateTime @default(now())\n\n user User @relation(\"UserRankHistory\", fields: [steamId], references: [steamId])\n match Match? @relation(\"MatchRankHistory\", fields: [matchId], references: [id])\n}\n\nmodel Schedule {\n id String @id @default(uuid())\n title String\n description String?\n map String?\n date DateTime\n status ScheduleStatus @default(PENDING)\n\n teamAId String?\n teamA Team? @relation(\"ScheduleTeamA\", fields: [teamAId], references: [id])\n\n teamBId String?\n teamB Team? @relation(\"ScheduleTeamB\", fields: [teamBId], references: [id])\n\n createdById String\n createdBy User @relation(\"CreatedSchedules\", fields: [createdById], references: [steamId])\n\n confirmedById String?\n confirmedBy User? @relation(\"ConfirmedSchedules\", fields: [confirmedById], references: [steamId])\n\n linkedMatchId String? @unique\n linkedMatch Match? @relation(fields: [linkedMatchId], references: [id])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nenum ScheduleStatus {\n PENDING\n CONFIRMED\n DECLINED\n CANCELLED\n COMPLETED\n}\n\n//\n// ──────────────────────────────────────────────\n// 📦 Demo-Dateien & CS2 Requests\n// ──────────────────────────────────────────────\n//\n\nmodel DemoFile {\n id String @id @default(uuid())\n matchId String @unique\n steamId String\n fileName String @unique\n filePath String\n parsed Boolean @default(false)\n\n createdAt DateTime @default(now())\n\n match Match @relation(fields: [matchId], references: [id])\n user User @relation(fields: [steamId], references: [steamId])\n}\n\nmodel ServerRequest {\n id String @id @default(uuid())\n steamId String\n matchId String\n reservationId BigInt\n tvPort BigInt\n processed Boolean @default(false)\n failed Boolean @default(false)\n\n createdAt DateTime @default(now())\n\n user User @relation(\"MatchRequests\", fields: [steamId], references: [steamId])\n\n @@unique([steamId, matchId])\n}\n\n// ──────────────────────────────────────────────\n// 🗺️ Map-Vote\n// ──────────────────────────────────────────────\n\nenum MapVoteAction {\n BAN\n PICK\n DECIDER\n}\n\nmodel MapVote {\n id String @id @default(uuid())\n matchId String @unique\n match Match @relation(fields: [matchId], references: [id])\n\n bestOf Int @default(3)\n mapPool String[]\n currentIdx Int @default(0)\n locked Boolean @default(false)\n opensAt DateTime?\n\n leadMinutes Int @default(60)\n\n adminEditingBy String?\n adminEditingSince DateTime?\n\n steps MapVoteStep[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel MapVoteStep {\n id String @id @default(uuid())\n voteId String\n order Int\n action MapVoteAction\n\n teamId String?\n team Team? @relation(\"VoteStepTeam\", fields: [teamId], references: [id])\n\n map String?\n chosenAt DateTime?\n chosenBy String?\n chooser User? @relation(\"VoteStepChooser\", fields: [chosenBy], references: [steamId])\n\n vote MapVote @relation(fields: [voteId], references: [id])\n\n @@unique([voteId, order])\n @@index([teamId])\n @@index([chosenBy])\n}\n\nmodel MatchReady {\n matchId String\n steamId String\n acceptedAt DateTime @default(now())\n\n match Match @relation(\"MatchReadyMatch\", fields: [matchId], references: [id])\n user User @relation(\"MatchReadyUser\", fields: [steamId], references: [steamId])\n\n @@id([matchId, steamId])\n @@index([steamId])\n}\n", + "inlineSchemaHash": "262382781db09c76873c9b1ff3d732b74b3425d84159b0d7a1939ca346cd7c0f", "copyEngine": true } @@ -406,7 +413,7 @@ if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { config.isBundled = true } -config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"avatar\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"location\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isAdmin\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"UserTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledTeam\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"TeamLeader\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"TeamAPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"TeamBPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"premierRank\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"authCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastKnownShareCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastKnownShareCodeDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"invites\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TeamInvite\",\"nativeType\":null,\"relationName\":\"UserInvitations\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifications\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notification\",\"nativeType\":null,\"relationName\":\"NotificationToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"serverRequests\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ServerRequest\",\"nativeType\":null,\"relationName\":\"MatchRequests\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankHistory\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"RankHistory\",\"nativeType\":null,\"relationName\":\"UserRankHistory\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoFiles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DemoFile\",\"nativeType\":null,\"relationName\":\"DemoFileToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdSchedules\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"CreatedSchedules\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedSchedules\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ConfirmedSchedules\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVoteChoices\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteStep\",\"nativeType\":null,\"relationName\":\"VoteStepChooser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"UserStatus\",\"nativeType\":null,\"default\":\"offline\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastActiveAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Team\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"logo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leaderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"activePlayers\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"inactivePlayers\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leader\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamLeader\",\"relationFromFields\":[\"leaderId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"members\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"invites\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TeamInvite\",\"nativeType\":null,\"relationName\":\"TeamToTeamInvite\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchTeamA\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchTeamB\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schedulesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ScheduleTeamA\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schedulesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ScheduleTeamB\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVoteSteps\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteStep\",\"nativeType\":null,\"relationName\":\"VoteStepTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"TeamInvite\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserInvitations\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"TeamToTeamInvite\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Notification\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"message\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"read\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"persistent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actionType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actionData\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"NotificationToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Match\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"community\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scoreA\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scoreB\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamA\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchTeamA\",\"relationFromFields\":[\"teamAId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamB\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchTeamB\",\"relationFromFields\":[\"teamBId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamAPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamBPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"filePath\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoFile\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DemoFile\",\"nativeType\":null,\"relationName\":\"DemoFileToMatch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoData\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"players\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankUpdates\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"RankHistory\",\"nativeType\":null,\"relationName\":\"MatchRankHistory\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roundCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roundHistory\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winnerTeam\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bestOf\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVote\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVote\",\"nativeType\":null,\"relationName\":\"MapVoteToMatch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"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\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"schedule\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"MatchToSchedule\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MatchPlayer\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchPlayerToTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MatchPlayerToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stats\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PlayerStats\",\"nativeType\":null,\"relationName\":\"MatchPlayerToPlayerStats\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"matchId\",\"steamId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"matchId\",\"steamId\"]}],\"isGenerated\":false},\"PlayerStats\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"kills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"assists\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deaths\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headshotPct\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalDamage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Float\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"utilityDamage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"flashAssists\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvps\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpEliminations\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpDefuse\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpPlant\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"knifeKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"zeusKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wallbangKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"smokeKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headshots\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noScopes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"blindKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aim\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"oneK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"twoK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"threeK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fourK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fiveK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankOld\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankChange\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToPlayerStats\",\"relationFromFields\":[\"matchId\",\"steamId\"],\"relationToFields\":[\"matchId\",\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"matchId\",\"steamId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"matchId\",\"steamId\"]}],\"isGenerated\":false},\"RankHistory\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankOld\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"delta\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserRankHistory\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchRankHistory\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Schedule\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"date\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"ScheduleStatus\",\"nativeType\":null,\"default\":\"PENDING\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamA\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"ScheduleTeamA\",\"relationFromFields\":[\"teamAId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamB\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"ScheduleTeamB\",\"relationFromFields\":[\"teamBId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdById\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"CreatedSchedules\",\"relationFromFields\":[\"createdById\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedById\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedBy\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"ConfirmedSchedules\",\"relationFromFields\":[\"confirmedById\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"linkedMatchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"linkedMatch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToSchedule\",\"relationFromFields\":[\"linkedMatchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"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\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"DemoFile\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fileName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"filePath\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parsed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"DemoFileToMatch\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"DemoFileToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ServerRequest\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reservationId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tvPort\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"failed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MatchRequests\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"steamId\",\"matchId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"steamId\",\"matchId\"]}],\"isGenerated\":false},\"MapVote\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MapVoteToMatch\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bestOf\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapPool\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"currentIdx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"locked\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"opensAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leadMinutes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":60,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminEditingBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminEditingSince\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steps\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteStep\",\"nativeType\":null,\"relationName\":\"MapVoteToMapVoteStep\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"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\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MapVoteStep\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"voteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"action\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteAction\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"VoteStepTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chosenAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chosenBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chooser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"VoteStepChooser\",\"relationFromFields\":[\"chosenBy\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"vote\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVote\",\"nativeType\":null,\"relationName\":\"MapVoteToMapVoteStep\",\"relationFromFields\":[\"voteId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"voteId\",\"order\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"voteId\",\"order\"]}],\"isGenerated\":false}},\"enums\":{\"UserStatus\":{\"values\":[{\"name\":\"online\",\"dbName\":null},{\"name\":\"away\",\"dbName\":null},{\"name\":\"offline\",\"dbName\":null}],\"dbName\":null},\"ScheduleStatus\":{\"values\":[{\"name\":\"PENDING\",\"dbName\":null},{\"name\":\"CONFIRMED\",\"dbName\":null},{\"name\":\"DECLINED\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null},{\"name\":\"COMPLETED\",\"dbName\":null}],\"dbName\":null},\"MapVoteAction\":{\"values\":[{\"name\":\"BAN\",\"dbName\":null},{\"name\":\"PICK\",\"dbName\":null},{\"name\":\"DECIDER\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"avatar\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"location\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isAdmin\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"UserTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledTeam\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"TeamLeader\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"TeamAPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"TeamBPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"premierRank\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"authCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastKnownShareCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastKnownShareCodeDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"invites\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TeamInvite\",\"nativeType\":null,\"relationName\":\"UserInvitations\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifications\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notification\",\"nativeType\":null,\"relationName\":\"NotificationToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"serverRequests\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ServerRequest\",\"nativeType\":null,\"relationName\":\"MatchRequests\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankHistory\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"RankHistory\",\"nativeType\":null,\"relationName\":\"UserRankHistory\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoFiles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DemoFile\",\"nativeType\":null,\"relationName\":\"DemoFileToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdSchedules\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"CreatedSchedules\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedSchedules\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ConfirmedSchedules\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVoteChoices\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteStep\",\"nativeType\":null,\"relationName\":\"VoteStepChooser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"UserStatus\",\"nativeType\":null,\"default\":\"offline\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastActiveAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"readyAcceptances\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchReady\",\"nativeType\":null,\"relationName\":\"MatchReadyUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Team\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"logo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leaderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"activePlayers\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"inactivePlayers\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leader\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamLeader\",\"relationFromFields\":[\"leaderId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"members\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"invites\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TeamInvite\",\"nativeType\":null,\"relationName\":\"TeamToTeamInvite\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchTeamA\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchTeamB\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schedulesAsTeamA\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ScheduleTeamA\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schedulesAsTeamB\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"ScheduleTeamB\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVoteSteps\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteStep\",\"nativeType\":null,\"relationName\":\"VoteStepTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"TeamInvite\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserInvitations\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"TeamToTeamInvite\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Notification\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"message\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"read\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"persistent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actionType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actionData\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"NotificationToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Match\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"community\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scoreA\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scoreB\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamA\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchTeamA\",\"relationFromFields\":[\"teamAId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamB\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchTeamB\",\"relationFromFields\":[\"teamBId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamAPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamBPlayers\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"filePath\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoFile\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DemoFile\",\"nativeType\":null,\"relationName\":\"DemoFileToMatch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoData\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"players\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankUpdates\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"RankHistory\",\"nativeType\":null,\"relationName\":\"MatchRankHistory\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roundCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roundHistory\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winnerTeam\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bestOf\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapVote\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVote\",\"nativeType\":null,\"relationName\":\"MapVoteToMatch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"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\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"schedule\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Schedule\",\"nativeType\":null,\"relationName\":\"MatchToSchedule\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"readyAcceptances\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchReady\",\"nativeType\":null,\"relationName\":\"MatchReadyMatch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MatchPlayer\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"MatchPlayerToTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MatchPlayerToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stats\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PlayerStats\",\"nativeType\":null,\"relationName\":\"MatchPlayerToPlayerStats\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"matchId\",\"steamId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"matchId\",\"steamId\"]}],\"isGenerated\":false},\"PlayerStats\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"kills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"assists\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deaths\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headshotPct\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalDamage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Float\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"utilityDamage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"flashAssists\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvps\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpEliminations\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpDefuse\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mvpPlant\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"knifeKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"zeusKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wallbangKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"smokeKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headshots\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noScopes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"blindKills\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aim\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"oneK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"twoK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"threeK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fourK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fiveK\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankOld\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankChange\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchPlayer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"nativeType\":null,\"relationName\":\"MatchPlayerToPlayerStats\",\"relationFromFields\":[\"matchId\",\"steamId\"],\"relationToFields\":[\"matchId\",\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"matchId\",\"steamId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"matchId\",\"steamId\"]}],\"isGenerated\":false},\"RankHistory\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankOld\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rankNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"delta\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserRankHistory\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchRankHistory\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Schedule\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"date\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"ScheduleStatus\",\"nativeType\":null,\"default\":\"PENDING\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamAId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamA\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"ScheduleTeamA\",\"relationFromFields\":[\"teamAId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamBId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamB\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"ScheduleTeamB\",\"relationFromFields\":[\"teamBId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdById\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"CreatedSchedules\",\"relationFromFields\":[\"createdById\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedById\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmedBy\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"ConfirmedSchedules\",\"relationFromFields\":[\"confirmedById\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"linkedMatchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"linkedMatch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToSchedule\",\"relationFromFields\":[\"linkedMatchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"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\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"DemoFile\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fileName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"filePath\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parsed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"DemoFileToMatch\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"DemoFileToUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ServerRequest\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reservationId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tvPort\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"failed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MatchRequests\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"steamId\",\"matchId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"steamId\",\"matchId\"]}],\"isGenerated\":false},\"MapVote\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MapVoteToMatch\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bestOf\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mapPool\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"currentIdx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"locked\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"opensAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leadMinutes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":60,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminEditingBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminEditingSince\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steps\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteStep\",\"nativeType\":null,\"relationName\":\"MapVoteToMapVoteStep\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"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\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MapVoteStep\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"voteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"action\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVoteAction\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"VoteStepTeam\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"map\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chosenAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chosenBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chooser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"VoteStepChooser\",\"relationFromFields\":[\"chosenBy\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"vote\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MapVote\",\"nativeType\":null,\"relationName\":\"MapVoteToMapVoteStep\",\"relationFromFields\":[\"voteId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"voteId\",\"order\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"voteId\",\"order\"]}],\"isGenerated\":false},\"MatchReady\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"steamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"acceptedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchReadyMatch\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MatchReadyUser\",\"relationFromFields\":[\"steamId\"],\"relationToFields\":[\"steamId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"matchId\",\"steamId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{\"UserStatus\":{\"values\":[{\"name\":\"online\",\"dbName\":null},{\"name\":\"away\",\"dbName\":null},{\"name\":\"offline\",\"dbName\":null}],\"dbName\":null},\"ScheduleStatus\":{\"values\":[{\"name\":\"PENDING\",\"dbName\":null},{\"name\":\"CONFIRMED\",\"dbName\":null},{\"name\":\"DECLINED\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null},{\"name\":\"COMPLETED\",\"dbName\":null}],\"dbName\":null},\"MapVoteAction\":{\"values\":[{\"name\":\"BAN\",\"dbName\":null},{\"name\":\"PICK\",\"dbName\":null},{\"name\":\"DECIDER\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") defineDmmfProperty(exports.Prisma, config.runtimeDataModel) config.engineWasm = undefined config.compilerWasm = undefined diff --git a/src/generated/prisma/package.json b/src/generated/prisma/package.json index d4dd333..fa5e6b8 100644 --- a/src/generated/prisma/package.json +++ b/src/generated/prisma/package.json @@ -1,5 +1,5 @@ { - "name": "prisma-client-da0847ed2b650f4e980bae112054fc21d3b01519299b5975e3d05dad9fd53b68", + "name": "prisma-client-2e5c1f8f0e3dd7b271c7986ac6cb6fd933eac0338be7033c8e86d6bde46642fd", "main": "index.js", "types": "index.d.ts", "browser": "index-browser.js", @@ -145,6 +145,6 @@ }, "./*": "./*" }, - "version": "6.14.0", + "version": "6.15.0", "sideEffects": false } \ No newline at end of file diff --git a/src/generated/prisma/query_engine-windows.dll.node b/src/generated/prisma/query_engine-windows.dll.node index 894b041..04c88df 100644 Binary files a/src/generated/prisma/query_engine-windows.dll.node and b/src/generated/prisma/query_engine-windows.dll.node differ diff --git a/src/generated/prisma/runtime/edge-esm.js b/src/generated/prisma/runtime/edge-esm.js index 324dc2a..2d6845c 100644 --- a/src/generated/prisma/runtime/edge-esm.js +++ b/src/generated/prisma/runtime/edge-esm.js @@ -1,17 +1,17 @@ /* !!! This is code generated by Prisma. Do not edit directly. !!! /* eslint-disable */ -var fa=Object.create;var nn=Object.defineProperty;var da=Object.getOwnPropertyDescriptor;var ga=Object.getOwnPropertyNames;var ha=Object.getPrototypeOf,ya=Object.prototype.hasOwnProperty;var fe=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),or=(e,t)=>{for(var r in t)nn(e,r,{get:t[r],enumerable:!0})},wa=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ga(t))!ya.call(e,i)&&i!==r&&nn(e,i,{get:()=>t[i],enumerable:!(n=da(t,i))||n.enumerable});return e};var Ue=(e,t,r)=>(r=e!=null?fa(ha(e)):{},wa(t||!e||!e.__esModule?nn(r,"default",{value:e,enumerable:!0}):r,e));var y,b,u=fe(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:b}=y});var x,c=fe(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,p=fe(()=>{"use strict";E=()=>{};E.prototype=E});var m=fe(()=>{"use strict"});var vi=Ce(ze=>{"use strict";f();u();c();p();m();var ui=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ea=ui(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=I;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=S.indexOf("=");M===-1&&(M=R);var F=M===R?0:4-M%4;return[M,F]}function l(S){var R=a(S),M=R[0],F=R[1];return(M+F)*3/4-F}function d(S,R,M){return(R+M)*3/4-M}function g(S){var R,M=a(S),F=M[0],B=M[1],O=new n(d(S,F,B)),L=0,oe=B>0?F-4:F,J;for(J=0;J>16&255,O[L++]=R>>8&255,O[L++]=R&255;return B===2&&(R=r[S.charCodeAt(J)]<<2|r[S.charCodeAt(J+1)]>>4,O[L++]=R&255),B===1&&(R=r[S.charCodeAt(J)]<<10|r[S.charCodeAt(J+1)]<<4|r[S.charCodeAt(J+2)]>>2,O[L++]=R>>8&255,O[L++]=R&255),O}function h(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function T(S,R,M){for(var F,B=[],O=R;Ooe?oe:L+O));return F===1?(R=S[M-1],B.push(t[R>>2]+t[R<<4&63]+"==")):F===2&&(R=(S[M-2]<<8)+S[M-1],B.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),B.join("")}}),ba=ui(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,d=(1<>1,h=-7,T=n?o-1:0,I=n?-1:1,S=t[r+T];for(T+=I,s=S&(1<<-h)-1,S>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=I,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=I,h-=8);if(s===0)s=1-g;else{if(s===d)return a?NaN:(S?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(S?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,d,g=s*8-o-1,h=(1<>1,I=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=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*(d=Math.pow(2,-a))<1&&(a--,d*=2),a+T>=1?r+=I/d:r+=I*Math.pow(2,1-T),r*d>=2&&(a++,d/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*d-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+S]=l&255,S+=R,l/=256,o-=8);for(a=a<0;t[n+S]=a&255,S+=R,a/=256,g-=8);t[n+S-R]|=M*128}}),on=Ea(),We=ba(),oi=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.Buffer=A;ze.SlowBuffer=Ca;ze.INSPECT_MAX_BYTES=50;var sr=2147483647;ze.kMaxLength=sr;A.TYPED_ARRAY_SUPPORT=xa();!A.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 xa(){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(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}});Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function xe(e){if(e>sr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(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 ln(e)}return ci(e,t,r)}A.poolSize=8192;function ci(e,t,r){if(typeof e=="string")return va(e,t);if(ArrayBuffer.isView(e))return Ta(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(de(e,ArrayBuffer)||e&&de(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(de(e,SharedArrayBuffer)||e&&de(e.buffer,SharedArrayBuffer)))return mi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return A.from(n,t,r);let i=Aa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return A.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)}A.from=function(e,t,r){return ci(e,t,r)};Object.setPrototypeOf(A.prototype,Uint8Array.prototype);Object.setPrototypeOf(A,Uint8Array);function pi(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 Pa(e,t,r){return pi(e),e<=0?xe(e):t!==void 0?typeof r=="string"?xe(e).fill(t,r):xe(e).fill(t):xe(e)}A.alloc=function(e,t,r){return Pa(e,t,r)};function ln(e){return pi(e),xe(e<0?0:un(e)|0)}A.allocUnsafe=function(e){return ln(e)};A.allocUnsafeSlow=function(e){return ln(e)};function va(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=fi(e,t)|0,n=xe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function sn(e){let t=e.length<0?0:un(e.length)|0,r=xe(t);for(let n=0;n=sr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+sr.toString(16)+" bytes");return e|0}function Ca(e){return+e!=e&&(e=0),A.alloc(+e)}A.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==A.prototype};A.compare=function(e,t){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),de(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(e)||!A.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?(A.isBuffer(o)||(o=A.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(A.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function fi(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||de(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return an(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Pi(e).length;default:if(i)return n?-1:an(e).length;t=(""+t).toLowerCase(),i=!0}}A.byteLength=fi;function Ra(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 La(this,t,r);case"utf8":case"utf-8":return gi(this,t,r);case"ascii":return Na(this,t,r);case"latin1":case"binary":return Fa(this,t,r);case"base64":return Ma(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ua(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}A.prototype._isBuffer=!0;function Be(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}A.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+=" ... "),""};oi&&(A.prototype[oi]=A.prototype.inspect);A.prototype.compare=function(e,t,r,n,i){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.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),d=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,pn(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=A.from(t,n)),A.isBuffer(t))return t.length===0?-1:si(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):si(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function si(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 d;if(i){let g=-1;for(d=r;ds&&(r=s-a),d=r;d>=0;d--){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 Sa(this,e,t,r);case"utf8":case"utf-8":return Ia(this,e,t,r);case"ascii":case"latin1":case"binary":return Oa(this,e,t,r);case"base64":return ka(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Da(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ma(e,t,r){return t===0&&r===e.length?on.fromByteArray(e):on.fromByteArray(e.slice(t,r))}function gi(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,d,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],d=e[i+2],(l&192)===128&&(d&192)===128&&(h=(o&15)<<12|(l&63)<<6|d&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],d=e[i+2],g=e[i+3],(l&192)===128&&(d&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(d&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 _a(n)}var ai=4096;function _a(e){let t=e.length;if(t<=ai)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")}A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};A.prototype.readBigUInt64LE=Re(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(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,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(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||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};A.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(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};A.prototype.readInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};A.prototype.readInt16LE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};A.prototype.readInt16BE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};A.prototype.readInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};A.prototype.readInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};A.prototype.readBigInt64LE=Re(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(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,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||W(e,4,this.length),We.read(this,e,!0,23,4)};A.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),We.read(this,e,!1,23,4)};A.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!0,52,8)};A.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.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};A.prototype.writeUint8=A.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};A.prototype.writeUint16LE=A.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};A.prototype.writeUint16BE=A.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};A.prototype.writeUint32LE=A.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};A.prototype.writeUint32BE=A.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 hi(e,t,r,n,i){xi(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 yi(e,t,r,n,i){xi(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}A.prototype.writeBigUInt64LE=Re(function(e,t=0){return hi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeBigUInt64BE=Re(function(e,t=0){return yi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.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};A.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};A.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};A.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};A.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};A.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};A.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};A.prototype.writeBigInt64LE=Re(function(e,t=0){return hi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});A.prototype.writeBigInt64BE=Re(function(e,t=0){return yi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function wi(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 Ei(e,t,r,n,i){return t=+t,r=r>>>0,i||wi(e,t,r,4,34028234663852886e22,-34028234663852886e22),We.write(e,t,r,n,23,4),r+4}A.prototype.writeFloatLE=function(e,t,r){return Ei(this,e,t,!0,r)};A.prototype.writeFloatBE=function(e,t,r){return Ei(this,e,t,!1,r)};function bi(e,t,r,n,i){return t=+t,r=r>>>0,i||wi(e,t,r,8,17976931348623157e292,-17976931348623157e292),We.write(e,t,r,n,52,8),r+8}A.prototype.writeDoubleLE=function(e,t,r){return bi(this,e,t,!0,r)};A.prototype.writeDoubleBE=function(e,t,r){return bi(this,e,t,!1,r)};A.prototype.copy=function(e,t,r,n){if(!A.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=li(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=li(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function li(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 Ba(e,t,r){He(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&xt(t,e.length-(r+1))}function xi(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 Ke.ERR_OUT_OF_RANGE("value",a,e)}Ba(n,i,o)}function He(e,t){if(typeof e!="number")throw new Ke.ERR_INVALID_ARG_TYPE(t,"number",e)}function xt(e,t,r){throw Math.floor(e)!==e?(He(e,r),new Ke.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Ke.ERR_BUFFER_OUT_OF_BOUNDS:new Ke.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var qa=/[^+/0-9A-Za-z-_]/g;function Va(e){if(e=e.split("=")[0],e=e.trim().replace(qa,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function an(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 $a(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function Pi(e){return on.toByteArray(Va(e))}function ar(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function de(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function pn(e){return e!==e}var Ga=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Re(e){return typeof BigInt>"u"?Ja:e}function Ja(){throw new Error("BigInt not supported")}});var w,f=fe(()=>{"use strict";w=Ue(vi())});function Ya(){return!1}function dn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function Za(){return dn()}function Xa(){return[]}function el(e){e(null,[])}function tl(){return""}function rl(){return""}function nl(){}function il(){}function ol(){}function sl(){}function al(){}function ll(){}function ul(){}function cl(){}function pl(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function ml(e,t){t(null,dn())}var fl,dl,$i,ji=fe(()=>{"use strict";f();u();c();p();m();fl={},dl={existsSync:Ya,lstatSync:dn,stat:ml,statSync:Za,readdirSync:Xa,readdir:el,readlinkSync:tl,realpathSync:rl,chmodSync:nl,renameSync:il,mkdirSync:ol,rmdirSync:sl,rmSync:al,unlinkSync:ll,watchFile:ul,unwatchFile:cl,watch:pl,promises:fl},$i=dl});function gl(...e){return e.join("/")}function hl(...e){return e.join("/")}function yl(e){let t=Gi(e),r=Ji(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Gi(e){let t=e.split("/");return t[t.length-1]}function Ji(e){return e.split("/").slice(0,-1).join("/")}function El(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var Qi,wl,bl,xl,pr,Ki=fe(()=>{"use strict";f();u();c();p();m();Qi="/",wl=":";bl={sep:Qi},xl={basename:Gi,delimiter:wl,dirname:Ji,join:hl,normalize:El,parse:yl,posix:bl,resolve:gl,sep:Qi},pr=xl});var Wi=Ce((xf,Pl)=>{Pl.exports={name:"@prisma/internals",version:"6.14.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-engine-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var hn=Ce((_f,Cl)=>{Cl.exports={name:"@prisma/engines-version",version:"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"717184b7b35ea05dfa71a3236b7af656013e1e49"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Hi=Ce(mr=>{"use strict";f();u();c();p();m();Object.defineProperty(mr,"__esModule",{value:!0});mr.enginesVersion=void 0;mr.enginesVersion=hn().prisma.enginesVersion});var Zi=Ce((Kf,Yi)=>{"use strict";f();u();c();p();m();Yi.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 to=Ce((od,eo)=>{"use strict";f();u();c();p();m();eo.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 no=Ce((pd,ro)=>{"use strict";f();u();c();p();m();var kl=to();ro.exports=e=>typeof e=="string"?e.replace(kl(),""):e});var Rn=Ce((Jy,Po)=>{"use strict";f();u();c();p();m();Po.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";f();u();c();p();m()});var So=fe(()=>{"use strict";f();u();c();p();m()});var Vr,Ho=fe(()=>{"use strict";f();u();c();p();m();Vr=class{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}}});f();u();c();p();m();var Ci={};or(Ci,{defineExtension:()=>Ti,getExtensionContext:()=>Ai});f();u();c();p();m();f();u();c();p();m();function Ti(e){return typeof e=="function"?e:t=>t.$extends(e)}f();u();c();p();m();function Ai(e){return e}var Si={};or(Si,{validator:()=>Ri});f();u();c();p();m();f();u();c();p();m();function Ri(...e){return t=>t}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var mn,Ii,Oi,ki,Di=!0;typeof y<"u"&&({FORCE_COLOR:mn,NODE_DISABLE_COLORS:Ii,NO_COLOR:Oi,TERM:ki}=y.env||{},Di=y.stdout&&y.stdout.isTTY);var Qa={enabled:!Ii&&Oi==null&&ki!=="dumb"&&(mn!=null&&mn!=="0"||Di)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Qa.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var vm=j(0,0),lr=j(1,22),ur=j(2,22),Tm=j(3,23),Mi=j(4,24),Am=j(7,27),Cm=j(8,28),Rm=j(9,29),Sm=j(30,39),Ye=j(31,39),_i=j(32,39),Ni=j(33,39),Fi=j(34,39),Im=j(35,39),Li=j(36,39),Om=j(37,39),Ui=j(90,39),km=j(90,39),Dm=j(40,49),Mm=j(41,49),_m=j(42,49),Nm=j(43,49),Fm=j(44,49),Lm=j(45,49),Um=j(46,49),Bm=j(47,49);f();u();c();p();m();var Ka=100,Bi=["green","yellow","blue","magenta","cyan","red"],cr=[],qi=Date.now(),Wa=0,fn=typeof y<"u"?y.env:{};globalThis.DEBUG??=fn.DEBUG??"";globalThis.DEBUG_COLORS??=fn.DEBUG_COLORS?fn.DEBUG_COLORS==="true":!0;var Pt={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 Ha(e){let t={color:Bi[Wa++%Bi.length],enabled:Pt.enabled(e),namespace:e,log:Pt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&cr.push([o,...n]),cr.length>Ka&&cr.shift(),Pt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:za(g)),d=`+${Date.now()-qi}ms`;qi=Date.now(),a(o,...l,d)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Z=new Proxy(Ha,{get:(e,t)=>Pt[t],set:(e,t,r)=>Pt[t]=r});function za(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Vi(){cr.length=0}f();u();c();p();m();f();u();c();p();m();var vl=Wi(),gn=vl.version;f();u();c();p();m();function Ze(e){let t=Tl();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Al(e))}function Tl(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Al(e){return e?.previewFeatures.includes("queryCompiler")?"client":"library"}f();u();c();p();m();var zi="prisma+postgres",fr=`${zi}:`;function dr(e){return e?.toString().startsWith(`${fr}//`)??!1}function yn(e){if(!dr(e))return!1;let{host:t}=new URL(e);return t.includes("localhost")||t.includes("127.0.0.1")||t.includes("[::1]")}var Tt={};or(Tt,{error:()=>Il,info:()=>Sl,log:()=>Rl,query:()=>Ol,should:()=>Xi,tags:()=>vt,warn:()=>wn});f();u();c();p();m();var vt={error:Ye("prisma:error"),warn:Ni("prisma:warn"),info:Li("prisma:info"),query:Fi("prisma:query")},Xi={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Rl(...e){console.log(...e)}function wn(e,...t){Xi.warn()&&console.warn(`${vt.warn} ${e}`,...t)}function Sl(e,...t){console.info(`${vt.info} ${e}`,...t)}function Il(e,...t){console.error(`${vt.error} ${e}`,...t)}function Ol(e,...t){console.log(`${vt.query} ${e}`,...t)}f();u();c();p();m();function qe(e,t){throw new Error(t)}f();u();c();p();m();function En(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();u();c();p();m();function gr(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();u();c();p();m();function bn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{io.has(e)||(io.add(e),wn(t,...r))};var Q=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};N(Q,"PrismaClientInitializationError");f();u();c();p();m();var se=class extends Error{code;meta;clientVersion;batchRequestIdx;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(se,"PrismaClientKnownRequestError");f();u();c();p();m();var Se=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(Se,"PrismaClientRustPanicError");f();u();c();p();m();var ae=class extends Error{clientVersion;batchRequestIdx;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(ae,"PrismaClientUnknownRequestError");f();u();c();p();m();var ee=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};N(ee,"PrismaClientValidationError");f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var ge=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};f();u();c();p();m();function Ie(e){return e.substring(0,1).toLowerCase()+e.substring(1)}f();u();c();p();m();function so(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}f();u();c();p();m();function At(e){let t;return{get(){return t||(t={value:e()}),t.value}}}f();u();c();p();m();function Dl(e){return{models:xn(e.models),enums:xn(e.enums),types:xn(e.types)}}function xn(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}f();u();c();p();m();function Xe(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function yr(e){return e.toString()!=="Invalid Date"}f();u();c();p();m();f();u();c();p();m();var et=9e15,Me=1e9,Pn="0123456789abcdef",br="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",xr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",vn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-et,maxE:et,crypto:!1},co,Pe,_=!0,vr="[DecimalError] ",De=vr+"Invalid argument: ",po=vr+"Precision limit exceeded",mo=vr+"crypto unavailable",fo="[object Decimal]",X=Math.floor,K=Math.pow,Ml=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,_l=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Nl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,go=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,D=7,Fl=9007199254740991,Ll=br.length-1,Tn=xr.length-1,C={toStringTag:fo};C.absoluteValue=C.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),k(e)};C.ceil=function(){return k(new this.constructor(this),this.e+1,2)};C.clampedTo=C.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(De+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};C.comparedTo=C.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,d=e.s;if(!s||!a)return!l||!d?NaN:l!==d?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-d:0;if(l!==d)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};C.cosine=C.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Ul(n,bo(n,r)),n.precision=e,n.rounding=t,k(Pe==2||Pe==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};C.cubeRoot=C.cbrt=function(){var e,t,r,n,i,o,s,a,l,d,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(_=!1,o=g.s*K(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=K(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),d=l.plus(g),n=V(d.plus(g).times(a),d.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 _=!0,k(n,e,h.rounding,t)};C.decimalPlaces=C.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-X(this.e/D))*D,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};C.dividedBy=C.div=function(e){return V(this,new this.constructor(e))};C.dividedToIntegerBy=C.divToInt=function(e){var t=this,r=t.constructor;return k(V(t,new r(e),0,1,1),r.precision,r.rounding)};C.equals=C.eq=function(e){return this.cmp(e)===0};C.floor=function(){return k(new this.constructor(this),this.e+1,3)};C.greaterThan=C.gt=function(e){return this.cmp(e)>0};C.greaterThanOrEqualTo=C.gte=function(e){var t=this.cmp(e);return t==1||t===0};C.hyperbolicCosine=C.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Ar(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=tt(s,1,o.times(t),new s(1),!0);for(var l,d=e,g=new s(8);d--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return k(o,s.precision=r,s.rounding=n,!0)};C.hyperbolicSine=C.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=tt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Ar(5,e)),i=tt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),d=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(d))))}return o.precision=t,o.rounding=r,k(i,t,r,!0)};C.hyperbolicTangent=C.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,V(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};C.inverseCosine=C.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?he(t,n,i):new t(0):new t(NaN):e.isZero()?he(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};C.inverseHyperbolicCosine=C.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,_=!1,r=r.times(r).minus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};C.inverseHyperbolicSine=C.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,_=!1,r=r.times(r).plus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln())};C.inverseHyperbolicTangent=C.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?k(new o(i),e,t,!0):(o.precision=r=n-i.e,i=V(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};C.inverseSine=C.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=he(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};C.inverseTangent=C.atan=function(){var e,t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding;if(d.isFinite()){if(d.isZero())return new g(d);if(d.abs().eq(1)&&h+4<=Tn)return s=he(g,h+4,T).times(.25),s.s=d.s,s}else{if(!d.s)return new g(NaN);if(h+4<=Tn)return s=he(g,h+4,T).times(.5),s.s=d.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/D+2|0),e=r;e;--e)d=d.div(d.times(d).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(a/D),n=1,l=d.times(d),s=new g(d),i=d;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};C.isNaN=function(){return!this.s};C.isNegative=C.isNeg=function(){return this.s<0};C.isPositive=C.isPos=function(){return this.s>0};C.isZero=function(){return!!this.d&&this.d[0]===0};C.lessThan=C.lt=function(e){return this.cmp(e)<0};C.lessThanOrEqualTo=C.lte=function(e){return this.cmp(e)<1};C.logarithm=C.log=function(e){var t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding,I=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=d.d,d.s<0||!r||!r[0]||d.eq(1))return new g(r&&!r[0]?-1/0:d.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+I,s=ke(d,a),n=t?Pr(g,a+10):ke(e,a),l=V(s,n,a,1),Ct(l.d,i=h,T))do if(a+=10,s=ke(d,a),n=t?Pr(g,a+10):ke(e,a),l=V(s,n,a,1),!o){+z(l.d).slice(i+1,i+15)+1==1e14&&(l=k(l,h+1,0));break}while(Ct(l.d,i+=10,T));return _=!0,k(l,h,T)};C.minus=C.sub=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.constructor;if(e=new S(e),!I.d||!e.d)return!I.s||!e.s?e=new S(NaN):I.d?e.s=-e.s:e=new S(e.d||I.s!==e.s?I:NaN),e;if(I.s!=e.s)return e.s=-e.s,I.plus(e);if(d=I.d,T=e.d,a=S.precision,l=S.rounding,!d[0]||!T[0]){if(T[0])e.s=-e.s;else if(d[0])e=new S(I);else return new S(l===3?-0:0);return _?k(e,a,l):e}if(r=X(e.e/D),g=X(I.e/D),d=d.slice(),o=g-r,o){for(h=o<0,h?(t=d,o=-o,s=T.length):(t=T,r=g,s=d.length),n=Math.max(Math.ceil(a/D),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=d.length,s=T.length,h=n0;--n)d[s++]=0;for(n=T.length;n>o;){if(d[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=d.length,i=g.length,s-i<0&&(i=s,r=g,g=d,d=r),t=0;i;)t=(d[--i]=d[i]+g[i]+t)/pe|0,d[i]%=pe;for(t&&(d.unshift(t),++n),s=d.length;d[--s]==0;)d.pop();return e.d=d,e.e=Tr(d,n),_?k(e,a,l):e};C.precision=C.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(De+e);return r.d?(t=ho(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};C.round=function(){var e=this,t=e.constructor;return k(new t(e),e.e+1,t.rounding)};C.sine=C.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=ql(n,bo(n,r)),n.precision=e,n.rounding=t,k(Pe>2?r.neg():r,e,t,!0)):new n(NaN)};C.squareRoot=C.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,d=s.s,g=s.constructor;if(d!==1||!a||!a[0])return new g(!d||d<0&&(!a||a[0])?NaN:a?s:1/0);for(_=!1,d=Math.sqrt(+s),d==0||d==1/0?(t=z(a),(t.length+l)%2==0&&(t+="0"),d=Math.sqrt(t),l=X((l+1)/2)-(l<0||l%2),d==1/0?t="5e"+l:(t=d.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(d.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(V(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 _=!0,k(n,l,g.rounding,e)};C.tangent=C.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=V(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,k(Pe==2||Pe==4?r.neg():r,e,t,!0)):new n(NaN)};C.times=C.mul=function(e){var t,r,n,i,o,s,a,l,d,g=this,h=g.constructor,T=g.d,I=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!I||!I[0])return new h(!e.s||T&&!T[0]&&!I||I&&!I[0]&&!T?NaN:!T||!I?e.s/0:e.s*0);for(r=X(g.e/D)+X(e.e/D),l=T.length,d=I.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+I[n]*T[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=Tr(o,r),_?k(e,h.precision,h.rounding):e};C.toBinary=function(e,t){return Cn(this,2,e,t)};C.toDecimalPlaces=C.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ne(e,0,Me),t===void 0?t=n.rounding:ne(t,0,8),k(r,e+r.e+1,t))};C.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,!0):(ne(e,0,Me),t===void 0?t=i.rounding:ne(t,0,8),n=k(new i(n),e+1,t),r=ye(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=ye(i):(ne(e,0,Me),t===void 0?t=o.rounding:ne(t,0,8),n=k(new o(i),e+i.e+1,t),r=ye(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};C.toFraction=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.d,R=I.constructor;if(!S)return new R(I);if(d=r=new R(1),n=l=new R(0),t=new R(n),o=t.e=ho(S)-I.e-1,s=o%D,t.d[0]=K(10,s<0?D+s:s),e==null)e=o>0?t:d;else{if(a=new R(e),!a.isInt()||a.lt(d))throw Error(De+a);e=a.gt(t)?o>0?t:d:a}for(_=!1,a=new R(z(S)),g=R.precision,R.precision=o=S.length*D*2;h=V(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=d,d=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=V(e.minus(r),n,0,1,1),l=l.plus(i.times(d)),r=r.plus(i.times(n)),l.s=d.s=I.s,T=V(d,n,o,1).minus(I).abs().cmp(V(l,r,o,1).minus(I).abs())<1?[d,n]:[l,r],R.precision=g,_=!0,T};C.toHexadecimal=C.toHex=function(e,t){return Cn(this,16,e,t)};C.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ne(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(_=!1,r=V(r,e,0,t,1).times(e),_=!0,k(r)):(e.s=r.s,r=e),r};C.toNumber=function(){return+this};C.toOctal=function(e,t){return Cn(this,8,e,t)};C.toPower=C.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,d=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(K(+a,d));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=X(e.e/D),t>=e.d.length-1&&(r=d<0?-d:d)<=Fl)return i=yo(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):(_=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=An(e.times(ke(a,n+r)),n),i.d&&(i=k(i,n+5,1),Ct(i.d,n,o)&&(t=n+10,i=k(An(e.times(ke(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,_=!0,l.rounding=o,k(i,n,o))};C.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ne(e,1,Me),t===void 0?t=i.rounding:ne(t,0,8),n=k(new i(n),e,t),r=ye(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toSignificantDigits=C.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ne(e,1,Me),t===void 0?t=n.rounding:ne(t,0,8)),k(new n(r),e,t)};C.toString=function(){var e=this,t=e.constructor,r=ye(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};C.truncated=C.trunc=function(){return k(new this.constructor(this),this.e+1,1)};C.valueOf=C.toJSON=function(){var e=this,t=e.constructor,r=ye(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(De+e)}function Ct(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=D,i=0):(i=Math.ceil((t+1)/D),t%=D),o=K(10,D-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)==K(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)==K(10,t-3)-1,s}function wr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function Ul(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Ar(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var V=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 d,g,h,T,I,S,R,M,F,B,O,L,oe,J,en,rr,bt,tn,ce,nr,ir=n.constructor,rn=n.s==i.s?1:-1,Y=n.d,$=i.d;if(!Y||!Y[0]||!$||!$[0])return new ir(!n.s||!i.s||(Y?$&&Y[0]==$[0]:!$)?NaN:Y&&Y[0]==0||!$?rn*0:rn/0);for(l?(I=1,g=n.e-i.e):(l=pe,I=D,g=X(n.e/I)-X(i.e/I)),ce=$.length,bt=Y.length,F=new ir(rn),B=F.d=[],h=0;$[h]==(Y[h]||0);h++);if($[h]>(Y[h]||0)&&g--,o==null?(J=o=ir.precision,s=ir.rounding):a?J=o+(n.e-i.e)+1:J=o,J<0)B.push(1),S=!0;else{if(J=J/I+2|0,h=0,ce==1){for(T=0,$=$[0],J++;(h1&&($=e($,T,l),Y=e(Y,T,l),ce=$.length,bt=Y.length),rr=ce,O=Y.slice(0,ce),L=O.length;L=l/2&&++tn;do T=0,d=t($,O,ce,L),d<0?(oe=O[0],ce!=L&&(oe=oe*l+(O[1]||0)),T=oe/tn|0,T>1?(T>=l&&(T=l-1),R=e($,T,l),M=R.length,L=O.length,d=t(R,O,M,L),d==1&&(T--,r(R,ce=10;T/=10)h++;F.e=h+g*I-1,k(F,a?o+F.e+1:o,s,S)}return F}}();function k(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=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+=D,s=t,g=h[T=0],l=g/K(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/D),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=D,s=o-D+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=D,s=o-D+i,l=s<0?0:g/K(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%K(10,i-s-1)),d=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/K(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,d?(t-=e.e+1,h[0]=K(10,(D-t%D)%D),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=K(10,D-o),h[T]=s>0?(g/K(10,i-s)%K(10,s)|0)*a:0),d)for(;;)if(T==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[T]+=a,h[T]!=pe)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return _&&(e.e>I.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Oe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Oe(-i-1)+o,r&&(n=r-s)>0&&(o+=Oe(n))):i>=s?(o+=Oe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Oe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Oe(n))),o}function Tr(e,t){var r=e[0];for(t*=D;r>=10;r/=10)t++;return t}function Pr(e,t,r){if(t>Ll)throw _=!0,r&&(e.precision=r),Error(po);return k(new e(br),t,1,!0)}function he(e,t,r){if(t>Tn)throw Error(po);return k(new e(xr),t,r,!0)}function ho(e){var t=e.length-1,r=t*D+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Oe(e){for(var t="";e--;)t+="0";return t}function yo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/D+4);for(_=!1;;){if(r%2&&(o=o.times(t),lo(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),lo(t.d,s)}return _=!0,o}function ao(e){return e.d[e.d.length-1]&1}function wo(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(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=S):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(K(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=k(o.times(e),l,1),r=r.times(++g),a=s.plus(V(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(d<3&&Ct(s.d,l-n,I,d))T.precision=l+=10,r=o=a=new T(1),g=0,d++;else return k(s,T.precision=S,I,_=!0);else return T.precision=S,s}s=a}}function ke(e,t){var r,n,i,o,s,a,l,d,g,h,T,I=1,S=10,R=e,M=R.d,F=R.constructor,B=F.rounding,O=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=O):g=t,F.precision=g+=S,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),I++;o=R.e,n>1?(R=new F("0."+r),o++):R=new F(n+"."+r.slice(1))}else return d=Pr(F,g+2,O).times(o+""),R=ke(new F(n+"."+r.slice(1)),g-S).plus(d),F.precision=O,t==null?k(R,O,B,_=!0):R;for(h=R,l=s=R=V(R.minus(1),R.plus(1),g,1),T=k(R.times(R),g,1),i=3;;){if(s=k(s.times(T),g,1),d=l.plus(V(s,new F(i),g,1)),z(d.d).slice(0,g)===z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(Pr(F,g+2,O).times(o+""))),l=V(l,new F(I),g,1),t==null)if(Ct(l.d,g-S,B,a))F.precision=g+=S,d=s=R=V(h.minus(1),h.plus(1),g,1),T=k(R.times(R),g,1),i=a=1;else return k(l,F.precision=O,B,_=!0);else return F.precision=O,l;l=d,i+=2}}function Eo(e){return String(e.s*e.s/0)}function Er(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)%D,r<0&&(n+=D),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),go.test(t))return Er(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(_l.test(t))r=16,t=t.toLowerCase();else if(Ml.test(t))r=2;else if(Nl.test(t))r=8;else throw Error(De+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=yo(n,new n(r),o,o*2)),d=wr(t,r,pe),g=d.length-1,o=g;d[o]===0;--o)d.pop();return o<0?new n(e.s*0):(e.e=Tr(d,g),e.d=d,_=!1,s&&(e=V(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?K(2,l):ve.pow(2,l))),_=!0,e)}function ql(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Ar(5,r)),t=tt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function tt(e,t,r,n,i){var o,s,a,l,d=1,g=e.precision,h=Math.ceil(g/D);for(_=!1,l=r.times(r),a=new e(n);;){if(s=V(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=V(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,d++}return _=!0,s.d.length=h+1,s}function Ar(e,t){for(var r=e;--t;)r*=e;return r}function bo(e,t){var r,n=t.s<0,i=he(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Pe=n?4:1,t;if(r=t.divToInt(i),r.isZero())Pe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Pe=ao(r)?n?2:3:n?4:1,t;Pe=ao(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Cn(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=e.constructor,S=r!==void 0;if(S?(ne(r,1,Me),n===void 0?n=I.rounding:ne(n,0,8)):(r=I.precision,n=I.rounding),!e.isFinite())g=Eo(e);else{for(g=ye(e),s=g.indexOf("."),S?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new I(1),T.e=g.length-s,T.d=wr(ye(T),10,i),T.e=T.d.length),h=wr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=S?"0p+0":"0";else{if(s<0?o--:(e=new I(e),e.d=h,e.e=o,e=V(e,T,r,n,0,i),h=e.d,o=e.e,d=co),s=h[r],a=i/2,d=d||h[r+1]!==void 0,d=n<4?(s!==void 0||d)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||d||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,d)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=wr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function Vl(e){return new this(e).abs()}function $l(e){return new this(e).acos()}function jl(e){return new this(e).acosh()}function Gl(e,t){return new this(e).plus(t)}function Jl(e){return new this(e).asin()}function Ql(e){return new this(e).asinh()}function Kl(e){return new this(e).atan()}function Wl(e){return new this(e).atanh()}function Hl(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=he(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?he(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=he(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(V(e,t,o,1)),t=he(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(V(e,t,o,1)),r}function zl(e){return new this(e).cbrt()}function Yl(e){return k(e=new this(e),e.e+1,2)}function Zl(e,t,r){return new this(e).clamp(t,r)}function Xl(e){if(!e||typeof e!="object")throw Error(vr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Me,"rounding",0,8,"toExpNeg",-et,0,"toExpPos",0,et,"maxE",0,et,"minE",-et,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(De+r+": "+n);if(r="crypto",i&&(this[r]=vn[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(mo);else this[r]=!1;else throw Error(De+r+": "+n);return this}function eu(e){return new this(e).cos()}function tu(e){return new this(e).cosh()}function xo(e){var t,r,n;function i(o){var s,a,l,d=this;if(!(d instanceof i))return new i(o);if(d.constructor=i,uo(o)){d.s=o.s,_?!o.d||o.e>i.maxE?(d.e=NaN,d.d=null):o.e=10;a/=10)s++;_?s>i.maxE?(d.e=NaN,d.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(mo);else for(;o=10;i/=10)n++;nRt,datamodelEnumToSchemaEnum:()=>Cu});f();u();c();p();m();f();u();c();p();m();function Cu(e){return{name:e.name,values:e.values.map(t=>t.name)}}f();u();c();p();m();var Rt=(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.updateManyAndReturn="updateManyAndReturn",O.upsert="upsert",O.delete="delete",O.deleteMany="deleteMany",O.groupBy="groupBy",O.count="count",O.aggregate="aggregate",O.findRaw="findRaw",O.aggregateRaw="aggregateRaw",O))(Rt||{});var Ru=Ue(Zi());var Su={red:Ye,gray:Ui,dim:ur,bold:lr,underline:Mi,highlightSource:e=>e.highlight()},Iu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Ou({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function ku({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(Du(t))),i){a.push("");let d=[i.toString()];o&&(d.push(o),d.push(s.dim(")"))),a.push(d.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +var fa=Object.create;var nn=Object.defineProperty;var da=Object.getOwnPropertyDescriptor;var ga=Object.getOwnPropertyNames;var ha=Object.getPrototypeOf,ya=Object.prototype.hasOwnProperty;var fe=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),or=(e,t)=>{for(var r in t)nn(e,r,{get:t[r],enumerable:!0})},wa=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ga(t))!ya.call(e,i)&&i!==r&&nn(e,i,{get:()=>t[i],enumerable:!(n=da(t,i))||n.enumerable});return e};var Ue=(e,t,r)=>(r=e!=null?fa(ha(e)):{},wa(t||!e||!e.__esModule?nn(r,"default",{value:e,enumerable:!0}):r,e));var y,b,u=fe(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:b}=y});var x,c=fe(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,p=fe(()=>{"use strict";E=()=>{};E.prototype=E});var m=fe(()=>{"use strict"});var vi=Ce(ze=>{"use strict";f();u();c();p();m();var ui=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ea=ui(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=I;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=S.indexOf("=");M===-1&&(M=R);var F=M===R?0:4-M%4;return[M,F]}function l(S){var R=a(S),M=R[0],F=R[1];return(M+F)*3/4-F}function d(S,R,M){return(R+M)*3/4-M}function g(S){var R,M=a(S),F=M[0],B=M[1],O=new n(d(S,F,B)),L=0,oe=B>0?F-4:F,J;for(J=0;J>16&255,O[L++]=R>>8&255,O[L++]=R&255;return B===2&&(R=r[S.charCodeAt(J)]<<2|r[S.charCodeAt(J+1)]>>4,O[L++]=R&255),B===1&&(R=r[S.charCodeAt(J)]<<10|r[S.charCodeAt(J+1)]<<4|r[S.charCodeAt(J+2)]>>2,O[L++]=R>>8&255,O[L++]=R&255),O}function h(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function T(S,R,M){for(var F,B=[],O=R;Ooe?oe:L+O));return F===1?(R=S[M-1],B.push(t[R>>2]+t[R<<4&63]+"==")):F===2&&(R=(S[M-2]<<8)+S[M-1],B.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),B.join("")}}),ba=ui(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,d=(1<>1,h=-7,T=n?o-1:0,I=n?-1:1,S=t[r+T];for(T+=I,s=S&(1<<-h)-1,S>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=I,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=I,h-=8);if(s===0)s=1-g;else{if(s===d)return a?NaN:(S?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(S?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,d,g=s*8-o-1,h=(1<>1,I=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=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*(d=Math.pow(2,-a))<1&&(a--,d*=2),a+T>=1?r+=I/d:r+=I*Math.pow(2,1-T),r*d>=2&&(a++,d/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*d-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+S]=l&255,S+=R,l/=256,o-=8);for(a=a<0;t[n+S]=a&255,S+=R,a/=256,g-=8);t[n+S-R]|=M*128}}),on=Ea(),We=ba(),oi=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.Buffer=A;ze.SlowBuffer=Ca;ze.INSPECT_MAX_BYTES=50;var sr=2147483647;ze.kMaxLength=sr;A.TYPED_ARRAY_SUPPORT=xa();!A.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 xa(){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(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}});Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function xe(e){if(e>sr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(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 ln(e)}return ci(e,t,r)}A.poolSize=8192;function ci(e,t,r){if(typeof e=="string")return va(e,t);if(ArrayBuffer.isView(e))return Ta(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(de(e,ArrayBuffer)||e&&de(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(de(e,SharedArrayBuffer)||e&&de(e.buffer,SharedArrayBuffer)))return mi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return A.from(n,t,r);let i=Aa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return A.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)}A.from=function(e,t,r){return ci(e,t,r)};Object.setPrototypeOf(A.prototype,Uint8Array.prototype);Object.setPrototypeOf(A,Uint8Array);function pi(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 Pa(e,t,r){return pi(e),e<=0?xe(e):t!==void 0?typeof r=="string"?xe(e).fill(t,r):xe(e).fill(t):xe(e)}A.alloc=function(e,t,r){return Pa(e,t,r)};function ln(e){return pi(e),xe(e<0?0:un(e)|0)}A.allocUnsafe=function(e){return ln(e)};A.allocUnsafeSlow=function(e){return ln(e)};function va(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=fi(e,t)|0,n=xe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function sn(e){let t=e.length<0?0:un(e.length)|0,r=xe(t);for(let n=0;n=sr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+sr.toString(16)+" bytes");return e|0}function Ca(e){return+e!=e&&(e=0),A.alloc(+e)}A.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==A.prototype};A.compare=function(e,t){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),de(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(e)||!A.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?(A.isBuffer(o)||(o=A.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(A.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function fi(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||de(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return an(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Pi(e).length;default:if(i)return n?-1:an(e).length;t=(""+t).toLowerCase(),i=!0}}A.byteLength=fi;function Ra(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 La(this,t,r);case"utf8":case"utf-8":return gi(this,t,r);case"ascii":return Na(this,t,r);case"latin1":case"binary":return Fa(this,t,r);case"base64":return Ma(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ua(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}A.prototype._isBuffer=!0;function Be(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}A.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+=" ... "),""};oi&&(A.prototype[oi]=A.prototype.inspect);A.prototype.compare=function(e,t,r,n,i){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.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),d=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,pn(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=A.from(t,n)),A.isBuffer(t))return t.length===0?-1:si(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):si(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function si(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 d;if(i){let g=-1;for(d=r;ds&&(r=s-a),d=r;d>=0;d--){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 Sa(this,e,t,r);case"utf8":case"utf-8":return Ia(this,e,t,r);case"ascii":case"latin1":case"binary":return Oa(this,e,t,r);case"base64":return ka(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Da(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ma(e,t,r){return t===0&&r===e.length?on.fromByteArray(e):on.fromByteArray(e.slice(t,r))}function gi(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,d,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],d=e[i+2],(l&192)===128&&(d&192)===128&&(h=(o&15)<<12|(l&63)<<6|d&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],d=e[i+2],g=e[i+3],(l&192)===128&&(d&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(d&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 _a(n)}var ai=4096;function _a(e){let t=e.length;if(t<=ai)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")}A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};A.prototype.readBigUInt64LE=Re(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(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,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(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||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};A.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(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};A.prototype.readInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};A.prototype.readInt16LE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};A.prototype.readInt16BE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};A.prototype.readInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};A.prototype.readInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};A.prototype.readBigInt64LE=Re(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(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,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||W(e,4,this.length),We.read(this,e,!0,23,4)};A.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),We.read(this,e,!1,23,4)};A.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!0,52,8)};A.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.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};A.prototype.writeUint8=A.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};A.prototype.writeUint16LE=A.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};A.prototype.writeUint16BE=A.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};A.prototype.writeUint32LE=A.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};A.prototype.writeUint32BE=A.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 hi(e,t,r,n,i){xi(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 yi(e,t,r,n,i){xi(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}A.prototype.writeBigUInt64LE=Re(function(e,t=0){return hi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeBigUInt64BE=Re(function(e,t=0){return yi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.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};A.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};A.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};A.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};A.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};A.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};A.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};A.prototype.writeBigInt64LE=Re(function(e,t=0){return hi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});A.prototype.writeBigInt64BE=Re(function(e,t=0){return yi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function wi(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 Ei(e,t,r,n,i){return t=+t,r=r>>>0,i||wi(e,t,r,4,34028234663852886e22,-34028234663852886e22),We.write(e,t,r,n,23,4),r+4}A.prototype.writeFloatLE=function(e,t,r){return Ei(this,e,t,!0,r)};A.prototype.writeFloatBE=function(e,t,r){return Ei(this,e,t,!1,r)};function bi(e,t,r,n,i){return t=+t,r=r>>>0,i||wi(e,t,r,8,17976931348623157e292,-17976931348623157e292),We.write(e,t,r,n,52,8),r+8}A.prototype.writeDoubleLE=function(e,t,r){return bi(this,e,t,!0,r)};A.prototype.writeDoubleBE=function(e,t,r){return bi(this,e,t,!1,r)};A.prototype.copy=function(e,t,r,n){if(!A.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=li(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=li(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function li(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 Ba(e,t,r){He(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&xt(t,e.length-(r+1))}function xi(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 Ke.ERR_OUT_OF_RANGE("value",a,e)}Ba(n,i,o)}function He(e,t){if(typeof e!="number")throw new Ke.ERR_INVALID_ARG_TYPE(t,"number",e)}function xt(e,t,r){throw Math.floor(e)!==e?(He(e,r),new Ke.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Ke.ERR_BUFFER_OUT_OF_BOUNDS:new Ke.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var qa=/[^+/0-9A-Za-z-_]/g;function Va(e){if(e=e.split("=")[0],e=e.trim().replace(qa,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function an(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 $a(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function Pi(e){return on.toByteArray(Va(e))}function ar(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function de(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function pn(e){return e!==e}var Ga=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Re(e){return typeof BigInt>"u"?Ja:e}function Ja(){throw new Error("BigInt not supported")}});var w,f=fe(()=>{"use strict";w=Ue(vi())});function Ya(){return!1}function dn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function Za(){return dn()}function Xa(){return[]}function el(e){e(null,[])}function tl(){return""}function rl(){return""}function nl(){}function il(){}function ol(){}function sl(){}function al(){}function ll(){}function ul(){}function cl(){}function pl(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function ml(e,t){t(null,dn())}var fl,dl,$i,ji=fe(()=>{"use strict";f();u();c();p();m();fl={},dl={existsSync:Ya,lstatSync:dn,stat:ml,statSync:Za,readdirSync:Xa,readdir:el,readlinkSync:tl,realpathSync:rl,chmodSync:nl,renameSync:il,mkdirSync:ol,rmdirSync:sl,rmSync:al,unlinkSync:ll,watchFile:ul,unwatchFile:cl,watch:pl,promises:fl},$i=dl});function gl(...e){return e.join("/")}function hl(...e){return e.join("/")}function yl(e){let t=Gi(e),r=Ji(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Gi(e){let t=e.split("/");return t[t.length-1]}function Ji(e){return e.split("/").slice(0,-1).join("/")}function El(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var Qi,wl,bl,xl,pr,Ki=fe(()=>{"use strict";f();u();c();p();m();Qi="/",wl=":";bl={sep:Qi},xl={basename:Gi,delimiter:wl,dirname:Ji,join:hl,normalize:El,parse:yl,posix:bl,resolve:gl,sep:Qi},pr=xl});var Wi=Ce((xf,Pl)=>{Pl.exports={name:"@prisma/internals",version:"6.15.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb","@prisma/schema-engine-wasm":"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var hn=Ce((_f,Cl)=>{Cl.exports={name:"@prisma/engines-version",version:"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"85179d7826409ee107a6ba334b5e305ae3fba9fb"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Hi=Ce(mr=>{"use strict";f();u();c();p();m();Object.defineProperty(mr,"__esModule",{value:!0});mr.enginesVersion=void 0;mr.enginesVersion=hn().prisma.enginesVersion});var Zi=Ce((Kf,Yi)=>{"use strict";f();u();c();p();m();Yi.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 to=Ce((od,eo)=>{"use strict";f();u();c();p();m();eo.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 no=Ce((pd,ro)=>{"use strict";f();u();c();p();m();var kl=to();ro.exports=e=>typeof e=="string"?e.replace(kl(),""):e});var Rn=Ce((Jy,Po)=>{"use strict";f();u();c();p();m();Po.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";f();u();c();p();m()});var So=fe(()=>{"use strict";f();u();c();p();m()});var Vr,Ho=fe(()=>{"use strict";f();u();c();p();m();Vr=class{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}}});f();u();c();p();m();var Ci={};or(Ci,{defineExtension:()=>Ti,getExtensionContext:()=>Ai});f();u();c();p();m();f();u();c();p();m();function Ti(e){return typeof e=="function"?e:t=>t.$extends(e)}f();u();c();p();m();function Ai(e){return e}var Si={};or(Si,{validator:()=>Ri});f();u();c();p();m();f();u();c();p();m();function Ri(...e){return t=>t}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var mn,Ii,Oi,ki,Di=!0;typeof y<"u"&&({FORCE_COLOR:mn,NODE_DISABLE_COLORS:Ii,NO_COLOR:Oi,TERM:ki}=y.env||{},Di=y.stdout&&y.stdout.isTTY);var Qa={enabled:!Ii&&Oi==null&&ki!=="dumb"&&(mn!=null&&mn!=="0"||Di)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Qa.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var vm=j(0,0),lr=j(1,22),ur=j(2,22),Tm=j(3,23),Mi=j(4,24),Am=j(7,27),Cm=j(8,28),Rm=j(9,29),Sm=j(30,39),Ye=j(31,39),_i=j(32,39),Ni=j(33,39),Fi=j(34,39),Im=j(35,39),Li=j(36,39),Om=j(37,39),Ui=j(90,39),km=j(90,39),Dm=j(40,49),Mm=j(41,49),_m=j(42,49),Nm=j(43,49),Fm=j(44,49),Lm=j(45,49),Um=j(46,49),Bm=j(47,49);f();u();c();p();m();var Ka=100,Bi=["green","yellow","blue","magenta","cyan","red"],cr=[],qi=Date.now(),Wa=0,fn=typeof y<"u"?y.env:{};globalThis.DEBUG??=fn.DEBUG??"";globalThis.DEBUG_COLORS??=fn.DEBUG_COLORS?fn.DEBUG_COLORS==="true":!0;var Pt={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 Ha(e){let t={color:Bi[Wa++%Bi.length],enabled:Pt.enabled(e),namespace:e,log:Pt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&cr.push([o,...n]),cr.length>Ka&&cr.shift(),Pt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:za(g)),d=`+${Date.now()-qi}ms`;qi=Date.now(),a(o,...l,d)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Z=new Proxy(Ha,{get:(e,t)=>Pt[t],set:(e,t,r)=>Pt[t]=r});function za(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Vi(){cr.length=0}f();u();c();p();m();f();u();c();p();m();var vl=Wi(),gn=vl.version;f();u();c();p();m();function Ze(e){let t=Tl();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Al(e))}function Tl(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Al(e){return e?.previewFeatures.includes("queryCompiler")?"client":"library"}f();u();c();p();m();var zi="prisma+postgres",fr=`${zi}:`;function dr(e){return e?.toString().startsWith(`${fr}//`)??!1}function yn(e){if(!dr(e))return!1;let{host:t}=new URL(e);return t.includes("localhost")||t.includes("127.0.0.1")||t.includes("[::1]")}var Tt={};or(Tt,{error:()=>Il,info:()=>Sl,log:()=>Rl,query:()=>Ol,should:()=>Xi,tags:()=>vt,warn:()=>wn});f();u();c();p();m();var vt={error:Ye("prisma:error"),warn:Ni("prisma:warn"),info:Li("prisma:info"),query:Fi("prisma:query")},Xi={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Rl(...e){console.log(...e)}function wn(e,...t){Xi.warn()&&console.warn(`${vt.warn} ${e}`,...t)}function Sl(e,...t){console.info(`${vt.info} ${e}`,...t)}function Il(e,...t){console.error(`${vt.error} ${e}`,...t)}function Ol(e,...t){console.log(`${vt.query} ${e}`,...t)}f();u();c();p();m();function qe(e,t){throw new Error(t)}f();u();c();p();m();function En(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();u();c();p();m();function gr(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();u();c();p();m();function bn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{io.has(e)||(io.add(e),wn(t,...r))};var Q=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};N(Q,"PrismaClientInitializationError");f();u();c();p();m();var se=class extends Error{code;meta;clientVersion;batchRequestIdx;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(se,"PrismaClientKnownRequestError");f();u();c();p();m();var Se=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(Se,"PrismaClientRustPanicError");f();u();c();p();m();var ae=class extends Error{clientVersion;batchRequestIdx;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(ae,"PrismaClientUnknownRequestError");f();u();c();p();m();var ee=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};N(ee,"PrismaClientValidationError");f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var ge=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};f();u();c();p();m();function Ie(e){return e.substring(0,1).toLowerCase()+e.substring(1)}f();u();c();p();m();function so(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}f();u();c();p();m();function At(e){let t;return{get(){return t||(t={value:e()}),t.value}}}f();u();c();p();m();function Dl(e){return{models:xn(e.models),enums:xn(e.enums),types:xn(e.types)}}function xn(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}f();u();c();p();m();function Xe(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function yr(e){return e.toString()!=="Invalid Date"}f();u();c();p();m();f();u();c();p();m();var et=9e15,Me=1e9,Pn="0123456789abcdef",br="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",xr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",vn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-et,maxE:et,crypto:!1},co,Pe,_=!0,vr="[DecimalError] ",De=vr+"Invalid argument: ",po=vr+"Precision limit exceeded",mo=vr+"crypto unavailable",fo="[object Decimal]",X=Math.floor,K=Math.pow,Ml=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,_l=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Nl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,go=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,D=7,Fl=9007199254740991,Ll=br.length-1,Tn=xr.length-1,C={toStringTag:fo};C.absoluteValue=C.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),k(e)};C.ceil=function(){return k(new this.constructor(this),this.e+1,2)};C.clampedTo=C.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(De+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};C.comparedTo=C.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,d=e.s;if(!s||!a)return!l||!d?NaN:l!==d?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-d:0;if(l!==d)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};C.cosine=C.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Ul(n,bo(n,r)),n.precision=e,n.rounding=t,k(Pe==2||Pe==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};C.cubeRoot=C.cbrt=function(){var e,t,r,n,i,o,s,a,l,d,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(_=!1,o=g.s*K(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=K(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),d=l.plus(g),n=V(d.plus(g).times(a),d.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 _=!0,k(n,e,h.rounding,t)};C.decimalPlaces=C.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-X(this.e/D))*D,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};C.dividedBy=C.div=function(e){return V(this,new this.constructor(e))};C.dividedToIntegerBy=C.divToInt=function(e){var t=this,r=t.constructor;return k(V(t,new r(e),0,1,1),r.precision,r.rounding)};C.equals=C.eq=function(e){return this.cmp(e)===0};C.floor=function(){return k(new this.constructor(this),this.e+1,3)};C.greaterThan=C.gt=function(e){return this.cmp(e)>0};C.greaterThanOrEqualTo=C.gte=function(e){var t=this.cmp(e);return t==1||t===0};C.hyperbolicCosine=C.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Ar(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=tt(s,1,o.times(t),new s(1),!0);for(var l,d=e,g=new s(8);d--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return k(o,s.precision=r,s.rounding=n,!0)};C.hyperbolicSine=C.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=tt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Ar(5,e)),i=tt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),d=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(d))))}return o.precision=t,o.rounding=r,k(i,t,r,!0)};C.hyperbolicTangent=C.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,V(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};C.inverseCosine=C.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?he(t,n,i):new t(0):new t(NaN):e.isZero()?he(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};C.inverseHyperbolicCosine=C.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,_=!1,r=r.times(r).minus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};C.inverseHyperbolicSine=C.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,_=!1,r=r.times(r).plus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln())};C.inverseHyperbolicTangent=C.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?k(new o(i),e,t,!0):(o.precision=r=n-i.e,i=V(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};C.inverseSine=C.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=he(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};C.inverseTangent=C.atan=function(){var e,t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding;if(d.isFinite()){if(d.isZero())return new g(d);if(d.abs().eq(1)&&h+4<=Tn)return s=he(g,h+4,T).times(.25),s.s=d.s,s}else{if(!d.s)return new g(NaN);if(h+4<=Tn)return s=he(g,h+4,T).times(.5),s.s=d.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/D+2|0),e=r;e;--e)d=d.div(d.times(d).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(a/D),n=1,l=d.times(d),s=new g(d),i=d;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};C.isNaN=function(){return!this.s};C.isNegative=C.isNeg=function(){return this.s<0};C.isPositive=C.isPos=function(){return this.s>0};C.isZero=function(){return!!this.d&&this.d[0]===0};C.lessThan=C.lt=function(e){return this.cmp(e)<0};C.lessThanOrEqualTo=C.lte=function(e){return this.cmp(e)<1};C.logarithm=C.log=function(e){var t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding,I=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=d.d,d.s<0||!r||!r[0]||d.eq(1))return new g(r&&!r[0]?-1/0:d.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+I,s=ke(d,a),n=t?Pr(g,a+10):ke(e,a),l=V(s,n,a,1),Ct(l.d,i=h,T))do if(a+=10,s=ke(d,a),n=t?Pr(g,a+10):ke(e,a),l=V(s,n,a,1),!o){+z(l.d).slice(i+1,i+15)+1==1e14&&(l=k(l,h+1,0));break}while(Ct(l.d,i+=10,T));return _=!0,k(l,h,T)};C.minus=C.sub=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.constructor;if(e=new S(e),!I.d||!e.d)return!I.s||!e.s?e=new S(NaN):I.d?e.s=-e.s:e=new S(e.d||I.s!==e.s?I:NaN),e;if(I.s!=e.s)return e.s=-e.s,I.plus(e);if(d=I.d,T=e.d,a=S.precision,l=S.rounding,!d[0]||!T[0]){if(T[0])e.s=-e.s;else if(d[0])e=new S(I);else return new S(l===3?-0:0);return _?k(e,a,l):e}if(r=X(e.e/D),g=X(I.e/D),d=d.slice(),o=g-r,o){for(h=o<0,h?(t=d,o=-o,s=T.length):(t=T,r=g,s=d.length),n=Math.max(Math.ceil(a/D),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=d.length,s=T.length,h=n0;--n)d[s++]=0;for(n=T.length;n>o;){if(d[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=d.length,i=g.length,s-i<0&&(i=s,r=g,g=d,d=r),t=0;i;)t=(d[--i]=d[i]+g[i]+t)/pe|0,d[i]%=pe;for(t&&(d.unshift(t),++n),s=d.length;d[--s]==0;)d.pop();return e.d=d,e.e=Tr(d,n),_?k(e,a,l):e};C.precision=C.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(De+e);return r.d?(t=ho(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};C.round=function(){var e=this,t=e.constructor;return k(new t(e),e.e+1,t.rounding)};C.sine=C.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=ql(n,bo(n,r)),n.precision=e,n.rounding=t,k(Pe>2?r.neg():r,e,t,!0)):new n(NaN)};C.squareRoot=C.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,d=s.s,g=s.constructor;if(d!==1||!a||!a[0])return new g(!d||d<0&&(!a||a[0])?NaN:a?s:1/0);for(_=!1,d=Math.sqrt(+s),d==0||d==1/0?(t=z(a),(t.length+l)%2==0&&(t+="0"),d=Math.sqrt(t),l=X((l+1)/2)-(l<0||l%2),d==1/0?t="5e"+l:(t=d.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(d.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(V(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 _=!0,k(n,l,g.rounding,e)};C.tangent=C.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=V(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,k(Pe==2||Pe==4?r.neg():r,e,t,!0)):new n(NaN)};C.times=C.mul=function(e){var t,r,n,i,o,s,a,l,d,g=this,h=g.constructor,T=g.d,I=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!I||!I[0])return new h(!e.s||T&&!T[0]&&!I||I&&!I[0]&&!T?NaN:!T||!I?e.s/0:e.s*0);for(r=X(g.e/D)+X(e.e/D),l=T.length,d=I.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+I[n]*T[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=Tr(o,r),_?k(e,h.precision,h.rounding):e};C.toBinary=function(e,t){return Cn(this,2,e,t)};C.toDecimalPlaces=C.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ne(e,0,Me),t===void 0?t=n.rounding:ne(t,0,8),k(r,e+r.e+1,t))};C.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,!0):(ne(e,0,Me),t===void 0?t=i.rounding:ne(t,0,8),n=k(new i(n),e+1,t),r=ye(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=ye(i):(ne(e,0,Me),t===void 0?t=o.rounding:ne(t,0,8),n=k(new o(i),e+i.e+1,t),r=ye(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};C.toFraction=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.d,R=I.constructor;if(!S)return new R(I);if(d=r=new R(1),n=l=new R(0),t=new R(n),o=t.e=ho(S)-I.e-1,s=o%D,t.d[0]=K(10,s<0?D+s:s),e==null)e=o>0?t:d;else{if(a=new R(e),!a.isInt()||a.lt(d))throw Error(De+a);e=a.gt(t)?o>0?t:d:a}for(_=!1,a=new R(z(S)),g=R.precision,R.precision=o=S.length*D*2;h=V(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=d,d=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=V(e.minus(r),n,0,1,1),l=l.plus(i.times(d)),r=r.plus(i.times(n)),l.s=d.s=I.s,T=V(d,n,o,1).minus(I).abs().cmp(V(l,r,o,1).minus(I).abs())<1?[d,n]:[l,r],R.precision=g,_=!0,T};C.toHexadecimal=C.toHex=function(e,t){return Cn(this,16,e,t)};C.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ne(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(_=!1,r=V(r,e,0,t,1).times(e),_=!0,k(r)):(e.s=r.s,r=e),r};C.toNumber=function(){return+this};C.toOctal=function(e,t){return Cn(this,8,e,t)};C.toPower=C.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,d=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(K(+a,d));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=X(e.e/D),t>=e.d.length-1&&(r=d<0?-d:d)<=Fl)return i=yo(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):(_=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=An(e.times(ke(a,n+r)),n),i.d&&(i=k(i,n+5,1),Ct(i.d,n,o)&&(t=n+10,i=k(An(e.times(ke(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,_=!0,l.rounding=o,k(i,n,o))};C.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ne(e,1,Me),t===void 0?t=i.rounding:ne(t,0,8),n=k(new i(n),e,t),r=ye(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toSignificantDigits=C.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ne(e,1,Me),t===void 0?t=n.rounding:ne(t,0,8)),k(new n(r),e,t)};C.toString=function(){var e=this,t=e.constructor,r=ye(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};C.truncated=C.trunc=function(){return k(new this.constructor(this),this.e+1,1)};C.valueOf=C.toJSON=function(){var e=this,t=e.constructor,r=ye(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(De+e)}function Ct(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=D,i=0):(i=Math.ceil((t+1)/D),t%=D),o=K(10,D-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)==K(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)==K(10,t-3)-1,s}function wr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function Ul(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Ar(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var V=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 d,g,h,T,I,S,R,M,F,B,O,L,oe,J,en,rr,bt,tn,ce,nr,ir=n.constructor,rn=n.s==i.s?1:-1,Y=n.d,$=i.d;if(!Y||!Y[0]||!$||!$[0])return new ir(!n.s||!i.s||(Y?$&&Y[0]==$[0]:!$)?NaN:Y&&Y[0]==0||!$?rn*0:rn/0);for(l?(I=1,g=n.e-i.e):(l=pe,I=D,g=X(n.e/I)-X(i.e/I)),ce=$.length,bt=Y.length,F=new ir(rn),B=F.d=[],h=0;$[h]==(Y[h]||0);h++);if($[h]>(Y[h]||0)&&g--,o==null?(J=o=ir.precision,s=ir.rounding):a?J=o+(n.e-i.e)+1:J=o,J<0)B.push(1),S=!0;else{if(J=J/I+2|0,h=0,ce==1){for(T=0,$=$[0],J++;(h1&&($=e($,T,l),Y=e(Y,T,l),ce=$.length,bt=Y.length),rr=ce,O=Y.slice(0,ce),L=O.length;L=l/2&&++tn;do T=0,d=t($,O,ce,L),d<0?(oe=O[0],ce!=L&&(oe=oe*l+(O[1]||0)),T=oe/tn|0,T>1?(T>=l&&(T=l-1),R=e($,T,l),M=R.length,L=O.length,d=t(R,O,M,L),d==1&&(T--,r(R,ce=10;T/=10)h++;F.e=h+g*I-1,k(F,a?o+F.e+1:o,s,S)}return F}}();function k(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=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+=D,s=t,g=h[T=0],l=g/K(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/D),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=D,s=o-D+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=D,s=o-D+i,l=s<0?0:g/K(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%K(10,i-s-1)),d=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/K(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,d?(t-=e.e+1,h[0]=K(10,(D-t%D)%D),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=K(10,D-o),h[T]=s>0?(g/K(10,i-s)%K(10,s)|0)*a:0),d)for(;;)if(T==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[T]+=a,h[T]!=pe)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return _&&(e.e>I.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Oe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Oe(-i-1)+o,r&&(n=r-s)>0&&(o+=Oe(n))):i>=s?(o+=Oe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Oe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Oe(n))),o}function Tr(e,t){var r=e[0];for(t*=D;r>=10;r/=10)t++;return t}function Pr(e,t,r){if(t>Ll)throw _=!0,r&&(e.precision=r),Error(po);return k(new e(br),t,1,!0)}function he(e,t,r){if(t>Tn)throw Error(po);return k(new e(xr),t,r,!0)}function ho(e){var t=e.length-1,r=t*D+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Oe(e){for(var t="";e--;)t+="0";return t}function yo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/D+4);for(_=!1;;){if(r%2&&(o=o.times(t),lo(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),lo(t.d,s)}return _=!0,o}function ao(e){return e.d[e.d.length-1]&1}function wo(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(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=S):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(K(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=k(o.times(e),l,1),r=r.times(++g),a=s.plus(V(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(d<3&&Ct(s.d,l-n,I,d))T.precision=l+=10,r=o=a=new T(1),g=0,d++;else return k(s,T.precision=S,I,_=!0);else return T.precision=S,s}s=a}}function ke(e,t){var r,n,i,o,s,a,l,d,g,h,T,I=1,S=10,R=e,M=R.d,F=R.constructor,B=F.rounding,O=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=O):g=t,F.precision=g+=S,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),I++;o=R.e,n>1?(R=new F("0."+r),o++):R=new F(n+"."+r.slice(1))}else return d=Pr(F,g+2,O).times(o+""),R=ke(new F(n+"."+r.slice(1)),g-S).plus(d),F.precision=O,t==null?k(R,O,B,_=!0):R;for(h=R,l=s=R=V(R.minus(1),R.plus(1),g,1),T=k(R.times(R),g,1),i=3;;){if(s=k(s.times(T),g,1),d=l.plus(V(s,new F(i),g,1)),z(d.d).slice(0,g)===z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(Pr(F,g+2,O).times(o+""))),l=V(l,new F(I),g,1),t==null)if(Ct(l.d,g-S,B,a))F.precision=g+=S,d=s=R=V(h.minus(1),h.plus(1),g,1),T=k(R.times(R),g,1),i=a=1;else return k(l,F.precision=O,B,_=!0);else return F.precision=O,l;l=d,i+=2}}function Eo(e){return String(e.s*e.s/0)}function Er(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)%D,r<0&&(n+=D),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),go.test(t))return Er(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(_l.test(t))r=16,t=t.toLowerCase();else if(Ml.test(t))r=2;else if(Nl.test(t))r=8;else throw Error(De+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=yo(n,new n(r),o,o*2)),d=wr(t,r,pe),g=d.length-1,o=g;d[o]===0;--o)d.pop();return o<0?new n(e.s*0):(e.e=Tr(d,g),e.d=d,_=!1,s&&(e=V(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?K(2,l):ve.pow(2,l))),_=!0,e)}function ql(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Ar(5,r)),t=tt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function tt(e,t,r,n,i){var o,s,a,l,d=1,g=e.precision,h=Math.ceil(g/D);for(_=!1,l=r.times(r),a=new e(n);;){if(s=V(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=V(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,d++}return _=!0,s.d.length=h+1,s}function Ar(e,t){for(var r=e;--t;)r*=e;return r}function bo(e,t){var r,n=t.s<0,i=he(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Pe=n?4:1,t;if(r=t.divToInt(i),r.isZero())Pe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Pe=ao(r)?n?2:3:n?4:1,t;Pe=ao(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Cn(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=e.constructor,S=r!==void 0;if(S?(ne(r,1,Me),n===void 0?n=I.rounding:ne(n,0,8)):(r=I.precision,n=I.rounding),!e.isFinite())g=Eo(e);else{for(g=ye(e),s=g.indexOf("."),S?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new I(1),T.e=g.length-s,T.d=wr(ye(T),10,i),T.e=T.d.length),h=wr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=S?"0p+0":"0";else{if(s<0?o--:(e=new I(e),e.d=h,e.e=o,e=V(e,T,r,n,0,i),h=e.d,o=e.e,d=co),s=h[r],a=i/2,d=d||h[r+1]!==void 0,d=n<4?(s!==void 0||d)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||d||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,d)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=wr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function Vl(e){return new this(e).abs()}function $l(e){return new this(e).acos()}function jl(e){return new this(e).acosh()}function Gl(e,t){return new this(e).plus(t)}function Jl(e){return new this(e).asin()}function Ql(e){return new this(e).asinh()}function Kl(e){return new this(e).atan()}function Wl(e){return new this(e).atanh()}function Hl(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=he(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?he(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=he(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(V(e,t,o,1)),t=he(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(V(e,t,o,1)),r}function zl(e){return new this(e).cbrt()}function Yl(e){return k(e=new this(e),e.e+1,2)}function Zl(e,t,r){return new this(e).clamp(t,r)}function Xl(e){if(!e||typeof e!="object")throw Error(vr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Me,"rounding",0,8,"toExpNeg",-et,0,"toExpPos",0,et,"maxE",0,et,"minE",-et,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(De+r+": "+n);if(r="crypto",i&&(this[r]=vn[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(mo);else this[r]=!1;else throw Error(De+r+": "+n);return this}function eu(e){return new this(e).cos()}function tu(e){return new this(e).cosh()}function xo(e){var t,r,n;function i(o){var s,a,l,d=this;if(!(d instanceof i))return new i(o);if(d.constructor=i,uo(o)){d.s=o.s,_?!o.d||o.e>i.maxE?(d.e=NaN,d.d=null):o.e=10;a/=10)s++;_?s>i.maxE?(d.e=NaN,d.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(mo);else for(;o=10;i/=10)n++;nRt,datamodelEnumToSchemaEnum:()=>Cu});f();u();c();p();m();f();u();c();p();m();function Cu(e){return{name:e.name,values:e.values.map(t=>t.name)}}f();u();c();p();m();var Rt=(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.updateManyAndReturn="updateManyAndReturn",O.upsert="upsert",O.delete="delete",O.deleteMany="deleteMany",O.groupBy="groupBy",O.count="count",O.aggregate="aggregate",O.findRaw="findRaw",O.aggregateRaw="aggregateRaw",O))(Rt||{});var Ru=Ue(Zi());var Su={red:Ye,gray:Ui,dim:ur,bold:lr,underline:Mi,highlightSource:e=>e.highlight()},Iu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Ou({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function ku({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(Du(t))),i){a.push("");let d=[i.toString()];o&&(d.push(o),d.push(s.dim(")"))),a.push(d.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` `)}function Du(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function Rr(e){let t=e.showColors?Su:Iu,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Ou(e),ku(r,t)}f();u();c();p();m();var Oo=Ue(Rn());f();u();c();p();m();function Ao(e,t,r){let n=Co(e),i=Mu(n),o=Nu(i);o?Sr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Co(e){return e.errors.flatMap(t=>t.kind==="Union"?Co(t):[t])}function Mu(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:_u(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function _u(e,t){return[...new Set(e.concat(t))]}function Nu(e){return bn(e,(t,r)=>{let n=vo(t),i=vo(r);return n!==i?n-i:To(t)-To(r)})}function vo(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function To(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}f();u();c();p();m();var le=class{constructor(t,r){this.name=t;this.value=r}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();u();c();p();m();f();u();c();p();m();So();f();u();c();p();m();var nt=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;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}};Ro();f();u();c();p();m();f();u();c();p();m();var Ir=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};f();u();c();p();m();var Or=e=>e,kr={bold:Or,red:Or,green:Or,dim:Or,enabled:!1},Io={bold:lr,red:Ye,green:_i,dim:ur,enabled:!0},it={write(e){e.writeLine(",")}};f();u();c();p();m();var we=class{constructor(t){this.contents=t}isUnderlined=!1;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();u();c();p();m();var Ne=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var ot=class extends Ne{items=[];addItem(t){return this.items.push(new Ir(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new we("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(it,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var st=class e extends Ne{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof ot&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new we("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(it,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};f();u();c();p();m();var H=class extends Ne{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new we(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};f();u();c();p();m();var St=class{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(it,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Sr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Fu(e,t);break;case"IncludeOnScalar":Lu(e,t);break;case"EmptySelection":Uu(e,t,r);break;case"UnknownSelectionField":$u(e,t);break;case"InvalidSelectionValue":ju(e,t);break;case"UnknownArgument":Gu(e,t);break;case"UnknownInputField":Ju(e,t);break;case"RequiredArgumentMissing":Qu(e,t);break;case"InvalidArgumentType":Ku(e,t);break;case"InvalidArgumentValue":Wu(e,t);break;case"ValueTooLarge":Hu(e,t);break;case"SomeFieldsMissing":zu(e,t);break;case"TooManyFieldsGiven":Yu(e,t);break;case"Union":Ao(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Fu(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 Lu(e,t){let[r,n]=at(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)}. ${It(s)}`:a+=".",a+=` Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Uu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Bu(e,t,i);return}if(n.hasField("select")){qu(e,t);return}}if(r?.[Ie(e.outputType.name)]){Vu(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Bu(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 qu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Mo(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${It(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Vu(e,t){let r=new St;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]=at(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new st;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function $u(e,t){let r=_o(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Mo(n,e.outputType);break;case"include":Zu(n,e.outputType);break;case"omit":Xu(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(It(n)),i.join(" ")})}function ju(e,t){let r=_o(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Gu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),ec(n,e.arguments)),t.addErrorMessage(i=>ko(i,r,e.arguments.map(o=>o.name)))}function Ju(e,t){let[r,n]=at(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&No(o,e.inputType)}t.addErrorMessage(o=>ko(o,n,e.inputType.fields.map(s=>s.name)))}function ko(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=rc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(It(e)),n.join(" ")}function Qu(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]=at(e.argumentPath),s=new St,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(Do).join(" | ");a.addSuggestion(new le(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=at(e.dependentArgumentPath);t.addErrorMessage(d=>`Argument \`${d.green(o)}\` is required because argument \`${d.green(l)}\` was provided.`)}}}function Do(e){return e.kind==="list"?`${Do(e.elementType)}[]`:e.name}function Ku(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=Dr("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 Wu(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=Dr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Hu(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 zu(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&&No(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")} ${Dr("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(It(i)),o.join(" ")})}function Yu(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 ${Dr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Mo(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,"true"))}function Zu(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new le(r.name,"true"))}function Xu(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new le(r.name,"true"))}function ec(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function _o(e,t){let[r,n]=at(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function No(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 at(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function It({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Dr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var tc=3;function rc(e,t){let r=1/0,n;for(let i of t){let o=(0,Oo.default)(e,i);o>tc||o`}};function lt(e){return e instanceof Ot}f();u();c();p();m();var Mr=Symbol(),In=new WeakMap,Te=class{constructor(t){t===Mr?In.set(this,`Prisma.${this._getName()}`):In.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return In.get(this)}},kt=class extends Te{_getNamespace(){return"NullTypes"}},Dt=class extends kt{#e};kn(Dt,"DbNull");var Mt=class extends kt{#e};kn(Mt,"JsonNull");var _t=class extends kt{#e};kn(_t,"AnyNull");var On={classes:{DbNull:Dt,JsonNull:Mt,AnyNull:_t},instances:{DbNull:new Dt(Mr),JsonNull:new Mt(Mr),AnyNull:new _t(Mr)}};function kn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}f();u();c();p();m();var Fo=": ",_r=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Fo.length}write(t){let r=new we(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Fo).write(this.value)}};var Dn=class{arguments;errorMessages=[];constructor(t){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 Dn(Lo(e))}function Lo(e){let t=new st;for(let[r,n]of Object.entries(e)){let i=new _r(r,Uo(n));t.addField(i)}return t}function Uo(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(rt(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=yr(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof Te?new H(`Prisma.${e._getName()}`):lt(e)?new H(`prisma.${Ie(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?nc(e):typeof e=="object"?Lo(e):new H(Object.prototype.toString.call(e))}function nc(e){let t=new ot;for(let r of e)t.addItem(Uo(r));return t}function Nr(e,t){let r=t==="pretty"?Io:kr,n=e.renderAllMessages(r),i=new nt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Fr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=ut(e);for(let h of t)Sr(h,a,s);let{message:l,args:d}=Nr(a,r),g=Rr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:d});throw new ee(g,{clientVersion:o})}f();u();c();p();m();f();u();c();p();m();function Ee(e){return e.replace(/^./,t=>t.toLowerCase())}f();u();c();p();m();function qo(e,t,r){let n=Ee(r);return!t.result||!(t.result.$allModels||t.result[n])?e:ic({...e,...Bo(t.name,e,t.result.$allModels),...Bo(t.name,e,t.result[n])})}function ic(e){let t=new ge,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return gr(e,n=>({...n,needs:r(n.name,new Set)}))}function Bo(e,t,r){return r?gr(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:oc(t,o,i)})):{}}function oc(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 $o(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Lr=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new ge;modelExtensionsCache=new ge;queryCallbacksCache=new ge;clientExtensions=At(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());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,()=>qo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Ee(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()}},ct=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Lr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Lr(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();u();c();p();m();var Ur=class{constructor(t){this.name=t}};function jo(e){return e instanceof Ur}function sc(e){return new Ur(e)}f();u();c();p();m();f();u();c();p();m();var Go=Symbol(),Nt=class{constructor(t){if(t!==Go)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Mn:t}},Mn=new Nt(Go);function be(e){return e instanceof Nt}var ac={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Jo="explicitly `undefined` values are not allowed";function Nn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=ct.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:d,globalOmit:g}){let h=new _n({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:d,globalOmit:g});return{modelName:e,action:ac[t],query:Ft(r,h)}}function Ft({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Ko(r,n),selection:lc(e,t,i,n)}}function lc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),mc(e,n)):uc(n,t,r)}function uc(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&cc(n,t,e),pc(n,r,e),n}function cc(e,t,r){for(let[n,i]of Object.entries(t)){if(be(i))continue;let o=r.nestSelection(n);if(Fn(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Ft(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Ft(i,o)}}function pc(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=$o(i,n);for(let[s,a]of Object.entries(o)){if(be(a))continue;Fn(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function mc(e,t){let r={},n=t.getComputedFields(),i=Vo(e,n);for(let[o,s]of Object.entries(i)){if(be(s))continue;let a=t.nestSelection(o);Fn(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||be(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Ft({},a):r[o]=!0;continue}r[o]=Ft(s,a)}}return r}function Qo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(Xe(e)){if(yr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(jo(e))return{$type:"Param",value:e.name};if(lt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return fc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(dc(e))return e.values;if(rt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Te){if(e!==On.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(gc(e))return e.toJSON();if(typeof e=="object")return Ko(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Ko(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);be(i)||(i!==void 0?r[n]=Qo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:Jo}))}return r}function fc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Ie(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"updateManyAndReturn":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:qe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};f();u();c();p();m();function Wo(e){if(!e._hasPreviewFlag("metrics"))throw new ee("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var Lt=class{_client;constructor(t){this._client=t}prometheus(t){return Wo(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return Wo(this._client),this._client._engine.metrics({format:"json",...t})}};f();u();c();p();m();function hc(e,t){let r=At(()=>yc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function yc(e){return{datamodel:{models:Ln(e.models),enums:Ln(e.enums),types:Ln(e.types)}}}function Ln(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}f();u();c();p();m();var Un=new WeakMap,Br="$$PrismaTypedSql",Ut=class{constructor(t,r){Un.set(this,{sql:t,values:r}),Object.defineProperty(this,Br,{value:Br})}get sql(){return Un.get(this).sql}get values(){return Un.get(this).values}};function wc(e){return(...t)=>new Ut(e,t)}function qr(e){return e!=null&&e[Br]===Br}f();u();c();p();m();var ma=Ue(hn());f();u();c();p();m();Ho();ji();Ki();f();u();c();p();m();var ue=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();u();c();p();m();f();u();c();p();m();var $r={enumerable:!0,configurable:!0,writable:!0};function jr(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>$r,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Zo=Symbol.for("nodejs.util.inspect.custom");function me(e,t){let r=xc(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=Xo(Reflect.ownKeys(o),r),a=Xo(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?{...$r,...l?.getPropertyDescriptor(s)}:$r:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Zo]=function(){let o={...this};return delete o[Zo],o},i}function xc(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 Xo(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}f();u();c();p();m();function pt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}f();u();c();p();m();function Gr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}f();u();c();p();m();function es(e){if(e===void 0)return"";let t=ut(e);return new nt(0,{colors:kr}).write(t).toString()}f();u();c();p();m();var Pc="P2037";function Jr({error:e,user_facing_error:t},r,n){return t.error_code?new se(vc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ae(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function vc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Pc&&(r+=` Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Bn=class{getLocation(){return null}};function Fe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Bn}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var ts={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function mt(e={}){let t=Ac(e);return Object.entries(t).reduce((n,[i,o])=>(ts[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Ac(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Qr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function rs(e,t){let r=Qr(e);return t({action:"aggregate",unpacker:r,argsMapper:mt})(e)}f();u();c();p();m();function Cc(e={}){let{select:t,...r}=e;return typeof t=="object"?mt({...r,_count:t}):mt({...r,_count:{_all:!0}})}function Rc(e={}){return typeof e.select=="object"?t=>Qr(e)(t)._count:t=>Qr(e)(t)._count._all}function ns(e,t){return t({action:"count",unpacker:Rc(e),argsMapper:Cc})(e)}f();u();c();p();m();function Sc(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 Ic(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function is(e,t){return t({action:"groupBy",unpacker:Ic(e),argsMapper:Sc})(e)}function os(e,t,r){if(t==="aggregate")return n=>rs(n,r);if(t==="count")return n=>ns(n,r);if(t==="groupBy")return n=>is(n,r)}f();u();c();p();m();function ss(e,t){let r=t.fields.filter(i=>!i.relationName),n=so(r,"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 Ot(e,o,s.type,s.isList,s.kind==="enum")},...jr(Object.keys(n))})}f();u();c();p();m();f();u();c();p();m();var as=e=>Array.isArray(e)?e:e.split("."),qn=(e,t)=>as(t).reduce((r,n)=>r&&r[n],e),ls=(e,t,r)=>as(t).reduceRight((n,i,o,s)=>Object.assign({},qn(e,s.slice(0,o)),{[i]:n}),r);function Oc(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function kc(e,t,r){return t===void 0?e??{}:ls(t,r,e||!0)}function Vn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,d)=>({...l,[d.name]:d}),{});return l=>{let d=Fe(e._errorFormat),g=Oc(n,i),h=kc(l,o,g),T=r({dataPath:g,callsite:d})(h),I=Dc(e,t);return new Proxy(T,{get(S,R){if(!I.includes(R))return S[R];let F=[a[R].type,r,R],B=[g,h];return Vn(e,...F,...B)},...jr([...I,...Object.getOwnPropertyNames(T)])})}}function Dc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var Mc=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],_c=["aggregate","count","groupBy"];function $n(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Nc(e,t),Lc(e,t),Bt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return me({},n)}function Nc(e,t){let r=Ee(t),n=Object.keys(Rt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let d=Fe(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:d};return e._request({...h,...a})},{action:o,args:l,model:t})};return Mc.includes(o)?Vn(e,t,s):Fc(i)?os(e,i,s):s({})}}}function Fc(e){return _c.includes(e)}function Lc(e,t){return Ve(te("fields",()=>{let r=e._runtimeDataModel.models[t];return ss(t,r)}))}f();u();c();p();m();function us(e){return e.replace(/^./,t=>t.toUpperCase())}var jn=Symbol();function qt(e){let t=[Uc(e),Bc(e),te(jn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Bt(r)),me(e,t)}function Uc(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function Bc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Ee),n=[...new Set(t.concat(r))];return Ve({getKeys(){return n},getPropertyValue(i){let o=us(i);if(e._runtimeDataModel.models[o]!==void 0)return $n(e,o);if(e._runtimeDataModel.models[i]!==void 0)return $n(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function cs(e){return e[jn]?e[jn]:e}function ps(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},$on:{value:void 0}});return qt(t)}f();u();c();p();m();f();u();c();p();m();function ms({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 d=l.needs.filter(g=>n[g]);d.length>0&&a.push(pt(d))}else if(r){if(!r[l.name])continue;let d=l.needs.filter(g=>!r[g]);d.length>0&&a.push(pt(d))}qc(e,l.needs)&&s.push(Vc(l,me(e,s)))}return s.length>0||a.length>0?me(e,[...s,...a]):e}function qc(e,t){return t.every(r=>En(e,r))}function Vc(e,t){return Ve(te(e.name,()=>e.compute(t)))}f();u();c();p();m();function Kr({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 d=typeof s=="object"?s:{};t[o]=Kr({visitor:i,result:t[o],args:d,modelName:l.type,runtimeDataModel:n})}}function ds({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Kr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,d)=>{let g=Ee(l);return ms({result:a,modelName:g,select:d.select,omit:d.select?void 0:{...o?.[g],...d.omit},extensions:n})}})}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var $c=["$connect","$disconnect","$on","$transaction","$extends"],gs=$c;function hs(e){if(e instanceof ue)return jc(e);if(qr(e))return Gc(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:hs(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Ps(o,l),a.args=s,ws(e,a,r,n+1)}})})}function Es(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 ws(e,t,s)}function bs(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?xs(r,n,0,e):e(r)}}function xs(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=Ps(i,l),xs(a,t,r+1,n)}})}var ys=e=>e;function Ps(e=ys,t=ys){return r=>e(t(r))}f();u();c();p();m();var vs=Z("prisma:client"),Ts={Vercel:"vercel","Netlify CI":"netlify"};function As({postinstall:e,ciName:t,clientVersion:r}){if(vs("checkPlatformCaching:postinstall",e),vs("checkPlatformCaching:ciName",t),e===!0&&t&&t in Ts){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/${Ts[t]}-build`;throw console.error(n),new Q(n,r)}}f();u();c();p();m();function Cs(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();u();c();p();m();f();u();c();p();m();var Jc=()=>globalThis.process?.release?.name==="node",Qc=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Kc=()=>!!globalThis.Deno,Wc=()=>typeof globalThis.Netlify=="object",Hc=()=>typeof globalThis.EdgeRuntime=="object",zc=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Yc(){return[[Wc,"netlify"],[Hc,"edge-light"],[zc,"workerd"],[Kc,"deno"],[Qc,"bun"],[Jc,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Zc={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Gn(){let e=Yc();return{id:e,prettyName:Zc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();function Rs(e,t){throw new Error(t)}function Xc(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function ep(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function $t(e){return e===null?e:Array.isArray(e)?e.map($t):typeof e=="object"?Xc(e)?tp(e):e.constructor!==null&&e.constructor.name!=="Object"?e:ep(e,$t):e}function tp({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=w.Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new ve(t);case"Json":return JSON.parse(t);default:Rs(t,"Unknown tagged value")}}var Ss="6.14.0";f();u();c();p();m();f();u();c();p();m();function ft({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 Gn().id==="workerd"?new Q(`error: Environment variable not found: ${s.fromEnvVar}. +Learn how: https://pris.ly/d/${Ts[t]}-build`;throw console.error(n),new Q(n,r)}}f();u();c();p();m();function Cs(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();u();c();p();m();f();u();c();p();m();var Jc=()=>globalThis.process?.release?.name==="node",Qc=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Kc=()=>!!globalThis.Deno,Wc=()=>typeof globalThis.Netlify=="object",Hc=()=>typeof globalThis.EdgeRuntime=="object",zc=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Yc(){return[[Wc,"netlify"],[Hc,"edge-light"],[zc,"workerd"],[Kc,"deno"],[Qc,"bun"],[Jc,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Zc={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Gn(){let e=Yc();return{id:e,prettyName:Zc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();function Rs(e,t){throw new Error(t)}function Xc(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function ep(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function $t(e){return e===null?e:Array.isArray(e)?e.map($t):typeof e=="object"?Xc(e)?tp(e):e.constructor!==null&&e.constructor.name!=="Object"?e:ep(e,$t):e}function tp({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=w.Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new ve(t);case"Json":return JSON.parse(t);default:Rs(t,"Unknown tagged value")}}var Ss="6.15.0";f();u();c();p();m();f();u();c();p();m();function ft({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 Gn().id==="workerd"?new Q(`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 Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Wr=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ie=class extends Wr{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};f();u();c();p();m();function U(e,t){return{...e,isRetryable:t}}var $e=class extends ie{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,U(r,!1))}};N($e,"InvalidDatasourceError");function Is(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=ft({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof y<"u"?y.env:{}}}),i;try{i=new URL(n)}catch{throw new $e(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==fr)throw new $e(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new $e(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let l=yn(i)?"http:":"https:",d=new URL(i.href.replace(o,l));return{apiKey:a,url:d}}f();u();c();p();m();var Os=Ue(Hi()),Hr=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;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,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Os.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};f();u();c();p();m();function np(e){return e[0]*1e3+e[1]/1e6}function Jn(e){return new Date(np(e))}f();u();c();p();m();f();u();c();p();m();var dt=class extends ie{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",U(t,!0))}};N(dt,"ForcedRetryError");f();u();c();p();m();var je=class extends ie{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,U(r,!1))}};N(je,"NotImplementedYetError");f();u();c();p();m();f();u();c();p();m();var G=class extends ie{response;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 G{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",U(t,!0))}};N(Ge,"SchemaMissingError");f();u();c();p();m();f();u();c();p();m();var Qn="This request could not be understood by the server",jt=class extends G{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||Qn,U(t,!1)),n&&(this.code=n)}};N(jt,"BadRequestError");f();u();c();p();m();var Gt=class extends G{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",U(t,!0)),this.logs=r}};N(Gt,"HealthcheckTimeoutError");f();u();c();p();m();var Jt=class extends G{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,U(t,!0)),this.logs=n}};N(Jt,"EngineStartupError");f();u();c();p();m();var Qt=class extends G{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",U(t,!1))}};N(Qt,"EngineVersionNotSupportedError");f();u();c();p();m();var Kn="Request timed out",Kt=class extends G{name="GatewayTimeoutError";code="P5009";constructor(t,r=Kn){super(r,U(t,!1))}};N(Kt,"GatewayTimeoutError");f();u();c();p();m();var ip="Interactive transaction error",Wt=class extends G{name="InteractiveTransactionError";code="P5015";constructor(t,r=ip){super(r,U(t,!1))}};N(Wt,"InteractiveTransactionError");f();u();c();p();m();var op="Request parameters are invalid",Ht=class extends G{name="InvalidRequestError";code="P5011";constructor(t,r=op){super(r,U(t,!1))}};N(Ht,"InvalidRequestError");f();u();c();p();m();var Wn="Requested resource does not exist",zt=class extends G{name="NotFoundError";code="P5003";constructor(t,r=Wn){super(r,U(t,!1))}};N(zt,"NotFoundError");f();u();c();p();m();var Hn="Unknown server error",gt=class extends G{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||Hn,U(t,!0)),this.logs=n}};N(gt,"ServerError");f();u();c();p();m();var zn="Unauthorized, check your connection string",Yt=class extends G{name="UnauthorizedError";code="P5007";constructor(t,r=zn){super(r,U(t,!1))}};N(Yt,"UnauthorizedError");f();u();c();p();m();var Yn="Usage exceeded, retry again later",Zt=class extends G{name="UsageExceededError";code="P5008";constructor(t,r=Yn){super(r,U(t,!0))}};N(Zt,"UsageExceededError");async function sp(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 Xt(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await sp(e);if(n.type==="QueryEngineError")throw new se(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 Qt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Jt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new Q(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Gt(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 Wt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Ht(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Yt(r,ht(zn,n));if(e.status===404)return new zt(r,ht(Wn,n));if(e.status===429)throw new Zt(r,ht(Yn,n));if(e.status===504)throw new Kt(r,ht(Kn,n));if(e.status>=500)throw new gt(r,ht(Hn,n));if(e.status>=400)throw new jt(r,ht(Qn,n))}function ht(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}f();u();c();p();m();function ks(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();u();c();p();m();var Ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Ds(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,d,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,d=g&63,r+=Ae[s]+Ae[a]+Ae[l]+Ae[d];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();u();c();p();m();function Ms(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new Q("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();u();c();p();m();var _s={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};f();u();c();p();m();f();u();c();p();m();var er=class extends ie{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Wr=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ie=class extends Wr{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};f();u();c();p();m();function U(e,t){return{...e,isRetryable:t}}var $e=class extends ie{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,U(r,!1))}};N($e,"InvalidDatasourceError");function Is(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=ft({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof y<"u"?y.env:{}}}),i;try{i=new URL(n)}catch{throw new $e(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==fr)throw new $e(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new $e(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let l=yn(i)?"http:":"https:",d=new URL(i.href.replace(o,l));return{apiKey:a,url:d}}f();u();c();p();m();var Os=Ue(Hi()),Hr=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;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,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Os.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};f();u();c();p();m();function np(e){return e[0]*1e3+e[1]/1e6}function Jn(e){return new Date(np(e))}f();u();c();p();m();f();u();c();p();m();var dt=class extends ie{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",U(t,!0))}};N(dt,"ForcedRetryError");f();u();c();p();m();var je=class extends ie{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,U(r,!1))}};N(je,"NotImplementedYetError");f();u();c();p();m();f();u();c();p();m();var G=class extends ie{response;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 G{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",U(t,!0))}};N(Ge,"SchemaMissingError");f();u();c();p();m();f();u();c();p();m();var Qn="This request could not be understood by the server",jt=class extends G{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||Qn,U(t,!1)),n&&(this.code=n)}};N(jt,"BadRequestError");f();u();c();p();m();var Gt=class extends G{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",U(t,!0)),this.logs=r}};N(Gt,"HealthcheckTimeoutError");f();u();c();p();m();var Jt=class extends G{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,U(t,!0)),this.logs=n}};N(Jt,"EngineStartupError");f();u();c();p();m();var Qt=class extends G{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",U(t,!1))}};N(Qt,"EngineVersionNotSupportedError");f();u();c();p();m();var Kn="Request timed out",Kt=class extends G{name="GatewayTimeoutError";code="P5009";constructor(t,r=Kn){super(r,U(t,!1))}};N(Kt,"GatewayTimeoutError");f();u();c();p();m();var ip="Interactive transaction error",Wt=class extends G{name="InteractiveTransactionError";code="P5015";constructor(t,r=ip){super(r,U(t,!1))}};N(Wt,"InteractiveTransactionError");f();u();c();p();m();var op="Request parameters are invalid",Ht=class extends G{name="InvalidRequestError";code="P5011";constructor(t,r=op){super(r,U(t,!1))}};N(Ht,"InvalidRequestError");f();u();c();p();m();var Wn="Requested resource does not exist",zt=class extends G{name="NotFoundError";code="P5003";constructor(t,r=Wn){super(r,U(t,!1))}};N(zt,"NotFoundError");f();u();c();p();m();var Hn="Unknown server error",gt=class extends G{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||Hn,U(t,!0)),this.logs=n}};N(gt,"ServerError");f();u();c();p();m();var zn="Unauthorized, check your connection string",Yt=class extends G{name="UnauthorizedError";code="P5007";constructor(t,r=zn){super(r,U(t,!1))}};N(Yt,"UnauthorizedError");f();u();c();p();m();var Yn="Usage exceeded, retry again later",Zt=class extends G{name="UsageExceededError";code="P5008";constructor(t,r=Yn){super(r,U(t,!0))}};N(Zt,"UsageExceededError");async function sp(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 Xt(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await sp(e);if(n.type==="QueryEngineError")throw new se(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 Qt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Jt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new Q(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Gt(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 Wt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Ht(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Yt(r,ht(zn,n));if(e.status===404)return new zt(r,ht(Wn,n));if(e.status===429)throw new Zt(r,ht(Yn,n));if(e.status===504)throw new Kt(r,ht(Kn,n));if(e.status>=500)throw new gt(r,ht(Hn,n));if(e.status>=400)throw new jt(r,ht(Qn,n))}function ht(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}f();u();c();p();m();function ks(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();u();c();p();m();var Ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Ds(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,d,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,d=g&63,r+=Ae[s]+Ae[a]+Ae[l]+Ae[d];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();u();c();p();m();function Ms(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new Q("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();u();c();p();m();var _s={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};f();u();c();p();m();f();u();c();p();m();var er=class extends ie{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: ${t}`,U(r,!0))}};N(er,"RequestError");async function Je(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new er(a,{clientVersion:n,cause:s})}}var lp=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Ns=Z("prisma:client:dataproxyEngine");async function up(e,t){let r=_s["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.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&&lp.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,l,d]=s.split("."),g=cp(`<=${a}.${l}.${d}`),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 T=await h.text();Ns("length of body fetched from unpkg.com",T.length);let I;try{I=JSON.parse(T)}catch(S){throw console.error("JSON.parse error: body fetched from unpkg.com: ",T),S}return I.version}throw new je("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Fs(e,t){let r=await up(e,t);return Ns("version",r),r}function cp(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Ls=3,tr=Z("prisma:client:dataproxyEngine"),yt=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){Ms(t),this.config=t,this.env=t.env,this.inlineSchema=Ds(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{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new Hr({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Fs(this.host,this.config),tr("host",this.host),tr("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":tr(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:Jn(r.timestamp),message:r.attributes.message??"",target:r.target});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:Jn(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${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||tr("schema response status",r.status);let n=await Xt(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);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):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,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||tr("graphql response status",a.status),await this.handleError(await Xt(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult: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 Xt(l,this.clientVersion));let d=await l.json(),{extensions:g}=d;g&&this.propagateResponseExtensions(g);let h=d.id,T=d["data-proxy"].endpoint;return{id:h,payload:{endpoint:T}}}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 Xt(a,this.clientVersion));let l=await a.json(),{extensions:d}=l;d&&this.propagateResponseExtensions(d);return}}})}getURLAndAPIKey(){return Is({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}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>=Ls)throw i instanceof dt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Ls} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await ks(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}convertProtocolErrorsToClientError(t){return t.length===1?Jr(t[0],this.config.clientVersion,this.config.activeProvider):new ae(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};f();u();c();p();m();function Us({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=R=>{i.push({_tag:"warning",value:R})},a=R=>{let M=R.join(` `);o.push({_tag:"error",value:M})},l=!!e?.startsWith("prisma://"),d=dr(e),g=!!t,h=l||d;!g&&r&&h&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let T=h||!r;g&&(T||n==="edge")&&(n==="edge"?a(["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."]):r?l&&a(["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."]):a(["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."]));let I={accelerate:T,ppg:d,driverAdapters:g};function S(R){return R.length>0}return S(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:I}:{ok:!0,diagnostics:{warnings:i},isUsing:I}}function Bs({copyEngine:e=!0},t){let r;try{r=ft({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Us({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"edge"});for(let h of o.warnings)hr(...h.value);if(!n){let h=o.errors[0];throw new ee(h.value,{clientVersion:t.clientVersion})}let s=Ze(t.generator),a=s==="library",l=s==="binary",d=s==="client",g=(i.accelerate||i.ppg)&&!i.driverAdapters;return i.accelerate?new yt(t):(i.driverAdapters,i.accelerate,new yt(t))}f();u();c();p();m();function zr({generator:e}){return e?.previewFeatures??[]}f();u();c();p();m();var qs=e=>({command:e});f();u();c();p();m();f();u();c();p();m();var Vs=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);f();u();c();p();m();function wt(e){try{return $s(e,"fast")}catch{return $s(e,"slow")}}function $s(e,t){return JSON.stringify(e.map(r=>Gs(r,t)))}function Gs(e,t){if(Array.isArray(e))return e.map(r=>Gs(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(Xe(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(_e.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(pp(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Js(e):e}function pp(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Js(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(js);let t={};for(let r of Object.keys(e))t[r]=js(e[r]);return t}function js(e){return typeof e=="bigint"?e.toString():Js(e)}var mp=/^(\s*alter\s)/i,Qs=Z("prisma:client");function Zn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&mp.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. diff --git a/src/generated/prisma/runtime/edge.js b/src/generated/prisma/runtime/edge.js index 8d96fef..9828921 100644 --- a/src/generated/prisma/runtime/edge.js +++ b/src/generated/prisma/runtime/edge.js @@ -1,17 +1,17 @@ /* !!! This is code generated by Prisma. Do not edit directly. !!! /* eslint-disable */ -"use strict";var va=Object.create;var lr=Object.defineProperty;var Ta=Object.getOwnPropertyDescriptor;var Aa=Object.getOwnPropertyNames;var Ca=Object.getPrototypeOf,Ra=Object.prototype.hasOwnProperty;var fe=(e,t)=>()=>(e&&(t=e(e=0)),t);var Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vt=(e,t)=>{for(var r in t)lr(e,r,{get:t[r],enumerable:!0})},ui=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Aa(t))!Ra.call(e,i)&&i!==r&&lr(e,i,{get:()=>t[i],enumerable:!(n=Ta(t,i))||n.enumerable});return e};var Ue=(e,t,r)=>(r=e!=null?va(Ca(e)):{},ui(t||!e||!e.__esModule?lr(r,"default",{value:e,enumerable:!0}):r,e)),Sa=e=>ui(lr({},"__esModule",{value:!0}),e);var y,b,u=fe(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:b}=y});var x,c=fe(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,p=fe(()=>{"use strict";E=()=>{};E.prototype=E});var m=fe(()=>{"use strict"});var Si=Se(ze=>{"use strict";f();u();c();p();m();var di=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ia=di(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=I;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=S.indexOf("=");M===-1&&(M=R);var F=M===R?0:4-M%4;return[M,F]}function l(S){var R=a(S),M=R[0],F=R[1];return(M+F)*3/4-F}function d(S,R,M){return(R+M)*3/4-M}function g(S){var R,M=a(S),F=M[0],B=M[1],O=new n(d(S,F,B)),L=0,le=B>0?F-4:F,J;for(J=0;J>16&255,O[L++]=R>>8&255,O[L++]=R&255;return B===2&&(R=r[S.charCodeAt(J)]<<2|r[S.charCodeAt(J+1)]>>4,O[L++]=R&255),B===1&&(R=r[S.charCodeAt(J)]<<10|r[S.charCodeAt(J+1)]<<4|r[S.charCodeAt(J+2)]>>2,O[L++]=R>>8&255,O[L++]=R&255),O}function h(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function T(S,R,M){for(var F,B=[],O=R;Ole?le:L+O));return F===1?(R=S[M-1],B.push(t[R>>2]+t[R<<4&63]+"==")):F===2&&(R=(S[M-2]<<8)+S[M-1],B.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),B.join("")}}),Oa=di(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,d=(1<>1,h=-7,T=n?o-1:0,I=n?-1:1,S=t[r+T];for(T+=I,s=S&(1<<-h)-1,S>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=I,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=I,h-=8);if(s===0)s=1-g;else{if(s===d)return a?NaN:(S?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(S?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,d,g=s*8-o-1,h=(1<>1,I=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=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*(d=Math.pow(2,-a))<1&&(a--,d*=2),a+T>=1?r+=I/d:r+=I*Math.pow(2,1-T),r*d>=2&&(a++,d/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*d-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+S]=l&255,S+=R,l/=256,o-=8);for(a=a<0;t[n+S]=a&255,S+=R,a/=256,g-=8);t[n+S-R]|=M*128}}),cn=Ia(),We=Oa(),ci=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.Buffer=A;ze.SlowBuffer=Fa;ze.INSPECT_MAX_BYTES=50;var ur=2147483647;ze.kMaxLength=ur;A.TYPED_ARRAY_SUPPORT=ka();!A.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 ka(){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(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}});Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function xe(e){if(e>ur)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(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 fn(e)}return gi(e,t,r)}A.poolSize=8192;function gi(e,t,r){if(typeof e=="string")return Ma(e,t);if(ArrayBuffer.isView(e))return _a(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(de(e,ArrayBuffer)||e&&de(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(de(e,SharedArrayBuffer)||e&&de(e.buffer,SharedArrayBuffer)))return yi(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 A.from(n,t,r);let i=Na(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return A.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)}A.from=function(e,t,r){return gi(e,t,r)};Object.setPrototypeOf(A.prototype,Uint8Array.prototype);Object.setPrototypeOf(A,Uint8Array);function hi(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 Da(e,t,r){return hi(e),e<=0?xe(e):t!==void 0?typeof r=="string"?xe(e).fill(t,r):xe(e).fill(t):xe(e)}A.alloc=function(e,t,r){return Da(e,t,r)};function fn(e){return hi(e),xe(e<0?0:dn(e)|0)}A.allocUnsafe=function(e){return fn(e)};A.allocUnsafeSlow=function(e){return fn(e)};function Ma(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=wi(e,t)|0,n=xe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function pn(e){let t=e.length<0?0:dn(e.length)|0,r=xe(t);for(let n=0;n=ur)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ur.toString(16)+" bytes");return e|0}function Fa(e){return+e!=e&&(e=0),A.alloc(+e)}A.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==A.prototype};A.compare=function(e,t){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),de(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(e)||!A.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?(A.isBuffer(o)||(o=A.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(A.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function wi(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||de(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return mn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Ri(e).length;default:if(i)return n?-1:mn(e).length;t=(""+t).toLowerCase(),i=!0}}A.byteLength=wi;function La(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 Ka(this,t,r);case"utf8":case"utf-8":return bi(this,t,r);case"ascii":return Ja(this,t,r);case"latin1":case"binary":return Qa(this,t,r);case"base64":return ja(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}}A.prototype._isBuffer=!0;function Be(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}A.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+=" ... "),""};ci&&(A.prototype[ci]=A.prototype.inspect);A.prototype.compare=function(e,t,r,n,i){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.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),d=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,hn(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=A.from(t,n)),A.isBuffer(t))return t.length===0?-1:pi(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):pi(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function pi(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 d;if(i){let g=-1;for(d=r;ds&&(r=s-a),d=r;d>=0;d--){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 Ua(this,e,t,r);case"utf8":case"utf-8":return Ba(this,e,t,r);case"ascii":case"latin1":case"binary":return qa(this,e,t,r);case"base64":return Va(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $a(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ja(e,t,r){return t===0&&r===e.length?cn.fromByteArray(e):cn.fromByteArray(e.slice(t,r))}function bi(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,d,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],d=e[i+2],(l&192)===128&&(d&192)===128&&(h=(o&15)<<12|(l&63)<<6|d&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],d=e[i+2],g=e[i+3],(l&192)===128&&(d&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(d&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 Ga(n)}var mi=4096;function Ga(e){let t=e.length;if(t<=mi)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")}A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};A.prototype.readBigUInt64LE=Ie(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};A.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(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};A.prototype.readInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};A.prototype.readInt16LE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};A.prototype.readInt16BE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};A.prototype.readInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};A.prototype.readInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};A.prototype.readBigInt64LE=Ie(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||W(e,4,this.length),We.read(this,e,!0,23,4)};A.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),We.read(this,e,!1,23,4)};A.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!0,52,8)};A.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.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};A.prototype.writeUint8=A.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};A.prototype.writeUint16LE=A.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};A.prototype.writeUint16BE=A.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};A.prototype.writeUint32LE=A.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};A.prototype.writeUint32BE=A.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 xi(e,t,r,n,i){Ci(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 Pi(e,t,r,n,i){Ci(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}A.prototype.writeBigUInt64LE=Ie(function(e,t=0){return xi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeBigUInt64BE=Ie(function(e,t=0){return Pi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.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};A.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};A.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};A.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};A.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};A.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};A.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};A.prototype.writeBigInt64LE=Ie(function(e,t=0){return xi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});A.prototype.writeBigInt64BE=Ie(function(e,t=0){return Pi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function vi(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||vi(e,t,r,4,34028234663852886e22,-34028234663852886e22),We.write(e,t,r,n,23,4),r+4}A.prototype.writeFloatLE=function(e,t,r){return Ti(this,e,t,!0,r)};A.prototype.writeFloatBE=function(e,t,r){return Ti(this,e,t,!1,r)};function Ai(e,t,r,n,i){return t=+t,r=r>>>0,i||vi(e,t,r,8,17976931348623157e292,-17976931348623157e292),We.write(e,t,r,n,52,8),r+8}A.prototype.writeDoubleLE=function(e,t,r){return Ai(this,e,t,!0,r)};A.prototype.writeDoubleBE=function(e,t,r){return Ai(this,e,t,!1,r)};A.prototype.copy=function(e,t,r,n){if(!A.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=fi(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=fi(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function fi(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 Ha(e,t,r){He(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Tt(t,e.length-(r+1))}function Ci(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 Ke.ERR_OUT_OF_RANGE("value",a,e)}Ha(n,i,o)}function He(e,t){if(typeof e!="number")throw new Ke.ERR_INVALID_ARG_TYPE(t,"number",e)}function Tt(e,t,r){throw Math.floor(e)!==e?(He(e,r),new Ke.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Ke.ERR_BUFFER_OUT_OF_BOUNDS:new Ke.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var za=/[^+/0-9A-Za-z-_]/g;function Ya(e){if(e=e.split("=")[0],e=e.trim().replace(za,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function mn(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 Za(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function Ri(e){return cn.toByteArray(Ya(e))}function cr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function de(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function hn(e){return e!==e}var el=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Ie(e){return typeof BigInt>"u"?tl:e}function tl(){throw new Error("BigInt not supported")}});var w,f=fe(()=>{"use strict";w=Ue(Si())});function al(){return!1}function xn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function ll(){return xn()}function ul(){return[]}function cl(e){e(null,[])}function pl(){return""}function ml(){return""}function fl(){}function dl(){}function gl(){}function hl(){}function yl(){}function wl(){}function El(){}function bl(){}function xl(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Pl(e,t){t(null,xn())}var vl,Tl,Ji,Qi=fe(()=>{"use strict";f();u();c();p();m();vl={},Tl={existsSync:al,lstatSync:xn,stat:Pl,statSync:ll,readdirSync:ul,readdir:cl,readlinkSync:pl,realpathSync:ml,chmodSync:fl,renameSync:dl,mkdirSync:gl,rmdirSync:hl,rmSync:yl,unlinkSync:wl,watchFile:El,unwatchFile:bl,watch:xl,promises:vl},Ji=Tl});function Al(...e){return e.join("/")}function Cl(...e){return e.join("/")}function Rl(e){let t=Ki(e),r=Wi(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Ki(e){let t=e.split("/");return t[t.length-1]}function Wi(e){return e.split("/").slice(0,-1).join("/")}function Il(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var Hi,Sl,Ol,kl,dr,zi=fe(()=>{"use strict";f();u();c();p();m();Hi="/",Sl=":";Ol={sep:Hi},kl={basename:Ki,delimiter:Sl,dirname:Wi,join:Cl,normalize:Il,parse:Rl,posix:Ol,resolve:Al,sep:Hi},dr=kl});var Yi=Se((vf,Dl)=>{Dl.exports={name:"@prisma/internals",version:"6.14.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-engine-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var vn=Se((Ff,Fl)=>{Fl.exports={name:"@prisma/engines-version",version:"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"717184b7b35ea05dfa71a3236b7af656013e1e49"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Zi=Se(gr=>{"use strict";f();u();c();p();m();Object.defineProperty(gr,"__esModule",{value:!0});gr.enginesVersion=void 0;gr.enginesVersion=vn().prisma.enginesVersion});var to=Se((Hf,eo)=>{"use strict";f();u();c();p();m();eo.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 io=Se((ad,no)=>{"use strict";f();u();c();p();m();no.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 so=Se((fd,oo)=>{"use strict";f();u();c();p();m();var Vl=io();oo.exports=e=>typeof e=="string"?e.replace(Vl(),""):e});var _n=Se((Ky,Co)=>{"use strict";f();u();c();p();m();Co.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";f();u();c();p();m()});var Do=fe(()=>{"use strict";f();u();c();p();m()});var Jr,rs=fe(()=>{"use strict";f();u();c();p();m();Jr=class{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 _p={};vt(_p,{DMMF:()=>Dt,Debug:()=>z,Decimal:()=>Ae,Extensions:()=>yn,MetricsClient:()=>pt,PrismaClientInitializationError:()=>Q,PrismaClientKnownRequestError:()=>ne,PrismaClientRustPanicError:()=>Pe,PrismaClientUnknownRequestError:()=>ie,PrismaClientValidationError:()=>X,Public:()=>wn,Sql:()=>se,createParam:()=>Wo,defineDmmfProperty:()=>es,deserializeJsonResponse:()=>dt,deserializeRawResult:()=>on,dmmfToRuntimeDataModel:()=>co,empty:()=>is,getPrismaClient:()=>ba,getRuntime:()=>Zr,join:()=>ns,makeStrictEnum:()=>xa,makeTypedQueryFactory:()=>ts,objectEnumValues:()=>Nr,raw:()=>jn,serializeJsonQuery:()=>$r,skip:()=>Vr,sqltag:()=>Gn,warnEnvConflicts:()=>void 0,warnOnce:()=>St});module.exports=Sa(_p);f();u();c();p();m();var yn={};vt(yn,{defineExtension:()=>Ii,getExtensionContext:()=>Oi});f();u();c();p();m();f();u();c();p();m();function Ii(e){return typeof e=="function"?e:t=>t.$extends(e)}f();u();c();p();m();function Oi(e){return e}var wn={};vt(wn,{validator:()=>ki});f();u();c();p();m();f();u();c();p();m();function ki(...e){return t=>t}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var En,Di,Mi,_i,Ni=!0;typeof y<"u"&&({FORCE_COLOR:En,NODE_DISABLE_COLORS:Di,NO_COLOR:Mi,TERM:_i}=y.env||{},Ni=y.stdout&&y.stdout.isTTY);var rl={enabled:!Di&&Mi==null&&_i!=="dumb"&&(En!=null&&En!=="0"||Ni)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!rl.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Am=j(0,0),pr=j(1,22),mr=j(2,22),Cm=j(3,23),Fi=j(4,24),Rm=j(7,27),Sm=j(8,28),Im=j(9,29),Om=j(30,39),Ye=j(31,39),Li=j(32,39),Ui=j(33,39),Bi=j(34,39),km=j(35,39),qi=j(36,39),Dm=j(37,39),Vi=j(90,39),Mm=j(90,39),_m=j(40,49),Nm=j(41,49),Fm=j(42,49),Lm=j(43,49),Um=j(44,49),Bm=j(45,49),qm=j(46,49),Vm=j(47,49);f();u();c();p();m();var nl=100,$i=["green","yellow","blue","magenta","cyan","red"],fr=[],ji=Date.now(),il=0,bn=typeof y<"u"?y.env:{};globalThis.DEBUG??=bn.DEBUG??"";globalThis.DEBUG_COLORS??=bn.DEBUG_COLORS?bn.DEBUG_COLORS==="true":!0;var At={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 ol(e){let t={color:$i[il++%$i.length],enabled:At.enabled(e),namespace:e,log:At.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&fr.push([o,...n]),fr.length>nl&&fr.shift(),At.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:sl(g)),d=`+${Date.now()-ji}ms`;ji=Date.now(),a(o,...l,d)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var z=new Proxy(ol,{get:(e,t)=>At[t],set:(e,t,r)=>At[t]=r});function sl(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 Gi(){fr.length=0}f();u();c();p();m();f();u();c();p();m();var Ml=Yi(),Pn=Ml.version;f();u();c();p();m();function Ze(e){let t=_l();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Nl(e))}function _l(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Nl(e){return e?.previewFeatures.includes("queryCompiler")?"client":"library"}f();u();c();p();m();var Xi="prisma+postgres",hr=`${Xi}:`;function yr(e){return e?.toString().startsWith(`${hr}//`)??!1}function Tn(e){if(!yr(e))return!1;let{host:t}=new URL(e);return t.includes("localhost")||t.includes("127.0.0.1")||t.includes("[::1]")}var Rt={};vt(Rt,{error:()=>Bl,info:()=>Ul,log:()=>Ll,query:()=>ql,should:()=>ro,tags:()=>Ct,warn:()=>An});f();u();c();p();m();var Ct={error:Ye("prisma:error"),warn:Ui("prisma:warn"),info:qi("prisma:info"),query:Bi("prisma:query")},ro={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Ll(...e){console.log(...e)}function An(e,...t){ro.warn()&&console.warn(`${Ct.warn} ${e}`,...t)}function Ul(e,...t){console.info(`${Ct.info} ${e}`,...t)}function Bl(e,...t){console.error(`${Ct.error} ${e}`,...t)}function ql(e,...t){console.log(`${Ct.query} ${e}`,...t)}f();u();c();p();m();function qe(e,t){throw new Error(t)}f();u();c();p();m();function Cn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();u();c();p();m();function wr(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();u();c();p();m();function Rn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{ao.has(e)||(ao.add(e),An(t,...r))};var Q=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};N(Q,"PrismaClientInitializationError");f();u();c();p();m();var ne=class extends Error{code;meta;clientVersion;batchRequestIdx;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(ne,"PrismaClientKnownRequestError");f();u();c();p();m();var Pe=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(Pe,"PrismaClientRustPanicError");f();u();c();p();m();var ie=class extends Error{clientVersion;batchRequestIdx;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(ie,"PrismaClientUnknownRequestError");f();u();c();p();m();var X=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};N(X,"PrismaClientValidationError");f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var ge=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};f();u();c();p();m();function Oe(e){return e.substring(0,1).toLowerCase()+e.substring(1)}f();u();c();p();m();function uo(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}f();u();c();p();m();function It(e){let t;return{get(){return t||(t={value:e()}),t.value}}}f();u();c();p();m();function co(e){return{models:Sn(e.models),enums:Sn(e.enums),types:Sn(e.types)}}function Sn(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}f();u();c();p();m();function Xe(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Er(e){return e.toString()!=="Invalid Date"}f();u();c();p();m();f();u();c();p();m();var et=9e15,_e=1e9,In="0123456789abcdef",Pr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",vr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",On={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-et,maxE:et,crypto:!1},go,ve,_=!0,Ar="[DecimalError] ",Me=Ar+"Invalid argument: ",ho=Ar+"Precision limit exceeded",yo=Ar+"crypto unavailable",wo="[object Decimal]",ee=Math.floor,K=Math.pow,$l=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,jl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Gl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Eo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,D=7,Jl=9007199254740991,Ql=Pr.length-1,kn=vr.length-1,C={toStringTag:wo};C.absoluteValue=C.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),k(e)};C.ceil=function(){return k(new this.constructor(this),this.e+1,2)};C.clampedTo=C.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(Me+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};C.comparedTo=C.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,d=e.s;if(!s||!a)return!l||!d?NaN:l!==d?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-d:0;if(l!==d)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};C.cosine=C.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Kl(n,To(n,r)),n.precision=e,n.rounding=t,k(ve==2||ve==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};C.cubeRoot=C.cbrt=function(){var e,t,r,n,i,o,s,a,l,d,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(_=!1,o=g.s*K(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=K(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 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),d=l.plus(g),n=V(d.plus(g).times(a),d.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&&(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 _=!0,k(n,e,h.rounding,t)};C.decimalPlaces=C.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-ee(this.e/D))*D,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};C.dividedBy=C.div=function(e){return V(this,new this.constructor(e))};C.dividedToIntegerBy=C.divToInt=function(e){var t=this,r=t.constructor;return k(V(t,new r(e),0,1,1),r.precision,r.rounding)};C.equals=C.eq=function(e){return this.cmp(e)===0};C.floor=function(){return k(new this.constructor(this),this.e+1,3)};C.greaterThan=C.gt=function(e){return this.cmp(e)>0};C.greaterThanOrEqualTo=C.gte=function(e){var t=this.cmp(e);return t==1||t===0};C.hyperbolicCosine=C.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Rr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=tt(s,1,o.times(t),new s(1),!0);for(var l,d=e,g=new s(8);d--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return k(o,s.precision=r,s.rounding=n,!0)};C.hyperbolicSine=C.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=tt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Rr(5,e)),i=tt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),d=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(d))))}return o.precision=t,o.rounding=r,k(i,t,r,!0)};C.hyperbolicTangent=C.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,V(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};C.inverseCosine=C.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?he(t,n,i):new t(0):new t(NaN):e.isZero()?he(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};C.inverseHyperbolicCosine=C.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,_=!1,r=r.times(r).minus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};C.inverseHyperbolicSine=C.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,_=!1,r=r.times(r).plus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln())};C.inverseHyperbolicTangent=C.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?k(new o(i),e,t,!0):(o.precision=r=n-i.e,i=V(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};C.inverseSine=C.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=he(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};C.inverseTangent=C.atan=function(){var e,t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding;if(d.isFinite()){if(d.isZero())return new g(d);if(d.abs().eq(1)&&h+4<=kn)return s=he(g,h+4,T).times(.25),s.s=d.s,s}else{if(!d.s)return new g(NaN);if(h+4<=kn)return s=he(g,h+4,T).times(.5),s.s=d.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/D+2|0),e=r;e;--e)d=d.div(d.times(d).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(a/D),n=1,l=d.times(d),s=new g(d),i=d;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};C.isNaN=function(){return!this.s};C.isNegative=C.isNeg=function(){return this.s<0};C.isPositive=C.isPos=function(){return this.s>0};C.isZero=function(){return!!this.d&&this.d[0]===0};C.lessThan=C.lt=function(e){return this.cmp(e)<0};C.lessThanOrEqualTo=C.lte=function(e){return this.cmp(e)<1};C.logarithm=C.log=function(e){var t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding,I=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=d.d,d.s<0||!r||!r[0]||d.eq(1))return new g(r&&!r[0]?-1/0:d.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+I,s=De(d,a),n=t?Tr(g,a+10):De(e,a),l=V(s,n,a,1),Ot(l.d,i=h,T))do if(a+=10,s=De(d,a),n=t?Tr(g,a+10):De(e,a),l=V(s,n,a,1),!o){+Y(l.d).slice(i+1,i+15)+1==1e14&&(l=k(l,h+1,0));break}while(Ot(l.d,i+=10,T));return _=!0,k(l,h,T)};C.minus=C.sub=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.constructor;if(e=new S(e),!I.d||!e.d)return!I.s||!e.s?e=new S(NaN):I.d?e.s=-e.s:e=new S(e.d||I.s!==e.s?I:NaN),e;if(I.s!=e.s)return e.s=-e.s,I.plus(e);if(d=I.d,T=e.d,a=S.precision,l=S.rounding,!d[0]||!T[0]){if(T[0])e.s=-e.s;else if(d[0])e=new S(I);else return new S(l===3?-0:0);return _?k(e,a,l):e}if(r=ee(e.e/D),g=ee(I.e/D),d=d.slice(),o=g-r,o){for(h=o<0,h?(t=d,o=-o,s=T.length):(t=T,r=g,s=d.length),n=Math.max(Math.ceil(a/D),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=d.length,s=T.length,h=n0;--n)d[s++]=0;for(n=T.length;n>o;){if(d[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=d.length,i=g.length,s-i<0&&(i=s,r=g,g=d,d=r),t=0;i;)t=(d[--i]=d[i]+g[i]+t)/pe|0,d[i]%=pe;for(t&&(d.unshift(t),++n),s=d.length;d[--s]==0;)d.pop();return e.d=d,e.e=Cr(d,n),_?k(e,a,l):e};C.precision=C.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Me+e);return r.d?(t=bo(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};C.round=function(){var e=this,t=e.constructor;return k(new t(e),e.e+1,t.rounding)};C.sine=C.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Hl(n,To(n,r)),n.precision=e,n.rounding=t,k(ve>2?r.neg():r,e,t,!0)):new n(NaN)};C.squareRoot=C.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,d=s.s,g=s.constructor;if(d!==1||!a||!a[0])return new g(!d||d<0&&(!a||a[0])?NaN:a?s:1/0);for(_=!1,d=Math.sqrt(+s),d==0||d==1/0?(t=Y(a),(t.length+l)%2==0&&(t+="0"),d=Math.sqrt(t),l=ee((l+1)/2)-(l<0||l%2),d==1/0?t="5e"+l:(t=d.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(d.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(V(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&&(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 _=!0,k(n,l,g.rounding,e)};C.tangent=C.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=V(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,k(ve==2||ve==4?r.neg():r,e,t,!0)):new n(NaN)};C.times=C.mul=function(e){var t,r,n,i,o,s,a,l,d,g=this,h=g.constructor,T=g.d,I=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!I||!I[0])return new h(!e.s||T&&!T[0]&&!I||I&&!I[0]&&!T?NaN:!T||!I?e.s/0:e.s*0);for(r=ee(g.e/D)+ee(e.e/D),l=T.length,d=I.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+I[n]*T[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=Cr(o,r),_?k(e,h.precision,h.rounding):e};C.toBinary=function(e,t){return Mn(this,2,e,t)};C.toDecimalPlaces=C.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(oe(e,0,_e),t===void 0?t=n.rounding:oe(t,0,8),k(r,e+r.e+1,t))};C.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,!0):(oe(e,0,_e),t===void 0?t=i.rounding:oe(t,0,8),n=k(new i(n),e+1,t),r=ye(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=ye(i):(oe(e,0,_e),t===void 0?t=o.rounding:oe(t,0,8),n=k(new o(i),e+i.e+1,t),r=ye(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};C.toFraction=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.d,R=I.constructor;if(!S)return new R(I);if(d=r=new R(1),n=l=new R(0),t=new R(n),o=t.e=bo(S)-I.e-1,s=o%D,t.d[0]=K(10,s<0?D+s:s),e==null)e=o>0?t:d;else{if(a=new R(e),!a.isInt()||a.lt(d))throw Error(Me+a);e=a.gt(t)?o>0?t:d:a}for(_=!1,a=new R(Y(S)),g=R.precision,R.precision=o=S.length*D*2;h=V(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=d,d=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=V(e.minus(r),n,0,1,1),l=l.plus(i.times(d)),r=r.plus(i.times(n)),l.s=d.s=I.s,T=V(d,n,o,1).minus(I).abs().cmp(V(l,r,o,1).minus(I).abs())<1?[d,n]:[l,r],R.precision=g,_=!0,T};C.toHexadecimal=C.toHex=function(e,t){return Mn(this,16,e,t)};C.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding: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=V(r,e,0,t,1).times(e),_=!0,k(r)):(e.s=r.s,r=e),r};C.toNumber=function(){return+this};C.toOctal=function(e,t){return Mn(this,8,e,t)};C.toPower=C.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,d=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(K(+a,d));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=ee(e.e/D),t>=e.d.length-1&&(r=d<0?-d:d)<=Jl)return i=xo(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):(_=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Dn(e.times(De(a,n+r)),n),i.d&&(i=k(i,n+5,1),Ot(i.d,n,o)&&(t=n+10,i=k(Dn(e.times(De(a,t+r)),t),t+5,1),+Y(i.d).slice(n+1,n+15)+1==1e14&&(i=k(i,n+1,0)))),i.s=s,_=!0,l.rounding=o,k(i,n,o))};C.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(oe(e,1,_e),t===void 0?t=i.rounding:oe(t,0,8),n=k(new i(n),e,t),r=ye(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toSignificantDigits=C.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(oe(e,1,_e),t===void 0?t=n.rounding:oe(t,0,8)),k(new n(r),e,t)};C.toString=function(){var e=this,t=e.constructor,r=ye(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};C.truncated=C.trunc=function(){return k(new this.constructor(this),this.e+1,1)};C.valueOf=C.toJSON=function(){var e=this,t=e.constructor,r=ye(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(Me+e)}function Ot(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=D,i=0):(i=Math.ceil((t+1)/D),t%=D),o=K(10,D-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)==K(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)==K(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 Kl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Rr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var V=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 d,g,h,T,I,S,R,M,F,B,O,L,le,J,an,or,Pt,ln,ce,sr,ar=n.constructor,un=n.s==i.s?1:-1,Z=n.d,$=i.d;if(!Z||!Z[0]||!$||!$[0])return new ar(!n.s||!i.s||(Z?$&&Z[0]==$[0]:!$)?NaN:Z&&Z[0]==0||!$?un*0:un/0);for(l?(I=1,g=n.e-i.e):(l=pe,I=D,g=ee(n.e/I)-ee(i.e/I)),ce=$.length,Pt=Z.length,F=new ar(un),B=F.d=[],h=0;$[h]==(Z[h]||0);h++);if($[h]>(Z[h]||0)&&g--,o==null?(J=o=ar.precision,s=ar.rounding):a?J=o+(n.e-i.e)+1:J=o,J<0)B.push(1),S=!0;else{if(J=J/I+2|0,h=0,ce==1){for(T=0,$=$[0],J++;(h1&&($=e($,T,l),Z=e(Z,T,l),ce=$.length,Pt=Z.length),or=ce,O=Z.slice(0,ce),L=O.length;L=l/2&&++ln;do T=0,d=t($,O,ce,L),d<0?(le=O[0],ce!=L&&(le=le*l+(O[1]||0)),T=le/ln|0,T>1?(T>=l&&(T=l-1),R=e($,T,l),M=R.length,L=O.length,d=t(R,O,M,L),d==1&&(T--,r(R,ce=10;T/=10)h++;F.e=h+g*I-1,k(F,a?o+F.e+1:o,s,S)}return F}}();function k(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=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+=D,s=t,g=h[T=0],l=g/K(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/D),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=D,s=o-D+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=D,s=o-D+i,l=s<0?0:g/K(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%K(10,i-s-1)),d=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/K(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,d?(t-=e.e+1,h[0]=K(10,(D-t%D)%D),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=K(10,D-o),h[T]=s>0?(g/K(10,i-s)%K(10,s)|0)*a:0),d)for(;;)if(T==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[T]+=a,h[T]!=pe)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return _&&(e.e>I.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+ke(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+ke(-i-1)+o,r&&(n=r-s)>0&&(o+=ke(n))):i>=s?(o+=ke(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+ke(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=ke(n))),o}function Cr(e,t){var r=e[0];for(t*=D;r>=10;r/=10)t++;return t}function Tr(e,t,r){if(t>Ql)throw _=!0,r&&(e.precision=r),Error(ho);return k(new e(Pr),t,1,!0)}function he(e,t,r){if(t>kn)throw Error(ho);return k(new e(vr),t,r,!0)}function bo(e){var t=e.length-1,r=t*D+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 ke(e){for(var t="";e--;)t+="0";return t}function xo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/D+4);for(_=!1;;){if(r%2&&(o=o.times(t),mo(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),mo(t.d,s)}return _=!0,o}function po(e){return e.d[e.d.length-1]&1}function Po(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(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=S):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(K(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=k(o.times(e),l,1),r=r.times(++g),a=s.plus(V(o,r,l,1)),Y(a.d).slice(0,l)===Y(s.d).slice(0,l)){for(i=h;i--;)s=k(s.times(s),l,1);if(t==null)if(d<3&&Ot(s.d,l-n,I,d))T.precision=l+=10,r=o=a=new T(1),g=0,d++;else return k(s,T.precision=S,I,_=!0);else return T.precision=S,s}s=a}}function De(e,t){var r,n,i,o,s,a,l,d,g,h,T,I=1,S=10,R=e,M=R.d,F=R.constructor,B=F.rounding,O=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=O):g=t,F.precision=g+=S,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),I++;o=R.e,n>1?(R=new F("0."+r),o++):R=new F(n+"."+r.slice(1))}else return d=Tr(F,g+2,O).times(o+""),R=De(new F(n+"."+r.slice(1)),g-S).plus(d),F.precision=O,t==null?k(R,O,B,_=!0):R;for(h=R,l=s=R=V(R.minus(1),R.plus(1),g,1),T=k(R.times(R),g,1),i=3;;){if(s=k(s.times(T),g,1),d=l.plus(V(s,new F(i),g,1)),Y(d.d).slice(0,g)===Y(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(Tr(F,g+2,O).times(o+""))),l=V(l,new F(I),g,1),t==null)if(Ot(l.d,g-S,B,a))F.precision=g+=S,d=s=R=V(h.minus(1),h.plus(1),g,1),T=k(R.times(R),g,1),i=a=1;else return k(l,F.precision=O,B,_=!0);else return F.precision=O,l;l=d,i+=2}}function vo(e){return String(e.s*e.s/0)}function xr(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)%D,r<0&&(n+=D),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Eo.test(t))return xr(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(jl.test(t))r=16,t=t.toLowerCase();else if($l.test(t))r=2;else if(Gl.test(t))r=8;else throw Error(Me+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=xo(n,new n(r),o,o*2)),d=br(t,r,pe),g=d.length-1,o=g;d[o]===0;--o)d.pop();return o<0?new n(e.s*0):(e.e=Cr(d,g),e.d=d,_=!1,s&&(e=V(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?K(2,l):Te.pow(2,l))),_=!0,e)}function Hl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Rr(5,r)),t=tt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function tt(e,t,r,n,i){var o,s,a,l,d=1,g=e.precision,h=Math.ceil(g/D);for(_=!1,l=r.times(r),a=new e(n);;){if(s=V(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=V(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,d++}return _=!0,s.d.length=h+1,s}function Rr(e,t){for(var r=e;--t;)r*=e;return r}function To(e,t){var r,n=t.s<0,i=he(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return ve=n?4:1,t;if(r=t.divToInt(i),r.isZero())ve=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return ve=po(r)?n?2:3:n?4:1,t;ve=po(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Mn(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=e.constructor,S=r!==void 0;if(S?(oe(r,1,_e),n===void 0?n=I.rounding:oe(n,0,8)):(r=I.precision,n=I.rounding),!e.isFinite())g=vo(e);else{for(g=ye(e),s=g.indexOf("."),S?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new I(1),T.e=g.length-s,T.d=br(ye(T),10,i),T.e=T.d.length),h=br(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=S?"0p+0":"0";else{if(s<0?o--:(e=new I(e),e.d=h,e.e=o,e=V(e,T,r,n,0,i),h=e.d,o=e.e,d=go),s=h[r],a=i/2,d=d||h[r+1]!==void 0,d=n<4?(s!==void 0||d)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||d||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,d)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 zl(e){return new this(e).abs()}function Yl(e){return new this(e).acos()}function Zl(e){return new this(e).acosh()}function Xl(e,t){return new this(e).plus(t)}function eu(e){return new this(e).asin()}function tu(e){return new this(e).asinh()}function ru(e){return new this(e).atan()}function nu(e){return new this(e).atanh()}function iu(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=he(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?he(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=he(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(V(e,t,o,1)),t=he(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(V(e,t,o,1)),r}function ou(e){return new this(e).cbrt()}function su(e){return k(e=new this(e),e.e+1,2)}function au(e,t,r){return new this(e).clamp(t,r)}function lu(e){if(!e||typeof e!="object")throw Error(Ar+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,_e,"rounding",0,8,"toExpNeg",-et,0,"toExpPos",0,et,"maxE",0,et,"minE",-et,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Me+r+": "+n);if(r="crypto",i&&(this[r]=On[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(yo);else this[r]=!1;else throw Error(Me+r+": "+n);return this}function uu(e){return new this(e).cos()}function cu(e){return new this(e).cosh()}function Ao(e){var t,r,n;function i(o){var s,a,l,d=this;if(!(d instanceof i))return new i(o);if(d.constructor=i,fo(o)){d.s=o.s,_?!o.d||o.e>i.maxE?(d.e=NaN,d.d=null):o.e=10;a/=10)s++;_?s>i.maxE?(d.e=NaN,d.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(yo);else for(;o=10;i/=10)n++;nkt,datamodelEnumToSchemaEnum:()=>Nu});f();u();c();p();m();f();u();c();p();m();function Nu(e){return{name:e.name,values:e.values.map(t=>t.name)}}f();u();c();p();m();var kt=(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.updateManyAndReturn="updateManyAndReturn",O.upsert="upsert",O.delete="delete",O.deleteMany="deleteMany",O.groupBy="groupBy",O.count="count",O.aggregate="aggregate",O.findRaw="findRaw",O.aggregateRaw="aggregateRaw",O))(kt||{});var Fu=Ue(to());var Lu={red:Ye,gray:Vi,dim:mr,bold:pr,underline:Fi,highlightSource:e=>e.highlight()},Uu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Bu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function qu({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(Vu(t))),i){a.push("");let d=[i.toString()];o&&(d.push(o),d.push(s.dim(")"))),a.push(d.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +"use strict";var va=Object.create;var lr=Object.defineProperty;var Ta=Object.getOwnPropertyDescriptor;var Aa=Object.getOwnPropertyNames;var Ca=Object.getPrototypeOf,Ra=Object.prototype.hasOwnProperty;var fe=(e,t)=>()=>(e&&(t=e(e=0)),t);var Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vt=(e,t)=>{for(var r in t)lr(e,r,{get:t[r],enumerable:!0})},ui=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Aa(t))!Ra.call(e,i)&&i!==r&&lr(e,i,{get:()=>t[i],enumerable:!(n=Ta(t,i))||n.enumerable});return e};var Ue=(e,t,r)=>(r=e!=null?va(Ca(e)):{},ui(t||!e||!e.__esModule?lr(r,"default",{value:e,enumerable:!0}):r,e)),Sa=e=>ui(lr({},"__esModule",{value:!0}),e);var y,b,u=fe(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:b}=y});var x,c=fe(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,p=fe(()=>{"use strict";E=()=>{};E.prototype=E});var m=fe(()=>{"use strict"});var Si=Se(ze=>{"use strict";f();u();c();p();m();var di=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ia=di(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=I;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=S.indexOf("=");M===-1&&(M=R);var F=M===R?0:4-M%4;return[M,F]}function l(S){var R=a(S),M=R[0],F=R[1];return(M+F)*3/4-F}function d(S,R,M){return(R+M)*3/4-M}function g(S){var R,M=a(S),F=M[0],B=M[1],O=new n(d(S,F,B)),L=0,le=B>0?F-4:F,J;for(J=0;J>16&255,O[L++]=R>>8&255,O[L++]=R&255;return B===2&&(R=r[S.charCodeAt(J)]<<2|r[S.charCodeAt(J+1)]>>4,O[L++]=R&255),B===1&&(R=r[S.charCodeAt(J)]<<10|r[S.charCodeAt(J+1)]<<4|r[S.charCodeAt(J+2)]>>2,O[L++]=R>>8&255,O[L++]=R&255),O}function h(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function T(S,R,M){for(var F,B=[],O=R;Ole?le:L+O));return F===1?(R=S[M-1],B.push(t[R>>2]+t[R<<4&63]+"==")):F===2&&(R=(S[M-2]<<8)+S[M-1],B.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),B.join("")}}),Oa=di(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,d=(1<>1,h=-7,T=n?o-1:0,I=n?-1:1,S=t[r+T];for(T+=I,s=S&(1<<-h)-1,S>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=I,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=I,h-=8);if(s===0)s=1-g;else{if(s===d)return a?NaN:(S?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(S?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,d,g=s*8-o-1,h=(1<>1,I=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=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*(d=Math.pow(2,-a))<1&&(a--,d*=2),a+T>=1?r+=I/d:r+=I*Math.pow(2,1-T),r*d>=2&&(a++,d/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*d-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+S]=l&255,S+=R,l/=256,o-=8);for(a=a<0;t[n+S]=a&255,S+=R,a/=256,g-=8);t[n+S-R]|=M*128}}),cn=Ia(),We=Oa(),ci=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.Buffer=A;ze.SlowBuffer=Fa;ze.INSPECT_MAX_BYTES=50;var ur=2147483647;ze.kMaxLength=ur;A.TYPED_ARRAY_SUPPORT=ka();!A.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 ka(){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(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}});Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function xe(e){if(e>ur)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(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 fn(e)}return gi(e,t,r)}A.poolSize=8192;function gi(e,t,r){if(typeof e=="string")return Ma(e,t);if(ArrayBuffer.isView(e))return _a(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(de(e,ArrayBuffer)||e&&de(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(de(e,SharedArrayBuffer)||e&&de(e.buffer,SharedArrayBuffer)))return yi(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 A.from(n,t,r);let i=Na(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return A.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)}A.from=function(e,t,r){return gi(e,t,r)};Object.setPrototypeOf(A.prototype,Uint8Array.prototype);Object.setPrototypeOf(A,Uint8Array);function hi(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 Da(e,t,r){return hi(e),e<=0?xe(e):t!==void 0?typeof r=="string"?xe(e).fill(t,r):xe(e).fill(t):xe(e)}A.alloc=function(e,t,r){return Da(e,t,r)};function fn(e){return hi(e),xe(e<0?0:dn(e)|0)}A.allocUnsafe=function(e){return fn(e)};A.allocUnsafeSlow=function(e){return fn(e)};function Ma(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=wi(e,t)|0,n=xe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function pn(e){let t=e.length<0?0:dn(e.length)|0,r=xe(t);for(let n=0;n=ur)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ur.toString(16)+" bytes");return e|0}function Fa(e){return+e!=e&&(e=0),A.alloc(+e)}A.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==A.prototype};A.compare=function(e,t){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),de(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(e)||!A.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?(A.isBuffer(o)||(o=A.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(A.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function wi(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||de(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return mn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Ri(e).length;default:if(i)return n?-1:mn(e).length;t=(""+t).toLowerCase(),i=!0}}A.byteLength=wi;function La(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 Ka(this,t,r);case"utf8":case"utf-8":return bi(this,t,r);case"ascii":return Ja(this,t,r);case"latin1":case"binary":return Qa(this,t,r);case"base64":return ja(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}}A.prototype._isBuffer=!0;function Be(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}A.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+=" ... "),""};ci&&(A.prototype[ci]=A.prototype.inspect);A.prototype.compare=function(e,t,r,n,i){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.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),d=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,hn(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=A.from(t,n)),A.isBuffer(t))return t.length===0?-1:pi(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):pi(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function pi(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 d;if(i){let g=-1;for(d=r;ds&&(r=s-a),d=r;d>=0;d--){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 Ua(this,e,t,r);case"utf8":case"utf-8":return Ba(this,e,t,r);case"ascii":case"latin1":case"binary":return qa(this,e,t,r);case"base64":return Va(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $a(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ja(e,t,r){return t===0&&r===e.length?cn.fromByteArray(e):cn.fromByteArray(e.slice(t,r))}function bi(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,d,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],d=e[i+2],(l&192)===128&&(d&192)===128&&(h=(o&15)<<12|(l&63)<<6|d&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],d=e[i+2],g=e[i+3],(l&192)===128&&(d&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(d&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 Ga(n)}var mi=4096;function Ga(e){let t=e.length;if(t<=mi)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")}A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};A.prototype.readBigUInt64LE=Ie(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};A.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(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};A.prototype.readInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};A.prototype.readInt16LE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};A.prototype.readInt16BE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};A.prototype.readInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};A.prototype.readInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};A.prototype.readBigInt64LE=Ie(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||W(e,4,this.length),We.read(this,e,!0,23,4)};A.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),We.read(this,e,!1,23,4)};A.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!0,52,8)};A.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.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};A.prototype.writeUint8=A.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};A.prototype.writeUint16LE=A.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};A.prototype.writeUint16BE=A.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};A.prototype.writeUint32LE=A.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};A.prototype.writeUint32BE=A.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 xi(e,t,r,n,i){Ci(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 Pi(e,t,r,n,i){Ci(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}A.prototype.writeBigUInt64LE=Ie(function(e,t=0){return xi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeBigUInt64BE=Ie(function(e,t=0){return Pi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.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};A.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};A.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};A.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};A.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};A.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};A.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};A.prototype.writeBigInt64LE=Ie(function(e,t=0){return xi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});A.prototype.writeBigInt64BE=Ie(function(e,t=0){return Pi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function vi(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||vi(e,t,r,4,34028234663852886e22,-34028234663852886e22),We.write(e,t,r,n,23,4),r+4}A.prototype.writeFloatLE=function(e,t,r){return Ti(this,e,t,!0,r)};A.prototype.writeFloatBE=function(e,t,r){return Ti(this,e,t,!1,r)};function Ai(e,t,r,n,i){return t=+t,r=r>>>0,i||vi(e,t,r,8,17976931348623157e292,-17976931348623157e292),We.write(e,t,r,n,52,8),r+8}A.prototype.writeDoubleLE=function(e,t,r){return Ai(this,e,t,!0,r)};A.prototype.writeDoubleBE=function(e,t,r){return Ai(this,e,t,!1,r)};A.prototype.copy=function(e,t,r,n){if(!A.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=fi(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=fi(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function fi(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 Ha(e,t,r){He(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Tt(t,e.length-(r+1))}function Ci(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 Ke.ERR_OUT_OF_RANGE("value",a,e)}Ha(n,i,o)}function He(e,t){if(typeof e!="number")throw new Ke.ERR_INVALID_ARG_TYPE(t,"number",e)}function Tt(e,t,r){throw Math.floor(e)!==e?(He(e,r),new Ke.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Ke.ERR_BUFFER_OUT_OF_BOUNDS:new Ke.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var za=/[^+/0-9A-Za-z-_]/g;function Ya(e){if(e=e.split("=")[0],e=e.trim().replace(za,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function mn(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 Za(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function Ri(e){return cn.toByteArray(Ya(e))}function cr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function de(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function hn(e){return e!==e}var el=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Ie(e){return typeof BigInt>"u"?tl:e}function tl(){throw new Error("BigInt not supported")}});var w,f=fe(()=>{"use strict";w=Ue(Si())});function al(){return!1}function xn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function ll(){return xn()}function ul(){return[]}function cl(e){e(null,[])}function pl(){return""}function ml(){return""}function fl(){}function dl(){}function gl(){}function hl(){}function yl(){}function wl(){}function El(){}function bl(){}function xl(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Pl(e,t){t(null,xn())}var vl,Tl,Ji,Qi=fe(()=>{"use strict";f();u();c();p();m();vl={},Tl={existsSync:al,lstatSync:xn,stat:Pl,statSync:ll,readdirSync:ul,readdir:cl,readlinkSync:pl,realpathSync:ml,chmodSync:fl,renameSync:dl,mkdirSync:gl,rmdirSync:hl,rmSync:yl,unlinkSync:wl,watchFile:El,unwatchFile:bl,watch:xl,promises:vl},Ji=Tl});function Al(...e){return e.join("/")}function Cl(...e){return e.join("/")}function Rl(e){let t=Ki(e),r=Wi(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Ki(e){let t=e.split("/");return t[t.length-1]}function Wi(e){return e.split("/").slice(0,-1).join("/")}function Il(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var Hi,Sl,Ol,kl,dr,zi=fe(()=>{"use strict";f();u();c();p();m();Hi="/",Sl=":";Ol={sep:Hi},kl={basename:Ki,delimiter:Sl,dirname:Wi,join:Cl,normalize:Il,parse:Rl,posix:Ol,resolve:Al,sep:Hi},dr=kl});var Yi=Se((vf,Dl)=>{Dl.exports={name:"@prisma/internals",version:"6.15.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb","@prisma/schema-engine-wasm":"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var vn=Se((Ff,Fl)=>{Fl.exports={name:"@prisma/engines-version",version:"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"85179d7826409ee107a6ba334b5e305ae3fba9fb"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Zi=Se(gr=>{"use strict";f();u();c();p();m();Object.defineProperty(gr,"__esModule",{value:!0});gr.enginesVersion=void 0;gr.enginesVersion=vn().prisma.enginesVersion});var to=Se((Hf,eo)=>{"use strict";f();u();c();p();m();eo.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 io=Se((ad,no)=>{"use strict";f();u();c();p();m();no.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 so=Se((fd,oo)=>{"use strict";f();u();c();p();m();var Vl=io();oo.exports=e=>typeof e=="string"?e.replace(Vl(),""):e});var _n=Se((Ky,Co)=>{"use strict";f();u();c();p();m();Co.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";f();u();c();p();m()});var Do=fe(()=>{"use strict";f();u();c();p();m()});var Jr,rs=fe(()=>{"use strict";f();u();c();p();m();Jr=class{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 _p={};vt(_p,{DMMF:()=>Dt,Debug:()=>z,Decimal:()=>Ae,Extensions:()=>yn,MetricsClient:()=>pt,PrismaClientInitializationError:()=>Q,PrismaClientKnownRequestError:()=>ne,PrismaClientRustPanicError:()=>Pe,PrismaClientUnknownRequestError:()=>ie,PrismaClientValidationError:()=>X,Public:()=>wn,Sql:()=>se,createParam:()=>Wo,defineDmmfProperty:()=>es,deserializeJsonResponse:()=>dt,deserializeRawResult:()=>on,dmmfToRuntimeDataModel:()=>co,empty:()=>is,getPrismaClient:()=>ba,getRuntime:()=>Zr,join:()=>ns,makeStrictEnum:()=>xa,makeTypedQueryFactory:()=>ts,objectEnumValues:()=>Nr,raw:()=>jn,serializeJsonQuery:()=>$r,skip:()=>Vr,sqltag:()=>Gn,warnEnvConflicts:()=>void 0,warnOnce:()=>St});module.exports=Sa(_p);f();u();c();p();m();var yn={};vt(yn,{defineExtension:()=>Ii,getExtensionContext:()=>Oi});f();u();c();p();m();f();u();c();p();m();function Ii(e){return typeof e=="function"?e:t=>t.$extends(e)}f();u();c();p();m();function Oi(e){return e}var wn={};vt(wn,{validator:()=>ki});f();u();c();p();m();f();u();c();p();m();function ki(...e){return t=>t}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var En,Di,Mi,_i,Ni=!0;typeof y<"u"&&({FORCE_COLOR:En,NODE_DISABLE_COLORS:Di,NO_COLOR:Mi,TERM:_i}=y.env||{},Ni=y.stdout&&y.stdout.isTTY);var rl={enabled:!Di&&Mi==null&&_i!=="dumb"&&(En!=null&&En!=="0"||Ni)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!rl.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Am=j(0,0),pr=j(1,22),mr=j(2,22),Cm=j(3,23),Fi=j(4,24),Rm=j(7,27),Sm=j(8,28),Im=j(9,29),Om=j(30,39),Ye=j(31,39),Li=j(32,39),Ui=j(33,39),Bi=j(34,39),km=j(35,39),qi=j(36,39),Dm=j(37,39),Vi=j(90,39),Mm=j(90,39),_m=j(40,49),Nm=j(41,49),Fm=j(42,49),Lm=j(43,49),Um=j(44,49),Bm=j(45,49),qm=j(46,49),Vm=j(47,49);f();u();c();p();m();var nl=100,$i=["green","yellow","blue","magenta","cyan","red"],fr=[],ji=Date.now(),il=0,bn=typeof y<"u"?y.env:{};globalThis.DEBUG??=bn.DEBUG??"";globalThis.DEBUG_COLORS??=bn.DEBUG_COLORS?bn.DEBUG_COLORS==="true":!0;var At={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 ol(e){let t={color:$i[il++%$i.length],enabled:At.enabled(e),namespace:e,log:At.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&fr.push([o,...n]),fr.length>nl&&fr.shift(),At.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:sl(g)),d=`+${Date.now()-ji}ms`;ji=Date.now(),a(o,...l,d)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var z=new Proxy(ol,{get:(e,t)=>At[t],set:(e,t,r)=>At[t]=r});function sl(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 Gi(){fr.length=0}f();u();c();p();m();f();u();c();p();m();var Ml=Yi(),Pn=Ml.version;f();u();c();p();m();function Ze(e){let t=_l();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Nl(e))}function _l(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Nl(e){return e?.previewFeatures.includes("queryCompiler")?"client":"library"}f();u();c();p();m();var Xi="prisma+postgres",hr=`${Xi}:`;function yr(e){return e?.toString().startsWith(`${hr}//`)??!1}function Tn(e){if(!yr(e))return!1;let{host:t}=new URL(e);return t.includes("localhost")||t.includes("127.0.0.1")||t.includes("[::1]")}var Rt={};vt(Rt,{error:()=>Bl,info:()=>Ul,log:()=>Ll,query:()=>ql,should:()=>ro,tags:()=>Ct,warn:()=>An});f();u();c();p();m();var Ct={error:Ye("prisma:error"),warn:Ui("prisma:warn"),info:qi("prisma:info"),query:Bi("prisma:query")},ro={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Ll(...e){console.log(...e)}function An(e,...t){ro.warn()&&console.warn(`${Ct.warn} ${e}`,...t)}function Ul(e,...t){console.info(`${Ct.info} ${e}`,...t)}function Bl(e,...t){console.error(`${Ct.error} ${e}`,...t)}function ql(e,...t){console.log(`${Ct.query} ${e}`,...t)}f();u();c();p();m();function qe(e,t){throw new Error(t)}f();u();c();p();m();function Cn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();u();c();p();m();function wr(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();u();c();p();m();function Rn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{ao.has(e)||(ao.add(e),An(t,...r))};var Q=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};N(Q,"PrismaClientInitializationError");f();u();c();p();m();var ne=class extends Error{code;meta;clientVersion;batchRequestIdx;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(ne,"PrismaClientKnownRequestError");f();u();c();p();m();var Pe=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(Pe,"PrismaClientRustPanicError");f();u();c();p();m();var ie=class extends Error{clientVersion;batchRequestIdx;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(ie,"PrismaClientUnknownRequestError");f();u();c();p();m();var X=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};N(X,"PrismaClientValidationError");f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var ge=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};f();u();c();p();m();function Oe(e){return e.substring(0,1).toLowerCase()+e.substring(1)}f();u();c();p();m();function uo(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}f();u();c();p();m();function It(e){let t;return{get(){return t||(t={value:e()}),t.value}}}f();u();c();p();m();function co(e){return{models:Sn(e.models),enums:Sn(e.enums),types:Sn(e.types)}}function Sn(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}f();u();c();p();m();function Xe(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Er(e){return e.toString()!=="Invalid Date"}f();u();c();p();m();f();u();c();p();m();var et=9e15,_e=1e9,In="0123456789abcdef",Pr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",vr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",On={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-et,maxE:et,crypto:!1},go,ve,_=!0,Ar="[DecimalError] ",Me=Ar+"Invalid argument: ",ho=Ar+"Precision limit exceeded",yo=Ar+"crypto unavailable",wo="[object Decimal]",ee=Math.floor,K=Math.pow,$l=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,jl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Gl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Eo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,D=7,Jl=9007199254740991,Ql=Pr.length-1,kn=vr.length-1,C={toStringTag:wo};C.absoluteValue=C.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),k(e)};C.ceil=function(){return k(new this.constructor(this),this.e+1,2)};C.clampedTo=C.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(Me+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};C.comparedTo=C.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,d=e.s;if(!s||!a)return!l||!d?NaN:l!==d?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-d:0;if(l!==d)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};C.cosine=C.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Kl(n,To(n,r)),n.precision=e,n.rounding=t,k(ve==2||ve==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};C.cubeRoot=C.cbrt=function(){var e,t,r,n,i,o,s,a,l,d,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(_=!1,o=g.s*K(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=K(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 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),d=l.plus(g),n=V(d.plus(g).times(a),d.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&&(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 _=!0,k(n,e,h.rounding,t)};C.decimalPlaces=C.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-ee(this.e/D))*D,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};C.dividedBy=C.div=function(e){return V(this,new this.constructor(e))};C.dividedToIntegerBy=C.divToInt=function(e){var t=this,r=t.constructor;return k(V(t,new r(e),0,1,1),r.precision,r.rounding)};C.equals=C.eq=function(e){return this.cmp(e)===0};C.floor=function(){return k(new this.constructor(this),this.e+1,3)};C.greaterThan=C.gt=function(e){return this.cmp(e)>0};C.greaterThanOrEqualTo=C.gte=function(e){var t=this.cmp(e);return t==1||t===0};C.hyperbolicCosine=C.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Rr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=tt(s,1,o.times(t),new s(1),!0);for(var l,d=e,g=new s(8);d--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return k(o,s.precision=r,s.rounding=n,!0)};C.hyperbolicSine=C.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=tt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Rr(5,e)),i=tt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),d=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(d))))}return o.precision=t,o.rounding=r,k(i,t,r,!0)};C.hyperbolicTangent=C.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,V(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};C.inverseCosine=C.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?he(t,n,i):new t(0):new t(NaN):e.isZero()?he(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};C.inverseHyperbolicCosine=C.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,_=!1,r=r.times(r).minus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};C.inverseHyperbolicSine=C.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,_=!1,r=r.times(r).plus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln())};C.inverseHyperbolicTangent=C.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?k(new o(i),e,t,!0):(o.precision=r=n-i.e,i=V(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};C.inverseSine=C.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=he(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};C.inverseTangent=C.atan=function(){var e,t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding;if(d.isFinite()){if(d.isZero())return new g(d);if(d.abs().eq(1)&&h+4<=kn)return s=he(g,h+4,T).times(.25),s.s=d.s,s}else{if(!d.s)return new g(NaN);if(h+4<=kn)return s=he(g,h+4,T).times(.5),s.s=d.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/D+2|0),e=r;e;--e)d=d.div(d.times(d).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(a/D),n=1,l=d.times(d),s=new g(d),i=d;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};C.isNaN=function(){return!this.s};C.isNegative=C.isNeg=function(){return this.s<0};C.isPositive=C.isPos=function(){return this.s>0};C.isZero=function(){return!!this.d&&this.d[0]===0};C.lessThan=C.lt=function(e){return this.cmp(e)<0};C.lessThanOrEqualTo=C.lte=function(e){return this.cmp(e)<1};C.logarithm=C.log=function(e){var t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding,I=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=d.d,d.s<0||!r||!r[0]||d.eq(1))return new g(r&&!r[0]?-1/0:d.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+I,s=De(d,a),n=t?Tr(g,a+10):De(e,a),l=V(s,n,a,1),Ot(l.d,i=h,T))do if(a+=10,s=De(d,a),n=t?Tr(g,a+10):De(e,a),l=V(s,n,a,1),!o){+Y(l.d).slice(i+1,i+15)+1==1e14&&(l=k(l,h+1,0));break}while(Ot(l.d,i+=10,T));return _=!0,k(l,h,T)};C.minus=C.sub=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.constructor;if(e=new S(e),!I.d||!e.d)return!I.s||!e.s?e=new S(NaN):I.d?e.s=-e.s:e=new S(e.d||I.s!==e.s?I:NaN),e;if(I.s!=e.s)return e.s=-e.s,I.plus(e);if(d=I.d,T=e.d,a=S.precision,l=S.rounding,!d[0]||!T[0]){if(T[0])e.s=-e.s;else if(d[0])e=new S(I);else return new S(l===3?-0:0);return _?k(e,a,l):e}if(r=ee(e.e/D),g=ee(I.e/D),d=d.slice(),o=g-r,o){for(h=o<0,h?(t=d,o=-o,s=T.length):(t=T,r=g,s=d.length),n=Math.max(Math.ceil(a/D),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=d.length,s=T.length,h=n0;--n)d[s++]=0;for(n=T.length;n>o;){if(d[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=d.length,i=g.length,s-i<0&&(i=s,r=g,g=d,d=r),t=0;i;)t=(d[--i]=d[i]+g[i]+t)/pe|0,d[i]%=pe;for(t&&(d.unshift(t),++n),s=d.length;d[--s]==0;)d.pop();return e.d=d,e.e=Cr(d,n),_?k(e,a,l):e};C.precision=C.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Me+e);return r.d?(t=bo(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};C.round=function(){var e=this,t=e.constructor;return k(new t(e),e.e+1,t.rounding)};C.sine=C.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Hl(n,To(n,r)),n.precision=e,n.rounding=t,k(ve>2?r.neg():r,e,t,!0)):new n(NaN)};C.squareRoot=C.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,d=s.s,g=s.constructor;if(d!==1||!a||!a[0])return new g(!d||d<0&&(!a||a[0])?NaN:a?s:1/0);for(_=!1,d=Math.sqrt(+s),d==0||d==1/0?(t=Y(a),(t.length+l)%2==0&&(t+="0"),d=Math.sqrt(t),l=ee((l+1)/2)-(l<0||l%2),d==1/0?t="5e"+l:(t=d.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(d.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(V(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&&(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 _=!0,k(n,l,g.rounding,e)};C.tangent=C.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=V(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,k(ve==2||ve==4?r.neg():r,e,t,!0)):new n(NaN)};C.times=C.mul=function(e){var t,r,n,i,o,s,a,l,d,g=this,h=g.constructor,T=g.d,I=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!I||!I[0])return new h(!e.s||T&&!T[0]&&!I||I&&!I[0]&&!T?NaN:!T||!I?e.s/0:e.s*0);for(r=ee(g.e/D)+ee(e.e/D),l=T.length,d=I.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+I[n]*T[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=Cr(o,r),_?k(e,h.precision,h.rounding):e};C.toBinary=function(e,t){return Mn(this,2,e,t)};C.toDecimalPlaces=C.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(oe(e,0,_e),t===void 0?t=n.rounding:oe(t,0,8),k(r,e+r.e+1,t))};C.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,!0):(oe(e,0,_e),t===void 0?t=i.rounding:oe(t,0,8),n=k(new i(n),e+1,t),r=ye(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=ye(i):(oe(e,0,_e),t===void 0?t=o.rounding:oe(t,0,8),n=k(new o(i),e+i.e+1,t),r=ye(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};C.toFraction=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.d,R=I.constructor;if(!S)return new R(I);if(d=r=new R(1),n=l=new R(0),t=new R(n),o=t.e=bo(S)-I.e-1,s=o%D,t.d[0]=K(10,s<0?D+s:s),e==null)e=o>0?t:d;else{if(a=new R(e),!a.isInt()||a.lt(d))throw Error(Me+a);e=a.gt(t)?o>0?t:d:a}for(_=!1,a=new R(Y(S)),g=R.precision,R.precision=o=S.length*D*2;h=V(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=d,d=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=V(e.minus(r),n,0,1,1),l=l.plus(i.times(d)),r=r.plus(i.times(n)),l.s=d.s=I.s,T=V(d,n,o,1).minus(I).abs().cmp(V(l,r,o,1).minus(I).abs())<1?[d,n]:[l,r],R.precision=g,_=!0,T};C.toHexadecimal=C.toHex=function(e,t){return Mn(this,16,e,t)};C.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding: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=V(r,e,0,t,1).times(e),_=!0,k(r)):(e.s=r.s,r=e),r};C.toNumber=function(){return+this};C.toOctal=function(e,t){return Mn(this,8,e,t)};C.toPower=C.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,d=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(K(+a,d));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=ee(e.e/D),t>=e.d.length-1&&(r=d<0?-d:d)<=Jl)return i=xo(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):(_=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Dn(e.times(De(a,n+r)),n),i.d&&(i=k(i,n+5,1),Ot(i.d,n,o)&&(t=n+10,i=k(Dn(e.times(De(a,t+r)),t),t+5,1),+Y(i.d).slice(n+1,n+15)+1==1e14&&(i=k(i,n+1,0)))),i.s=s,_=!0,l.rounding=o,k(i,n,o))};C.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(oe(e,1,_e),t===void 0?t=i.rounding:oe(t,0,8),n=k(new i(n),e,t),r=ye(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toSignificantDigits=C.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(oe(e,1,_e),t===void 0?t=n.rounding:oe(t,0,8)),k(new n(r),e,t)};C.toString=function(){var e=this,t=e.constructor,r=ye(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};C.truncated=C.trunc=function(){return k(new this.constructor(this),this.e+1,1)};C.valueOf=C.toJSON=function(){var e=this,t=e.constructor,r=ye(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(Me+e)}function Ot(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=D,i=0):(i=Math.ceil((t+1)/D),t%=D),o=K(10,D-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)==K(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)==K(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 Kl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Rr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var V=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 d,g,h,T,I,S,R,M,F,B,O,L,le,J,an,or,Pt,ln,ce,sr,ar=n.constructor,un=n.s==i.s?1:-1,Z=n.d,$=i.d;if(!Z||!Z[0]||!$||!$[0])return new ar(!n.s||!i.s||(Z?$&&Z[0]==$[0]:!$)?NaN:Z&&Z[0]==0||!$?un*0:un/0);for(l?(I=1,g=n.e-i.e):(l=pe,I=D,g=ee(n.e/I)-ee(i.e/I)),ce=$.length,Pt=Z.length,F=new ar(un),B=F.d=[],h=0;$[h]==(Z[h]||0);h++);if($[h]>(Z[h]||0)&&g--,o==null?(J=o=ar.precision,s=ar.rounding):a?J=o+(n.e-i.e)+1:J=o,J<0)B.push(1),S=!0;else{if(J=J/I+2|0,h=0,ce==1){for(T=0,$=$[0],J++;(h1&&($=e($,T,l),Z=e(Z,T,l),ce=$.length,Pt=Z.length),or=ce,O=Z.slice(0,ce),L=O.length;L=l/2&&++ln;do T=0,d=t($,O,ce,L),d<0?(le=O[0],ce!=L&&(le=le*l+(O[1]||0)),T=le/ln|0,T>1?(T>=l&&(T=l-1),R=e($,T,l),M=R.length,L=O.length,d=t(R,O,M,L),d==1&&(T--,r(R,ce=10;T/=10)h++;F.e=h+g*I-1,k(F,a?o+F.e+1:o,s,S)}return F}}();function k(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=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+=D,s=t,g=h[T=0],l=g/K(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/D),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=D,s=o-D+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=D,s=o-D+i,l=s<0?0:g/K(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%K(10,i-s-1)),d=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/K(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,d?(t-=e.e+1,h[0]=K(10,(D-t%D)%D),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=K(10,D-o),h[T]=s>0?(g/K(10,i-s)%K(10,s)|0)*a:0),d)for(;;)if(T==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[T]+=a,h[T]!=pe)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return _&&(e.e>I.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+ke(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+ke(-i-1)+o,r&&(n=r-s)>0&&(o+=ke(n))):i>=s?(o+=ke(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+ke(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=ke(n))),o}function Cr(e,t){var r=e[0];for(t*=D;r>=10;r/=10)t++;return t}function Tr(e,t,r){if(t>Ql)throw _=!0,r&&(e.precision=r),Error(ho);return k(new e(Pr),t,1,!0)}function he(e,t,r){if(t>kn)throw Error(ho);return k(new e(vr),t,r,!0)}function bo(e){var t=e.length-1,r=t*D+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 ke(e){for(var t="";e--;)t+="0";return t}function xo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/D+4);for(_=!1;;){if(r%2&&(o=o.times(t),mo(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),mo(t.d,s)}return _=!0,o}function po(e){return e.d[e.d.length-1]&1}function Po(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(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=S):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(K(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=k(o.times(e),l,1),r=r.times(++g),a=s.plus(V(o,r,l,1)),Y(a.d).slice(0,l)===Y(s.d).slice(0,l)){for(i=h;i--;)s=k(s.times(s),l,1);if(t==null)if(d<3&&Ot(s.d,l-n,I,d))T.precision=l+=10,r=o=a=new T(1),g=0,d++;else return k(s,T.precision=S,I,_=!0);else return T.precision=S,s}s=a}}function De(e,t){var r,n,i,o,s,a,l,d,g,h,T,I=1,S=10,R=e,M=R.d,F=R.constructor,B=F.rounding,O=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=O):g=t,F.precision=g+=S,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),I++;o=R.e,n>1?(R=new F("0."+r),o++):R=new F(n+"."+r.slice(1))}else return d=Tr(F,g+2,O).times(o+""),R=De(new F(n+"."+r.slice(1)),g-S).plus(d),F.precision=O,t==null?k(R,O,B,_=!0):R;for(h=R,l=s=R=V(R.minus(1),R.plus(1),g,1),T=k(R.times(R),g,1),i=3;;){if(s=k(s.times(T),g,1),d=l.plus(V(s,new F(i),g,1)),Y(d.d).slice(0,g)===Y(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(Tr(F,g+2,O).times(o+""))),l=V(l,new F(I),g,1),t==null)if(Ot(l.d,g-S,B,a))F.precision=g+=S,d=s=R=V(h.minus(1),h.plus(1),g,1),T=k(R.times(R),g,1),i=a=1;else return k(l,F.precision=O,B,_=!0);else return F.precision=O,l;l=d,i+=2}}function vo(e){return String(e.s*e.s/0)}function xr(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)%D,r<0&&(n+=D),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Eo.test(t))return xr(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(jl.test(t))r=16,t=t.toLowerCase();else if($l.test(t))r=2;else if(Gl.test(t))r=8;else throw Error(Me+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=xo(n,new n(r),o,o*2)),d=br(t,r,pe),g=d.length-1,o=g;d[o]===0;--o)d.pop();return o<0?new n(e.s*0):(e.e=Cr(d,g),e.d=d,_=!1,s&&(e=V(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?K(2,l):Te.pow(2,l))),_=!0,e)}function Hl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Rr(5,r)),t=tt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function tt(e,t,r,n,i){var o,s,a,l,d=1,g=e.precision,h=Math.ceil(g/D);for(_=!1,l=r.times(r),a=new e(n);;){if(s=V(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=V(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,d++}return _=!0,s.d.length=h+1,s}function Rr(e,t){for(var r=e;--t;)r*=e;return r}function To(e,t){var r,n=t.s<0,i=he(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return ve=n?4:1,t;if(r=t.divToInt(i),r.isZero())ve=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return ve=po(r)?n?2:3:n?4:1,t;ve=po(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Mn(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=e.constructor,S=r!==void 0;if(S?(oe(r,1,_e),n===void 0?n=I.rounding:oe(n,0,8)):(r=I.precision,n=I.rounding),!e.isFinite())g=vo(e);else{for(g=ye(e),s=g.indexOf("."),S?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new I(1),T.e=g.length-s,T.d=br(ye(T),10,i),T.e=T.d.length),h=br(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=S?"0p+0":"0";else{if(s<0?o--:(e=new I(e),e.d=h,e.e=o,e=V(e,T,r,n,0,i),h=e.d,o=e.e,d=go),s=h[r],a=i/2,d=d||h[r+1]!==void 0,d=n<4?(s!==void 0||d)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||d||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,d)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 zl(e){return new this(e).abs()}function Yl(e){return new this(e).acos()}function Zl(e){return new this(e).acosh()}function Xl(e,t){return new this(e).plus(t)}function eu(e){return new this(e).asin()}function tu(e){return new this(e).asinh()}function ru(e){return new this(e).atan()}function nu(e){return new this(e).atanh()}function iu(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=he(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?he(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=he(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(V(e,t,o,1)),t=he(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(V(e,t,o,1)),r}function ou(e){return new this(e).cbrt()}function su(e){return k(e=new this(e),e.e+1,2)}function au(e,t,r){return new this(e).clamp(t,r)}function lu(e){if(!e||typeof e!="object")throw Error(Ar+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,_e,"rounding",0,8,"toExpNeg",-et,0,"toExpPos",0,et,"maxE",0,et,"minE",-et,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Me+r+": "+n);if(r="crypto",i&&(this[r]=On[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(yo);else this[r]=!1;else throw Error(Me+r+": "+n);return this}function uu(e){return new this(e).cos()}function cu(e){return new this(e).cosh()}function Ao(e){var t,r,n;function i(o){var s,a,l,d=this;if(!(d instanceof i))return new i(o);if(d.constructor=i,fo(o)){d.s=o.s,_?!o.d||o.e>i.maxE?(d.e=NaN,d.d=null):o.e=10;a/=10)s++;_?s>i.maxE?(d.e=NaN,d.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(yo);else for(;o=10;i/=10)n++;nkt,datamodelEnumToSchemaEnum:()=>Nu});f();u();c();p();m();f();u();c();p();m();function Nu(e){return{name:e.name,values:e.values.map(t=>t.name)}}f();u();c();p();m();var kt=(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.updateManyAndReturn="updateManyAndReturn",O.upsert="upsert",O.delete="delete",O.deleteMany="deleteMany",O.groupBy="groupBy",O.count="count",O.aggregate="aggregate",O.findRaw="findRaw",O.aggregateRaw="aggregateRaw",O))(kt||{});var Fu=Ue(to());var Lu={red:Ye,gray:Vi,dim:mr,bold:pr,underline:Fi,highlightSource:e=>e.highlight()},Uu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Bu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function qu({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(Vu(t))),i){a.push("");let d=[i.toString()];o&&(d.push(o),d.push(s.dim(")"))),a.push(d.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` `)}function Vu(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function Sr(e){let t=e.showColors?Lu:Uu,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Bu(e),qu(r,t)}f();u();c();p();m();var _o=Ue(_n());f();u();c();p();m();function Io(e,t,r){let n=Oo(e),i=$u(n),o=Gu(i);o?Ir(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Oo(e){return e.errors.flatMap(t=>t.kind==="Union"?Oo(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:ju(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function ju(e,t){return[...new Set(e.concat(t))]}function Gu(e){return Rn(e,(t,r)=>{let n=Ro(t),i=Ro(r);return n!==i?n-i:So(t)-So(r)})}function Ro(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function So(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}f();u();c();p();m();var ue=class{constructor(t,r){this.name=t;this.value=r}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();u();c();p();m();f();u();c();p();m();Do();f();u();c();p();m();var nt=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;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}};ko();f();u();c();p();m();f();u();c();p();m();var Or=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};f();u();c();p();m();var kr=e=>e,Dr={bold:kr,red:kr,green:kr,dim:kr,enabled:!1},Mo={bold:pr,red:Ye,green:Li,dim:mr,enabled:!0},it={write(e){e.writeLine(",")}};f();u();c();p();m();var we=class{constructor(t){this.contents=t}isUnderlined=!1;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();u();c();p();m();var Ne=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var ot=class extends Ne{items=[];addItem(t){return this.items.push(new Or(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new we("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(it,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var st=class e extends Ne{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof ot&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new we("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(it,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};f();u();c();p();m();var H=class extends Ne{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new we(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};f();u();c();p();m();var Mt=class{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(it,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Ir(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Ju(e,t);break;case"IncludeOnScalar":Qu(e,t);break;case"EmptySelection":Ku(e,t,r);break;case"UnknownSelectionField":Yu(e,t);break;case"InvalidSelectionValue":Zu(e,t);break;case"UnknownArgument":Xu(e,t);break;case"UnknownInputField":ec(e,t);break;case"RequiredArgumentMissing":tc(e,t);break;case"InvalidArgumentType":rc(e,t);break;case"InvalidArgumentValue":nc(e,t);break;case"ValueTooLarge":ic(e,t);break;case"SomeFieldsMissing":oc(e,t);break;case"TooManyFieldsGiven":sc(e,t);break;case"Union":Io(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 Qu(e,t){let[r,n]=at(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)}. ${_t(s)}`:a+=".",a+=` Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Ku(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Wu(e,t,i);return}if(n.hasField("select")){Hu(e,t);return}}if(r?.[Oe(e.outputType.name)]){zu(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Wu(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 Hu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Lo(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${_t(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function zu(e,t){let r=new Mt;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]=at(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new st;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 Yu(e,t){let r=Uo(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Lo(n,e.outputType);break;case"include":ac(n,e.outputType);break;case"omit":lc(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(_t(n)),i.join(" ")})}function Zu(e,t){let r=Uo(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Xu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),uc(n,e.arguments)),t.addErrorMessage(i=>No(i,r,e.arguments.map(o=>o.name)))}function ec(e,t){let[r,n]=at(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Bo(o,e.inputType)}t.addErrorMessage(o=>No(o,n,e.inputType.fields.map(s=>s.name)))}function No(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=pc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(_t(e)),n.join(" ")}function tc(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]=at(e.argumentPath),s=new Mt,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let 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(Fo).join(" | ");a.addSuggestion(new ue(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=at(e.dependentArgumentPath);t.addErrorMessage(d=>`Argument \`${d.green(o)}\` is required because argument \`${d.green(l)}\` was provided.`)}}}function Fo(e){return e.kind==="list"?`${Fo(e.elementType)}[]`:e.name}function rc(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=Mr("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 nc(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=Mr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function ic(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 oc(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&&Bo(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")} ${Mr("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(_t(i)),o.join(" ")})}function sc(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 ${Mr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Lo(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ue(r.name,"true"))}function ac(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ue(r.name,"true"))}function lc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ue(r.name,"true"))}function uc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ue(r.name,r.typeNames.join(" | ")))}function Uo(e,t){let[r,n]=at(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Bo(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 at(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function _t({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Mr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var cc=3;function pc(e,t){let r=1/0,n;for(let i of t){let o=(0,_o.default)(e,i);o>cc||o`}};function lt(e){return e instanceof Nt}f();u();c();p();m();var _r=Symbol(),Fn=new WeakMap,Ce=class{constructor(t){t===_r?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)}},Ft=class extends Ce{_getNamespace(){return"NullTypes"}},Lt=class extends Ft{#e};Ln(Lt,"DbNull");var Ut=class extends Ft{#e};Ln(Ut,"JsonNull");var Bt=class extends Ft{#e};Ln(Bt,"AnyNull");var Nr={classes:{DbNull:Lt,JsonNull:Ut,AnyNull:Bt},instances:{DbNull:new Lt(_r),JsonNull:new Ut(_r),AnyNull:new Bt(_r)}};function Ln(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}f();u();c();p();m();var qo=": ",Fr=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+qo.length}write(t){let r=new we(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(qo).write(this.value)}};var Un=class{arguments;errorMessages=[];constructor(t){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 Un(Vo(e))}function Vo(e){let t=new st;for(let[r,n]of Object.entries(e)){let i=new Fr(r,$o(n));t.addField(i)}return t}function $o(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(rt(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=Er(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof Ce?new H(`Prisma.${e._getName()}`):lt(e)?new H(`prisma.${Oe(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?mc(e):typeof e=="object"?Vo(e):new H(Object.prototype.toString.call(e))}function mc(e){let t=new ot;for(let r of e)t.addItem($o(r));return t}function Lr(e,t){let r=t==="pretty"?Mo:Dr,n=e.renderAllMessages(r),i=new nt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Ur({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=ut(e);for(let h of t)Ir(h,a,s);let{message:l,args:d}=Lr(a,r),g=Sr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:d});throw new X(g,{clientVersion:o})}f();u();c();p();m();f();u();c();p();m();function Ee(e){return e.replace(/^./,t=>t.toLowerCase())}f();u();c();p();m();function Go(e,t,r){let n=Ee(r);return!t.result||!(t.result.$allModels||t.result[n])?e:fc({...e,...jo(t.name,e,t.result.$allModels),...jo(t.name,e,t.result[n])})}function fc(e){let t=new ge,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return wr(e,n=>({...n,needs:r(n.name,new Set)}))}function jo(e,t,r){return r?wr(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:dc(t,o,i)})):{}}function dc(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 Br=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new ge;modelExtensionsCache=new ge;queryCallbacksCache=new ge;clientExtensions=It(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=It(()=>{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=Ee(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()}},ct=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Br(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Br(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();u();c();p();m();var qr=class{constructor(t){this.name=t}};function Ko(e){return e instanceof qr}function Wo(e){return new qr(e)}f();u();c();p();m();f();u();c();p();m();var Ho=Symbol(),qt=class{constructor(t){if(t!==Ho)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Vr:t}},Vr=new qt(Ho);function be(e){return e instanceof qt}var gc={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},zo="explicitly `undefined` values are not allowed";function $r({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=ct.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:d,globalOmit:g}){let h=new Bn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:d,globalOmit:g});return{modelName:e,action:gc[t],query:Vt(r,h)}}function Vt({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Zo(r,n),selection:hc(e,t,i,n)}}function hc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),bc(e,n)):yc(n,t,r)}function yc(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&wc(n,t,e),Ec(n,r,e),n}function wc(e,t,r){for(let[n,i]of Object.entries(t)){if(be(i))continue;let o=r.nestSelection(n);if(qn(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Vt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Vt(i,o)}}function Ec(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=Qo(i,n);for(let[s,a]of Object.entries(o)){if(be(a))continue;qn(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function bc(e,t){let r={},n=t.getComputedFields(),i=Jo(e,n);for(let[o,s]of Object.entries(i)){if(be(s))continue;let a=t.nestSelection(o);qn(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||be(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Vt({},a):r[o]=!0;continue}r[o]=Vt(s,a)}}return r}function Yo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(Xe(e)){if(Er(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Ko(e))return{$type:"Param",value:e.name};if(lt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return xc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(Pc(e))return e.values;if(rt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Ce){if(e!==Nr.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(vc(e))return e.toJSON();if(typeof e=="object")return Zo(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Zo(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);be(i)||(i!==void 0?r[n]=Yo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:zo}))}return r}function xc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Oe(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"updateManyAndReturn":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:qe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};f();u();c();p();m();function Xo(e){if(!e._hasPreviewFlag("metrics"))throw new X("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var pt=class{_client;constructor(t){this._client=t}prometheus(t){return Xo(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return Xo(this._client),this._client._engine.metrics({format:"json",...t})}};f();u();c();p();m();function es(e,t){let r=It(()=>Tc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Tc(e){return{datamodel:{models:Vn(e.models),enums:Vn(e.enums),types:Vn(e.types)}}}function Vn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}f();u();c();p();m();var $n=new WeakMap,jr="$$PrismaTypedSql",$t=class{constructor(t,r){$n.set(this,{sql:t,values:r}),Object.defineProperty(this,jr,{value:jr})}get sql(){return $n.get(this).sql}get values(){return $n.get(this).values}};function ts(e){return(...t)=>new $t(e,t)}function Gr(e){return e!=null&&e[jr]===jr}f();u();c();p();m();var Ea=Ue(vn());f();u();c();p();m();rs();Qi();zi();f();u();c();p();m();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)}}}f();u();c();p();m();f();u();c();p();m();var Qr={enumerable:!0,configurable:!0,writable:!0};function Kr(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Qr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var os=Symbol.for("nodejs.util.inspect.custom");function me(e,t){let r=Ac(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=ss(Reflect.ownKeys(o),r),a=ss(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?{...Qr,...l?.getPropertyDescriptor(s)}:Qr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[os]=function(){let o={...this};return delete o[os],o},i}function Ac(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 ss(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}f();u();c();p();m();function mt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}f();u();c();p();m();function Wr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}f();u();c();p();m();function as(e){if(e===void 0)return"";let t=ut(e);return new nt(0,{colors:Dr}).write(t).toString()}f();u();c();p();m();var Cc="P2037";function Hr({error:e,user_facing_error:t},r,n){return t.error_code?new ne(Rc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ie(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Rc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Cc&&(r+=` Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Jn=class{getLocation(){return null}};function Fe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Jn}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var ls={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function ft(e={}){let t=Ic(e);return Object.entries(t).reduce((n,[i,o])=>(ls[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Ic(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function zr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function us(e,t){let r=zr(e);return t({action:"aggregate",unpacker:r,argsMapper:ft})(e)}f();u();c();p();m();function Oc(e={}){let{select:t,...r}=e;return typeof t=="object"?ft({...r,_count:t}):ft({...r,_count:{_all:!0}})}function kc(e={}){return typeof e.select=="object"?t=>zr(e)(t)._count:t=>zr(e)(t)._count._all}function cs(e,t){return t({action:"count",unpacker:kc(e),argsMapper:Oc})(e)}f();u();c();p();m();function Dc(e={}){let t=ft(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Mc(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function ps(e,t){return t({action:"groupBy",unpacker:Mc(e),argsMapper:Dc})(e)}function ms(e,t,r){if(t==="aggregate")return n=>us(n,r);if(t==="count")return n=>cs(n,r);if(t==="groupBy")return n=>ps(n,r)}f();u();c();p();m();function fs(e,t){let r=t.fields.filter(i=>!i.relationName),n=uo(r,"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")},...Kr(Object.keys(n))})}f();u();c();p();m();f();u();c();p();m();var ds=e=>Array.isArray(e)?e:e.split("."),Qn=(e,t)=>ds(t).reduce((r,n)=>r&&r[n],e),gs=(e,t,r)=>ds(t).reduceRight((n,i,o,s)=>Object.assign({},Qn(e,s.slice(0,o)),{[i]:n}),r);function _c(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Nc(e,t,r){return t===void 0?e??{}:gs(t,r,e||!0)}function Kn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,d)=>({...l,[d.name]:d}),{});return l=>{let d=Fe(e._errorFormat),g=_c(n,i),h=Nc(l,o,g),T=r({dataPath:g,callsite:d})(h),I=Fc(e,t);return new Proxy(T,{get(S,R){if(!I.includes(R))return S[R];let F=[a[R].type,r,R],B=[g,h];return Kn(e,...F,...B)},...Kr([...I,...Object.getOwnPropertyNames(T)])})}}function Fc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var Lc=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Uc=["aggregate","count","groupBy"];function Wn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Bc(e,t),Vc(e,t),jt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return me({},n)}function Bc(e,t){let r=Ee(t),n=Object.keys(kt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let d=Fe(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:d};return e._request({...h,...a})},{action:o,args:l,model:t})};return Lc.includes(o)?Kn(e,t,s):qc(i)?ms(e,i,s):s({})}}}function qc(e){return Uc.includes(e)}function Vc(e,t){return Ve(te("fields",()=>{let r=e._runtimeDataModel.models[t];return fs(t,r)}))}f();u();c();p();m();function hs(e){return e.replace(/^./,t=>t.toUpperCase())}var Hn=Symbol();function Gt(e){let t=[$c(e),jc(e),te(Hn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(jt(r)),me(e,t)}function $c(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function jc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Ee),n=[...new Set(t.concat(r))];return Ve({getKeys(){return n},getPropertyValue(i){let o=hs(i);if(e._runtimeDataModel.models[o]!==void 0)return Wn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Wn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ys(e){return e[Hn]?e[Hn]:e}function ws(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},$on:{value:void 0}});return Gt(t)}f();u();c();p();m();f();u();c();p();m();function Es({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 d=l.needs.filter(g=>n[g]);d.length>0&&a.push(mt(d))}else if(r){if(!r[l.name])continue;let d=l.needs.filter(g=>!r[g]);d.length>0&&a.push(mt(d))}Gc(e,l.needs)&&s.push(Jc(l,me(e,s)))}return s.length>0||a.length>0?me(e,[...s,...a]):e}function Gc(e,t){return t.every(r=>Cn(e,r))}function Jc(e,t){return Ve(te(e.name,()=>e.compute(t)))}f();u();c();p();m();function Yr({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 d=typeof s=="object"?s:{};t[o]=Yr({visitor:i,result:t[o],args:d,modelName:l.type,runtimeDataModel:n})}}function xs({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Yr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,d)=>{let g=Ee(l);return Es({result:a,modelName:g,select:d.select,omit:d.select?void 0:{...o?.[g],...d.omit},extensions:n})}})}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Qc=["$connect","$disconnect","$on","$transaction","$extends"],Ps=Qc;function vs(e){if(e instanceof se)return Kc(e);if(Gr(e))return Wc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:vs(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Is(o,l),a.args=s,As(e,a,r,n+1)}})})}function Cs(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 As(e,t,s)}function Rs(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Ss(r,n,0,e):e(r)}}function Ss(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=Is(i,l),Ss(a,t,r+1,n)}})}var Ts=e=>e;function Is(e=Ts,t=Ts){return r=>e(t(r))}f();u();c();p();m();var Os=z("prisma:client"),ks={Vercel:"vercel","Netlify CI":"netlify"};function Ds({postinstall:e,ciName:t,clientVersion:r}){if(Os("checkPlatformCaching:postinstall",e),Os("checkPlatformCaching:ciName",t),e===!0&&t&&t in ks){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/${ks[t]}-build`;throw console.error(n),new Q(n,r)}}f();u();c();p();m();function Ms(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();u();c();p();m();f();u();c();p();m();var Hc=()=>globalThis.process?.release?.name==="node",zc=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Yc=()=>!!globalThis.Deno,Zc=()=>typeof globalThis.Netlify=="object",Xc=()=>typeof globalThis.EdgeRuntime=="object",ep=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function tp(){return[[Zc,"netlify"],[Xc,"edge-light"],[ep,"workerd"],[Yc,"deno"],[zc,"bun"],[Hc,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var rp={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 Zr(){let e=tp();return{id:e,prettyName:rp[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();function _s(e,t){throw new Error(t)}function np(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function ip(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function dt(e){return e===null?e:Array.isArray(e)?e.map(dt):typeof e=="object"?np(e)?op(e):e.constructor!==null&&e.constructor.name!=="Object"?e:ip(e,dt):e}function op({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=w.Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new Te(t);case"Json":return JSON.parse(t);default:_s(t,"Unknown tagged value")}}var Ns="6.14.0";f();u();c();p();m();f();u();c();p();m();function gt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Zr().id==="workerd"?new Q(`error: Environment variable not found: ${s.fromEnvVar}. +Learn how: https://pris.ly/d/${ks[t]}-build`;throw console.error(n),new Q(n,r)}}f();u();c();p();m();function Ms(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();u();c();p();m();f();u();c();p();m();var Hc=()=>globalThis.process?.release?.name==="node",zc=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Yc=()=>!!globalThis.Deno,Zc=()=>typeof globalThis.Netlify=="object",Xc=()=>typeof globalThis.EdgeRuntime=="object",ep=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function tp(){return[[Zc,"netlify"],[Xc,"edge-light"],[ep,"workerd"],[Yc,"deno"],[zc,"bun"],[Hc,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var rp={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 Zr(){let e=tp();return{id:e,prettyName:rp[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();function _s(e,t){throw new Error(t)}function np(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function ip(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function dt(e){return e===null?e:Array.isArray(e)?e.map(dt):typeof e=="object"?np(e)?op(e):e.constructor!==null&&e.constructor.name!=="Object"?e:ip(e,dt):e}function op({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=w.Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new Te(t);case"Json":return JSON.parse(t);default:_s(t,"Unknown tagged value")}}var Ns="6.15.0";f();u();c();p();m();f();u();c();p();m();function gt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Zr().id==="workerd"?new Q(`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 Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Xr=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ae=class extends Xr{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};f();u();c();p();m();function U(e,t){return{...e,isRetryable:t}}var $e=class extends ae{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,U(r,!1))}};N($e,"InvalidDatasourceError");function Fs(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=gt({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof y<"u"?y.env:{}}}),i;try{i=new URL(n)}catch{throw new $e(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==hr)throw new $e(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new $e(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let l=Tn(i)?"http:":"https:",d=new URL(i.href.replace(o,l));return{apiKey:a,url:d}}f();u();c();p();m();var Ls=Ue(Zi()),en=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;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,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Ls.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};f();u();c();p();m();function ap(e){return e[0]*1e3+e[1]/1e6}function zn(e){return new Date(ap(e))}f();u();c();p();m();f();u();c();p();m();var ht=class extends ae{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",U(t,!0))}};N(ht,"ForcedRetryError");f();u();c();p();m();var je=class extends ae{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,U(r,!1))}};N(je,"NotImplementedYetError");f();u();c();p();m();f();u();c();p();m();var G=class extends ae{response;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 G{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",U(t,!0))}};N(Ge,"SchemaMissingError");f();u();c();p();m();f();u();c();p();m();var Yn="This request could not be understood by the server",Qt=class extends G{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||Yn,U(t,!1)),n&&(this.code=n)}};N(Qt,"BadRequestError");f();u();c();p();m();var Kt=class extends G{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",U(t,!0)),this.logs=r}};N(Kt,"HealthcheckTimeoutError");f();u();c();p();m();var Wt=class extends G{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,U(t,!0)),this.logs=n}};N(Wt,"EngineStartupError");f();u();c();p();m();var Ht=class extends G{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",U(t,!1))}};N(Ht,"EngineVersionNotSupportedError");f();u();c();p();m();var Zn="Request timed out",zt=class extends G{name="GatewayTimeoutError";code="P5009";constructor(t,r=Zn){super(r,U(t,!1))}};N(zt,"GatewayTimeoutError");f();u();c();p();m();var lp="Interactive transaction error",Yt=class extends G{name="InteractiveTransactionError";code="P5015";constructor(t,r=lp){super(r,U(t,!1))}};N(Yt,"InteractiveTransactionError");f();u();c();p();m();var up="Request parameters are invalid",Zt=class extends G{name="InvalidRequestError";code="P5011";constructor(t,r=up){super(r,U(t,!1))}};N(Zt,"InvalidRequestError");f();u();c();p();m();var Xn="Requested resource does not exist",Xt=class extends G{name="NotFoundError";code="P5003";constructor(t,r=Xn){super(r,U(t,!1))}};N(Xt,"NotFoundError");f();u();c();p();m();var ei="Unknown server error",yt=class extends G{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||ei,U(t,!0)),this.logs=n}};N(yt,"ServerError");f();u();c();p();m();var ti="Unauthorized, check your connection string",er=class extends G{name="UnauthorizedError";code="P5007";constructor(t,r=ti){super(r,U(t,!1))}};N(er,"UnauthorizedError");f();u();c();p();m();var ri="Usage exceeded, retry again later",tr=class extends G{name="UsageExceededError";code="P5008";constructor(t,r=ri){super(r,U(t,!0))}};N(tr,"UsageExceededError");async function cp(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 rr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await cp(e);if(n.type==="QueryEngineError")throw new ne(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new yt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Ge(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Ht(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Wt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new Q(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Kt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Yt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Zt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new er(r,wt(ti,n));if(e.status===404)return new Xt(r,wt(Xn,n));if(e.status===429)throw new tr(r,wt(ri,n));if(e.status===504)throw new zt(r,wt(Zn,n));if(e.status>=500)throw new yt(r,wt(ei,n));if(e.status>=400)throw new Qt(r,wt(Yn,n))}function wt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}f();u();c();p();m();function Us(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();u();c();p();m();var Re="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Bs(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,d,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,d=g&63,r+=Re[s]+Re[a]+Re[l]+Re[d];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Re[s]+Re[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Re[s]+Re[a]+Re[l]+"="),r}f();u();c();p();m();function qs(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new Q("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();u();c();p();m();var Vs={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};f();u();c();p();m();f();u();c();p();m();var nr=class extends ae{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Xr=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ae=class extends Xr{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};f();u();c();p();m();function U(e,t){return{...e,isRetryable:t}}var $e=class extends ae{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,U(r,!1))}};N($e,"InvalidDatasourceError");function Fs(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=gt({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof y<"u"?y.env:{}}}),i;try{i=new URL(n)}catch{throw new $e(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==hr)throw new $e(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new $e(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let l=Tn(i)?"http:":"https:",d=new URL(i.href.replace(o,l));return{apiKey:a,url:d}}f();u();c();p();m();var Ls=Ue(Zi()),en=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;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,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Ls.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};f();u();c();p();m();function ap(e){return e[0]*1e3+e[1]/1e6}function zn(e){return new Date(ap(e))}f();u();c();p();m();f();u();c();p();m();var ht=class extends ae{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",U(t,!0))}};N(ht,"ForcedRetryError");f();u();c();p();m();var je=class extends ae{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,U(r,!1))}};N(je,"NotImplementedYetError");f();u();c();p();m();f();u();c();p();m();var G=class extends ae{response;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 G{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",U(t,!0))}};N(Ge,"SchemaMissingError");f();u();c();p();m();f();u();c();p();m();var Yn="This request could not be understood by the server",Qt=class extends G{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||Yn,U(t,!1)),n&&(this.code=n)}};N(Qt,"BadRequestError");f();u();c();p();m();var Kt=class extends G{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",U(t,!0)),this.logs=r}};N(Kt,"HealthcheckTimeoutError");f();u();c();p();m();var Wt=class extends G{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,U(t,!0)),this.logs=n}};N(Wt,"EngineStartupError");f();u();c();p();m();var Ht=class extends G{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",U(t,!1))}};N(Ht,"EngineVersionNotSupportedError");f();u();c();p();m();var Zn="Request timed out",zt=class extends G{name="GatewayTimeoutError";code="P5009";constructor(t,r=Zn){super(r,U(t,!1))}};N(zt,"GatewayTimeoutError");f();u();c();p();m();var lp="Interactive transaction error",Yt=class extends G{name="InteractiveTransactionError";code="P5015";constructor(t,r=lp){super(r,U(t,!1))}};N(Yt,"InteractiveTransactionError");f();u();c();p();m();var up="Request parameters are invalid",Zt=class extends G{name="InvalidRequestError";code="P5011";constructor(t,r=up){super(r,U(t,!1))}};N(Zt,"InvalidRequestError");f();u();c();p();m();var Xn="Requested resource does not exist",Xt=class extends G{name="NotFoundError";code="P5003";constructor(t,r=Xn){super(r,U(t,!1))}};N(Xt,"NotFoundError");f();u();c();p();m();var ei="Unknown server error",yt=class extends G{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||ei,U(t,!0)),this.logs=n}};N(yt,"ServerError");f();u();c();p();m();var ti="Unauthorized, check your connection string",er=class extends G{name="UnauthorizedError";code="P5007";constructor(t,r=ti){super(r,U(t,!1))}};N(er,"UnauthorizedError");f();u();c();p();m();var ri="Usage exceeded, retry again later",tr=class extends G{name="UsageExceededError";code="P5008";constructor(t,r=ri){super(r,U(t,!0))}};N(tr,"UsageExceededError");async function cp(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 rr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await cp(e);if(n.type==="QueryEngineError")throw new ne(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new yt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Ge(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Ht(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Wt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new Q(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Kt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Yt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Zt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new er(r,wt(ti,n));if(e.status===404)return new Xt(r,wt(Xn,n));if(e.status===429)throw new tr(r,wt(ri,n));if(e.status===504)throw new zt(r,wt(Zn,n));if(e.status>=500)throw new yt(r,wt(ei,n));if(e.status>=400)throw new Qt(r,wt(Yn,n))}function wt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}f();u();c();p();m();function Us(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();u();c();p();m();var Re="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Bs(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,d,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,d=g&63,r+=Re[s]+Re[a]+Re[l]+Re[d];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Re[s]+Re[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Re[s]+Re[a]+Re[l]+"="),r}f();u();c();p();m();function qs(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new Q("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();u();c();p();m();var Vs={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};f();u();c();p();m();f();u();c();p();m();var nr=class extends ae{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: ${t}`,U(r,!0))}};N(nr,"RequestError");async function Je(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new nr(a,{clientVersion:n,cause:s})}}var mp=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,$s=z("prisma:client:dataproxyEngine");async function fp(e,t){let r=Vs["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.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&&mp.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,l,d]=s.split("."),g=dp(`<=${a}.${l}.${d}`),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 T=await h.text();$s("length of body fetched from unpkg.com",T.length);let I;try{I=JSON.parse(T)}catch(S){throw console.error("JSON.parse error: body fetched from unpkg.com: ",T),S}return I.version}throw new je("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function js(e,t){let r=await fp(e,t);return $s("version",r),r}function dp(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Gs=3,ir=z("prisma:client:dataproxyEngine"),Et=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){qs(t),this.config=t,this.env=t.env,this.inlineSchema=Bs(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{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new en({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await js(this.host,this.config),ir("host",this.host),ir("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":ir(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:zn(r.timestamp),message:r.attributes.message??"",target:r.target});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:zn(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${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||ir("schema response status",r.status);let n=await rr(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);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):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,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||ir("graphql response status",a.status),await this.handleError(await rr(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult: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 rr(l,this.clientVersion));let d=await l.json(),{extensions:g}=d;g&&this.propagateResponseExtensions(g);let h=d.id,T=d["data-proxy"].endpoint;return{id:h,payload:{endpoint:T}}}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 rr(a,this.clientVersion));let l=await a.json(),{extensions:d}=l;d&&this.propagateResponseExtensions(d);return}}})}getURLAndAPIKey(){return Fs({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}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 ae)||!i.isRetryable)throw i;if(r>=Gs)throw i instanceof ht?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Gs} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Us(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof Ge)throw await this.uploadSchema(),new ht({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?Hr(t[0],this.config.clientVersion,this.config.activeProvider):new ie(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};f();u();c();p();m();function Js({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=R=>{i.push({_tag:"warning",value:R})},a=R=>{let M=R.join(` `);o.push({_tag:"error",value:M})},l=!!e?.startsWith("prisma://"),d=yr(e),g=!!t,h=l||d;!g&&r&&h&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let T=h||!r;g&&(T||n==="edge")&&(n==="edge"?a(["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."]):r?l&&a(["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."]):a(["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."]));let I={accelerate:T,ppg:d,driverAdapters:g};function S(R){return R.length>0}return S(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:I}:{ok:!0,diagnostics:{warnings:i},isUsing:I}}function Qs({copyEngine:e=!0},t){let r;try{r=gt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Js({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"edge"});for(let h of o.warnings)St(...h.value);if(!n){let h=o.errors[0];throw new X(h.value,{clientVersion:t.clientVersion})}let s=Ze(t.generator),a=s==="library",l=s==="binary",d=s==="client",g=(i.accelerate||i.ppg)&&!i.driverAdapters;return i.accelerate?new Et(t):(i.driverAdapters,i.accelerate,new Et(t))}f();u();c();p();m();function tn({generator:e}){return e?.previewFeatures??[]}f();u();c();p();m();var Ks=e=>({command:e});f();u();c();p();m();f();u();c();p();m();var Ws=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);f();u();c();p();m();function bt(e){try{return Hs(e,"fast")}catch{return Hs(e,"slow")}}function Hs(e,t){return JSON.stringify(e.map(r=>Ys(r,t)))}function Ys(e,t){if(Array.isArray(e))return e.map(r=>Ys(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(Xe(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(Ae.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(gp(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Zs(e):e}function gp(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Zs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(zs);let t={};for(let r of Object.keys(e))t[r]=zs(e[r]);return t}function zs(e){return typeof e=="bigint"?e.toString():Zs(e)}var hp=/^(\s*alter\s)/i,Xs=z("prisma:client");function ni(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&hp.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. diff --git a/src/generated/prisma/runtime/library.d.ts b/src/generated/prisma/runtime/library.d.ts index b06b437..066f4b3 100644 --- a/src/generated/prisma/runtime/library.d.ts +++ b/src/generated/prisma/runtime/library.d.ts @@ -21,6 +21,29 @@ declare type AccelerateEngineConfig = { accelerateUtils?: AccelerateUtils; }; +/** + * A stripped down interface of `fetch` that `@prisma/extension-accelerate` + * relies on. It must be in sync with the corresponding definition in the + * Accelerate extension. + * + * This is the actual interface exposed by the extension. We can't use the + * custom fetch function provided by it as normal fetch because the API is + * different. Notably, `headers` must be an object and not a `Headers` + * instance, and `url` must be a `string` and not a `URL`. + * + * The return type is `Response` but we can't specify this in an exported type + * because it would end up referencing external types from `@types/node` or DOM + * which can fail typechecking depending on TypeScript configuration in a user's + * project. + */ +declare type AccelerateExtensionFetch = (url: string, options: { + body?: string; + method?: string; + headers: Record; +}) => Promise; + +declare type AccelerateExtensionFetchDecorator = (fetch: AccelerateExtensionFetch) => AccelerateExtensionFetch; + declare type AccelerateUtils = EngineConfig['accelerateUtils']; export declare type Action = keyof typeof DMMF_2.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw'; @@ -68,12 +91,15 @@ export declare type Args = T extends { export declare type Args_3 = Args; -/** - * Original `quaint::ValueType` enum tag from Prisma's `quaint`. - * Query arguments marked with this type are sanitized before being sent to the database. - * Notice while a query argument may be `null`, `ArgType` is guaranteed to be defined. - */ -declare type ArgType = 'Int32' | 'Int64' | 'Float' | 'Double' | 'Text' | 'Enum' | 'EnumArray' | 'Bytes' | 'Boolean' | 'Char' | 'Array' | 'Numeric' | 'Json' | 'Xml' | 'Uuid' | 'DateTime' | 'Date' | 'Time' | 'Unknown'; +declare type ArgScalarType = 'string' | 'int' | 'bigint' | 'float' | 'decimal' | 'boolean' | 'enum' | 'uuid' | 'json' | 'datetime' | 'bytes' | 'unknown'; + +declare type ArgType = { + scalarType: ArgScalarType; + dbType?: string; + arity: Arity; +}; + +declare type Arity = 'scalar' | 'list'; /** * Attributes is a map from string to attribute values. @@ -104,7 +130,7 @@ declare type BatchArgs = { declare type BatchInternalParams = { requests: RequestParams[]; - customDataProxyFetch?: CustomDataProxyFetch; + customDataProxyFetch?: AccelerateExtensionFetchDecorator; }; declare type BatchQuery = { @@ -310,37 +336,6 @@ export declare type Count = { export declare function createParam(name: string): Param; -/** - * Custom fetch function for `DataProxyEngine`. - * - * We can't use the actual type of `globalThis.fetch` because this will result - * in API Extractor referencing Node.js type definitions in the `.d.ts` bundle - * for the client runtime. We can only use such types in internal types that - * don't end up exported anywhere. - - * It's also not possible to write a definition of `fetch` that would accept the - * actual `fetch` function from different environments such as Node.js and - * Cloudflare Workers (with their extensions to `RequestInit` and `Response`). - * `fetch` is used in both covariant and contravariant positions in - * `CustomDataProxyFetch`, making it invariant, so we need the exact same type. - * Even if we removed the argument and left `fetch` in covariant position only, - * then for an extension-supplied function to be assignable to `customDataProxyFetch`, - * the platform-specific (or custom) `fetch` function needs to be assignable - * to our `fetch` definition. This, in turn, requires the third-party `Response` - * to be a subtype of our `Response` (which is not a problem, we could declare - * a minimal `Response` type that only includes what we use) *and* requires the - * third-party `RequestInit` to be a supertype of our `RequestInit` (i.e. we - * have to declare all properties any `RequestInit` implementation in existence - * could possibly have), which is not possible. - * - * Since `@prisma/extension-accelerate` redefines the type of - * `__internalParams.customDataProxyFetch` to its own type anyway (probably for - * exactly this reason), our definition is never actually used and is completely - * ignored, so it doesn't matter, and we can just use `unknown` as the type of - * `fetch` here. - */ -declare type CustomDataProxyFetch = (fetch: unknown) => unknown; - declare class DataLoader { private options; batches: { @@ -857,6 +852,11 @@ declare interface DriverAdapterFactory extends AdapterInfo { connect(): Promise>; } +declare type DynamicArgType = ArgType | { + arity: 'tuple'; + elements: ArgType[]; +}; + /** Client */ export declare type DynamicClientExtensionArgs> = { [P in keyof C_]: unknown; @@ -1407,6 +1407,20 @@ declare type FieldRefType = ReadonlyDeep_2<{ fields: SchemaArg[]; }>; +declare type FieldScalarType = { + type: 'string' | 'int' | 'bigint' | 'float' | 'boolean' | 'json' | 'object' | 'datetime' | 'decimal' | 'unsupported'; +} | { + type: 'enum'; + name: string; +} | { + type: 'bytes'; + encoding: 'array' | 'base64' | 'hex'; +}; + +declare type FieldType = { + arity: Arity; +} & FieldScalarType; + declare type FluentOperation = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'update' | 'upsert' | 'delete'; export declare interface Fn { @@ -1943,7 +1957,7 @@ declare type InternalRequestParams = { /** Used to convert args for middleware and back */ middlewareArgsMapper?: MiddlewareArgsMapper; /** Used for Accelerate client extension via Data Proxy */ - customDataProxyFetch?: CustomDataProxyFetch; + customDataProxyFetch?: AccelerateExtensionFetchDecorator; } & Omit; declare type IsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SNAPSHOT' | 'SERIALIZABLE'; @@ -2764,17 +2778,7 @@ declare type PrismaPromiseInteractiveTransaction = { declare type PrismaPromiseTransaction = PrismaPromiseBatchTransaction | PrismaPromiseInteractiveTransaction; -declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record | PrismaValuePlaceholder | PrismaValueGenerator | PrismaValueBytes | PrismaValueBigInt; - -declare type PrismaValueBigInt = { - prisma__type: 'bigint'; - prisma__value: string; -}; - -declare type PrismaValueBytes = { - prisma__type: 'bytes'; - prisma__value: string; -}; +declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record | PrismaValuePlaceholder | PrismaValueGenerator; declare type PrismaValueGenerator = { prisma__type: 'generatorCall'; @@ -2792,38 +2796,6 @@ declare type PrismaValuePlaceholder = { }; }; -declare type PrismaValueType = { - type: 'Any'; -} | { - type: 'String'; -} | { - type: 'Int'; -} | { - type: 'BigInt'; -} | { - type: 'Float'; -} | { - type: 'Boolean'; -} | { - type: 'Decimal'; -} | { - type: 'Date'; -} | { - type: 'Time'; -} | { - type: 'Array'; - inner: PrismaValueType; -} | { - type: 'Json'; -} | { - type: 'Object'; -} | { - type: 'Bytes'; -} | { - type: 'Enum'; - inner: string; -}; - export declare const PrivateResultType: unique symbol; declare type Provider = 'mysql' | 'postgres' | 'sqlite' | 'sqlserver'; @@ -2993,12 +2965,14 @@ declare type QueryPlanBinding = { declare type QueryPlanDbQuery = { type: 'rawSql'; sql: string; - params: PrismaValue[]; + args: PrismaValue[]; + argTypes: ArgType[]; } | { type: 'templateSql'; fragments: Fragment[]; placeholderFormat: PlaceholderFormat; - params: PrismaValue[]; + args: PrismaValue[]; + argTypes: DynamicArgType[]; chunkable: boolean; }; @@ -3159,7 +3133,7 @@ declare type RequestBatchOptions = { traceparent?: string; numTry?: number; containsWrite: boolean; - customDataProxyFetch?: CustomDataProxyFetch; + customDataProxyFetch?: AccelerateExtensionFetchDecorator; }; declare interface RequestError { @@ -3196,7 +3170,7 @@ declare type RequestOptions = { numTry?: number; interactiveTransaction?: InteractiveTransactionOptions; isWrite: boolean; - customDataProxyFetch?: CustomDataProxyFetch; + customDataProxyFetch?: AccelerateExtensionFetchDecorator; }; declare type RequestParams = { @@ -3214,7 +3188,7 @@ declare type RequestParams = { otelParentCtx?: Context; otelChildCtx?: Context; globalOmit?: GlobalOmitOptions; - customDataProxyFetch?: CustomDataProxyFetch; + customDataProxyFetch?: AccelerateExtensionFetchDecorator; }; declare type RequiredExtensionArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions; @@ -3298,16 +3272,16 @@ export declare type ResultFieldDefinition = { }; declare type ResultNode = { - type: 'AffectedRows'; + type: 'affectedRows'; } | { - type: 'Object'; + type: 'object'; fields: Record; serializedName: string | null; skipNulls: boolean; } | { - type: 'Value'; + type: 'field'; dbName: string; - resultType: PrismaValueType; + fieldType: FieldType; }; export declare type Return = T extends (...args: any[]) => infer R ? R : T; @@ -3329,7 +3303,7 @@ declare type Schema = ReadonlyDeep_2<{ rootMutationType?: string; inputObjectTypes: { model?: InputType[]; - prisma: InputType[]; + prisma?: InputType[]; }; outputObjectTypes: { model: OutputType[]; diff --git a/src/generated/prisma/runtime/library.js b/src/generated/prisma/runtime/library.js index 4966c09..06de78a 100644 --- a/src/generated/prisma/runtime/library.js +++ b/src/generated/prisma/runtime/library.js @@ -1,18 +1,18 @@ /* !!! This is code generated by Prisma. Do not edit directly. !!! /* eslint-disable */ -"use strict";var xu=Object.create;var Vt=Object.defineProperty;var Pu=Object.getOwnPropertyDescriptor;var vu=Object.getOwnPropertyNames;var Tu=Object.getPrototypeOf,Su=Object.prototype.hasOwnProperty;var Oo=(e,r)=>()=>(e&&(r=e(e=0)),r);var ne=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),tr=(e,r)=>{for(var t in r)Vt(e,t,{get:r[t],enumerable:!0})},ko=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of vu(r))!Su.call(e,i)&&i!==t&&Vt(e,i,{get:()=>r[i],enumerable:!(n=Pu(r,i))||n.enumerable});return e};var A=(e,r,t)=>(t=e!=null?xu(Tu(e)):{},ko(r||!e||!e.__esModule?Vt(t,"default",{value:e,enumerable:!0}):t,e)),Ru=e=>ko(Vt({},"__esModule",{value:!0}),e);var hi=ne((Mg,os)=>{"use strict";os.exports=(e,r=process.argv)=>{let t=e.startsWith("-")?"":e.length===1?"-":"--",n=r.indexOf(t+e),i=r.indexOf("--");return n!==-1&&(i===-1||n{"use strict";var Vc=require("node:os"),ss=require("node:tty"),de=hi(),{env:G}=process,Qe;de("no-color")||de("no-colors")||de("color=false")||de("color=never")?Qe=0:(de("color")||de("colors")||de("color=true")||de("color=always"))&&(Qe=1);"FORCE_COLOR"in G&&(G.FORCE_COLOR==="true"?Qe=1:G.FORCE_COLOR==="false"?Qe=0:Qe=G.FORCE_COLOR.length===0?1:Math.min(parseInt(G.FORCE_COLOR,10),3));function yi(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function bi(e,r){if(Qe===0)return 0;if(de("color=16m")||de("color=full")||de("color=truecolor"))return 3;if(de("color=256"))return 2;if(e&&!r&&Qe===void 0)return 0;let t=Qe||0;if(G.TERM==="dumb")return t;if(process.platform==="win32"){let n=Vc.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in G)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in G)||G.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in G)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(G.TEAMCITY_VERSION)?1:0;if(G.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in G){let n=parseInt((G.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(G.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(G.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(G.TERM)||"COLORTERM"in G?1:t}function jc(e){let r=bi(e,e&&e.isTTY);return yi(r)}as.exports={supportsColor:jc,stdout:yi(bi(!0,ss.isatty(1))),stderr:yi(bi(!0,ss.isatty(2)))}});var ps=ne((qg,cs)=>{"use strict";var Bc=ls(),br=hi();function us(e){if(/^\d{3,4}$/.test(e)){let t=/(\d{1,2})(\d{2})/.exec(e)||[];return{major:0,minor:parseInt(t[1],10),patch:parseInt(t[2],10)}}let r=(e||"").split(".").map(t=>parseInt(t,10));return{major:r[0],minor:r[1],patch:r[2]}}function Ei(e){let{CI:r,FORCE_HYPERLINK:t,NETLIFY:n,TEAMCITY_VERSION:i,TERM_PROGRAM:o,TERM_PROGRAM_VERSION:s,VTE_VERSION:a,TERM:l}=process.env;if(t)return!(t.length>0&&parseInt(t,10)===0);if(br("no-hyperlink")||br("no-hyperlinks")||br("hyperlink=false")||br("hyperlink=never"))return!1;if(br("hyperlink=true")||br("hyperlink=always")||n)return!0;if(!Bc.supportsColor(e)||e&&!e.isTTY)return!1;if("WT_SESSION"in process.env)return!0;if(process.platform==="win32"||r||i)return!1;if(o){let u=us(s||"");switch(o){case"iTerm.app":return u.major===3?u.minor>=1:u.major>3;case"WezTerm":return u.major>=20200620;case"vscode":return u.major>1||u.major===1&&u.minor>=72;case"ghostty":return!0}}if(a){if(a==="0.50.0")return!1;let u=us(a);return u.major>0||u.minor>=50}switch(l){case"alacritty":return!0}return!1}cs.exports={supportsHyperlink:Ei,stdout:Ei(process.stdout),stderr:Ei(process.stderr)}});var ds=ne((Zg,Uc)=>{Uc.exports={name:"@prisma/internals",version:"6.14.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-engine-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var Ti=ne((Eh,Hc)=>{Hc.exports={name:"@prisma/engines-version",version:"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"717184b7b35ea05dfa71a3236b7af656013e1e49"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var nn=ne(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.enginesVersion=void 0;tn.enginesVersion=Ti().prisma.enginesVersion});var ys=ne((_h,hs)=>{"use strict";hs.exports=e=>{let r=e.match(/^[ \t]*(?=\S)/gm);return r?r.reduce((t,n)=>Math.min(t,n.length),1/0):0}});var Di=ne((Fh,ws)=>{"use strict";ws.exports=(e,r=1,t)=>{if(t={indent:" ",includeEmptyLines:!1,...t},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof r!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof r}\``);if(typeof t.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t.indent}\``);if(r===0)return e;let n=t.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,t.indent.repeat(r))}});var Ts=ne((qh,vs)=>{"use strict";vs.exports=({onlyFirst:e=!1}={})=>{let r=["[\\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(r,e?void 0:"g")}});var Ni=ne((Vh,Ss)=>{"use strict";var op=Ts();Ss.exports=e=>typeof e=="string"?e.replace(op(),""):e});var Rs=ne((Gh,sp)=>{sp.exports={name:"dotenv",version:"16.5.0",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",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",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var Os=ne((Qh,_e)=>{"use strict";var Fi=require("node:fs"),Mi=require("node:path"),ap=require("node:os"),lp=require("node:crypto"),up=Rs(),Cs=up.version,cp=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function pp(e){let r={},t=e.toString();t=t.replace(/\r\n?/mg,` +"use strict";var xu=Object.create;var Vt=Object.defineProperty;var vu=Object.getOwnPropertyDescriptor;var Pu=Object.getOwnPropertyNames;var Tu=Object.getPrototypeOf,Su=Object.prototype.hasOwnProperty;var Oo=(e,r)=>()=>(e&&(r=e(e=0)),r);var ne=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),tr=(e,r)=>{for(var t in r)Vt(e,t,{get:r[t],enumerable:!0})},ko=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Pu(r))!Su.call(e,i)&&i!==t&&Vt(e,i,{get:()=>r[i],enumerable:!(n=vu(r,i))||n.enumerable});return e};var A=(e,r,t)=>(t=e!=null?xu(Tu(e)):{},ko(r||!e||!e.__esModule?Vt(t,"default",{value:e,enumerable:!0}):t,e)),Ru=e=>ko(Vt({},"__esModule",{value:!0}),e);var hi=ne((Mg,os)=>{"use strict";os.exports=(e,r=process.argv)=>{let t=e.startsWith("-")?"":e.length===1?"-":"--",n=r.indexOf(t+e),i=r.indexOf("--");return n!==-1&&(i===-1||n{"use strict";var Vc=require("node:os"),ss=require("node:tty"),de=hi(),{env:G}=process,Qe;de("no-color")||de("no-colors")||de("color=false")||de("color=never")?Qe=0:(de("color")||de("colors")||de("color=true")||de("color=always"))&&(Qe=1);"FORCE_COLOR"in G&&(G.FORCE_COLOR==="true"?Qe=1:G.FORCE_COLOR==="false"?Qe=0:Qe=G.FORCE_COLOR.length===0?1:Math.min(parseInt(G.FORCE_COLOR,10),3));function yi(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function bi(e,r){if(Qe===0)return 0;if(de("color=16m")||de("color=full")||de("color=truecolor"))return 3;if(de("color=256"))return 2;if(e&&!r&&Qe===void 0)return 0;let t=Qe||0;if(G.TERM==="dumb")return t;if(process.platform==="win32"){let n=Vc.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in G)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in G)||G.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in G)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(G.TEAMCITY_VERSION)?1:0;if(G.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in G){let n=parseInt((G.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(G.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(G.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(G.TERM)||"COLORTERM"in G?1:t}function jc(e){let r=bi(e,e&&e.isTTY);return yi(r)}as.exports={supportsColor:jc,stdout:yi(bi(!0,ss.isatty(1))),stderr:yi(bi(!0,ss.isatty(2)))}});var ps=ne((qg,cs)=>{"use strict";var Bc=ls(),br=hi();function us(e){if(/^\d{3,4}$/.test(e)){let t=/(\d{1,2})(\d{2})/.exec(e)||[];return{major:0,minor:parseInt(t[1],10),patch:parseInt(t[2],10)}}let r=(e||"").split(".").map(t=>parseInt(t,10));return{major:r[0],minor:r[1],patch:r[2]}}function Ei(e){let{CI:r,FORCE_HYPERLINK:t,NETLIFY:n,TEAMCITY_VERSION:i,TERM_PROGRAM:o,TERM_PROGRAM_VERSION:s,VTE_VERSION:a,TERM:l}=process.env;if(t)return!(t.length>0&&parseInt(t,10)===0);if(br("no-hyperlink")||br("no-hyperlinks")||br("hyperlink=false")||br("hyperlink=never"))return!1;if(br("hyperlink=true")||br("hyperlink=always")||n)return!0;if(!Bc.supportsColor(e)||e&&!e.isTTY)return!1;if("WT_SESSION"in process.env)return!0;if(process.platform==="win32"||r||i)return!1;if(o){let u=us(s||"");switch(o){case"iTerm.app":return u.major===3?u.minor>=1:u.major>3;case"WezTerm":return u.major>=20200620;case"vscode":return u.major>1||u.major===1&&u.minor>=72;case"ghostty":return!0}}if(a){if(a==="0.50.0")return!1;let u=us(a);return u.major>0||u.minor>=50}switch(l){case"alacritty":return!0}return!1}cs.exports={supportsHyperlink:Ei,stdout:Ei(process.stdout),stderr:Ei(process.stderr)}});var ds=ne((Zg,Uc)=>{Uc.exports={name:"@prisma/internals",version:"6.15.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb","@prisma/schema-engine-wasm":"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var Ti=ne((Eh,Hc)=>{Hc.exports={name:"@prisma/engines-version",version:"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"85179d7826409ee107a6ba334b5e305ae3fba9fb"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var nn=ne(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.enginesVersion=void 0;tn.enginesVersion=Ti().prisma.enginesVersion});var ys=ne((_h,hs)=>{"use strict";hs.exports=e=>{let r=e.match(/^[ \t]*(?=\S)/gm);return r?r.reduce((t,n)=>Math.min(t,n.length),1/0):0}});var Di=ne((Fh,ws)=>{"use strict";ws.exports=(e,r=1,t)=>{if(t={indent:" ",includeEmptyLines:!1,...t},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof r!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof r}\``);if(typeof t.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t.indent}\``);if(r===0)return e;let n=t.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,t.indent.repeat(r))}});var Ts=ne((qh,Ps)=>{"use strict";Ps.exports=({onlyFirst:e=!1}={})=>{let r=["[\\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(r,e?void 0:"g")}});var Ni=ne((Vh,Ss)=>{"use strict";var op=Ts();Ss.exports=e=>typeof e=="string"?e.replace(op(),""):e});var Rs=ne((Gh,sp)=>{sp.exports={name:"dotenv",version:"16.5.0",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",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",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var Os=ne((Qh,_e)=>{"use strict";var Fi=require("node:fs"),Mi=require("node:path"),ap=require("node:os"),lp=require("node:crypto"),up=Rs(),Cs=up.version,cp=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function pp(e){let r={},t=e.toString();t=t.replace(/\r\n?/mg,` `);let n;for(;(n=cp.exec(t))!=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")),r[i]=o}return r}function dp(e){let r=Ds(e),t=B.configDotenv({path:r});if(!t.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${r} for an unknown reason`);throw s.code="MISSING_DATA",s}let n=Is(e).split(","),i=n.length,o;for(let s=0;s=i)throw a}return B.parse(o)}function mp(e){console.log(`[dotenv@${Cs}][WARN] ${e}`)}function it(e){console.log(`[dotenv@${Cs}][DEBUG] ${e}`)}function Is(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function fp(e,r){let t;try{t=new URL(r)}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let n=t.password;if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let i=t.searchParams.get("environment");if(!i){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let o=`DOTENV_VAULT_${i.toUpperCase()}`,s=e.parsed[o];if(!s){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:s,key:n}}function Ds(e){let r=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let t of e.path)Fi.existsSync(t)&&(r=t.endsWith(".vault")?t:`${t}.vault`);else r=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else r=Mi.resolve(process.cwd(),".env.vault");return Fi.existsSync(r)?r:null}function As(e){return e[0]==="~"?Mi.join(ap.homedir(),e.slice(1)):e}function gp(e){!!(e&&e.debug)&&it("Loading env from encrypted .env.vault");let t=B._parseVault(e),n=process.env;return e&&e.processEnv!=null&&(n=e.processEnv),B.populate(n,t,e),{parsed:t}}function hp(e){let r=Mi.resolve(process.cwd(),".env"),t="utf8",n=!!(e&&e.debug);e&&e.encoding?t=e.encoding:n&&it("No encoding is specified. UTF-8 is used by default");let i=[r];if(e&&e.path)if(!Array.isArray(e.path))i=[As(e.path)];else{i=[];for(let l of e.path)i.push(As(l))}let o,s={};for(let l of i)try{let u=B.parse(Fi.readFileSync(l,{encoding:t}));B.populate(s,u,e)}catch(u){n&&it(`Failed to load ${l} ${u.message}`),o=u}let a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),B.populate(a,s,e),o?{parsed:s,error:o}:{parsed:s}}function yp(e){if(Is(e).length===0)return B.configDotenv(e);let r=Ds(e);return r?B._configVault(e):(mp(`You set DOTENV_KEY but you are missing a .env.vault file at ${r}. Did you forget to build it?`),B.configDotenv(e))}function bp(e,r){let t=Buffer.from(r.slice(-64),"hex"),n=Buffer.from(e,"base64"),i=n.subarray(0,12),o=n.subarray(-16);n=n.subarray(12,-16);try{let s=lp.createDecipheriv("aes-256-gcm",t,i);return s.setAuthTag(o),`${s.update(n)}${s.final()}`}catch(s){let a=s instanceof RangeError,l=s.message==="Invalid key length",u=s.message==="Unsupported state or unable to authenticate data";if(a||l){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(u){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw s}}function Ep(e,r,t={}){let n=!!(t&&t.debug),i=!!(t&&t.override);if(typeof r!="object"){let o=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw o.code="OBJECT_REQUIRED",o}for(let o of Object.keys(r))Object.prototype.hasOwnProperty.call(e,o)?(i===!0&&(e[o]=r[o]),n&&it(i===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=r[o]}var B={configDotenv:hp,_configVault:gp,_parseVault:dp,config:yp,decrypt:bp,parse:pp,populate:Ep};_e.exports.configDotenv=B.configDotenv;_e.exports._configVault=B._configVault;_e.exports._parseVault=B._parseVault;_e.exports.config=B.config;_e.exports.decrypt=B.decrypt;_e.exports.parse=B.parse;_e.exports.populate=B.populate;_e.exports=B});var Ls=ne((zh,un)=>{"use strict";un.exports=(e={})=>{let r;if(e.repoUrl)r=e.repoUrl;else if(e.user&&e.repo)r=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let t=new URL(`${r}/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(",")}t.searchParams.set(i,o)}}return t.toString()};un.exports.default=un.exports});var Ki=ne((Sb,ia)=>{"use strict";ia.exports=function(){function e(r,t,n,i,o){return rn?n+1:r+1:i===o?t:t+1}return function(r,t){if(r===t)return 0;if(r.length>t.length){var n=r;r=t,t=n}for(var i=r.length,o=t.length;i>0&&r.charCodeAt(i-1)===t.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict"});var ca=Oo(()=>{"use strict"});var Qf={};tr(Qf,{DMMF:()=>ut,Debug:()=>N,Decimal:()=>Fe,Extensions:()=>ni,MetricsClient:()=>Nr,PrismaClientInitializationError:()=>v,PrismaClientKnownRequestError:()=>z,PrismaClientRustPanicError:()=>le,PrismaClientUnknownRequestError:()=>V,PrismaClientValidationError:()=>Z,Public:()=>ii,Sql:()=>oe,createParam:()=>Ra,defineDmmfProperty:()=>ka,deserializeJsonResponse:()=>qr,deserializeRawResult:()=>Xn,dmmfToRuntimeDataModel:()=>$s,empty:()=>La,getPrismaClient:()=>bu,getRuntime:()=>Gn,join:()=>Na,makeStrictEnum:()=>Eu,makeTypedQueryFactory:()=>_a,objectEnumValues:()=>Dn,raw:()=>no,serializeJsonQuery:()=>Mn,skip:()=>Fn,sqltag:()=>io,warnEnvConflicts:()=>wu,warnOnce:()=>st});module.exports=Ru(Qf);var ni={};tr(ni,{defineExtension:()=>_o,getExtensionContext:()=>No});function _o(e){return typeof e=="function"?e:r=>r.$extends(e)}function No(e){return e}var ii={};tr(ii,{validator:()=>Lo});function Lo(...e){return r=>r}var jt={};tr(jt,{$:()=>Vo,bgBlack:()=>Fu,bgBlue:()=>Vu,bgCyan:()=>Bu,bgGreen:()=>$u,bgMagenta:()=>ju,bgRed:()=>Mu,bgWhite:()=>Uu,bgYellow:()=>qu,black:()=>ku,blue:()=>nr,bold:()=>W,cyan:()=>De,dim:()=>Ce,gray:()=>Kr,green:()=>qe,grey:()=>Lu,hidden:()=>Du,inverse:()=>Iu,italic:()=>Cu,magenta:()=>_u,red:()=>ce,reset:()=>Au,strikethrough:()=>Ou,underline:()=>Y,white:()=>Nu,yellow:()=>Ie});var oi,Fo,Mo,$o,qo=!0;typeof process<"u"&&({FORCE_COLOR:oi,NODE_DISABLE_COLORS:Fo,NO_COLOR:Mo,TERM:$o}=process.env||{},qo=process.stdout&&process.stdout.isTTY);var Vo={enabled:!Fo&&Mo==null&&$o!=="dumb"&&(oi!=null&&oi!=="0"||qo)};function F(e,r){let t=new RegExp(`\\x1b\\[${r}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${r}m`;return function(o){return!Vo.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(t,i+n):o)+i}}var Au=F(0,0),W=F(1,22),Ce=F(2,22),Cu=F(3,23),Y=F(4,24),Iu=F(7,27),Du=F(8,28),Ou=F(9,29),ku=F(30,39),ce=F(31,39),qe=F(32,39),Ie=F(33,39),nr=F(34,39),_u=F(35,39),De=F(36,39),Nu=F(37,39),Kr=F(90,39),Lu=F(90,39),Fu=F(40,49),Mu=F(41,49),$u=F(42,49),qu=F(43,49),Vu=F(44,49),ju=F(45,49),Bu=F(46,49),Uu=F(47,49);var Gu=100,jo=["green","yellow","blue","magenta","cyan","red"],Hr=[],Bo=Date.now(),Qu=0,si=typeof process<"u"?process.env:{};globalThis.DEBUG??=si.DEBUG??"";globalThis.DEBUG_COLORS??=si.DEBUG_COLORS?si.DEBUG_COLORS==="true":!0;var Yr={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let r=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),t=r.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=r.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return t&&!n},log:(...e)=>{let[r,t,...n]=e;(console.warn??console.log)(`${r} ${t}`,...n)},formatters:{}};function Wu(e){let r={color:jo[Qu++%jo.length],enabled:Yr.enabled(e),namespace:e,log:Yr.log,extend:()=>{}},t=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=r;if(n.length!==0&&Hr.push([o,...n]),Hr.length>Gu&&Hr.shift(),Yr.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:Ju(c)),u=`+${Date.now()-Bo}ms`;Bo=Date.now(),globalThis.DEBUG_COLORS?a(jt[s](W(o)),...l,jt[s](u)):a(o,...l,u)}};return new Proxy(t,{get:(n,i)=>r[i],set:(n,i,o)=>r[i]=o})}var N=new Proxy(Wu,{get:(e,r)=>Yr[r],set:(e,r,t)=>Yr[r]=t});function Ju(e,r=2){let t=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(t.has(i))return"[Circular *]";t.add(i)}else if(typeof i=="bigint")return i.toString();return i},r)}function Uo(e=7500){let r=Hr.map(([t,...n])=>`${t} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` +`),o=o.replace(/\\r/g,"\r")),r[i]=o}return r}function dp(e){let r=Ds(e),t=B.configDotenv({path:r});if(!t.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${r} for an unknown reason`);throw s.code="MISSING_DATA",s}let n=Is(e).split(","),i=n.length,o;for(let s=0;s=i)throw a}return B.parse(o)}function mp(e){console.log(`[dotenv@${Cs}][WARN] ${e}`)}function it(e){console.log(`[dotenv@${Cs}][DEBUG] ${e}`)}function Is(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function fp(e,r){let t;try{t=new URL(r)}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let n=t.password;if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let i=t.searchParams.get("environment");if(!i){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let o=`DOTENV_VAULT_${i.toUpperCase()}`,s=e.parsed[o];if(!s){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:s,key:n}}function Ds(e){let r=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let t of e.path)Fi.existsSync(t)&&(r=t.endsWith(".vault")?t:`${t}.vault`);else r=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else r=Mi.resolve(process.cwd(),".env.vault");return Fi.existsSync(r)?r:null}function As(e){return e[0]==="~"?Mi.join(ap.homedir(),e.slice(1)):e}function gp(e){!!(e&&e.debug)&&it("Loading env from encrypted .env.vault");let t=B._parseVault(e),n=process.env;return e&&e.processEnv!=null&&(n=e.processEnv),B.populate(n,t,e),{parsed:t}}function hp(e){let r=Mi.resolve(process.cwd(),".env"),t="utf8",n=!!(e&&e.debug);e&&e.encoding?t=e.encoding:n&&it("No encoding is specified. UTF-8 is used by default");let i=[r];if(e&&e.path)if(!Array.isArray(e.path))i=[As(e.path)];else{i=[];for(let l of e.path)i.push(As(l))}let o,s={};for(let l of i)try{let u=B.parse(Fi.readFileSync(l,{encoding:t}));B.populate(s,u,e)}catch(u){n&&it(`Failed to load ${l} ${u.message}`),o=u}let a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),B.populate(a,s,e),o?{parsed:s,error:o}:{parsed:s}}function yp(e){if(Is(e).length===0)return B.configDotenv(e);let r=Ds(e);return r?B._configVault(e):(mp(`You set DOTENV_KEY but you are missing a .env.vault file at ${r}. Did you forget to build it?`),B.configDotenv(e))}function bp(e,r){let t=Buffer.from(r.slice(-64),"hex"),n=Buffer.from(e,"base64"),i=n.subarray(0,12),o=n.subarray(-16);n=n.subarray(12,-16);try{let s=lp.createDecipheriv("aes-256-gcm",t,i);return s.setAuthTag(o),`${s.update(n)}${s.final()}`}catch(s){let a=s instanceof RangeError,l=s.message==="Invalid key length",u=s.message==="Unsupported state or unable to authenticate data";if(a||l){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(u){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw s}}function Ep(e,r,t={}){let n=!!(t&&t.debug),i=!!(t&&t.override);if(typeof r!="object"){let o=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw o.code="OBJECT_REQUIRED",o}for(let o of Object.keys(r))Object.prototype.hasOwnProperty.call(e,o)?(i===!0&&(e[o]=r[o]),n&&it(i===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=r[o]}var B={configDotenv:hp,_configVault:gp,_parseVault:dp,config:yp,decrypt:bp,parse:pp,populate:Ep};_e.exports.configDotenv=B.configDotenv;_e.exports._configVault=B._configVault;_e.exports._parseVault=B._parseVault;_e.exports.config=B.config;_e.exports.decrypt=B.decrypt;_e.exports.parse=B.parse;_e.exports.populate=B.populate;_e.exports=B});var Ls=ne((zh,un)=>{"use strict";un.exports=(e={})=>{let r;if(e.repoUrl)r=e.repoUrl;else if(e.user&&e.repo)r=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let t=new URL(`${r}/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(",")}t.searchParams.set(i,o)}}return t.toString()};un.exports.default=un.exports});var Ki=ne((Sb,ia)=>{"use strict";ia.exports=function(){function e(r,t,n,i,o){return rn?n+1:r+1:i===o?t:t+1}return function(r,t){if(r===t)return 0;if(r.length>t.length){var n=r;r=t,t=n}for(var i=r.length,o=t.length;i>0&&r.charCodeAt(i-1)===t.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict"});var ca=Oo(()=>{"use strict"});var Qf={};tr(Qf,{DMMF:()=>ut,Debug:()=>N,Decimal:()=>Fe,Extensions:()=>ni,MetricsClient:()=>Nr,PrismaClientInitializationError:()=>P,PrismaClientKnownRequestError:()=>z,PrismaClientRustPanicError:()=>le,PrismaClientUnknownRequestError:()=>V,PrismaClientValidationError:()=>Z,Public:()=>ii,Sql:()=>oe,createParam:()=>Ra,defineDmmfProperty:()=>ka,deserializeJsonResponse:()=>qr,deserializeRawResult:()=>Xn,dmmfToRuntimeDataModel:()=>$s,empty:()=>La,getPrismaClient:()=>bu,getRuntime:()=>Gn,join:()=>Na,makeStrictEnum:()=>Eu,makeTypedQueryFactory:()=>_a,objectEnumValues:()=>Dn,raw:()=>no,serializeJsonQuery:()=>Mn,skip:()=>Fn,sqltag:()=>io,warnEnvConflicts:()=>wu,warnOnce:()=>st});module.exports=Ru(Qf);var ni={};tr(ni,{defineExtension:()=>_o,getExtensionContext:()=>No});function _o(e){return typeof e=="function"?e:r=>r.$extends(e)}function No(e){return e}var ii={};tr(ii,{validator:()=>Lo});function Lo(...e){return r=>r}var jt={};tr(jt,{$:()=>Vo,bgBlack:()=>Fu,bgBlue:()=>Vu,bgCyan:()=>Bu,bgGreen:()=>$u,bgMagenta:()=>ju,bgRed:()=>Mu,bgWhite:()=>Uu,bgYellow:()=>qu,black:()=>ku,blue:()=>nr,bold:()=>W,cyan:()=>De,dim:()=>Ce,gray:()=>Kr,green:()=>qe,grey:()=>Lu,hidden:()=>Du,inverse:()=>Iu,italic:()=>Cu,magenta:()=>_u,red:()=>ce,reset:()=>Au,strikethrough:()=>Ou,underline:()=>Y,white:()=>Nu,yellow:()=>Ie});var oi,Fo,Mo,$o,qo=!0;typeof process<"u"&&({FORCE_COLOR:oi,NODE_DISABLE_COLORS:Fo,NO_COLOR:Mo,TERM:$o}=process.env||{},qo=process.stdout&&process.stdout.isTTY);var Vo={enabled:!Fo&&Mo==null&&$o!=="dumb"&&(oi!=null&&oi!=="0"||qo)};function F(e,r){let t=new RegExp(`\\x1b\\[${r}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${r}m`;return function(o){return!Vo.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(t,i+n):o)+i}}var Au=F(0,0),W=F(1,22),Ce=F(2,22),Cu=F(3,23),Y=F(4,24),Iu=F(7,27),Du=F(8,28),Ou=F(9,29),ku=F(30,39),ce=F(31,39),qe=F(32,39),Ie=F(33,39),nr=F(34,39),_u=F(35,39),De=F(36,39),Nu=F(37,39),Kr=F(90,39),Lu=F(90,39),Fu=F(40,49),Mu=F(41,49),$u=F(42,49),qu=F(43,49),Vu=F(44,49),ju=F(45,49),Bu=F(46,49),Uu=F(47,49);var Gu=100,jo=["green","yellow","blue","magenta","cyan","red"],Hr=[],Bo=Date.now(),Qu=0,si=typeof process<"u"?process.env:{};globalThis.DEBUG??=si.DEBUG??"";globalThis.DEBUG_COLORS??=si.DEBUG_COLORS?si.DEBUG_COLORS==="true":!0;var Yr={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let r=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),t=r.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=r.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return t&&!n},log:(...e)=>{let[r,t,...n]=e;(console.warn??console.log)(`${r} ${t}`,...n)},formatters:{}};function Wu(e){let r={color:jo[Qu++%jo.length],enabled:Yr.enabled(e),namespace:e,log:Yr.log,extend:()=>{}},t=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=r;if(n.length!==0&&Hr.push([o,...n]),Hr.length>Gu&&Hr.shift(),Yr.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:Ju(c)),u=`+${Date.now()-Bo}ms`;Bo=Date.now(),globalThis.DEBUG_COLORS?a(jt[s](W(o)),...l,jt[s](u)):a(o,...l,u)}};return new Proxy(t,{get:(n,i)=>r[i],set:(n,i,o)=>r[i]=o})}var N=new Proxy(Wu,{get:(e,r)=>Yr[r],set:(e,r,t)=>Yr[r]=t});function Ju(e,r=2){let t=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(t.has(i))return"[Circular *]";t.add(i)}else if(typeof i=="bigint")return i.toString();return i},r)}function Uo(e=7500){let r=Hr.map(([t,...n])=>`${t} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` `);return r.length!!(e&&typeof e=="object"),Gt=e=>e&&!!e[Oe],Ee=(e,r,t)=>{if(Gt(e)){let n=e[Oe](),{matched:i,selections:o}=n.match(r);return i&&o&&Object.keys(o).forEach(s=>t(s,o[s])),i}if(ui(e)){if(!ui(r))return!1;if(Array.isArray(e)){if(!Array.isArray(r))return!1;let n=[],i=[],o=[];for(let s of e.keys()){let a=e[s];Gt(a)&&a[Ku]?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(r.lengthEe(u,s[c],t))&&i.every((u,c)=>Ee(u,a[c],t))&&(o.length===0||Ee(o[0],l,t))}return e.length===r.length&&e.every((s,a)=>Ee(s,r[a],t))}return Reflect.ownKeys(e).every(n=>{let i=e[n];return(n in r||Gt(o=i)&&o[Oe]().matcherType==="optional")&&Ee(i,r[n],t);var o})}return Object.is(r,e)},Ge=e=>{var r,t,n;return ui(e)?Gt(e)?(r=(t=(n=e[Oe]()).getSelectionKeys)==null?void 0:t.call(n))!=null?r:[]:Array.isArray(e)?zr(e,Ge):zr(Object.values(e),Ge):[]},zr=(e,r)=>e.reduce((t,n)=>t.concat(r(n)),[]);function pe(e){return Object.assign(e,{optional:()=>Hu(e),and:r=>q(e,r),or:r=>Yu(e,r),select:r=>r===void 0?Wo(e):Wo(r,e)})}function Hu(e){return pe({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return r===void 0?(Ge(e).forEach(i=>n(i,void 0)),{matched:!0,selections:t}):{matched:Ee(e,r,n),selections:t}},getSelectionKeys:()=>Ge(e),matcherType:"optional"})})}function q(...e){return pe({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return{matched:e.every(i=>Ee(i,r,n)),selections:t}},getSelectionKeys:()=>zr(e,Ge),matcherType:"and"})})}function Yu(...e){return pe({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return zr(e,Ge).forEach(i=>n(i,void 0)),{matched:e.some(i=>Ee(i,r,n)),selections:t}},getSelectionKeys:()=>zr(e,Ge),matcherType:"or"})})}function C(e){return{[Oe]:()=>({match:r=>({matched:!!e(r)})})}}function Wo(...e){let r=typeof e[0]=="string"?e[0]:void 0,t=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return pe({[Oe]:()=>({match:n=>{let i={[r??Qt]:n};return{matched:t===void 0||Ee(t,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[r??Qt].concat(t===void 0?[]:Ge(t))})})}function ye(e){return typeof e=="number"}function Ve(e){return typeof e=="string"}function je(e){return typeof e=="bigint"}var ig=pe(C(function(e){return!0}));var Be=e=>Object.assign(pe(e),{startsWith:r=>{return Be(q(e,(t=r,C(n=>Ve(n)&&n.startsWith(t)))));var t},endsWith:r=>{return Be(q(e,(t=r,C(n=>Ve(n)&&n.endsWith(t)))));var t},minLength:r=>Be(q(e,(t=>C(n=>Ve(n)&&n.length>=t))(r))),length:r=>Be(q(e,(t=>C(n=>Ve(n)&&n.length===t))(r))),maxLength:r=>Be(q(e,(t=>C(n=>Ve(n)&&n.length<=t))(r))),includes:r=>{return Be(q(e,(t=r,C(n=>Ve(n)&&n.includes(t)))));var t},regex:r=>{return Be(q(e,(t=r,C(n=>Ve(n)&&!!n.match(t)))));var t}}),og=Be(C(Ve)),be=e=>Object.assign(pe(e),{between:(r,t)=>be(q(e,((n,i)=>C(o=>ye(o)&&n<=o&&i>=o))(r,t))),lt:r=>be(q(e,(t=>C(n=>ye(n)&&nbe(q(e,(t=>C(n=>ye(n)&&n>t))(r))),lte:r=>be(q(e,(t=>C(n=>ye(n)&&n<=t))(r))),gte:r=>be(q(e,(t=>C(n=>ye(n)&&n>=t))(r))),int:()=>be(q(e,C(r=>ye(r)&&Number.isInteger(r)))),finite:()=>be(q(e,C(r=>ye(r)&&Number.isFinite(r)))),positive:()=>be(q(e,C(r=>ye(r)&&r>0))),negative:()=>be(q(e,C(r=>ye(r)&&r<0)))}),sg=be(C(ye)),Ue=e=>Object.assign(pe(e),{between:(r,t)=>Ue(q(e,((n,i)=>C(o=>je(o)&&n<=o&&i>=o))(r,t))),lt:r=>Ue(q(e,(t=>C(n=>je(n)&&nUe(q(e,(t=>C(n=>je(n)&&n>t))(r))),lte:r=>Ue(q(e,(t=>C(n=>je(n)&&n<=t))(r))),gte:r=>Ue(q(e,(t=>C(n=>je(n)&&n>=t))(r))),positive:()=>Ue(q(e,C(r=>je(r)&&r>0))),negative:()=>Ue(q(e,C(r=>je(r)&&r<0)))}),ag=Ue(C(je)),lg=pe(C(function(e){return typeof e=="boolean"})),ug=pe(C(function(e){return typeof e=="symbol"})),cg=pe(C(function(e){return e==null})),pg=pe(C(function(e){return e!=null}));var ci=class extends Error{constructor(r){let t;try{t=JSON.stringify(r)}catch{t=r}super(`Pattern matching error: no pattern matches value ${t}`),this.input=void 0,this.input=r}},pi={matched:!1,value:void 0};function hr(e){return new di(e,pi)}var di=class e{constructor(r,t){this.input=void 0,this.state=void 0,this.input=r,this.state=t}with(...r){if(this.state.matched)return this;let t=r[r.length-1],n=[r[0]],i;r.length===3&&typeof r[1]=="function"?i=r[1]:r.length>2&&n.push(...r.slice(1,r.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)?pi:{matched:!0,value:t(o?Qt in s?s[Qt]:s:this.input,this.input)};return new e(this.input,l)}when(r,t){if(this.state.matched)return this;let n=!!r(this.input);return new e(this.input,n?{matched:!0,value:t(this.input,this.input)}:pi)}otherwise(r){return this.state.matched?this.state.value:r(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new ci(this.input)}run(){return this.exhaustive()}returnType(){return this}};var Yo=require("node:util");var zu={warn:Ie("prisma:warn")},Zu={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Wt(e,...r){Zu.warn()&&console.warn(`${zu.warn} ${e}`,...r)}var Xu=(0,Yo.promisify)(Ho.default.exec),ee=gr("prisma:get-platform"),ec=["1.0.x","1.1.x","3.0.x"];async function zo(){let e=Kt.default.platform(),r=process.arch;if(e==="freebsd"){let s=await Ht("freebsd-version");if(s&&s.trim().length>0){let l=/^(\d+)\.?/.exec(s);if(l)return{platform:"freebsd",targetDistro:`freebsd${l[1]}`,arch:r}}}if(e!=="linux")return{platform:e,arch:r};let t=await tc(),n=await cc(),i=ic({arch:r,archFromUname:n,familyDistro:t.familyDistro}),{libssl:o}=await oc(i);return{platform:"linux",libssl:o,arch:r,archFromUname:n,...t}}function rc(e){let r=/^ID="?([^"\n]*)"?$/im,t=/^ID_LIKE="?([^"\n]*)"?$/im,n=r.exec(e),i=n&&n[1]&&n[1].toLowerCase()||"",o=t.exec(e),s=o&&o[1]&&o[1].toLowerCase()||"",a=hr({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 ee(`Found distro info: ${JSON.stringify(a,null,2)}`),a}async function tc(){let e="/etc/os-release";try{let r=await mi.default.readFile(e,{encoding:"utf-8"});return rc(r)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function nc(e){let r=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(r){let t=`${r[1]}.x`;return Zo(t)}}function Jo(e){let r=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(r){let t=`${r[1]}${r[2]??".0"}.x`;return Zo(t)}}function Zo(e){let r=(()=>{if(es(e))return e;let t=e.split(".");return t[1]="0",t.join(".")})();if(ec.includes(r))return r}function ic(e){return hr(e).with({familyDistro:"musl"},()=>(ee('Trying platform-specific paths for "alpine"'),["/lib","/usr/lib"])).with({familyDistro:"debian"},({archFromUname:r})=>(ee('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${r}-linux-gnu`,`/lib/${r}-linux-gnu`])).with({familyDistro:"rhel"},()=>(ee('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:r,arch:t,archFromUname:n})=>(ee(`Don't know any platform-specific paths for "${r}" on ${t} (${n})`),[]))}async function oc(e){let r='grep -v "libssl.so.0"',t=await Ko(e);if(t){ee(`Found libssl.so file using platform-specific paths: ${t}`);let o=Jo(t);if(ee(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"libssl-specific-path"}}ee('Falling back to "ldconfig" and other generic paths');let n=await Ht(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${r}`);if(n||(n=await Ko(["/lib64","/usr/lib64","/lib","/usr/lib"])),n){ee(`Found libssl.so file using "ldconfig" or other generic paths: ${n}`);let o=Jo(n);if(ee(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"ldconfig"}}let i=await Ht("openssl version -v");if(i){ee(`Found openssl binary with version: ${i}`);let o=nc(i);if(ee(`The parsed openssl version is: ${o}`),o)return{libssl:o,strategy:"openssl-binary"}}return ee("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function Ko(e){for(let r of e){let t=await sc(r);if(t)return t}}async function sc(e){try{return(await mi.default.readdir(e)).find(t=>t.startsWith("libssl.so.")&&!t.startsWith("libssl.so.0"))}catch(r){if(r.code==="ENOENT")return;throw r}}async function ir(){let{binaryTarget:e}=await Xo();return e}function ac(e){return e.binaryTarget!==void 0}async function fi(){let{memoized:e,...r}=await Xo();return r}var Jt={};async function Xo(){if(ac(Jt))return Promise.resolve({...Jt,memoized:!0});let e=await zo(),r=lc(e);return Jt={...e,binaryTarget:r},{...Jt,memoized:!1}}function lc(e){let{platform:r,arch:t,archFromUname:n,libssl:i,targetDistro:o,familyDistro:s,originalDistro:a}=e;r==="linux"&&!["x64","arm64"].includes(t)&&Wt(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures (detected "${t}" instead). If you are using your own custom Prisma engines, you can ignore this warning, as long as you've compiled the engines for your system architecture "${n}".`);let l="1.1.x";if(r==="linux"&&i===void 0){let c=hr({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.");Wt(`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(r==="linux"&&o===void 0&&ee(`Distro is "${a}". Falling back to Prisma engines built for "${u}".`),r==="darwin"&&t==="arm64")return"darwin-arm64";if(r==="darwin")return"darwin";if(r==="win32")return"windows";if(r==="freebsd")return o;if(r==="openbsd")return"openbsd";if(r==="netbsd")return"netbsd";if(r==="linux"&&o==="nixos")return"linux-nixos";if(r==="linux"&&t==="arm64")return`${o==="musl"?"linux-musl-arm64":"linux-arm64"}-openssl-${i||l}`;if(r==="linux"&&t==="arm")return`linux-arm-openssl-${i||l}`;if(r==="linux"&&o==="musl"){let c="linux-musl";return!i||es(i)?c:`${c}-openssl-${i}`}return r==="linux"&&o&&i?`${o}-openssl-${i}`:(r!=="linux"&&Wt(`Prisma detected unknown OS "${r}" and may not work as expected. Defaulting to "linux".`),i?`${u}-openssl-${i}`:o?`${o}-openssl-${l}`:`${u}-openssl-${l}`)}async function uc(e){try{return await e()}catch{return}}function Ht(e){return uc(async()=>{let r=await Xu(e);return ee(`Command "${e}" successfully returned "${r.stdout}"`),r.stdout})}async function cc(){return typeof Kt.default.machine=="function"?Kt.default.machine():(await Ht("uname -m"))?.trim()}function es(e){return e.startsWith("1.")}var Zt={};tr(Zt,{beep:()=>Fc,clearScreen:()=>kc,clearTerminal:()=>_c,cursorBackward:()=>yc,cursorDown:()=>gc,cursorForward:()=>hc,cursorGetPosition:()=>wc,cursorHide:()=>vc,cursorLeft:()=>ns,cursorMove:()=>fc,cursorNextLine:()=>xc,cursorPrevLine:()=>Pc,cursorRestorePosition:()=>Ec,cursorSavePosition:()=>bc,cursorShow:()=>Tc,cursorTo:()=>mc,cursorUp:()=>ts,enterAlternativeScreen:()=>Nc,eraseDown:()=>Cc,eraseEndLine:()=>Rc,eraseLine:()=>is,eraseLines:()=>Sc,eraseScreen:()=>gi,eraseStartLine:()=>Ac,eraseUp:()=>Ic,exitAlternativeScreen:()=>Lc,iTerm:()=>qc,image:()=>$c,link:()=>Mc,scrollDown:()=>Oc,scrollUp:()=>Dc});var zt=A(require("node:process"),1);var Yt=globalThis.window?.document!==void 0,Eg=globalThis.process?.versions?.node!==void 0,wg=globalThis.process?.versions?.bun!==void 0,xg=globalThis.Deno?.version?.deno!==void 0,Pg=globalThis.process?.versions?.electron!==void 0,vg=globalThis.navigator?.userAgent?.includes("jsdom")===!0,Tg=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,Sg=typeof DedicatedWorkerGlobalScope<"u"&&globalThis instanceof DedicatedWorkerGlobalScope,Rg=typeof SharedWorkerGlobalScope<"u"&&globalThis instanceof SharedWorkerGlobalScope,Ag=typeof ServiceWorkerGlobalScope<"u"&&globalThis instanceof ServiceWorkerGlobalScope,Zr=globalThis.navigator?.userAgentData?.platform,Cg=Zr==="macOS"||globalThis.navigator?.platform==="MacIntel"||globalThis.navigator?.userAgent?.includes(" Mac ")===!0||globalThis.process?.platform==="darwin",Ig=Zr==="Windows"||globalThis.navigator?.platform==="Win32"||globalThis.process?.platform==="win32",Dg=Zr==="Linux"||globalThis.navigator?.platform?.startsWith("Linux")===!0||globalThis.navigator?.userAgent?.includes(" Linux ")===!0||globalThis.process?.platform==="linux",Og=Zr==="iOS"||globalThis.navigator?.platform==="MacIntel"&&globalThis.navigator?.maxTouchPoints>1||/iPad|iPhone|iPod/.test(globalThis.navigator?.platform),kg=Zr==="Android"||globalThis.navigator?.platform==="Android"||globalThis.navigator?.userAgent?.includes(" Android ")===!0||globalThis.process?.platform==="android";var I="\x1B[",et="\x1B]",yr="\x07",Xr=";",rs=!Yt&&zt.default.env.TERM_PROGRAM==="Apple_Terminal",pc=!Yt&&zt.default.platform==="win32",dc=Yt?()=>{throw new Error("`process.cwd()` only works in Node.js, not the browser.")}:zt.default.cwd,mc=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof r!="number"?I+(e+1)+"G":I+(r+1)+Xr+(e+1)+"H"},fc=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let t="";return e<0?t+=I+-e+"D":e>0&&(t+=I+e+"C"),r<0?t+=I+-r+"A":r>0&&(t+=I+r+"B"),t},ts=(e=1)=>I+e+"A",gc=(e=1)=>I+e+"B",hc=(e=1)=>I+e+"C",yc=(e=1)=>I+e+"D",ns=I+"G",bc=rs?"\x1B7":I+"s",Ec=rs?"\x1B8":I+"u",wc=I+"6n",xc=I+"E",Pc=I+"F",vc=I+"?25l",Tc=I+"?25h",Sc=e=>{let r="";for(let t=0;t[et,"8",Xr,Xr,r,yr,e,et,"8",Xr,Xr,yr].join(""),$c=(e,r={})=>{let t=`${et}1337;File=inline=1`;return r.width&&(t+=`;width=${r.width}`),r.height&&(t+=`;height=${r.height}`),r.preserveAspectRatio===!1&&(t+=";preserveAspectRatio=0"),t+":"+Buffer.from(e).toString("base64")+yr},qc={setCwd:(e=dc())=>`${et}50;CurrentDir=${e}${yr}`,annotation(e,r={}){let t=`${et}1337;`,n=r.x!==void 0,i=r.y!==void 0;if((n||i)&&!(n&&i&&r.length!==void 0))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replaceAll("|",""),t+=r.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",r.length>0?t+=(n?[e,r.length,r.x,r.y]:[r.length,e]).join("|"):t+=e,t+yr}};var Xt=A(ps(),1);function or(e,r,{target:t="stdout",...n}={}){return Xt.default[t]?Zt.link(e,r):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,r):`${e} (\u200B${r}\u200B)`}or.isSupported=Xt.default.stdout;or.stderr=(e,r,t={})=>or(e,r,{target:"stderr",...t});or.stderr.isSupported=Xt.default.stderr;function wi(e){return or(e,e,{fallback:Y})}var Gc=ds(),xi=Gc.version;function Er(e){let r=Qc();return r||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Wc(e))}function Qc(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Wc(e){return e?.previewFeatures.includes("queryCompiler")?"client":"library"}function Pi(e){return e.name==="DriverAdapterError"&&typeof e.cause=="object"}function en(e){return{ok:!0,value:e,map(r){return en(r(e))},flatMap(r){return r(e)}}}function sr(e){return{ok:!1,error:e,map(){return sr(e)},flatMap(){return sr(e)}}}var ms=N("driver-adapter-utils"),vi=class{registeredErrors=[];consumeError(r){return this.registeredErrors[r]}registerNewError(r){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:r},t}};var rn=(e,r=new vi)=>{let t={adapterName:e.adapterName,errorRegistry:r,queryRaw:ke(r,e.queryRaw.bind(e)),executeRaw:ke(r,e.executeRaw.bind(e)),executeScript:ke(r,e.executeScript.bind(e)),dispose:ke(r,e.dispose.bind(e)),provider:e.provider,startTransaction:async(...n)=>(await ke(r,e.startTransaction.bind(e))(...n)).map(o=>Jc(r,o))};return e.getConnectionInfo&&(t.getConnectionInfo=Kc(r,e.getConnectionInfo.bind(e))),t},Jc=(e,r)=>({adapterName:r.adapterName,provider:r.provider,options:r.options,queryRaw:ke(e,r.queryRaw.bind(r)),executeRaw:ke(e,r.executeRaw.bind(r)),commit:ke(e,r.commit.bind(r)),rollback:ke(e,r.rollback.bind(r))});function ke(e,r){return async(...t)=>{try{return en(await r(...t))}catch(n){if(ms("[error@wrapAsync]",n),Pi(n))return sr(n.cause);let i=e.registerNewError(n);return sr({kind:"GenericJs",id:i})}}}function Kc(e,r){return(...t)=>{try{return en(r(...t))}catch(n){if(ms("[error@wrapSync]",n),Pi(n))return sr(n.cause);let i=e.registerNewError(n);return sr({kind:"GenericJs",id:i})}}}var Yc=A(nn());var M=A(require("node:path")),zc=A(nn()),Th=N("prisma:engines");function fs(){return M.default.join(__dirname,"../")}var Sh="libquery-engine";M.default.join(__dirname,"../query-engine-darwin");M.default.join(__dirname,"../query-engine-darwin-arm64");M.default.join(__dirname,"../query-engine-debian-openssl-1.0.x");M.default.join(__dirname,"../query-engine-debian-openssl-1.1.x");M.default.join(__dirname,"../query-engine-debian-openssl-3.0.x");M.default.join(__dirname,"../query-engine-linux-static-x64");M.default.join(__dirname,"../query-engine-linux-static-arm64");M.default.join(__dirname,"../query-engine-rhel-openssl-1.0.x");M.default.join(__dirname,"../query-engine-rhel-openssl-1.1.x");M.default.join(__dirname,"../query-engine-rhel-openssl-3.0.x");M.default.join(__dirname,"../libquery_engine-darwin.dylib.node");M.default.join(__dirname,"../libquery_engine-darwin-arm64.dylib.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-musl.so.node");M.default.join(__dirname,"../libquery_engine-linux-musl-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-3.0.x.so.node");M.default.join(__dirname,"../query_engine-windows.dll.node");var Si=A(require("node:fs")),gs=gr("chmodPlusX");function Ri(e){if(process.platform==="win32")return;let r=Si.default.statSync(e),t=r.mode|64|8|1;if(r.mode===t){gs(`Execution permissions of ${e} are fine`);return}let n=t.toString(8).slice(-3);gs(`Have to call chmodPlusX on ${e}`),Si.default.chmodSync(e,n)}function Ai(e){let r=e.e,t=a=>`Prisma cannot find the required \`${a}\` system library in your system`,n=r.message.includes("cannot open shared object file"),i=`Please refer to the documentation about Prisma's system requirements: ${wi("https://pris.ly/d/system-requirements")}`,o=`Unable to require(\`${Ce(e.id)}\`).`,s=hr({message:r.message,code:r.code}).with({code:"ENOENT"},()=>"File does not exist.").when(({message:a})=>n&&a.includes("libz"),()=>`${t("libz")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libgcc_s"),()=>`${t("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`${t("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} +${c}`)}let u="debian";if(r==="linux"&&o===void 0&&ee(`Distro is "${a}". Falling back to Prisma engines built for "${u}".`),r==="darwin"&&t==="arm64")return"darwin-arm64";if(r==="darwin")return"darwin";if(r==="win32")return"windows";if(r==="freebsd")return o;if(r==="openbsd")return"openbsd";if(r==="netbsd")return"netbsd";if(r==="linux"&&o==="nixos")return"linux-nixos";if(r==="linux"&&t==="arm64")return`${o==="musl"?"linux-musl-arm64":"linux-arm64"}-openssl-${i||l}`;if(r==="linux"&&t==="arm")return`linux-arm-openssl-${i||l}`;if(r==="linux"&&o==="musl"){let c="linux-musl";return!i||es(i)?c:`${c}-openssl-${i}`}return r==="linux"&&o&&i?`${o}-openssl-${i}`:(r!=="linux"&&Wt(`Prisma detected unknown OS "${r}" and may not work as expected. Defaulting to "linux".`),i?`${u}-openssl-${i}`:o?`${o}-openssl-${l}`:`${u}-openssl-${l}`)}async function uc(e){try{return await e()}catch{return}}function Ht(e){return uc(async()=>{let r=await Xu(e);return ee(`Command "${e}" successfully returned "${r.stdout}"`),r.stdout})}async function cc(){return typeof Kt.default.machine=="function"?Kt.default.machine():(await Ht("uname -m"))?.trim()}function es(e){return e.startsWith("1.")}var Zt={};tr(Zt,{beep:()=>Fc,clearScreen:()=>kc,clearTerminal:()=>_c,cursorBackward:()=>yc,cursorDown:()=>gc,cursorForward:()=>hc,cursorGetPosition:()=>wc,cursorHide:()=>Pc,cursorLeft:()=>ns,cursorMove:()=>fc,cursorNextLine:()=>xc,cursorPrevLine:()=>vc,cursorRestorePosition:()=>Ec,cursorSavePosition:()=>bc,cursorShow:()=>Tc,cursorTo:()=>mc,cursorUp:()=>ts,enterAlternativeScreen:()=>Nc,eraseDown:()=>Cc,eraseEndLine:()=>Rc,eraseLine:()=>is,eraseLines:()=>Sc,eraseScreen:()=>gi,eraseStartLine:()=>Ac,eraseUp:()=>Ic,exitAlternativeScreen:()=>Lc,iTerm:()=>qc,image:()=>$c,link:()=>Mc,scrollDown:()=>Oc,scrollUp:()=>Dc});var zt=A(require("node:process"),1);var Yt=globalThis.window?.document!==void 0,Eg=globalThis.process?.versions?.node!==void 0,wg=globalThis.process?.versions?.bun!==void 0,xg=globalThis.Deno?.version?.deno!==void 0,vg=globalThis.process?.versions?.electron!==void 0,Pg=globalThis.navigator?.userAgent?.includes("jsdom")===!0,Tg=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,Sg=typeof DedicatedWorkerGlobalScope<"u"&&globalThis instanceof DedicatedWorkerGlobalScope,Rg=typeof SharedWorkerGlobalScope<"u"&&globalThis instanceof SharedWorkerGlobalScope,Ag=typeof ServiceWorkerGlobalScope<"u"&&globalThis instanceof ServiceWorkerGlobalScope,Zr=globalThis.navigator?.userAgentData?.platform,Cg=Zr==="macOS"||globalThis.navigator?.platform==="MacIntel"||globalThis.navigator?.userAgent?.includes(" Mac ")===!0||globalThis.process?.platform==="darwin",Ig=Zr==="Windows"||globalThis.navigator?.platform==="Win32"||globalThis.process?.platform==="win32",Dg=Zr==="Linux"||globalThis.navigator?.platform?.startsWith("Linux")===!0||globalThis.navigator?.userAgent?.includes(" Linux ")===!0||globalThis.process?.platform==="linux",Og=Zr==="iOS"||globalThis.navigator?.platform==="MacIntel"&&globalThis.navigator?.maxTouchPoints>1||/iPad|iPhone|iPod/.test(globalThis.navigator?.platform),kg=Zr==="Android"||globalThis.navigator?.platform==="Android"||globalThis.navigator?.userAgent?.includes(" Android ")===!0||globalThis.process?.platform==="android";var I="\x1B[",et="\x1B]",yr="\x07",Xr=";",rs=!Yt&&zt.default.env.TERM_PROGRAM==="Apple_Terminal",pc=!Yt&&zt.default.platform==="win32",dc=Yt?()=>{throw new Error("`process.cwd()` only works in Node.js, not the browser.")}:zt.default.cwd,mc=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof r!="number"?I+(e+1)+"G":I+(r+1)+Xr+(e+1)+"H"},fc=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let t="";return e<0?t+=I+-e+"D":e>0&&(t+=I+e+"C"),r<0?t+=I+-r+"A":r>0&&(t+=I+r+"B"),t},ts=(e=1)=>I+e+"A",gc=(e=1)=>I+e+"B",hc=(e=1)=>I+e+"C",yc=(e=1)=>I+e+"D",ns=I+"G",bc=rs?"\x1B7":I+"s",Ec=rs?"\x1B8":I+"u",wc=I+"6n",xc=I+"E",vc=I+"F",Pc=I+"?25l",Tc=I+"?25h",Sc=e=>{let r="";for(let t=0;t[et,"8",Xr,Xr,r,yr,e,et,"8",Xr,Xr,yr].join(""),$c=(e,r={})=>{let t=`${et}1337;File=inline=1`;return r.width&&(t+=`;width=${r.width}`),r.height&&(t+=`;height=${r.height}`),r.preserveAspectRatio===!1&&(t+=";preserveAspectRatio=0"),t+":"+Buffer.from(e).toString("base64")+yr},qc={setCwd:(e=dc())=>`${et}50;CurrentDir=${e}${yr}`,annotation(e,r={}){let t=`${et}1337;`,n=r.x!==void 0,i=r.y!==void 0;if((n||i)&&!(n&&i&&r.length!==void 0))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replaceAll("|",""),t+=r.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",r.length>0?t+=(n?[e,r.length,r.x,r.y]:[r.length,e]).join("|"):t+=e,t+yr}};var Xt=A(ps(),1);function or(e,r,{target:t="stdout",...n}={}){return Xt.default[t]?Zt.link(e,r):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,r):`${e} (\u200B${r}\u200B)`}or.isSupported=Xt.default.stdout;or.stderr=(e,r,t={})=>or(e,r,{target:"stderr",...t});or.stderr.isSupported=Xt.default.stderr;function wi(e){return or(e,e,{fallback:Y})}var Gc=ds(),xi=Gc.version;function Er(e){let r=Qc();return r||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Wc(e))}function Qc(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Wc(e){return e?.previewFeatures.includes("queryCompiler")?"client":"library"}function vi(e){return e.name==="DriverAdapterError"&&typeof e.cause=="object"}function en(e){return{ok:!0,value:e,map(r){return en(r(e))},flatMap(r){return r(e)}}}function sr(e){return{ok:!1,error:e,map(){return sr(e)},flatMap(){return sr(e)}}}var ms=N("driver-adapter-utils"),Pi=class{registeredErrors=[];consumeError(r){return this.registeredErrors[r]}registerNewError(r){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:r},t}};var rn=(e,r=new Pi)=>{let t={adapterName:e.adapterName,errorRegistry:r,queryRaw:ke(r,e.queryRaw.bind(e)),executeRaw:ke(r,e.executeRaw.bind(e)),executeScript:ke(r,e.executeScript.bind(e)),dispose:ke(r,e.dispose.bind(e)),provider:e.provider,startTransaction:async(...n)=>(await ke(r,e.startTransaction.bind(e))(...n)).map(o=>Jc(r,o))};return e.getConnectionInfo&&(t.getConnectionInfo=Kc(r,e.getConnectionInfo.bind(e))),t},Jc=(e,r)=>({adapterName:r.adapterName,provider:r.provider,options:r.options,queryRaw:ke(e,r.queryRaw.bind(r)),executeRaw:ke(e,r.executeRaw.bind(r)),commit:ke(e,r.commit.bind(r)),rollback:ke(e,r.rollback.bind(r))});function ke(e,r){return async(...t)=>{try{return en(await r(...t))}catch(n){if(ms("[error@wrapAsync]",n),vi(n))return sr(n.cause);let i=e.registerNewError(n);return sr({kind:"GenericJs",id:i})}}}function Kc(e,r){return(...t)=>{try{return en(r(...t))}catch(n){if(ms("[error@wrapSync]",n),vi(n))return sr(n.cause);let i=e.registerNewError(n);return sr({kind:"GenericJs",id:i})}}}var Yc=A(nn());var M=A(require("node:path")),zc=A(nn()),Th=N("prisma:engines");function fs(){return M.default.join(__dirname,"../")}var Sh="libquery-engine";M.default.join(__dirname,"../query-engine-darwin");M.default.join(__dirname,"../query-engine-darwin-arm64");M.default.join(__dirname,"../query-engine-debian-openssl-1.0.x");M.default.join(__dirname,"../query-engine-debian-openssl-1.1.x");M.default.join(__dirname,"../query-engine-debian-openssl-3.0.x");M.default.join(__dirname,"../query-engine-linux-static-x64");M.default.join(__dirname,"../query-engine-linux-static-arm64");M.default.join(__dirname,"../query-engine-rhel-openssl-1.0.x");M.default.join(__dirname,"../query-engine-rhel-openssl-1.1.x");M.default.join(__dirname,"../query-engine-rhel-openssl-3.0.x");M.default.join(__dirname,"../libquery_engine-darwin.dylib.node");M.default.join(__dirname,"../libquery_engine-darwin-arm64.dylib.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-musl.so.node");M.default.join(__dirname,"../libquery_engine-linux-musl-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-3.0.x.so.node");M.default.join(__dirname,"../query_engine-windows.dll.node");var Si=A(require("node:fs")),gs=gr("chmodPlusX");function Ri(e){if(process.platform==="win32")return;let r=Si.default.statSync(e),t=r.mode|64|8|1;if(r.mode===t){gs(`Execution permissions of ${e} are fine`);return}let n=t.toString(8).slice(-3);gs(`Have to call chmodPlusX on ${e}`),Si.default.chmodSync(e,n)}function Ai(e){let r=e.e,t=a=>`Prisma cannot find the required \`${a}\` system library in your system`,n=r.message.includes("cannot open shared object file"),i=`Please refer to the documentation about Prisma's system requirements: ${wi("https://pris.ly/d/system-requirements")}`,o=`Unable to require(\`${Ce(e.id)}\`).`,s=hr({message:r.message,code:r.code}).with({code:"ENOENT"},()=>"File does not exist.").when(({message:a})=>n&&a.includes("libz"),()=>`${t("libz")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libgcc_s"),()=>`${t("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`${t("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: ${r.message}`}var bs=A(ys(),1);function Ci(e){let r=(0,bs.default)(e);if(r===0)return e;let t=new RegExp(`^[ \\t]{${r}}`,"gm");return e.replace(t,"")}var Es="prisma+postgres",on=`${Es}:`;function sn(e){return e?.toString().startsWith(`${on}//`)??!1}function Ii(e){if(!sn(e))return!1;let{host:r}=new URL(e);return r.includes("localhost")||r.includes("127.0.0.1")||r.includes("[::1]")}var xs=A(Di());function ki(e){return String(new Oi(e))}var Oi=class{constructor(r){this.config=r}toString(){let{config:r}=this,t=r.provider.fromEnvVar?`env("${r.provider.fromEnvVar}")`:r.provider.value,n=JSON.parse(JSON.stringify({provider:t,binaryTargets:Zc(r.binaryTargets)}));return`generator ${r.name} { ${(0,xs.default)(Xc(n),2)} }`}};function Zc(e){let r;if(e.length>0){let t=e.find(n=>n.fromEnvVar!==null);t?r=`env("${t.fromEnvVar}")`:r=e.map(n=>n.native?"native":n.value)}else r=void 0;return r}function Xc(e){let r=Object.keys(e).reduce((t,n)=>Math.max(t,n.length),0);return Object.entries(e).map(([t,n])=>`${t.padEnd(r)} = ${ep(n)}`).join(` -`)}function ep(e){return JSON.parse(JSON.stringify(e,(r,t)=>Array.isArray(t)?`[${t.map(n=>JSON.stringify(n)).join(", ")}]`:JSON.stringify(t)))}var tt={};tr(tt,{error:()=>np,info:()=>tp,log:()=>rp,query:()=>ip,should:()=>Ps,tags:()=>rt,warn:()=>_i});var rt={error:ce("prisma:error"),warn:Ie("prisma:warn"),info:De("prisma:info"),query:nr("prisma:query")},Ps={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function rp(...e){console.log(...e)}function _i(e,...r){Ps.warn()&&console.warn(`${rt.warn} ${e}`,...r)}function tp(e,...r){console.info(`${rt.info} ${e}`,...r)}function np(e,...r){console.error(`${rt.error} ${e}`,...r)}function ip(e,...r){console.log(`${rt.query} ${e}`,...r)}function an(e,r){if(!e)throw new Error(`${r}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}function ar(e,r){throw new Error(r)}var nt=A(require("node:path"));function Li(e){return nt.default.sep===nt.default.posix.sep?e:e.split(nt.default.sep).join(nt.default.posix.sep)}var qi=A(Os()),ln=A(require("node:fs"));var wr=A(require("node:path"));function ks(e){let r=e.ignoreProcessEnv?{}:process.env,t=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(r,p)?r[p]:e.parsed[p]||"",u=t(u)}return o.replace(c,u)},n)??n;for(let n in e.parsed){let i=Object.hasOwnProperty.call(r,n)?r[n]:e.parsed[n];e.parsed[n]=t(i)}for(let n in e.parsed)r[n]=e.parsed[n];return e}var $i=gr("prisma:tryLoadEnv");function ot({rootEnvPath:e,schemaEnvPath:r},t={conflictCheck:"none"}){let n=_s(e);t.conflictCheck!=="none"&&wp(n,r,t.conflictCheck);let i=null;return Ns(n?.path,r)||(i=_s(r)),!n&&!i&&$i("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(` +`)}function ep(e){return JSON.parse(JSON.stringify(e,(r,t)=>Array.isArray(t)?`[${t.map(n=>JSON.stringify(n)).join(", ")}]`:JSON.stringify(t)))}var tt={};tr(tt,{error:()=>np,info:()=>tp,log:()=>rp,query:()=>ip,should:()=>vs,tags:()=>rt,warn:()=>_i});var rt={error:ce("prisma:error"),warn:Ie("prisma:warn"),info:De("prisma:info"),query:nr("prisma:query")},vs={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function rp(...e){console.log(...e)}function _i(e,...r){vs.warn()&&console.warn(`${rt.warn} ${e}`,...r)}function tp(e,...r){console.info(`${rt.info} ${e}`,...r)}function np(e,...r){console.error(`${rt.error} ${e}`,...r)}function ip(e,...r){console.log(`${rt.query} ${e}`,...r)}function an(e,r){if(!e)throw new Error(`${r}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}function ar(e,r){throw new Error(r)}var nt=A(require("node:path"));function Li(e){return nt.default.sep===nt.default.posix.sep?e:e.split(nt.default.sep).join(nt.default.posix.sep)}var qi=A(Os()),ln=A(require("node:fs"));var wr=A(require("node:path"));function ks(e){let r=e.ignoreProcessEnv?{}:process.env,t=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(r,p)?r[p]:e.parsed[p]||"",u=t(u)}return o.replace(c,u)},n)??n;for(let n in e.parsed){let i=Object.hasOwnProperty.call(r,n)?r[n]:e.parsed[n];e.parsed[n]=t(i)}for(let n in e.parsed)r[n]=e.parsed[n];return e}var $i=gr("prisma:tryLoadEnv");function ot({rootEnvPath:e,schemaEnvPath:r},t={conflictCheck:"none"}){let n=_s(e);t.conflictCheck!=="none"&&wp(n,r,t.conflictCheck);let i=null;return Ns(n?.path,r)||(i=_s(r)),!n&&!i&&$i("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 wp(e,r,t){let n=e?.dotenvResult.parsed,i=!Ns(e?.path,r);if(n&&r&&i&&ln.default.existsSync(r)){let o=qi.default.parse(ln.default.readFileSync(r)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=wr.default.relative(process.cwd(),e.path),l=wr.default.relative(process.cwd(),r);if(t==="error"){let u=`There is a conflict between env var${s.length>1?"s":""} in ${Y(a)} and ${Y(l)} Conflicting env vars: ${s.map(c=>` ${W(c)}`).join(` @@ -21,19 +21,19 @@ ${s.map(c=>` ${W(c)}`).join(` We suggest to move the contents of ${Y(l)} to ${Y(a)} to consolidate your env vars. `;throw new Error(u)}else if(t==="warn"){let u=`Conflict for env var${s.length>1?"s":""} ${s.map(c=>W(c)).join(", ")} in ${Y(a)} and ${Y(l)} Env vars from ${Y(l)} overwrite the ones from ${Y(a)} - `;console.warn(`${Ie("warn(prisma)")} ${u}`)}}}}function _s(e){if(xp(e)){$i(`Environment variables loaded from ${e}`);let r=qi.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:ks(r),message:Ce(`Environment variables loaded from ${wr.default.relative(process.cwd(),e)}`),path:e}}else $i(`Environment variables not found at ${e}`);return null}function Ns(e,r){return e&&r&&wr.default.resolve(e)===wr.default.resolve(r)}function xp(e){return!!(e&&ln.default.existsSync(e))}function Vi(e,r){return Object.prototype.hasOwnProperty.call(e,r)}function cn(e,r){let t={};for(let n of Object.keys(e))t[n]=r(e[n],n);return t}function ji(e,r){if(e.length===0)return;let t=e[0];for(let n=1;n{Fs.has(e)||(Fs.add(e),_i(r,...t))};var v=class e extends Error{clientVersion;errorCode;retryable;constructor(r,t,n){super(r),this.name="PrismaClientInitializationError",this.clientVersion=t,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};x(v,"PrismaClientInitializationError");var z=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(r,{code:t,clientVersion:n,meta:i,batchRequestIdx:o}){super(r),this.name="PrismaClientKnownRequestError",this.code=t,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};x(z,"PrismaClientKnownRequestError");var le=class extends Error{clientVersion;constructor(r,t){super(r),this.name="PrismaClientRustPanicError",this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};x(le,"PrismaClientRustPanicError");var V=class extends Error{clientVersion;batchRequestIdx;constructor(r,{clientVersion:t,batchRequestIdx:n}){super(r),this.name="PrismaClientUnknownRequestError",this.clientVersion=t,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};x(V,"PrismaClientUnknownRequestError");var Z=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(r,{clientVersion:t}){super(r),this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};x(Z,"PrismaClientValidationError");var we=class{_map=new Map;get(r){return this._map.get(r)?.value}set(r,t){this._map.set(r,{value:t})}getOrCreate(r,t){let n=this._map.get(r);if(n)return n.value;let i=t();return this.set(r,i),i}};function We(e){return e.substring(0,1).toLowerCase()+e.substring(1)}function Ms(e,r){let t={};for(let n of e){let i=n[r];t[i]=n}return t}function at(e){let r;return{get(){return r||(r={value:e()}),r.value}}}function $s(e){return{models:Bi(e.models),enums:Bi(e.enums),types:Bi(e.types)}}function Bi(e){let r={};for(let{name:t,...n}of e)r[t]=n;return r}function xr(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function dn(e){return e.toString()!=="Invalid Date"}var Pr=9e15,Ye=1e9,Ui="0123456789abcdef",gn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",hn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Gi={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Pr,maxE:Pr,crypto:!1},Bs,Ne,w=!0,bn="[DecimalError] ",He=bn+"Invalid argument: ",Us=bn+"Precision limit exceeded",Gs=bn+"crypto unavailable",Qs="[object Decimal]",X=Math.floor,U=Math.pow,Pp=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,vp=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Tp=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ws=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fe=1e7,E=7,Sp=9007199254740991,Rp=gn.length-1,Qi=hn.length-1,m={toStringTag:Qs};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,r){var t,n=this,i=n.constructor;if(e=new i(e),r=new i(r),!e.s||!r.s)return new i(NaN);if(e.gt(r))throw Error(He+r);return t=n.cmp(e),t<0?e:n.cmp(r)>0?r:new i(n)};m.comparedTo=m.cmp=function(e){var r,t,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,r=0,t=na[r]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};m.cosine=m.cos=function(){var e,r,t=this,n=t.constructor;return t.d?t.d[0]?(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+E,n.rounding=1,t=Ap(n,zs(n,t)),n.precision=e,n.rounding=r,y(Ne==2||Ne==3?t.neg():t,e,r,!0)):new n(1):new n(NaN)};m.cubeRoot=m.cbrt=function(){var e,r,t,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*U(c.s*c,1/3),!o||Math.abs(o)==1/0?(t=J(c.d),e=c.e,(o=(e-t.length+1)%3)&&(t+=o==1||o==-2?"0":"00"),o=U(t,1/3),e=X((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new p(t),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=L(u.plus(c).times(a),u.plus(l),s+2,1),J(a.d).slice(0,s)===(t=J(n.d)).slice(0,s))if(t=t.slice(s-3,s+1),t=="9999"||!i&&t=="4999"){if(!i&&(y(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}s+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(y(n,e+1,1),r=!n.times(n).times(n).eq(c));break}return w=!0,y(n,e,p.rounding,r)};m.decimalPlaces=m.dp=function(){var e,r=this.d,t=NaN;if(r){if(e=r.length-1,t=(e-X(this.e/E))*E,e=r[e],e)for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t};m.dividedBy=m.div=function(e){return L(this,new this.constructor(e))};m.dividedToIntegerBy=m.divToInt=function(e){var r=this,t=r.constructor;return y(L(r,new t(e),0,1,1),t.precision,t.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 r=this.cmp(e);return r==1||r===0};m.hyperbolicCosine=m.cosh=function(){var e,r,t,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;t=s.precision,n=s.rounding,s.precision=t+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),r=(1/wn(4,e)).toString()):(e=16,r="2.3283064365386962890625e-10"),o=vr(s,1,o.times(r),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=t,s.rounding=n,!0)};m.hyperbolicSine=m.sinh=function(){var e,r,t,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(r=o.precision,t=o.rounding,o.precision=r+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=vr(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/wn(5,e)),i=vr(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=r,o.rounding=t,y(i,r,t,!0)};m.hyperbolicTangent=m.tanh=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+7,n.rounding=1,L(t.sinh(),t.cosh(),n.precision=e,n.rounding=r)):new n(t.s)};m.inverseCosine=m.acos=function(){var e=this,r=e.constructor,t=e.abs().cmp(1),n=r.precision,i=r.rounding;return t!==-1?t===0?e.isNeg()?xe(r,n,i):new r(0):new r(NaN):e.isZero()?xe(r,n+4,i).times(.5):(r.precision=n+6,r.rounding=1,e=new r(1).minus(e).div(e.plus(1)).sqrt().atan(),r.precision=n,r.rounding=i,e.times(2))};m.inverseHyperbolicCosine=m.acosh=function(){var e,r,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(e=n.precision,r=n.rounding,n.precision=e+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,w=!1,t=t.times(t).minus(1).sqrt().plus(t),w=!0,n.precision=e,n.rounding=r,t.ln()):new n(t)};m.inverseHyperbolicSine=m.asinh=function(){var e,r,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,w=!1,t=t.times(t).plus(1).sqrt().plus(t),w=!0,n.precision=e,n.rounding=r,t.ln())};m.inverseHyperbolicTangent=m.atanh=function(){var e,r,t,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,r=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?y(new o(i),e,r,!0):(o.precision=t=n-i.e,i=L(i.plus(1),new o(1).minus(i),t+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=r,i.times(.5))):new o(NaN)};m.inverseSine=m.asin=function(){var e,r,t,n,i=this,o=i.constructor;return i.isZero()?new o(i):(r=i.abs().cmp(1),t=o.precision,n=o.rounding,r!==-1?r===0?(e=xe(o,t+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=t+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=t,o.rounding=n,i.times(2)))};m.inverseTangent=m.atan=function(){var e,r,t,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<=Qi)return s=xe(c,p+4,d).times(.25),s.s=u.s,s}else{if(!u.s)return new c(NaN);if(p+4<=Qi)return s=xe(c,p+4,d).times(.5),s.s=u.s,s}for(c.precision=a=p+10,c.rounding=1,t=Math.min(28,a/E+2|0),e=t;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(w=!1,r=Math.ceil(a/E),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[r]!==void 0)for(e=r;s.d[e]===o.d[e]&&e--;);return t&&(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 r,t,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),r=!0;else{if(e=new c(e),t=e.d,e.s<0||!t||!t[0]||e.eq(1))return new c(NaN);r=e.eq(10)}if(t=u.d,u.s<0||!t||!t[0]||u.eq(1))return new c(t&&!t[0]?-1/0:u.s!=1?NaN:t?0:1/0);if(r)if(t.length>1)o=!0;else{for(i=t[0];i%10===0;)i/=10;o=i!==1}if(w=!1,a=p+f,s=Ke(u,a),n=r?yn(c,a+10):Ke(e,a),l=L(s,n,a,1),lt(l.d,i=p,d))do if(a+=10,s=Ke(u,a),n=r?yn(c,a+10):Ke(e,a),l=L(s,n,a,1),!o){+J(l.d).slice(i+1,i+15)+1==1e14&&(l=y(l,p+1,0));break}while(lt(l.d,i+=10,d));return w=!0,y(l,p,d)};m.minus=m.sub=function(e){var r,t,n,i,o,s,a,l,u,c,p,d,f=this,h=f.constructor;if(e=new h(e),!f.d||!e.d)return!f.s||!e.s?e=new h(NaN):f.d?e.s=-e.s:e=new h(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=h.precision,l=h.rounding,!u[0]||!d[0]){if(d[0])e.s=-e.s;else if(u[0])e=new h(f);else return new h(l===3?-0:0);return w?y(e,a,l):e}if(t=X(e.e/E),c=X(f.e/E),u=u.slice(),o=c-t,o){for(p=o<0,p?(r=u,o=-o,s=d.length):(r=d,t=c,s=u.length),n=Math.max(Math.ceil(a/E),s)+2,o>n&&(o=n,r.length=1),r.reverse(),n=o;n--;)r.push(0);r.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,t.length=1),t.reverse();i--;)t.push(0);t.reverse()}for(s=u.length,i=c.length,s-i<0&&(i=s,t=c,c=u,u=t),r=0;i;)r=(u[--i]=u[i]+c[i]+r)/fe|0,u[i]%=fe;for(r&&(u.unshift(r),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=En(u,n),w?y(e,a,l):e};m.precision=m.sd=function(e){var r,t=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(He+e);return t.d?(r=Js(t.d),e&&t.e+1>r&&(r=t.e+1)):r=NaN,r};m.round=function(){var e=this,r=e.constructor;return y(new r(e),e.e+1,r.rounding)};m.sine=m.sin=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+E,n.rounding=1,t=Ip(n,zs(n,t)),n.precision=e,n.rounding=r,y(Ne>2?t.neg():t,e,r,!0)):new n(NaN)};m.squareRoot=m.sqrt=function(){var e,r,t,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?(r=J(a),(r.length+l)%2==0&&(r+="0"),u=Math.sqrt(r),l=X((l+1)/2)-(l<0||l%2),u==1/0?r="5e"+l:(r=u.toExponential(),r=r.slice(0,r.indexOf("e")+1)+l),n=new c(r)):n=new c(u.toString()),t=(l=c.precision)+3;;)if(o=n,n=o.plus(L(s,o,t+2,1)).times(.5),J(o.d).slice(0,t)===(r=J(n.d)).slice(0,t))if(r=r.slice(t-3,t+1),r=="9999"||!i&&r=="4999"){if(!i&&(y(o,l+1,0),o.times(o).eq(s))){n=o;break}t+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(y(n,l+1,1),e=!n.times(n).eq(s));break}return w=!0,y(n,l,c.rounding,e)};m.tangent=m.tan=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+10,n.rounding=1,t=t.sin(),t.s=1,t=L(t,new n(1).minus(t.times(t)).sqrt(),e+10,0),n.precision=e,n.rounding=r,y(Ne==2||Ne==4?t.neg():t,e,r,!0)):new n(NaN)};m.times=m.mul=function(e){var r,t,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(t=X(c.e/E)+X(e.e/E),l=d.length,u=f.length,l=0;){for(r=0,i=l+n;i>n;)a=o[i]+f[n]*d[i-n-1]+r,o[i--]=a%fe|0,r=a/fe|0;o[i]=(o[i]+r)%fe|0}for(;!o[--s];)o.pop();return r?++t:o.shift(),e.d=o,e.e=En(o,t),w?y(e,p.precision,p.rounding):e};m.toBinary=function(e,r){return Ji(this,2,e,r)};m.toDecimalPlaces=m.toDP=function(e,r){var t=this,n=t.constructor;return t=new n(t),e===void 0?t:(ie(e,0,Ye),r===void 0?r=n.rounding:ie(r,0,8),y(t,e+t.e+1,r))};m.toExponential=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=Pe(n,!0):(ie(e,0,Ye),r===void 0?r=i.rounding:ie(r,0,8),n=y(new i(n),e+1,r),t=Pe(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+t:t};m.toFixed=function(e,r){var t,n,i=this,o=i.constructor;return e===void 0?t=Pe(i):(ie(e,0,Ye),r===void 0?r=o.rounding:ie(r,0,8),n=y(new o(i),e+i.e+1,r),t=Pe(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+t:t};m.toFraction=function(e){var r,t,n,i,o,s,a,l,u,c,p,d,f=this,h=f.d,g=f.constructor;if(!h)return new g(f);if(u=t=new g(1),n=l=new g(0),r=new g(n),o=r.e=Js(h)-f.e-1,s=o%E,r.d[0]=U(10,s<0?E+s:s),e==null)e=o>0?r:u;else{if(a=new g(e),!a.isInt()||a.lt(u))throw Error(He+a);e=a.gt(r)?o>0?r:u:a}for(w=!1,a=new g(J(h)),c=g.precision,g.precision=o=h.length*E*2;p=L(a,r,0,1,1),i=t.plus(p.times(n)),i.cmp(e)!=1;)t=n,n=i,i=u,u=l.plus(p.times(i)),l=i,i=r,r=a.minus(p.times(i)),a=i;return i=L(e.minus(t),n,0,1,1),l=l.plus(i.times(u)),t=t.plus(i.times(n)),l.s=u.s=f.s,d=L(u,n,o,1).minus(f).abs().cmp(L(l,t,o,1).minus(f).abs())<1?[u,n]:[l,t],g.precision=c,w=!0,d};m.toHexadecimal=m.toHex=function(e,r){return Ji(this,16,e,r)};m.toNearest=function(e,r){var t=this,n=t.constructor;if(t=new n(t),e==null){if(!t.d)return t;e=new n(1),r=n.rounding}else{if(e=new n(e),r===void 0?r=n.rounding:ie(r,0,8),!t.d)return e.s?t:e;if(!e.d)return e.s&&(e.s=t.s),e}return e.d[0]?(w=!1,t=L(t,e,0,r,1).times(e),w=!0,y(t)):(e.s=t.s,t=e),t};m.toNumber=function(){return+this};m.toOctal=function(e,r){return Ji(this,8,e,r)};m.toPower=m.pow=function(e){var r,t,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(U(+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(r=X(e.e/E),r>=e.d.length-1&&(t=u<0?-u:u)<=Sp)return i=Ks(l,a,t,n),e.s<0?new l(1).div(i):y(i,n,o);if(s=a.s,s<0){if(rl.maxE+1||r0?s/0:0):(w=!1,l.rounding=a.s=1,t=Math.min(12,(r+"").length),i=Wi(e.times(Ke(a,n+t)),n),i.d&&(i=y(i,n+5,1),lt(i.d,n,o)&&(r=n+10,i=y(Wi(e.times(Ke(a,r+t)),r),r+5,1),+J(i.d).slice(n+1,n+15)+1==1e14&&(i=y(i,n+1,0)))),i.s=s,w=!0,l.rounding=o,y(i,n,o))};m.toPrecision=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=Pe(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ie(e,1,Ye),r===void 0?r=i.rounding:ie(r,0,8),n=y(new i(n),e,r),t=Pe(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+t:t};m.toSignificantDigits=m.toSD=function(e,r){var t=this,n=t.constructor;return e===void 0?(e=n.precision,r=n.rounding):(ie(e,1,Ye),r===void 0?r=n.rounding:ie(r,0,8)),y(new n(t),e,r)};m.toString=function(){var e=this,r=e.constructor,t=Pe(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t};m.truncated=m.trunc=function(){return y(new this.constructor(this),this.e+1,1)};m.valueOf=m.toJSON=function(){var e=this,r=e.constructor,t=Pe(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()?"-"+t:t};function J(e){var r,t,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,r=1;rt)throw Error(He+e)}function lt(e,r,t,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--r;return--r<0?(r+=E,i=0):(i=Math.ceil((r+1)/E),r%=E),o=U(10,E-r),a=e[i]%o|0,n==null?r<3?(r==0?a=a/100|0:r==1&&(a=a/10|0),s=t<4&&a==99999||t>3&&a==49999||a==5e4||a==0):s=(t<4&&a+1==o||t>3&&a+1==o/2)&&(e[i+1]/o/100|0)==U(10,r-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:r<4?(r==0?a=a/1e3|0:r==1?a=a/100|0:r==2&&(a=a/10|0),s=(n||t<4)&&a==9999||!n&&t>3&&a==4999):s=((n||t<4)&&a+1==o||!n&&t>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==U(10,r-3)-1,s}function mn(e,r,t){for(var n,i=[0],o,s=0,a=e.length;st-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/t|0,i[n]%=t)}return i.reverse()}function Ap(e,r){var t,n,i;if(r.isZero())return r;n=r.d.length,n<32?(t=Math.ceil(n/3),i=(1/wn(4,t)).toString()):(t=16,i="2.3283064365386962890625e-10"),e.precision+=t,r=vr(e,1,r.times(i),new e(1));for(var o=t;o--;){var s=r.times(r);r=s.times(s).minus(s).times(8).plus(1)}return e.precision-=t,r}var L=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 r(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 t(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,h,g,D,T,S,b,O,me,ae,Jr,j,te,Ae,K,fr,qt=n.constructor,ti=n.s==i.s?1:-1,H=n.d,_=i.d;if(!H||!H[0]||!_||!_[0])return new qt(!n.s||!i.s||(H?_&&H[0]==_[0]:!_)?NaN:H&&H[0]==0||!_?ti*0:ti/0);for(l?(f=1,c=n.e-i.e):(l=fe,f=E,c=X(n.e/f)-X(i.e/f)),K=_.length,te=H.length,T=new qt(ti),S=T.d=[],p=0;_[p]==(H[p]||0);p++);if(_[p]>(H[p]||0)&&c--,o==null?(ae=o=qt.precision,s=qt.rounding):a?ae=o+(n.e-i.e)+1:ae=o,ae<0)S.push(1),h=!0;else{if(ae=ae/f+2|0,p=0,K==1){for(d=0,_=_[0],ae++;(p1&&(_=e(_,d,l),H=e(H,d,l),K=_.length,te=H.length),j=K,b=H.slice(0,K),O=b.length;O=l/2&&++Ae;do d=0,u=r(_,b,K,O),u<0?(me=b[0],K!=O&&(me=me*l+(b[1]||0)),d=me/Ae|0,d>1?(d>=l&&(d=l-1),g=e(_,d,l),D=g.length,O=b.length,u=r(g,b,D,O),u==1&&(d--,t(g,K=10;d/=10)p++;T.e=p+c*f-1,y(T,a?o+T.e+1:o,s,h)}return T}}();function y(e,r,t,n){var i,o,s,a,l,u,c,p,d,f=e.constructor;e:if(r!=null){if(p=e.d,!p)return e;for(i=1,a=p[0];a>=10;a/=10)i++;if(o=r-i,o<0)o+=E,s=r,c=p[d=0],l=c/U(10,i-s-1)%10|0;else if(d=Math.ceil((o+1)/E),a=p.length,d>=a)if(n){for(;a++<=d;)p.push(0);c=l=0,i=1,o%=E,s=o-E+1}else break e;else{for(c=a=p[d],i=1;a>=10;a/=10)i++;o%=E,s=o-E+i,l=s<0?0:c/U(10,i-s-1)%10|0}if(n=n||r<0||p[d+1]!==void 0||(s<0?c:c%U(10,i-s-1)),u=t<4?(l||n)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||n||t==6&&(o>0?s>0?c/U(10,i-s):0:p[d-1])%10&1||t==(e.s<0?8:7)),r<1||!p[0])return p.length=0,u?(r-=e.e+1,p[0]=U(10,(E-r%E)%E),e.e=-r||0):p[0]=e.e=0,e;if(o==0?(p.length=d,a=1,d--):(p.length=d+1,a=U(10,E-o),p[d]=s>0?(c/U(10,i-s)%U(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]==fe&&(p[0]=1));break}else{if(p[d]+=a,p[d]!=fe)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)+Je(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Je(-i-1)+o,t&&(n=t-s)>0&&(o+=Je(n))):i>=s?(o+=Je(i+1-s),t&&(n=t-i-1)>0&&(o=o+"."+Je(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Je(n))),o}function En(e,r){var t=e[0];for(r*=E;t>=10;t/=10)r++;return r}function yn(e,r,t){if(r>Rp)throw w=!0,t&&(e.precision=t),Error(Us);return y(new e(gn),r,1,!0)}function xe(e,r,t){if(r>Qi)throw Error(Us);return y(new e(hn),r,t,!0)}function Js(e){var r=e.length-1,t=r*E+1;if(r=e[r],r){for(;r%10==0;r/=10)t--;for(r=e[0];r>=10;r/=10)t++}return t}function Je(e){for(var r="";e--;)r+="0";return r}function Ks(e,r,t,n){var i,o=new e(1),s=Math.ceil(n/E+4);for(w=!1;;){if(t%2&&(o=o.times(r),Vs(o.d,s)&&(i=!0)),t=X(t/2),t===0){t=o.d.length-1,i&&o.d[t]===0&&++o.d[t];break}r=r.times(r),Vs(r.d,s)}return w=!0,o}function qs(e){return e.d[e.d.length-1]&1}function Hs(e,r,t){for(var n,i,o=new e(r[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(r==null?(w=!1,l=h):l=r,a=new d(.03125);e.e>-2;)e=e.times(a),p+=5;for(n=Math.log(U(2,p))/Math.LN10*2+5|0,l+=n,t=o=s=new d(1),d.precision=l;;){if(o=y(o.times(e),l,1),t=t.times(++c),a=s.plus(L(o,t,l,1)),J(a.d).slice(0,l)===J(s.d).slice(0,l)){for(i=p;i--;)s=y(s.times(s),l,1);if(r==null)if(u<3&<(s.d,l-n,f,u))d.precision=l+=10,t=o=a=new d(1),c=0,u++;else return y(s,d.precision=h,f,w=!0);else return d.precision=h,s}s=a}}function Ke(e,r){var t,n,i,o,s,a,l,u,c,p,d,f=1,h=10,g=e,D=g.d,T=g.constructor,S=T.rounding,b=T.precision;if(g.s<0||!D||!D[0]||!g.e&&D[0]==1&&D.length==1)return new T(D&&!D[0]?-1/0:g.s!=1?NaN:D?0:g);if(r==null?(w=!1,c=b):c=r,T.precision=c+=h,t=J(D),n=t.charAt(0),Math.abs(o=g.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)g=g.times(e),t=J(g.d),n=t.charAt(0),f++;o=g.e,n>1?(g=new T("0."+t),o++):g=new T(n+"."+t.slice(1))}else return u=yn(T,c+2,b).times(o+""),g=Ke(new T(n+"."+t.slice(1)),c-h).plus(u),T.precision=b,r==null?y(g,b,S,w=!0):g;for(p=g,l=s=g=L(g.minus(1),g.plus(1),c,1),d=y(g.times(g),c,1),i=3;;){if(s=y(s.times(d),c,1),u=l.plus(L(s,new T(i),c,1)),J(u.d).slice(0,c)===J(l.d).slice(0,c))if(l=l.times(2),o!==0&&(l=l.plus(yn(T,c+2,b).times(o+""))),l=L(l,new T(f),c,1),r==null)if(lt(l.d,c-h,S,a))T.precision=c+=h,u=s=g=L(p.minus(1),p.plus(1),c,1),d=y(g.times(g),c,1),i=a=1;else return y(l,T.precision=b,S,w=!0);else return T.precision=b,l;l=u,i+=2}}function Ys(e){return String(e.s*e.s/0)}function fn(e,r){var t,n,i;for((t=r.indexOf("."))>-1&&(r=r.replace(".","")),(n=r.search(/e/i))>0?(t<0&&(t=n),t+=+r.slice(n+1),r=r.substring(0,n)):t<0&&(t=r.length),n=0;r.charCodeAt(n)===48;n++);for(i=r.length;r.charCodeAt(i-1)===48;--i);if(r=r.slice(n,i),r){if(i-=n,e.e=t=t-n-1,e.d=[],n=(t+1)%E,t<0&&(n+=E),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(r=r.replace(/(\d)_(?=\d)/g,"$1"),Ws.test(r))return fn(e,r)}else if(r==="Infinity"||r==="NaN")return+r||(e.s=NaN),e.e=NaN,e.d=null,e;if(vp.test(r))t=16,r=r.toLowerCase();else if(Pp.test(r))t=2;else if(Tp.test(r))t=8;else throw Error(He+r);for(o=r.search(/p/i),o>0?(l=+r.slice(o+1),r=r.substring(2,o)):r=r.slice(2),o=r.indexOf("."),s=o>=0,n=e.constructor,s&&(r=r.replace(".",""),a=r.length,o=a-o,i=Ks(n,new n(t),o,o*2)),u=mn(r,t,fe),c=u.length-1,o=c;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=En(u,c),e.d=u,w=!1,s&&(e=L(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?U(2,l):Le.pow(2,l))),w=!0,e)}function Ip(e,r){var t,n=r.d.length;if(n<3)return r.isZero()?r:vr(e,2,r,r);t=1.4*Math.sqrt(n),t=t>16?16:t|0,r=r.times(1/wn(5,t)),r=vr(e,2,r,r);for(var i,o=new e(5),s=new e(16),a=new e(20);t--;)i=r.times(r),r=r.times(o.plus(i.times(s.times(i).minus(a))));return r}function vr(e,r,t,n,i){var o,s,a,l,u=1,c=e.precision,p=Math.ceil(c/E);for(w=!1,l=t.times(t),a=new e(n);;){if(s=L(a.times(l),new e(r++*r++),c,1),a=i?n.plus(s):n.minus(s),n=L(s.times(l),new e(r++*r++),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 wn(e,r){for(var t=e;--r;)t*=e;return t}function zs(e,r){var t,n=r.s<0,i=xe(e,e.precision,1),o=i.times(.5);if(r=r.abs(),r.lte(o))return Ne=n?4:1,r;if(t=r.divToInt(i),t.isZero())Ne=n?3:2;else{if(r=r.minus(t.times(i)),r.lte(o))return Ne=qs(t)?n?2:3:n?4:1,r;Ne=qs(t)?n?1:4:n?3:2}return r.minus(i).abs()}function Ji(e,r,t,n){var i,o,s,a,l,u,c,p,d,f=e.constructor,h=t!==void 0;if(h?(ie(t,1,Ye),n===void 0?n=f.rounding:ie(n,0,8)):(t=f.precision,n=f.rounding),!e.isFinite())c=Ys(e);else{for(c=Pe(e),s=c.indexOf("."),h?(i=2,r==16?t=t*4-3:r==8&&(t=t*3-2)):i=r,s>=0&&(c=c.replace(".",""),d=new f(1),d.e=c.length-s,d.d=mn(Pe(d),10,i),d.e=d.d.length),p=mn(c,10,i),o=l=p.length;p[--l]==0;)p.pop();if(!p[0])c=h?"0p+0":"0";else{if(s<0?o--:(e=new f(e),e.d=p,e.e=o,e=L(e,d,t,n,0,i),p=e.d,o=e.e,u=Bs),s=p[t],a=i/2,u=u||p[t+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[t-1]&1||n===(e.s<0?8:7)),p.length=t,u)for(;++p[--t]>i-1;)p[t]=0,t||(++o,p.unshift(1));for(l=p.length;!p[l-1];--l);for(s=0,c="";s1)if(r==16||r==8){for(s=r==16?4:3,--l;l%s;l++)c+="0";for(p=mn(c,i,r),l=p.length;!p[l-1];--l);for(s=1,c="1.";sl)for(o-=l;o--;)c+="0";else or)return e.length=r,!0}function Dp(e){return new this(e).abs()}function Op(e){return new this(e).acos()}function kp(e){return new this(e).acosh()}function _p(e,r){return new this(e).plus(r)}function Np(e){return new this(e).asin()}function Lp(e){return new this(e).asinh()}function Fp(e){return new this(e).atan()}function Mp(e){return new this(e).atanh()}function $p(e,r){e=new this(e),r=new this(r);var t,n=this.precision,i=this.rounding,o=n+4;return!e.s||!r.s?t=new this(NaN):!e.d&&!r.d?(t=xe(this,o,1).times(r.s>0?.25:.75),t.s=e.s):!r.d||e.isZero()?(t=r.s<0?xe(this,n,i):new this(0),t.s=e.s):!e.d||r.isZero()?(t=xe(this,o,1).times(.5),t.s=e.s):r.s<0?(this.precision=o,this.rounding=1,t=this.atan(L(e,r,o,1)),r=xe(this,o,1),this.precision=n,this.rounding=i,t=e.s<0?t.minus(r):t.plus(r)):t=this.atan(L(e,r,o,1)),t}function qp(e){return new this(e).cbrt()}function Vp(e){return y(e=new this(e),e.e+1,2)}function jp(e,r,t){return new this(e).clamp(r,t)}function Bp(e){if(!e||typeof e!="object")throw Error(bn+"Object expected");var r,t,n,i=e.defaults===!0,o=["precision",1,Ye,"rounding",0,8,"toExpNeg",-Pr,0,"toExpPos",0,Pr,"maxE",0,Pr,"minE",-Pr,0,"modulo",0,9];for(r=0;r=o[r+1]&&n<=o[r+2])this[t]=n;else throw Error(He+t+": "+n);if(t="crypto",i&&(this[t]=Gi[t]),(n=e[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(Gs);else this[t]=!1;else throw Error(He+t+": "+n);return this}function Up(e){return new this(e).cos()}function Gp(e){return new this(e).cosh()}function Zs(e){var r,t,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,js(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?r[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(r=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(r,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(Gs);else for(;o=10;i/=10)n++;nSr,datamodelEnumToSchemaEnum:()=>gd});function gd(e){return{name:e.name,values:e.values.map(r=>r.name)}}var Sr=(b=>(b.findUnique="findUnique",b.findUniqueOrThrow="findUniqueOrThrow",b.findFirst="findFirst",b.findFirstOrThrow="findFirstOrThrow",b.findMany="findMany",b.create="create",b.createMany="createMany",b.createManyAndReturn="createManyAndReturn",b.update="update",b.updateMany="updateMany",b.updateManyAndReturn="updateManyAndReturn",b.upsert="upsert",b.delete="delete",b.deleteMany="deleteMany",b.groupBy="groupBy",b.count="count",b.aggregate="aggregate",b.findRaw="findRaw",b.aggregateRaw="aggregateRaw",b))(Sr||{});var na=A(Di());var ta=A(require("node:fs"));var Xs={keyword:De,entity:De,value:e=>W(nr(e)),punctuation:nr,directive:De,function:De,variable:e=>W(nr(e)),string:e=>W(qe(e)),boolean:Ie,number:De,comment:Kr};var hd=e=>e,xn={},yd=0,P={manual:xn.Prism&&xn.Prism.manual,disableWorkerMessageHandler:xn.Prism&&xn.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof ge){let r=e;return new ge(r.type,P.util.encode(r.content),r.alias)}else return Array.isArray(e)?e.map(P.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ae instanceof ge)continue;if(me&&j!=r.length-1){S.lastIndex=te;var p=S.exec(e);if(!p)break;var c=p.index+(O?p[1].length:0),d=p.index+p[0].length,a=j,l=te;for(let _=r.length;a<_&&(l=l&&(++j,te=l);if(r[j]instanceof ge)continue;u=a-j,Ae=e.slice(te,l),p.index-=te}else{S.lastIndex=0;var p=S.exec(Ae),u=1}if(!p){if(o)break;continue}O&&(ae=p[1]?p[1].length:0);var c=p.index+ae,p=p[0].slice(ae),d=c+p.length,f=Ae.slice(0,c),h=Ae.slice(d);let K=[j,u];f&&(++j,te+=f.length,K.push(f));let fr=new ge(g,b?P.tokenize(p,b):p,Jr,p,me);if(K.push(fr),h&&K.push(h),Array.prototype.splice.apply(r,K),u!=1&&P.matchGrammar(e,r,t,j,te,!0,g),o)break}}}},tokenize:function(e,r){let t=[e],n=r.rest;if(n){for(let i in n)r[i]=n[i];delete r.rest}return P.matchGrammar(e,t,r,0,0,!1),t},hooks:{all:{},add:function(e,r){let t=P.hooks.all;t[e]=t[e]||[],t[e].push(r)},run:function(e,r){let t=P.hooks.all[e];if(!(!t||!t.length))for(var n=0,i;i=t[n++];)i(r)}},Token:ge};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 ge(e,r,t,n,i){this.type=e,this.content=r,this.alias=t,this.length=(n||"").length|0,this.greedy=!!i}ge.stringify=function(e,r){return typeof e=="string"?e:Array.isArray(e)?e.map(function(t){return ge.stringify(t,r)}).join(""):bd(e.type)(e.content)};function bd(e){return Xs[e]||hd}function ea(e){return Ed(e,P.languages.javascript)}function Ed(e,r){return P.tokenize(e,r).map(n=>ge.stringify(n)).join("")}function ra(e){return Ci(e)}var Pn=class e{firstLineNumber;lines;static read(r){let t;try{t=ta.default.readFileSync(r,"utf-8")}catch{return null}return e.fromContent(t)}static fromContent(r){let t=r.split(/\r?\n/);return new e(1,t)}constructor(r,t){this.firstLineNumber=r,this.lines=t}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(r,t){if(rthis.lines.length+this.firstLineNumber)return this;let n=r-this.firstLineNumber,i=[...this.lines];return i[n]=t(i[n]),new e(this.firstLineNumber,i)}mapLines(r){return new e(this.firstLineNumber,this.lines.map((t,n)=>r(t,this.firstLineNumber+n)))}lineAt(r){return this.lines[r-this.firstLineNumber]}prependSymbolAt(r,t){return this.mapLines((n,i)=>i===r?`${t} ${n}`:` ${n}`)}slice(r,t){let n=this.lines.slice(r-1,t).join(` + `;console.warn(`${Ie("warn(prisma)")} ${u}`)}}}}function _s(e){if(xp(e)){$i(`Environment variables loaded from ${e}`);let r=qi.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:ks(r),message:Ce(`Environment variables loaded from ${wr.default.relative(process.cwd(),e)}`),path:e}}else $i(`Environment variables not found at ${e}`);return null}function Ns(e,r){return e&&r&&wr.default.resolve(e)===wr.default.resolve(r)}function xp(e){return!!(e&&ln.default.existsSync(e))}function Vi(e,r){return Object.prototype.hasOwnProperty.call(e,r)}function cn(e,r){let t={};for(let n of Object.keys(e))t[n]=r(e[n],n);return t}function ji(e,r){if(e.length===0)return;let t=e[0];for(let n=1;n{Fs.has(e)||(Fs.add(e),_i(r,...t))};var P=class e extends Error{clientVersion;errorCode;retryable;constructor(r,t,n){super(r),this.name="PrismaClientInitializationError",this.clientVersion=t,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};x(P,"PrismaClientInitializationError");var z=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(r,{code:t,clientVersion:n,meta:i,batchRequestIdx:o}){super(r),this.name="PrismaClientKnownRequestError",this.code=t,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};x(z,"PrismaClientKnownRequestError");var le=class extends Error{clientVersion;constructor(r,t){super(r),this.name="PrismaClientRustPanicError",this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};x(le,"PrismaClientRustPanicError");var V=class extends Error{clientVersion;batchRequestIdx;constructor(r,{clientVersion:t,batchRequestIdx:n}){super(r),this.name="PrismaClientUnknownRequestError",this.clientVersion=t,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};x(V,"PrismaClientUnknownRequestError");var Z=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(r,{clientVersion:t}){super(r),this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};x(Z,"PrismaClientValidationError");var we=class{_map=new Map;get(r){return this._map.get(r)?.value}set(r,t){this._map.set(r,{value:t})}getOrCreate(r,t){let n=this._map.get(r);if(n)return n.value;let i=t();return this.set(r,i),i}};function We(e){return e.substring(0,1).toLowerCase()+e.substring(1)}function Ms(e,r){let t={};for(let n of e){let i=n[r];t[i]=n}return t}function at(e){let r;return{get(){return r||(r={value:e()}),r.value}}}function $s(e){return{models:Bi(e.models),enums:Bi(e.enums),types:Bi(e.types)}}function Bi(e){let r={};for(let{name:t,...n}of e)r[t]=n;return r}function xr(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function dn(e){return e.toString()!=="Invalid Date"}var vr=9e15,Ye=1e9,Ui="0123456789abcdef",gn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",hn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Gi={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-vr,maxE:vr,crypto:!1},Bs,Ne,w=!0,bn="[DecimalError] ",He=bn+"Invalid argument: ",Us=bn+"Precision limit exceeded",Gs=bn+"crypto unavailable",Qs="[object Decimal]",X=Math.floor,U=Math.pow,vp=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Pp=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Tp=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ws=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fe=1e7,E=7,Sp=9007199254740991,Rp=gn.length-1,Qi=hn.length-1,m={toStringTag:Qs};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,r){var t,n=this,i=n.constructor;if(e=new i(e),r=new i(r),!e.s||!r.s)return new i(NaN);if(e.gt(r))throw Error(He+r);return t=n.cmp(e),t<0?e:n.cmp(r)>0?r:new i(n)};m.comparedTo=m.cmp=function(e){var r,t,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,r=0,t=na[r]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};m.cosine=m.cos=function(){var e,r,t=this,n=t.constructor;return t.d?t.d[0]?(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+E,n.rounding=1,t=Ap(n,zs(n,t)),n.precision=e,n.rounding=r,y(Ne==2||Ne==3?t.neg():t,e,r,!0)):new n(1):new n(NaN)};m.cubeRoot=m.cbrt=function(){var e,r,t,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*U(c.s*c,1/3),!o||Math.abs(o)==1/0?(t=J(c.d),e=c.e,(o=(e-t.length+1)%3)&&(t+=o==1||o==-2?"0":"00"),o=U(t,1/3),e=X((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new p(t),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=L(u.plus(c).times(a),u.plus(l),s+2,1),J(a.d).slice(0,s)===(t=J(n.d)).slice(0,s))if(t=t.slice(s-3,s+1),t=="9999"||!i&&t=="4999"){if(!i&&(y(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}s+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(y(n,e+1,1),r=!n.times(n).times(n).eq(c));break}return w=!0,y(n,e,p.rounding,r)};m.decimalPlaces=m.dp=function(){var e,r=this.d,t=NaN;if(r){if(e=r.length-1,t=(e-X(this.e/E))*E,e=r[e],e)for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t};m.dividedBy=m.div=function(e){return L(this,new this.constructor(e))};m.dividedToIntegerBy=m.divToInt=function(e){var r=this,t=r.constructor;return y(L(r,new t(e),0,1,1),t.precision,t.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 r=this.cmp(e);return r==1||r===0};m.hyperbolicCosine=m.cosh=function(){var e,r,t,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;t=s.precision,n=s.rounding,s.precision=t+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),r=(1/wn(4,e)).toString()):(e=16,r="2.3283064365386962890625e-10"),o=Pr(s,1,o.times(r),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=t,s.rounding=n,!0)};m.hyperbolicSine=m.sinh=function(){var e,r,t,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(r=o.precision,t=o.rounding,o.precision=r+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=Pr(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/wn(5,e)),i=Pr(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=r,o.rounding=t,y(i,r,t,!0)};m.hyperbolicTangent=m.tanh=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+7,n.rounding=1,L(t.sinh(),t.cosh(),n.precision=e,n.rounding=r)):new n(t.s)};m.inverseCosine=m.acos=function(){var e=this,r=e.constructor,t=e.abs().cmp(1),n=r.precision,i=r.rounding;return t!==-1?t===0?e.isNeg()?xe(r,n,i):new r(0):new r(NaN):e.isZero()?xe(r,n+4,i).times(.5):(r.precision=n+6,r.rounding=1,e=new r(1).minus(e).div(e.plus(1)).sqrt().atan(),r.precision=n,r.rounding=i,e.times(2))};m.inverseHyperbolicCosine=m.acosh=function(){var e,r,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(e=n.precision,r=n.rounding,n.precision=e+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,w=!1,t=t.times(t).minus(1).sqrt().plus(t),w=!0,n.precision=e,n.rounding=r,t.ln()):new n(t)};m.inverseHyperbolicSine=m.asinh=function(){var e,r,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,w=!1,t=t.times(t).plus(1).sqrt().plus(t),w=!0,n.precision=e,n.rounding=r,t.ln())};m.inverseHyperbolicTangent=m.atanh=function(){var e,r,t,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,r=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?y(new o(i),e,r,!0):(o.precision=t=n-i.e,i=L(i.plus(1),new o(1).minus(i),t+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=r,i.times(.5))):new o(NaN)};m.inverseSine=m.asin=function(){var e,r,t,n,i=this,o=i.constructor;return i.isZero()?new o(i):(r=i.abs().cmp(1),t=o.precision,n=o.rounding,r!==-1?r===0?(e=xe(o,t+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=t+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=t,o.rounding=n,i.times(2)))};m.inverseTangent=m.atan=function(){var e,r,t,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<=Qi)return s=xe(c,p+4,d).times(.25),s.s=u.s,s}else{if(!u.s)return new c(NaN);if(p+4<=Qi)return s=xe(c,p+4,d).times(.5),s.s=u.s,s}for(c.precision=a=p+10,c.rounding=1,t=Math.min(28,a/E+2|0),e=t;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(w=!1,r=Math.ceil(a/E),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[r]!==void 0)for(e=r;s.d[e]===o.d[e]&&e--;);return t&&(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 r,t,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),r=!0;else{if(e=new c(e),t=e.d,e.s<0||!t||!t[0]||e.eq(1))return new c(NaN);r=e.eq(10)}if(t=u.d,u.s<0||!t||!t[0]||u.eq(1))return new c(t&&!t[0]?-1/0:u.s!=1?NaN:t?0:1/0);if(r)if(t.length>1)o=!0;else{for(i=t[0];i%10===0;)i/=10;o=i!==1}if(w=!1,a=p+f,s=Ke(u,a),n=r?yn(c,a+10):Ke(e,a),l=L(s,n,a,1),lt(l.d,i=p,d))do if(a+=10,s=Ke(u,a),n=r?yn(c,a+10):Ke(e,a),l=L(s,n,a,1),!o){+J(l.d).slice(i+1,i+15)+1==1e14&&(l=y(l,p+1,0));break}while(lt(l.d,i+=10,d));return w=!0,y(l,p,d)};m.minus=m.sub=function(e){var r,t,n,i,o,s,a,l,u,c,p,d,f=this,h=f.constructor;if(e=new h(e),!f.d||!e.d)return!f.s||!e.s?e=new h(NaN):f.d?e.s=-e.s:e=new h(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=h.precision,l=h.rounding,!u[0]||!d[0]){if(d[0])e.s=-e.s;else if(u[0])e=new h(f);else return new h(l===3?-0:0);return w?y(e,a,l):e}if(t=X(e.e/E),c=X(f.e/E),u=u.slice(),o=c-t,o){for(p=o<0,p?(r=u,o=-o,s=d.length):(r=d,t=c,s=u.length),n=Math.max(Math.ceil(a/E),s)+2,o>n&&(o=n,r.length=1),r.reverse(),n=o;n--;)r.push(0);r.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,t.length=1),t.reverse();i--;)t.push(0);t.reverse()}for(s=u.length,i=c.length,s-i<0&&(i=s,t=c,c=u,u=t),r=0;i;)r=(u[--i]=u[i]+c[i]+r)/fe|0,u[i]%=fe;for(r&&(u.unshift(r),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=En(u,n),w?y(e,a,l):e};m.precision=m.sd=function(e){var r,t=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(He+e);return t.d?(r=Js(t.d),e&&t.e+1>r&&(r=t.e+1)):r=NaN,r};m.round=function(){var e=this,r=e.constructor;return y(new r(e),e.e+1,r.rounding)};m.sine=m.sin=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+E,n.rounding=1,t=Ip(n,zs(n,t)),n.precision=e,n.rounding=r,y(Ne>2?t.neg():t,e,r,!0)):new n(NaN)};m.squareRoot=m.sqrt=function(){var e,r,t,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?(r=J(a),(r.length+l)%2==0&&(r+="0"),u=Math.sqrt(r),l=X((l+1)/2)-(l<0||l%2),u==1/0?r="5e"+l:(r=u.toExponential(),r=r.slice(0,r.indexOf("e")+1)+l),n=new c(r)):n=new c(u.toString()),t=(l=c.precision)+3;;)if(o=n,n=o.plus(L(s,o,t+2,1)).times(.5),J(o.d).slice(0,t)===(r=J(n.d)).slice(0,t))if(r=r.slice(t-3,t+1),r=="9999"||!i&&r=="4999"){if(!i&&(y(o,l+1,0),o.times(o).eq(s))){n=o;break}t+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(y(n,l+1,1),e=!n.times(n).eq(s));break}return w=!0,y(n,l,c.rounding,e)};m.tangent=m.tan=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+10,n.rounding=1,t=t.sin(),t.s=1,t=L(t,new n(1).minus(t.times(t)).sqrt(),e+10,0),n.precision=e,n.rounding=r,y(Ne==2||Ne==4?t.neg():t,e,r,!0)):new n(NaN)};m.times=m.mul=function(e){var r,t,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(t=X(c.e/E)+X(e.e/E),l=d.length,u=f.length,l=0;){for(r=0,i=l+n;i>n;)a=o[i]+f[n]*d[i-n-1]+r,o[i--]=a%fe|0,r=a/fe|0;o[i]=(o[i]+r)%fe|0}for(;!o[--s];)o.pop();return r?++t:o.shift(),e.d=o,e.e=En(o,t),w?y(e,p.precision,p.rounding):e};m.toBinary=function(e,r){return Ji(this,2,e,r)};m.toDecimalPlaces=m.toDP=function(e,r){var t=this,n=t.constructor;return t=new n(t),e===void 0?t:(ie(e,0,Ye),r===void 0?r=n.rounding:ie(r,0,8),y(t,e+t.e+1,r))};m.toExponential=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=ve(n,!0):(ie(e,0,Ye),r===void 0?r=i.rounding:ie(r,0,8),n=y(new i(n),e+1,r),t=ve(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+t:t};m.toFixed=function(e,r){var t,n,i=this,o=i.constructor;return e===void 0?t=ve(i):(ie(e,0,Ye),r===void 0?r=o.rounding:ie(r,0,8),n=y(new o(i),e+i.e+1,r),t=ve(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+t:t};m.toFraction=function(e){var r,t,n,i,o,s,a,l,u,c,p,d,f=this,h=f.d,g=f.constructor;if(!h)return new g(f);if(u=t=new g(1),n=l=new g(0),r=new g(n),o=r.e=Js(h)-f.e-1,s=o%E,r.d[0]=U(10,s<0?E+s:s),e==null)e=o>0?r:u;else{if(a=new g(e),!a.isInt()||a.lt(u))throw Error(He+a);e=a.gt(r)?o>0?r:u:a}for(w=!1,a=new g(J(h)),c=g.precision,g.precision=o=h.length*E*2;p=L(a,r,0,1,1),i=t.plus(p.times(n)),i.cmp(e)!=1;)t=n,n=i,i=u,u=l.plus(p.times(i)),l=i,i=r,r=a.minus(p.times(i)),a=i;return i=L(e.minus(t),n,0,1,1),l=l.plus(i.times(u)),t=t.plus(i.times(n)),l.s=u.s=f.s,d=L(u,n,o,1).minus(f).abs().cmp(L(l,t,o,1).minus(f).abs())<1?[u,n]:[l,t],g.precision=c,w=!0,d};m.toHexadecimal=m.toHex=function(e,r){return Ji(this,16,e,r)};m.toNearest=function(e,r){var t=this,n=t.constructor;if(t=new n(t),e==null){if(!t.d)return t;e=new n(1),r=n.rounding}else{if(e=new n(e),r===void 0?r=n.rounding:ie(r,0,8),!t.d)return e.s?t:e;if(!e.d)return e.s&&(e.s=t.s),e}return e.d[0]?(w=!1,t=L(t,e,0,r,1).times(e),w=!0,y(t)):(e.s=t.s,t=e),t};m.toNumber=function(){return+this};m.toOctal=function(e,r){return Ji(this,8,e,r)};m.toPower=m.pow=function(e){var r,t,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(U(+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(r=X(e.e/E),r>=e.d.length-1&&(t=u<0?-u:u)<=Sp)return i=Ks(l,a,t,n),e.s<0?new l(1).div(i):y(i,n,o);if(s=a.s,s<0){if(rl.maxE+1||r0?s/0:0):(w=!1,l.rounding=a.s=1,t=Math.min(12,(r+"").length),i=Wi(e.times(Ke(a,n+t)),n),i.d&&(i=y(i,n+5,1),lt(i.d,n,o)&&(r=n+10,i=y(Wi(e.times(Ke(a,r+t)),r),r+5,1),+J(i.d).slice(n+1,n+15)+1==1e14&&(i=y(i,n+1,0)))),i.s=s,w=!0,l.rounding=o,y(i,n,o))};m.toPrecision=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=ve(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ie(e,1,Ye),r===void 0?r=i.rounding:ie(r,0,8),n=y(new i(n),e,r),t=ve(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+t:t};m.toSignificantDigits=m.toSD=function(e,r){var t=this,n=t.constructor;return e===void 0?(e=n.precision,r=n.rounding):(ie(e,1,Ye),r===void 0?r=n.rounding:ie(r,0,8)),y(new n(t),e,r)};m.toString=function(){var e=this,r=e.constructor,t=ve(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t};m.truncated=m.trunc=function(){return y(new this.constructor(this),this.e+1,1)};m.valueOf=m.toJSON=function(){var e=this,r=e.constructor,t=ve(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()?"-"+t:t};function J(e){var r,t,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,r=1;rt)throw Error(He+e)}function lt(e,r,t,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--r;return--r<0?(r+=E,i=0):(i=Math.ceil((r+1)/E),r%=E),o=U(10,E-r),a=e[i]%o|0,n==null?r<3?(r==0?a=a/100|0:r==1&&(a=a/10|0),s=t<4&&a==99999||t>3&&a==49999||a==5e4||a==0):s=(t<4&&a+1==o||t>3&&a+1==o/2)&&(e[i+1]/o/100|0)==U(10,r-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:r<4?(r==0?a=a/1e3|0:r==1?a=a/100|0:r==2&&(a=a/10|0),s=(n||t<4)&&a==9999||!n&&t>3&&a==4999):s=((n||t<4)&&a+1==o||!n&&t>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==U(10,r-3)-1,s}function mn(e,r,t){for(var n,i=[0],o,s=0,a=e.length;st-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/t|0,i[n]%=t)}return i.reverse()}function Ap(e,r){var t,n,i;if(r.isZero())return r;n=r.d.length,n<32?(t=Math.ceil(n/3),i=(1/wn(4,t)).toString()):(t=16,i="2.3283064365386962890625e-10"),e.precision+=t,r=Pr(e,1,r.times(i),new e(1));for(var o=t;o--;){var s=r.times(r);r=s.times(s).minus(s).times(8).plus(1)}return e.precision-=t,r}var L=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 r(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 t(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,h,g,D,T,S,b,O,me,ae,Jr,j,te,Ae,K,fr,qt=n.constructor,ti=n.s==i.s?1:-1,H=n.d,_=i.d;if(!H||!H[0]||!_||!_[0])return new qt(!n.s||!i.s||(H?_&&H[0]==_[0]:!_)?NaN:H&&H[0]==0||!_?ti*0:ti/0);for(l?(f=1,c=n.e-i.e):(l=fe,f=E,c=X(n.e/f)-X(i.e/f)),K=_.length,te=H.length,T=new qt(ti),S=T.d=[],p=0;_[p]==(H[p]||0);p++);if(_[p]>(H[p]||0)&&c--,o==null?(ae=o=qt.precision,s=qt.rounding):a?ae=o+(n.e-i.e)+1:ae=o,ae<0)S.push(1),h=!0;else{if(ae=ae/f+2|0,p=0,K==1){for(d=0,_=_[0],ae++;(p1&&(_=e(_,d,l),H=e(H,d,l),K=_.length,te=H.length),j=K,b=H.slice(0,K),O=b.length;O=l/2&&++Ae;do d=0,u=r(_,b,K,O),u<0?(me=b[0],K!=O&&(me=me*l+(b[1]||0)),d=me/Ae|0,d>1?(d>=l&&(d=l-1),g=e(_,d,l),D=g.length,O=b.length,u=r(g,b,D,O),u==1&&(d--,t(g,K=10;d/=10)p++;T.e=p+c*f-1,y(T,a?o+T.e+1:o,s,h)}return T}}();function y(e,r,t,n){var i,o,s,a,l,u,c,p,d,f=e.constructor;e:if(r!=null){if(p=e.d,!p)return e;for(i=1,a=p[0];a>=10;a/=10)i++;if(o=r-i,o<0)o+=E,s=r,c=p[d=0],l=c/U(10,i-s-1)%10|0;else if(d=Math.ceil((o+1)/E),a=p.length,d>=a)if(n){for(;a++<=d;)p.push(0);c=l=0,i=1,o%=E,s=o-E+1}else break e;else{for(c=a=p[d],i=1;a>=10;a/=10)i++;o%=E,s=o-E+i,l=s<0?0:c/U(10,i-s-1)%10|0}if(n=n||r<0||p[d+1]!==void 0||(s<0?c:c%U(10,i-s-1)),u=t<4?(l||n)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||n||t==6&&(o>0?s>0?c/U(10,i-s):0:p[d-1])%10&1||t==(e.s<0?8:7)),r<1||!p[0])return p.length=0,u?(r-=e.e+1,p[0]=U(10,(E-r%E)%E),e.e=-r||0):p[0]=e.e=0,e;if(o==0?(p.length=d,a=1,d--):(p.length=d+1,a=U(10,E-o),p[d]=s>0?(c/U(10,i-s)%U(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]==fe&&(p[0]=1));break}else{if(p[d]+=a,p[d]!=fe)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)+Je(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Je(-i-1)+o,t&&(n=t-s)>0&&(o+=Je(n))):i>=s?(o+=Je(i+1-s),t&&(n=t-i-1)>0&&(o=o+"."+Je(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Je(n))),o}function En(e,r){var t=e[0];for(r*=E;t>=10;t/=10)r++;return r}function yn(e,r,t){if(r>Rp)throw w=!0,t&&(e.precision=t),Error(Us);return y(new e(gn),r,1,!0)}function xe(e,r,t){if(r>Qi)throw Error(Us);return y(new e(hn),r,t,!0)}function Js(e){var r=e.length-1,t=r*E+1;if(r=e[r],r){for(;r%10==0;r/=10)t--;for(r=e[0];r>=10;r/=10)t++}return t}function Je(e){for(var r="";e--;)r+="0";return r}function Ks(e,r,t,n){var i,o=new e(1),s=Math.ceil(n/E+4);for(w=!1;;){if(t%2&&(o=o.times(r),Vs(o.d,s)&&(i=!0)),t=X(t/2),t===0){t=o.d.length-1,i&&o.d[t]===0&&++o.d[t];break}r=r.times(r),Vs(r.d,s)}return w=!0,o}function qs(e){return e.d[e.d.length-1]&1}function Hs(e,r,t){for(var n,i,o=new e(r[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(r==null?(w=!1,l=h):l=r,a=new d(.03125);e.e>-2;)e=e.times(a),p+=5;for(n=Math.log(U(2,p))/Math.LN10*2+5|0,l+=n,t=o=s=new d(1),d.precision=l;;){if(o=y(o.times(e),l,1),t=t.times(++c),a=s.plus(L(o,t,l,1)),J(a.d).slice(0,l)===J(s.d).slice(0,l)){for(i=p;i--;)s=y(s.times(s),l,1);if(r==null)if(u<3&<(s.d,l-n,f,u))d.precision=l+=10,t=o=a=new d(1),c=0,u++;else return y(s,d.precision=h,f,w=!0);else return d.precision=h,s}s=a}}function Ke(e,r){var t,n,i,o,s,a,l,u,c,p,d,f=1,h=10,g=e,D=g.d,T=g.constructor,S=T.rounding,b=T.precision;if(g.s<0||!D||!D[0]||!g.e&&D[0]==1&&D.length==1)return new T(D&&!D[0]?-1/0:g.s!=1?NaN:D?0:g);if(r==null?(w=!1,c=b):c=r,T.precision=c+=h,t=J(D),n=t.charAt(0),Math.abs(o=g.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)g=g.times(e),t=J(g.d),n=t.charAt(0),f++;o=g.e,n>1?(g=new T("0."+t),o++):g=new T(n+"."+t.slice(1))}else return u=yn(T,c+2,b).times(o+""),g=Ke(new T(n+"."+t.slice(1)),c-h).plus(u),T.precision=b,r==null?y(g,b,S,w=!0):g;for(p=g,l=s=g=L(g.minus(1),g.plus(1),c,1),d=y(g.times(g),c,1),i=3;;){if(s=y(s.times(d),c,1),u=l.plus(L(s,new T(i),c,1)),J(u.d).slice(0,c)===J(l.d).slice(0,c))if(l=l.times(2),o!==0&&(l=l.plus(yn(T,c+2,b).times(o+""))),l=L(l,new T(f),c,1),r==null)if(lt(l.d,c-h,S,a))T.precision=c+=h,u=s=g=L(p.minus(1),p.plus(1),c,1),d=y(g.times(g),c,1),i=a=1;else return y(l,T.precision=b,S,w=!0);else return T.precision=b,l;l=u,i+=2}}function Ys(e){return String(e.s*e.s/0)}function fn(e,r){var t,n,i;for((t=r.indexOf("."))>-1&&(r=r.replace(".","")),(n=r.search(/e/i))>0?(t<0&&(t=n),t+=+r.slice(n+1),r=r.substring(0,n)):t<0&&(t=r.length),n=0;r.charCodeAt(n)===48;n++);for(i=r.length;r.charCodeAt(i-1)===48;--i);if(r=r.slice(n,i),r){if(i-=n,e.e=t=t-n-1,e.d=[],n=(t+1)%E,t<0&&(n+=E),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(r=r.replace(/(\d)_(?=\d)/g,"$1"),Ws.test(r))return fn(e,r)}else if(r==="Infinity"||r==="NaN")return+r||(e.s=NaN),e.e=NaN,e.d=null,e;if(Pp.test(r))t=16,r=r.toLowerCase();else if(vp.test(r))t=2;else if(Tp.test(r))t=8;else throw Error(He+r);for(o=r.search(/p/i),o>0?(l=+r.slice(o+1),r=r.substring(2,o)):r=r.slice(2),o=r.indexOf("."),s=o>=0,n=e.constructor,s&&(r=r.replace(".",""),a=r.length,o=a-o,i=Ks(n,new n(t),o,o*2)),u=mn(r,t,fe),c=u.length-1,o=c;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=En(u,c),e.d=u,w=!1,s&&(e=L(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?U(2,l):Le.pow(2,l))),w=!0,e)}function Ip(e,r){var t,n=r.d.length;if(n<3)return r.isZero()?r:Pr(e,2,r,r);t=1.4*Math.sqrt(n),t=t>16?16:t|0,r=r.times(1/wn(5,t)),r=Pr(e,2,r,r);for(var i,o=new e(5),s=new e(16),a=new e(20);t--;)i=r.times(r),r=r.times(o.plus(i.times(s.times(i).minus(a))));return r}function Pr(e,r,t,n,i){var o,s,a,l,u=1,c=e.precision,p=Math.ceil(c/E);for(w=!1,l=t.times(t),a=new e(n);;){if(s=L(a.times(l),new e(r++*r++),c,1),a=i?n.plus(s):n.minus(s),n=L(s.times(l),new e(r++*r++),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 wn(e,r){for(var t=e;--r;)t*=e;return t}function zs(e,r){var t,n=r.s<0,i=xe(e,e.precision,1),o=i.times(.5);if(r=r.abs(),r.lte(o))return Ne=n?4:1,r;if(t=r.divToInt(i),t.isZero())Ne=n?3:2;else{if(r=r.minus(t.times(i)),r.lte(o))return Ne=qs(t)?n?2:3:n?4:1,r;Ne=qs(t)?n?1:4:n?3:2}return r.minus(i).abs()}function Ji(e,r,t,n){var i,o,s,a,l,u,c,p,d,f=e.constructor,h=t!==void 0;if(h?(ie(t,1,Ye),n===void 0?n=f.rounding:ie(n,0,8)):(t=f.precision,n=f.rounding),!e.isFinite())c=Ys(e);else{for(c=ve(e),s=c.indexOf("."),h?(i=2,r==16?t=t*4-3:r==8&&(t=t*3-2)):i=r,s>=0&&(c=c.replace(".",""),d=new f(1),d.e=c.length-s,d.d=mn(ve(d),10,i),d.e=d.d.length),p=mn(c,10,i),o=l=p.length;p[--l]==0;)p.pop();if(!p[0])c=h?"0p+0":"0";else{if(s<0?o--:(e=new f(e),e.d=p,e.e=o,e=L(e,d,t,n,0,i),p=e.d,o=e.e,u=Bs),s=p[t],a=i/2,u=u||p[t+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[t-1]&1||n===(e.s<0?8:7)),p.length=t,u)for(;++p[--t]>i-1;)p[t]=0,t||(++o,p.unshift(1));for(l=p.length;!p[l-1];--l);for(s=0,c="";s1)if(r==16||r==8){for(s=r==16?4:3,--l;l%s;l++)c+="0";for(p=mn(c,i,r),l=p.length;!p[l-1];--l);for(s=1,c="1.";sl)for(o-=l;o--;)c+="0";else or)return e.length=r,!0}function Dp(e){return new this(e).abs()}function Op(e){return new this(e).acos()}function kp(e){return new this(e).acosh()}function _p(e,r){return new this(e).plus(r)}function Np(e){return new this(e).asin()}function Lp(e){return new this(e).asinh()}function Fp(e){return new this(e).atan()}function Mp(e){return new this(e).atanh()}function $p(e,r){e=new this(e),r=new this(r);var t,n=this.precision,i=this.rounding,o=n+4;return!e.s||!r.s?t=new this(NaN):!e.d&&!r.d?(t=xe(this,o,1).times(r.s>0?.25:.75),t.s=e.s):!r.d||e.isZero()?(t=r.s<0?xe(this,n,i):new this(0),t.s=e.s):!e.d||r.isZero()?(t=xe(this,o,1).times(.5),t.s=e.s):r.s<0?(this.precision=o,this.rounding=1,t=this.atan(L(e,r,o,1)),r=xe(this,o,1),this.precision=n,this.rounding=i,t=e.s<0?t.minus(r):t.plus(r)):t=this.atan(L(e,r,o,1)),t}function qp(e){return new this(e).cbrt()}function Vp(e){return y(e=new this(e),e.e+1,2)}function jp(e,r,t){return new this(e).clamp(r,t)}function Bp(e){if(!e||typeof e!="object")throw Error(bn+"Object expected");var r,t,n,i=e.defaults===!0,o=["precision",1,Ye,"rounding",0,8,"toExpNeg",-vr,0,"toExpPos",0,vr,"maxE",0,vr,"minE",-vr,0,"modulo",0,9];for(r=0;r=o[r+1]&&n<=o[r+2])this[t]=n;else throw Error(He+t+": "+n);if(t="crypto",i&&(this[t]=Gi[t]),(n=e[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(Gs);else this[t]=!1;else throw Error(He+t+": "+n);return this}function Up(e){return new this(e).cos()}function Gp(e){return new this(e).cosh()}function Zs(e){var r,t,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,js(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?r[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(r=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(r,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(Gs);else for(;o=10;i/=10)n++;nSr,datamodelEnumToSchemaEnum:()=>gd});function gd(e){return{name:e.name,values:e.values.map(r=>r.name)}}var Sr=(b=>(b.findUnique="findUnique",b.findUniqueOrThrow="findUniqueOrThrow",b.findFirst="findFirst",b.findFirstOrThrow="findFirstOrThrow",b.findMany="findMany",b.create="create",b.createMany="createMany",b.createManyAndReturn="createManyAndReturn",b.update="update",b.updateMany="updateMany",b.updateManyAndReturn="updateManyAndReturn",b.upsert="upsert",b.delete="delete",b.deleteMany="deleteMany",b.groupBy="groupBy",b.count="count",b.aggregate="aggregate",b.findRaw="findRaw",b.aggregateRaw="aggregateRaw",b))(Sr||{});var na=A(Di());var ta=A(require("node:fs"));var Xs={keyword:De,entity:De,value:e=>W(nr(e)),punctuation:nr,directive:De,function:De,variable:e=>W(nr(e)),string:e=>W(qe(e)),boolean:Ie,number:De,comment:Kr};var hd=e=>e,xn={},yd=0,v={manual:xn.Prism&&xn.Prism.manual,disableWorkerMessageHandler:xn.Prism&&xn.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof ge){let r=e;return new ge(r.type,v.util.encode(r.content),r.alias)}else return Array.isArray(e)?e.map(v.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ae instanceof ge)continue;if(me&&j!=r.length-1){S.lastIndex=te;var p=S.exec(e);if(!p)break;var c=p.index+(O?p[1].length:0),d=p.index+p[0].length,a=j,l=te;for(let _=r.length;a<_&&(l=l&&(++j,te=l);if(r[j]instanceof ge)continue;u=a-j,Ae=e.slice(te,l),p.index-=te}else{S.lastIndex=0;var p=S.exec(Ae),u=1}if(!p){if(o)break;continue}O&&(ae=p[1]?p[1].length:0);var c=p.index+ae,p=p[0].slice(ae),d=c+p.length,f=Ae.slice(0,c),h=Ae.slice(d);let K=[j,u];f&&(++j,te+=f.length,K.push(f));let fr=new ge(g,b?v.tokenize(p,b):p,Jr,p,me);if(K.push(fr),h&&K.push(h),Array.prototype.splice.apply(r,K),u!=1&&v.matchGrammar(e,r,t,j,te,!0,g),o)break}}}},tokenize:function(e,r){let t=[e],n=r.rest;if(n){for(let i in n)r[i]=n[i];delete r.rest}return v.matchGrammar(e,t,r,0,0,!1),t},hooks:{all:{},add:function(e,r){let t=v.hooks.all;t[e]=t[e]||[],t[e].push(r)},run:function(e,r){let t=v.hooks.all[e];if(!(!t||!t.length))for(var n=0,i;i=t[n++];)i(r)}},Token:ge};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 ge(e,r,t,n,i){this.type=e,this.content=r,this.alias=t,this.length=(n||"").length|0,this.greedy=!!i}ge.stringify=function(e,r){return typeof e=="string"?e:Array.isArray(e)?e.map(function(t){return ge.stringify(t,r)}).join(""):bd(e.type)(e.content)};function bd(e){return Xs[e]||hd}function ea(e){return Ed(e,v.languages.javascript)}function Ed(e,r){return v.tokenize(e,r).map(n=>ge.stringify(n)).join("")}function ra(e){return Ci(e)}var vn=class e{firstLineNumber;lines;static read(r){let t;try{t=ta.default.readFileSync(r,"utf-8")}catch{return null}return e.fromContent(t)}static fromContent(r){let t=r.split(/\r?\n/);return new e(1,t)}constructor(r,t){this.firstLineNumber=r,this.lines=t}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(r,t){if(rthis.lines.length+this.firstLineNumber)return this;let n=r-this.firstLineNumber,i=[...this.lines];return i[n]=t(i[n]),new e(this.firstLineNumber,i)}mapLines(r){return new e(this.firstLineNumber,this.lines.map((t,n)=>r(t,this.firstLineNumber+n)))}lineAt(r){return this.lines[r-this.firstLineNumber]}prependSymbolAt(r,t){return this.mapLines((n,i)=>i===r?`${t} ${n}`:` ${n}`)}slice(r,t){let n=this.lines.slice(r-1,t).join(` `);return new e(r,ra(n).split(` `))}highlight(){let r=ea(this.toString());return new e(this.firstLineNumber,r.split(` `))}toString(){return this.lines.join(` -`)}};var wd={red:ce,gray:Kr,dim:Ce,bold:W,underline:Y,highlightSource:e=>e.highlight()},xd={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Pd({message:e,originalMethod:r,isPanic:t,callArguments:n}){return{functionName:`prisma.${r}()`,message:e,isPanic:t??!1,callArguments:n}}function vd({callsite:e,message:r,originalMethod:t,isPanic:n,callArguments:i},o){let s=Pd({message:r,originalMethod:t,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=Pn.read(a.fileName)?.slice(l,a.lineNumber),c=u?.lineAt(a.lineNumber);if(u&&c){let p=Sd(c),d=Td(c);if(!d)return s;s.functionName=`${d.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,h=>h.slice(0,d.openingBraceIndex))),u=o.highlightSource(u);let f=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((h,g)=>o.gray(String(g).padStart(f))+" "+h).mapLines(h=>o.dim(h)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let h=p+f+1;h+=2,s.callArguments=(0,na.default)(i,h).slice(h)}}return s}function Td(e){let r=Object.keys(Sr).join("|"),n=new RegExp(String.raw`\.(${r})\(`).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 Sd(e){let r=0;for(let t=0;t"Unknown error")}function la(e){return e.errors.flatMap(r=>r.kind==="Union"?la(r):[r])}function Cd(e){let r=new Map,t=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){t.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=r.get(i);o?r.set(i,{...n,argument:{...n.argument,typeNames:Id(o.argument.typeNames,n.argument.typeNames)}}):r.set(i,n)}return t.push(...r.values()),t}function Id(e,r){return[...new Set(e.concat(r))]}function Dd(e){return ji(e,(r,t)=>{let n=oa(r),i=oa(t);return n!==i?n-i:sa(r)-sa(t)})}function oa(e){let r=0;return Array.isArray(e.selectionPath)&&(r+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(r+=e.argumentPath.length),r}function sa(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(r,t){this.name=r;this.value=t}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(r){let{colors:{green:t}}=r.context;r.addMarginSymbol(t(this.isRequired?"+":"?")),r.write(t(this.name)),this.isRequired||r.write(t("?")),r.write(t(": ")),typeof this.value=="string"?r.write(t(this.value)):r.write(this.value)}};ca();var Rr=class{constructor(r=0,t){this.context=t;this.currentIndent=r}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(r){return typeof r=="string"?this.currentLine+=r:r.write(this),this}writeJoined(r,t,n=(i,o)=>o.write(i)){let i=t.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(r){return this.marginSymbol=r,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let r=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+r.slice(1):r}};ua();var Sn=class{constructor(r){this.value=r}write(r){r.write(this.value)}markAsError(){this.value.markAsError()}};var Rn=e=>e,An={bold:Rn,red:Rn,green:Rn,dim:Rn,enabled:!1},pa={bold:W,red:ce,green:qe,dim:Ce,enabled:!0},Ar={write(e){e.writeLine(",")}};var ve=class{constructor(r){this.contents=r}isUnderlined=!1;color=r=>r;underline(){return this.isUnderlined=!0,this}setColor(r){return this.color=r,this}write(r){let t=r.getCurrentLineLength();r.write(this.color(this.contents)),this.isUnderlined&&r.afterNextNewline(()=>{r.write(" ".repeat(t)).writeLine(this.color("~".repeat(this.contents.length)))})}};var ze=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var Cr=class extends ze{items=[];addItem(r){return this.items.push(new Sn(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(t=>t.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let t=new ve("[]");this.hasError&&t.setColor(r.context.colors.red).underline(),r.write(t)}writeWithItems(r){let{colors:t}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Ar,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(t.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Ir=class e extends ze{fields={};suggestions=[];addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[t,...n]=r,i=this.getField(t);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof Cr&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}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 t=this;for(let n of r){if(!(t instanceof e))return;let i=t.getSubSelectionValue(n);if(!i)return;t=i}return t}getDeepSelectionParent(r){let t=this.getSelectionParent();if(!t)return;let n=t;for(let i of r){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let t=this.getField("include")?.value.asObject();if(t)return{kind:"include",value:t}}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(n=>n.getPrintWidth()))+2}write(r){let t=Object.values(this.fields);if(t.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,t)}asObject(){return this}writeEmpty(r){let t=new ve("{}");this.hasError&&t.setColor(r.context.colors.red).underline(),r.write(t)}writeWithContents(r,t){r.writeLine("{").withIndent(()=>{r.writeJoined(Ar,[...t,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};var Q=class extends ze{constructor(t){super();this.text=t}getPrintWidth(){return this.text.length}write(t){let n=new ve(this.text);this.hasError&&n.underline().setColor(t.context.colors.red),t.write(n)}asObject(){}};var ct=class{fields=[];addField(r,t){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${r}: ${t}`))).addMarginSymbol(i(o("+")))}}),this}write(r){let{colors:{green:t}}=r.context;r.writeLine(t("{")).withIndent(()=>{r.writeJoined(Ar,this.fields).newLine()}).write(t("}")).addMarginSymbol(t("+"))}};function Tn(e,r,t){switch(e.kind){case"MutuallyExclusiveFields":Od(e,r);break;case"IncludeOnScalar":kd(e,r);break;case"EmptySelection":_d(e,r,t);break;case"UnknownSelectionField":Md(e,r);break;case"InvalidSelectionValue":$d(e,r);break;case"UnknownArgument":qd(e,r);break;case"UnknownInputField":Vd(e,r);break;case"RequiredArgumentMissing":jd(e,r);break;case"InvalidArgumentType":Bd(e,r);break;case"InvalidArgumentValue":Ud(e,r);break;case"ValueTooLarge":Gd(e,r);break;case"SomeFieldsMissing":Qd(e,r);break;case"TooManyFieldsGiven":Wd(e,r);break;case"Union":aa(e,r,t);break;default:throw new Error("not implemented: "+e.kind)}}function Od(e,r){let t=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();t&&(t.getField(e.firstField)?.markAsError(),t.getField(e.secondField)?.markAsError()),r.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 kd(e,r){let[t,n]=Dr(e.selectionPath),i=e.outputType,o=r.arguments.getDeepSelectionParent(t)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ue(s.name,"true"));r.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${pt(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function _d(e,r,t){let n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Nd(e,r,i);return}if(n.hasField("select")){Ld(e,r);return}}if(t?.[We(e.outputType.name)]){Fd(e,r);return}r.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Nd(e,r,t){t.removeAllFields();for(let n of e.outputType.fields)t.addSuggestion(new ue(n.name,"false"));r.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 Ld(e,r){let t=e.outputType,n=r.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),ga(n,t)),r.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(t.name)} must not be empty. ${pt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(t.name)} needs ${o.bold("at least one truthy value")}.`)}function Fd(e,r){let t=new ct;for(let i of e.outputType.fields)i.isRelation||t.addField(i.name,"false");let n=new ue("omit",t).makeRequired();if(e.selectionPath.length===0)r.arguments.addSuggestion(n);else{let[i,o]=Dr(e.selectionPath),a=r.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new Ir;l.addSuggestion(n),a.value=l}}r.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 Md(e,r){let t=ha(e.selectionPath,r);if(t.parentKind!=="unknown"){t.field.markAsError();let n=t.parent;switch(t.parentKind){case"select":ga(n,e.outputType);break;case"include":Jd(n,e.outputType);break;case"omit":Kd(n,e.outputType);break}}r.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${t.fieldName}\``)}`];return t.parentKind!=="unknown"&&i.push(`for ${n.bold(t.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(pt(n)),i.join(" ")})}function $d(e,r){let t=ha(e.selectionPath,r);t.parentKind!=="unknown"&&t.field.value.markAsError(),r.addErrorMessage(n=>`Invalid value for selection field \`${n.red(t.fieldName)}\`: ${e.underlyingError}`)}function qd(e,r){let t=e.argumentPath[0],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(t)?.markAsError(),Hd(n,e.arguments)),r.addErrorMessage(i=>ma(i,t,e.arguments.map(o=>o.name)))}function Vd(e,r){let[t,n]=Dr(e.argumentPath),i=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(t)?.asObject();o&&ya(o,e.inputType)}r.addErrorMessage(o=>ma(o,n,e.inputType.fields.map(s=>s.name)))}function ma(e,r,t){let n=[`Unknown argument \`${e.red(r)}\`.`],i=zd(r,t);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),t.length>0&&n.push(pt(e)),n.join(" ")}function jd(e,r){let t;r.addErrorMessage(l=>t?.value instanceof Q&&t.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Dr(e.argumentPath),s=new ct,a=n.getDeepFieldValue(i)?.asObject();if(a){if(t=a.getField(o),t&&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(fa).join(" | ");a.addSuggestion(new ue(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=Dr(e.dependentArgumentPath);r.addErrorMessage(u=>`Argument \`${u.green(o)}\` is required because argument \`${u.green(l)}\` was provided.`)}}}function fa(e){return e.kind==="list"?`${fa(e.elementType)}[]`:e.name}function Bd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),r.addErrorMessage(i=>{let o=Cn("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(t)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Ud(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),r.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(t)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Cn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Gd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof Q&&(i=s.text)}r.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(t)}\``),s.join(" ")})}function Qd(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&ya(i,e.inputType)}r.addErrorMessage(i=>{let o=[`Argument \`${i.bold(t)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Cn("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(pt(i)),o.join(" ")})}function Wd(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}r.addErrorMessage(o=>{let s=[`Argument \`${o.bold(t)}\` 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 ${Cn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function ga(e,r){for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new ue(t.name,"true"))}function Jd(e,r){for(let t of r.fields)t.isRelation&&!e.hasField(t.name)&&e.addSuggestion(new ue(t.name,"true"))}function Kd(e,r){for(let t of r.fields)!e.hasField(t.name)&&!t.isRelation&&e.addSuggestion(new ue(t.name,"true"))}function Hd(e,r){for(let t of r)e.hasField(t.name)||e.addSuggestion(new ue(t.name,t.typeNames.join(" | ")))}function ha(e,r){let[t,n]=Dr(e),i=r.arguments.getDeepSubSelectionValue(t)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function ya(e,r){if(r.kind==="object")for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new ue(t.name,t.typeNames.join(" | ")))}function Dr(e){let r=[...e],t=r.pop();if(!t)throw new Error("unexpected empty path");return[r,t]}function pt({green:e,enabled:r}){return"Available options are "+(r?`listed in ${e("green")}`:"marked with ?")+"."}function Cn(e,r){if(r.length===1)return r[0];let t=[...r],n=t.pop();return`${t.join(", ")} ${e} ${n}`}var Yd=3;function zd(e,r){let t=1/0,n;for(let i of r){let o=(0,da.default)(e,i);o>Yd||o`}};function Or(e){return e instanceof dt}var In=Symbol(),Yi=new WeakMap,Me=class{constructor(r){r===In?Yi.set(this,`Prisma.${this._getName()}`):Yi.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Yi.get(this)}},mt=class extends Me{_getNamespace(){return"NullTypes"}},ft=class extends mt{#e};zi(ft,"DbNull");var gt=class extends mt{#e};zi(gt,"JsonNull");var ht=class extends mt{#e};zi(ht,"AnyNull");var Dn={classes:{DbNull:ft,JsonNull:gt,AnyNull:ht},instances:{DbNull:new ft(In),JsonNull:new gt(In),AnyNull:new ht(In)}};function zi(e,r){Object.defineProperty(e,"name",{value:r,configurable:!0})}var ba=": ",On=class{constructor(r,t){this.name=r;this.value=t}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+ba.length}write(r){let t=new ve(this.name);this.hasError&&t.underline().setColor(r.context.colors.red),r.write(t).write(ba).write(this.value)}};var Zi=class{arguments;errorMessages=[];constructor(r){this.arguments=r}write(r){r.write(this.arguments)}addErrorMessage(r){this.errorMessages.push(r)}renderAllMessages(r){return this.errorMessages.map(t=>t(r)).join(` -`)}};function kr(e){return new Zi(Ea(e))}function Ea(e){let r=new Ir;for(let[t,n]of Object.entries(e)){let i=new On(t,wa(n));r.addField(i)}return r}function wa(e){if(typeof e=="string")return new Q(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new Q(String(e));if(typeof e=="bigint")return new Q(`${e}n`);if(e===null)return new Q("null");if(e===void 0)return new Q("undefined");if(Tr(e))return new Q(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new Q(`Buffer.alloc(${e.byteLength})`):new Q(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let r=dn(e)?e.toISOString():"Invalid Date";return new Q(`new Date("${r}")`)}return e instanceof Me?new Q(`Prisma.${e._getName()}`):Or(e)?new Q(`prisma.${We(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Zd(e):typeof e=="object"?Ea(e):new Q(Object.prototype.toString.call(e))}function Zd(e){let r=new Cr;for(let t of e)r.addItem(wa(t));return r}function kn(e,r){let t=r==="pretty"?pa:An,n=e.renderAllMessages(t),i=new Rr(0,{colors:t}).write(e).toString();return{message:n,args:i}}function _n({args:e,errors:r,errorFormat:t,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=kr(e);for(let p of r)Tn(p,a,s);let{message:l,args:u}=kn(a,t),c=vn({message:l,callsite:n,originalMethod:i,showColors:t==="pretty",callArguments:u});throw new Z(c,{clientVersion:o})}function Te(e){return e.replace(/^./,r=>r.toLowerCase())}function Pa(e,r,t){let n=Te(t);return!r.result||!(r.result.$allModels||r.result[n])?e:Xd({...e,...xa(r.name,e,r.result.$allModels),...xa(r.name,e,r.result[n])})}function Xd(e){let r=new we,t=(n,i)=>r.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>t(o,i)):[n]));return cn(e,n=>({...n,needs:t(n.name,new Set)}))}function xa(e,r,t){return t?cn(t,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:em(r,o,i)})):{}}function em(e,r,t){let n=e?.[r]?.compute;return n?i=>t({...i,[r]:n(i)}):t}function va(e,r){if(!r)return e;let t={...e};for(let n of Object.values(r))if(e[n.name])for(let i of n.needs)t[i]=!0;return t}function Ta(e,r){if(!r)return e;let t={...e};for(let n of Object.values(r))if(!e[n.name])for(let i of n.needs)delete t[i];return t}var Nn=class{constructor(r,t){this.extension=r;this.previous=t}computedFieldsCache=new we;modelExtensionsCache=new we;queryCallbacksCache=new we;clientExtensions=at(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=at(()=>{let r=this.previous?.getAllBatchQueryCallbacks()??[],t=this.extension.query?.$__internalBatch;return t?r.concat(t):r});getAllComputedFields(r){return this.computedFieldsCache.getOrCreate(r,()=>Pa(this.previous?.getAllComputedFields(r),this.extension,r))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(r){return this.modelExtensionsCache.getOrCreate(r,()=>{let t=Te(r);return!this.extension.model||!(this.extension.model[t]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(r):{...this.previous?.getAllModelExtensions(r),...this.extension.model.$allModels,...this.extension.model[t]}})}getAllQueryCallbacks(r,t){return this.queryCallbacksCache.getOrCreate(`${r}:${t}`,()=>{let n=this.previous?.getAllQueryCallbacks(r,t)??[],i=[],o=this.extension.query;return!o||!(o[r]||o.$allModels||o[t]||o.$allOperations)?n:(o[r]!==void 0&&(o[r][t]!==void 0&&i.push(o[r][t]),o[r].$allOperations!==void 0&&i.push(o[r].$allOperations)),r!=="$none"&&o.$allModels!==void 0&&(o.$allModels[t]!==void 0&&i.push(o.$allModels[t]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[t]!==void 0&&i.push(o[t]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},_r=class e{constructor(r){this.head=r}static empty(){return new e}static single(r){return new e(new Nn(r))}isEmpty(){return this.head===void 0}append(r){return new e(new Nn(r,this.head))}getAllComputedFields(r){return this.head?.getAllComputedFields(r)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(r){return this.head?.getAllModelExtensions(r)}getAllQueryCallbacks(r,t){return this.head?.getAllQueryCallbacks(r,t)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};var Ln=class{constructor(r){this.name=r}};function Sa(e){return e instanceof Ln}function Ra(e){return new Ln(e)}var Aa=Symbol(),yt=class{constructor(r){if(r!==Aa)throw new Error("Skip instance can not be constructed directly")}ifUndefined(r){return r===void 0?Fn:r}},Fn=new yt(Aa);function Se(e){return e instanceof yt}var rm={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Ca="explicitly `undefined` values are not allowed";function Mn({modelName:e,action:r,args:t,runtimeDataModel:n,extensions:i=_r.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c}){let p=new Xi({runtimeDataModel:n,modelName:e,action:r,rootArgs:t,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c});return{modelName:e,action:rm[r],query:bt(t,p)}}function bt({select:e,include:r,...t}={},n){let i=t.omit;return delete t.omit,{arguments:Da(t,n),selection:tm(e,r,i,n)}}function tm(e,r,t,n){return e?(r?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):t&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),sm(e,n)):nm(n,r,t)}function nm(e,r,t){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),r&&im(n,r,e),om(n,t,e),n}function im(e,r,t){for(let[n,i]of Object.entries(r)){if(Se(i))continue;let o=t.nestSelection(n);if(eo(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=t.findField(n);if(s&&s.kind!=="object"&&t.throwValidationError({kind:"IncludeOnScalar",selectionPath:t.getSelectionPath().concat(n),outputType:t.getOutputTypeDescription()}),s){e[n]=bt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=bt(i,o)}}function om(e,r,t){let n=t.getComputedFields(),i={...t.getGlobalOmit(),...r},o=Ta(i,n);for(let[s,a]of Object.entries(o)){if(Se(a))continue;eo(a,t.nestSelection(s));let l=t.findField(s);n?.[s]&&!l||(e[s]=!a)}}function sm(e,r){let t={},n=r.getComputedFields(),i=va(e,n);for(let[o,s]of Object.entries(i)){if(Se(s))continue;let a=r.nestSelection(o);eo(s,a);let l=r.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||Se(s)){t[o]=!1;continue}if(s===!0){l?.kind==="object"?t[o]=bt({},a):t[o]=!0;continue}t[o]=bt(s,a)}}return t}function Ia(e,r){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(xr(e)){if(dn(e))return{$type:"DateTime",value:e.toISOString()};r.throwValidationError({kind:"InvalidArgumentValue",selectionPath:r.getSelectionPath(),argumentPath:r.getArgumentPath(),argument:{name:r.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Sa(e))return{$type:"Param",value:e.name};if(Or(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return am(e,r);if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:Buffer.from(t,n,i).toString("base64")}}if(lm(e))return e.values;if(Tr(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Me){if(e!==Dn.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(um(e))return e.toJSON();if(typeof e=="object")return Da(e,r);r.throwValidationError({kind:"InvalidArgumentValue",selectionPath:r.getSelectionPath(),argumentPath:r.getArgumentPath(),argument:{name:r.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Da(e,r){if(e.$type)return{$type:"Raw",value:e};let t={};for(let n in e){let i=e[n],o=r.nestArgument(n);Se(i)||(i!==void 0?t[n]=Ia(i,o):r.isPreviewFeatureOn("strictUndefinedChecks")&&r.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:r.getSelectionPath(),argument:{name:r.getArgumentName(),typeNames:[]},underlyingError:Ca}))}return t}function am(e,r){let t=[];for(let n=0;n({name:r.name,typeName:"boolean",isRelation:r.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(r){return this.params.previewFeatures.includes(r)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(r){return this.modelOrType?.fields.find(t=>t.name===r)}nestSelection(r){let t=this.findField(r),n=t?.kind==="object"?t.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(r)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[We(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"updateManyAndReturn":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:ar(this.params.action,"Unknown action")}}nestArgument(r){return new e({...this.params,argumentPath:this.params.argumentPath.concat(r)})}};function Oa(e){if(!e._hasPreviewFlag("metrics"))throw new Z("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var Nr=class{_client;constructor(r){this._client=r}prometheus(r){return Oa(this._client),this._client._engine.metrics({format:"prometheus",...r})}json(r){return Oa(this._client),this._client._engine.metrics({format:"json",...r})}};function ka(e,r){let t=at(()=>cm(r));Object.defineProperty(e,"dmmf",{get:()=>t.get()})}function cm(e){return{datamodel:{models:ro(e.models),enums:ro(e.enums),types:ro(e.types)}}}function ro(e){return Object.entries(e).map(([r,t])=>({name:r,...t}))}var to=new WeakMap,$n="$$PrismaTypedSql",Et=class{constructor(r,t){to.set(this,{sql:r,values:t}),Object.defineProperty(this,$n,{value:$n})}get sql(){return to.get(this).sql}get values(){return to.get(this).values}};function _a(e){return(...r)=>new Et(e,r)}function qn(e){return e!=null&&e[$n]===$n}var fu=A(Ti());var gu=require("node:async_hooks"),hu=require("node:events"),yu=A(require("node:fs")),ri=A(require("node:path"));var oe=class e{constructor(r,t){if(r.length-1!==t.length)throw r.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${r.length} strings to have ${r.length-1} values`);let n=t.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]=r[0];let i=0,o=0;for(;ie.getPropertyValue(t))},getPropertyDescriptor(t){return e.getPropertyDescriptor?.(t)}}}var Vn={enumerable:!0,configurable:!0,writable:!0};function jn(e){let r=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Vn,has:(t,n)=>r.has(n),set:(t,n,i)=>r.add(n)&&Reflect.set(t,n,i),ownKeys:()=>[...r]}}var Fa=Symbol.for("nodejs.util.inspect.custom");function he(e,r){let t=pm(r),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=t.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=t.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Ma(Reflect.ownKeys(o),t),a=Ma(Array.from(t.keys()),t);return[...new Set([...s,...a,...n])]},set(o,s,a){return t.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=t.get(s);return l?l.getPropertyDescriptor?{...Vn,...l?.getPropertyDescriptor(s)}:Vn:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Fa]=function(){let o={...this};return delete o[Fa],o},i}function pm(e){let r=new Map;for(let t of e){let n=t.getKeys();for(let i of n)r.set(i,t)}return r}function Ma(e,r){return e.filter(t=>r.get(t)?.has?.(t)??!0)}function Lr(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function Fr(e,r){return{batch:e,transaction:r?.kind==="batch"?{isolationLevel:r.options.isolationLevel}:void 0}}function $a(e){if(e===void 0)return"";let r=kr(e);return new Rr(0,{colors:An}).write(r).toString()}var dm="P2037";function Mr({error:e,user_facing_error:r},t,n){return r.error_code?new z(mm(r,n),{code:r.error_code,clientVersion:t,meta:r.meta,batchRequestIdx:r.batch_request_idx}):new V(e,{clientVersion:t,batchRequestIdx:r.batch_request_idx})}function mm(e,r){let t=e.message;return(r==="postgresql"||r==="postgres"||r==="mysql")&&e.error_code===dm&&(t+=` +`)}};var wd={red:ce,gray:Kr,dim:Ce,bold:W,underline:Y,highlightSource:e=>e.highlight()},xd={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function vd({message:e,originalMethod:r,isPanic:t,callArguments:n}){return{functionName:`prisma.${r}()`,message:e,isPanic:t??!1,callArguments:n}}function Pd({callsite:e,message:r,originalMethod:t,isPanic:n,callArguments:i},o){let s=vd({message:r,originalMethod:t,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=vn.read(a.fileName)?.slice(l,a.lineNumber),c=u?.lineAt(a.lineNumber);if(u&&c){let p=Sd(c),d=Td(c);if(!d)return s;s.functionName=`${d.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,h=>h.slice(0,d.openingBraceIndex))),u=o.highlightSource(u);let f=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((h,g)=>o.gray(String(g).padStart(f))+" "+h).mapLines(h=>o.dim(h)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let h=p+f+1;h+=2,s.callArguments=(0,na.default)(i,h).slice(h)}}return s}function Td(e){let r=Object.keys(Sr).join("|"),n=new RegExp(String.raw`\.(${r})\(`).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 Sd(e){let r=0;for(let t=0;t"Unknown error")}function la(e){return e.errors.flatMap(r=>r.kind==="Union"?la(r):[r])}function Cd(e){let r=new Map,t=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){t.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=r.get(i);o?r.set(i,{...n,argument:{...n.argument,typeNames:Id(o.argument.typeNames,n.argument.typeNames)}}):r.set(i,n)}return t.push(...r.values()),t}function Id(e,r){return[...new Set(e.concat(r))]}function Dd(e){return ji(e,(r,t)=>{let n=oa(r),i=oa(t);return n!==i?n-i:sa(r)-sa(t)})}function oa(e){let r=0;return Array.isArray(e.selectionPath)&&(r+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(r+=e.argumentPath.length),r}function sa(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(r,t){this.name=r;this.value=t}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(r){let{colors:{green:t}}=r.context;r.addMarginSymbol(t(this.isRequired?"+":"?")),r.write(t(this.name)),this.isRequired||r.write(t("?")),r.write(t(": ")),typeof this.value=="string"?r.write(t(this.value)):r.write(this.value)}};ca();var Rr=class{constructor(r=0,t){this.context=t;this.currentIndent=r}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(r){return typeof r=="string"?this.currentLine+=r:r.write(this),this}writeJoined(r,t,n=(i,o)=>o.write(i)){let i=t.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(r){return this.marginSymbol=r,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let r=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+r.slice(1):r}};ua();var Sn=class{constructor(r){this.value=r}write(r){r.write(this.value)}markAsError(){this.value.markAsError()}};var Rn=e=>e,An={bold:Rn,red:Rn,green:Rn,dim:Rn,enabled:!1},pa={bold:W,red:ce,green:qe,dim:Ce,enabled:!0},Ar={write(e){e.writeLine(",")}};var Pe=class{constructor(r){this.contents=r}isUnderlined=!1;color=r=>r;underline(){return this.isUnderlined=!0,this}setColor(r){return this.color=r,this}write(r){let t=r.getCurrentLineLength();r.write(this.color(this.contents)),this.isUnderlined&&r.afterNextNewline(()=>{r.write(" ".repeat(t)).writeLine(this.color("~".repeat(this.contents.length)))})}};var ze=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var Cr=class extends ze{items=[];addItem(r){return this.items.push(new Sn(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(t=>t.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let t=new Pe("[]");this.hasError&&t.setColor(r.context.colors.red).underline(),r.write(t)}writeWithItems(r){let{colors:t}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Ar,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(t.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Ir=class e extends ze{fields={};suggestions=[];addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[t,...n]=r,i=this.getField(t);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof Cr&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}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 t=this;for(let n of r){if(!(t instanceof e))return;let i=t.getSubSelectionValue(n);if(!i)return;t=i}return t}getDeepSelectionParent(r){let t=this.getSelectionParent();if(!t)return;let n=t;for(let i of r){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let t=this.getField("include")?.value.asObject();if(t)return{kind:"include",value:t}}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(n=>n.getPrintWidth()))+2}write(r){let t=Object.values(this.fields);if(t.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,t)}asObject(){return this}writeEmpty(r){let t=new Pe("{}");this.hasError&&t.setColor(r.context.colors.red).underline(),r.write(t)}writeWithContents(r,t){r.writeLine("{").withIndent(()=>{r.writeJoined(Ar,[...t,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};var Q=class extends ze{constructor(t){super();this.text=t}getPrintWidth(){return this.text.length}write(t){let n=new Pe(this.text);this.hasError&&n.underline().setColor(t.context.colors.red),t.write(n)}asObject(){}};var ct=class{fields=[];addField(r,t){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${r}: ${t}`))).addMarginSymbol(i(o("+")))}}),this}write(r){let{colors:{green:t}}=r.context;r.writeLine(t("{")).withIndent(()=>{r.writeJoined(Ar,this.fields).newLine()}).write(t("}")).addMarginSymbol(t("+"))}};function Tn(e,r,t){switch(e.kind){case"MutuallyExclusiveFields":Od(e,r);break;case"IncludeOnScalar":kd(e,r);break;case"EmptySelection":_d(e,r,t);break;case"UnknownSelectionField":Md(e,r);break;case"InvalidSelectionValue":$d(e,r);break;case"UnknownArgument":qd(e,r);break;case"UnknownInputField":Vd(e,r);break;case"RequiredArgumentMissing":jd(e,r);break;case"InvalidArgumentType":Bd(e,r);break;case"InvalidArgumentValue":Ud(e,r);break;case"ValueTooLarge":Gd(e,r);break;case"SomeFieldsMissing":Qd(e,r);break;case"TooManyFieldsGiven":Wd(e,r);break;case"Union":aa(e,r,t);break;default:throw new Error("not implemented: "+e.kind)}}function Od(e,r){let t=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();t&&(t.getField(e.firstField)?.markAsError(),t.getField(e.secondField)?.markAsError()),r.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 kd(e,r){let[t,n]=Dr(e.selectionPath),i=e.outputType,o=r.arguments.getDeepSelectionParent(t)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ue(s.name,"true"));r.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${pt(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function _d(e,r,t){let n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Nd(e,r,i);return}if(n.hasField("select")){Ld(e,r);return}}if(t?.[We(e.outputType.name)]){Fd(e,r);return}r.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Nd(e,r,t){t.removeAllFields();for(let n of e.outputType.fields)t.addSuggestion(new ue(n.name,"false"));r.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 Ld(e,r){let t=e.outputType,n=r.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),ga(n,t)),r.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(t.name)} must not be empty. ${pt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(t.name)} needs ${o.bold("at least one truthy value")}.`)}function Fd(e,r){let t=new ct;for(let i of e.outputType.fields)i.isRelation||t.addField(i.name,"false");let n=new ue("omit",t).makeRequired();if(e.selectionPath.length===0)r.arguments.addSuggestion(n);else{let[i,o]=Dr(e.selectionPath),a=r.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new Ir;l.addSuggestion(n),a.value=l}}r.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 Md(e,r){let t=ha(e.selectionPath,r);if(t.parentKind!=="unknown"){t.field.markAsError();let n=t.parent;switch(t.parentKind){case"select":ga(n,e.outputType);break;case"include":Jd(n,e.outputType);break;case"omit":Kd(n,e.outputType);break}}r.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${t.fieldName}\``)}`];return t.parentKind!=="unknown"&&i.push(`for ${n.bold(t.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(pt(n)),i.join(" ")})}function $d(e,r){let t=ha(e.selectionPath,r);t.parentKind!=="unknown"&&t.field.value.markAsError(),r.addErrorMessage(n=>`Invalid value for selection field \`${n.red(t.fieldName)}\`: ${e.underlyingError}`)}function qd(e,r){let t=e.argumentPath[0],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(t)?.markAsError(),Hd(n,e.arguments)),r.addErrorMessage(i=>ma(i,t,e.arguments.map(o=>o.name)))}function Vd(e,r){let[t,n]=Dr(e.argumentPath),i=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(t)?.asObject();o&&ya(o,e.inputType)}r.addErrorMessage(o=>ma(o,n,e.inputType.fields.map(s=>s.name)))}function ma(e,r,t){let n=[`Unknown argument \`${e.red(r)}\`.`],i=zd(r,t);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),t.length>0&&n.push(pt(e)),n.join(" ")}function jd(e,r){let t;r.addErrorMessage(l=>t?.value instanceof Q&&t.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Dr(e.argumentPath),s=new ct,a=n.getDeepFieldValue(i)?.asObject();if(a){if(t=a.getField(o),t&&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(fa).join(" | ");a.addSuggestion(new ue(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=Dr(e.dependentArgumentPath);r.addErrorMessage(u=>`Argument \`${u.green(o)}\` is required because argument \`${u.green(l)}\` was provided.`)}}}function fa(e){return e.kind==="list"?`${fa(e.elementType)}[]`:e.name}function Bd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),r.addErrorMessage(i=>{let o=Cn("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(t)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Ud(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),r.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(t)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Cn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Gd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof Q&&(i=s.text)}r.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(t)}\``),s.join(" ")})}function Qd(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&ya(i,e.inputType)}r.addErrorMessage(i=>{let o=[`Argument \`${i.bold(t)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Cn("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(pt(i)),o.join(" ")})}function Wd(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}r.addErrorMessage(o=>{let s=[`Argument \`${o.bold(t)}\` 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 ${Cn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function ga(e,r){for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new ue(t.name,"true"))}function Jd(e,r){for(let t of r.fields)t.isRelation&&!e.hasField(t.name)&&e.addSuggestion(new ue(t.name,"true"))}function Kd(e,r){for(let t of r.fields)!e.hasField(t.name)&&!t.isRelation&&e.addSuggestion(new ue(t.name,"true"))}function Hd(e,r){for(let t of r)e.hasField(t.name)||e.addSuggestion(new ue(t.name,t.typeNames.join(" | ")))}function ha(e,r){let[t,n]=Dr(e),i=r.arguments.getDeepSubSelectionValue(t)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function ya(e,r){if(r.kind==="object")for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new ue(t.name,t.typeNames.join(" | ")))}function Dr(e){let r=[...e],t=r.pop();if(!t)throw new Error("unexpected empty path");return[r,t]}function pt({green:e,enabled:r}){return"Available options are "+(r?`listed in ${e("green")}`:"marked with ?")+"."}function Cn(e,r){if(r.length===1)return r[0];let t=[...r],n=t.pop();return`${t.join(", ")} ${e} ${n}`}var Yd=3;function zd(e,r){let t=1/0,n;for(let i of r){let o=(0,da.default)(e,i);o>Yd||o`}};function Or(e){return e instanceof dt}var In=Symbol(),Yi=new WeakMap,Me=class{constructor(r){r===In?Yi.set(this,`Prisma.${this._getName()}`):Yi.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Yi.get(this)}},mt=class extends Me{_getNamespace(){return"NullTypes"}},ft=class extends mt{#e};zi(ft,"DbNull");var gt=class extends mt{#e};zi(gt,"JsonNull");var ht=class extends mt{#e};zi(ht,"AnyNull");var Dn={classes:{DbNull:ft,JsonNull:gt,AnyNull:ht},instances:{DbNull:new ft(In),JsonNull:new gt(In),AnyNull:new ht(In)}};function zi(e,r){Object.defineProperty(e,"name",{value:r,configurable:!0})}var ba=": ",On=class{constructor(r,t){this.name=r;this.value=t}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+ba.length}write(r){let t=new Pe(this.name);this.hasError&&t.underline().setColor(r.context.colors.red),r.write(t).write(ba).write(this.value)}};var Zi=class{arguments;errorMessages=[];constructor(r){this.arguments=r}write(r){r.write(this.arguments)}addErrorMessage(r){this.errorMessages.push(r)}renderAllMessages(r){return this.errorMessages.map(t=>t(r)).join(` +`)}};function kr(e){return new Zi(Ea(e))}function Ea(e){let r=new Ir;for(let[t,n]of Object.entries(e)){let i=new On(t,wa(n));r.addField(i)}return r}function wa(e){if(typeof e=="string")return new Q(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new Q(String(e));if(typeof e=="bigint")return new Q(`${e}n`);if(e===null)return new Q("null");if(e===void 0)return new Q("undefined");if(Tr(e))return new Q(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new Q(`Buffer.alloc(${e.byteLength})`):new Q(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let r=dn(e)?e.toISOString():"Invalid Date";return new Q(`new Date("${r}")`)}return e instanceof Me?new Q(`Prisma.${e._getName()}`):Or(e)?new Q(`prisma.${We(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Zd(e):typeof e=="object"?Ea(e):new Q(Object.prototype.toString.call(e))}function Zd(e){let r=new Cr;for(let t of e)r.addItem(wa(t));return r}function kn(e,r){let t=r==="pretty"?pa:An,n=e.renderAllMessages(t),i=new Rr(0,{colors:t}).write(e).toString();return{message:n,args:i}}function _n({args:e,errors:r,errorFormat:t,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=kr(e);for(let p of r)Tn(p,a,s);let{message:l,args:u}=kn(a,t),c=Pn({message:l,callsite:n,originalMethod:i,showColors:t==="pretty",callArguments:u});throw new Z(c,{clientVersion:o})}function Te(e){return e.replace(/^./,r=>r.toLowerCase())}function va(e,r,t){let n=Te(t);return!r.result||!(r.result.$allModels||r.result[n])?e:Xd({...e,...xa(r.name,e,r.result.$allModels),...xa(r.name,e,r.result[n])})}function Xd(e){let r=new we,t=(n,i)=>r.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>t(o,i)):[n]));return cn(e,n=>({...n,needs:t(n.name,new Set)}))}function xa(e,r,t){return t?cn(t,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:em(r,o,i)})):{}}function em(e,r,t){let n=e?.[r]?.compute;return n?i=>t({...i,[r]:n(i)}):t}function Pa(e,r){if(!r)return e;let t={...e};for(let n of Object.values(r))if(e[n.name])for(let i of n.needs)t[i]=!0;return t}function Ta(e,r){if(!r)return e;let t={...e};for(let n of Object.values(r))if(!e[n.name])for(let i of n.needs)delete t[i];return t}var Nn=class{constructor(r,t){this.extension=r;this.previous=t}computedFieldsCache=new we;modelExtensionsCache=new we;queryCallbacksCache=new we;clientExtensions=at(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=at(()=>{let r=this.previous?.getAllBatchQueryCallbacks()??[],t=this.extension.query?.$__internalBatch;return t?r.concat(t):r});getAllComputedFields(r){return this.computedFieldsCache.getOrCreate(r,()=>va(this.previous?.getAllComputedFields(r),this.extension,r))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(r){return this.modelExtensionsCache.getOrCreate(r,()=>{let t=Te(r);return!this.extension.model||!(this.extension.model[t]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(r):{...this.previous?.getAllModelExtensions(r),...this.extension.model.$allModels,...this.extension.model[t]}})}getAllQueryCallbacks(r,t){return this.queryCallbacksCache.getOrCreate(`${r}:${t}`,()=>{let n=this.previous?.getAllQueryCallbacks(r,t)??[],i=[],o=this.extension.query;return!o||!(o[r]||o.$allModels||o[t]||o.$allOperations)?n:(o[r]!==void 0&&(o[r][t]!==void 0&&i.push(o[r][t]),o[r].$allOperations!==void 0&&i.push(o[r].$allOperations)),r!=="$none"&&o.$allModels!==void 0&&(o.$allModels[t]!==void 0&&i.push(o.$allModels[t]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[t]!==void 0&&i.push(o[t]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},_r=class e{constructor(r){this.head=r}static empty(){return new e}static single(r){return new e(new Nn(r))}isEmpty(){return this.head===void 0}append(r){return new e(new Nn(r,this.head))}getAllComputedFields(r){return this.head?.getAllComputedFields(r)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(r){return this.head?.getAllModelExtensions(r)}getAllQueryCallbacks(r,t){return this.head?.getAllQueryCallbacks(r,t)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};var Ln=class{constructor(r){this.name=r}};function Sa(e){return e instanceof Ln}function Ra(e){return new Ln(e)}var Aa=Symbol(),yt=class{constructor(r){if(r!==Aa)throw new Error("Skip instance can not be constructed directly")}ifUndefined(r){return r===void 0?Fn:r}},Fn=new yt(Aa);function Se(e){return e instanceof yt}var rm={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Ca="explicitly `undefined` values are not allowed";function Mn({modelName:e,action:r,args:t,runtimeDataModel:n,extensions:i=_r.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c}){let p=new Xi({runtimeDataModel:n,modelName:e,action:r,rootArgs:t,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c});return{modelName:e,action:rm[r],query:bt(t,p)}}function bt({select:e,include:r,...t}={},n){let i=t.omit;return delete t.omit,{arguments:Da(t,n),selection:tm(e,r,i,n)}}function tm(e,r,t,n){return e?(r?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):t&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),sm(e,n)):nm(n,r,t)}function nm(e,r,t){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),r&&im(n,r,e),om(n,t,e),n}function im(e,r,t){for(let[n,i]of Object.entries(r)){if(Se(i))continue;let o=t.nestSelection(n);if(eo(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=t.findField(n);if(s&&s.kind!=="object"&&t.throwValidationError({kind:"IncludeOnScalar",selectionPath:t.getSelectionPath().concat(n),outputType:t.getOutputTypeDescription()}),s){e[n]=bt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=bt(i,o)}}function om(e,r,t){let n=t.getComputedFields(),i={...t.getGlobalOmit(),...r},o=Ta(i,n);for(let[s,a]of Object.entries(o)){if(Se(a))continue;eo(a,t.nestSelection(s));let l=t.findField(s);n?.[s]&&!l||(e[s]=!a)}}function sm(e,r){let t={},n=r.getComputedFields(),i=Pa(e,n);for(let[o,s]of Object.entries(i)){if(Se(s))continue;let a=r.nestSelection(o);eo(s,a);let l=r.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||Se(s)){t[o]=!1;continue}if(s===!0){l?.kind==="object"?t[o]=bt({},a):t[o]=!0;continue}t[o]=bt(s,a)}}return t}function Ia(e,r){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(xr(e)){if(dn(e))return{$type:"DateTime",value:e.toISOString()};r.throwValidationError({kind:"InvalidArgumentValue",selectionPath:r.getSelectionPath(),argumentPath:r.getArgumentPath(),argument:{name:r.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Sa(e))return{$type:"Param",value:e.name};if(Or(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return am(e,r);if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:Buffer.from(t,n,i).toString("base64")}}if(lm(e))return e.values;if(Tr(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Me){if(e!==Dn.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(um(e))return e.toJSON();if(typeof e=="object")return Da(e,r);r.throwValidationError({kind:"InvalidArgumentValue",selectionPath:r.getSelectionPath(),argumentPath:r.getArgumentPath(),argument:{name:r.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Da(e,r){if(e.$type)return{$type:"Raw",value:e};let t={};for(let n in e){let i=e[n],o=r.nestArgument(n);Se(i)||(i!==void 0?t[n]=Ia(i,o):r.isPreviewFeatureOn("strictUndefinedChecks")&&r.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:r.getSelectionPath(),argument:{name:r.getArgumentName(),typeNames:[]},underlyingError:Ca}))}return t}function am(e,r){let t=[];for(let n=0;n({name:r.name,typeName:"boolean",isRelation:r.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(r){return this.params.previewFeatures.includes(r)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(r){return this.modelOrType?.fields.find(t=>t.name===r)}nestSelection(r){let t=this.findField(r),n=t?.kind==="object"?t.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(r)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[We(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"updateManyAndReturn":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:ar(this.params.action,"Unknown action")}}nestArgument(r){return new e({...this.params,argumentPath:this.params.argumentPath.concat(r)})}};function Oa(e){if(!e._hasPreviewFlag("metrics"))throw new Z("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var Nr=class{_client;constructor(r){this._client=r}prometheus(r){return Oa(this._client),this._client._engine.metrics({format:"prometheus",...r})}json(r){return Oa(this._client),this._client._engine.metrics({format:"json",...r})}};function ka(e,r){let t=at(()=>cm(r));Object.defineProperty(e,"dmmf",{get:()=>t.get()})}function cm(e){return{datamodel:{models:ro(e.models),enums:ro(e.enums),types:ro(e.types)}}}function ro(e){return Object.entries(e).map(([r,t])=>({name:r,...t}))}var to=new WeakMap,$n="$$PrismaTypedSql",Et=class{constructor(r,t){to.set(this,{sql:r,values:t}),Object.defineProperty(this,$n,{value:$n})}get sql(){return to.get(this).sql}get values(){return to.get(this).values}};function _a(e){return(...r)=>new Et(e,r)}function qn(e){return e!=null&&e[$n]===$n}var fu=A(Ti());var gu=require("node:async_hooks"),hu=require("node:events"),yu=A(require("node:fs")),ri=A(require("node:path"));var oe=class e{constructor(r,t){if(r.length-1!==t.length)throw r.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${r.length} strings to have ${r.length-1} values`);let n=t.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]=r[0];let i=0,o=0;for(;ie.getPropertyValue(t))},getPropertyDescriptor(t){return e.getPropertyDescriptor?.(t)}}}var Vn={enumerable:!0,configurable:!0,writable:!0};function jn(e){let r=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Vn,has:(t,n)=>r.has(n),set:(t,n,i)=>r.add(n)&&Reflect.set(t,n,i),ownKeys:()=>[...r]}}var Fa=Symbol.for("nodejs.util.inspect.custom");function he(e,r){let t=pm(r),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=t.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=t.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Ma(Reflect.ownKeys(o),t),a=Ma(Array.from(t.keys()),t);return[...new Set([...s,...a,...n])]},set(o,s,a){return t.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=t.get(s);return l?l.getPropertyDescriptor?{...Vn,...l?.getPropertyDescriptor(s)}:Vn:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Fa]=function(){let o={...this};return delete o[Fa],o},i}function pm(e){let r=new Map;for(let t of e){let n=t.getKeys();for(let i of n)r.set(i,t)}return r}function Ma(e,r){return e.filter(t=>r.get(t)?.has?.(t)??!0)}function Lr(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function Fr(e,r){return{batch:e,transaction:r?.kind==="batch"?{isolationLevel:r.options.isolationLevel}:void 0}}function $a(e){if(e===void 0)return"";let r=kr(e);return new Rr(0,{colors:An}).write(r).toString()}var dm="P2037";function Mr({error:e,user_facing_error:r},t,n){return r.error_code?new z(mm(r,n),{code:r.error_code,clientVersion:t,meta:r.meta,batchRequestIdx:r.batch_request_idx}):new V(e,{clientVersion:t,batchRequestIdx:r.batch_request_idx})}function mm(e,r){let t=e.message;return(r==="postgresql"||r==="postgres"||r==="mysql")&&e.error_code===dm&&(t+=` Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),t}var xt="";function qa(e){var r=e.split(` -`);return r.reduce(function(t,n){var i=hm(n)||bm(n)||xm(n)||Sm(n)||vm(n);return i&&t.push(i),t},[])}var fm=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|rsc||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,gm=/\((\S*)(?::(\d+))(?::(\d+))\)/;function hm(e){var r=fm.exec(e);if(!r)return null;var t=r[2]&&r[2].indexOf("native")===0,n=r[2]&&r[2].indexOf("eval")===0,i=gm.exec(r[2]);return n&&i!=null&&(r[2]=i[1],r[3]=i[2],r[4]=i[3]),{file:t?null:r[2],methodName:r[1]||xt,arguments:t?[r[2]]:[],lineNumber:r[3]?+r[3]:null,column:r[4]?+r[4]:null}}var ym=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|rsc|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function bm(e){var r=ym.exec(e);return r?{file:r[2],methodName:r[1]||xt,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var Em=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|rsc|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,wm=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function xm(e){var r=Em.exec(e);if(!r)return null;var t=r[3]&&r[3].indexOf(" > eval")>-1,n=wm.exec(r[3]);return t&&n!=null&&(r[3]=n[1],r[4]=n[2],r[5]=null),{file:r[3],methodName:r[1]||xt,arguments:r[2]?r[2].split(","):[],lineNumber:r[4]?+r[4]:null,column:r[5]?+r[5]:null}}var Pm=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function vm(e){var r=Pm.exec(e);return r?{file:r[3],methodName:r[1]||xt,arguments:[],lineNumber:+r[4],column:r[5]?+r[5]:null}:null}var Tm=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Sm(e){var r=Tm.exec(e);return r?{file:r[2],methodName:r[1]||xt,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var oo=class{getLocation(){return null}},so=class{_error;constructor(){this._error=new Error}getLocation(){let r=this._error.stack;if(!r)return null;let n=qa(r).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 oo:new so}var Va={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function $r(e={}){let r=Am(e);return Object.entries(r).reduce((n,[i,o])=>(Va[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Am(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Bn(e={}){return r=>(typeof e._count=="boolean"&&(r._count=r._count._all),r)}function ja(e,r){let t=Bn(e);return r({action:"aggregate",unpacker:t,argsMapper:$r})(e)}function Cm(e={}){let{select:r,...t}=e;return typeof r=="object"?$r({...t,_count:r}):$r({...t,_count:{_all:!0}})}function Im(e={}){return typeof e.select=="object"?r=>Bn(e)(r)._count:r=>Bn(e)(r)._count._all}function Ba(e,r){return r({action:"count",unpacker:Im(e),argsMapper:Cm})(e)}function Dm(e={}){let r=$r(e);if(Array.isArray(r.by))for(let t of r.by)typeof t=="string"&&(r.select[t]=!0);else typeof r.by=="string"&&(r.select[r.by]=!0);return r}function Om(e={}){return r=>(typeof e?._count=="boolean"&&r.forEach(t=>{t._count=t._count._all}),r)}function Ua(e,r){return r({action:"groupBy",unpacker:Om(e),argsMapper:Dm})(e)}function Ga(e,r,t){if(r==="aggregate")return n=>ja(n,t);if(r==="count")return n=>Ba(n,t);if(r==="groupBy")return n=>Ua(n,t)}function Qa(e,r){let t=r.fields.filter(i=>!i.relationName),n=Ms(t,"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 dt(e,o,s.type,s.isList,s.kind==="enum")},...jn(Object.keys(n))})}var Wa=e=>Array.isArray(e)?e:e.split("."),ao=(e,r)=>Wa(r).reduce((t,n)=>t&&t[n],e),Ja=(e,r,t)=>Wa(r).reduceRight((n,i,o,s)=>Object.assign({},ao(e,s.slice(0,o)),{[i]:n}),t);function km(e,r){return e===void 0||r===void 0?[]:[...r,"select",e]}function _m(e,r,t){return r===void 0?e??{}:Ja(r,t,e||!0)}function lo(e,r,t,n,i,o){let a=e._runtimeDataModel.models[r].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ze(e._errorFormat),c=km(n,i),p=_m(l,o,c),d=t({dataPath:c,callsite:u})(p),f=Nm(e,r);return new Proxy(d,{get(h,g){if(!f.includes(g))return h[g];let T=[a[g].type,t,g],S=[c,p];return lo(e,...T,...S)},...jn([...f,...Object.getOwnPropertyNames(d)])})}}function Nm(e,r){return e._runtimeDataModel.models[r].fields.filter(t=>t.kind==="object").map(t=>t.name)}var Lm=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Fm=["aggregate","count","groupBy"];function uo(e,r){let t=e._extensions.getAllModelExtensions(r)??{},n=[Mm(e,r),qm(e,r),wt(t),re("name",()=>r),re("$name",()=>r),re("$parent",()=>e._appliedParent)];return he({},n)}function Mm(e,r){let t=Te(r),n=Object.keys(Sr).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let u=Ze(e._errorFormat);return e._createPrismaPromise(c=>{let p={args:l,dataPath:[],action:o,model:r,clientMethod:`${t}.${i}`,jsModelName:t,transaction:c,callsite:u};return e._request({...p,...a})},{action:o,args:l,model:r})};return Lm.includes(o)?lo(e,r,s):$m(i)?Ga(e,i,s):s({})}}}function $m(e){return Fm.includes(e)}function qm(e,r){return lr(re("fields",()=>{let t=e._runtimeDataModel.models[r];return Qa(r,t)}))}function Ka(e){return e.replace(/^./,r=>r.toUpperCase())}var co=Symbol();function Pt(e){let r=[Vm(e),jm(e),re(co,()=>e),re("$parent",()=>e._appliedParent)],t=e._extensions.getAllClientExtensions();return t&&r.push(wt(t)),he(e,r)}function Vm(e){let r=Object.getPrototypeOf(e._originalClient),t=[...new Set(Object.getOwnPropertyNames(r))];return{getKeys(){return t},getPropertyValue(n){return e[n]}}}function jm(e){let r=Object.keys(e._runtimeDataModel.models),t=r.map(Te),n=[...new Set(r.concat(t))];return lr({getKeys(){return n},getPropertyValue(i){let o=Ka(i);if(e._runtimeDataModel.models[o]!==void 0)return uo(e,o);if(e._runtimeDataModel.models[i]!==void 0)return uo(e,i)},getPropertyDescriptor(i){if(!t.includes(i))return{enumerable:!1}}})}function Ha(e){return e[co]?e[co]:e}function Ya(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let t=e.client.__AccelerateEngine;this._originalClient._engine=new t(this._originalClient._accelerateEngineConfig)}let r=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return Pt(r)}function za({result:e,modelName:r,select:t,omit:n,extensions:i}){let o=i.getAllComputedFields(r);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(Lr(u))}else if(t){if(!t[l.name])continue;let u=l.needs.filter(c=>!t[c]);u.length>0&&a.push(Lr(u))}Bm(e,l.needs)&&s.push(Um(l,he(e,s)))}return s.length>0||a.length>0?he(e,[...s,...a]):e}function Bm(e,r){return r.every(t=>Vi(e,t))}function Um(e,r){return lr(re(e.name,()=>e.compute(r)))}function Un({visitor:e,result:r,args:t,runtimeDataModel:n,modelName:i}){if(Array.isArray(r)){for(let s=0;sc.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};r[o]=Un({visitor:i,result:r[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Xa({result:e,modelName:r,args:t,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[r]?e:Un({result:e,args:t??{},modelName:r,runtimeDataModel:i,visitor:(a,l,u)=>{let c=Te(l);return za({result:a,modelName:c,select:u.select,omit:u.select?void 0:{...o?.[c],...u.omit},extensions:n})}})}var Gm=["$connect","$disconnect","$on","$transaction","$extends"],el=Gm;function rl(e){if(e instanceof oe)return Qm(e);if(qn(e))return Wm(e);if(Array.isArray(e)){let t=[e[0]];for(let n=1;n{let o=r.customDataProxyFetch;return"transaction"in r&&i!==void 0&&(r.transaction?.kind==="batch"&&r.transaction.lock.then(),r.transaction=i),n===t.length?e._executeRequest(r):t[n]({model:r.model,operation:r.model?r.action:r.clientMethod,args:rl(r.args??{}),__internalParams:r,query:(s,a=r)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=al(o,l),a.args=s,nl(e,a,t,n+1)}})})}function il(e,r){let{jsModelName:t,action:n,clientMethod:i}=r,o=t?n:i;if(e._extensions.isEmpty())return e._executeRequest(r);let s=e._extensions.getAllQueryCallbacks(t??"$none",o);return nl(e,r,s)}function ol(e){return r=>{let t={requests:r},n=r[0].extensions.getAllBatchQueryCallbacks();return n.length?sl(t,n,0,e):e(t)}}function sl(e,r,t,n){if(t===r.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return r[t]({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=al(i,l),sl(a,r,t+1,n)}})}var tl=e=>e;function al(e=tl,r=tl){return t=>e(r(t))}var ll=N("prisma:client"),ul={Vercel:"vercel","Netlify CI":"netlify"};function cl({postinstall:e,ciName:r,clientVersion:t}){if(ll("checkPlatformCaching:postinstall",e),ll("checkPlatformCaching:ciName",r),e===!0&&r&&r in ul){let n=`Prisma has detected that this project was built on ${r}, 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. +`);return r.reduce(function(t,n){var i=hm(n)||bm(n)||xm(n)||Sm(n)||Pm(n);return i&&t.push(i),t},[])}var fm=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|rsc||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,gm=/\((\S*)(?::(\d+))(?::(\d+))\)/;function hm(e){var r=fm.exec(e);if(!r)return null;var t=r[2]&&r[2].indexOf("native")===0,n=r[2]&&r[2].indexOf("eval")===0,i=gm.exec(r[2]);return n&&i!=null&&(r[2]=i[1],r[3]=i[2],r[4]=i[3]),{file:t?null:r[2],methodName:r[1]||xt,arguments:t?[r[2]]:[],lineNumber:r[3]?+r[3]:null,column:r[4]?+r[4]:null}}var ym=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|rsc|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function bm(e){var r=ym.exec(e);return r?{file:r[2],methodName:r[1]||xt,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var Em=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|rsc|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,wm=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function xm(e){var r=Em.exec(e);if(!r)return null;var t=r[3]&&r[3].indexOf(" > eval")>-1,n=wm.exec(r[3]);return t&&n!=null&&(r[3]=n[1],r[4]=n[2],r[5]=null),{file:r[3],methodName:r[1]||xt,arguments:r[2]?r[2].split(","):[],lineNumber:r[4]?+r[4]:null,column:r[5]?+r[5]:null}}var vm=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Pm(e){var r=vm.exec(e);return r?{file:r[3],methodName:r[1]||xt,arguments:[],lineNumber:+r[4],column:r[5]?+r[5]:null}:null}var Tm=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Sm(e){var r=Tm.exec(e);return r?{file:r[2],methodName:r[1]||xt,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var oo=class{getLocation(){return null}},so=class{_error;constructor(){this._error=new Error}getLocation(){let r=this._error.stack;if(!r)return null;let n=qa(r).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 oo:new so}var Va={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function $r(e={}){let r=Am(e);return Object.entries(r).reduce((n,[i,o])=>(Va[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Am(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Bn(e={}){return r=>(typeof e._count=="boolean"&&(r._count=r._count._all),r)}function ja(e,r){let t=Bn(e);return r({action:"aggregate",unpacker:t,argsMapper:$r})(e)}function Cm(e={}){let{select:r,...t}=e;return typeof r=="object"?$r({...t,_count:r}):$r({...t,_count:{_all:!0}})}function Im(e={}){return typeof e.select=="object"?r=>Bn(e)(r)._count:r=>Bn(e)(r)._count._all}function Ba(e,r){return r({action:"count",unpacker:Im(e),argsMapper:Cm})(e)}function Dm(e={}){let r=$r(e);if(Array.isArray(r.by))for(let t of r.by)typeof t=="string"&&(r.select[t]=!0);else typeof r.by=="string"&&(r.select[r.by]=!0);return r}function Om(e={}){return r=>(typeof e?._count=="boolean"&&r.forEach(t=>{t._count=t._count._all}),r)}function Ua(e,r){return r({action:"groupBy",unpacker:Om(e),argsMapper:Dm})(e)}function Ga(e,r,t){if(r==="aggregate")return n=>ja(n,t);if(r==="count")return n=>Ba(n,t);if(r==="groupBy")return n=>Ua(n,t)}function Qa(e,r){let t=r.fields.filter(i=>!i.relationName),n=Ms(t,"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 dt(e,o,s.type,s.isList,s.kind==="enum")},...jn(Object.keys(n))})}var Wa=e=>Array.isArray(e)?e:e.split("."),ao=(e,r)=>Wa(r).reduce((t,n)=>t&&t[n],e),Ja=(e,r,t)=>Wa(r).reduceRight((n,i,o,s)=>Object.assign({},ao(e,s.slice(0,o)),{[i]:n}),t);function km(e,r){return e===void 0||r===void 0?[]:[...r,"select",e]}function _m(e,r,t){return r===void 0?e??{}:Ja(r,t,e||!0)}function lo(e,r,t,n,i,o){let a=e._runtimeDataModel.models[r].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ze(e._errorFormat),c=km(n,i),p=_m(l,o,c),d=t({dataPath:c,callsite:u})(p),f=Nm(e,r);return new Proxy(d,{get(h,g){if(!f.includes(g))return h[g];let T=[a[g].type,t,g],S=[c,p];return lo(e,...T,...S)},...jn([...f,...Object.getOwnPropertyNames(d)])})}}function Nm(e,r){return e._runtimeDataModel.models[r].fields.filter(t=>t.kind==="object").map(t=>t.name)}var Lm=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Fm=["aggregate","count","groupBy"];function uo(e,r){let t=e._extensions.getAllModelExtensions(r)??{},n=[Mm(e,r),qm(e,r),wt(t),re("name",()=>r),re("$name",()=>r),re("$parent",()=>e._appliedParent)];return he({},n)}function Mm(e,r){let t=Te(r),n=Object.keys(Sr).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let u=Ze(e._errorFormat);return e._createPrismaPromise(c=>{let p={args:l,dataPath:[],action:o,model:r,clientMethod:`${t}.${i}`,jsModelName:t,transaction:c,callsite:u};return e._request({...p,...a})},{action:o,args:l,model:r})};return Lm.includes(o)?lo(e,r,s):$m(i)?Ga(e,i,s):s({})}}}function $m(e){return Fm.includes(e)}function qm(e,r){return lr(re("fields",()=>{let t=e._runtimeDataModel.models[r];return Qa(r,t)}))}function Ka(e){return e.replace(/^./,r=>r.toUpperCase())}var co=Symbol();function vt(e){let r=[Vm(e),jm(e),re(co,()=>e),re("$parent",()=>e._appliedParent)],t=e._extensions.getAllClientExtensions();return t&&r.push(wt(t)),he(e,r)}function Vm(e){let r=Object.getPrototypeOf(e._originalClient),t=[...new Set(Object.getOwnPropertyNames(r))];return{getKeys(){return t},getPropertyValue(n){return e[n]}}}function jm(e){let r=Object.keys(e._runtimeDataModel.models),t=r.map(Te),n=[...new Set(r.concat(t))];return lr({getKeys(){return n},getPropertyValue(i){let o=Ka(i);if(e._runtimeDataModel.models[o]!==void 0)return uo(e,o);if(e._runtimeDataModel.models[i]!==void 0)return uo(e,i)},getPropertyDescriptor(i){if(!t.includes(i))return{enumerable:!1}}})}function Ha(e){return e[co]?e[co]:e}function Ya(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let t=e.client.__AccelerateEngine;this._originalClient._engine=new t(this._originalClient._accelerateEngineConfig)}let r=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return vt(r)}function za({result:e,modelName:r,select:t,omit:n,extensions:i}){let o=i.getAllComputedFields(r);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(Lr(u))}else if(t){if(!t[l.name])continue;let u=l.needs.filter(c=>!t[c]);u.length>0&&a.push(Lr(u))}Bm(e,l.needs)&&s.push(Um(l,he(e,s)))}return s.length>0||a.length>0?he(e,[...s,...a]):e}function Bm(e,r){return r.every(t=>Vi(e,t))}function Um(e,r){return lr(re(e.name,()=>e.compute(r)))}function Un({visitor:e,result:r,args:t,runtimeDataModel:n,modelName:i}){if(Array.isArray(r)){for(let s=0;sc.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};r[o]=Un({visitor:i,result:r[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Xa({result:e,modelName:r,args:t,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[r]?e:Un({result:e,args:t??{},modelName:r,runtimeDataModel:i,visitor:(a,l,u)=>{let c=Te(l);return za({result:a,modelName:c,select:u.select,omit:u.select?void 0:{...o?.[c],...u.omit},extensions:n})}})}var Gm=["$connect","$disconnect","$on","$transaction","$extends"],el=Gm;function rl(e){if(e instanceof oe)return Qm(e);if(qn(e))return Wm(e);if(Array.isArray(e)){let t=[e[0]];for(let n=1;n{let o=r.customDataProxyFetch;return"transaction"in r&&i!==void 0&&(r.transaction?.kind==="batch"&&r.transaction.lock.then(),r.transaction=i),n===t.length?e._executeRequest(r):t[n]({model:r.model,operation:r.model?r.action:r.clientMethod,args:rl(r.args??{}),__internalParams:r,query:(s,a=r)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=al(o,l),a.args=s,nl(e,a,t,n+1)}})})}function il(e,r){let{jsModelName:t,action:n,clientMethod:i}=r,o=t?n:i;if(e._extensions.isEmpty())return e._executeRequest(r);let s=e._extensions.getAllQueryCallbacks(t??"$none",o);return nl(e,r,s)}function ol(e){return r=>{let t={requests:r},n=r[0].extensions.getAllBatchQueryCallbacks();return n.length?sl(t,n,0,e):e(t)}}function sl(e,r,t,n){if(t===r.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return r[t]({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=al(i,l),sl(a,r,t+1,n)}})}var tl=e=>e;function al(e=tl,r=tl){return t=>e(r(t))}var ll=N("prisma:client"),ul={Vercel:"vercel","Netlify CI":"netlify"};function cl({postinstall:e,ciName:r,clientVersion:t}){if(ll("checkPlatformCaching:postinstall",e),ll("checkPlatformCaching:ciName",r),e===!0&&r&&r in ul){let n=`Prisma has detected that this project was built on ${r}, 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/${ul[r]}-build`;throw console.error(n),new v(n,t)}}function pl(e,r){return e?e.datasources?e.datasources:e.datasourceUrl?{[r[0]]:{url:e.datasourceUrl}}:{}:{}}var Jm=()=>globalThis.process?.release?.name==="node",Km=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Hm=()=>!!globalThis.Deno,Ym=()=>typeof globalThis.Netlify=="object",zm=()=>typeof globalThis.EdgeRuntime=="object",Zm=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Xm(){return[[Ym,"netlify"],[zm,"edge-light"],[Zm,"workerd"],[Hm,"deno"],[Km,"bun"],[Jm,"node"]].flatMap(t=>t[0]()?[t[1]]:[]).at(0)??""}var ef={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 Gn(){let e=Xm();return{id:e,prettyName:ef[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var hl=A(require("node:fs")),Tt=A(require("node:path"));function Qn(e){let{runtimeBinaryTarget:r}=e;return`Add "${r}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: +Learn how: https://pris.ly/d/${ul[r]}-build`;throw console.error(n),new P(n,t)}}function pl(e,r){return e?e.datasources?e.datasources:e.datasourceUrl?{[r[0]]:{url:e.datasourceUrl}}:{}:{}}var Jm=()=>globalThis.process?.release?.name==="node",Km=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Hm=()=>!!globalThis.Deno,Ym=()=>typeof globalThis.Netlify=="object",zm=()=>typeof globalThis.EdgeRuntime=="object",Zm=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Xm(){return[[Ym,"netlify"],[zm,"edge-light"],[Zm,"workerd"],[Hm,"deno"],[Km,"bun"],[Jm,"node"]].flatMap(t=>t[0]()?[t[1]]:[]).at(0)??""}var ef={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 Gn(){let e=Xm();return{id:e,prettyName:ef[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var hl=A(require("node:fs")),Tt=A(require("node:path"));function Qn(e){let{runtimeBinaryTarget:r}=e;return`Add "${r}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: ${rf(e)}`}function rf(e){let{generator:r,generatorBinaryTargets:t,runtimeBinaryTarget:n}=e,i={fromEnvVar:null,value:n},o=[...t,i];return ki({...r,binaryTargets:o})}function Xe(e){let{runtimeBinaryTarget:r}=e;return`Prisma Client could not locate the Query Engine for runtime "${r}".`}function er(e){let{searchedLocations:r}=e;return`The following locations have been searched: ${[...new Set(r)].map(i=>` ${i}`).join(` @@ -64,9 +64,9 @@ Ensure that you ran \`prisma generate\` and that "${r}" has been copied to "${e. ${Wn("engine-not-found-tooling-investigation")} -${er(e)}`}var tf=N("prisma:client:engines:resolveEnginePath"),nf=()=>new RegExp("runtime[\\\\/]library\\.m?js$");async function yl(e,r){let t={binary:process.env.PRISMA_QUERY_ENGINE_BINARY,library:process.env.PRISMA_QUERY_ENGINE_LIBRARY}[e]??r.prismaPath;if(t!==void 0)return t;let{enginePath:n,searchedLocations:i}=await of(e,r);if(tf("enginePath",n),n!==void 0&&e==="binary"&&Ri(n),n!==void 0)return r.prismaPath=n;let o=await ir(),s=r.generator?.binaryTargets??[],a=s.some(d=>d.native),l=!s.some(d=>d.value===o),u=__filename.match(nf())===null,c={searchedLocations:i,generatorBinaryTargets:s,generator:r.generator,runtimeBinaryTarget:o,queryEngineName:bl(e,o),expectedLocation:Tt.default.relative(process.cwd(),r.dirname),errorStack:new Error().stack},p;throw a&&l?p=fl(c):l?p=dl(c):u?p=ml(c):p=gl(c),new v(p,r.clientVersion)}async function of(e,r){let t=await ir(),n=[],i=[r.dirname,Tt.default.resolve(__dirname,".."),r.generator?.output?.value??__dirname,Tt.default.resolve(__dirname,"../../../.prisma/client"),"/tmp/prisma-engines",r.cwd];__filename.includes("resolveEnginePath")&&i.push(fs());for(let o of i){let s=bl(e,t),a=Tt.default.join(o,s);if(n.push(o),hl.default.existsSync(a))return{enginePath:a,searchedLocations:n}}return{enginePath:void 0,searchedLocations:n}}function bl(e,r){return e==="library"?Ut(r,"fs"):`query-engine-${r}${r==="windows"?".exe":""}`}var po=A(Ni());function El(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,r=>`${r[0]}5`):""}function wl(e){return e.split(` +${er(e)}`}var tf=N("prisma:client:engines:resolveEnginePath"),nf=()=>new RegExp("runtime[\\\\/]library\\.m?js$");async function yl(e,r){let t={binary:process.env.PRISMA_QUERY_ENGINE_BINARY,library:process.env.PRISMA_QUERY_ENGINE_LIBRARY}[e]??r.prismaPath;if(t!==void 0)return t;let{enginePath:n,searchedLocations:i}=await of(e,r);if(tf("enginePath",n),n!==void 0&&e==="binary"&&Ri(n),n!==void 0)return r.prismaPath=n;let o=await ir(),s=r.generator?.binaryTargets??[],a=s.some(d=>d.native),l=!s.some(d=>d.value===o),u=__filename.match(nf())===null,c={searchedLocations:i,generatorBinaryTargets:s,generator:r.generator,runtimeBinaryTarget:o,queryEngineName:bl(e,o),expectedLocation:Tt.default.relative(process.cwd(),r.dirname),errorStack:new Error().stack},p;throw a&&l?p=fl(c):l?p=dl(c):u?p=ml(c):p=gl(c),new P(p,r.clientVersion)}async function of(e,r){let t=await ir(),n=[],i=[r.dirname,Tt.default.resolve(__dirname,".."),r.generator?.output?.value??__dirname,Tt.default.resolve(__dirname,"../../../.prisma/client"),"/tmp/prisma-engines",r.cwd];__filename.includes("resolveEnginePath")&&i.push(fs());for(let o of i){let s=bl(e,t),a=Tt.default.join(o,s);if(n.push(o),hl.default.existsSync(a))return{enginePath:a,searchedLocations:n}}return{enginePath:void 0,searchedLocations:n}}function bl(e,r){return e==="library"?Ut(r,"fs"):`query-engine-${r}${r==="windows"?".exe":""}`}var po=A(Ni());function El(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,r=>`${r[0]}5`):""}function wl(e){return e.split(` `).map(r=>r.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 xl=A(Ls());function Pl({title:e,user:r="prisma",repo:t="prisma",template:n="bug_report.yml",body:i}){return(0,xl.default)({user:r,repo:t,template:n,title:e,body:i})}function vl({version:e,binaryTarget:r,title:t,description:n,engineVersion:i,database:o,query:s}){let a=Uo(6e3-(s?.length??0)),l=wl((0,po.default)(a)),u=n?`# Description +`)}var xl=A(Ls());function vl({title:e,user:r="prisma",repo:t="prisma",template:n="bug_report.yml",body:i}){return(0,xl.default)({user:r,repo:t,template:n,title:e,body:i})}function Pl({version:e,binaryTarget:r,title:t,description:n,engineVersion:i,database:o,query:s}){let a=Uo(6e3-(s?.length??0)),l=wl((0,po.default)(a)),u=n?`# Description \`\`\` ${n} \`\`\``:"",c=(0,po.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: @@ -101,7 +101,7 @@ ${l} \`\`\` ${s?El(s):""} \`\`\` -`),p=Pl({title:t,body:c});return`${t} +`),p=vl({title:t,body:c});return`${t} This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. @@ -110,10 +110,10 @@ ${Y(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 Tl(e,r){throw new Error(r)}function sf(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function af(e,r){let t={};for(let n of Object.keys(e))t[n]=r(e[n],n);return t}function qr(e){return e===null?e:Array.isArray(e)?e.map(qr):typeof e=="object"?sf(e)?lf(e):e.constructor!==null&&e.constructor.name!=="Object"?e:af(e,qr):e}function lf({$type:e,value:r}){switch(e){case"BigInt":return BigInt(r);case"Bytes":{let{buffer:t,byteOffset:n,byteLength:i}=Buffer.from(r,"base64");return new Uint8Array(t,n,i)}case"DateTime":return new Date(r);case"Decimal":return new Le(r);case"Json":return JSON.parse(r);default:Tl(r,"Unknown tagged value")}}var Sl="6.14.0";function Vr({inlineDatasources:e,overrideDatasources:r,env:t,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=r[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=t[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}var Kn=class extends Error{clientVersion;cause;constructor(r,t){super(r),this.clientVersion=t.clientVersion,this.cause=t.cause}get[Symbol.toStringTag](){return this.name}};var se=class extends Kn{isRetryable;constructor(r,t){super(r,t),this.isRetryable=t.isRetryable??!0}};function R(e,r){return{...e,isRetryable:r}}var ur=class extends se{name="InvalidDatasourceError";code="P6001";constructor(r,t){super(r,R(t,!1))}};x(ur,"InvalidDatasourceError");function Rl(e){let r={clientVersion:e.clientVersion},t=Object.keys(e.inlineDatasources)[0],n=Vr({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof process<"u"?process.env:{}}}),i;try{i=new URL(n)}catch{throw new ur(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,r)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==on)throw new ur(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,r);let a=s.get("api_key");if(a===null||a.length<1)throw new ur(`Error validating datasource \`${t}\`: the URL must contain a valid API key`,r);let l=Ii(i)?"http:":"https:",u=new URL(i.href.replace(o,l));return{apiKey:a,url:u}}var Al=A(nn()),Hn=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:r,tracingHelper:t,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=r,this.tracingHelper=t,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:r,transactionId:t}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Al.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=r??this.tracingHelper.getTraceParent()),t&&(n["X-Transaction-Id"]=t);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let r=[];return this.tracingHelper.isEnabled()&&r.push("tracing"),this.logLevel&&r.push(this.logLevel),this.logQueries&&r.push("query"),r}};function cf(e){return e[0]*1e3+e[1]/1e6}function mo(e){return new Date(cf(e))}var jr=class extends se{name="ForcedRetryError";code="P5001";constructor(r){super("This request must be retried",R(r,!0))}};x(jr,"ForcedRetryError");var cr=class extends se{name="NotImplementedYetError";code="P5004";constructor(r,t){super(r,R(t,!1))}};x(cr,"NotImplementedYetError");var $=class extends se{response;constructor(r,t){super(r,t),this.response=t.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 pr=class extends ${name="SchemaMissingError";code="P5005";constructor(r){super("Schema needs to be uploaded",R(r,!0))}};x(pr,"SchemaMissingError");var fo="This request could not be understood by the server",St=class extends ${name="BadRequestError";code="P5000";constructor(r,t,n){super(t||fo,R(r,!1)),n&&(this.code=n)}};x(St,"BadRequestError");var Rt=class extends ${name="HealthcheckTimeoutError";code="P5013";logs;constructor(r,t){super("Engine not started: healthcheck timeout",R(r,!0)),this.logs=t}};x(Rt,"HealthcheckTimeoutError");var At=class extends ${name="EngineStartupError";code="P5014";logs;constructor(r,t,n){super(t,R(r,!0)),this.logs=n}};x(At,"EngineStartupError");var Ct=class extends ${name="EngineVersionNotSupportedError";code="P5012";constructor(r){super("Engine version is not supported",R(r,!1))}};x(Ct,"EngineVersionNotSupportedError");var go="Request timed out",It=class extends ${name="GatewayTimeoutError";code="P5009";constructor(r,t=go){super(t,R(r,!1))}};x(It,"GatewayTimeoutError");var pf="Interactive transaction error",Dt=class extends ${name="InteractiveTransactionError";code="P5015";constructor(r,t=pf){super(t,R(r,!1))}};x(Dt,"InteractiveTransactionError");var df="Request parameters are invalid",Ot=class extends ${name="InvalidRequestError";code="P5011";constructor(r,t=df){super(t,R(r,!1))}};x(Ot,"InvalidRequestError");var ho="Requested resource does not exist",kt=class extends ${name="NotFoundError";code="P5003";constructor(r,t=ho){super(t,R(r,!1))}};x(kt,"NotFoundError");var yo="Unknown server error",Br=class extends ${name="ServerError";code="P5006";logs;constructor(r,t,n){super(t||yo,R(r,!0)),this.logs=n}};x(Br,"ServerError");var bo="Unauthorized, check your connection string",_t=class extends ${name="UnauthorizedError";code="P5007";constructor(r,t=bo){super(t,R(r,!1))}};x(_t,"UnauthorizedError");var Eo="Usage exceeded, retry again later",Nt=class extends ${name="UsageExceededError";code="P5008";constructor(r,t=Eo){super(t,R(r,!0))}};x(Nt,"UsageExceededError");async function mf(e){let r;try{r=await e.text()}catch{return{type:"EmptyError"}}try{let t=JSON.parse(r);if(typeof t=="string")switch(t){case"InternalDataProxyError":return{type:"DataProxyError",body:t};default:return{type:"UnknownTextError",body:t}}if(typeof t=="object"&&t!==null){if("is_panic"in t&&"message"in t&&"error_code"in t)return{type:"QueryEngineError",body:t};if("EngineNotStarted"in t||"InteractiveTransactionMisrouted"in t||"InvalidRequestError"in t){let n=Object.values(t)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:t}:{type:"DataProxyError",body:t}}}return{type:"UnknownJsonError",body:t}}catch{return r===""?{type:"EmptyError"}:{type:"UnknownTextError",body:r}}}async function Lt(e,r){if(e.ok)return;let t={clientVersion:r,response:e},n=await mf(e);if(n.type==="QueryEngineError")throw new z(n.body.message,{code:n.body.error_code,clientVersion:r});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Br(t,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new pr(t);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Ct(t);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new At(t,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new v(i,r,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Rt(t,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 Dt(t,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Ot(t,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new _t(t,Ur(bo,n));if(e.status===404)return new kt(t,Ur(ho,n));if(e.status===429)throw new Nt(t,Ur(Eo,n));if(e.status===504)throw new It(t,Ur(go,n));if(e.status>=500)throw new Br(t,Ur(yo,n));if(e.status>=400)throw new St(t,Ur(fo,n))}function Ur(e,r){return r.type==="EmptyError"?e:`${e}: ${JSON.stringify(r)}`}function Cl(e){let r=Math.pow(2,e)*50,t=Math.ceil(Math.random()*r)-Math.ceil(r/2),n=r+t;return new Promise(i=>setTimeout(()=>i(n),n))}var $e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Il(e){let r=new TextEncoder().encode(e),t="",n=r.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,t+=$e[s]+$e[a]+$e[l]+$e[u];return i==1?(c=r[o],s=(c&252)>>2,a=(c&3)<<4,t+=$e[s]+$e[a]+"=="):i==2&&(c=r[o]<<8|r[o+1],s=(c&64512)>>10,a=(c&1008)>>4,l=(c&15)<<2,t+=$e[s]+$e[a]+$e[l]+"="),t}function Dl(e){if(!!e.generator?.previewFeatures.some(t=>t.toLowerCase().includes("metrics")))throw new v("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 Ol={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var Ft=class extends se{name="RequestError";code="P5010";constructor(r,t){super(`Cannot fetch data from service: -${r}`,R(t,!0))}};x(Ft,"RequestError");async function dr(e,r,t=n=>n){let{clientVersion:n,...i}=r,o=t(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new Ft(a,{clientVersion:n,cause:s})}}var gf=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,kl=N("prisma:client:dataproxyEngine");async function hf(e,r){let t=Ol["@prisma/engines-version"],n=r.clientVersion??"unknown";if(process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.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&&gf.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=t.split("-")??[],[a,l,u]=s.split("."),c=yf(`<=${a}.${l}.${u}`),p=await dr(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();kl("length of body fetched from unpkg.com",d.length);let f;try{f=JSON.parse(d)}catch(h){throw console.error("JSON.parse error: body fetched from unpkg.com: ",d),h}return f.version}throw new cr("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function _l(e,r){let t=await hf(e,r);return kl("version",t),t}function yf(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Nl=3,Mt=N("prisma:client:dataproxyEngine"),$t=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(r){Dl(r),this.config=r,this.env=r.env,this.inlineSchema=Il(r.inlineSchema),this.inlineDatasources=r.inlineDatasources,this.inlineSchemaHash=r.inlineSchemaHash,this.clientVersion=r.clientVersion,this.engineHash=r.engineVersion,this.logEmitter=r.logEmitter,this.tracingHelper=r.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:r,url:t}=this.getURLAndAPIKey();this.host=t.host,this.protocol=t.protocol,this.headerBuilder=new Hn({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await _l(this.host,this.config),Mt("host",this.host),Mt("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(r){r?.logs?.length&&r.logs.forEach(t=>{switch(t.level){case"debug":case"trace":Mt(t);break;case"error":case"warn":case"info":{this.logEmitter.emit(t.level,{timestamp:mo(t.timestamp),message:t.attributes.message??"",target:t.target});break}case"query":{this.logEmitter.emit("query",{query:t.attributes.query??"",timestamp:mo(t.timestamp),duration:t.attributes.duration_ms??0,params:t.attributes.params??"",target:t.target});break}default:t.level}}),r?.traces?.length&&this.tracingHelper.dispatchEngineSpans(r.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(r){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${r}`}async uploadSchema(){let r={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(r,async()=>{let t=await dr(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});t.ok||Mt("schema response status",t.status);let n=await Lt(t,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(r,{traceparent:t,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:r,traceparent:t,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(r,{traceparent:t,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Fr(r,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:t})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:r,traceparent:t,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 dr(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t,transactionId:i?.id}),body:JSON.stringify(r),clientVersion:this.clientVersion},n);a.ok||Mt("graphql response status",a.status),await this.handleError(await Lt(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(r,t,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[r]} transaction`,callback:async({logHttpCall:o})=>{if(r==="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 dr(a,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Lt(l,this.clientVersion));let u=await l.json(),{extensions:c}=u;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}/${r}`;o(s);let a=await dr(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Lt(a,this.clientVersion));let l=await a.json(),{extensions:u}=l;u&&this.propagateResponseExtensions(u);return}}})}getURLAndAPIKey(){return Rl({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new cr("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(r){for(let t=0;;t++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${t})`,timestamp:new Date,target:""})};try{return await r.callback({logHttpCall:n})}catch(i){if(!(i instanceof se)||!i.isRetryable)throw i;if(t>=Nl)throw i instanceof jr?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${t+1}/${Nl} failed for ${r.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Cl(t);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(r){if(r instanceof pr)throw await this.uploadSchema(),new jr({clientVersion:this.clientVersion,cause:r});if(r)throw r}convertProtocolErrorsToClientError(r){return r.length===1?Mr(r[0],this.config.clientVersion,this.config.activeProvider):new V(JSON.stringify(r),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Ll(e){if(e?.kind==="itx")return e.options.id}var xo=A(require("node:os")),Fl=A(require("node:path"));var wo=Symbol("PrismaLibraryEngineCache");function bf(){let e=globalThis;return e[wo]===void 0&&(e[wo]={}),e[wo]}function Ef(e){let r=bf();if(r[e]!==void 0)return r[e];let t=Fl.default.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=xo.default.constants.dlopen.RTLD_LAZY|xo.default.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,t,i),r[e]=n.exports,n.exports}var Ml={async loadLibrary(e){let r=await fi(),t=await yl("library",e);try{return e.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>Ef(t))}catch(n){let i=Ai({e:n,platformInfo:r,id:t});throw new v(i,e.clientVersion)}}};var Po,$l={async loadLibrary(e){let{clientVersion:r,adapter:t,engineWasm:n}=e;if(t===void 0)throw new v(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Gn().prettyName})`,r);if(n===void 0)throw new v("WASM engine was unexpectedly `undefined`",r);Po===void 0&&(Po=(async()=>{let o=await n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new v("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",r);let a={"./query_engine_bg.js":o},l=new WebAssembly.Instance(s,a),u=l.exports.__wbindgen_start;return o.__wbg_set_wasm(l.exports),u(),o.QueryEngine})());let i=await Po;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var wf="P2036",Re=N("prisma:client:libraryEngine");function xf(e){return e.item_type==="query"&&"query"in e}function Pf(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var ql=[...li,"native"],vf=0xffffffffffffffffn,vo=1n;function Tf(){let e=vo++;return vo>vf&&(vo=1n),e}var Gr=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(r,t){this.libraryLoader=t??Ml,r.engineWasm!==void 0&&(this.libraryLoader=t??$l),this.config=r,this.libraryStarted=!1,this.logQueries=r.logQueries??!1,this.logLevel=r.logLevel??"error",this.logEmitter=r.logEmitter,this.datamodel=r.inlineSchema,this.tracingHelper=r.tracingHelper,r.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(r.overrideDatasources)[0],i=r.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(r){return{applyPendingMigrations:r.applyPendingMigrations?.bind(r),commitTransaction:this.withRequestId(r.commitTransaction.bind(r)),connect:this.withRequestId(r.connect.bind(r)),disconnect:this.withRequestId(r.disconnect.bind(r)),metrics:r.metrics?.bind(r),query:this.withRequestId(r.query.bind(r)),rollbackTransaction:this.withRequestId(r.rollbackTransaction.bind(r)),sdlSchema:r.sdlSchema?.bind(r),startTransaction:this.withRequestId(r.startTransaction.bind(r)),trace:r.trace.bind(r),free:r.free?.bind(r)}}withRequestId(r){return async(...t)=>{let n=Tf().toString();try{return await r(...t,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(r,t,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(t),s;if(r==="start"){let l=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(l,o)}else r==="commit"?s=await this.engine?.commitTransaction(n.id,o):r==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(Sf(a)){let l=this.getExternalAdapterError(a,i?.errorRegistry);throw l?l.error:new z(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new V(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(Re("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;ai(),this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){{if(this.binaryTarget)return this.binaryTarget;let r=await this.tracingHelper.runInChildSpan("detect_platform",()=>ir());if(!ql.includes(r))throw new v(`Unknown ${ce("PRISMA_QUERY_ENGINE_LIBRARY")} ${ce(W(r))}. Possible binaryTargets: ${qe(ql.join(", "))} or a path to the query engine library. -You may have to run ${qe("prisma generate")} for your changes to take effect.`,this.config.clientVersion);return r}}parseEngineResponse(r){if(!r)throw new V("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(r)}catch{throw new V("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 r=new WeakRef(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(rn));let t=await this.adapterPromise;t&&Re("Using driver adapter: %O",t),this.engine=this.wrapEngine(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",enableTracing:this.tracingHelper.isEnabled()},n=>{r.deref()?.logger(n)},t))}catch(r){let t=r,n=this.parseInitError(t.message);throw typeof n=="string"?t:new v(n.message,this.config.clientVersion,n.error_code)}}}logger(r){let t=this.parseEngineResponse(r);t&&(t.level=t?.level.toLowerCase()??"unknown",xf(t)?this.logEmitter.emit("query",{timestamp:new Date,query:t.query,params:t.params,duration:Number(t.duration_ms),target:t.module_path}):Pf(t)?this.loggerRustPanic=new le(To(this,`${t.message}: ${t.reason} in ${t.file}:${t.line}:${t.column}`),this.config.clientVersion):this.logEmitter.emit(t.level,{timestamp:new Date,message:t.message,target:t.module_path}))}parseInitError(r){try{return JSON.parse(r)}catch{}return r}parseRequestError(r){try{return JSON.parse(r)}catch{}return r}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(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Re(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let r=async()=>{Re("library starting");try{let t={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(t)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(rn)),await this.adapterPromise,Re("library started")}catch(t){let n=this.parseInitError(t.message);throw typeof n=="string"?t:new v(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",r),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Re("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let r=async()=>{await new Promise(n=>setImmediate(n)),Re("library stopping");let t={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(t)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,Re("library stopped")};return this.libraryStoppingPromise=this.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:t,interactiveTransaction:n}){Re(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:t}),o=JSON.stringify(r);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new V(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof v)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new le(To(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new V(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(r,{transaction:t,traceparent:n}){Re("requestBatch");let i=Fr(r,t);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),Ll(t));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new V(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],o?.errorRegistry):{data:c});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(a))}buildQueryError(r,t){if(r.user_facing_error.is_panic)return new le(To(this,r.user_facing_error.message),this.config.clientVersion);let n=this.getExternalAdapterError(r.user_facing_error,t);return n?n.error:Mr(r,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(r,t){if(r.error_code===wf&&t){let n=r.meta?.id;an(typeof n=="number","Malformed external JS error received from the engine");let i=t.consumeError(n);return an(i,"External error with reported id was not registered"),i}}async metrics(r){await this.start();let t=await this.engine.metrics(JSON.stringify(r));return r.format==="prometheus"?t:this.parseEngineResponse(t)}};function Sf(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function To(e,r){return vl({binaryTarget:e.binaryTarget,title:r,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function Vl({url:e,adapter:r,copyEngine:t,targetBuildType:n}){let i=[],o=[],s=g=>{i.push({_tag:"warning",value:g})},a=g=>{let D=g.join(` +`}function Tl(e,r){throw new Error(r)}function sf(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function af(e,r){let t={};for(let n of Object.keys(e))t[n]=r(e[n],n);return t}function qr(e){return e===null?e:Array.isArray(e)?e.map(qr):typeof e=="object"?sf(e)?lf(e):e.constructor!==null&&e.constructor.name!=="Object"?e:af(e,qr):e}function lf({$type:e,value:r}){switch(e){case"BigInt":return BigInt(r);case"Bytes":{let{buffer:t,byteOffset:n,byteLength:i}=Buffer.from(r,"base64");return new Uint8Array(t,n,i)}case"DateTime":return new Date(r);case"Decimal":return new Le(r);case"Json":return JSON.parse(r);default:Tl(r,"Unknown tagged value")}}var Sl="6.15.0";function Vr({inlineDatasources:e,overrideDatasources:r,env:t,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=r[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=t[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new P(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new P("error: Missing URL environment variable, value, or override.",n);return i}var Kn=class extends Error{clientVersion;cause;constructor(r,t){super(r),this.clientVersion=t.clientVersion,this.cause=t.cause}get[Symbol.toStringTag](){return this.name}};var se=class extends Kn{isRetryable;constructor(r,t){super(r,t),this.isRetryable=t.isRetryable??!0}};function R(e,r){return{...e,isRetryable:r}}var ur=class extends se{name="InvalidDatasourceError";code="P6001";constructor(r,t){super(r,R(t,!1))}};x(ur,"InvalidDatasourceError");function Rl(e){let r={clientVersion:e.clientVersion},t=Object.keys(e.inlineDatasources)[0],n=Vr({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof process<"u"?process.env:{}}}),i;try{i=new URL(n)}catch{throw new ur(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,r)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==on)throw new ur(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,r);let a=s.get("api_key");if(a===null||a.length<1)throw new ur(`Error validating datasource \`${t}\`: the URL must contain a valid API key`,r);let l=Ii(i)?"http:":"https:",u=new URL(i.href.replace(o,l));return{apiKey:a,url:u}}var Al=A(nn()),Hn=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:r,tracingHelper:t,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=r,this.tracingHelper=t,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:r,transactionId:t}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Al.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=r??this.tracingHelper.getTraceParent()),t&&(n["X-Transaction-Id"]=t);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let r=[];return this.tracingHelper.isEnabled()&&r.push("tracing"),this.logLevel&&r.push(this.logLevel),this.logQueries&&r.push("query"),r}};function cf(e){return e[0]*1e3+e[1]/1e6}function mo(e){return new Date(cf(e))}var jr=class extends se{name="ForcedRetryError";code="P5001";constructor(r){super("This request must be retried",R(r,!0))}};x(jr,"ForcedRetryError");var cr=class extends se{name="NotImplementedYetError";code="P5004";constructor(r,t){super(r,R(t,!1))}};x(cr,"NotImplementedYetError");var $=class extends se{response;constructor(r,t){super(r,t),this.response=t.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 pr=class extends ${name="SchemaMissingError";code="P5005";constructor(r){super("Schema needs to be uploaded",R(r,!0))}};x(pr,"SchemaMissingError");var fo="This request could not be understood by the server",St=class extends ${name="BadRequestError";code="P5000";constructor(r,t,n){super(t||fo,R(r,!1)),n&&(this.code=n)}};x(St,"BadRequestError");var Rt=class extends ${name="HealthcheckTimeoutError";code="P5013";logs;constructor(r,t){super("Engine not started: healthcheck timeout",R(r,!0)),this.logs=t}};x(Rt,"HealthcheckTimeoutError");var At=class extends ${name="EngineStartupError";code="P5014";logs;constructor(r,t,n){super(t,R(r,!0)),this.logs=n}};x(At,"EngineStartupError");var Ct=class extends ${name="EngineVersionNotSupportedError";code="P5012";constructor(r){super("Engine version is not supported",R(r,!1))}};x(Ct,"EngineVersionNotSupportedError");var go="Request timed out",It=class extends ${name="GatewayTimeoutError";code="P5009";constructor(r,t=go){super(t,R(r,!1))}};x(It,"GatewayTimeoutError");var pf="Interactive transaction error",Dt=class extends ${name="InteractiveTransactionError";code="P5015";constructor(r,t=pf){super(t,R(r,!1))}};x(Dt,"InteractiveTransactionError");var df="Request parameters are invalid",Ot=class extends ${name="InvalidRequestError";code="P5011";constructor(r,t=df){super(t,R(r,!1))}};x(Ot,"InvalidRequestError");var ho="Requested resource does not exist",kt=class extends ${name="NotFoundError";code="P5003";constructor(r,t=ho){super(t,R(r,!1))}};x(kt,"NotFoundError");var yo="Unknown server error",Br=class extends ${name="ServerError";code="P5006";logs;constructor(r,t,n){super(t||yo,R(r,!0)),this.logs=n}};x(Br,"ServerError");var bo="Unauthorized, check your connection string",_t=class extends ${name="UnauthorizedError";code="P5007";constructor(r,t=bo){super(t,R(r,!1))}};x(_t,"UnauthorizedError");var Eo="Usage exceeded, retry again later",Nt=class extends ${name="UsageExceededError";code="P5008";constructor(r,t=Eo){super(t,R(r,!0))}};x(Nt,"UsageExceededError");async function mf(e){let r;try{r=await e.text()}catch{return{type:"EmptyError"}}try{let t=JSON.parse(r);if(typeof t=="string")switch(t){case"InternalDataProxyError":return{type:"DataProxyError",body:t};default:return{type:"UnknownTextError",body:t}}if(typeof t=="object"&&t!==null){if("is_panic"in t&&"message"in t&&"error_code"in t)return{type:"QueryEngineError",body:t};if("EngineNotStarted"in t||"InteractiveTransactionMisrouted"in t||"InvalidRequestError"in t){let n=Object.values(t)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:t}:{type:"DataProxyError",body:t}}}return{type:"UnknownJsonError",body:t}}catch{return r===""?{type:"EmptyError"}:{type:"UnknownTextError",body:r}}}async function Lt(e,r){if(e.ok)return;let t={clientVersion:r,response:e},n=await mf(e);if(n.type==="QueryEngineError")throw new z(n.body.message,{code:n.body.error_code,clientVersion:r});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Br(t,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new pr(t);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Ct(t);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new At(t,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new P(i,r,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Rt(t,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 Dt(t,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Ot(t,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new _t(t,Ur(bo,n));if(e.status===404)return new kt(t,Ur(ho,n));if(e.status===429)throw new Nt(t,Ur(Eo,n));if(e.status===504)throw new It(t,Ur(go,n));if(e.status>=500)throw new Br(t,Ur(yo,n));if(e.status>=400)throw new St(t,Ur(fo,n))}function Ur(e,r){return r.type==="EmptyError"?e:`${e}: ${JSON.stringify(r)}`}function Cl(e){let r=Math.pow(2,e)*50,t=Math.ceil(Math.random()*r)-Math.ceil(r/2),n=r+t;return new Promise(i=>setTimeout(()=>i(n),n))}var $e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Il(e){let r=new TextEncoder().encode(e),t="",n=r.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,t+=$e[s]+$e[a]+$e[l]+$e[u];return i==1?(c=r[o],s=(c&252)>>2,a=(c&3)<<4,t+=$e[s]+$e[a]+"=="):i==2&&(c=r[o]<<8|r[o+1],s=(c&64512)>>10,a=(c&1008)>>4,l=(c&15)<<2,t+=$e[s]+$e[a]+$e[l]+"="),t}function Dl(e){if(!!e.generator?.previewFeatures.some(t=>t.toLowerCase().includes("metrics")))throw new P("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 Ol={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var Ft=class extends se{name="RequestError";code="P5010";constructor(r,t){super(`Cannot fetch data from service: +${r}`,R(t,!0))}};x(Ft,"RequestError");async function dr(e,r,t=n=>n){let{clientVersion:n,...i}=r,o=t(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new Ft(a,{clientVersion:n,cause:s})}}var gf=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,kl=N("prisma:client:dataproxyEngine");async function hf(e,r){let t=Ol["@prisma/engines-version"],n=r.clientVersion??"unknown";if(process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.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&&gf.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=t.split("-")??[],[a,l,u]=s.split("."),c=yf(`<=${a}.${l}.${u}`),p=await dr(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();kl("length of body fetched from unpkg.com",d.length);let f;try{f=JSON.parse(d)}catch(h){throw console.error("JSON.parse error: body fetched from unpkg.com: ",d),h}return f.version}throw new cr("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function _l(e,r){let t=await hf(e,r);return kl("version",t),t}function yf(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Nl=3,Mt=N("prisma:client:dataproxyEngine"),$t=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(r){Dl(r),this.config=r,this.env=r.env,this.inlineSchema=Il(r.inlineSchema),this.inlineDatasources=r.inlineDatasources,this.inlineSchemaHash=r.inlineSchemaHash,this.clientVersion=r.clientVersion,this.engineHash=r.engineVersion,this.logEmitter=r.logEmitter,this.tracingHelper=r.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:r,url:t}=this.getURLAndAPIKey();this.host=t.host,this.protocol=t.protocol,this.headerBuilder=new Hn({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await _l(this.host,this.config),Mt("host",this.host),Mt("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(r){r?.logs?.length&&r.logs.forEach(t=>{switch(t.level){case"debug":case"trace":Mt(t);break;case"error":case"warn":case"info":{this.logEmitter.emit(t.level,{timestamp:mo(t.timestamp),message:t.attributes.message??"",target:t.target});break}case"query":{this.logEmitter.emit("query",{query:t.attributes.query??"",timestamp:mo(t.timestamp),duration:t.attributes.duration_ms??0,params:t.attributes.params??"",target:t.target});break}default:t.level}}),r?.traces?.length&&this.tracingHelper.dispatchEngineSpans(r.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(r){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${r}`}async uploadSchema(){let r={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(r,async()=>{let t=await dr(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});t.ok||Mt("schema response status",t.status);let n=await Lt(t,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(r,{traceparent:t,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:r,traceparent:t,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(r,{traceparent:t,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Fr(r,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:t})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:r,traceparent:t,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 dr(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t,transactionId:i?.id}),body:JSON.stringify(r),clientVersion:this.clientVersion},n);a.ok||Mt("graphql response status",a.status),await this.handleError(await Lt(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(r,t,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[r]} transaction`,callback:async({logHttpCall:o})=>{if(r==="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 dr(a,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Lt(l,this.clientVersion));let u=await l.json(),{extensions:c}=u;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}/${r}`;o(s);let a=await dr(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Lt(a,this.clientVersion));let l=await a.json(),{extensions:u}=l;u&&this.propagateResponseExtensions(u);return}}})}getURLAndAPIKey(){return Rl({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new cr("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(r){for(let t=0;;t++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${t})`,timestamp:new Date,target:""})};try{return await r.callback({logHttpCall:n})}catch(i){if(!(i instanceof se)||!i.isRetryable)throw i;if(t>=Nl)throw i instanceof jr?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${t+1}/${Nl} failed for ${r.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Cl(t);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(r){if(r instanceof pr)throw await this.uploadSchema(),new jr({clientVersion:this.clientVersion,cause:r});if(r)throw r}convertProtocolErrorsToClientError(r){return r.length===1?Mr(r[0],this.config.clientVersion,this.config.activeProvider):new V(JSON.stringify(r),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Ll(e){if(e?.kind==="itx")return e.options.id}var xo=A(require("node:os")),Fl=A(require("node:path"));var wo=Symbol("PrismaLibraryEngineCache");function bf(){let e=globalThis;return e[wo]===void 0&&(e[wo]={}),e[wo]}function Ef(e){let r=bf();if(r[e]!==void 0)return r[e];let t=Fl.default.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=xo.default.constants.dlopen.RTLD_LAZY|xo.default.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,t,i),r[e]=n.exports,n.exports}var Ml={async loadLibrary(e){let r=await fi(),t=await yl("library",e);try{return e.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>Ef(t))}catch(n){let i=Ai({e:n,platformInfo:r,id:t});throw new P(i,e.clientVersion)}}};var vo,$l={async loadLibrary(e){let{clientVersion:r,adapter:t,engineWasm:n}=e;if(t===void 0)throw new P(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Gn().prettyName})`,r);if(n===void 0)throw new P("WASM engine was unexpectedly `undefined`",r);vo===void 0&&(vo=(async()=>{let o=await n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new P("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",r);let a={"./query_engine_bg.js":o},l=new WebAssembly.Instance(s,a),u=l.exports.__wbindgen_start;return o.__wbg_set_wasm(l.exports),u(),o.QueryEngine})());let i=await vo;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var wf="P2036",Re=N("prisma:client:libraryEngine");function xf(e){return e.item_type==="query"&&"query"in e}function vf(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var ql=[...li,"native"],Pf=0xffffffffffffffffn,Po=1n;function Tf(){let e=Po++;return Po>Pf&&(Po=1n),e}var Gr=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(r,t){this.libraryLoader=t??Ml,r.engineWasm!==void 0&&(this.libraryLoader=t??$l),this.config=r,this.libraryStarted=!1,this.logQueries=r.logQueries??!1,this.logLevel=r.logLevel??"error",this.logEmitter=r.logEmitter,this.datamodel=r.inlineSchema,this.tracingHelper=r.tracingHelper,r.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(r.overrideDatasources)[0],i=r.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(r){return{applyPendingMigrations:r.applyPendingMigrations?.bind(r),commitTransaction:this.withRequestId(r.commitTransaction.bind(r)),connect:this.withRequestId(r.connect.bind(r)),disconnect:this.withRequestId(r.disconnect.bind(r)),metrics:r.metrics?.bind(r),query:this.withRequestId(r.query.bind(r)),rollbackTransaction:this.withRequestId(r.rollbackTransaction.bind(r)),sdlSchema:r.sdlSchema?.bind(r),startTransaction:this.withRequestId(r.startTransaction.bind(r)),trace:r.trace.bind(r),free:r.free?.bind(r)}}withRequestId(r){return async(...t)=>{let n=Tf().toString();try{return await r(...t,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(r,t,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(t),s;if(r==="start"){let l=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(l,o)}else r==="commit"?s=await this.engine?.commitTransaction(n.id,o):r==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(Sf(a)){let l=this.getExternalAdapterError(a,i?.errorRegistry);throw l?l.error:new z(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new V(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(Re("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;ai(),this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){{if(this.binaryTarget)return this.binaryTarget;let r=await this.tracingHelper.runInChildSpan("detect_platform",()=>ir());if(!ql.includes(r))throw new P(`Unknown ${ce("PRISMA_QUERY_ENGINE_LIBRARY")} ${ce(W(r))}. Possible binaryTargets: ${qe(ql.join(", "))} or a path to the query engine library. +You may have to run ${qe("prisma generate")} for your changes to take effect.`,this.config.clientVersion);return r}}parseEngineResponse(r){if(!r)throw new V("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(r)}catch{throw new V("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 r=new WeakRef(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(rn));let t=await this.adapterPromise;t&&Re("Using driver adapter: %O",t),this.engine=this.wrapEngine(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",enableTracing:this.tracingHelper.isEnabled()},n=>{r.deref()?.logger(n)},t))}catch(r){let t=r,n=this.parseInitError(t.message);throw typeof n=="string"?t:new P(n.message,this.config.clientVersion,n.error_code)}}}logger(r){let t=this.parseEngineResponse(r);t&&(t.level=t?.level.toLowerCase()??"unknown",xf(t)?this.logEmitter.emit("query",{timestamp:new Date,query:t.query,params:t.params,duration:Number(t.duration_ms),target:t.module_path}):vf(t)?this.loggerRustPanic=new le(To(this,`${t.message}: ${t.reason} in ${t.file}:${t.line}:${t.column}`),this.config.clientVersion):this.logEmitter.emit(t.level,{timestamp:new Date,message:t.message,target:t.module_path}))}parseInitError(r){try{return JSON.parse(r)}catch{}return r}parseRequestError(r){try{return JSON.parse(r)}catch{}return r}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(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Re(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let r=async()=>{Re("library starting");try{let t={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(t)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(rn)),await this.adapterPromise,Re("library started")}catch(t){let n=this.parseInitError(t.message);throw typeof n=="string"?t:new P(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",r),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Re("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let r=async()=>{await new Promise(n=>setImmediate(n)),Re("library stopping");let t={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(t)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,Re("library stopped")};return this.libraryStoppingPromise=this.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:t,interactiveTransaction:n}){Re(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:t}),o=JSON.stringify(r);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new V(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof P)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new le(To(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new V(`${a.message} +${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(r,{transaction:t,traceparent:n}){Re("requestBatch");let i=Fr(r,t);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),Ll(t));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new V(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],o?.errorRegistry):{data:c});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(a))}buildQueryError(r,t){if(r.user_facing_error.is_panic)return new le(To(this,r.user_facing_error.message),this.config.clientVersion);let n=this.getExternalAdapterError(r.user_facing_error,t);return n?n.error:Mr(r,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(r,t){if(r.error_code===wf&&t){let n=r.meta?.id;an(typeof n=="number","Malformed external JS error received from the engine");let i=t.consumeError(n);return an(i,"External error with reported id was not registered"),i}}async metrics(r){await this.start();let t=await this.engine.metrics(JSON.stringify(r));return r.format==="prometheus"?t:this.parseEngineResponse(t)}};function Sf(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function To(e,r){return Pl({binaryTarget:e.binaryTarget,title:r,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function Vl({url:e,adapter:r,copyEngine:t,targetBuildType:n}){let i=[],o=[],s=g=>{i.push({_tag:"warning",value:g})},a=g=>{let D=g.join(` `);o.push({_tag:"error",value:D})},l=!!e?.startsWith("prisma://"),u=sn(e),c=!!r,p=l||u;!c&&t&&p&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let d=p||!t;c&&(d||n==="edge")&&(n==="edge"?a(["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."]):t?l&&a(["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."]):a(["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."]));let f={accelerate:d,ppg:u,driverAdapters:c};function h(g){return g.length>0}return h(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:f}:{ok:!0,diagnostics:{warnings:i},isUsing:f}}function jl({copyEngine:e=!0},r){let t;try{t=Vr({inlineDatasources:r.inlineDatasources,overrideDatasources:r.overrideDatasources,env:{...r.env,...process.env},clientVersion:r.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Vl({url:t,adapter:r.adapter,copyEngine:e,targetBuildType:"library"});for(let p of o.warnings)st(...p.value);if(!n){let p=o.errors[0];throw new Z(p.value,{clientVersion:r.clientVersion})}let s=Er(r.generator),a=s==="library",l=s==="binary",u=s==="client",c=(i.accelerate||i.ppg)&&!i.driverAdapters;return i.accelerate?new $t(r):(i.driverAdapters,a?new Gr(r):(i.accelerate,new Gr(r)))}function Yn({generator:e}){return e?.previewFeatures??[]}var Bl=e=>({command:e});var Ul=e=>e.strings.reduce((r,t,n)=>`${r}@P${n}${t}`);function Qr(e){try{return Gl(e,"fast")}catch{return Gl(e,"slow")}}function Gl(e,r){return JSON.stringify(e.map(t=>Wl(t,r)))}function Wl(e,r){if(Array.isArray(e))return e.map(t=>Wl(t,r));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(xr(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(Fe.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(Rf(e))return{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:Buffer.from(t,n,i).toString("base64")}}return typeof e=="object"&&r==="slow"?Jl(e):e}function Rf(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Jl(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ql);let r={};for(let t of Object.keys(e))r[t]=Ql(e[t]);return r}function Ql(e){return typeof e=="bigint"?e.toString():Jl(e)}var Af=/^(\s*alter\s)/i,Kl=N("prisma:client");function So(e,r,t,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&t.length>0&&Af.exec(r))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. @@ -121,7 +121,7 @@ Example: await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) More Information: https://pris.ly/d/execute-raw -`)}var Ro=({clientMethod:e,activeProvider:r})=>t=>{let n="",i;if(qn(t))n=t.sql,i={values:Qr(t.values),__prismaRawParameters__:!0};else if(Array.isArray(t)){let[o,...s]=t;n=o,i={values:Qr(s||[]),__prismaRawParameters__:!0}}else switch(r){case"sqlite":case"mysql":{n=t.sql,i={values:Qr(t.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=t.text,i={values:Qr(t.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Ul(t),i={values:Qr(t.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${r} provider does not support ${e}`)}return i?.values?Kl(`prisma.${e}(${n}, ${i.values})`):Kl(`prisma.${e}(${n})`),{query:n,parameters:i}},Hl={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[r,...t]=e;return new oe(r,t)}},Yl={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function Ao(e){return function(t,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=zl(t(s)):zl(t(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function zl(e){return typeof e.then=="function"?e:Promise.resolve(e)}var Cf=xi.split(".")[0],If={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,r){return r()}},Co=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(r){return this.getGlobalTracingHelper().getTraceParent(r)}dispatchEngineSpans(r){return this.getGlobalTracingHelper().dispatchEngineSpans(r)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(r,t){return this.getGlobalTracingHelper().runInChildSpan(r,t)}getGlobalTracingHelper(){let r=globalThis[`V${Cf}_PRISMA_INSTRUMENTATION`],t=globalThis.PRISMA_INSTRUMENTATION;return r?.helper??t?.helper??If}};function Zl(){return new Co}function Xl(e,r=()=>{}){let t,n=new Promise(i=>t=i);return{then(i){return--e===0&&t(r()),i?.(n)}}}function eu(e){return typeof e=="string"?e:e.reduce((r,t)=>{let n=typeof t=="string"?t:t.level;return n==="query"?r:r&&(t==="info"||r==="info")?"info":n},void 0)}var tu=A(Ni());function zn(e){return typeof e.batchRequestIdx=="number"}function ru(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let r=[];return e.modelName&&r.push(e.modelName),e.query.arguments&&r.push(Io(e.query.arguments)),r.push(Io(e.query.selection)),r.join("")}function Io(e){return`(${Object.keys(e).sort().map(t=>{let n=e[t];return typeof n=="object"&&n!==null?`(${t} ${Io(n)})`:t}).join(" ")})`}var Df={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,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function Do(e){return Df[e]}var Zn=class{constructor(r){this.options=r;this.batches={}}batches;tickActive=!1;request(r){let t=this.options.batchBy(r);return t?(this.batches[t]||(this.batches[t]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[t].push({request:r,resolve:n,reject:i})})):this.options.singleLoader(r)}dispatchBatches(){for(let r in this.batches){let t=this.batches[r];delete this.batches[r],t.length===1?this.options.singleLoader(t[0].request).then(n=>{n instanceof Error?t[0].reject(n):t[0].resolve(n)}).catch(n=>{t[0].reject(n)}):(t.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(t.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;imr("bigint",t));case"bytes-array":return r.map(t=>mr("bytes",t));case"decimal-array":return r.map(t=>mr("decimal",t));case"datetime-array":return r.map(t=>mr("datetime",t));case"date-array":return r.map(t=>mr("date",t));case"time-array":return r.map(t=>mr("time",t));default:return r}}function Xn(e){let r=[],t=Of(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=>Do(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:_f(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"?nu(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Do(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:ru(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(r){try{return await this.dataloader.request(r)}catch(t){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=r;this.handleAndLogRequestError({error:t,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:r.globalOmit})}}mapQueryEngineResult({dataPath:r,unpacker:t},n){let i=n?.data,o=this.unpack(i,r,t);return process.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(r){try{this.handleRequestError(r)}catch(t){throw this.logEmitter&&this.logEmitter.emit("error",{message:t.message,target:r.clientMethod,timestamp:new Date}),t}}handleRequestError({error:r,clientMethod:t,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(kf(r),Nf(r,i))throw r;if(r instanceof z&&Lf(r)){let u=iu(r.meta);_n({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:t,clientVersion:this.client._clientVersion,globalOmit:a})}let l=r.message;if(n&&(l=vn({callsite:n,originalMethod:t,isPanic:r.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),r.code){let u=s?{modelName:s,...r.meta}:r.meta;throw new z(l,{code:r.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:r.batchRequestIdx})}else{if(r.isPanic)throw new le(l,this.client._clientVersion);if(r instanceof V)throw new V(l,{clientVersion:this.client._clientVersion,batchRequestIdx:r.batchRequestIdx});if(r instanceof v)throw new v(l,this.client._clientVersion);if(r instanceof le)throw new le(l,this.client._clientVersion)}throw r.clientVersion=this.client._clientVersion,r}sanitizeMessage(r){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,tu.default)(r):r}unpack(r,t,n){if(!r||(r.data&&(r=r.data),!r))return r;let i=Object.keys(r)[0],o=Object.values(r)[0],s=t.filter(u=>u!=="select"&&u!=="include"),a=ao(o,s),l=i==="queryRaw"?Xn(a):qr(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function _f(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:nu(e)};ar(e,"Unknown transaction kind")}}function nu(e){return{id:e.id,payload:e.payload}}function Nf(e,r){return zn(e)&&r?.kind==="batch"&&e.batchRequestIdx!==r.index}function Lf(e){return e.code==="P2009"||e.code==="P2012"}function iu(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(iu)};if(Array.isArray(e.selectionPath)){let[,...r]=e.selectionPath;return{...e,selectionPath:r}}return e}var ou=Sl;var cu=A(Ki());var k=class extends Error{constructor(r){super(r+` +`)}var Ro=({clientMethod:e,activeProvider:r})=>t=>{let n="",i;if(qn(t))n=t.sql,i={values:Qr(t.values),__prismaRawParameters__:!0};else if(Array.isArray(t)){let[o,...s]=t;n=o,i={values:Qr(s||[]),__prismaRawParameters__:!0}}else switch(r){case"sqlite":case"mysql":{n=t.sql,i={values:Qr(t.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=t.text,i={values:Qr(t.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Ul(t),i={values:Qr(t.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${r} provider does not support ${e}`)}return i?.values?Kl(`prisma.${e}(${n}, ${i.values})`):Kl(`prisma.${e}(${n})`),{query:n,parameters:i}},Hl={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[r,...t]=e;return new oe(r,t)}},Yl={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function Ao(e){return function(t,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=zl(t(s)):zl(t(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function zl(e){return typeof e.then=="function"?e:Promise.resolve(e)}var Cf=xi.split(".")[0],If={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,r){return r()}},Co=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(r){return this.getGlobalTracingHelper().getTraceParent(r)}dispatchEngineSpans(r){return this.getGlobalTracingHelper().dispatchEngineSpans(r)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(r,t){return this.getGlobalTracingHelper().runInChildSpan(r,t)}getGlobalTracingHelper(){let r=globalThis[`V${Cf}_PRISMA_INSTRUMENTATION`],t=globalThis.PRISMA_INSTRUMENTATION;return r?.helper??t?.helper??If}};function Zl(){return new Co}function Xl(e,r=()=>{}){let t,n=new Promise(i=>t=i);return{then(i){return--e===0&&t(r()),i?.(n)}}}function eu(e){return typeof e=="string"?e:e.reduce((r,t)=>{let n=typeof t=="string"?t:t.level;return n==="query"?r:r&&(t==="info"||r==="info")?"info":n},void 0)}var tu=A(Ni());function zn(e){return typeof e.batchRequestIdx=="number"}function ru(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let r=[];return e.modelName&&r.push(e.modelName),e.query.arguments&&r.push(Io(e.query.arguments)),r.push(Io(e.query.selection)),r.join("")}function Io(e){return`(${Object.keys(e).sort().map(t=>{let n=e[t];return typeof n=="object"&&n!==null?`(${t} ${Io(n)})`:t}).join(" ")})`}var Df={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,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function Do(e){return Df[e]}var Zn=class{constructor(r){this.options=r;this.batches={}}batches;tickActive=!1;request(r){let t=this.options.batchBy(r);return t?(this.batches[t]||(this.batches[t]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[t].push({request:r,resolve:n,reject:i})})):this.options.singleLoader(r)}dispatchBatches(){for(let r in this.batches){let t=this.batches[r];delete this.batches[r],t.length===1?this.options.singleLoader(t[0].request).then(n=>{n instanceof Error?t[0].reject(n):t[0].resolve(n)}).catch(n=>{t[0].reject(n)}):(t.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(t.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;imr("bigint",t));case"bytes-array":return r.map(t=>mr("bytes",t));case"decimal-array":return r.map(t=>mr("decimal",t));case"datetime-array":return r.map(t=>mr("datetime",t));case"date-array":return r.map(t=>mr("date",t));case"time-array":return r.map(t=>mr("time",t));default:return r}}function Xn(e){let r=[],t=Of(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=>Do(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:_f(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"?nu(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Do(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:ru(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(r){try{return await this.dataloader.request(r)}catch(t){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=r;this.handleAndLogRequestError({error:t,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:r.globalOmit})}}mapQueryEngineResult({dataPath:r,unpacker:t},n){let i=n?.data,o=this.unpack(i,r,t);return process.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(r){try{this.handleRequestError(r)}catch(t){throw this.logEmitter&&this.logEmitter.emit("error",{message:t.message,target:r.clientMethod,timestamp:new Date}),t}}handleRequestError({error:r,clientMethod:t,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(kf(r),Nf(r,i))throw r;if(r instanceof z&&Lf(r)){let u=iu(r.meta);_n({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:t,clientVersion:this.client._clientVersion,globalOmit:a})}let l=r.message;if(n&&(l=Pn({callsite:n,originalMethod:t,isPanic:r.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),r.code){let u=s?{modelName:s,...r.meta}:r.meta;throw new z(l,{code:r.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:r.batchRequestIdx})}else{if(r.isPanic)throw new le(l,this.client._clientVersion);if(r instanceof V)throw new V(l,{clientVersion:this.client._clientVersion,batchRequestIdx:r.batchRequestIdx});if(r instanceof P)throw new P(l,this.client._clientVersion);if(r instanceof le)throw new le(l,this.client._clientVersion)}throw r.clientVersion=this.client._clientVersion,r}sanitizeMessage(r){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,tu.default)(r):r}unpack(r,t,n){if(!r||(r.data&&(r=r.data),!r))return r;let i=Object.keys(r)[0],o=Object.values(r)[0],s=t.filter(u=>u!=="select"&&u!=="include"),a=ao(o,s),l=i==="queryRaw"?Xn(a):qr(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function _f(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:nu(e)};ar(e,"Unknown transaction kind")}}function nu(e){return{id:e.id,payload:e.payload}}function Nf(e,r){return zn(e)&&r?.kind==="batch"&&e.batchRequestIdx!==r.index}function Lf(e){return e.code==="P2009"||e.code==="P2012"}function iu(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(iu)};if(Array.isArray(e.selectionPath)){let[,...r]=e.selectionPath;return{...e,selectionPath:r}}return e}var ou=Sl;var cu=A(Ki());var k=class extends Error{constructor(r){super(r+` Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};x(k,"PrismaClientConstructorValidationError");var su=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],au=["pretty","colorless","minimal"],lu=["info","query","warn","error"],Ff={datasources:(e,{datasourceNames:r})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new k(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[t,n]of Object.entries(e)){if(!r.includes(t)){let i=Wr(t,r)||` Available datasources: ${r.join(", ")}`;throw new k(`Unknown datasource ${t} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new k(`Invalid value ${JSON.stringify(e)} for datasource "${t}" 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 k(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new k(`Invalid value ${JSON.stringify(o)} for datasource "${t}" provided to PrismaClient constructor. @@ -130,7 +130,7 @@ Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")thr ${i} -${n}`}function du(e){return e.length===0?Promise.resolve([]):new Promise((r,t)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?t(i):r(n)))},l=u=>{o||(o=!0,t(u))};for(let u=0;u{n[u]=c,a()},c=>{if(!zn(c)){l(c);return}c.batchRequestIdx===u?l(c):(i||(i=c),a())})})}var rr=N("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Vf={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},jf=Symbol.for("prisma.client.transaction.id"),Bf={id:0,nextId(){return++this.id}};function bu(e){class r{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=Ao();constructor(n){e=n?.__internal?.configOverride?.(e)??e,cl(e),n&&pu(n,e);let i=new hu.EventEmitter().on("error",()=>{});this._extensions=_r.empty(),this._previewFeatures=Yn(e),this._clientVersion=e.clientVersion??ou,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Zl();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&ri.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&ri.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"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=!s&&o&&ot(o,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},c=u.debug===!0;c&&N.enable("prisma:client");let p=ri.default.resolve(e.dirname,e.relativePath);yu.default.existsSync(p)||(p=e.dirname),rr("dirname",e.dirname),rr("relativePath",e.relativePath),rr("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,prismaPath:d.binaryPath??void 0,engineEndpoint:d.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&eu(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,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:pl(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:Vr,getBatchRequestPayload:Fr,prismaGraphQLToJSError:Mr,PrismaClientUnknownRequestError:V,PrismaClientInitializationError:v,PrismaClientKnownRequestError:z,debug:N("prisma:client:accelerateEngine"),engineVersion:fu.version,clientVersion:e.clientVersion}},rr("clientVersion",e.clientVersion),this._engine=jl(e,this._engineConfig),this._requestHandler=new ei(this,i),l.log)for(let f of l.log){let h=typeof f=="string"?f:f.emit==="stdout"?f.level:null;h&&this.$on(h,g=>{tt.log(`${tt.tags[h]??""}`,g.message||g.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Pt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$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{Go()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Ro({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]=mu(n,i);return So(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=>(So(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:Bl,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:Ro({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",...mu(n,i));throw new Z("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new Z("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Bf.nextId(),s=Xl(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 du(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 he(Pt(he(Ha(this),[re("_appliedParent",()=>this._appliedParent._createItxClient(n)),re("_createPrismaPromise",()=>Ao(n)),re(jf,()=>n.id)])),[Lr(el)])}$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??Vf,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async l=>{let{runInTransaction:u,args:c,...p}=l,d={...n,...p};c&&(d.args=i.middlewareArgsToRequestArgs(c)),n.transaction!==void 0&&u===!1&&delete d.transaction;let f=await il(this,d);return d.model?Xa({result:f,modelName:d.model,args:d.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):f};return this._tracingHelper.runInChildSpan(s.operation,()=>new gu.AsyncResource("prisma-client-request").runInAsyncScope(()=>a(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 h={name:"serialize"},g=this._tracingHelper.runInChildSpan(h,()=>Mn({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 N.enabled("prisma:client")&&(rr("Prisma Client call:"),rr(`prisma.${i}(${$a(n)})`),rr("Generated request:"),rr(JSON.stringify(g,null,2)+` +${n}`}function du(e){return e.length===0?Promise.resolve([]):new Promise((r,t)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?t(i):r(n)))},l=u=>{o||(o=!0,t(u))};for(let u=0;u{n[u]=c,a()},c=>{if(!zn(c)){l(c);return}c.batchRequestIdx===u?l(c):(i||(i=c),a())})})}var rr=N("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Vf={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},jf=Symbol.for("prisma.client.transaction.id"),Bf={id:0,nextId(){return++this.id}};function bu(e){class r{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=Ao();constructor(n){e=n?.__internal?.configOverride?.(e)??e,cl(e),n&&pu(n,e);let i=new hu.EventEmitter().on("error",()=>{});this._extensions=_r.empty(),this._previewFeatures=Yn(e),this._clientVersion=e.clientVersion??ou,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Zl();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&ri.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&ri.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new P(`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 P("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&&o&&ot(o,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},c=u.debug===!0;c&&N.enable("prisma:client");let p=ri.default.resolve(e.dirname,e.relativePath);yu.default.existsSync(p)||(p=e.dirname),rr("dirname",e.dirname),rr("relativePath",e.relativePath),rr("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,prismaPath:d.binaryPath??void 0,engineEndpoint:d.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&eu(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,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:pl(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:Vr,getBatchRequestPayload:Fr,prismaGraphQLToJSError:Mr,PrismaClientUnknownRequestError:V,PrismaClientInitializationError:P,PrismaClientKnownRequestError:z,debug:N("prisma:client:accelerateEngine"),engineVersion:fu.version,clientVersion:e.clientVersion}},rr("clientVersion",e.clientVersion),this._engine=jl(e,this._engineConfig),this._requestHandler=new ei(this,i),l.log)for(let f of l.log){let h=typeof f=="string"?f:f.emit==="stdout"?f.level:null;h&&this.$on(h,g=>{tt.log(`${tt.tags[h]??""}`,g.message||g.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=vt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$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{Go()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Ro({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]=mu(n,i);return So(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=>(So(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:Bl,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:Ro({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",...mu(n,i));throw new Z("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new Z("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Bf.nextId(),s=Xl(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 du(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 he(vt(he(Ha(this),[re("_appliedParent",()=>this._appliedParent._createItxClient(n)),re("_createPrismaPromise",()=>Ao(n)),re(jf,()=>n.id)])),[Lr(el)])}$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??Vf,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async l=>{let{runInTransaction:u,args:c,...p}=l,d={...n,...p};c&&(d.args=i.middlewareArgsToRequestArgs(c)),n.transaction!==void 0&&u===!1&&delete d.transaction;let f=await il(this,d);return d.model?Xa({result:f,modelName:d.model,args:d.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):f};return this._tracingHelper.runInChildSpan(s.operation,()=>new gu.AsyncResource("prisma-client-request").runInAsyncScope(()=>a(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 h={name:"serialize"},g=this._tracingHelper.runInChildSpan(h,()=>Mn({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 N.enabled("prisma:client")&&(rr("Prisma Client call:"),rr(`prisma.${i}(${$a(n)})`),rr("Generated request:"),rr(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(),globalOmit:this._globalOmit,customDataProxyFetch:f})}catch(h){throw h.clientVersion=this._clientVersion,h}}$metrics=new Nr(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=Ya}return r}function mu(e,r){return Uf(e)?[new oe(e,r),Hl]:[e,Yl]}function Uf(e){return Array.isArray(e)&&Array.isArray(e.raw)}var Gf=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Eu(e){return new Proxy(e,{get(r,t){if(t in r)return r[t];if(!Gf.has(t))throw new TypeError(`Invalid enum value: ${String(t)}`)}})}function wu(e){ot(e,{conflictCheck:"warn"})}0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); /*! Bundled license information: diff --git a/src/generated/prisma/runtime/react-native.js b/src/generated/prisma/runtime/react-native.js index 2ea2773..f97ce2c 100644 --- a/src/generated/prisma/runtime/react-native.js +++ b/src/generated/prisma/runtime/react-native.js @@ -1,18 +1,18 @@ /* !!! This is code generated by Prisma. Do not edit directly. !!! /* eslint-disable */ -"use strict";var Ea=Object.create;var tr=Object.defineProperty;var xa=Object.getOwnPropertyDescriptor;var Pa=Object.getOwnPropertyNames;var va=Object.getPrototypeOf,Ta=Object.prototype.hasOwnProperty;var he=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ae=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Xe=(e,t)=>{for(var r in t)tr(e,r,{get:t[r],enumerable:!0})},ii=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Pa(t))!Ta.call(e,i)&&i!==r&&tr(e,i,{get:()=>t[i],enumerable:!(n=xa(t,i))||n.enumerable});return e};var Se=(e,t,r)=>(r=e!=null?Ea(va(e)):{},ii(t||!e||!e.__esModule?tr(r,"default",{value:e,enumerable:!0}):r,e)),Ca=e=>ii(tr({},"__esModule",{value:!0}),e);var y,x,c=he(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:x}=y});var P,p=he(()=>{"use strict";P=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=he(()=>{"use strict";E=()=>{};E.prototype=E});var b,f=he(()=>{"use strict";b=class{value;constructor(t){this.value=t}deref(){return this.value}}});var vi=Ae(nt=>{"use strict";m();c();p();d();f();var ui=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Aa=ui(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=k;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=A.indexOf("=");F===-1&&(F=S);var _=F===S?0:4-F%4;return[F,_]}function l(A){var S=a(A),F=S[0],_=S[1];return(F+_)*3/4-_}function u(A,S,F){return(S+F)*3/4-F}function g(A){var S,F=a(A),_=F[0],L=F[1],O=new n(u(A,_,L)),q=0,Y=L>0?_-4:_,$;for($=0;$>16&255,O[q++]=S>>8&255,O[q++]=S&255;return L===2&&(S=r[A.charCodeAt($)]<<2|r[A.charCodeAt($+1)]>>4,O[q++]=S&255),L===1&&(S=r[A.charCodeAt($)]<<10|r[A.charCodeAt($+1)]<<4|r[A.charCodeAt($+2)]>>2,O[q++]=S>>8&255,O[q++]=S&255),O}function h(A){return t[A>>18&63]+t[A>>12&63]+t[A>>6&63]+t[A&63]}function T(A,S,F){for(var _,L=[],O=S;OY?Y:q+O));return _===1?(S=A[F-1],L.push(t[S>>2]+t[S<<4&63]+"==")):_===2&&(S=(A[F-2]<<8)+A[F-1],L.push(t[S>>10]+t[S>>4&63]+t[S<<2&63]+"=")),L.join("")}}),Sa=ui(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,u=(1<>1,h=-7,T=n?o-1:0,k=n?-1:1,A=t[r+T];for(T+=k,s=A&(1<<-h)-1,A>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=k,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=k,h-=8);if(s===0)s=1-g;else{if(s===u)return a?NaN:(A?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(A?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,u,g=s*8-o-1,h=(1<>1,k=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=i?0:s-1,S=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+T>=1?r+=k/u:r+=k*Math.pow(2,1-T),r*u>=2&&(a++,u/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*u-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+A]=l&255,A+=S,l/=256,o-=8);for(a=a<0;t[n+A]=a&255,A+=S,a/=256,g-=8);t[n+A-S]|=F*128}}),Xr=Aa(),tt=Sa(),oi=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;nt.Buffer=C;nt.SlowBuffer=Ma;nt.INSPECT_MAX_BYTES=50;var rr=2147483647;nt.kMaxLength=rr;C.TYPED_ARRAY_SUPPORT=Ra();!C.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 Ra(){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(C.prototype,"parent",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.buffer}});Object.defineProperty(C.prototype,"offset",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.byteOffset}});function Re(e){if(e>rr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,C.prototype),t}function C(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 rn(e)}return ci(e,t,r)}C.poolSize=8192;function ci(e,t,r){if(typeof e=="string")return Oa(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(ye(e,ArrayBuffer)||e&&ye(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(e,SharedArrayBuffer)||e&&ye(e.buffer,SharedArrayBuffer)))return di(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 C.from(n,t,r);let i=Fa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return C.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)}C.from=function(e,t,r){return ci(e,t,r)};Object.setPrototypeOf(C.prototype,Uint8Array.prototype);Object.setPrototypeOf(C,Uint8Array);function pi(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 ka(e,t,r){return pi(e),e<=0?Re(e):t!==void 0?typeof r=="string"?Re(e).fill(t,r):Re(e).fill(t):Re(e)}C.alloc=function(e,t,r){return ka(e,t,r)};function rn(e){return pi(e),Re(e<0?0:nn(e)|0)}C.allocUnsafe=function(e){return rn(e)};C.allocUnsafeSlow=function(e){return rn(e)};function Oa(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!C.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=fi(e,t)|0,n=Re(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function en(e){let t=e.length<0?0:nn(e.length)|0,r=Re(t);for(let n=0;n=rr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+rr.toString(16)+" bytes");return e|0}function Ma(e){return+e!=e&&(e=0),C.alloc(+e)}C.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==C.prototype};C.compare=function(e,t){if(ye(e,Uint8Array)&&(e=C.from(e,e.offset,e.byteLength)),ye(t,Uint8Array)&&(t=C.from(t,t.offset,t.byteLength)),!C.isBuffer(e)||!C.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?(C.isBuffer(o)||(o=C.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(C.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function fi(e,t){if(C.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 tn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Pi(e).length;default:if(i)return n?-1:tn(e).length;t=(""+t).toLowerCase(),i=!0}}C.byteLength=fi;function _a(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Qa(this,t,r);case"utf8":case"utf-8":return gi(this,t,r);case"ascii":return $a(this,t,r);case"latin1":case"binary":return Va(this,t,r);case"base64":return ja(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ja(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}C.prototype._isBuffer=!0;function Je(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}C.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+=" ... "),""};oi&&(C.prototype[oi]=C.prototype.inspect);C.prototype.compare=function(e,t,r,n,i){if(ye(e,Uint8Array)&&(e=C.from(e,e.offset,e.byteLength)),!C.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,sn(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=C.from(t,n)),C.isBuffer(t))return t.length===0?-1:si(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):si(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function si(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 Da(this,e,t,r);case"utf8":case"utf-8":return La(this,e,t,r);case"ascii":case"latin1":case"binary":return Na(this,e,t,r);case"base64":return qa(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ba(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};C.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ja(e,t,r){return t===0&&r===e.length?Xr.fromByteArray(e):Xr.fromByteArray(e.slice(t,r))}function gi(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 Ua(n)}var ai=4096;function Ua(e){let t=e.length;if(t<=ai)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")}C.prototype.readUintLE=C.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};C.prototype.readUint8=C.prototype.readUInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]};C.prototype.readUint16LE=C.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]|this[e+1]<<8};C.prototype.readUint16BE=C.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]<<8|this[e+1]};C.prototype.readUint32LE=C.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};C.prototype.readUint32BE=C.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};C.prototype.readBigUInt64LE=Le(function(e){e=e>>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ct(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,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ct(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||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};C.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(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};C.prototype.readInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};C.prototype.readInt16LE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};C.prototype.readInt16BE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};C.prototype.readInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};C.prototype.readInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};C.prototype.readBigInt64LE=Le(function(e){e=e>>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ct(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)&&Ct(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||K(e,4,this.length),tt.read(this,e,!0,23,4)};C.prototype.readFloatBE=function(e,t){return e=e>>>0,t||K(e,4,this.length),tt.read(this,e,!1,23,4)};C.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||K(e,8,this.length),tt.read(this,e,!0,52,8)};C.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||K(e,8,this.length),tt.read(this,e,!1,52,8)};function oe(e,t,r,n,i,o){if(!C.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}C.prototype.writeUintLE=C.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};C.prototype.writeUint8=C.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};C.prototype.writeUint16LE=C.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};C.prototype.writeUint16BE=C.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};C.prototype.writeUint32LE=C.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};C.prototype.writeUint32BE=C.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 hi(e,t,r,n,i){xi(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 yi(e,t,r,n,i){xi(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}C.prototype.writeBigUInt64LE=Le(function(e,t=0){return hi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});C.prototype.writeBigUInt64BE=Le(function(e,t=0){return yi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});C.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};C.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};C.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};C.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};C.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};C.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};C.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};C.prototype.writeBigInt64LE=Le(function(e,t=0){return hi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});C.prototype.writeBigInt64BE=Le(function(e,t=0){return yi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function wi(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function bi(e,t,r,n,i){return t=+t,r=r>>>0,i||wi(e,t,r,4,34028234663852886e22,-34028234663852886e22),tt.write(e,t,r,n,23,4),r+4}C.prototype.writeFloatLE=function(e,t,r){return bi(this,e,t,!0,r)};C.prototype.writeFloatBE=function(e,t,r){return bi(this,e,t,!1,r)};function Ei(e,t,r,n,i){return t=+t,r=r>>>0,i||wi(e,t,r,8,17976931348623157e292,-17976931348623157e292),tt.write(e,t,r,n,52,8),r+8}C.prototype.writeDoubleLE=function(e,t,r){return Ei(this,e,t,!0,r)};C.prototype.writeDoubleBE=function(e,t,r){return Ei(this,e,t,!1,r)};C.prototype.copy=function(e,t,r,n){if(!C.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=li(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=li(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function li(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 Ga(e,t,r){rt(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Ct(t,e.length-(r+1))}function xi(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 et.ERR_OUT_OF_RANGE("value",a,e)}Ga(n,i,o)}function rt(e,t){if(typeof e!="number")throw new et.ERR_INVALID_ARG_TYPE(t,"number",e)}function Ct(e,t,r){throw Math.floor(e)!==e?(rt(e,r),new et.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new et.ERR_BUFFER_OUT_OF_BOUNDS:new et.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Wa=/[^+/0-9A-Za-z-_]/g;function Ka(e){if(e=e.split("=")[0],e=e.trim().replace(Wa,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function tn(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 za(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function Pi(e){return Xr.toByteArray(Ka(e))}function nr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function ye(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function sn(e){return e!==e}var Ya=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"?Za:e}function Za(){throw new Error("BigInt not supported")}});var w,m=he(()=>{"use strict";w=Se(vi())});function El(){return!1}function pn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function xl(){return pn()}function Pl(){return[]}function vl(e){e(null,[])}function Tl(){return""}function Cl(){return""}function Al(){}function Sl(){}function Rl(){}function kl(){}function Ol(){}function Il(){}function Fl(){}function Ml(){}function _l(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Dl(e,t){t(null,pn())}var Ll,Nl,or,dn=he(()=>{"use strict";m();c();p();d();f();Ll={},Nl={existsSync:El,lstatSync:pn,stat:Dl,statSync:xl,readdirSync:Pl,readdir:vl,readlinkSync:Tl,realpathSync:Cl,chmodSync:Al,renameSync:Sl,mkdirSync:Rl,rmdirSync:kl,rmSync:Ol,unlinkSync:Il,watchFile:Fl,unwatchFile:Ml,watch:_l,promises:Ll},or=Nl});function ql(...e){return e.join("/")}function Bl(...e){return e.join("/")}function jl(e){let t=Li(e),r=Ni(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Li(e){let t=e.split("/");return t[t.length-1]}function Ni(e){return e.split("/").slice(0,-1).join("/")}function $l(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var qi,Ul,Vl,Ql,Oe,mn=he(()=>{"use strict";m();c();p();d();f();qi="/",Ul=":";Vl={sep:qi},Ql={basename:Li,delimiter:Ul,dirname:Ni,join:Bl,normalize:$l,parse:jl,posix:Vl,resolve:ql,sep:qi},Oe=Ql});var Bi=Ae((Uf,Jl)=>{Jl.exports={name:"@prisma/internals",version:"6.14.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-engine-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var $i=Ae((Bm,Ui)=>{"use strict";m();c();p();d();f();Ui.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Wi=Ae((ng,Gi)=>{"use strict";m();c();p();d();f();Gi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Hi=Ae((gg,zi)=>{"use strict";m();c();p();d();f();zi.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var xn=Ae((xg,Yi)=>{"use strict";m();c();p();d();f();var tu=Hi();Yi.exports=e=>typeof e=="string"?e.replace(tu(),""):e});var Zi=Ae((Gg,ur)=>{"use strict";m();c();p();d();f();ur.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()};ur.exports.default=ur.exports});var In=Ae((l0,Po)=>{"use strict";m();c();p();d();f();Po.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";m();c();p();d();f()});var Ro=he(()=>{"use strict";m();c();p();d();f()});var Zo=Ae((Fv,Jc)=>{Jc.exports={name:"@prisma/engines-version",version:"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"717184b7b35ea05dfa71a3236b7af656013e1e49"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Br,Xo=he(()=>{"use strict";m();c();p();d();f();Br=class{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 pd={};Xe(pd,{DMMF:()=>qt,Debug:()=>z,Decimal:()=>_e,Extensions:()=>an,MetricsClient:()=>wt,PrismaClientInitializationError:()=>Q,PrismaClientKnownRequestError:()=>se,PrismaClientRustPanicError:()=>ce,PrismaClientUnknownRequestError:()=>G,PrismaClientValidationError:()=>te,Public:()=>ln,Sql:()=>le,createParam:()=>Qo,defineDmmfProperty:()=>Ho,deserializeJsonResponse:()=>xt,deserializeRawResult:()=>Hr,dmmfToRuntimeDataModel:()=>ro,empty:()=>ts,getPrismaClient:()=>ya,getRuntime:()=>Fs,join:()=>es,makeStrictEnum:()=>wa,makeTypedQueryFactory:()=>Yo,objectEnumValues:()=>kr,raw:()=>jn,serializeJsonQuery:()=>Lr,skip:()=>Dr,sqltag:()=>Un,warnEnvConflicts:()=>void 0,warnOnce:()=>Dt});module.exports=Ca(pd);m();c();p();d();f();var an={};Xe(an,{defineExtension:()=>Ti,getExtensionContext:()=>Ci});m();c();p();d();f();m();c();p();d();f();function Ti(e){return typeof e=="function"?e:t=>t.$extends(e)}m();c();p();d();f();function Ci(e){return e}var ln={};Xe(ln,{validator:()=>Ai});m();c();p();d();f();m();c();p();d();f();function Ai(...e){return t=>t}m();c();p();d();f();m();c();p();d();f();var ir={};Xe(ir,{$:()=>Ii,bgBlack:()=>ll,bgBlue:()=>dl,bgCyan:()=>ml,bgGreen:()=>cl,bgMagenta:()=>fl,bgRed:()=>ul,bgWhite:()=>gl,bgYellow:()=>pl,black:()=>il,blue:()=>We,bold:()=>de,cyan:()=>ke,dim:()=>At,gray:()=>Ot,green:()=>Rt,grey:()=>al,hidden:()=>rl,inverse:()=>tl,italic:()=>el,magenta:()=>ol,red:()=>Ge,reset:()=>Xa,strikethrough:()=>nl,underline:()=>St,white:()=>sl,yellow:()=>kt});m();c();p();d();f();var un,Si,Ri,ki,Oi=!0;typeof y<"u"&&({FORCE_COLOR:un,NODE_DISABLE_COLORS:Si,NO_COLOR:Ri,TERM:ki}=y.env||{},Oi=y.stdout&&y.stdout.isTTY);var Ii={enabled:!Si&&Ri==null&&ki!=="dumb"&&(un!=null&&un!=="0"||Oi)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Ii.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Xa=V(0,0),de=V(1,22),At=V(2,22),el=V(3,23),St=V(4,24),tl=V(7,27),rl=V(8,28),nl=V(9,29),il=V(30,39),Ge=V(31,39),Rt=V(32,39),kt=V(33,39),We=V(34,39),ol=V(35,39),ke=V(36,39),sl=V(37,39),Ot=V(90,39),al=V(90,39),ll=V(40,49),ul=V(41,49),cl=V(42,49),pl=V(43,49),dl=V(44,49),fl=V(45,49),ml=V(46,49),gl=V(47,49);m();c();p();d();f();var hl=100,Fi=["green","yellow","blue","magenta","cyan","red"],It=[],Mi=Date.now(),yl=0,cn=typeof y<"u"?y.env:{};globalThis.DEBUG??=cn.DEBUG??"";globalThis.DEBUG_COLORS??=cn.DEBUG_COLORS?cn.DEBUG_COLORS==="true":!0;var Ft={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function wl(e){let t={color:Fi[yl++%Fi.length],enabled:Ft.enabled(e),namespace:e,log:Ft.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&It.push([o,...n]),It.length>hl&&It.shift(),Ft.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:bl(g)),u=`+${Date.now()-Mi}ms`;Mi=Date.now(),globalThis.DEBUG_COLORS?a(ir[s](de(o)),...l,ir[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var z=new Proxy(wl,{get:(e,t)=>Ft[t],set:(e,t,r)=>Ft[t]=r});function bl(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 _i(e=7500){let t=It.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` -`);return t.length{let r={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ie(t,e.queryRaw.bind(e)),executeRaw:Ie(t,e.executeRaw.bind(e)),executeScript:Ie(t,e.executeScript.bind(e)),dispose:Ie(t,e.dispose.bind(e)),provider:e.provider,startTransaction:async(...n)=>(await Ie(t,e.startTransaction.bind(e))(...n)).map(o=>zl(t,o))};return e.getConnectionInfo&&(r.getConnectionInfo=Hl(t,e.getConnectionInfo.bind(e))),r},zl=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ie(e,t.queryRaw.bind(t)),executeRaw:Ie(e,t.executeRaw.bind(t)),commit:Ie(e,t.commit.bind(t)),rollback:Ie(e,t.rollback.bind(t))});function Ie(e,t){return async(...r)=>{try{return sr(await t(...r))}catch(n){if(ji("[error@wrapAsync]",n),hn(n))return Ke(n.cause);let i=e.registerNewError(n);return Ke({kind:"GenericJs",id:i})}}}function Hl(e,t){return(...r)=>{try{return sr(t(...r))}catch(n){if(ji("[error@wrapSync]",n),hn(n))return Ke(n.cause);let i=e.registerNewError(n);return Ke({kind:"GenericJs",id:i})}}}m();c();p();d();f();var Vi=Se($i(),1);function wn(e){let t=(0,Vi.default)(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}m();c();p();d();f();var Qi="prisma+postgres",Ji=`${Qi}:`;function bn(e){return e?.toString().startsWith(`${Ji}//`)??!1}var _t={};Xe(_t,{error:()=>Xl,info:()=>Zl,log:()=>Yl,query:()=>eu,should:()=>Ki,tags:()=>Mt,warn:()=>En});m();c();p();d();f();var Mt={error:Ge("prisma:error"),warn:kt("prisma:warn"),info:ke("prisma:info"),query:We("prisma:query")},Ki={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Yl(...e){console.log(...e)}function En(e,...t){Ki.warn()&&console.warn(`${Mt.warn} ${e}`,...t)}function Zl(e,...t){console.info(`${Mt.info} ${e}`,...t)}function Xl(e,...t){console.error(`${Mt.error} ${e}`,...t)}function eu(e,...t){console.log(`${Mt.query} ${e}`,...t)}m();c();p();d();f();function lr(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 ze(e,t){throw new Error(t)}m();c();p();d();f();mn();function Pn(e){return Oe.sep===Oe.posix.sep?e:e.split(Oe.sep).join(Oe.posix.sep)}m();c();p();d();f();function vn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}m();c();p();d();f();function cr(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 Tn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Xi.has(e)||(Xi.add(e),En(t,...r))};var Q=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};ue(Q,"PrismaClientInitializationError");m();c();p();d();f();var se=class extends Error{code;meta;clientVersion;batchRequestIdx;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"}};ue(se,"PrismaClientKnownRequestError");m();c();p();d();f();var ce=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};ue(ce,"PrismaClientRustPanicError");m();c();p();d();f();var G=class extends Error{clientVersion;batchRequestIdx;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"}};ue(G,"PrismaClientUnknownRequestError");m();c();p();d();f();var te=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};ue(te,"PrismaClientValidationError");m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var we=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};m();c();p();d();f();function Ne(e){return e.substring(0,1).toLowerCase()+e.substring(1)}m();c();p();d();f();function to(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}m();c();p();d();f();function Lt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}m();c();p();d();f();function ro(e){return{models:Cn(e.models),enums:Cn(e.enums),types:Cn(e.types)}}function Cn(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}m();c();p();d();f();function ot(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function pr(e){return e.toString()!=="Invalid Date"}m();c();p();d();f();m();c();p();d();f();var st=9e15,Ue=1e9,An="0123456789abcdef",mr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",gr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Sn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-st,maxE:st,crypto:!1},so,Fe,D=!0,yr="[DecimalError] ",je=yr+"Invalid argument: ",ao=yr+"Precision limit exceeded",lo=yr+"crypto unavailable",uo="[object Decimal]",re=Math.floor,W=Math.pow,ru=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,nu=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,iu=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,co=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fe=1e7,M=7,ou=9007199254740991,su=mr.length-1,Rn=gr.length-1,R={toStringTag:uo};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),I(e)};R.ceil=function(){return I(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(je+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+M,n.rounding=1,r=au(n,ho(n,r)),n.precision=e,n.rounding=t,I(Fe==2||Fe==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(D=!1,o=g.s*W(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=W(r,1/3),e=re((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(g),n=U(u.plus(g).times(a),u.plus(l),s+2,1),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 D=!0,I(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-re(this.e/M))*M,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return U(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return I(U(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 I(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/br(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 I(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/br(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,I(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,U(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?be(t,n,i):new t(0):new t(NaN):e.isZero()?be(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};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,D=!1,r=r.times(r).minus(1).sqrt().plus(r),D=!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,D=!1,r=r.times(r).plus(1).sqrt().plus(r),D=!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?I(new o(i),e,t,!0):(o.precision=r=n-i.e,i=U(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};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=be(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,T=g.rounding;if(u.isFinite()){if(u.isZero())return new g(u);if(u.abs().eq(1)&&h+4<=Rn)return s=be(g,h+4,T).times(.25),s.s=u.s,s}else{if(!u.s)return new g(NaN);if(h+4<=Rn)return s=be(g,h+4,T).times(.5),s.s=u.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/M+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(D=!1,t=Math.ceil(a/M),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,T=g.rounding,k=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(D=!1,a=h+k,s=Be(u,a),n=t?hr(g,a+10):Be(e,a),l=U(s,n,a,1),Nt(l.d,i=h,T))do if(a+=10,s=Be(u,a),n=t?hr(g,a+10):Be(e,a),l=U(s,n,a,1),!o){+Z(l.d).slice(i+1,i+15)+1==1e14&&(l=I(l,h+1,0));break}while(Nt(l.d,i+=10,T));return D=!0,I(l,h,T)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,T,k=this,A=k.constructor;if(e=new A(e),!k.d||!e.d)return!k.s||!e.s?e=new A(NaN):k.d?e.s=-e.s:e=new A(e.d||k.s!==e.s?k:NaN),e;if(k.s!=e.s)return e.s=-e.s,k.plus(e);if(u=k.d,T=e.d,a=A.precision,l=A.rounding,!u[0]||!T[0]){if(T[0])e.s=-e.s;else if(u[0])e=new A(k);else return new A(l===3?-0:0);return D?I(e,a,l):e}if(r=re(e.e/M),g=re(k.e/M),u=u.slice(),o=g-r,o){for(h=o<0,h?(t=u,o=-o,s=T.length):(t=T,r=g,s=u.length),n=Math.max(Math.ceil(a/M),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=T.length,h=n0;--n)u[s++]=0;for(n=T.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=wr(u,n),D?I(e,a,l):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(je+e);return r.d?(t=po(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return I(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())+M,n.rounding=1,r=uu(n,ho(n,r)),n.precision=e,n.rounding=t,I(Fe>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(D=!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=re((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(u.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(U(s,o,r+2,1)).times(.5),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 D=!0,I(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=U(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,I(Fe==2||Fe==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,T=g.d,k=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!k||!k[0])return new h(!e.s||T&&!T[0]&&!k||k&&!k[0]&&!T?NaN:!T||!k?e.s/0:e.s*0);for(r=re(g.e/M)+re(e.e/M),l=T.length,u=k.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+k[n]*T[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=wr(o,r),D?I(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return On(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,Ue),t===void 0?t=n.rounding:ae(t,0,8),I(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ee(n,!0):(ae(e,0,Ue),t===void 0?t=i.rounding:ae(t,0,8),n=I(new i(n),e+1,t),r=Ee(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=Ee(i):(ae(e,0,Ue),t===void 0?t=o.rounding:ae(t,0,8),n=I(new o(i),e+i.e+1,t),r=Ee(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,T,k=this,A=k.d,S=k.constructor;if(!A)return new S(k);if(u=r=new S(1),n=l=new S(0),t=new S(n),o=t.e=po(A)-k.e-1,s=o%M,t.d[0]=W(10,s<0?M+s:s),e==null)e=o>0?t:u;else{if(a=new S(e),!a.isInt()||a.lt(u))throw Error(je+a);e=a.gt(t)?o>0?t:u:a}for(D=!1,a=new S(Z(A)),g=S.precision,S.precision=o=A.length*M*2;h=U(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=U(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=k.s,T=U(u,n,o,1).minus(k).abs().cmp(U(l,r,o,1).minus(k).abs())<1?[u,n]:[l,r],S.precision=g,D=!0,T};R.toHexadecimal=R.toHex=function(e,t){return On(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]?(D=!1,r=U(r,e,0,t,1).times(e),D=!0,I(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return On(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(W(+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=re(e.e/M),t>=e.d.length-1&&(r=u<0?-u:u)<=ou)return i=fo(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):(D=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=kn(e.times(Be(a,n+r)),n),i.d&&(i=I(i,n+5,1),Nt(i.d,n,o)&&(t=n+10,i=I(kn(e.times(Be(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,D=!0,l.rounding=o,I(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ee(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ae(e,1,Ue),t===void 0?t=i.rounding:ae(t,0,8),n=I(new i(n),e,t),r=Ee(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,Ue),t===void 0?t=n.rounding:ae(t,0,8)),I(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=Ee(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return I(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=Ee(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(je+e)}function Nt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=M,i=0):(i=Math.ceil((t+1)/M),t%=M),o=W(10,M-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)==W(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)==W(10,t-3)-1,s}function dr(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 au(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/br(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 U=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,g,h,T,k,A,S,F,_,L,O,q,Y,$,Tt,J,ie,Ce,X,Ze,er=n.constructor,Zr=n.s==i.s?1:-1,ee=n.d,j=i.d;if(!ee||!ee[0]||!j||!j[0])return new er(!n.s||!i.s||(ee?j&&ee[0]==j[0]:!j)?NaN:ee&&ee[0]==0||!j?Zr*0:Zr/0);for(l?(k=1,g=n.e-i.e):(l=fe,k=M,g=re(n.e/k)-re(i.e/k)),X=j.length,ie=ee.length,_=new er(Zr),L=_.d=[],h=0;j[h]==(ee[h]||0);h++);if(j[h]>(ee[h]||0)&&g--,o==null?($=o=er.precision,s=er.rounding):a?$=o+(n.e-i.e)+1:$=o,$<0)L.push(1),A=!0;else{if($=$/k+2|0,h=0,X==1){for(T=0,j=j[0],$++;(h1&&(j=e(j,T,l),ee=e(ee,T,l),X=j.length,ie=ee.length),J=X,O=ee.slice(0,X),q=O.length;q=l/2&&++Ce;do T=0,u=t(j,O,X,q),u<0?(Y=O[0],X!=q&&(Y=Y*l+(O[1]||0)),T=Y/Ce|0,T>1?(T>=l&&(T=l-1),S=e(j,T,l),F=S.length,q=O.length,u=t(S,O,F,q),u==1&&(T--,r(S,X=10;T/=10)h++;_.e=h+g*k-1,I(_,a?o+_.e+1:o,s,A)}return _}}();function I(e,t,r,n){var i,o,s,a,l,u,g,h,T,k=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+=M,s=t,g=h[T=0],l=g/W(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/M),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=M,s=o-M+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=M,s=o-M+i,l=s<0?0:g/W(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%W(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/W(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=W(10,(M-t%M)%M),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=W(10,M-o),h[T]=s>0?(g/W(10,i-s)%W(10,s)|0)*a:0),u)for(;;)if(T==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[T]+=a,h[T]!=fe)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return D&&(e.e>k.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 wr(e,t){var r=e[0];for(t*=M;r>=10;r/=10)t++;return t}function hr(e,t,r){if(t>su)throw D=!0,r&&(e.precision=r),Error(ao);return I(new e(mr),t,1,!0)}function be(e,t,r){if(t>Rn)throw Error(ao);return I(new e(gr),t,r,!0)}function po(e){var t=e.length-1,r=t*M+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 fo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/M+4);for(D=!1;;){if(r%2&&(o=o.times(t),io(o.d,s)&&(i=!0)),r=re(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),io(t.d,s)}return D=!0,o}function no(e){return e.d[e.d.length-1]&1}function mo(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(D=!1,l=A):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(W(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=I(o.times(e),l,1),r=r.times(++g),a=s.plus(U(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&&Nt(s.d,l-n,k,u))T.precision=l+=10,r=o=a=new T(1),g=0,u++;else return I(s,T.precision=A,k,D=!0);else return T.precision=A,s}s=a}}function Be(e,t){var r,n,i,o,s,a,l,u,g,h,T,k=1,A=10,S=e,F=S.d,_=S.constructor,L=_.rounding,O=_.precision;if(S.s<0||!F||!F[0]||!S.e&&F[0]==1&&F.length==1)return new _(F&&!F[0]?-1/0:S.s!=1?NaN:F?0:S);if(t==null?(D=!1,g=O):g=t,_.precision=g+=A,r=Z(F),n=r.charAt(0),Math.abs(o=S.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)S=S.times(e),r=Z(S.d),n=r.charAt(0),k++;o=S.e,n>1?(S=new _("0."+r),o++):S=new _(n+"."+r.slice(1))}else return u=hr(_,g+2,O).times(o+""),S=Be(new _(n+"."+r.slice(1)),g-A).plus(u),_.precision=O,t==null?I(S,O,L,D=!0):S;for(h=S,l=s=S=U(S.minus(1),S.plus(1),g,1),T=I(S.times(S),g,1),i=3;;){if(s=I(s.times(T),g,1),u=l.plus(U(s,new _(i),g,1)),Z(u.d).slice(0,g)===Z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(hr(_,g+2,O).times(o+""))),l=U(l,new _(k),g,1),t==null)if(Nt(l.d,g-A,L,a))_.precision=g+=A,u=s=S=U(h.minus(1),h.plus(1),g,1),T=I(S.times(S),g,1),i=a=1;else return I(l,_.precision=O,L,D=!0);else return _.precision=O,l;l=u,i+=2}}function go(e){return String(e.s*e.s/0)}function fr(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)%M,r<0&&(n+=M),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),co.test(t))return fr(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(nu.test(t))r=16,t=t.toLowerCase();else if(ru.test(t))r=2;else if(iu.test(t))r=8;else throw Error(je+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=fo(n,new n(r),o,o*2)),u=dr(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=wr(u,g),e.d=u,D=!1,s&&(e=U(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?W(2,l):Me.pow(2,l))),D=!0,e)}function uu(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/br(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/M);for(D=!1,l=r.times(r),a=new e(n);;){if(s=U(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=U(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return D=!0,s.d.length=h+1,s}function br(e,t){for(var r=e;--t;)r*=e;return r}function ho(e,t){var r,n=t.s<0,i=be(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=no(r)?n?2:3:n?4:1,t;Fe=no(r)?n?1:4:n?3:2}return t.minus(i).abs()}function On(e,t,r,n){var i,o,s,a,l,u,g,h,T,k=e.constructor,A=r!==void 0;if(A?(ae(r,1,Ue),n===void 0?n=k.rounding:ae(n,0,8)):(r=k.precision,n=k.rounding),!e.isFinite())g=go(e);else{for(g=Ee(e),s=g.indexOf("."),A?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new k(1),T.e=g.length-s,T.d=dr(Ee(T),10,i),T.e=T.d.length),h=dr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=A?"0p+0":"0";else{if(s<0?o--:(e=new k(e),e.d=h,e.e=o,e=U(e,T,r,n,0,i),h=e.d,o=e.e,u=so),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=dr(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 cu(e){return new this(e).abs()}function pu(e){return new this(e).acos()}function du(e){return new this(e).acosh()}function fu(e,t){return new this(e).plus(t)}function mu(e){return new this(e).asin()}function gu(e){return new this(e).asinh()}function hu(e){return new this(e).atan()}function yu(e){return new this(e).atanh()}function wu(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=be(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?be(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=be(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(U(e,t,o,1)),t=be(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(U(e,t,o,1)),r}function bu(e){return new this(e).cbrt()}function Eu(e){return I(e=new this(e),e.e+1,2)}function xu(e,t,r){return new this(e).clamp(t,r)}function Pu(e){if(!e||typeof e!="object")throw Error(yr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Ue,"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(je+r+": "+n);if(r="crypto",i&&(this[r]=Sn[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(lo);else this[r]=!1;else throw Error(je+r+": "+n);return this}function vu(e){return new this(e).cos()}function Tu(e){return new this(e).cosh()}function yo(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,oo(o)){u.s=o.s,D?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;D?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(lo);else for(;o=10;i/=10)n++;nut,datamodelEnumToSchemaEnum:()=>zu});m();c();p();d();f();m();c();p();d();f();function zu(e){return{name:e.name,values:e.values.map(t=>t.name)}}m();c();p();d();f();var ut=(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.updateManyAndReturn="updateManyAndReturn",O.upsert="upsert",O.delete="delete",O.deleteMany="deleteMany",O.groupBy="groupBy",O.count="count",O.aggregate="aggregate",O.findRaw="findRaw",O.aggregateRaw="aggregateRaw",O))(ut||{});var xo=Se(Wi());m();c();p();d();f();dn();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var wo={keyword:ke,entity:ke,value:e=>de(We(e)),punctuation:We,directive:ke,function:ke,variable:e=>de(We(e)),string:e=>de(Rt(e)),boolean:kt,number:ke,comment:Ot};var Hu=e=>e,Er={},Yu=0,N={manual:Er.Prism&&Er.Prism.manual,disableWorkerMessageHandler:Er.Prism&&Er.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof me){let t=e;return new me(t.type,N.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(N.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ce instanceof me)continue;if(Y&&J!=t.length-1){L.lastIndex=ie;var h=L.exec(e);if(!h)break;var g=h.index+(q?h[1].length:0),T=h.index+h[0].length,a=J,l=ie;for(let j=t.length;a=l&&(++J,ie=l);if(t[J]instanceof me)continue;u=a-J,Ce=e.slice(ie,l),h.index-=ie}else{L.lastIndex=0;var h=L.exec(Ce),u=1}if(!h){if(o)break;continue}q&&($=h[1]?h[1].length:0);var g=h.index+$,h=h[0].slice($),T=g+h.length,k=Ce.slice(0,g),A=Ce.slice(T);let X=[J,u];k&&(++J,ie+=k.length,X.push(k));let Ze=new me(S,O?N.tokenize(h,O):h,Tt,h,Y);if(X.push(Ze),A&&X.push(A),Array.prototype.splice.apply(t,X),u!=1&&N.matchGrammar(e,t,r,J,ie,!0,S),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 N.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=N.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=N.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:me};N.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:/[{}[\];(),.:]/};N.languages.javascript=N.languages.extend("clike",{"class-name":[N.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}/});N.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;N.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:N.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:N.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:N.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:N.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});N.languages.markup&&N.languages.markup.tag.addInlined("script","javascript");N.languages.js=N.languages.javascript;N.languages.typescript=N.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/});N.languages.ts=N.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(""):Zu(e.type)(e.content)};function Zu(e){return wo[e]||Hu}function bo(e){return Xu(e,N.languages.javascript)}function Xu(e,t){return N.tokenize(e,t).map(n=>me.stringify(n)).join("")}m();c();p();d();f();function Eo(e){return wn(e)}var xr=class e{firstLineNumber;lines;static read(t){let r;try{r=or.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(` +"use strict";var Ea=Object.create;var tr=Object.defineProperty;var xa=Object.getOwnPropertyDescriptor;var Pa=Object.getOwnPropertyNames;var va=Object.getPrototypeOf,Ta=Object.prototype.hasOwnProperty;var he=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Xe=(e,t)=>{for(var r in t)tr(e,r,{get:t[r],enumerable:!0})},ii=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Pa(t))!Ta.call(e,i)&&i!==r&&tr(e,i,{get:()=>t[i],enumerable:!(n=xa(t,i))||n.enumerable});return e};var Se=(e,t,r)=>(r=e!=null?Ea(va(e)):{},ii(t||!e||!e.__esModule?tr(r,"default",{value:e,enumerable:!0}):r,e)),Aa=e=>ii(tr({},"__esModule",{value:!0}),e);var y,x,c=he(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:x}=y});var P,p=he(()=>{"use strict";P=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=he(()=>{"use strict";E=()=>{};E.prototype=E});var b,f=he(()=>{"use strict";b=class{value;constructor(t){this.value=t}deref(){return this.value}}});var vi=Ce(nt=>{"use strict";m();c();p();d();f();var ui=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ca=ui(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=k;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=S);var _=F===S?0:4-F%4;return[F,_]}function l(C){var S=a(C),F=S[0],_=S[1];return(F+_)*3/4-_}function u(C,S,F){return(S+F)*3/4-F}function g(C){var S,F=a(C),_=F[0],L=F[1],O=new n(u(C,_,L)),q=0,Y=L>0?_-4:_,$;for($=0;$>16&255,O[q++]=S>>8&255,O[q++]=S&255;return L===2&&(S=r[C.charCodeAt($)]<<2|r[C.charCodeAt($+1)]>>4,O[q++]=S&255),L===1&&(S=r[C.charCodeAt($)]<<10|r[C.charCodeAt($+1)]<<4|r[C.charCodeAt($+2)]>>2,O[q++]=S>>8&255,O[q++]=S&255),O}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function T(C,S,F){for(var _,L=[],O=S;OY?Y:q+O));return _===1?(S=C[F-1],L.push(t[S>>2]+t[S<<4&63]+"==")):_===2&&(S=(C[F-2]<<8)+C[F-1],L.push(t[S>>10]+t[S>>4&63]+t[S<<2&63]+"=")),L.join("")}}),Sa=ui(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,u=(1<>1,h=-7,T=n?o-1:0,k=n?-1:1,C=t[r+T];for(T+=k,s=C&(1<<-h)-1,C>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=k,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=k,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,k=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=i?0:s-1,S=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+T>=1?r+=k/u:r+=k*Math.pow(2,1-T),r*u>=2&&(a++,u/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*u-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+C]=l&255,C+=S,l/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=S,a/=256,g-=8);t[n+C-S]|=F*128}}),Xr=Ca(),tt=Sa(),oi=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;nt.Buffer=A;nt.SlowBuffer=Ma;nt.INSPECT_MAX_BYTES=50;var rr=2147483647;nt.kMaxLength=rr;A.TYPED_ARRAY_SUPPORT=Ra();!A.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 Ra(){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(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}});Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function Re(e){if(e>rr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(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 rn(e)}return ci(e,t,r)}A.poolSize=8192;function ci(e,t,r){if(typeof e=="string")return Oa(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(ye(e,ArrayBuffer)||e&&ye(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(e,SharedArrayBuffer)||e&&ye(e.buffer,SharedArrayBuffer)))return di(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 A.from(n,t,r);let i=Fa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return A.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)}A.from=function(e,t,r){return ci(e,t,r)};Object.setPrototypeOf(A.prototype,Uint8Array.prototype);Object.setPrototypeOf(A,Uint8Array);function pi(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 ka(e,t,r){return pi(e),e<=0?Re(e):t!==void 0?typeof r=="string"?Re(e).fill(t,r):Re(e).fill(t):Re(e)}A.alloc=function(e,t,r){return ka(e,t,r)};function rn(e){return pi(e),Re(e<0?0:nn(e)|0)}A.allocUnsafe=function(e){return rn(e)};A.allocUnsafeSlow=function(e){return rn(e)};function Oa(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=fi(e,t)|0,n=Re(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function en(e){let t=e.length<0?0:nn(e.length)|0,r=Re(t);for(let n=0;n=rr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+rr.toString(16)+" bytes");return e|0}function Ma(e){return+e!=e&&(e=0),A.alloc(+e)}A.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==A.prototype};A.compare=function(e,t){if(ye(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),ye(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(e)||!A.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?(A.isBuffer(o)||(o=A.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(A.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function fi(e,t){if(A.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 tn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Pi(e).length;default:if(i)return n?-1:tn(e).length;t=(""+t).toLowerCase(),i=!0}}A.byteLength=fi;function _a(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Qa(this,t,r);case"utf8":case"utf-8":return gi(this,t,r);case"ascii":return $a(this,t,r);case"latin1":case"binary":return Va(this,t,r);case"base64":return ja(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ja(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}A.prototype._isBuffer=!0;function Je(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}A.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+=" ... "),""};oi&&(A.prototype[oi]=A.prototype.inspect);A.prototype.compare=function(e,t,r,n,i){if(ye(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.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,sn(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=A.from(t,n)),A.isBuffer(t))return t.length===0?-1:si(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):si(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function si(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 Da(this,e,t,r);case"utf8":case"utf-8":return La(this,e,t,r);case"ascii":case"latin1":case"binary":return Na(this,e,t,r);case"base64":return qa(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ba(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ja(e,t,r){return t===0&&r===e.length?Xr.fromByteArray(e):Xr.fromByteArray(e.slice(t,r))}function gi(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 Ua(n)}var ai=4096;function Ua(e){let t=e.length;if(t<=ai)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")}A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]};A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]|this[e+1]<<8};A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]<<8|this[e+1]};A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};A.prototype.readBigUInt64LE=Le(function(e){e=e>>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&At(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,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&At(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||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};A.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(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};A.prototype.readInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};A.prototype.readInt16LE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};A.prototype.readInt16BE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};A.prototype.readInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};A.prototype.readInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};A.prototype.readBigInt64LE=Le(function(e){e=e>>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&At(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)&&At(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||K(e,4,this.length),tt.read(this,e,!0,23,4)};A.prototype.readFloatBE=function(e,t){return e=e>>>0,t||K(e,4,this.length),tt.read(this,e,!1,23,4)};A.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||K(e,8,this.length),tt.read(this,e,!0,52,8)};A.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||K(e,8,this.length),tt.read(this,e,!1,52,8)};function oe(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.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};A.prototype.writeUint8=A.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};A.prototype.writeUint16LE=A.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};A.prototype.writeUint16BE=A.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};A.prototype.writeUint32LE=A.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};A.prototype.writeUint32BE=A.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 hi(e,t,r,n,i){xi(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 yi(e,t,r,n,i){xi(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}A.prototype.writeBigUInt64LE=Le(function(e,t=0){return hi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeBigUInt64BE=Le(function(e,t=0){return yi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.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};A.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};A.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};A.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};A.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};A.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};A.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};A.prototype.writeBigInt64LE=Le(function(e,t=0){return hi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});A.prototype.writeBigInt64BE=Le(function(e,t=0){return yi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function wi(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function bi(e,t,r,n,i){return t=+t,r=r>>>0,i||wi(e,t,r,4,34028234663852886e22,-34028234663852886e22),tt.write(e,t,r,n,23,4),r+4}A.prototype.writeFloatLE=function(e,t,r){return bi(this,e,t,!0,r)};A.prototype.writeFloatBE=function(e,t,r){return bi(this,e,t,!1,r)};function Ei(e,t,r,n,i){return t=+t,r=r>>>0,i||wi(e,t,r,8,17976931348623157e292,-17976931348623157e292),tt.write(e,t,r,n,52,8),r+8}A.prototype.writeDoubleLE=function(e,t,r){return Ei(this,e,t,!0,r)};A.prototype.writeDoubleBE=function(e,t,r){return Ei(this,e,t,!1,r)};A.prototype.copy=function(e,t,r,n){if(!A.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=li(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=li(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function li(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 Ga(e,t,r){rt(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&At(t,e.length-(r+1))}function xi(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 et.ERR_OUT_OF_RANGE("value",a,e)}Ga(n,i,o)}function rt(e,t){if(typeof e!="number")throw new et.ERR_INVALID_ARG_TYPE(t,"number",e)}function At(e,t,r){throw Math.floor(e)!==e?(rt(e,r),new et.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new et.ERR_BUFFER_OUT_OF_BOUNDS:new et.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Wa=/[^+/0-9A-Za-z-_]/g;function Ka(e){if(e=e.split("=")[0],e=e.trim().replace(Wa,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function tn(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 za(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function Pi(e){return Xr.toByteArray(Ka(e))}function nr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function ye(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function sn(e){return e!==e}var Ya=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"?Za:e}function Za(){throw new Error("BigInt not supported")}});var w,m=he(()=>{"use strict";w=Se(vi())});function El(){return!1}function pn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function xl(){return pn()}function Pl(){return[]}function vl(e){e(null,[])}function Tl(){return""}function Al(){return""}function Cl(){}function Sl(){}function Rl(){}function kl(){}function Ol(){}function Il(){}function Fl(){}function Ml(){}function _l(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Dl(e,t){t(null,pn())}var Ll,Nl,or,dn=he(()=>{"use strict";m();c();p();d();f();Ll={},Nl={existsSync:El,lstatSync:pn,stat:Dl,statSync:xl,readdirSync:Pl,readdir:vl,readlinkSync:Tl,realpathSync:Al,chmodSync:Cl,renameSync:Sl,mkdirSync:Rl,rmdirSync:kl,rmSync:Ol,unlinkSync:Il,watchFile:Fl,unwatchFile:Ml,watch:_l,promises:Ll},or=Nl});function ql(...e){return e.join("/")}function Bl(...e){return e.join("/")}function jl(e){let t=Li(e),r=Ni(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Li(e){let t=e.split("/");return t[t.length-1]}function Ni(e){return e.split("/").slice(0,-1).join("/")}function $l(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var qi,Ul,Vl,Ql,Oe,mn=he(()=>{"use strict";m();c();p();d();f();qi="/",Ul=":";Vl={sep:qi},Ql={basename:Li,delimiter:Ul,dirname:Ni,join:Bl,normalize:$l,parse:jl,posix:Vl,resolve:ql,sep:qi},Oe=Ql});var Bi=Ce((Uf,Jl)=>{Jl.exports={name:"@prisma/internals",version:"6.15.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb","@prisma/schema-engine-wasm":"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var $i=Ce((Bm,Ui)=>{"use strict";m();c();p();d();f();Ui.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Wi=Ce((ng,Gi)=>{"use strict";m();c();p();d();f();Gi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Hi=Ce((gg,zi)=>{"use strict";m();c();p();d();f();zi.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var xn=Ce((xg,Yi)=>{"use strict";m();c();p();d();f();var tu=Hi();Yi.exports=e=>typeof e=="string"?e.replace(tu(),""):e});var Zi=Ce((Gg,ur)=>{"use strict";m();c();p();d();f();ur.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()};ur.exports.default=ur.exports});var In=Ce((l0,Po)=>{"use strict";m();c();p();d();f();Po.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";m();c();p();d();f()});var Ro=he(()=>{"use strict";m();c();p();d();f()});var Zo=Ce((Fv,Jc)=>{Jc.exports={name:"@prisma/engines-version",version:"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"85179d7826409ee107a6ba334b5e305ae3fba9fb"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Br,Xo=he(()=>{"use strict";m();c();p();d();f();Br=class{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 pd={};Xe(pd,{DMMF:()=>qt,Debug:()=>z,Decimal:()=>_e,Extensions:()=>an,MetricsClient:()=>wt,PrismaClientInitializationError:()=>Q,PrismaClientKnownRequestError:()=>se,PrismaClientRustPanicError:()=>ce,PrismaClientUnknownRequestError:()=>G,PrismaClientValidationError:()=>te,Public:()=>ln,Sql:()=>le,createParam:()=>Qo,defineDmmfProperty:()=>Ho,deserializeJsonResponse:()=>xt,deserializeRawResult:()=>Hr,dmmfToRuntimeDataModel:()=>ro,empty:()=>ts,getPrismaClient:()=>ya,getRuntime:()=>Fs,join:()=>es,makeStrictEnum:()=>wa,makeTypedQueryFactory:()=>Yo,objectEnumValues:()=>kr,raw:()=>jn,serializeJsonQuery:()=>Lr,skip:()=>Dr,sqltag:()=>Un,warnEnvConflicts:()=>void 0,warnOnce:()=>Dt});module.exports=Aa(pd);m();c();p();d();f();var an={};Xe(an,{defineExtension:()=>Ti,getExtensionContext:()=>Ai});m();c();p();d();f();m();c();p();d();f();function Ti(e){return typeof e=="function"?e:t=>t.$extends(e)}m();c();p();d();f();function Ai(e){return e}var ln={};Xe(ln,{validator:()=>Ci});m();c();p();d();f();m();c();p();d();f();function Ci(...e){return t=>t}m();c();p();d();f();m();c();p();d();f();var ir={};Xe(ir,{$:()=>Ii,bgBlack:()=>ll,bgBlue:()=>dl,bgCyan:()=>ml,bgGreen:()=>cl,bgMagenta:()=>fl,bgRed:()=>ul,bgWhite:()=>gl,bgYellow:()=>pl,black:()=>il,blue:()=>We,bold:()=>de,cyan:()=>ke,dim:()=>Ct,gray:()=>Ot,green:()=>Rt,grey:()=>al,hidden:()=>rl,inverse:()=>tl,italic:()=>el,magenta:()=>ol,red:()=>Ge,reset:()=>Xa,strikethrough:()=>nl,underline:()=>St,white:()=>sl,yellow:()=>kt});m();c();p();d();f();var un,Si,Ri,ki,Oi=!0;typeof y<"u"&&({FORCE_COLOR:un,NODE_DISABLE_COLORS:Si,NO_COLOR:Ri,TERM:ki}=y.env||{},Oi=y.stdout&&y.stdout.isTTY);var Ii={enabled:!Si&&Ri==null&&ki!=="dumb"&&(un!=null&&un!=="0"||Oi)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Ii.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Xa=V(0,0),de=V(1,22),Ct=V(2,22),el=V(3,23),St=V(4,24),tl=V(7,27),rl=V(8,28),nl=V(9,29),il=V(30,39),Ge=V(31,39),Rt=V(32,39),kt=V(33,39),We=V(34,39),ol=V(35,39),ke=V(36,39),sl=V(37,39),Ot=V(90,39),al=V(90,39),ll=V(40,49),ul=V(41,49),cl=V(42,49),pl=V(43,49),dl=V(44,49),fl=V(45,49),ml=V(46,49),gl=V(47,49);m();c();p();d();f();var hl=100,Fi=["green","yellow","blue","magenta","cyan","red"],It=[],Mi=Date.now(),yl=0,cn=typeof y<"u"?y.env:{};globalThis.DEBUG??=cn.DEBUG??"";globalThis.DEBUG_COLORS??=cn.DEBUG_COLORS?cn.DEBUG_COLORS==="true":!0;var Ft={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function wl(e){let t={color:Fi[yl++%Fi.length],enabled:Ft.enabled(e),namespace:e,log:Ft.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&It.push([o,...n]),It.length>hl&&It.shift(),Ft.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:bl(g)),u=`+${Date.now()-Mi}ms`;Mi=Date.now(),globalThis.DEBUG_COLORS?a(ir[s](de(o)),...l,ir[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var z=new Proxy(wl,{get:(e,t)=>Ft[t],set:(e,t,r)=>Ft[t]=r});function bl(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 _i(e=7500){let t=It.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` +`);return t.length{let r={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ie(t,e.queryRaw.bind(e)),executeRaw:Ie(t,e.executeRaw.bind(e)),executeScript:Ie(t,e.executeScript.bind(e)),dispose:Ie(t,e.dispose.bind(e)),provider:e.provider,startTransaction:async(...n)=>(await Ie(t,e.startTransaction.bind(e))(...n)).map(o=>zl(t,o))};return e.getConnectionInfo&&(r.getConnectionInfo=Hl(t,e.getConnectionInfo.bind(e))),r},zl=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ie(e,t.queryRaw.bind(t)),executeRaw:Ie(e,t.executeRaw.bind(t)),commit:Ie(e,t.commit.bind(t)),rollback:Ie(e,t.rollback.bind(t))});function Ie(e,t){return async(...r)=>{try{return sr(await t(...r))}catch(n){if(ji("[error@wrapAsync]",n),hn(n))return Ke(n.cause);let i=e.registerNewError(n);return Ke({kind:"GenericJs",id:i})}}}function Hl(e,t){return(...r)=>{try{return sr(t(...r))}catch(n){if(ji("[error@wrapSync]",n),hn(n))return Ke(n.cause);let i=e.registerNewError(n);return Ke({kind:"GenericJs",id:i})}}}m();c();p();d();f();var Vi=Se($i(),1);function wn(e){let t=(0,Vi.default)(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}m();c();p();d();f();var Qi="prisma+postgres",Ji=`${Qi}:`;function bn(e){return e?.toString().startsWith(`${Ji}//`)??!1}var _t={};Xe(_t,{error:()=>Xl,info:()=>Zl,log:()=>Yl,query:()=>eu,should:()=>Ki,tags:()=>Mt,warn:()=>En});m();c();p();d();f();var Mt={error:Ge("prisma:error"),warn:kt("prisma:warn"),info:ke("prisma:info"),query:We("prisma:query")},Ki={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Yl(...e){console.log(...e)}function En(e,...t){Ki.warn()&&console.warn(`${Mt.warn} ${e}`,...t)}function Zl(e,...t){console.info(`${Mt.info} ${e}`,...t)}function Xl(e,...t){console.error(`${Mt.error} ${e}`,...t)}function eu(e,...t){console.log(`${Mt.query} ${e}`,...t)}m();c();p();d();f();function lr(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 ze(e,t){throw new Error(t)}m();c();p();d();f();mn();function Pn(e){return Oe.sep===Oe.posix.sep?e:e.split(Oe.sep).join(Oe.posix.sep)}m();c();p();d();f();function vn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}m();c();p();d();f();function cr(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 Tn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Xi.has(e)||(Xi.add(e),En(t,...r))};var Q=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};ue(Q,"PrismaClientInitializationError");m();c();p();d();f();var se=class extends Error{code;meta;clientVersion;batchRequestIdx;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"}};ue(se,"PrismaClientKnownRequestError");m();c();p();d();f();var ce=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};ue(ce,"PrismaClientRustPanicError");m();c();p();d();f();var G=class extends Error{clientVersion;batchRequestIdx;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"}};ue(G,"PrismaClientUnknownRequestError");m();c();p();d();f();var te=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};ue(te,"PrismaClientValidationError");m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var we=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};m();c();p();d();f();function Ne(e){return e.substring(0,1).toLowerCase()+e.substring(1)}m();c();p();d();f();function to(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}m();c();p();d();f();function Lt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}m();c();p();d();f();function ro(e){return{models:An(e.models),enums:An(e.enums),types:An(e.types)}}function An(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}m();c();p();d();f();function ot(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function pr(e){return e.toString()!=="Invalid Date"}m();c();p();d();f();m();c();p();d();f();var st=9e15,Ue=1e9,Cn="0123456789abcdef",mr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",gr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Sn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-st,maxE:st,crypto:!1},so,Fe,D=!0,yr="[DecimalError] ",je=yr+"Invalid argument: ",ao=yr+"Precision limit exceeded",lo=yr+"crypto unavailable",uo="[object Decimal]",re=Math.floor,W=Math.pow,ru=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,nu=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,iu=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,co=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fe=1e7,M=7,ou=9007199254740991,su=mr.length-1,Rn=gr.length-1,R={toStringTag:uo};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),I(e)};R.ceil=function(){return I(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(je+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+M,n.rounding=1,r=au(n,ho(n,r)),n.precision=e,n.rounding=t,I(Fe==2||Fe==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(D=!1,o=g.s*W(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=W(r,1/3),e=re((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(g),n=U(u.plus(g).times(a),u.plus(l),s+2,1),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 D=!0,I(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-re(this.e/M))*M,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return U(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return I(U(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 I(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/br(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 I(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/br(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,I(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,U(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?be(t,n,i):new t(0):new t(NaN):e.isZero()?be(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};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,D=!1,r=r.times(r).minus(1).sqrt().plus(r),D=!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,D=!1,r=r.times(r).plus(1).sqrt().plus(r),D=!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?I(new o(i),e,t,!0):(o.precision=r=n-i.e,i=U(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};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=be(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,T=g.rounding;if(u.isFinite()){if(u.isZero())return new g(u);if(u.abs().eq(1)&&h+4<=Rn)return s=be(g,h+4,T).times(.25),s.s=u.s,s}else{if(!u.s)return new g(NaN);if(h+4<=Rn)return s=be(g,h+4,T).times(.5),s.s=u.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/M+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(D=!1,t=Math.ceil(a/M),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,T=g.rounding,k=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(D=!1,a=h+k,s=Be(u,a),n=t?hr(g,a+10):Be(e,a),l=U(s,n,a,1),Nt(l.d,i=h,T))do if(a+=10,s=Be(u,a),n=t?hr(g,a+10):Be(e,a),l=U(s,n,a,1),!o){+Z(l.d).slice(i+1,i+15)+1==1e14&&(l=I(l,h+1,0));break}while(Nt(l.d,i+=10,T));return D=!0,I(l,h,T)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,T,k=this,C=k.constructor;if(e=new C(e),!k.d||!e.d)return!k.s||!e.s?e=new C(NaN):k.d?e.s=-e.s:e=new C(e.d||k.s!==e.s?k:NaN),e;if(k.s!=e.s)return e.s=-e.s,k.plus(e);if(u=k.d,T=e.d,a=C.precision,l=C.rounding,!u[0]||!T[0]){if(T[0])e.s=-e.s;else if(u[0])e=new C(k);else return new C(l===3?-0:0);return D?I(e,a,l):e}if(r=re(e.e/M),g=re(k.e/M),u=u.slice(),o=g-r,o){for(h=o<0,h?(t=u,o=-o,s=T.length):(t=T,r=g,s=u.length),n=Math.max(Math.ceil(a/M),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=T.length,h=n0;--n)u[s++]=0;for(n=T.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=wr(u,n),D?I(e,a,l):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(je+e);return r.d?(t=po(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return I(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())+M,n.rounding=1,r=uu(n,ho(n,r)),n.precision=e,n.rounding=t,I(Fe>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(D=!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=re((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(u.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(U(s,o,r+2,1)).times(.5),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 D=!0,I(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=U(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,I(Fe==2||Fe==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,T=g.d,k=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!k||!k[0])return new h(!e.s||T&&!T[0]&&!k||k&&!k[0]&&!T?NaN:!T||!k?e.s/0:e.s*0);for(r=re(g.e/M)+re(e.e/M),l=T.length,u=k.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+k[n]*T[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=wr(o,r),D?I(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return On(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,Ue),t===void 0?t=n.rounding:ae(t,0,8),I(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ee(n,!0):(ae(e,0,Ue),t===void 0?t=i.rounding:ae(t,0,8),n=I(new i(n),e+1,t),r=Ee(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=Ee(i):(ae(e,0,Ue),t===void 0?t=o.rounding:ae(t,0,8),n=I(new o(i),e+i.e+1,t),r=Ee(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,T,k=this,C=k.d,S=k.constructor;if(!C)return new S(k);if(u=r=new S(1),n=l=new S(0),t=new S(n),o=t.e=po(C)-k.e-1,s=o%M,t.d[0]=W(10,s<0?M+s:s),e==null)e=o>0?t:u;else{if(a=new S(e),!a.isInt()||a.lt(u))throw Error(je+a);e=a.gt(t)?o>0?t:u:a}for(D=!1,a=new S(Z(C)),g=S.precision,S.precision=o=C.length*M*2;h=U(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=U(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=k.s,T=U(u,n,o,1).minus(k).abs().cmp(U(l,r,o,1).minus(k).abs())<1?[u,n]:[l,r],S.precision=g,D=!0,T};R.toHexadecimal=R.toHex=function(e,t){return On(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]?(D=!1,r=U(r,e,0,t,1).times(e),D=!0,I(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return On(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(W(+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=re(e.e/M),t>=e.d.length-1&&(r=u<0?-u:u)<=ou)return i=fo(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):(D=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=kn(e.times(Be(a,n+r)),n),i.d&&(i=I(i,n+5,1),Nt(i.d,n,o)&&(t=n+10,i=I(kn(e.times(Be(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,D=!0,l.rounding=o,I(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ee(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ae(e,1,Ue),t===void 0?t=i.rounding:ae(t,0,8),n=I(new i(n),e,t),r=Ee(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,Ue),t===void 0?t=n.rounding:ae(t,0,8)),I(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=Ee(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return I(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=Ee(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(je+e)}function Nt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=M,i=0):(i=Math.ceil((t+1)/M),t%=M),o=W(10,M-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)==W(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)==W(10,t-3)-1,s}function dr(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 au(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/br(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 U=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,g,h,T,k,C,S,F,_,L,O,q,Y,$,Tt,J,ie,Ae,X,Ze,er=n.constructor,Zr=n.s==i.s?1:-1,ee=n.d,j=i.d;if(!ee||!ee[0]||!j||!j[0])return new er(!n.s||!i.s||(ee?j&&ee[0]==j[0]:!j)?NaN:ee&&ee[0]==0||!j?Zr*0:Zr/0);for(l?(k=1,g=n.e-i.e):(l=fe,k=M,g=re(n.e/k)-re(i.e/k)),X=j.length,ie=ee.length,_=new er(Zr),L=_.d=[],h=0;j[h]==(ee[h]||0);h++);if(j[h]>(ee[h]||0)&&g--,o==null?($=o=er.precision,s=er.rounding):a?$=o+(n.e-i.e)+1:$=o,$<0)L.push(1),C=!0;else{if($=$/k+2|0,h=0,X==1){for(T=0,j=j[0],$++;(h1&&(j=e(j,T,l),ee=e(ee,T,l),X=j.length,ie=ee.length),J=X,O=ee.slice(0,X),q=O.length;q=l/2&&++Ae;do T=0,u=t(j,O,X,q),u<0?(Y=O[0],X!=q&&(Y=Y*l+(O[1]||0)),T=Y/Ae|0,T>1?(T>=l&&(T=l-1),S=e(j,T,l),F=S.length,q=O.length,u=t(S,O,F,q),u==1&&(T--,r(S,X=10;T/=10)h++;_.e=h+g*k-1,I(_,a?o+_.e+1:o,s,C)}return _}}();function I(e,t,r,n){var i,o,s,a,l,u,g,h,T,k=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+=M,s=t,g=h[T=0],l=g/W(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/M),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=M,s=o-M+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=M,s=o-M+i,l=s<0?0:g/W(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%W(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/W(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=W(10,(M-t%M)%M),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=W(10,M-o),h[T]=s>0?(g/W(10,i-s)%W(10,s)|0)*a:0),u)for(;;)if(T==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[T]+=a,h[T]!=fe)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return D&&(e.e>k.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 wr(e,t){var r=e[0];for(t*=M;r>=10;r/=10)t++;return t}function hr(e,t,r){if(t>su)throw D=!0,r&&(e.precision=r),Error(ao);return I(new e(mr),t,1,!0)}function be(e,t,r){if(t>Rn)throw Error(ao);return I(new e(gr),t,r,!0)}function po(e){var t=e.length-1,r=t*M+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 fo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/M+4);for(D=!1;;){if(r%2&&(o=o.times(t),io(o.d,s)&&(i=!0)),r=re(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),io(t.d,s)}return D=!0,o}function no(e){return e.d[e.d.length-1]&1}function mo(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(D=!1,l=C):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(W(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=I(o.times(e),l,1),r=r.times(++g),a=s.plus(U(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&&Nt(s.d,l-n,k,u))T.precision=l+=10,r=o=a=new T(1),g=0,u++;else return I(s,T.precision=C,k,D=!0);else return T.precision=C,s}s=a}}function Be(e,t){var r,n,i,o,s,a,l,u,g,h,T,k=1,C=10,S=e,F=S.d,_=S.constructor,L=_.rounding,O=_.precision;if(S.s<0||!F||!F[0]||!S.e&&F[0]==1&&F.length==1)return new _(F&&!F[0]?-1/0:S.s!=1?NaN:F?0:S);if(t==null?(D=!1,g=O):g=t,_.precision=g+=C,r=Z(F),n=r.charAt(0),Math.abs(o=S.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)S=S.times(e),r=Z(S.d),n=r.charAt(0),k++;o=S.e,n>1?(S=new _("0."+r),o++):S=new _(n+"."+r.slice(1))}else return u=hr(_,g+2,O).times(o+""),S=Be(new _(n+"."+r.slice(1)),g-C).plus(u),_.precision=O,t==null?I(S,O,L,D=!0):S;for(h=S,l=s=S=U(S.minus(1),S.plus(1),g,1),T=I(S.times(S),g,1),i=3;;){if(s=I(s.times(T),g,1),u=l.plus(U(s,new _(i),g,1)),Z(u.d).slice(0,g)===Z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(hr(_,g+2,O).times(o+""))),l=U(l,new _(k),g,1),t==null)if(Nt(l.d,g-C,L,a))_.precision=g+=C,u=s=S=U(h.minus(1),h.plus(1),g,1),T=I(S.times(S),g,1),i=a=1;else return I(l,_.precision=O,L,D=!0);else return _.precision=O,l;l=u,i+=2}}function go(e){return String(e.s*e.s/0)}function fr(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)%M,r<0&&(n+=M),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),co.test(t))return fr(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(nu.test(t))r=16,t=t.toLowerCase();else if(ru.test(t))r=2;else if(iu.test(t))r=8;else throw Error(je+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=fo(n,new n(r),o,o*2)),u=dr(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=wr(u,g),e.d=u,D=!1,s&&(e=U(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?W(2,l):Me.pow(2,l))),D=!0,e)}function uu(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/br(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/M);for(D=!1,l=r.times(r),a=new e(n);;){if(s=U(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=U(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return D=!0,s.d.length=h+1,s}function br(e,t){for(var r=e;--t;)r*=e;return r}function ho(e,t){var r,n=t.s<0,i=be(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=no(r)?n?2:3:n?4:1,t;Fe=no(r)?n?1:4:n?3:2}return t.minus(i).abs()}function On(e,t,r,n){var i,o,s,a,l,u,g,h,T,k=e.constructor,C=r!==void 0;if(C?(ae(r,1,Ue),n===void 0?n=k.rounding:ae(n,0,8)):(r=k.precision,n=k.rounding),!e.isFinite())g=go(e);else{for(g=Ee(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(".",""),T=new k(1),T.e=g.length-s,T.d=dr(Ee(T),10,i),T.e=T.d.length),h=dr(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 k(e),e.d=h,e.e=o,e=U(e,T,r,n,0,i),h=e.d,o=e.e,u=so),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=dr(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 cu(e){return new this(e).abs()}function pu(e){return new this(e).acos()}function du(e){return new this(e).acosh()}function fu(e,t){return new this(e).plus(t)}function mu(e){return new this(e).asin()}function gu(e){return new this(e).asinh()}function hu(e){return new this(e).atan()}function yu(e){return new this(e).atanh()}function wu(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=be(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?be(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=be(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(U(e,t,o,1)),t=be(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(U(e,t,o,1)),r}function bu(e){return new this(e).cbrt()}function Eu(e){return I(e=new this(e),e.e+1,2)}function xu(e,t,r){return new this(e).clamp(t,r)}function Pu(e){if(!e||typeof e!="object")throw Error(yr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Ue,"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(je+r+": "+n);if(r="crypto",i&&(this[r]=Sn[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(lo);else this[r]=!1;else throw Error(je+r+": "+n);return this}function vu(e){return new this(e).cos()}function Tu(e){return new this(e).cosh()}function yo(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,oo(o)){u.s=o.s,D?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;D?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(lo);else for(;o=10;i/=10)n++;nut,datamodelEnumToSchemaEnum:()=>zu});m();c();p();d();f();m();c();p();d();f();function zu(e){return{name:e.name,values:e.values.map(t=>t.name)}}m();c();p();d();f();var ut=(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.updateManyAndReturn="updateManyAndReturn",O.upsert="upsert",O.delete="delete",O.deleteMany="deleteMany",O.groupBy="groupBy",O.count="count",O.aggregate="aggregate",O.findRaw="findRaw",O.aggregateRaw="aggregateRaw",O))(ut||{});var xo=Se(Wi());m();c();p();d();f();dn();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var wo={keyword:ke,entity:ke,value:e=>de(We(e)),punctuation:We,directive:ke,function:ke,variable:e=>de(We(e)),string:e=>de(Rt(e)),boolean:kt,number:ke,comment:Ot};var Hu=e=>e,Er={},Yu=0,N={manual:Er.Prism&&Er.Prism.manual,disableWorkerMessageHandler:Er.Prism&&Er.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof me){let t=e;return new me(t.type,N.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(N.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ae instanceof me)continue;if(Y&&J!=t.length-1){L.lastIndex=ie;var h=L.exec(e);if(!h)break;var g=h.index+(q?h[1].length:0),T=h.index+h[0].length,a=J,l=ie;for(let j=t.length;a=l&&(++J,ie=l);if(t[J]instanceof me)continue;u=a-J,Ae=e.slice(ie,l),h.index-=ie}else{L.lastIndex=0;var h=L.exec(Ae),u=1}if(!h){if(o)break;continue}q&&($=h[1]?h[1].length:0);var g=h.index+$,h=h[0].slice($),T=g+h.length,k=Ae.slice(0,g),C=Ae.slice(T);let X=[J,u];k&&(++J,ie+=k.length,X.push(k));let Ze=new me(S,O?N.tokenize(h,O):h,Tt,h,Y);if(X.push(Ze),C&&X.push(C),Array.prototype.splice.apply(t,X),u!=1&&N.matchGrammar(e,t,r,J,ie,!0,S),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 N.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=N.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=N.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:me};N.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:/[{}[\];(),.:]/};N.languages.javascript=N.languages.extend("clike",{"class-name":[N.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}/});N.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;N.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:N.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:N.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:N.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:N.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});N.languages.markup&&N.languages.markup.tag.addInlined("script","javascript");N.languages.js=N.languages.javascript;N.languages.typescript=N.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/});N.languages.ts=N.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(""):Zu(e.type)(e.content)};function Zu(e){return wo[e]||Hu}function bo(e){return Xu(e,N.languages.javascript)}function Xu(e,t){return N.tokenize(e,t).map(n=>me.stringify(n)).join("")}m();c();p();d();f();function Eo(e){return wn(e)}var xr=class e{firstLineNumber;lines;static read(t){let r;try{r=or.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=bo(this.toString());return new e(this.firstLineNumber,t.split(` `))}toString(){return this.lines.join(` -`)}};var ec={red:Ge,gray:Ot,dim:At,bold:de,underline:St,highlightSource:e=>e.highlight()},tc={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function rc({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function nc({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=rc({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=xr.read(a.fileName)?.slice(l,a.lineNumber),g=u?.lineAt(a.lineNumber);if(u&&g){let h=oc(g),T=ic(g);if(!T)return s;s.functionName=`${T.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,A=>A.slice(0,T.openingBraceIndex))),u=o.highlightSource(u);let k=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((A,S)=>o.gray(String(S).padStart(k))+" "+A).mapLines(A=>o.dim(A)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let A=h+k+1;A+=2,s.callArguments=(0,xo.default)(i,A).slice(A)}}return s}function ic(e){let t=Object.keys(ut).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 oc(e){let t=0;for(let r=0;r"Unknown error")}function Ao(e){return e.errors.flatMap(t=>t.kind==="Union"?Ao(t):[t])}function lc(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:uc(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function uc(e,t){return[...new Set(e.concat(t))]}function cc(e){return Tn(e,(t,r)=>{let n=vo(t),i=vo(r);return n!==i?n-i:To(t)-To(r)})}function vo(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function To(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 pe=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};m();c();p();d();f();m();c();p();d();f();Ro();m();c();p();d();f();var ct=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;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}};So();m();c();p();d();f();m();c();p();d();f();var Tr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};m();c();p();d();f();var Cr=e=>e,Ar={bold:Cr,red:Cr,green:Cr,dim:Cr,enabled:!1},ko={bold:de,red:Ge,green:Rt,dim:At,enabled:!0},pt={write(e){e.writeLine(",")}};m();c();p();d();f();var xe=class{constructor(t){this.contents=t}isUnderlined=!1;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 $e=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var dt=class extends $e{items=[];addItem(t){return this.items.push(new Tr(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new xe("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(pt,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var ft=class e extends $e{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof dt&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new xe("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(pt,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};m();c();p();d();f();var H=class extends $e{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new xe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};m();c();p();d();f();var Bt=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(pt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function vr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":pc(e,t);break;case"IncludeOnScalar":dc(e,t);break;case"EmptySelection":fc(e,t,r);break;case"UnknownSelectionField":yc(e,t);break;case"InvalidSelectionValue":wc(e,t);break;case"UnknownArgument":bc(e,t);break;case"UnknownInputField":Ec(e,t);break;case"RequiredArgumentMissing":xc(e,t);break;case"InvalidArgumentType":Pc(e,t);break;case"InvalidArgumentValue":vc(e,t);break;case"ValueTooLarge":Tc(e,t);break;case"SomeFieldsMissing":Cc(e,t);break;case"TooManyFieldsGiven":Ac(e,t);break;case"Union":Co(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function pc(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 dc(e,t){let[r,n]=mt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new pe(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)}. ${jt(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function fc(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){mc(e,t,i);return}if(n.hasField("select")){gc(e,t);return}}if(r?.[Ne(e.outputType.name)]){hc(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function mc(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new pe(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 gc(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Mo(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${jt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function hc(e,t){let r=new Bt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new pe("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=mt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new ft;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function yc(e,t){let r=_o(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Mo(n,e.outputType);break;case"include":Sc(n,e.outputType);break;case"omit":Rc(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(jt(n)),i.join(" ")})}function wc(e,t){let r=_o(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function bc(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),kc(n,e.arguments)),t.addErrorMessage(i=>Io(i,r,e.arguments.map(o=>o.name)))}function Ec(e,t){let[r,n]=mt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Do(o,e.inputType)}t.addErrorMessage(o=>Io(o,n,e.inputType.fields.map(s=>s.name)))}function Io(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Ic(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(jt(e)),n.join(" ")}function xc(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]=mt(e.argumentPath),s=new Bt,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 pe(o,s).makeRequired())}else{let l=e.inputTypes.map(Fo).join(" | ");a.addSuggestion(new pe(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=mt(e.dependentArgumentPath);t.addErrorMessage(u=>`Argument \`${u.green(o)}\` is required because argument \`${u.green(l)}\` was provided.`)}}}function Fo(e){return e.kind==="list"?`${Fo(e.elementType)}[]`:e.name}function Pc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Sr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function vc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Sr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function 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 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 Cc(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&&Do(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Sr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(jt(i)),o.join(" ")})}function Ac(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Sr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Mo(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,"true"))}function Sc(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new pe(r.name,"true"))}function Rc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new pe(r.name,"true"))}function kc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function _o(e,t){let[r,n]=mt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Do(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function mt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function jt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Sr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Oc=3;function Ic(e,t){let r=1/0,n;for(let i of t){let o=(0,Oo.default)(e,i);o>Oc||o`}};function gt(e){return e instanceof Ut}m();c();p();d();f();var Rr=Symbol(),Mn=new WeakMap,De=class{constructor(t){t===Rr?Mn.set(this,`Prisma.${this._getName()}`):Mn.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Mn.get(this)}},$t=class extends De{_getNamespace(){return"NullTypes"}},Vt=class extends $t{#e};_n(Vt,"DbNull");var Qt=class extends $t{#e};_n(Qt,"JsonNull");var Jt=class extends $t{#e};_n(Jt,"AnyNull");var kr={classes:{DbNull:Vt,JsonNull:Qt,AnyNull:Jt},instances:{DbNull:new Vt(Rr),JsonNull:new Qt(Rr),AnyNull:new Jt(Rr)}};function _n(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}m();c();p();d();f();var Lo=": ",Or=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Lo.length}write(t){let r=new xe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Lo).write(this.value)}};var Dn=class{arguments;errorMessages=[];constructor(t){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 ht(e){return new Dn(No(e))}function No(e){let t=new ft;for(let[r,n]of Object.entries(e)){let i=new Or(r,qo(n));t.addField(i)}return t}function qo(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=pr(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof De?new H(`Prisma.${e._getName()}`):gt(e)?new H(`prisma.${Ne(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Fc(e):typeof e=="object"?No(e):new H(Object.prototype.toString.call(e))}function Fc(e){let t=new dt;for(let r of e)t.addItem(qo(r));return t}function Ir(e,t){let r=t==="pretty"?ko:Ar,n=e.renderAllMessages(r),i=new ct(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Fr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=ht(e);for(let h of t)vr(h,a,s);let{message:l,args:u}=Ir(a,r),g=Pr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:u});throw new te(g,{clientVersion:o})}m();c();p();d();f();m();c();p();d();f();function Pe(e){return e.replace(/^./,t=>t.toLowerCase())}m();c();p();d();f();function jo(e,t,r){let n=Pe(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Mc({...e,...Bo(t.name,e,t.result.$allModels),...Bo(t.name,e,t.result[n])})}function Mc(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 cr(e,n=>({...n,needs:r(n.name,new Set)}))}function Bo(e,t,r){return r?cr(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:_c(t,o,i)})):{}}function _c(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Uo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function $o(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Mr=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new we;modelExtensionsCache=new we;queryCallbacksCache=new we;clientExtensions=Lt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=Lt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>jo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Pe(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},yt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Mr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Mr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};m();c();p();d();f();var _r=class{constructor(t){this.name=t}};function Vo(e){return e instanceof _r}function Qo(e){return new _r(e)}m();c();p();d();f();m();c();p();d();f();var Jo=Symbol(),Gt=class{constructor(t){if(t!==Jo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Dr:t}},Dr=new Gt(Jo);function ve(e){return e instanceof Gt}var Dc={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Go="explicitly `undefined` values are not allowed";function Lr({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=yt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g}){let h=new Ln({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g});return{modelName:e,action:Dc[t],query:Wt(r,h)}}function Wt({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Ko(r,n),selection:Lc(e,t,i,n)}}function Lc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),jc(e,n)):Nc(n,t,r)}function Nc(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&qc(n,t,e),Bc(n,r,e),n}function qc(e,t,r){for(let[n,i]of Object.entries(t)){if(ve(i))continue;let o=r.nestSelection(n);if(Nn(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Wt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Wt(i,o)}}function Bc(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=$o(i,n);for(let[s,a]of Object.entries(o)){if(ve(a))continue;Nn(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function jc(e,t){let r={},n=t.getComputedFields(),i=Uo(e,n);for(let[o,s]of Object.entries(i)){if(ve(s))continue;let a=t.nestSelection(o);Nn(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||ve(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Wt({},a):r[o]=!0;continue}r[o]=Wt(s,a)}}return r}function Wo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(ot(e)){if(pr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Vo(e))return{$type:"Param",value:e.name};if(gt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return Uc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if($c(e))return e.values;if(lt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof De){if(e!==kr.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Vc(e))return e.toJSON();if(typeof e=="object")return Ko(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Ko(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);ve(i)||(i!==void 0?r[n]=Wo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:Go}))}return r}function Uc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Ne(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"updateManyAndReturn":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:ze(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};m();c();p();d();f();function zo(e){if(!e._hasPreviewFlag("metrics"))throw new te("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var wt=class{_client;constructor(t){this._client=t}prometheus(t){return zo(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return zo(this._client),this._client._engine.metrics({format:"json",...t})}};m();c();p();d();f();function Ho(e,t){let r=Lt(()=>Qc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Qc(e){return{datamodel:{models:qn(e.models),enums:qn(e.enums),types:qn(e.types)}}}function qn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}m();c();p();d();f();var Bn=new WeakMap,Nr="$$PrismaTypedSql",Kt=class{constructor(t,r){Bn.set(this,{sql:t,values:r}),Object.defineProperty(this,Nr,{value:Nr})}get sql(){return Bn.get(this).sql}get values(){return Bn.get(this).values}};function Yo(e){return(...t)=>new Kt(e,t)}function qr(e){return e!=null&&e[Nr]===Nr}m();c();p();d();f();var ha=Se(Zo());m();c();p();d();f();Xo();dn();mn();m();c();p();d();f();var le=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}m();c();p();d();f();m();c();p();d();f();var jr={enumerable:!0,configurable:!0,writable:!0};function Ur(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>jr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var rs=Symbol.for("nodejs.util.inspect.custom");function ge(e,t){let r=Gc(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=ns(Reflect.ownKeys(o),r),a=ns(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?{...jr,...l?.getPropertyDescriptor(s)}:jr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[rs]=function(){let o={...this};return delete o[rs],o},i}function Gc(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 ns(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}m();c();p();d();f();function bt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}m();c();p();d();f();function $r(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}m();c();p();d();f();function is(e){if(e===void 0)return"";let t=ht(e);return new ct(0,{colors:Ar}).write(t).toString()}m();c();p();d();f();var Wc="P2037";function Vr({error:e,user_facing_error:t},r,n){return t.error_code?new se(Kc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new G(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Kc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Wc&&(r+=` +`)}};var ec={red:Ge,gray:Ot,dim:Ct,bold:de,underline:St,highlightSource:e=>e.highlight()},tc={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function rc({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function nc({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=rc({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=xr.read(a.fileName)?.slice(l,a.lineNumber),g=u?.lineAt(a.lineNumber);if(u&&g){let h=oc(g),T=ic(g);if(!T)return s;s.functionName=`${T.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,C=>C.slice(0,T.openingBraceIndex))),u=o.highlightSource(u);let k=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((C,S)=>o.gray(String(S).padStart(k))+" "+C).mapLines(C=>o.dim(C)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let C=h+k+1;C+=2,s.callArguments=(0,xo.default)(i,C).slice(C)}}return s}function ic(e){let t=Object.keys(ut).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 oc(e){let t=0;for(let r=0;r"Unknown error")}function Co(e){return e.errors.flatMap(t=>t.kind==="Union"?Co(t):[t])}function lc(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:uc(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function uc(e,t){return[...new Set(e.concat(t))]}function cc(e){return Tn(e,(t,r)=>{let n=vo(t),i=vo(r);return n!==i?n-i:To(t)-To(r)})}function vo(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function To(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 pe=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};m();c();p();d();f();m();c();p();d();f();Ro();m();c();p();d();f();var ct=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;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}};So();m();c();p();d();f();m();c();p();d();f();var Tr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};m();c();p();d();f();var Ar=e=>e,Cr={bold:Ar,red:Ar,green:Ar,dim:Ar,enabled:!1},ko={bold:de,red:Ge,green:Rt,dim:Ct,enabled:!0},pt={write(e){e.writeLine(",")}};m();c();p();d();f();var xe=class{constructor(t){this.contents=t}isUnderlined=!1;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 $e=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var dt=class extends $e{items=[];addItem(t){return this.items.push(new Tr(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new xe("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(pt,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var ft=class e extends $e{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof dt&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new xe("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(pt,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};m();c();p();d();f();var H=class extends $e{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new xe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};m();c();p();d();f();var Bt=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(pt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function vr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":pc(e,t);break;case"IncludeOnScalar":dc(e,t);break;case"EmptySelection":fc(e,t,r);break;case"UnknownSelectionField":yc(e,t);break;case"InvalidSelectionValue":wc(e,t);break;case"UnknownArgument":bc(e,t);break;case"UnknownInputField":Ec(e,t);break;case"RequiredArgumentMissing":xc(e,t);break;case"InvalidArgumentType":Pc(e,t);break;case"InvalidArgumentValue":vc(e,t);break;case"ValueTooLarge":Tc(e,t);break;case"SomeFieldsMissing":Ac(e,t);break;case"TooManyFieldsGiven":Cc(e,t);break;case"Union":Ao(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function pc(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 dc(e,t){let[r,n]=mt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new pe(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)}. ${jt(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function fc(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){mc(e,t,i);return}if(n.hasField("select")){gc(e,t);return}}if(r?.[Ne(e.outputType.name)]){hc(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function mc(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new pe(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 gc(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Mo(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${jt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function hc(e,t){let r=new Bt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new pe("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=mt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new ft;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function yc(e,t){let r=_o(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Mo(n,e.outputType);break;case"include":Sc(n,e.outputType);break;case"omit":Rc(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(jt(n)),i.join(" ")})}function wc(e,t){let r=_o(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function bc(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),kc(n,e.arguments)),t.addErrorMessage(i=>Io(i,r,e.arguments.map(o=>o.name)))}function Ec(e,t){let[r,n]=mt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Do(o,e.inputType)}t.addErrorMessage(o=>Io(o,n,e.inputType.fields.map(s=>s.name)))}function Io(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Ic(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(jt(e)),n.join(" ")}function xc(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]=mt(e.argumentPath),s=new Bt,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 pe(o,s).makeRequired())}else{let l=e.inputTypes.map(Fo).join(" | ");a.addSuggestion(new pe(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=mt(e.dependentArgumentPath);t.addErrorMessage(u=>`Argument \`${u.green(o)}\` is required because argument \`${u.green(l)}\` was provided.`)}}}function Fo(e){return e.kind==="list"?`${Fo(e.elementType)}[]`:e.name}function Pc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Sr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function vc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Sr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function 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 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 Ac(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&&Do(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Sr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(jt(i)),o.join(" ")})}function Cc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Sr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Mo(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,"true"))}function Sc(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new pe(r.name,"true"))}function Rc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new pe(r.name,"true"))}function kc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function _o(e,t){let[r,n]=mt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Do(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function mt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function jt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Sr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Oc=3;function Ic(e,t){let r=1/0,n;for(let i of t){let o=(0,Oo.default)(e,i);o>Oc||o`}};function gt(e){return e instanceof Ut}m();c();p();d();f();var Rr=Symbol(),Mn=new WeakMap,De=class{constructor(t){t===Rr?Mn.set(this,`Prisma.${this._getName()}`):Mn.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Mn.get(this)}},$t=class extends De{_getNamespace(){return"NullTypes"}},Vt=class extends $t{#e};_n(Vt,"DbNull");var Qt=class extends $t{#e};_n(Qt,"JsonNull");var Jt=class extends $t{#e};_n(Jt,"AnyNull");var kr={classes:{DbNull:Vt,JsonNull:Qt,AnyNull:Jt},instances:{DbNull:new Vt(Rr),JsonNull:new Qt(Rr),AnyNull:new Jt(Rr)}};function _n(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}m();c();p();d();f();var Lo=": ",Or=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Lo.length}write(t){let r=new xe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Lo).write(this.value)}};var Dn=class{arguments;errorMessages=[];constructor(t){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 ht(e){return new Dn(No(e))}function No(e){let t=new ft;for(let[r,n]of Object.entries(e)){let i=new Or(r,qo(n));t.addField(i)}return t}function qo(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=pr(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof De?new H(`Prisma.${e._getName()}`):gt(e)?new H(`prisma.${Ne(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Fc(e):typeof e=="object"?No(e):new H(Object.prototype.toString.call(e))}function Fc(e){let t=new dt;for(let r of e)t.addItem(qo(r));return t}function Ir(e,t){let r=t==="pretty"?ko:Cr,n=e.renderAllMessages(r),i=new ct(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Fr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=ht(e);for(let h of t)vr(h,a,s);let{message:l,args:u}=Ir(a,r),g=Pr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:u});throw new te(g,{clientVersion:o})}m();c();p();d();f();m();c();p();d();f();function Pe(e){return e.replace(/^./,t=>t.toLowerCase())}m();c();p();d();f();function jo(e,t,r){let n=Pe(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Mc({...e,...Bo(t.name,e,t.result.$allModels),...Bo(t.name,e,t.result[n])})}function Mc(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 cr(e,n=>({...n,needs:r(n.name,new Set)}))}function Bo(e,t,r){return r?cr(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:_c(t,o,i)})):{}}function _c(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Uo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function $o(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Mr=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new we;modelExtensionsCache=new we;queryCallbacksCache=new we;clientExtensions=Lt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=Lt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>jo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Pe(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},yt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Mr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Mr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};m();c();p();d();f();var _r=class{constructor(t){this.name=t}};function Vo(e){return e instanceof _r}function Qo(e){return new _r(e)}m();c();p();d();f();m();c();p();d();f();var Jo=Symbol(),Gt=class{constructor(t){if(t!==Jo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Dr:t}},Dr=new Gt(Jo);function ve(e){return e instanceof Gt}var Dc={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Go="explicitly `undefined` values are not allowed";function Lr({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=yt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g}){let h=new Ln({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g});return{modelName:e,action:Dc[t],query:Wt(r,h)}}function Wt({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Ko(r,n),selection:Lc(e,t,i,n)}}function Lc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),jc(e,n)):Nc(n,t,r)}function Nc(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&qc(n,t,e),Bc(n,r,e),n}function qc(e,t,r){for(let[n,i]of Object.entries(t)){if(ve(i))continue;let o=r.nestSelection(n);if(Nn(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Wt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Wt(i,o)}}function Bc(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=$o(i,n);for(let[s,a]of Object.entries(o)){if(ve(a))continue;Nn(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function jc(e,t){let r={},n=t.getComputedFields(),i=Uo(e,n);for(let[o,s]of Object.entries(i)){if(ve(s))continue;let a=t.nestSelection(o);Nn(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||ve(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Wt({},a):r[o]=!0;continue}r[o]=Wt(s,a)}}return r}function Wo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(ot(e)){if(pr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Vo(e))return{$type:"Param",value:e.name};if(gt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return Uc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if($c(e))return e.values;if(lt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof De){if(e!==kr.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Vc(e))return e.toJSON();if(typeof e=="object")return Ko(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Ko(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);ve(i)||(i!==void 0?r[n]=Wo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:Go}))}return r}function Uc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Ne(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"updateManyAndReturn":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:ze(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};m();c();p();d();f();function zo(e){if(!e._hasPreviewFlag("metrics"))throw new te("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var wt=class{_client;constructor(t){this._client=t}prometheus(t){return zo(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return zo(this._client),this._client._engine.metrics({format:"json",...t})}};m();c();p();d();f();function Ho(e,t){let r=Lt(()=>Qc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Qc(e){return{datamodel:{models:qn(e.models),enums:qn(e.enums),types:qn(e.types)}}}function qn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}m();c();p();d();f();var Bn=new WeakMap,Nr="$$PrismaTypedSql",Kt=class{constructor(t,r){Bn.set(this,{sql:t,values:r}),Object.defineProperty(this,Nr,{value:Nr})}get sql(){return Bn.get(this).sql}get values(){return Bn.get(this).values}};function Yo(e){return(...t)=>new Kt(e,t)}function qr(e){return e!=null&&e[Nr]===Nr}m();c();p();d();f();var ha=Se(Zo());m();c();p();d();f();Xo();dn();mn();m();c();p();d();f();var le=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}m();c();p();d();f();m();c();p();d();f();var jr={enumerable:!0,configurable:!0,writable:!0};function Ur(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>jr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var rs=Symbol.for("nodejs.util.inspect.custom");function ge(e,t){let r=Gc(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=ns(Reflect.ownKeys(o),r),a=ns(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?{...jr,...l?.getPropertyDescriptor(s)}:jr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[rs]=function(){let o={...this};return delete o[rs],o},i}function Gc(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 ns(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}m();c();p();d();f();function bt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}m();c();p();d();f();function $r(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}m();c();p();d();f();function is(e){if(e===void 0)return"";let t=ht(e);return new ct(0,{colors:Cr}).write(t).toString()}m();c();p();d();f();var Wc="P2037";function Vr({error:e,user_facing_error:t},r,n){return t.error_code?new se(Kc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new G(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Kc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Wc&&(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 Ht="";function os(e){var t=e.split(` -`);return t.reduce(function(r,n){var i=Yc(n)||Xc(n)||rp(n)||sp(n)||ip(n);return i&&r.push(i),r},[])}var zc=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|rsc||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Hc=/\((\S*)(?::(\d+))(?::(\d+))\)/;function Yc(e){var t=zc.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=Hc.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]||Ht,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var Zc=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|rsc|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Xc(e){var t=Zc.exec(e);return t?{file:t[2],methodName:t[1]||Ht,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var ep=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|rsc|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,tp=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function rp(e){var t=ep.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=tp.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||Ht,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var np=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function ip(e){var t=np.exec(e);return t?{file:t[3],methodName:t[1]||Ht,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var op=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function sp(e){var t=op.exec(e);return t?{file:t[2],methodName:t[1]||Ht,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var $n=class{getLocation(){return null}},Vn=class{_error;constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=os(t).find(i=>{if(!i.file)return!1;let o=Pn(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function Ve(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new $n:new Vn}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var ss={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Et(e={}){let t=lp(e);return Object.entries(t).reduce((n,[i,o])=>(ss[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function lp(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Qr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function as(e,t){let r=Qr(e);return t({action:"aggregate",unpacker:r,argsMapper:Et})(e)}m();c();p();d();f();function up(e={}){let{select:t,...r}=e;return typeof t=="object"?Et({...r,_count:t}):Et({...r,_count:{_all:!0}})}function cp(e={}){return typeof e.select=="object"?t=>Qr(e)(t)._count:t=>Qr(e)(t)._count._all}function ls(e,t){return t({action:"count",unpacker:cp(e),argsMapper:up})(e)}m();c();p();d();f();function pp(e={}){let t=Et(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 dp(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:dp(e),argsMapper:pp})(e)}function cs(e,t,r){if(t==="aggregate")return n=>as(n,r);if(t==="count")return n=>ls(n,r);if(t==="groupBy")return n=>us(n,r)}m();c();p();d();f();function ps(e,t){let r=t.fields.filter(i=>!i.relationName),n=to(r,"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 Ut(e,o,s.type,s.isList,s.kind==="enum")},...Ur(Object.keys(n))})}m();c();p();d();f();m();c();p();d();f();var ds=e=>Array.isArray(e)?e:e.split("."),Qn=(e,t)=>ds(t).reduce((r,n)=>r&&r[n],e),fs=(e,t,r)=>ds(t).reduceRight((n,i,o,s)=>Object.assign({},Qn(e,s.slice(0,o)),{[i]:n}),r);function fp(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function mp(e,t,r){return t===void 0?e??{}:fs(t,r,e||!0)}function Jn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ve(e._errorFormat),g=fp(n,i),h=mp(l,o,g),T=r({dataPath:g,callsite:u})(h),k=gp(e,t);return new Proxy(T,{get(A,S){if(!k.includes(S))return A[S];let _=[a[S].type,r,S],L=[g,h];return Jn(e,..._,...L)},...Ur([...k,...Object.getOwnPropertyNames(T)])})}}function gp(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var hp=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],yp=["aggregate","count","groupBy"];function Gn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[wp(e,t),Ep(e,t),zt(r),ne("name",()=>t),ne("$name",()=>t),ne("$parent",()=>e._appliedParent)];return ge({},n)}function wp(e,t){let r=Pe(t),n=Object.keys(ut).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let u=Ve(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:u};return e._request({...h,...a})},{action:o,args:l,model:t})};return hp.includes(o)?Jn(e,t,s):bp(i)?cs(e,i,s):s({})}}}function bp(e){return yp.includes(e)}function Ep(e,t){return He(ne("fields",()=>{let r=e._runtimeDataModel.models[t];return ps(t,r)}))}m();c();p();d();f();function ms(e){return e.replace(/^./,t=>t.toUpperCase())}var Wn=Symbol();function Yt(e){let t=[xp(e),Pp(e),ne(Wn,()=>e),ne("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(zt(r)),ge(e,t)}function xp(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function Pp(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Pe),n=[...new Set(t.concat(r))];return He({getKeys(){return n},getPropertyValue(i){let o=ms(i);if(e._runtimeDataModel.models[o]!==void 0)return Gn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Gn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function gs(e){return e[Wn]?e[Wn]:e}function hs(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},$on:{value:void 0}});return Yt(t)}m();c();p();d();f();m();c();p();d();f();function ys({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(bt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(bt(u))}vp(e,l.needs)&&s.push(Tp(l,ge(e,s)))}return s.length>0||a.length>0?ge(e,[...s,...a]):e}function vp(e,t){return t.every(r=>vn(e,r))}function Tp(e,t){return He(ne(e.name,()=>e.compute(t)))}m();c();p();d();f();function Jr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=Jr({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function bs({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Jr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=Pe(l);return ys({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();m();c();p();d();f();var Cp=["$connect","$disconnect","$on","$transaction","$extends"],Es=Cp;function xs(e){if(e instanceof le)return Ap(e);if(qr(e))return Sp(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:xs(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Ss(o,l),a.args=s,vs(e,a,r,n+1)}})})}function Ts(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 vs(e,t,s)}function Cs(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?As(r,n,0,e):e(r)}}function As(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=Ss(i,l),As(a,t,r+1,n)}})}var Ps=e=>e;function Ss(e=Ps,t=Ps){return r=>e(t(r))}m();c();p();d();f();var Rs=z("prisma:client"),ks={Vercel:"vercel","Netlify CI":"netlify"};function Os({postinstall:e,ciName:t,clientVersion:r}){if(Rs("checkPlatformCaching:postinstall",e),Rs("checkPlatformCaching:ciName",t),e===!0&&t&&t in ks){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. +`);return t.reduce(function(r,n){var i=Yc(n)||Xc(n)||rp(n)||sp(n)||ip(n);return i&&r.push(i),r},[])}var zc=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|rsc||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Hc=/\((\S*)(?::(\d+))(?::(\d+))\)/;function Yc(e){var t=zc.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=Hc.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]||Ht,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var Zc=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|rsc|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Xc(e){var t=Zc.exec(e);return t?{file:t[2],methodName:t[1]||Ht,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var ep=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|rsc|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,tp=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function rp(e){var t=ep.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=tp.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||Ht,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var np=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function ip(e){var t=np.exec(e);return t?{file:t[3],methodName:t[1]||Ht,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var op=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function sp(e){var t=op.exec(e);return t?{file:t[2],methodName:t[1]||Ht,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var $n=class{getLocation(){return null}},Vn=class{_error;constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=os(t).find(i=>{if(!i.file)return!1;let o=Pn(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function Ve(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new $n:new Vn}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var ss={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Et(e={}){let t=lp(e);return Object.entries(t).reduce((n,[i,o])=>(ss[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function lp(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Qr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function as(e,t){let r=Qr(e);return t({action:"aggregate",unpacker:r,argsMapper:Et})(e)}m();c();p();d();f();function up(e={}){let{select:t,...r}=e;return typeof t=="object"?Et({...r,_count:t}):Et({...r,_count:{_all:!0}})}function cp(e={}){return typeof e.select=="object"?t=>Qr(e)(t)._count:t=>Qr(e)(t)._count._all}function ls(e,t){return t({action:"count",unpacker:cp(e),argsMapper:up})(e)}m();c();p();d();f();function pp(e={}){let t=Et(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 dp(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:dp(e),argsMapper:pp})(e)}function cs(e,t,r){if(t==="aggregate")return n=>as(n,r);if(t==="count")return n=>ls(n,r);if(t==="groupBy")return n=>us(n,r)}m();c();p();d();f();function ps(e,t){let r=t.fields.filter(i=>!i.relationName),n=to(r,"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 Ut(e,o,s.type,s.isList,s.kind==="enum")},...Ur(Object.keys(n))})}m();c();p();d();f();m();c();p();d();f();var ds=e=>Array.isArray(e)?e:e.split("."),Qn=(e,t)=>ds(t).reduce((r,n)=>r&&r[n],e),fs=(e,t,r)=>ds(t).reduceRight((n,i,o,s)=>Object.assign({},Qn(e,s.slice(0,o)),{[i]:n}),r);function fp(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function mp(e,t,r){return t===void 0?e??{}:fs(t,r,e||!0)}function Jn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ve(e._errorFormat),g=fp(n,i),h=mp(l,o,g),T=r({dataPath:g,callsite:u})(h),k=gp(e,t);return new Proxy(T,{get(C,S){if(!k.includes(S))return C[S];let _=[a[S].type,r,S],L=[g,h];return Jn(e,..._,...L)},...Ur([...k,...Object.getOwnPropertyNames(T)])})}}function gp(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var hp=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],yp=["aggregate","count","groupBy"];function Gn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[wp(e,t),Ep(e,t),zt(r),ne("name",()=>t),ne("$name",()=>t),ne("$parent",()=>e._appliedParent)];return ge({},n)}function wp(e,t){let r=Pe(t),n=Object.keys(ut).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let u=Ve(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:u};return e._request({...h,...a})},{action:o,args:l,model:t})};return hp.includes(o)?Jn(e,t,s):bp(i)?cs(e,i,s):s({})}}}function bp(e){return yp.includes(e)}function Ep(e,t){return He(ne("fields",()=>{let r=e._runtimeDataModel.models[t];return ps(t,r)}))}m();c();p();d();f();function ms(e){return e.replace(/^./,t=>t.toUpperCase())}var Wn=Symbol();function Yt(e){let t=[xp(e),Pp(e),ne(Wn,()=>e),ne("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(zt(r)),ge(e,t)}function xp(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function Pp(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Pe),n=[...new Set(t.concat(r))];return He({getKeys(){return n},getPropertyValue(i){let o=ms(i);if(e._runtimeDataModel.models[o]!==void 0)return Gn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Gn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function gs(e){return e[Wn]?e[Wn]:e}function hs(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},$on:{value:void 0}});return Yt(t)}m();c();p();d();f();m();c();p();d();f();function ys({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(bt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(bt(u))}vp(e,l.needs)&&s.push(Tp(l,ge(e,s)))}return s.length>0||a.length>0?ge(e,[...s,...a]):e}function vp(e,t){return t.every(r=>vn(e,r))}function Tp(e,t){return He(ne(e.name,()=>e.compute(t)))}m();c();p();d();f();function Jr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=Jr({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function bs({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Jr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=Pe(l);return ys({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();m();c();p();d();f();var Ap=["$connect","$disconnect","$on","$transaction","$extends"],Es=Ap;function xs(e){if(e instanceof le)return Cp(e);if(qr(e))return Sp(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:xs(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Ss(o,l),a.args=s,vs(e,a,r,n+1)}})})}function Ts(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 vs(e,t,s)}function As(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Cs(r,n,0,e):e(r)}}function Cs(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=Ss(i,l),Cs(a,t,r+1,n)}})}var Ps=e=>e;function Ss(e=Ps,t=Ps){return r=>e(t(r))}m();c();p();d();f();var Rs=z("prisma:client"),ks={Vercel:"vercel","Netlify CI":"netlify"};function Os({postinstall:e,ciName:t,clientVersion:r}){if(Rs("checkPlatformCaching:postinstall",e),Rs("checkPlatformCaching:ciName",t),e===!0&&t&&t in ks){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/${ks[t]}-build`;throw console.error(n),new Q(n,r)}}m();c();p();d();f();function Is(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();var Rp=()=>globalThis.process?.release?.name==="node",kp=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Op=()=>!!globalThis.Deno,Ip=()=>typeof globalThis.Netlify=="object",Fp=()=>typeof globalThis.EdgeRuntime=="object",Mp=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function _p(){return[[Ip,"netlify"],[Fp,"edge-light"],[Mp,"workerd"],[Op,"deno"],[kp,"bun"],[Rp,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Dp={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 Fs(){let e=_p();return{id:e,prettyName:Dp[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}m();c();p();d();f();m();c();p();d();f();var Kn=Se(xn());m();c();p();d();f();function Ms(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}m();c();p();d();f();function _s(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(` @@ -60,16 +60,16 @@ ${St(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();m();c();p();d();f();m();c();p();d();f();function qs(e,t){throw new Error(t)}function Lp(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Np(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function xt(e){return e===null?e:Array.isArray(e)?e.map(xt):typeof e=="object"?Lp(e)?qp(e):e.constructor!==null&&e.constructor.name!=="Object"?e:Np(e,xt):e}function qp({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=w.Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new Me(t);case"Json":return JSON.parse(t);default:qs(t,"Unknown tagged value")}}var Bs="6.14.0";m();c();p();d();f();function Gr({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 Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}m();c();p();d();f();m();c();p();d();f();function js(e){if(e?.kind==="itx")return e.options.id}m();c();p();d();f();var zn=class{engineObject;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,enableTracing:t.enableTracing})}async connect(t,r){return __PrismaProxy.connect(this.engineObject,t,r)}async disconnect(t,r){return __PrismaProxy.disconnect(this.engineObject,t,r)}query(t,r,n,i){return __PrismaProxy.execute(this.engineObject,t,r,n,i)}compile(){throw new Error("not implemented")}sdlSchema(){return Promise.resolve("{}")}dmmf(t){return Promise.resolve("{}")}async startTransaction(t,r,n){return __PrismaProxy.startTransaction(this.engineObject,t,r,n)}async commitTransaction(t,r,n){return __PrismaProxy.commitTransaction(this.engineObject,t,r,n)}async rollbackTransaction(t,r,n){return __PrismaProxy.rollbackTransaction(this.engineObject,t,r,n)}metrics(t){return Promise.resolve("{}")}async applyPendingMigrations(){return __PrismaProxy.applyPendingMigrations(this.engineObject)}trace(t){return __PrismaProxy.trace(this.engineObject,t)}},Us={async loadLibrary(e){if(!__PrismaProxy)throw new Q("__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:zn}}};var jp="P2036",Te=z("prisma:client:libraryEngine");function Up(e){return e.item_type==="query"&&"query"in e}function $p(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var Ak=[...fn,"native"],Vp=0xffffffffffffffffn,Hn=1n;function Qp(){let e=Hn++;return Hn>Vp&&(Hn=1n),e}var Xt=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(t,r){this.libraryLoader=Us,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,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()}wrapEngine(t){return{applyPendingMigrations:t.applyPendingMigrations?.bind(t),commitTransaction:this.withRequestId(t.commitTransaction.bind(t)),connect:this.withRequestId(t.connect.bind(t)),disconnect:this.withRequestId(t.disconnect.bind(t)),metrics:t.metrics?.bind(t),query:this.withRequestId(t.query.bind(t)),rollbackTransaction:this.withRequestId(t.rollbackTransaction.bind(t)),sdlSchema:t.sdlSchema?.bind(t),startTransaction:this.withRequestId(t.startTransaction.bind(t)),trace:t.trace.bind(t),free:t.free?.bind(t)}}withRequestId(t){return async(...r)=>{let n=Qp().toString();try{return await t(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){await this.start(),await this.engine?.applyPendingMigrations()}async transaction(t,r,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(r),s;if(t==="start"){let l=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(l,o)}else t==="commit"?s=await this.engine?.commitTransaction(n.id,o):t==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(Jp(a)){let l=this.getExternalAdapterError(a,i?.errorRegistry);throw l?l.error:new se(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new G(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(Te("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new G("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new G("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new b(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(ar));let r=await this.adapterPromise;r&&Te("Using driver adapter: %O",r),this.engine=this.wrapEngine(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",enableTracing:this.tracingHelper.isEnabled()},n=>{t.deref()?.logger(n)},r))}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new Q(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);r&&(r.level=r?.level.toLowerCase()??"unknown",Up(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):$p(r)?this.loggerRustPanic=new ce(Yn(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(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Te(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Te("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(ar)),await this.adapterPromise,Te("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new Q(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Te("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let t=async()=>{await new Promise(n=>setImmediate(n)),Te("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,Te("library stopped")};return this.libraryStoppingPromise=this.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}){Te(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new G(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof Q)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new ce(Yn(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new G(`${a.message} +`}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();function qs(e,t){throw new Error(t)}function Lp(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Np(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function xt(e){return e===null?e:Array.isArray(e)?e.map(xt):typeof e=="object"?Lp(e)?qp(e):e.constructor!==null&&e.constructor.name!=="Object"?e:Np(e,xt):e}function qp({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=w.Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new Me(t);case"Json":return JSON.parse(t);default:qs(t,"Unknown tagged value")}}var Bs="6.15.0";m();c();p();d();f();function Gr({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 Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}m();c();p();d();f();m();c();p();d();f();function js(e){if(e?.kind==="itx")return e.options.id}m();c();p();d();f();var zn=class{engineObject;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,enableTracing:t.enableTracing})}async connect(t,r){return __PrismaProxy.connect(this.engineObject,t,r)}async disconnect(t,r){return __PrismaProxy.disconnect(this.engineObject,t,r)}query(t,r,n,i){return __PrismaProxy.execute(this.engineObject,t,r,n,i)}compile(){throw new Error("not implemented")}sdlSchema(){return Promise.resolve("{}")}dmmf(t){return Promise.resolve("{}")}async startTransaction(t,r,n){return __PrismaProxy.startTransaction(this.engineObject,t,r,n)}async commitTransaction(t,r,n){return __PrismaProxy.commitTransaction(this.engineObject,t,r,n)}async rollbackTransaction(t,r,n){return __PrismaProxy.rollbackTransaction(this.engineObject,t,r,n)}metrics(t){return Promise.resolve("{}")}async applyPendingMigrations(){return __PrismaProxy.applyPendingMigrations(this.engineObject)}trace(t){return __PrismaProxy.trace(this.engineObject,t)}},Us={async loadLibrary(e){if(!__PrismaProxy)throw new Q("__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:zn}}};var jp="P2036",Te=z("prisma:client:libraryEngine");function Up(e){return e.item_type==="query"&&"query"in e}function $p(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var Ck=[...fn,"native"],Vp=0xffffffffffffffffn,Hn=1n;function Qp(){let e=Hn++;return Hn>Vp&&(Hn=1n),e}var Xt=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(t,r){this.libraryLoader=Us,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,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()}wrapEngine(t){return{applyPendingMigrations:t.applyPendingMigrations?.bind(t),commitTransaction:this.withRequestId(t.commitTransaction.bind(t)),connect:this.withRequestId(t.connect.bind(t)),disconnect:this.withRequestId(t.disconnect.bind(t)),metrics:t.metrics?.bind(t),query:this.withRequestId(t.query.bind(t)),rollbackTransaction:this.withRequestId(t.rollbackTransaction.bind(t)),sdlSchema:t.sdlSchema?.bind(t),startTransaction:this.withRequestId(t.startTransaction.bind(t)),trace:t.trace.bind(t),free:t.free?.bind(t)}}withRequestId(t){return async(...r)=>{let n=Qp().toString();try{return await t(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){await this.start(),await this.engine?.applyPendingMigrations()}async transaction(t,r,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(r),s;if(t==="start"){let l=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(l,o)}else t==="commit"?s=await this.engine?.commitTransaction(n.id,o):t==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(Jp(a)){let l=this.getExternalAdapterError(a,i?.errorRegistry);throw l?l.error:new se(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new G(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(Te("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new G("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new G("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new b(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(ar));let r=await this.adapterPromise;r&&Te("Using driver adapter: %O",r),this.engine=this.wrapEngine(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",enableTracing:this.tracingHelper.isEnabled()},n=>{t.deref()?.logger(n)},r))}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new Q(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);r&&(r.level=r?.level.toLowerCase()??"unknown",Up(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):$p(r)?this.loggerRustPanic=new ce(Yn(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(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Te(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Te("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(ar)),await this.adapterPromise,Te("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new Q(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Te("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let t=async()=>{await new Promise(n=>setImmediate(n)),Te("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,Te("library stopped")};return this.libraryStoppingPromise=this.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}){Te(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new G(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof Q)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new ce(Yn(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new G(`${a.message} ${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){Te("requestBatch");let i=$r(t,r);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),js(r));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new G(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:l,errors:u}=a;if(Array.isArray(l))return l.map(g=>g.errors&&g.errors.length>0?this.loggerRustPanic??this.buildQueryError(g.errors[0],o?.errorRegistry):{data:g});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(a))}buildQueryError(t,r){if(t.user_facing_error.is_panic)return new ce(Yn(this,t.user_facing_error.message),this.config.clientVersion);let n=this.getExternalAdapterError(t.user_facing_error,r);return n?n.error:Vr(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t,r){if(t.error_code===jp&&r){let n=t.meta?.id;lr(typeof n=="number","Malformed external JS error received from the engine");let i=r.consumeError(n);return lr(i,"External error with reported id was not registered"),i}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function Jp(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function Yn(e,t){return Ns({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}m();c();p();d();f();function $s({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=S=>{i.push({_tag:"warning",value:S})},a=S=>{let F=S.join(` -`);o.push({_tag:"error",value:F})},l=!!e?.startsWith("prisma://"),u=bn(e),g=!!t,h=l||u;!g&&r&&h&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let T=h||!r;g&&(T||n==="edge")&&(n==="edge"?a(["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."]):r?l&&a(["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."]):a(["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."]));let k={accelerate:T,ppg:u,driverAdapters:g};function A(S){return S.length>0}return A(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:k}:{ok:!0,diagnostics:{warnings:i},isUsing:k}}function Vs({copyEngine:e=!0},t){let r;try{r=Gr({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=$s({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"react-native"});for(let h of o.warnings)Dt(...h.value);if(!n){let h=o.errors[0];throw new te(h.value,{clientVersion:t.clientVersion})}let s=it(t.generator),a=s==="library",l=s==="binary",u=s==="client",g=(i.accelerate||i.ppg)&&!i.driverAdapters;return new Xt(t)}m();c();p();d();f();function Wr({generator:e}){return e?.previewFeatures??[]}m();c();p();d();f();var Qs=e=>({command:e});m();c();p();d();f();m();c();p();d();f();var Js=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);m();c();p();d();f();function Pt(e){try{return Gs(e,"fast")}catch{return Gs(e,"slow")}}function Gs(e,t){return JSON.stringify(e.map(r=>Ks(r,t)))}function Ks(e,t){if(Array.isArray(e))return e.map(r=>Ks(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(ot(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(_e.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(Gp(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?zs(e):e}function Gp(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function zs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ws);let t={};for(let r of Object.keys(e))t[r]=Ws(e[r]);return t}function Ws(e){return typeof e=="bigint"?e.toString():zs(e)}var Wp=/^(\s*alter\s)/i,Hs=z("prisma:client");function Zn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Wp.exec(t))throw new Error(`Running ALTER using ${n} is not supported +`);o.push({_tag:"error",value:F})},l=!!e?.startsWith("prisma://"),u=bn(e),g=!!t,h=l||u;!g&&r&&h&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let T=h||!r;g&&(T||n==="edge")&&(n==="edge"?a(["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."]):r?l&&a(["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."]):a(["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."]));let k={accelerate:T,ppg:u,driverAdapters:g};function C(S){return S.length>0}return C(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:k}:{ok:!0,diagnostics:{warnings:i},isUsing:k}}function Vs({copyEngine:e=!0},t){let r;try{r=Gr({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=$s({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"react-native"});for(let h of o.warnings)Dt(...h.value);if(!n){let h=o.errors[0];throw new te(h.value,{clientVersion:t.clientVersion})}let s=it(t.generator),a=s==="library",l=s==="binary",u=s==="client",g=(i.accelerate||i.ppg)&&!i.driverAdapters;return new Xt(t)}m();c();p();d();f();function Wr({generator:e}){return e?.previewFeatures??[]}m();c();p();d();f();var Qs=e=>({command:e});m();c();p();d();f();m();c();p();d();f();var Js=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);m();c();p();d();f();function Pt(e){try{return Gs(e,"fast")}catch{return Gs(e,"slow")}}function Gs(e,t){return JSON.stringify(e.map(r=>Ks(r,t)))}function Ks(e,t){if(Array.isArray(e))return e.map(r=>Ks(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(ot(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(_e.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(Gp(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?zs(e):e}function Gp(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function zs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ws);let t={};for(let r of Object.keys(e))t[r]=Ws(e[r]);return t}function Ws(e){return typeof e=="bigint"?e.toString():zs(e)}var Wp=/^(\s*alter\s)/i,Hs=z("prisma:client");function Zn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Wp.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 Xn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(qr(r))n=r.sql,i={values:Pt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Pt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Pt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Pt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Js(r),i={values:Pt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Hs(`prisma.${e}(${n}, ${i.values})`):Hs(`prisma.${e}(${n})`),{query:n,parameters:i}},Ys={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new le(t,r)}},Zs={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};m();c();p();d();f();function ei(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Xs(r(s)):Xs(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Xs(e){return typeof e.then=="function"?e:Promise.resolve(e)}m();c();p();d();f();var Kp=gn.split(".")[0],zp={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ti=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${Kp}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??zp}};function ea(){return new ti}m();c();p();d();f();function ta(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}m();c();p();d();f();function ra(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 ia=Se(xn());m();c();p();d();f();function Kr(e){return typeof e.batchRequestIdx=="number"}m();c();p();d();f();function na(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(ri(e.query.arguments)),t.push(ri(e.query.selection)),t.join("")}function ri(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${ri(n)})`:r}).join(" ")})`}m();c();p();d();f();var Hp={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,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function ni(e){return Hp[e]}m();c();p();d();f();var zr=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;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;iYe("bigint",r));case"bytes-array":return t.map(r=>Ye("bytes",r));case"decimal-array":return t.map(r=>Ye("decimal",r));case"datetime-array":return t.map(r=>Ye("datetime",r));case"date-array":return t.map(r=>Ye("date",r));case"time-array":return t.map(r=>Ye("time",r));default:return t}}function Hr(e){let t=[],r=Yp(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=>ni(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Xp(o),containsWrite:u,customDataProxyFetch:i})).map((h,T)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[T],h)}catch(k){return k}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?oa(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ni(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:na(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=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}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(Zp(t),ed(t,i))throw t;if(t instanceof se&&td(t)){let u=sa(t.meta);Fr({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=Pr({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 se(l,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ce(l,this.client._clientVersion);if(t instanceof G)throw new G(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof Q)throw new Q(l,this.client._clientVersion);if(t instanceof ce)throw new ce(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,ia.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=Qn(o,s),l=i==="queryRaw"?Hr(a):xt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Xp(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:oa(e)};ze(e,"Unknown transaction kind")}}function oa(e){return{id:e.id,payload:e.payload}}function ed(e,t){return Kr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function td(e){return e.code==="P2009"||e.code==="P2012"}function sa(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(sa)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}m();c();p();d();f();var aa=Bs;m();c();p();d();f();var da=Se(In());m();c();p();d();f();var B=class extends Error{constructor(t){super(t+` +`)}var Xn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(qr(r))n=r.sql,i={values:Pt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Pt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Pt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Pt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Js(r),i={values:Pt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Hs(`prisma.${e}(${n}, ${i.values})`):Hs(`prisma.${e}(${n})`),{query:n,parameters:i}},Ys={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new le(t,r)}},Zs={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};m();c();p();d();f();function ei(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Xs(r(s)):Xs(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Xs(e){return typeof e.then=="function"?e:Promise.resolve(e)}m();c();p();d();f();var Kp=gn.split(".")[0],zp={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ti=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${Kp}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??zp}};function ea(){return new ti}m();c();p();d();f();function ta(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}m();c();p();d();f();function ra(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 ia=Se(xn());m();c();p();d();f();function Kr(e){return typeof e.batchRequestIdx=="number"}m();c();p();d();f();function na(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(ri(e.query.arguments)),t.push(ri(e.query.selection)),t.join("")}function ri(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${ri(n)})`:r}).join(" ")})`}m();c();p();d();f();var Hp={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,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function ni(e){return Hp[e]}m();c();p();d();f();var zr=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;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;iYe("bigint",r));case"bytes-array":return t.map(r=>Ye("bytes",r));case"decimal-array":return t.map(r=>Ye("decimal",r));case"datetime-array":return t.map(r=>Ye("datetime",r));case"date-array":return t.map(r=>Ye("date",r));case"time-array":return t.map(r=>Ye("time",r));default:return t}}function Hr(e){let t=[],r=Yp(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=>ni(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Xp(o),containsWrite:u,customDataProxyFetch:i})).map((h,T)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[T],h)}catch(k){return k}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?oa(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ni(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:na(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=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}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(Zp(t),ed(t,i))throw t;if(t instanceof se&&td(t)){let u=sa(t.meta);Fr({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=Pr({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 se(l,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ce(l,this.client._clientVersion);if(t instanceof G)throw new G(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof Q)throw new Q(l,this.client._clientVersion);if(t instanceof ce)throw new ce(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,ia.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=Qn(o,s),l=i==="queryRaw"?Hr(a):xt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Xp(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:oa(e)};ze(e,"Unknown transaction kind")}}function oa(e){return{id:e.id,payload:e.payload}}function ed(e,t){return Kr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function td(e){return e.code==="P2009"||e.code==="P2012"}function sa(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(sa)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}m();c();p();d();f();var aa=Bs;m();c();p();d();f();var da=Se(In());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"}};ue(B,"PrismaClientConstructorValidationError");var la=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],ua=["pretty","colorless","minimal"],ca=["info","query","warn","error"],rd={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=vt(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. @@ -78,6 +78,6 @@ Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")thr ${i} -${n}`}m();c();p();d();f();function ma(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=g,a()},g=>{if(!Kr(g)){l(g);return}g.batchRequestIdx===u?l(g):(i||(i=g),a())})})}var Qe=z("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var sd={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},ad=Symbol.for("prisma.client.transaction.id"),ld={id:0,nextId(){return++this.id}};function ya(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=ei();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Os(e),n&&fa(n,e);let i=new Br().on("error",()=>{});this._extensions=yt.empty(),this._previewFeatures=Wr(e),this._clientVersion=e.clientVersion??aa,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=ea();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Oe.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Oe.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new Q(`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 Q("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&&z.enable("prisma:client");let h=Oe.resolve(e.dirname,e.relativePath);or.existsSync(h)||(h=e.dirname),Qe("dirname",e.dirname),Qe("relativePath",e.relativePath),Qe("cwd",h);let T=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:T.allowTriggerPanic,prismaPath:T.binaryPath??void 0,engineEndpoint:T.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&ra(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(k=>typeof k=="string"?k==="query":k.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Is(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:Gr,getBatchRequestPayload:$r,prismaGraphQLToJSError:Vr,PrismaClientUnknownRequestError:G,PrismaClientInitializationError:Q,PrismaClientKnownRequestError:se,debug:z("prisma:client:accelerateEngine"),engineVersion:ha.version,clientVersion:e.clientVersion}},Qe("clientVersion",e.clientVersion),this._engine=Vs(e,this._engineConfig),this._requestHandler=new Yr(this,i),l.log)for(let k of l.log){let A=typeof k=="string"?k:k.emit==="stdout"?k.level:null;A&&this.$on(A,S=>{_t.log(`${_t.tags[A]??""}`,S.message||S.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Yt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$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{Di()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Xn({clientMethod:i,activeProvider:a}),callsite:Ve(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ga(n,i);return Zn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new te("`$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=>(Zn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new te(`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:Qs,callsite:Ve(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Xn({clientMethod:i,activeProvider:a}),callsite:Ve(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ga(n,i));throw new te("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new te("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=ld.nextId(),s=ta(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 ma(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 ge(Yt(ge(gs(this),[ne("_appliedParent",()=>this._appliedParent._createItxClient(n)),ne("_createPrismaPromise",()=>ei(n)),ne(ad,()=>n.id)])),[bt(Es)])}$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??sd,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async l=>{let{runInTransaction:u,args:g,...h}=l,T={...n,...h};g&&(T.args=i.middlewareArgsToRequestArgs(g)),n.transaction!==void 0&&u===!1&&delete T.transaction;let k=await Ts(this,T);return T.model?bs({result:k,modelName:T.model,args:T.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):k};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:g,unpacker:h,otelParentCtx:T,customDataProxyFetch:k}){try{n=u?u(n):n;let A={name:"serialize"},S=this._tracingHelper.runInChildSpan(A,()=>Lr({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 z.enabled("prisma:client")&&(Qe("Prisma Client call:"),Qe(`prisma.${i}(${is(n)})`),Qe("Generated request:"),Qe(JSON.stringify(S,null,2)+` -`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:S,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:T,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:k})}catch(A){throw A.clientVersion=this._clientVersion,A}}$metrics=new wt(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=hs}return t}function ga(e,t){return ud(e)?[new le(e,t),Ys]:[e,Zs]}function ud(e){return Array.isArray(e)&&Array.isArray(e.raw)}m();c();p();d();f();var cd=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function wa(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!cd.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}m();c();p();d();f();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +${n}`}m();c();p();d();f();function ma(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=g,a()},g=>{if(!Kr(g)){l(g);return}g.batchRequestIdx===u?l(g):(i||(i=g),a())})})}var Qe=z("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var sd={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},ad=Symbol.for("prisma.client.transaction.id"),ld={id:0,nextId(){return++this.id}};function ya(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=ei();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Os(e),n&&fa(n,e);let i=new Br().on("error",()=>{});this._extensions=yt.empty(),this._previewFeatures=Wr(e),this._clientVersion=e.clientVersion??aa,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=ea();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Oe.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Oe.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new Q(`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 Q("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&&z.enable("prisma:client");let h=Oe.resolve(e.dirname,e.relativePath);or.existsSync(h)||(h=e.dirname),Qe("dirname",e.dirname),Qe("relativePath",e.relativePath),Qe("cwd",h);let T=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:T.allowTriggerPanic,prismaPath:T.binaryPath??void 0,engineEndpoint:T.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&ra(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(k=>typeof k=="string"?k==="query":k.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Is(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:Gr,getBatchRequestPayload:$r,prismaGraphQLToJSError:Vr,PrismaClientUnknownRequestError:G,PrismaClientInitializationError:Q,PrismaClientKnownRequestError:se,debug:z("prisma:client:accelerateEngine"),engineVersion:ha.version,clientVersion:e.clientVersion}},Qe("clientVersion",e.clientVersion),this._engine=Vs(e,this._engineConfig),this._requestHandler=new Yr(this,i),l.log)for(let k of l.log){let C=typeof k=="string"?k:k.emit==="stdout"?k.level:null;C&&this.$on(C,S=>{_t.log(`${_t.tags[C]??""}`,S.message||S.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Yt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$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{Di()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Xn({clientMethod:i,activeProvider:a}),callsite:Ve(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ga(n,i);return Zn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new te("`$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=>(Zn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new te(`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:Qs,callsite:Ve(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Xn({clientMethod:i,activeProvider:a}),callsite:Ve(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ga(n,i));throw new te("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new te("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=ld.nextId(),s=ta(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 ma(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 ge(Yt(ge(gs(this),[ne("_appliedParent",()=>this._appliedParent._createItxClient(n)),ne("_createPrismaPromise",()=>ei(n)),ne(ad,()=>n.id)])),[bt(Es)])}$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??sd,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async l=>{let{runInTransaction:u,args:g,...h}=l,T={...n,...h};g&&(T.args=i.middlewareArgsToRequestArgs(g)),n.transaction!==void 0&&u===!1&&delete T.transaction;let k=await Ts(this,T);return T.model?bs({result:k,modelName:T.model,args:T.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):k};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:g,unpacker:h,otelParentCtx:T,customDataProxyFetch:k}){try{n=u?u(n):n;let C={name:"serialize"},S=this._tracingHelper.runInChildSpan(C,()=>Lr({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 z.enabled("prisma:client")&&(Qe("Prisma Client call:"),Qe(`prisma.${i}(${is(n)})`),Qe("Generated request:"),Qe(JSON.stringify(S,null,2)+` +`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:S,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:T,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:k})}catch(C){throw C.clientVersion=this._clientVersion,C}}$metrics=new wt(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=hs}return t}function ga(e,t){return ud(e)?[new le(e,t),Ys]:[e,Zs]}function ud(e){return Array.isArray(e)&&Array.isArray(e.raw)}m();c();p();d();f();var cd=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function wa(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!cd.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}m();c();p();d();f();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); //# sourceMappingURL=react-native.js.map diff --git a/src/generated/prisma/runtime/wasm-compiler-edge.js b/src/generated/prisma/runtime/wasm-compiler-edge.js index ad54b8d..7801546 100644 --- a/src/generated/prisma/runtime/wasm-compiler-edge.js +++ b/src/generated/prisma/runtime/wasm-compiler-edge.js @@ -1,20 +1,20 @@ /* !!! This is code generated by Prisma. Do not edit directly. !!! /* eslint-disable */ -"use strict";var gc=Object.create;var Kr=Object.defineProperty;var yc=Object.getOwnPropertyDescriptor;var hc=Object.getOwnPropertyNames;var wc=Object.getPrototypeOf,bc=Object.prototype.hasOwnProperty;var ye=(e,t)=>()=>(e&&(t=e(e=0)),t);var se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pt=(e,t)=>{for(var r in t)Kr(e,r,{get:t[r],enumerable:!0})},Bo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of hc(t))!bc.call(e,i)&&i!==r&&Kr(e,i,{get:()=>t[i],enumerable:!(n=yc(t,i))||n.enumerable});return e};var Ae=(e,t,r)=>(r=e!=null?gc(wc(e)):{},Bo(t||!e||!e.__esModule?Kr(r,"default",{value:e,enumerable:!0}):r,e)),jo=e=>Bo(Kr({},"__esModule",{value:!0}),e);function ci(e,t){if(t=t.toLowerCase(),t==="utf8"||t==="utf-8")return new h(Tc.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,f)=>function(w=0){return Y(w,"offset"),de(w,"offset"),ee(w,"offset",this.length-1),new DataView(this.buffer)[r[a]](w,f)},o=(a,f)=>function(w,A=0){let C=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),I=Pc[C];return Y(A,"offset"),de(A,"offset"),ee(A,"offset",this.length-1),xc(w,"value",I[0],I[1]),new DataView(this.buffer)[r[a]](A,w,f),A+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(f=>{f.includes("Uint")&&(e[f.replace("Uint","UInt")]=e[f]),f.includes("Float64")&&(e[f.replace("Float64","Double")]=e[f]),f.includes("Float32")&&(e[f.replace("Float32","Float")]=e[f])})};n.forEach((a,f)=>{a.startsWith("read")&&(e[a]=i(f,!1),e[a+"LE"]=i(f,!0),e[a+"BE"]=i(f,!1)),a.startsWith("write")&&(e[a]=o(f,!1),e[a+"LE"]=o(f,!0),e[a+"BE"]=o(f,!1)),s([a,a+"LE",a+"BE"])})}function Ho(e){throw new Error(`Buffer polyfill does not implement "${e}"`)}function zr(e,t){if(!(e instanceof Uint8Array))throw new TypeError(`The "${t}" argument must be an instance of Buffer or Uint8Array`)}function ee(e,t,r=Cc+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 Y(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 de(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 xc(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 Qo(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 Rc(e,t="utf8"){return h.from(e,t)}var h,Pc,Tc,vc,Ac,Cc,y,pi,u=ye(()=>{"use strict";h=class e extends Uint8Array{_isBuffer=!0;get offset(){return this.byteOffset}static alloc(t,r=0,n="utf8"){return Qo(n,"encoding"),e.allocUnsafe(t).fill(r,n)}static allocUnsafe(t){return e.from(t)}static allocUnsafeSlow(t){return e.from(t)}static isBuffer(t){return t&&!!t._isBuffer}static byteLength(t,r="utf8"){if(typeof t=="string")return ci(t,r).byteLength;if(t&&t.byteLength)return t.byteLength;let n=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw n.code="ERR_INVALID_ARG_TYPE",n}static isEncoding(t){return Ac.includes(t)}static compare(t,r){zr(t,"buff1"),zr(r,"buff2");for(let n=0;nr[n])return 1}return t.length===r.length?0:t.length>r.length?1:-1}static from(t,r="utf8"){if(t&&typeof t=="object"&&t.type==="Buffer")return new e(t.data);if(typeof t=="number")return new e(new Uint8Array(t));if(typeof t=="string")return ci(t,r);if(ArrayBuffer.isView(t)){let{byteOffset:n,byteLength:i,buffer:o}=t;return"map"in t&&typeof t.map=="function"?new e(t.map(s=>s%256),n,i):new e(o,n,i)}if(t&&typeof t=="object"&&("length"in t||"byteLength"in t||"buffer"in t))return new e(t);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(t,r){if(t.length===0)return e.alloc(0);let n=[].concat(...t.map(o=>[...o])),i=e.alloc(r!==void 0?r:n.length);return i.set(r!==void 0?n.slice(0,r):n),i}slice(t=0,r=this.length){return this.subarray(t,r)}subarray(t=0,r=this.length){return Object.setPrototypeOf(super.subarray(t,r),e.prototype)}reverse(){return super.reverse(),this}readIntBE(t,r){Y(t,"offset"),de(t,"offset"),ee(t,"offset",this.length-1),Y(r,"byteLength"),de(r,"byteLength");let n=new DataView(this.buffer,t,r),i=0;for(let o=0;o=0;o--)i.setUint8(o,t&255),t=t/256;return r+n}writeUintBE(t,r,n){return this.writeUIntBE(t,r,n)}writeUIntLE(t,r,n){Y(r,"offset"),de(r,"offset"),ee(r,"offset",this.length-1),Y(n,"byteLength"),de(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=0;or===t[n])}copy(t,r=0,n=0,i=this.length){ee(r,"targetStart"),ee(n,"sourceStart",this.length),ee(i,"sourceEnd"),r>>>=0,n>>>=0,i>>>=0;let o=0;for(;n=this.length?this.length-a:t.length),a);return this}includes(t,r=null,n="utf-8"){return this.indexOf(t,r,n)!==-1}lastIndexOf(t,r=null,n="utf-8"){return this.indexOf(t,r,n,!0)}indexOf(t,r=null,n="utf-8",i=!1){let o=i?this.findLastIndex.bind(this):this.findIndex.bind(this);n=typeof r=="string"?r:n;let s=e.from(typeof t=="number"?[t]:t,n),a=typeof r=="string"?0:r;return a=typeof r=="number"?a:null,a=Number.isNaN(a)?null:a,a??=i?this.length:0,a=a<0?this.length+a:a,s.length===0&&i===!1?a>=this.length?this.length:a:s.length===0&&i===!0?(a>=this.length?this.length:a)||this.length:o((f,w)=>(i?w<=a:w>=a)&&this[w]===s[0]&&s.every((C,I)=>this[w+I]===C))}toString(t="utf8",r=0,n=this.length){if(r=r<0?0:r,t=t.toString().toLowerCase(),n<=0)return"";if(t==="utf8"||t==="utf-8")return vc.decode(this.slice(r,n));if(t==="base64"||t==="base64url"){let i=btoa(this.reduce((o,s)=>o+pi(s),""));return t==="base64url"?i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):i}if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return this.slice(r,n).reduce((i,o)=>i+pi(o&(t==="ascii"?127:255)),"");if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let i=new DataView(this.buffer.slice(r,n));return Array.from({length:i.byteLength/2},(o,s)=>s*2+1i+o.toString(16).padStart(2,"0"),"");Ho(`encoding "${t}"`)}toLocaleString(){return this.toString()}inspect(){return``}};Pc={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]},Tc=new TextEncoder,vc=new TextDecoder,Ac=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],Cc=4294967295;Ec(h.prototype);y=new Proxy(Rc,{construct(e,[t,r]){return h.from(t,r)},get(e,t){return h[t]}}),pi=String.fromCodePoint});var g,x,c=ye(()=>{"use strict";g={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:x}=g});var b,p=ye(()=>{"use strict";b=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,m=ye(()=>{"use strict";E=()=>{};E.prototype=E});var d=ye(()=>{"use strict"});function Ko(e,t){var r,n,i,o,s,a,f,w,A=e.constructor,C=A.precision;if(!e.s||!t.s)return t.s||(t=new A(e)),J?q(t,C):t;if(f=e.d,w=t.d,s=e.e,i=t.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=w.length):(n=w,i=s,a=f.length),s=Math.ceil(C/H),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=f.length,o=w.length,a-o<0&&(o=a,n=w,w=f,f=n),r=0;o;)r=(f[--o]=f[o]+w[o]+r)/te|0,f[o]%=te;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return t.d=f,t.e=i,J?q(t,C):t}function Re(e,t,r){if(e!==~~e||er)throw Error(Ye+e)}function Ce(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t16)throw Error(di+Z(e));if(!e.s)return new A(he);for(t==null?(J=!1,a=C):a=t,s=new A(.03125);e.abs().gte(.1);)e=e.times(s),w+=5;for(n=Math.log(ze(2,w))/Math.LN10*2+5|0,a+=n,r=i=o=new A(he),A.precision=a;;){if(i=q(i.times(e),a),r=r.times(++f),s=o.plus(Me(i,r,a)),Ce(s.d).slice(0,a)===Ce(o.d).slice(0,a)){for(;w--;)o=q(o.times(o),a);return A.precision=C,t==null?(J=!0,q(o,C)):o}o=s}}function Z(e){for(var t=e.e*H,r=e.d[0];r>=10;r/=10)t++;return t}function mi(e,t,r){if(t>e.LN10.sd())throw J=!0,r&&(e.precision=r),Error(Ee+"LN10 precision limit exceeded");return q(new e(e.LN10),t)}function $e(e){for(var t="";e--;)t+="0";return t}function Wt(e,t){var r,n,i,o,s,a,f,w,A,C=1,I=10,R=e,L=R.d,k=R.constructor,M=k.precision;if(R.s<1)throw Error(Ee+(R.s?"NaN":"-Infinity"));if(R.eq(he))return new k(0);if(t==null?(J=!1,w=M):w=t,R.eq(10))return t==null&&(J=!0),mi(k,w);if(w+=I,k.precision=w,r=Ce(L),n=r.charAt(0),o=Z(R),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(e),r=Ce(R.d),n=r.charAt(0),C++;o=Z(R),n>1?(R=new k("0."+r),o++):R=new k(n+"."+r.slice(1))}else return f=mi(k,w+2,M).times(o+""),R=Wt(new k(n+"."+r.slice(1)),w-I).plus(f),k.precision=M,t==null?(J=!0,q(R,M)):R;for(a=s=R=Me(R.minus(he),R.plus(he),w),A=q(R.times(R),w),i=3;;){if(s=q(s.times(A),w),f=a.plus(Me(s,new k(i),w)),Ce(f.d).slice(0,w)===Ce(a.d).slice(0,w))return a=a.times(2),o!==0&&(a=a.plus(mi(k,w+2,M).times(o+""))),a=Me(a,new k(C),w),k.precision=M,t==null?(J=!0,q(a,M)):a;a=f,i+=2}}function Go(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=dt(r/H),e.d=[],n=(r+1)%H,r<0&&(n+=H),nYr||e.e<-Yr))throw Error(di+r)}else e.s=0,e.e=0,e.d=[0];return e}function q(e,t,r){var n,i,o,s,a,f,w,A,C=e.d;for(s=1,o=C[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=H,i=t,w=C[A=0];else{if(A=Math.ceil((n+1)/H),o=C.length,A>=o)return e;for(w=o=C[A],s=1;o>=10;o/=10)s++;n%=H,i=n-H+s}if(r!==void 0&&(o=ze(10,s-i-1),a=w/o%10|0,f=t<0||C[A+1]!==void 0||w%o,f=r<4?(a||f)&&(r==0||r==(e.s<0?3:2)):a>5||a==5&&(r==4||f||r==6&&(n>0?i>0?w/ze(10,s-i):0:C[A-1])%10&1||r==(e.s<0?8:7))),t<1||!C[0])return f?(o=Z(e),C.length=1,t=t-o-1,C[0]=ze(10,(H-t%H)%H),e.e=dt(-t/H)||0):(C.length=1,C[0]=e.e=e.s=0),e;if(n==0?(C.length=A,o=1,A--):(C.length=A+1,o=ze(10,H-n),C[A]=i>0?(w/ze(10,s-i)%ze(10,i)|0)*o:0),f)for(;;)if(A==0){(C[0]+=o)==te&&(C[0]=1,++e.e);break}else{if(C[A]+=o,C[A]!=te)break;C[A--]=0,o=1}for(n=C.length;C[--n]===0;)C.pop();if(J&&(e.e>Yr||e.e<-Yr))throw Error(di+Z(e));return e}function Yo(e,t){var r,n,i,o,s,a,f,w,A,C,I=e.constructor,R=I.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new I(e),J?q(t,R):t;if(f=e.d,C=t.d,n=t.e,w=e.e,f=f.slice(),s=w-n,s){for(A=s<0,A?(r=f,s=-s,a=C.length):(r=C,n=w,a=f.length),i=Math.max(Math.ceil(R/H),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,a=C.length,A=i0;--i)f[a++]=0;for(i=C.length;i>s;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+$e(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):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))),e.s<0?"-"+o:o}function Jo(e,t){if(e.length>t)return e.length=t,!0}function Zo(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(Ye+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 Go(s,o.toString())}else if(typeof o!="string")throw Error(Ye+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,Sc.test(o))Go(s,o);else throw Error(Ye+o)}if(i.prototype=S,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=Zo,i.config=i.set=kc,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(Ye+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ye+r+": "+n);return this}var mt,Ic,fi,J,Ee,Ye,di,dt,ze,Sc,he,te,H,Wo,Yr,S,Me,fi,Zr,Xo=ye(()=>{"use strict";u();c();p();m();d();l();mt=1e9,Ic={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},J=!0,Ee="[DecimalError] ",Ye=Ee+"Invalid argument: ",di=Ee+"Exponent out of range: ",dt=Math.floor,ze=Math.pow,Sc=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,te=1e7,H=7,Wo=9007199254740991,Yr=dt(Wo/H),S={};S.absoluteValue=S.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};S.comparedTo=S.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};S.decimalPlaces=S.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*H;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};S.dividedBy=S.div=function(e){return Me(this,new this.constructor(e))};S.dividedToIntegerBy=S.idiv=function(e){var t=this,r=t.constructor;return q(Me(t,new r(e),0,1),r.precision)};S.equals=S.eq=function(e){return!this.cmp(e)};S.exponent=function(){return Z(this)};S.greaterThan=S.gt=function(e){return this.cmp(e)>0};S.greaterThanOrEqualTo=S.gte=function(e){return this.cmp(e)>=0};S.isInteger=S.isint=function(){return this.e>this.d.length-2};S.isNegative=S.isneg=function(){return this.s<0};S.isPositive=S.ispos=function(){return this.s>0};S.isZero=function(){return this.s===0};S.lessThan=S.lt=function(e){return this.cmp(e)<0};S.lessThanOrEqualTo=S.lte=function(e){return this.cmp(e)<1};S.logarithm=S.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(he))throw Error(Ee+"NaN");if(r.s<1)throw Error(Ee+(r.s?"NaN":"-Infinity"));return r.eq(he)?new n(0):(J=!1,t=Me(Wt(r,o),Wt(e,o),o),J=!0,q(t,i))};S.minus=S.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Yo(t,e):Ko(t,(e.s=-e.s,e))};S.modulo=S.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Ee+"NaN");return r.s?(J=!1,t=Me(r,e,0,1).times(e),J=!0,r.minus(t)):q(new n(r),i)};S.naturalExponential=S.exp=function(){return zo(this)};S.naturalLogarithm=S.ln=function(){return Wt(this)};S.negated=S.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};S.plus=S.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Ko(t,e):Yo(t,(e.s=-e.s,e))};S.precision=S.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ye+e);if(t=Z(i)+1,n=i.d.length-1,r=n*H+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};S.squareRoot=S.sqrt=function(){var e,t,r,n,i,o,s,a=this,f=a.constructor;if(a.s<1){if(!a.s)return new f(0);throw Error(Ee+"NaN")}for(e=Z(a),J=!1,i=Math.sqrt(+a),i==0||i==1/0?(t=Ce(a.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=dt((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 f(t)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(o=n,n=o.plus(Me(a,o,s+2)).times(.5),Ce(o.d).slice(0,s)===(t=Ce(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(q(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(t!="9999")break;s+=4}return J=!0,q(n,r)};S.times=S.mul=function(e){var t,r,n,i,o,s,a,f,w,A=this,C=A.constructor,I=A.d,R=(e=new C(e)).d;if(!A.s||!e.s)return new C(0);for(e.s*=A.s,r=A.e+e.e,f=I.length,w=R.length,f=0;){for(t=0,i=f+n;i>n;)a=o[i]+R[n]*I[i-n-1]+t,o[i--]=a%te|0,t=a/te|0;o[i]=(o[i]+t)%te|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,J?q(e,C.precision):e};S.toDecimalPlaces=S.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Re(e,0,mt),t===void 0?t=n.rounding:Re(t,0,8),q(r,e+Z(r)+1,t))};S.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ze(n,!0):(Re(e,0,mt),t===void 0?t=i.rounding:Re(t,0,8),n=q(new i(n),e+1,t),r=Ze(n,!0,e+1)),r};S.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Ze(i):(Re(e,0,mt),t===void 0?t=o.rounding:Re(t,0,8),n=q(new o(i),e+Z(i)+1,t),r=Ze(n.abs(),!1,e+Z(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};S.toInteger=S.toint=function(){var e=this,t=e.constructor;return q(new t(e),Z(e)+1,t.rounding)};S.toNumber=function(){return+this};S.toPower=S.pow=function(e){var t,r,n,i,o,s,a=this,f=a.constructor,w=12,A=+(e=new f(e));if(!e.s)return new f(he);if(a=new f(a),!a.s){if(e.s<1)throw Error(Ee+"Infinity");return a}if(a.eq(he))return a;if(n=f.precision,e.eq(he))return q(a,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=a.s,s){if((r=A<0?-A:A)<=Wo){for(i=new f(he),t=Math.ceil(n/H+4),J=!1;r%2&&(i=i.times(a),Jo(i.d,t)),r=dt(r/2),r!==0;)a=a.times(a),Jo(a.d,t);return J=!0,e.s<0?new f(he).div(i):q(i,n)}}else if(o<0)throw Error(Ee+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,a.s=1,J=!1,i=e.times(Wt(a,n+w)),J=!0,i=zo(i),i.s=o,i};S.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=Z(i),n=Ze(i,r<=o.toExpNeg||r>=o.toExpPos)):(Re(e,1,mt),t===void 0?t=o.rounding:Re(t,0,8),i=q(new o(i),e,t),r=Z(i),n=Ze(i,e<=r||r<=o.toExpNeg,e)),n};S.toSignificantDigits=S.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Re(e,1,mt),t===void 0?t=n.rounding:Re(t,0,8)),q(new n(r),e,t)};S.toString=S.valueOf=S.val=S.toJSON=S[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Z(e),r=e.constructor;return Ze(e,t<=r.toExpNeg||t>=r.toExpPos)};Me=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%te|0,s=o/te|0;return s&&n.unshift(s),n}function t(n,i,o,s){var a,f;if(o!=s)f=o>s?1:-1;else for(a=f=0;ai[a]?1:-1;break}return f}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,f,w,A,C,I,R,L,k,M,_e,pe,B,me,Ke,ui,xe,Jr,Wr=n.constructor,fc=n.s==i.s?1:-1,ve=n.d,z=i.d;if(!n.s)return new Wr(n);if(!i.s)throw Error(Ee+"Division by zero");for(f=n.e-i.e,xe=z.length,Ke=ve.length,R=new Wr(fc),L=R.d=[],w=0;z[w]==(ve[w]||0);)++w;if(z[w]>(ve[w]||0)&&--f,o==null?pe=o=Wr.precision:s?pe=o+(Z(n)-Z(i))+1:pe=o,pe<0)return new Wr(0);if(pe=pe/H+2|0,w=0,xe==1)for(A=0,z=z[0],pe++;(w1&&(z=e(z,A),ve=e(ve,A),xe=z.length,Ke=ve.length),me=xe,k=ve.slice(0,xe),M=k.length;M=te/2&&++ui;do A=0,a=t(z,k,xe,M),a<0?(_e=k[0],xe!=M&&(_e=_e*te+(k[1]||0)),A=_e/ui|0,A>1?(A>=te&&(A=te-1),C=e(z,A),I=C.length,M=k.length,a=t(C,k,I,M),a==1&&(A--,r(C,xe{"use strict";Xo();v=class extends Zr{static isDecimal(t){return t instanceof Zr}static random(t=20){{let n=globalThis.crypto.getRandomValues(new Uint8Array(t)).reduce((i,o)=>i+o,"");return new Zr(`0.${n.slice(0,t)}`)}}},ae=v});function Lc(){return!1}function bi(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function Uc(){return bi()}function Fc(){return[]}function Vc(e){e(null,[])}function $c(){return""}function qc(){return""}function Bc(){}function jc(){}function Qc(){}function Hc(){}function Gc(){}function Jc(){}function Wc(){}function Kc(){}function zc(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Yc(e,t){t(null,bi())}var Zc,Xc,ys,hs=ye(()=>{"use strict";u();c();p();m();d();l();Zc={},Xc={existsSync:Lc,lstatSync:bi,stat:Yc,statSync:Uc,readdirSync:Fc,readdir:Vc,readlinkSync:$c,realpathSync:qc,chmodSync:Bc,renameSync:jc,mkdirSync:Qc,rmdirSync:Hc,rmSync:Gc,unlinkSync:Jc,watchFile:Wc,unwatchFile:Kc,watch:zc,promises:Zc},ys=Xc});var ws=se(()=>{"use strict";u();c();p();m();d();l()});function ep(...e){return e.join("/")}function tp(...e){return e.join("/")}function rp(e){let t=bs(e),r=Es(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function bs(e){let t=e.split("/");return t[t.length-1]}function Es(e){return e.split("/").slice(0,-1).join("/")}function ip(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var xs,np,op,sp,rn,Ps=ye(()=>{"use strict";u();c();p();m();d();l();xs="/",np=":";op={sep:xs},sp={basename:bs,delimiter:np,dirname:Es,join:tp,normalize:ip,parse:rp,posix:op,resolve:ep,sep:xs},rn=sp});var Ts=se((eh,ap)=>{ap.exports={name:"@prisma/internals",version:"6.14.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-engine-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var xi={};pt(xi,{Hash:()=>Yt,createHash:()=>vs,default:()=>yt,randomFillSync:()=>sn,randomUUID:()=>on,webcrypto:()=>Zt});function on(){return globalThis.crypto.randomUUID()}function sn(e,t,r){return t!==void 0&&(r!==void 0?e=e.subarray(t,t+r):e=e.subarray(t)),globalThis.crypto.getRandomValues(e)}function vs(e){return new Yt(e)}var Zt,Yt,yt,Xe=ye(()=>{"use strict";u();c();p();m();d();l();Zt=globalThis.crypto;Yt=class{#e=[];#t;constructor(t){this.#t=t}update(t){this.#e.push(t)}async digest(){let t=new Uint8Array(this.#e.reduce((i,o)=>i+o.length,0)),r=0;for(let i of this.#e)t.set(i,r),r+=i.length;let n=await globalThis.crypto.subtle.digest(this.#t,t);return new Uint8Array(n)}},yt={webcrypto:Zt,randomUUID:on,randomFillSync:sn,createHash:vs,Hash:Yt}});var Pi=se((Gh,pp)=>{pp.exports={name:"@prisma/engines-version",version:"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"717184b7b35ea05dfa71a3236b7af656013e1e49"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var As=se(an=>{"use strict";u();c();p();m();d();l();Object.defineProperty(an,"__esModule",{value:!0});an.enginesVersion=void 0;an.enginesVersion=Pi().prisma.enginesVersion});var Is=se((aw,Rs)=>{"use strict";u();c();p();m();d();l();Rs.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=se((xw,ks)=>{"use strict";u();c();p();m();d();l();ks.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 Ai=se((Iw,Ds)=>{"use strict";u();c();p();m();d();l();var yp=Os();Ds.exports=e=>typeof e=="string"?e.replace(yp(),""):e});var _s=se((Bw,cn)=>{"use strict";u();c();p();m();d();l();cn.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()};cn.exports.default=cn.exports});var Si=se((MP,Fs)=>{"use strict";u();c();p();m();d();l();Fs.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";u();c();p();m();d();l()});var Qs=ye(()=>{"use strict";u();c();p();m();d();l()});var kn,fa=ye(()=>{"use strict";u();c();p();m();d();l();kn=class{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 eo=se(rt=>{"use strict";u();c();p();m();d();l();Object.defineProperty(rt,"__esModule",{value:!0});rt.anumber=Xi;rt.abytes=pl;rt.ahash=Ym;rt.aexists=Zm;rt.aoutput=Xm;function Xi(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function zm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function pl(e,...t){if(!zm(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Ym(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Xi(e.outputLen),Xi(e.blockLen)}function Zm(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Xm(e,t){pl(e);let r=t.outputLen;if(e.length{"use strict";u();c();p();m();d();l();Object.defineProperty(_,"__esModule",{value:!0});_.add5L=_.add5H=_.add4H=_.add4L=_.add3H=_.add3L=_.rotlBL=_.rotlBH=_.rotlSL=_.rotlSH=_.rotr32L=_.rotr32H=_.rotrBL=_.rotrBH=_.rotrSL=_.rotrSH=_.shrSL=_.shrSH=_.toBig=void 0;_.fromBig=ro;_.split=ml;_.add=Cl;var Fn=BigInt(2**32-1),to=BigInt(32);function ro(e,t=!1){return t?{h:Number(e&Fn),l:Number(e>>to&Fn)}:{h:Number(e>>to&Fn)|0,l:Number(e&Fn)|0}}function ml(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);_.toBig=dl;var fl=(e,t,r)=>e>>>r;_.shrSH=fl;var gl=(e,t,r)=>e<<32-r|t>>>r;_.shrSL=gl;var yl=(e,t,r)=>e>>>r|t<<32-r;_.rotrSH=yl;var hl=(e,t,r)=>e<<32-r|t>>>r;_.rotrSL=hl;var wl=(e,t,r)=>e<<64-r|t>>>r-32;_.rotrBH=wl;var bl=(e,t,r)=>e>>>r-32|t<<64-r;_.rotrBL=bl;var El=(e,t)=>t;_.rotr32H=El;var xl=(e,t)=>e;_.rotr32L=xl;var Pl=(e,t,r)=>e<>>32-r;_.rotlSH=Pl;var Tl=(e,t,r)=>t<>>32-r;_.rotlSL=Tl;var vl=(e,t,r)=>t<>>64-r;_.rotlBH=vl;var Al=(e,t,r)=>e<>>64-r;_.rotlBL=Al;function Cl(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:i|0}}var Rl=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);_.add3L=Rl;var Il=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;_.add3H=Il;var Sl=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);_.add4L=Sl;var kl=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;_.add4H=kl;var Ol=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);_.add5L=Ol;var Dl=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;_.add5H=Dl;var ed={fromBig:ro,split:ml,toBig:dl,shrSH:fl,shrSL:gl,rotrSH:yl,rotrSL:hl,rotrBH:wl,rotrBL:bl,rotr32H:El,rotr32L:xl,rotlSH:Pl,rotlSL:Tl,rotlBH:vl,rotlBL:Al,add:Cl,add3L:Rl,add3H:Il,add4L:Sl,add4H:kl,add5H:Dl,add5L:Ol};_.default=ed});var Ml=se(Vn=>{"use strict";u();c();p();m();d();l();Object.defineProperty(Vn,"__esModule",{value:!0});Vn.crypto=void 0;var He=(Xe(),jo(xi));Vn.crypto=He&&typeof He=="object"&&"webcrypto"in He?He.webcrypto:He&&typeof He=="object"&&"randomBytes"in He?He:void 0});var Ul=se(U=>{"use strict";u();c();p();m();d();l();Object.defineProperty(U,"__esModule",{value:!0});U.Hash=U.nextTick=U.byteSwapIfBE=U.isLE=void 0;U.isBytes=td;U.u8=rd;U.u32=nd;U.createView=id;U.rotr=od;U.rotl=sd;U.byteSwap=oo;U.byteSwap32=ad;U.bytesToHex=ud;U.hexToBytes=cd;U.asyncLoop=md;U.utf8ToBytes=Ll;U.toBytes=$n;U.concatBytes=dd;U.checkOpts=fd;U.wrapConstructor=gd;U.wrapConstructorWithOpts=yd;U.wrapXOFConstructorWithOpts=hd;U.randomBytes=wd;var Mt=Ml(),io=eo();function td(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function rd(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function nd(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function id(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function od(e,t){return e<<32-t|e>>>t}function sd(e,t){return e<>>32-t>>>0}U.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function oo(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}U.byteSwapIfBE=U.isLE?e=>e:e=>oo(e);function ad(e){for(let t=0;tt.toString(16).padStart(2,"0"));function ud(e){(0,io.abytes)(e);let t="";for(let r=0;r=Ue._0&&e<=Ue._9)return e-Ue._0;if(e>=Ue.A&&e<=Ue.F)return e-(Ue.A-10);if(e>=Ue.a&&e<=Ue.f)return e-(Ue.a-10)}function cd(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let i=0,o=0;i{};U.nextTick=pd;async function md(e,t,r){let n=Date.now();for(let i=0;i=0&&oe().update($n(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function yd(e){let t=(n,i)=>e(i).update($n(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function hd(e){let t=(n,i)=>e(i).update($n(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function wd(e=32){if(Mt.crypto&&typeof Mt.crypto.getRandomValues=="function")return Mt.crypto.getRandomValues(new Uint8Array(e));if(Mt.crypto&&typeof Mt.crypto.randomBytes=="function")return Mt.crypto.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}});var Hl=se(G=>{"use strict";u();c();p();m();d();l();Object.defineProperty(G,"__esModule",{value:!0});G.shake256=G.shake128=G.keccak_512=G.keccak_384=G.keccak_256=G.keccak_224=G.sha3_512=G.sha3_384=G.sha3_256=G.sha3_224=G.Keccak=void 0;G.keccakP=jl;var Nt=eo(),xr=_l(),Fe=Ul(),$l=[],ql=[],Bl=[],bd=BigInt(0),Er=BigInt(1),Ed=BigInt(2),xd=BigInt(7),Pd=BigInt(256),Td=BigInt(113);for(let e=0,t=Er,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],$l.push(2*(5*n+r)),ql.push((e+1)*(e+2)/2%64);let i=bd;for(let o=0;o<7;o++)t=(t<>xd)*Td)%Pd,t&Ed&&(i^=Er<<(Er<r>32?(0,xr.rotlBH)(e,t,r):(0,xr.rotlSH)(e,t,r),Vl=(e,t,r)=>r>32?(0,xr.rotlBL)(e,t,r):(0,xr.rotlSL)(e,t,r);function jl(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let s=0;s<10;s++)r[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,f=(s+2)%10,w=r[f],A=r[f+1],C=Fl(w,A,1)^r[a],I=Vl(w,A,1)^r[a+1];for(let R=0;R<50;R+=10)e[s+R]^=C,e[s+R+1]^=I}let i=e[2],o=e[3];for(let s=0;s<24;s++){let a=ql[s],f=Fl(i,o,a),w=Vl(i,o,a),A=$l[s];i=e[A],o=e[A+1],e[A]=f,e[A+1]=w}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)r[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~r[(a+2)%10]&r[(a+4)%10]}e[0]^=vd[n],e[1]^=Ad[n]}r.fill(0)}var Pr=class e extends Fe.Hash{constructor(t,r,n,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,Nt.anumber)(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,Fe.u32)(this.state)}keccak(){Fe.isLE||(0,Fe.byteSwap32)(this.state32),jl(this.state32,this.rounds),Fe.isLE||(0,Fe.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,Nt.aexists)(this);let{blockLen:r,state:n}=this;t=(0,Fe.toBytes)(t);let i=t.length;for(let o=0;o=n&&this.keccak();let s=Math.min(n-this.posOut,o-i);t.set(r.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,Nt.anumber)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,Nt.aoutput)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:n,outputLen:i,rounds:o,enableXOF:s}=this;return t||(t=new e(r,n,i,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=n,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}};G.Keccak=Pr;var Ge=(e,t,r)=>(0,Fe.wrapConstructor)(()=>new Pr(t,e,r));G.sha3_224=Ge(6,144,224/8);G.sha3_256=Ge(6,136,256/8);G.sha3_384=Ge(6,104,384/8);G.sha3_512=Ge(6,72,512/8);G.keccak_224=Ge(1,144,224/8);G.keccak_256=Ge(1,136,256/8);G.keccak_384=Ge(1,104,384/8);G.keccak_512=Ge(1,72,512/8);var Ql=(e,t,r)=>(0,Fe.wrapXOFConstructorWithOpts)((n={})=>new Pr(t,e,n.dkLen===void 0?r:n.dkLen,!0));G.shake128=Ql(31,168,128/8);G.shake256=Ql(31,136,256/8)});var Xl=se((FN,Je)=>{"use strict";u();c();p();m();d();l();var{sha3_512:Cd}=Hl(),Jl=24,Tr=32,so=(e=4,t=Math.random)=>{let r="";for(;r.lengthWl(Cd(e)).toString(36).slice(1),Gl=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),Rd=e=>Gl[Math.floor(e()*Gl.length)],zl=({globalObj:e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},random:t=Math.random}={})=>{let r=Object.keys(e).toString(),n=r.length?r+so(Tr,t):so(Tr,t);return Kl(n).substring(0,Tr)},Yl=e=>()=>e++,Id=476782367,Zl=({random:e=Math.random,counter:t=Yl(Math.floor(e()*Id)),length:r=Jl,fingerprint:n=zl({random:e})}={})=>function(){let o=Rd(e),s=Date.now().toString(36),a=t().toString(36),f=so(r,e),w=`${s+f+a+n}`;return`${o+Kl(w).substring(1,r)}`},Sd=Zl(),kd=(e,{minLength:t=2,maxLength:r=Tr}={})=>{let n=e.length,i=/^[0-9a-z]+$/;try{if(typeof e=="string"&&n>=t&&n<=r&&i.test(e))return!0}finally{}return!1};Je.exports.getConstants=()=>({defaultLength:Jl,bigLength:Tr});Je.exports.init=Zl;Je.exports.createId=Sd;Je.exports.bufToBigInt=Wl;Je.exports.createCounter=Yl;Je.exports.createFingerprint=zl;Je.exports.isCuid=kd});var eu=se((HN,vr)=>{"use strict";u();c();p();m();d();l();var{createId:Od,init:Dd,getConstants:_d,isCuid:Md}=Xl();vr.exports.createId=Od;vr.exports.init=Dd;vr.exports.getConstants=_d;vr.exports.isCuid=Md});var Gf={};pt(Gf,{DMMF:()=>ir,Debug:()=>K,Decimal:()=>ae,Extensions:()=>gi,MetricsClient:()=>Rt,PrismaClientInitializationError:()=>F,PrismaClientKnownRequestError:()=>X,PrismaClientRustPanicError:()=>le,PrismaClientUnknownRequestError:()=>ne,PrismaClientValidationError:()=>ie,Public:()=>yi,Sql:()=>fe,createParam:()=>sa,defineDmmfProperty:()=>ma,deserializeJsonResponse:()=>Qe,deserializeRawResult:()=>ai,dmmfToRuntimeDataModel:()=>Us,empty:()=>ya,getPrismaClient:()=>pc,getRuntime:()=>Ot,join:()=>ga,makeStrictEnum:()=>mc,makeTypedQueryFactory:()=>da,objectEnumValues:()=>En,raw:()=>Fi,serializeJsonQuery:()=>Rn,skip:()=>Cn,sqltag:()=>Vi,warnEnvConflicts:()=>void 0,warnOnce:()=>tr});module.exports=jo(Gf);u();c();p();m();d();l();var gi={};pt(gi,{defineExtension:()=>es,getExtensionContext:()=>ts});u();c();p();m();d();l();u();c();p();m();d();l();function es(e){return typeof e=="function"?e:t=>t.$extends(e)}u();c();p();m();d();l();function ts(e){return e}var yi={};pt(yi,{validator:()=>rs});u();c();p();m();d();l();u();c();p();m();d();l();function rs(...e){return t=>t}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var hi,ns,is,os,ss=!0;typeof g<"u"&&({FORCE_COLOR:hi,NODE_DISABLE_COLORS:ns,NO_COLOR:is,TERM:os}=g.env||{},ss=g.stdout&&g.stdout.isTTY);var Oc={enabled:!ns&&is==null&&os!=="dumb"&&(hi!=null&&hi!=="0"||ss)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Oc.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Qg=j(0,0),Xr=j(1,22),en=j(2,22),Hg=j(3,23),tn=j(4,24),Gg=j(7,27),Jg=j(8,28),Wg=j(9,29),Kg=j(30,39),ft=j(31,39),as=j(32,39),ls=j(33,39),us=j(34,39),zg=j(35,39),cs=j(36,39),Yg=j(37,39),ps=j(90,39),Zg=j(90,39),Xg=j(40,49),ey=j(41,49),ty=j(42,49),ry=j(43,49),ny=j(44,49),iy=j(45,49),oy=j(46,49),sy=j(47,49);u();c();p();m();d();l();var Dc=100,ms=["green","yellow","blue","magenta","cyan","red"],Kt=[],ds=Date.now(),_c=0,wi=typeof g<"u"?g.env:{};globalThis.DEBUG??=wi.DEBUG??"";globalThis.DEBUG_COLORS??=wi.DEBUG_COLORS?wi.DEBUG_COLORS==="true":!0;var zt={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 Mc(e){let t={color:ms[_c++%ms.length],enabled:zt.enabled(e),namespace:e,log:zt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Kt.push([o,...n]),Kt.length>Dc&&Kt.shift(),zt.enabled(o)||i){let f=n.map(A=>typeof A=="string"?A:Nc(A)),w=`+${Date.now()-ds}ms`;ds=Date.now(),a(o,...f,w)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var K=new Proxy(Mc,{get:(e,t)=>zt[t],set:(e,t,r)=>zt[t]=r});function Nc(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 fs(e=7500){let t=Kt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` -`);return t.lengthfp,info:()=>dp,log:()=>mp,query:()=>gp,should:()=>Ss,tags:()=>Xt,warn:()=>vi});u();c();p();m();d();l();var Xt={error:ft("prisma:error"),warn:ls("prisma:warn"),info:cs("prisma:info"),query:us("prisma:query")},Ss={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function mp(...e){console.log(...e)}function vi(e,...t){Ss.warn()&&console.warn(`${Xt.warn} ${e}`,...t)}function dp(e,...t){console.info(`${Xt.info} ${e}`,...t)}function fp(e,...t){console.error(`${Xt.error} ${e}`,...t)}function gp(e,...t){console.log(`${Xt.query} ${e}`,...t)}u();c();p();m();d();l();function Ne(e,t){throw new Error(t)}u();c();p();m();d();l();function Ci(e,t){return Object.prototype.hasOwnProperty.call(e,t)}u();c();p();m();d();l();function pn(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}u();c();p();m();d();l();function Ri(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Ms.has(e)||(Ms.add(e),vi(t,...r))};var F=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};D(F,"PrismaClientInitializationError");u();c();p();m();d();l();var X=class extends Error{code;meta;clientVersion;batchRequestIdx;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"}};D(X,"PrismaClientKnownRequestError");u();c();p();m();d();l();var le=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};D(le,"PrismaClientRustPanicError");u();c();p();m();d();l();var ne=class extends Error{clientVersion;batchRequestIdx;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"}};D(ne,"PrismaClientUnknownRequestError");u();c();p();m();d();l();var ie=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};D(ie,"PrismaClientValidationError");u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var Ie=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};u();c();p();m();d();l();function qe(e){return e.substring(0,1).toLowerCase()+e.substring(1)}u();c();p();m();d();l();function Ls(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}u();c();p();m();d();l();function rr(e){let t;return{get(){return t||(t={value:e()}),t.value}}}u();c();p();m();d();l();function Us(e){return{models:Ii(e.models),enums:Ii(e.enums),types:Ii(e.types)}}function Ii(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}u();c();p();m();d();l();function ht(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function mn(e){return e.toString()!=="Invalid Date"}u();c();p();m();d();l();l();function wt(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)}u();c();p();m();d();l();u();c();p();m();d();l();var ir={};pt(ir,{ModelAction:()=>nr,datamodelEnumToSchemaEnum:()=>hp});u();c();p();m();d();l();u();c();p();m();d();l();function hp(e){return{name:e.name,values:e.values.map(t=>t.name)}}u();c();p();m();d();l();var nr=(B=>(B.findUnique="findUnique",B.findUniqueOrThrow="findUniqueOrThrow",B.findFirst="findFirst",B.findFirstOrThrow="findFirstOrThrow",B.findMany="findMany",B.create="create",B.createMany="createMany",B.createManyAndReturn="createManyAndReturn",B.update="update",B.updateMany="updateMany",B.updateManyAndReturn="updateManyAndReturn",B.upsert="upsert",B.delete="delete",B.deleteMany="deleteMany",B.groupBy="groupBy",B.count="count",B.aggregate="aggregate",B.findRaw="findRaw",B.aggregateRaw="aggregateRaw",B))(nr||{});var wp=Ae(Is());var bp={red:ft,gray:ps,dim:en,bold:Xr,underline:tn,highlightSource:e=>e.highlight()},Ep={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function xp({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Pp({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],f=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${f}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${f}`)),t&&a.push(s.underline(Tp(t))),i){a.push("");let w=[i.toString()];o&&(w.push(o),w.push(s.dim(")"))),a.push(w.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function Tp(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function dn(e){let t=e.showColors?bp:Ep,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=xp(e),Pp(r,t)}u();c();p();m();d();l();var Gs=Ae(Si());u();c();p();m();d();l();function qs(e,t,r){let n=Bs(e),i=vp(n),o=Cp(i);o?fn(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Bs(e){return e.errors.flatMap(t=>t.kind==="Union"?Bs(t):[t])}function vp(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:Ap(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Ap(e,t){return[...new Set(e.concat(t))]}function Cp(e){return Ri(e,(t,r)=>{let n=Vs(t),i=Vs(r);return n!==i?n-i:$s(t)-$s(r)})}function Vs(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function $s(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}u();c();p();m();d();l();var we=class{constructor(t,r){this.name=t;this.value=r}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)}};u();c();p();m();d();l();u();c();p();m();d();l();Qs();u();c();p();m();d();l();var bt=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;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}};js();u();c();p();m();d();l();u();c();p();m();d();l();var gn=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};u();c();p();m();d();l();var yn=e=>e,hn={bold:yn,red:yn,green:yn,dim:yn,enabled:!1},Hs={bold:Xr,red:ft,green:as,dim:en,enabled:!0},Et={write(e){e.writeLine(",")}};u();c();p();m();d();l();var Se=class{constructor(t){this.contents=t}isUnderlined=!1;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)))})}};u();c();p();m();d();l();var Be=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var xt=class extends Be{items=[];addItem(t){return this.items.push(new gn(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new Se("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(Et,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Pt=class e extends Be{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof xt&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new Se("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(Et,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};u();c();p();m();d();l();var re=class extends Be{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Se(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};u();c();p();m();d();l();var or=class{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(Et,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function fn(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Rp(e,t);break;case"IncludeOnScalar":Ip(e,t);break;case"EmptySelection":Sp(e,t,r);break;case"UnknownSelectionField":_p(e,t);break;case"InvalidSelectionValue":Mp(e,t);break;case"UnknownArgument":Np(e,t);break;case"UnknownInputField":Lp(e,t);break;case"RequiredArgumentMissing":Up(e,t);break;case"InvalidArgumentType":Fp(e,t);break;case"InvalidArgumentValue":Vp(e,t);break;case"ValueTooLarge":$p(e,t);break;case"SomeFieldsMissing":qp(e,t);break;case"TooManyFieldsGiven":Bp(e,t);break;case"Union":qs(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Rp(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 Ip(e,t){let[r,n]=Tt(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 we(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 Sp(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){kp(e,t,i);return}if(n.hasField("select")){Op(e,t);return}}if(r?.[qe(e.outputType.name)]){Dp(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function kp(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new we(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 Op(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Ks(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 Dp(e,t){let r=new or;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new we("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=Tt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let f=a?.value.asObject()??new Pt;f.addSuggestion(n),a.value=f}}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 _p(e,t){let r=zs(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Ks(n,e.outputType);break;case"include":jp(n,e.outputType);break;case"omit":Qp(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(sr(n)),i.join(" ")})}function Mp(e,t){let r=zs(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Np(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Hp(n,e.arguments)),t.addErrorMessage(i=>Js(i,r,e.arguments.map(o=>o.name)))}function Lp(e,t){let[r,n]=Tt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Ys(o,e.inputType)}t.addErrorMessage(o=>Js(o,n,e.inputType.fields.map(s=>s.name)))}function Js(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Jp(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(sr(e)),n.join(" ")}function Up(e,t){let r;t.addErrorMessage(f=>r?.value instanceof re&&r.value.text==="null"?`Argument \`${f.green(o)}\` must not be ${f.red("null")}.`:`Argument \`${f.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Tt(e.argumentPath),s=new or,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 f of e.inputTypes[0].fields)s.addField(f.name,f.typeNames.join(" | "));a.addSuggestion(new we(o,s).makeRequired())}else{let f=e.inputTypes.map(Ws).join(" | ");a.addSuggestion(new we(o,f).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,f]=Tt(e.dependentArgumentPath);t.addErrorMessage(w=>`Argument \`${w.green(o)}\` is required because argument \`${w.green(f)}\` was provided.`)}}}function Ws(e){return e.kind==="list"?`${Ws(e.elementType)}[]`:e.name}function Fp(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=wn("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Vp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=wn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function $p(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 re&&(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 qp(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&&Ys(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")} ${wn("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 Bp(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 ${wn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Ks(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new we(r.name,"true"))}function jp(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new we(r.name,"true"))}function Qp(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new we(r.name,"true"))}function Hp(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new we(r.name,r.typeNames.join(" | ")))}function zs(e,t){let[r,n]=Tt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),f=o?.getField(n);return o&&f?{parentKind:"select",parent:o,field:f,fieldName:n}:(f=s?.getField(n),s&&f?{parentKind:"include",field:f,parent:s,fieldName:n}:(f=a?.getField(n),a&&f?{parentKind:"omit",field:f,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Ys(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new we(r.name,r.typeNames.join(" | ")))}function Tt(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 wn(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Gp=3;function Jp(e,t){let r=1/0,n;for(let i of t){let o=(0,Gs.default)(e,i);o>Gp||o`}};function vt(e){return e instanceof ar}u();c();p();m();d();l();var bn=Symbol(),Oi=new WeakMap,Le=class{constructor(t){t===bn?Oi.set(this,`Prisma.${this._getName()}`):Oi.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Oi.get(this)}},lr=class extends Le{_getNamespace(){return"NullTypes"}},ur=class extends lr{#e};Di(ur,"DbNull");var cr=class extends lr{#e};Di(cr,"JsonNull");var pr=class extends lr{#e};Di(pr,"AnyNull");var En={classes:{DbNull:ur,JsonNull:cr,AnyNull:pr},instances:{DbNull:new ur(bn),JsonNull:new cr(bn),AnyNull:new pr(bn)}};function Di(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}u();c();p();m();d();l();var Zs=": ",xn=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Zs.length}write(t){let r=new Se(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Zs).write(this.value)}};var _i=class{arguments;errorMessages=[];constructor(t){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 At(e){return new _i(Xs(e))}function Xs(e){let t=new Pt;for(let[r,n]of Object.entries(e)){let i=new xn(r,ea(n));t.addField(i)}return t}function ea(e){if(typeof e=="string")return new re(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new re(String(e));if(typeof e=="bigint")return new re(`${e}n`);if(e===null)return new re("null");if(e===void 0)return new re("undefined");if(wt(e))return new re(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return y.isBuffer(e)?new re(`Buffer.alloc(${e.byteLength})`):new re(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=mn(e)?e.toISOString():"Invalid Date";return new re(`new Date("${t}")`)}return e instanceof Le?new re(`Prisma.${e._getName()}`):vt(e)?new re(`prisma.${qe(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Wp(e):typeof e=="object"?Xs(e):new re(Object.prototype.toString.call(e))}function Wp(e){let t=new xt;for(let r of e)t.addItem(ea(r));return t}function Pn(e,t){let r=t==="pretty"?Hs:hn,n=e.renderAllMessages(r),i=new bt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Tn({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=At(e);for(let C of t)fn(C,a,s);let{message:f,args:w}=Pn(a,r),A=dn({message:f,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:w});throw new ie(A,{clientVersion:o})}u();c();p();m();d();l();u();c();p();m();d();l();function ke(e){return e.replace(/^./,t=>t.toLowerCase())}u();c();p();m();d();l();function ra(e,t,r){let n=ke(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Kp({...e,...ta(t.name,e,t.result.$allModels),...ta(t.name,e,t.result[n])})}function Kp(e){let t=new Ie,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 pn(e,n=>({...n,needs:r(n.name,new Set)}))}function ta(e,t,r){return r?pn(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:zp(t,o,i)})):{}}function zp(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function na(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function ia(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 vn=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new Ie;modelExtensionsCache=new Ie;queryCallbacksCache=new Ie;clientExtensions=rr(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=rr(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>ra(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=ke(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()}},Ct=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new vn(t))}isEmpty(){return this.head===void 0}append(t){return new e(new vn(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()??[]}};u();c();p();m();d();l();var An=class{constructor(t){this.name=t}};function oa(e){return e instanceof An}function sa(e){return new An(e)}u();c();p();m();d();l();u();c();p();m();d();l();var aa=Symbol(),mr=class{constructor(t){if(t!==aa)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Cn:t}},Cn=new mr(aa);function Oe(e){return e instanceof mr}var Yp={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},la="explicitly `undefined` values are not allowed";function Rn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=Ct.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:f,previewFeatures:w,globalOmit:A}){let C=new Mi({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:f,previewFeatures:w,globalOmit:A});return{modelName:e,action:Yp[t],query:dr(r,C)}}function dr({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:ca(r,n),selection:Zp(e,t,i,n)}}function Zp(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),rm(e,n)):Xp(n,t,r)}function Xp(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&em(n,t,e),tm(n,r,e),n}function em(e,t,r){for(let[n,i]of Object.entries(t)){if(Oe(i))continue;let o=r.nestSelection(n);if(Ni(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=dr(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=dr(i,o)}}function tm(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=ia(i,n);for(let[s,a]of Object.entries(o)){if(Oe(a))continue;Ni(a,r.nestSelection(s));let f=r.findField(s);n?.[s]&&!f||(e[s]=!a)}}function rm(e,t){let r={},n=t.getComputedFields(),i=na(e,n);for(let[o,s]of Object.entries(i)){if(Oe(s))continue;let a=t.nestSelection(o);Ni(s,a);let f=t.findField(o);if(!(n?.[o]&&!f)){if(s===!1||s===void 0||Oe(s)){r[o]=!1;continue}if(s===!0){f?.kind==="object"?r[o]=dr({},a):r[o]=!0;continue}r[o]=dr(s,a)}}return r}function ua(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(ht(e)){if(mn(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(oa(e))return{$type:"Param",value:e.name};if(vt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return nm(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:y.from(r,n,i).toString("base64")}}if(im(e))return e.values;if(wt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Le){if(e!==En.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(om(e))return e.toJSON();if(typeof e=="object")return ca(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function ca(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);Oe(i)||(i!==void 0?r[n]=ua(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:la}))}return r}function nm(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[qe(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"updateManyAndReturn":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:Ne(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};u();c();p();m();d();l();function pa(e){if(!e._hasPreviewFlag("metrics"))throw new ie("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var Rt=class{_client;constructor(t){this._client=t}prometheus(t){return pa(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return pa(this._client),this._client._engine.metrics({format:"json",...t})}};u();c();p();m();d();l();function ma(e,t){let r=rr(()=>sm(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function sm(e){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Li(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}u();c();p();m();d();l();var Ui=new WeakMap,In="$$PrismaTypedSql",fr=class{constructor(t,r){Ui.set(this,{sql:t,values:r}),Object.defineProperty(this,In,{value:In})}get sql(){return Ui.get(this).sql}get values(){return Ui.get(this).values}};function da(e){return(...t)=>new fr(e,t)}function Sn(e){return e!=null&&e[In]===In}u();c();p();m();d();l();var cc=Ae(Pi());u();c();p();m();d();l();fa();hs();Ps();u();c();p();m();d();l();var fe=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)}}}u();c();p();m();d();l();u();c();p();m();d();l();var On={enumerable:!0,configurable:!0,writable:!0};function Dn(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>On,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var ha=Symbol.for("nodejs.util.inspect.custom");function Pe(e,t){let r=am(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=wa(Reflect.ownKeys(o),r),a=wa(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 f=r.get(s);return f?f.getPropertyDescriptor?{...On,...f?.getPropertyDescriptor(s)}:On:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[ha]=function(){let o={...this};return delete o[ha],o},i}function am(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 wa(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}u();c();p();m();d();l();function It(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}u();c();p();m();d();l();function St(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}u();c();p();m();d();l();function ba(e){if(e===void 0)return"";let t=At(e);return new bt(0,{colors:hn}).write(t).toString()}u();c();p();m();d();l();var lm="P2037";function _n({error:e,user_facing_error:t},r,n){return t.error_code?new X(um(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 um(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===lm&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var $i=class{getLocation(){return null}};function je(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new $i}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var Ea={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function kt(e={}){let t=pm(e);return Object.entries(t).reduce((n,[i,o])=>(Ea[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function pm(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Mn(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function xa(e,t){let r=Mn(e);return t({action:"aggregate",unpacker:r,argsMapper:kt})(e)}u();c();p();m();d();l();function mm(e={}){let{select:t,...r}=e;return typeof t=="object"?kt({...r,_count:t}):kt({...r,_count:{_all:!0}})}function dm(e={}){return typeof e.select=="object"?t=>Mn(e)(t)._count:t=>Mn(e)(t)._count._all}function Pa(e,t){return t({action:"count",unpacker:dm(e),argsMapper:mm})(e)}u();c();p();m();d();l();function fm(e={}){let t=kt(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 gm(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Ta(e,t){return t({action:"groupBy",unpacker:gm(e),argsMapper:fm})(e)}function va(e,t,r){if(t==="aggregate")return n=>xa(n,r);if(t==="count")return n=>Pa(n,r);if(t==="groupBy")return n=>Ta(n,r)}u();c();p();m();d();l();function Aa(e,t){let r=t.fields.filter(i=>!i.relationName),n=Ls(r,"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 ar(e,o,s.type,s.isList,s.kind==="enum")},...Dn(Object.keys(n))})}u();c();p();m();d();l();u();c();p();m();d();l();var Ca=e=>Array.isArray(e)?e:e.split("."),qi=(e,t)=>Ca(t).reduce((r,n)=>r&&r[n],e),Ra=(e,t,r)=>Ca(t).reduceRight((n,i,o,s)=>Object.assign({},qi(e,s.slice(0,o)),{[i]:n}),r);function ym(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function hm(e,t,r){return t===void 0?e??{}:Ra(t,r,e||!0)}function Bi(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((f,w)=>({...f,[w.name]:w}),{});return f=>{let w=je(e._errorFormat),A=ym(n,i),C=hm(f,o,A),I=r({dataPath:A,callsite:w})(C),R=wm(e,t);return new Proxy(I,{get(L,k){if(!R.includes(k))return L[k];let _e=[a[k].type,r,k],pe=[A,C];return Bi(e,..._e,...pe)},...Dn([...R,...Object.getOwnPropertyNames(I)])})}}function wm(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var bm=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Em=["aggregate","count","groupBy"];function ji(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[xm(e,t),Tm(e,t),gr(r),ue("name",()=>t),ue("$name",()=>t),ue("$parent",()=>e._appliedParent)];return Pe({},n)}function xm(e,t){let r=ke(t),n=Object.keys(nr).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>f=>{let w=je(e._errorFormat);return e._createPrismaPromise(A=>{let C={args:f,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:A,callsite:w};return e._request({...C,...a})},{action:o,args:f,model:t})};return bm.includes(o)?Bi(e,t,s):Pm(i)?va(e,i,s):s({})}}}function Pm(e){return Em.includes(e)}function Tm(e,t){return et(ue("fields",()=>{let r=e._runtimeDataModel.models[t];return Aa(t,r)}))}u();c();p();m();d();l();function Ia(e){return e.replace(/^./,t=>t.toUpperCase())}var Qi=Symbol();function yr(e){let t=[vm(e),Am(e),ue(Qi,()=>e),ue("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(gr(r)),Pe(e,t)}function vm(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function Am(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(ke),n=[...new Set(t.concat(r))];return et({getKeys(){return n},getPropertyValue(i){let o=Ia(i);if(e._runtimeDataModel.models[o]!==void 0)return ji(e,o);if(e._runtimeDataModel.models[i]!==void 0)return ji(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Sa(e){return e[Qi]?e[Qi]:e}function ka(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},$on:{value:void 0}});return yr(t)}u();c();p();m();d();l();u();c();p();m();d();l();function Oa({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let f of Object.values(o)){if(n){if(n[f.name])continue;let w=f.needs.filter(A=>n[A]);w.length>0&&a.push(It(w))}else if(r){if(!r[f.name])continue;let w=f.needs.filter(A=>!r[A]);w.length>0&&a.push(It(w))}Cm(e,f.needs)&&s.push(Rm(f,Pe(e,s)))}return s.length>0||a.length>0?Pe(e,[...s,...a]):e}function Cm(e,t){return t.every(r=>Ci(e,r))}function Rm(e,t){return et(ue(e.name,()=>e.compute(t)))}u();c();p();m();d();l();function Nn({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sA.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let w=typeof s=="object"?s:{};t[o]=Nn({visitor:i,result:t[o],args:w,modelName:f.type,runtimeDataModel:n})}}function _a({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Nn({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,f,w)=>{let A=ke(f);return Oa({result:a,modelName:A,select:w.select,omit:w.select?void 0:{...o?.[A],...w.omit},extensions:n})}})}u();c();p();m();d();l();u();c();p();m();d();l();l();u();c();p();m();d();l();var Im=["$connect","$disconnect","$on","$transaction","$extends"],Ma=Im;function Na(e){if(e instanceof fe)return Sm(e);if(Sn(e))return km(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:Na(t.args??{}),__internalParams:t,query:(s,a=t)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=qa(o,f),a.args=s,Ua(e,a,r,n+1)}})})}function Fa(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 Ua(e,t,s)}function Va(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?$a(r,n,0,e):e(r)}}function $a(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let f=a.customDataProxyFetch;return a.customDataProxyFetch=qa(i,f),$a(a,t,r+1,n)}})}var La=e=>e;function qa(e=La,t=La){return r=>e(t(r))}u();c();p();m();d();l();var Ba=K("prisma:client"),ja={Vercel:"vercel","Netlify CI":"netlify"};function Qa({postinstall:e,ciName:t,clientVersion:r}){if(Ba("checkPlatformCaching:postinstall",e),Ba("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. +"use strict";var lu=Object.create;var Kr=Object.defineProperty;var cu=Object.getOwnPropertyDescriptor;var uu=Object.getOwnPropertyNames;var pu=Object.getPrototypeOf,mu=Object.prototype.hasOwnProperty;var ye=(e,t)=>()=>(e&&(t=e(e=0)),t);var se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pt=(e,t)=>{for(var r in t)Kr(e,r,{get:t[r],enumerable:!0})},Vo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of uu(t))!mu.call(e,i)&&i!==r&&Kr(e,i,{get:()=>t[i],enumerable:!(n=cu(t,i))||n.enumerable});return e};var Ae=(e,t,r)=>(r=e!=null?lu(pu(e)):{},Vo(t||!e||!e.__esModule?Kr(r,"default",{value:e,enumerable:!0}):r,e)),qo=e=>Vo(Kr({},"__esModule",{value:!0}),e);function ci(e,t){if(t=t.toLowerCase(),t==="utf8"||t==="utf-8")return new h(yu.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,f)=>function(E=0){return Y(E,"offset"),de(E,"offset"),ee(E,"offset",this.length-1),new DataView(this.buffer)[r[a]](E,f)},o=(a,f)=>function(E,A=0){let R=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),S=gu[R];return Y(A,"offset"),de(A,"offset"),ee(A,"offset",this.length-1),fu(E,"value",S[0],S[1]),new DataView(this.buffer)[r[a]](A,E,f),A+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(f=>{f.includes("Uint")&&(e[f.replace("Uint","UInt")]=e[f]),f.includes("Float64")&&(e[f.replace("Float64","Double")]=e[f]),f.includes("Float32")&&(e[f.replace("Float32","Float")]=e[f])})};n.forEach((a,f)=>{a.startsWith("read")&&(e[a]=i(f,!1),e[a+"LE"]=i(f,!0),e[a+"BE"]=i(f,!1)),a.startsWith("write")&&(e[a]=o(f,!1),e[a+"LE"]=o(f,!0),e[a+"BE"]=o(f,!1)),s([a,a+"LE",a+"BE"])})}function jo(e){throw new Error(`Buffer polyfill does not implement "${e}"`)}function zr(e,t){if(!(e instanceof Uint8Array))throw new TypeError(`The "${t}" argument must be an instance of Buffer or Uint8Array`)}function ee(e,t,r=bu+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 Y(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 de(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 fu(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 Bo(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 Eu(e,t="utf8"){return h.from(e,t)}var h,gu,yu,hu,wu,bu,y,ui,c=ye(()=>{"use strict";h=class e extends Uint8Array{_isBuffer=!0;get offset(){return this.byteOffset}static alloc(t,r=0,n="utf8"){return Bo(n,"encoding"),e.allocUnsafe(t).fill(r,n)}static allocUnsafe(t){return e.from(t)}static allocUnsafeSlow(t){return e.from(t)}static isBuffer(t){return t&&!!t._isBuffer}static byteLength(t,r="utf8"){if(typeof t=="string")return ci(t,r).byteLength;if(t&&t.byteLength)return t.byteLength;let n=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw n.code="ERR_INVALID_ARG_TYPE",n}static isEncoding(t){return wu.includes(t)}static compare(t,r){zr(t,"buff1"),zr(r,"buff2");for(let n=0;nr[n])return 1}return t.length===r.length?0:t.length>r.length?1:-1}static from(t,r="utf8"){if(t&&typeof t=="object"&&t.type==="Buffer")return new e(t.data);if(typeof t=="number")return new e(new Uint8Array(t));if(typeof t=="string")return ci(t,r);if(ArrayBuffer.isView(t)){let{byteOffset:n,byteLength:i,buffer:o}=t;return"map"in t&&typeof t.map=="function"?new e(t.map(s=>s%256),n,i):new e(o,n,i)}if(t&&typeof t=="object"&&("length"in t||"byteLength"in t||"buffer"in t))return new e(t);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(t,r){if(t.length===0)return e.alloc(0);let n=[].concat(...t.map(o=>[...o])),i=e.alloc(r!==void 0?r:n.length);return i.set(r!==void 0?n.slice(0,r):n),i}slice(t=0,r=this.length){return this.subarray(t,r)}subarray(t=0,r=this.length){return Object.setPrototypeOf(super.subarray(t,r),e.prototype)}reverse(){return super.reverse(),this}readIntBE(t,r){Y(t,"offset"),de(t,"offset"),ee(t,"offset",this.length-1),Y(r,"byteLength"),de(r,"byteLength");let n=new DataView(this.buffer,t,r),i=0;for(let o=0;o=0;o--)i.setUint8(o,t&255),t=t/256;return r+n}writeUintBE(t,r,n){return this.writeUIntBE(t,r,n)}writeUIntLE(t,r,n){Y(r,"offset"),de(r,"offset"),ee(r,"offset",this.length-1),Y(n,"byteLength"),de(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=0;or===t[n])}copy(t,r=0,n=0,i=this.length){ee(r,"targetStart"),ee(n,"sourceStart",this.length),ee(i,"sourceEnd"),r>>>=0,n>>>=0,i>>>=0;let o=0;for(;n=this.length?this.length-a:t.length),a);return this}includes(t,r=null,n="utf-8"){return this.indexOf(t,r,n)!==-1}lastIndexOf(t,r=null,n="utf-8"){return this.indexOf(t,r,n,!0)}indexOf(t,r=null,n="utf-8",i=!1){let o=i?this.findLastIndex.bind(this):this.findIndex.bind(this);n=typeof r=="string"?r:n;let s=e.from(typeof t=="number"?[t]:t,n),a=typeof r=="string"?0:r;return a=typeof r=="number"?a:null,a=Number.isNaN(a)?null:a,a??=i?this.length:0,a=a<0?this.length+a:a,s.length===0&&i===!1?a>=this.length?this.length:a:s.length===0&&i===!0?(a>=this.length?this.length:a)||this.length:o((f,E)=>(i?E<=a:E>=a)&&this[E]===s[0]&&s.every((R,S)=>this[E+S]===R))}toString(t="utf8",r=0,n=this.length){if(r=r<0?0:r,t=t.toString().toLowerCase(),n<=0)return"";if(t==="utf8"||t==="utf-8")return hu.decode(this.slice(r,n));if(t==="base64"||t==="base64url"){let i=btoa(this.reduce((o,s)=>o+ui(s),""));return t==="base64url"?i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):i}if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return this.slice(r,n).reduce((i,o)=>i+ui(o&(t==="ascii"?127:255)),"");if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let i=new DataView(this.buffer.slice(r,n));return Array.from({length:i.byteLength/2},(o,s)=>s*2+1i+o.toString(16).padStart(2,"0"),"");jo(`encoding "${t}"`)}toLocaleString(){return this.toString()}inspect(){return``}};gu={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]},yu=new TextEncoder,hu=new TextDecoder,wu=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],bu=4294967295;du(h.prototype);y=new Proxy(Eu,{construct(e,[t,r]){return h.from(t,r)},get(e,t){return h[t]}}),ui=String.fromCodePoint});var g,x,u=ye(()=>{"use strict";g={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:x}=g});var w,p=ye(()=>{"use strict";w=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var b,m=ye(()=>{"use strict";b=()=>{};b.prototype=b});var d=ye(()=>{"use strict"});function Jo(e,t){var r,n,i,o,s,a,f,E,A=e.constructor,R=A.precision;if(!e.s||!t.s)return t.s||(t=new A(e)),W?q(t,R):t;if(f=e.d,E=t.d,s=e.e,i=t.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=E.length):(n=E,i=s,a=f.length),s=Math.ceil(R/H),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=f.length,o=E.length,a-o<0&&(o=a,n=E,E=f,f=n),r=0;o;)r=(f[--o]=f[o]+E[o]+r)/te|0,f[o]%=te;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return t.d=f,t.e=i,W?q(t,R):t}function Ce(e,t,r){if(e!==~~e||er)throw Error(Ye+e)}function Re(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t16)throw Error(mi+Z(e));if(!e.s)return new A(he);for(t==null?(W=!1,a=R):a=t,s=new A(.03125);e.abs().gte(.1);)e=e.times(s),E+=5;for(n=Math.log(ze(2,E))/Math.LN10*2+5|0,a+=n,r=i=o=new A(he),A.precision=a;;){if(i=q(i.times(e),a),r=r.times(++f),s=o.plus(Me(i,r,a)),Re(s.d).slice(0,a)===Re(o.d).slice(0,a)){for(;E--;)o=q(o.times(o),a);return A.precision=R,t==null?(W=!0,q(o,R)):o}o=s}}function Z(e){for(var t=e.e*H,r=e.d[0];r>=10;r/=10)t++;return t}function pi(e,t,r){if(t>e.LN10.sd())throw W=!0,r&&(e.precision=r),Error(be+"LN10 precision limit exceeded");return q(new e(e.LN10),t)}function Ve(e){for(var t="";e--;)t+="0";return t}function Wt(e,t){var r,n,i,o,s,a,f,E,A,R=1,S=10,C=e,L=C.d,k=C.constructor,M=k.precision;if(C.s<1)throw Error(be+(C.s?"NaN":"-Infinity"));if(C.eq(he))return new k(0);if(t==null?(W=!1,E=M):E=t,C.eq(10))return t==null&&(W=!0),pi(k,E);if(E+=S,k.precision=E,r=Re(L),n=r.charAt(0),o=Z(C),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)C=C.times(e),r=Re(C.d),n=r.charAt(0),R++;o=Z(C),n>1?(C=new k("0."+r),o++):C=new k(n+"."+r.slice(1))}else return f=pi(k,E+2,M).times(o+""),C=Wt(new k(n+"."+r.slice(1)),E-S).plus(f),k.precision=M,t==null?(W=!0,q(C,M)):C;for(a=s=C=Me(C.minus(he),C.plus(he),E),A=q(C.times(C),E),i=3;;){if(s=q(s.times(A),E),f=a.plus(Me(s,new k(i),E)),Re(f.d).slice(0,E)===Re(a.d).slice(0,E))return a=a.times(2),o!==0&&(a=a.plus(pi(k,E+2,M).times(o+""))),a=Me(a,new k(R),E),k.precision=M,t==null?(W=!0,q(a,M)):a;a=f,i+=2}}function Qo(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=dt(r/H),e.d=[],n=(r+1)%H,r<0&&(n+=H),nYr||e.e<-Yr))throw Error(mi+r)}else e.s=0,e.e=0,e.d=[0];return e}function q(e,t,r){var n,i,o,s,a,f,E,A,R=e.d;for(s=1,o=R[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=H,i=t,E=R[A=0];else{if(A=Math.ceil((n+1)/H),o=R.length,A>=o)return e;for(E=o=R[A],s=1;o>=10;o/=10)s++;n%=H,i=n-H+s}if(r!==void 0&&(o=ze(10,s-i-1),a=E/o%10|0,f=t<0||R[A+1]!==void 0||E%o,f=r<4?(a||f)&&(r==0||r==(e.s<0?3:2)):a>5||a==5&&(r==4||f||r==6&&(n>0?i>0?E/ze(10,s-i):0:R[A-1])%10&1||r==(e.s<0?8:7))),t<1||!R[0])return f?(o=Z(e),R.length=1,t=t-o-1,R[0]=ze(10,(H-t%H)%H),e.e=dt(-t/H)||0):(R.length=1,R[0]=e.e=e.s=0),e;if(n==0?(R.length=A,o=1,A--):(R.length=A+1,o=ze(10,H-n),R[A]=i>0?(E/ze(10,s-i)%ze(10,i)|0)*o:0),f)for(;;)if(A==0){(R[0]+=o)==te&&(R[0]=1,++e.e);break}else{if(R[A]+=o,R[A]!=te)break;R[A--]=0,o=1}for(n=R.length;R[--n]===0;)R.pop();if(W&&(e.e>Yr||e.e<-Yr))throw Error(mi+Z(e));return e}function Ko(e,t){var r,n,i,o,s,a,f,E,A,R,S=e.constructor,C=S.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new S(e),W?q(t,C):t;if(f=e.d,R=t.d,n=t.e,E=e.e,f=f.slice(),s=E-n,s){for(A=s<0,A?(r=f,s=-s,a=R.length):(r=R,n=E,a=f.length),i=Math.max(Math.ceil(C/H),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,a=R.length,A=i0;--i)f[a++]=0;for(i=R.length;i>s;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+Ve(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ve(-i-1)+o,r&&(n=r-s)>0&&(o+=Ve(n))):i>=s?(o+=Ve(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ve(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ve(n))),e.s<0?"-"+o:o}function Ho(e,t){if(e.length>t)return e.length=t,!0}function zo(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(Ye+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 Qo(s,o.toString())}else if(typeof o!="string")throw Error(Ye+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,Pu.test(o))Qo(s,o);else throw Error(Ye+o)}if(i.prototype=I,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=zo,i.config=i.set=Tu,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(Ye+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ye+r+": "+n);return this}var mt,xu,di,W,be,Ye,mi,dt,ze,Pu,he,te,H,Go,Yr,I,Me,di,Zr,Yo=ye(()=>{"use strict";c();u();p();m();d();l();mt=1e9,xu={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},W=!0,be="[DecimalError] ",Ye=be+"Invalid argument: ",mi=be+"Exponent out of range: ",dt=Math.floor,ze=Math.pow,Pu=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,te=1e7,H=7,Go=9007199254740991,Yr=dt(Go/H),I={};I.absoluteValue=I.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};I.comparedTo=I.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};I.decimalPlaces=I.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*H;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};I.dividedBy=I.div=function(e){return Me(this,new this.constructor(e))};I.dividedToIntegerBy=I.idiv=function(e){var t=this,r=t.constructor;return q(Me(t,new r(e),0,1),r.precision)};I.equals=I.eq=function(e){return!this.cmp(e)};I.exponent=function(){return Z(this)};I.greaterThan=I.gt=function(e){return this.cmp(e)>0};I.greaterThanOrEqualTo=I.gte=function(e){return this.cmp(e)>=0};I.isInteger=I.isint=function(){return this.e>this.d.length-2};I.isNegative=I.isneg=function(){return this.s<0};I.isPositive=I.ispos=function(){return this.s>0};I.isZero=function(){return this.s===0};I.lessThan=I.lt=function(e){return this.cmp(e)<0};I.lessThanOrEqualTo=I.lte=function(e){return this.cmp(e)<1};I.logarithm=I.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(he))throw Error(be+"NaN");if(r.s<1)throw Error(be+(r.s?"NaN":"-Infinity"));return r.eq(he)?new n(0):(W=!1,t=Me(Wt(r,o),Wt(e,o),o),W=!0,q(t,i))};I.minus=I.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Ko(t,e):Jo(t,(e.s=-e.s,e))};I.modulo=I.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(be+"NaN");return r.s?(W=!1,t=Me(r,e,0,1).times(e),W=!0,r.minus(t)):q(new n(r),i)};I.naturalExponential=I.exp=function(){return Wo(this)};I.naturalLogarithm=I.ln=function(){return Wt(this)};I.negated=I.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};I.plus=I.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Jo(t,e):Ko(t,(e.s=-e.s,e))};I.precision=I.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ye+e);if(t=Z(i)+1,n=i.d.length-1,r=n*H+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};I.squareRoot=I.sqrt=function(){var e,t,r,n,i,o,s,a=this,f=a.constructor;if(a.s<1){if(!a.s)return new f(0);throw Error(be+"NaN")}for(e=Z(a),W=!1,i=Math.sqrt(+a),i==0||i==1/0?(t=Re(a.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=dt((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 f(t)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(o=n,n=o.plus(Me(a,o,s+2)).times(.5),Re(o.d).slice(0,s)===(t=Re(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(q(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(t!="9999")break;s+=4}return W=!0,q(n,r)};I.times=I.mul=function(e){var t,r,n,i,o,s,a,f,E,A=this,R=A.constructor,S=A.d,C=(e=new R(e)).d;if(!A.s||!e.s)return new R(0);for(e.s*=A.s,r=A.e+e.e,f=S.length,E=C.length,f=0;){for(t=0,i=f+n;i>n;)a=o[i]+C[n]*S[i-n-1]+t,o[i--]=a%te|0,t=a/te|0;o[i]=(o[i]+t)%te|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,W?q(e,R.precision):e};I.toDecimalPlaces=I.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Ce(e,0,mt),t===void 0?t=n.rounding:Ce(t,0,8),q(r,e+Z(r)+1,t))};I.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ze(n,!0):(Ce(e,0,mt),t===void 0?t=i.rounding:Ce(t,0,8),n=q(new i(n),e+1,t),r=Ze(n,!0,e+1)),r};I.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Ze(i):(Ce(e,0,mt),t===void 0?t=o.rounding:Ce(t,0,8),n=q(new o(i),e+Z(i)+1,t),r=Ze(n.abs(),!1,e+Z(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};I.toInteger=I.toint=function(){var e=this,t=e.constructor;return q(new t(e),Z(e)+1,t.rounding)};I.toNumber=function(){return+this};I.toPower=I.pow=function(e){var t,r,n,i,o,s,a=this,f=a.constructor,E=12,A=+(e=new f(e));if(!e.s)return new f(he);if(a=new f(a),!a.s){if(e.s<1)throw Error(be+"Infinity");return a}if(a.eq(he))return a;if(n=f.precision,e.eq(he))return q(a,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=a.s,s){if((r=A<0?-A:A)<=Go){for(i=new f(he),t=Math.ceil(n/H+4),W=!1;r%2&&(i=i.times(a),Ho(i.d,t)),r=dt(r/2),r!==0;)a=a.times(a),Ho(a.d,t);return W=!0,e.s<0?new f(he).div(i):q(i,n)}}else if(o<0)throw Error(be+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,a.s=1,W=!1,i=e.times(Wt(a,n+E)),W=!0,i=Wo(i),i.s=o,i};I.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=Z(i),n=Ze(i,r<=o.toExpNeg||r>=o.toExpPos)):(Ce(e,1,mt),t===void 0?t=o.rounding:Ce(t,0,8),i=q(new o(i),e,t),r=Z(i),n=Ze(i,e<=r||r<=o.toExpNeg,e)),n};I.toSignificantDigits=I.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Ce(e,1,mt),t===void 0?t=n.rounding:Ce(t,0,8)),q(new n(r),e,t)};I.toString=I.valueOf=I.val=I.toJSON=I[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Z(e),r=e.constructor;return Ze(e,t<=r.toExpNeg||t>=r.toExpPos)};Me=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%te|0,s=o/te|0;return s&&n.unshift(s),n}function t(n,i,o,s){var a,f;if(o!=s)f=o>s?1:-1;else for(a=f=0;ai[a]?1:-1;break}return f}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,f,E,A,R,S,C,L,k,M,_e,pe,B,me,Ke,li,xe,Jr,Wr=n.constructor,au=n.s==i.s?1:-1,ve=n.d,z=i.d;if(!n.s)return new Wr(n);if(!i.s)throw Error(be+"Division by zero");for(f=n.e-i.e,xe=z.length,Ke=ve.length,C=new Wr(au),L=C.d=[],E=0;z[E]==(ve[E]||0);)++E;if(z[E]>(ve[E]||0)&&--f,o==null?pe=o=Wr.precision:s?pe=o+(Z(n)-Z(i))+1:pe=o,pe<0)return new Wr(0);if(pe=pe/H+2|0,E=0,xe==1)for(A=0,z=z[0],pe++;(E1&&(z=e(z,A),ve=e(ve,A),xe=z.length,Ke=ve.length),me=xe,k=ve.slice(0,xe),M=k.length;M=te/2&&++li;do A=0,a=t(z,k,xe,M),a<0?(_e=k[0],xe!=M&&(_e=_e*te+(k[1]||0)),A=_e/li|0,A>1?(A>=te&&(A=te-1),R=e(z,A),S=R.length,M=k.length,a=t(R,k,S,M),a==1&&(A--,r(R,xe{"use strict";Yo();v=class extends Zr{static isDecimal(t){return t instanceof Zr}static random(t=20){{let n=globalThis.crypto.getRandomValues(new Uint8Array(t)).reduce((i,o)=>i+o,"");return new Zr(`0.${n.slice(0,t)}`)}}},ae=v});function Iu(){return!1}function wi(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function ku(){return wi()}function Ou(){return[]}function Du(e){e(null,[])}function _u(){return""}function Mu(){return""}function Nu(){}function Lu(){}function Uu(){}function Fu(){}function $u(){}function Vu(){}function qu(){}function Bu(){}function ju(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Qu(e,t){t(null,wi())}var Hu,Gu,fs,gs=ye(()=>{"use strict";c();u();p();m();d();l();Hu={},Gu={existsSync:Iu,lstatSync:wi,stat:Qu,statSync:ku,readdirSync:Ou,readdir:Du,readlinkSync:_u,realpathSync:Mu,chmodSync:Nu,renameSync:Lu,mkdirSync:Uu,rmdirSync:Fu,rmSync:$u,unlinkSync:Vu,watchFile:qu,unwatchFile:Bu,watch:ju,promises:Hu},fs=Gu});var ys=se(()=>{"use strict";c();u();p();m();d();l()});function Ju(...e){return e.join("/")}function Wu(...e){return e.join("/")}function Ku(e){let t=hs(e),r=ws(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function hs(e){let t=e.split("/");return t[t.length-1]}function ws(e){return e.split("/").slice(0,-1).join("/")}function Yu(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var bs,zu,Zu,Xu,rn,Es=ye(()=>{"use strict";c();u();p();m();d();l();bs="/",zu=":";Zu={sep:bs},Xu={basename:hs,delimiter:zu,dirname:ws,join:Wu,normalize:Yu,parse:Ku,posix:Zu,resolve:Ju,sep:bs},rn=Xu});var xs=se((Ky,ep)=>{ep.exports={name:"@prisma/internals",version:"6.15.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb","@prisma/schema-engine-wasm":"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var Ei={};pt(Ei,{Hash:()=>Yt,createHash:()=>Ps,default:()=>yt,randomFillSync:()=>sn,randomUUID:()=>on,webcrypto:()=>Zt});function on(){return globalThis.crypto.randomUUID()}function sn(e,t,r){return t!==void 0&&(r!==void 0?e=e.subarray(t,t+r):e=e.subarray(t)),globalThis.crypto.getRandomValues(e)}function Ps(e){return new Yt(e)}var Zt,Yt,yt,Xe=ye(()=>{"use strict";c();u();p();m();d();l();Zt=globalThis.crypto;Yt=class{#e=[];#t;constructor(t){this.#t=t}update(t){this.#e.push(t)}async digest(){let t=new Uint8Array(this.#e.reduce((i,o)=>i+o.length,0)),r=0;for(let i of this.#e)t.set(i,r),r+=i.length;let n=await globalThis.crypto.subtle.digest(this.#t,t);return new Uint8Array(n)}},yt={webcrypto:Zt,randomUUID:on,randomFillSync:sn,createHash:Ps,Hash:Yt}});var xi=se((qh,ip)=>{ip.exports={name:"@prisma/engines-version",version:"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"85179d7826409ee107a6ba334b5e305ae3fba9fb"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Ts=se(an=>{"use strict";c();u();p();m();d();l();Object.defineProperty(an,"__esModule",{value:!0});an.enginesVersion=void 0;an.enginesVersion=xi().prisma.enginesVersion});var Rs=se((rw,As)=>{"use strict";c();u();p();m();d();l();As.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 Is=se((yw,Ss)=>{"use strict";c();u();p();m();d();l();Ss.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=se((Tw,ks)=>{"use strict";c();u();p();m();d();l();var cp=Is();ks.exports=e=>typeof e=="string"?e.replace(cp(),""):e});var Os=se((Uw,un)=>{"use strict";c();u();p();m();d();l();un.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()};un.exports.default=un.exports});var Si=se((IP,Ls)=>{"use strict";c();u();p();m();d();l();Ls.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";c();u();p();m();d();l()});var Bs=ye(()=>{"use strict";c();u();p();m();d();l()});var kn,ma=ye(()=>{"use strict";c();u();p();m();d();l();kn=class{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 Xi=se(rt=>{"use strict";c();u();p();m();d();l();Object.defineProperty(rt,"__esModule",{value:!0});rt.anumber=Zi;rt.abytes=ll;rt.ahash=Gm;rt.aexists=Jm;rt.aoutput=Wm;function Zi(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Hm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function ll(e,...t){if(!Hm(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Gm(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Zi(e.outputLen),Zi(e.blockLen)}function Jm(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Wm(e,t){ll(e);let r=t.outputLen;if(e.length{"use strict";c();u();p();m();d();l();Object.defineProperty(_,"__esModule",{value:!0});_.add5L=_.add5H=_.add4H=_.add4L=_.add3H=_.add3L=_.rotlBL=_.rotlBH=_.rotlSL=_.rotlSH=_.rotr32L=_.rotr32H=_.rotrBL=_.rotrBH=_.rotrSL=_.rotrSH=_.shrSL=_.shrSH=_.toBig=void 0;_.fromBig=to;_.split=cl;_.add=Tl;var Fn=BigInt(2**32-1),eo=BigInt(32);function to(e,t=!1){return t?{h:Number(e&Fn),l:Number(e>>eo&Fn)}:{h:Number(e>>eo&Fn)|0,l:Number(e&Fn)|0}}function cl(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);_.toBig=ul;var pl=(e,t,r)=>e>>>r;_.shrSH=pl;var ml=(e,t,r)=>e<<32-r|t>>>r;_.shrSL=ml;var dl=(e,t,r)=>e>>>r|t<<32-r;_.rotrSH=dl;var fl=(e,t,r)=>e<<32-r|t>>>r;_.rotrSL=fl;var gl=(e,t,r)=>e<<64-r|t>>>r-32;_.rotrBH=gl;var yl=(e,t,r)=>e>>>r-32|t<<64-r;_.rotrBL=yl;var hl=(e,t)=>t;_.rotr32H=hl;var wl=(e,t)=>e;_.rotr32L=wl;var bl=(e,t,r)=>e<>>32-r;_.rotlSH=bl;var El=(e,t,r)=>t<>>32-r;_.rotlSL=El;var xl=(e,t,r)=>t<>>64-r;_.rotlBH=xl;var Pl=(e,t,r)=>e<>>64-r;_.rotlBL=Pl;function Tl(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:i|0}}var vl=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);_.add3L=vl;var Al=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;_.add3H=Al;var Rl=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);_.add4L=Rl;var Cl=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;_.add4H=Cl;var Sl=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);_.add5L=Sl;var Il=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;_.add5H=Il;var Km={fromBig:to,split:cl,toBig:ul,shrSH:pl,shrSL:ml,rotrSH:dl,rotrSL:fl,rotrBH:gl,rotrBL:yl,rotr32H:hl,rotr32L:wl,rotlSH:bl,rotlSL:El,rotlBH:xl,rotlBL:Pl,add:Tl,add3L:vl,add3H:Al,add4L:Rl,add4H:Cl,add5H:Il,add5L:Sl};_.default=Km});var Ol=se($n=>{"use strict";c();u();p();m();d();l();Object.defineProperty($n,"__esModule",{value:!0});$n.crypto=void 0;var He=(Xe(),qo(Ei));$n.crypto=He&&typeof He=="object"&&"webcrypto"in He?He.webcrypto:He&&typeof He=="object"&&"randomBytes"in He?He:void 0});var Ml=se(U=>{"use strict";c();u();p();m();d();l();Object.defineProperty(U,"__esModule",{value:!0});U.Hash=U.nextTick=U.byteSwapIfBE=U.isLE=void 0;U.isBytes=zm;U.u8=Ym;U.u32=Zm;U.createView=Xm;U.rotr=ed;U.rotl=td;U.byteSwap=io;U.byteSwap32=rd;U.bytesToHex=id;U.hexToBytes=od;U.asyncLoop=ad;U.utf8ToBytes=_l;U.toBytes=Vn;U.concatBytes=ld;U.checkOpts=cd;U.wrapConstructor=ud;U.wrapConstructorWithOpts=pd;U.wrapXOFConstructorWithOpts=md;U.randomBytes=dd;var Mt=Ol(),no=Xi();function zm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ym(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function Zm(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Xm(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function ed(e,t){return e<<32-t|e>>>t}function td(e,t){return e<>>32-t>>>0}U.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function io(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}U.byteSwapIfBE=U.isLE?e=>e:e=>io(e);function rd(e){for(let t=0;tt.toString(16).padStart(2,"0"));function id(e){(0,no.abytes)(e);let t="";for(let r=0;r=Ue._0&&e<=Ue._9)return e-Ue._0;if(e>=Ue.A&&e<=Ue.F)return e-(Ue.A-10);if(e>=Ue.a&&e<=Ue.f)return e-(Ue.a-10)}function od(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let i=0,o=0;i{};U.nextTick=sd;async function ad(e,t,r){let n=Date.now();for(let i=0;i=0&&oe().update(Vn(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function pd(e){let t=(n,i)=>e(i).update(Vn(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function md(e){let t=(n,i)=>e(i).update(Vn(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function dd(e=32){if(Mt.crypto&&typeof Mt.crypto.getRandomValues=="function")return Mt.crypto.getRandomValues(new Uint8Array(e));if(Mt.crypto&&typeof Mt.crypto.randomBytes=="function")return Mt.crypto.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}});var Bl=se(J=>{"use strict";c();u();p();m();d();l();Object.defineProperty(J,"__esModule",{value:!0});J.shake256=J.shake128=J.keccak_512=J.keccak_384=J.keccak_256=J.keccak_224=J.sha3_512=J.sha3_384=J.sha3_256=J.sha3_224=J.Keccak=void 0;J.keccakP=Vl;var Nt=Xi(),xr=kl(),Fe=Ml(),Ul=[],Fl=[],$l=[],fd=BigInt(0),Er=BigInt(1),gd=BigInt(2),yd=BigInt(7),hd=BigInt(256),wd=BigInt(113);for(let e=0,t=Er,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],Ul.push(2*(5*n+r)),Fl.push((e+1)*(e+2)/2%64);let i=fd;for(let o=0;o<7;o++)t=(t<>yd)*wd)%hd,t&gd&&(i^=Er<<(Er<r>32?(0,xr.rotlBH)(e,t,r):(0,xr.rotlSH)(e,t,r),Ll=(e,t,r)=>r>32?(0,xr.rotlBL)(e,t,r):(0,xr.rotlSL)(e,t,r);function Vl(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let s=0;s<10;s++)r[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,f=(s+2)%10,E=r[f],A=r[f+1],R=Nl(E,A,1)^r[a],S=Ll(E,A,1)^r[a+1];for(let C=0;C<50;C+=10)e[s+C]^=R,e[s+C+1]^=S}let i=e[2],o=e[3];for(let s=0;s<24;s++){let a=Fl[s],f=Nl(i,o,a),E=Ll(i,o,a),A=Ul[s];i=e[A],o=e[A+1],e[A]=f,e[A+1]=E}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)r[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~r[(a+2)%10]&r[(a+4)%10]}e[0]^=bd[n],e[1]^=Ed[n]}r.fill(0)}var Pr=class e extends Fe.Hash{constructor(t,r,n,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,Nt.anumber)(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,Fe.u32)(this.state)}keccak(){Fe.isLE||(0,Fe.byteSwap32)(this.state32),Vl(this.state32,this.rounds),Fe.isLE||(0,Fe.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,Nt.aexists)(this);let{blockLen:r,state:n}=this;t=(0,Fe.toBytes)(t);let i=t.length;for(let o=0;o=n&&this.keccak();let s=Math.min(n-this.posOut,o-i);t.set(r.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,Nt.anumber)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,Nt.aoutput)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:n,outputLen:i,rounds:o,enableXOF:s}=this;return t||(t=new e(r,n,i,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=n,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}};J.Keccak=Pr;var Ge=(e,t,r)=>(0,Fe.wrapConstructor)(()=>new Pr(t,e,r));J.sha3_224=Ge(6,144,224/8);J.sha3_256=Ge(6,136,256/8);J.sha3_384=Ge(6,104,384/8);J.sha3_512=Ge(6,72,512/8);J.keccak_224=Ge(1,144,224/8);J.keccak_256=Ge(1,136,256/8);J.keccak_384=Ge(1,104,384/8);J.keccak_512=Ge(1,72,512/8);var ql=(e,t,r)=>(0,Fe.wrapXOFConstructorWithOpts)((n={})=>new Pr(t,e,n.dkLen===void 0?r:n.dkLen,!0));J.shake128=ql(31,168,128/8);J.shake256=ql(31,136,256/8)});var zl=se((_L,Je)=>{"use strict";c();u();p();m();d();l();var{sha3_512:xd}=Bl(),Ql=24,Tr=32,oo=(e=4,t=Math.random)=>{let r="";for(;r.lengthHl(xd(e)).toString(36).slice(1),jl=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),Pd=e=>jl[Math.floor(e()*jl.length)],Jl=({globalObj:e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},random:t=Math.random}={})=>{let r=Object.keys(e).toString(),n=r.length?r+oo(Tr,t):oo(Tr,t);return Gl(n).substring(0,Tr)},Wl=e=>()=>e++,Td=476782367,Kl=({random:e=Math.random,counter:t=Wl(Math.floor(e()*Td)),length:r=Ql,fingerprint:n=Jl({random:e})}={})=>function(){let o=Pd(e),s=Date.now().toString(36),a=t().toString(36),f=oo(r,e),E=`${s+f+a+n}`;return`${o+Gl(E).substring(1,r)}`},vd=Kl(),Ad=(e,{minLength:t=2,maxLength:r=Tr}={})=>{let n=e.length,i=/^[0-9a-z]+$/;try{if(typeof e=="string"&&n>=t&&n<=r&&i.test(e))return!0}finally{}return!1};Je.exports.getConstants=()=>({defaultLength:Ql,bigLength:Tr});Je.exports.init=Kl;Je.exports.createId=vd;Je.exports.bufToBigInt=Hl;Je.exports.createCounter=Wl;Je.exports.createFingerprint=Jl;Je.exports.isCuid=Ad});var Yl=se((VL,vr)=>{"use strict";c();u();p();m();d();l();var{createId:Rd,init:Cd,getConstants:Sd,isCuid:Id}=zl();vr.exports.createId=Rd;vr.exports.init=Cd;vr.exports.getConstants=Sd;vr.exports.isCuid=Id});var qf={};pt(qf,{DMMF:()=>ir,Debug:()=>K,Decimal:()=>ae,Extensions:()=>fi,MetricsClient:()=>Ct,PrismaClientInitializationError:()=>F,PrismaClientKnownRequestError:()=>X,PrismaClientRustPanicError:()=>le,PrismaClientUnknownRequestError:()=>ne,PrismaClientValidationError:()=>ie,Public:()=>gi,Sql:()=>fe,createParam:()=>ia,defineDmmfProperty:()=>ua,deserializeJsonResponse:()=>Qe,deserializeRawResult:()=>si,dmmfToRuntimeDataModel:()=>Ns,empty:()=>fa,getPrismaClient:()=>iu,getRuntime:()=>Ot,join:()=>da,makeStrictEnum:()=>ou,makeTypedQueryFactory:()=>pa,objectEnumValues:()=>En,raw:()=>Ui,serializeJsonQuery:()=>Cn,skip:()=>Rn,sqltag:()=>Fi,warnEnvConflicts:()=>void 0,warnOnce:()=>tr});module.exports=qo(qf);c();u();p();m();d();l();var fi={};pt(fi,{defineExtension:()=>Zo,getExtensionContext:()=>Xo});c();u();p();m();d();l();c();u();p();m();d();l();function Zo(e){return typeof e=="function"?e:t=>t.$extends(e)}c();u();p();m();d();l();function Xo(e){return e}var gi={};pt(gi,{validator:()=>es});c();u();p();m();d();l();c();u();p();m();d();l();function es(...e){return t=>t}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var yi,ts,rs,ns,is=!0;typeof g<"u"&&({FORCE_COLOR:yi,NODE_DISABLE_COLORS:ts,NO_COLOR:rs,TERM:ns}=g.env||{},is=g.stdout&&g.stdout.isTTY);var vu={enabled:!ts&&rs==null&&ns!=="dumb"&&(yi!=null&&yi!=="0"||is)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!vu.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var $g=j(0,0),Xr=j(1,22),en=j(2,22),Vg=j(3,23),tn=j(4,24),qg=j(7,27),Bg=j(8,28),jg=j(9,29),Qg=j(30,39),ft=j(31,39),os=j(32,39),ss=j(33,39),as=j(34,39),Hg=j(35,39),ls=j(36,39),Gg=j(37,39),cs=j(90,39),Jg=j(90,39),Wg=j(40,49),Kg=j(41,49),zg=j(42,49),Yg=j(43,49),Zg=j(44,49),Xg=j(45,49),ey=j(46,49),ty=j(47,49);c();u();p();m();d();l();var Au=100,us=["green","yellow","blue","magenta","cyan","red"],Kt=[],ps=Date.now(),Ru=0,hi=typeof g<"u"?g.env:{};globalThis.DEBUG??=hi.DEBUG??"";globalThis.DEBUG_COLORS??=hi.DEBUG_COLORS?hi.DEBUG_COLORS==="true":!0;var zt={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:us[Ru++%us.length],enabled:zt.enabled(e),namespace:e,log:zt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Kt.push([o,...n]),Kt.length>Au&&Kt.shift(),zt.enabled(o)||i){let f=n.map(A=>typeof A=="string"?A:Su(A)),E=`+${Date.now()-ps}ms`;ps=Date.now(),a(o,...f,E)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var K=new Proxy(Cu,{get:(e,t)=>zt[t],set:(e,t,r)=>zt[t]=r});function Su(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 ms(e=7500){let t=Kt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` +`);return t.lengthap,info:()=>sp,log:()=>op,query:()=>lp,should:()=>Cs,tags:()=>Xt,warn:()=>Ti});c();u();p();m();d();l();var Xt={error:ft("prisma:error"),warn:ss("prisma:warn"),info:ls("prisma:info"),query:as("prisma:query")},Cs={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function op(...e){console.log(...e)}function Ti(e,...t){Cs.warn()&&console.warn(`${Xt.warn} ${e}`,...t)}function sp(e,...t){console.info(`${Xt.info} ${e}`,...t)}function ap(e,...t){console.error(`${Xt.error} ${e}`,...t)}function lp(e,...t){console.log(`${Xt.query} ${e}`,...t)}c();u();p();m();d();l();function Ne(e,t){throw new Error(t)}c();u();p();m();d();l();function Ai(e,t){return Object.prototype.hasOwnProperty.call(e,t)}c();u();p();m();d();l();function pn(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}c();u();p();m();d();l();function Ri(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Ds.has(e)||(Ds.add(e),Ti(t,...r))};var F=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};D(F,"PrismaClientInitializationError");c();u();p();m();d();l();var X=class extends Error{code;meta;clientVersion;batchRequestIdx;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"}};D(X,"PrismaClientKnownRequestError");c();u();p();m();d();l();var le=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};D(le,"PrismaClientRustPanicError");c();u();p();m();d();l();var ne=class extends Error{clientVersion;batchRequestIdx;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"}};D(ne,"PrismaClientUnknownRequestError");c();u();p();m();d();l();var ie=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};D(ie,"PrismaClientValidationError");c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var Se=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};c();u();p();m();d();l();function qe(e){return e.substring(0,1).toLowerCase()+e.substring(1)}c();u();p();m();d();l();function Ms(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}c();u();p();m();d();l();function rr(e){let t;return{get(){return t||(t={value:e()}),t.value}}}c();u();p();m();d();l();function Ns(e){return{models:Ci(e.models),enums:Ci(e.enums),types:Ci(e.types)}}function Ci(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}c();u();p();m();d();l();function ht(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function mn(e){return e.toString()!=="Invalid Date"}c();u();p();m();d();l();l();function wt(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();u();p();m();d();l();c();u();p();m();d();l();var ir={};pt(ir,{ModelAction:()=>nr,datamodelEnumToSchemaEnum:()=>up});c();u();p();m();d();l();c();u();p();m();d();l();function up(e){return{name:e.name,values:e.values.map(t=>t.name)}}c();u();p();m();d();l();var nr=(B=>(B.findUnique="findUnique",B.findUniqueOrThrow="findUniqueOrThrow",B.findFirst="findFirst",B.findFirstOrThrow="findFirstOrThrow",B.findMany="findMany",B.create="create",B.createMany="createMany",B.createManyAndReturn="createManyAndReturn",B.update="update",B.updateMany="updateMany",B.updateManyAndReturn="updateManyAndReturn",B.upsert="upsert",B.delete="delete",B.deleteMany="deleteMany",B.groupBy="groupBy",B.count="count",B.aggregate="aggregate",B.findRaw="findRaw",B.aggregateRaw="aggregateRaw",B))(nr||{});var pp=Ae(Rs());var mp={red:ft,gray:cs,dim:en,bold:Xr,underline:tn,highlightSource:e=>e.highlight()},dp={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function fp({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function gp({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],f=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${f}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${f}`)),t&&a.push(s.underline(yp(t))),i){a.push("");let E=[i.toString()];o&&(E.push(o),E.push(s.dim(")"))),a.push(E.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function yp(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function dn(e){let t=e.showColors?mp:dp,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=fp(e),gp(r,t)}c();u();p();m();d();l();var Qs=Ae(Si());c();u();p();m();d();l();function $s(e,t,r){let n=Vs(e),i=hp(n),o=bp(i);o?fn(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Vs(e){return e.errors.flatMap(t=>t.kind==="Union"?Vs(t):[t])}function hp(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:wp(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function wp(e,t){return[...new Set(e.concat(t))]}function bp(e){return Ri(e,(t,r)=>{let n=Us(t),i=Us(r);return n!==i?n-i:Fs(t)-Fs(r)})}function Us(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Fs(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}c();u();p();m();d();l();var we=class{constructor(t,r){this.name=t;this.value=r}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();u();p();m();d();l();c();u();p();m();d();l();Bs();c();u();p();m();d();l();var bt=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;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}};qs();c();u();p();m();d();l();c();u();p();m();d();l();var gn=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};c();u();p();m();d();l();var yn=e=>e,hn={bold:yn,red:yn,green:yn,dim:yn,enabled:!1},js={bold:Xr,red:ft,green:os,dim:en,enabled:!0},Et={write(e){e.writeLine(",")}};c();u();p();m();d();l();var Ie=class{constructor(t){this.contents=t}isUnderlined=!1;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();u();p();m();d();l();var Be=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var xt=class extends Be{items=[];addItem(t){return this.items.push(new gn(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new Ie("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(Et,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Pt=class e extends Be{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof xt&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new Ie("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(Et,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};c();u();p();m();d();l();var re=class extends Be{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Ie(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};c();u();p();m();d();l();var or=class{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(Et,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function fn(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Ep(e,t);break;case"IncludeOnScalar":xp(e,t);break;case"EmptySelection":Pp(e,t,r);break;case"UnknownSelectionField":Rp(e,t);break;case"InvalidSelectionValue":Cp(e,t);break;case"UnknownArgument":Sp(e,t);break;case"UnknownInputField":Ip(e,t);break;case"RequiredArgumentMissing":kp(e,t);break;case"InvalidArgumentType":Op(e,t);break;case"InvalidArgumentValue":Dp(e,t);break;case"ValueTooLarge":_p(e,t);break;case"SomeFieldsMissing":Mp(e,t);break;case"TooManyFieldsGiven":Np(e,t);break;case"Union":$s(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Ep(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 xp(e,t){let[r,n]=Tt(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 we(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 Pp(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Tp(e,t,i);return}if(n.hasField("select")){vp(e,t);return}}if(r?.[qe(e.outputType.name)]){Ap(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Tp(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new we(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 vp(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Js(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 Ap(e,t){let r=new or;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new we("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=Tt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let f=a?.value.asObject()??new Pt;f.addSuggestion(n),a.value=f}}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 Rp(e,t){let r=Ws(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Js(n,e.outputType);break;case"include":Lp(n,e.outputType);break;case"omit":Up(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(sr(n)),i.join(" ")})}function Cp(e,t){let r=Ws(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Sp(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Fp(n,e.arguments)),t.addErrorMessage(i=>Hs(i,r,e.arguments.map(o=>o.name)))}function Ip(e,t){let[r,n]=Tt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Ks(o,e.inputType)}t.addErrorMessage(o=>Hs(o,n,e.inputType.fields.map(s=>s.name)))}function Hs(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Vp(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(sr(e)),n.join(" ")}function kp(e,t){let r;t.addErrorMessage(f=>r?.value instanceof re&&r.value.text==="null"?`Argument \`${f.green(o)}\` must not be ${f.red("null")}.`:`Argument \`${f.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Tt(e.argumentPath),s=new or,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 f of e.inputTypes[0].fields)s.addField(f.name,f.typeNames.join(" | "));a.addSuggestion(new we(o,s).makeRequired())}else{let f=e.inputTypes.map(Gs).join(" | ");a.addSuggestion(new we(o,f).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,f]=Tt(e.dependentArgumentPath);t.addErrorMessage(E=>`Argument \`${E.green(o)}\` is required because argument \`${E.green(f)}\` was provided.`)}}}function Gs(e){return e.kind==="list"?`${Gs(e.elementType)}[]`:e.name}function Op(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=wn("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 Dp(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=wn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function _p(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 re&&(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 Mp(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Ks(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${wn("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 Np(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 ${wn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Js(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new we(r.name,"true"))}function Lp(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new we(r.name,"true"))}function Up(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new we(r.name,"true"))}function Fp(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new we(r.name,r.typeNames.join(" | ")))}function Ws(e,t){let[r,n]=Tt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),f=o?.getField(n);return o&&f?{parentKind:"select",parent:o,field:f,fieldName:n}:(f=s?.getField(n),s&&f?{parentKind:"include",field:f,parent:s,fieldName:n}:(f=a?.getField(n),a&&f?{parentKind:"omit",field:f,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Ks(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new we(r.name,r.typeNames.join(" | ")))}function Tt(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 wn(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var $p=3;function Vp(e,t){let r=1/0,n;for(let i of t){let o=(0,Qs.default)(e,i);o>$p||o`}};function vt(e){return e instanceof ar}c();u();p();m();d();l();var bn=Symbol(),ki=new WeakMap,Le=class{constructor(t){t===bn?ki.set(this,`Prisma.${this._getName()}`):ki.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return ki.get(this)}},lr=class extends Le{_getNamespace(){return"NullTypes"}},cr=class extends lr{#e};Oi(cr,"DbNull");var ur=class extends lr{#e};Oi(ur,"JsonNull");var pr=class extends lr{#e};Oi(pr,"AnyNull");var En={classes:{DbNull:cr,JsonNull:ur,AnyNull:pr},instances:{DbNull:new cr(bn),JsonNull:new ur(bn),AnyNull:new pr(bn)}};function Oi(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}c();u();p();m();d();l();var zs=": ",xn=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+zs.length}write(t){let r=new Ie(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(zs).write(this.value)}};var Di=class{arguments;errorMessages=[];constructor(t){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 At(e){return new Di(Ys(e))}function Ys(e){let t=new Pt;for(let[r,n]of Object.entries(e)){let i=new xn(r,Zs(n));t.addField(i)}return t}function Zs(e){if(typeof e=="string")return new re(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new re(String(e));if(typeof e=="bigint")return new re(`${e}n`);if(e===null)return new re("null");if(e===void 0)return new re("undefined");if(wt(e))return new re(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return y.isBuffer(e)?new re(`Buffer.alloc(${e.byteLength})`):new re(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=mn(e)?e.toISOString():"Invalid Date";return new re(`new Date("${t}")`)}return e instanceof Le?new re(`Prisma.${e._getName()}`):vt(e)?new re(`prisma.${qe(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?qp(e):typeof e=="object"?Ys(e):new re(Object.prototype.toString.call(e))}function qp(e){let t=new xt;for(let r of e)t.addItem(Zs(r));return t}function Pn(e,t){let r=t==="pretty"?js:hn,n=e.renderAllMessages(r),i=new bt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Tn({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=At(e);for(let R of t)fn(R,a,s);let{message:f,args:E}=Pn(a,r),A=dn({message:f,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:E});throw new ie(A,{clientVersion:o})}c();u();p();m();d();l();c();u();p();m();d();l();function ke(e){return e.replace(/^./,t=>t.toLowerCase())}c();u();p();m();d();l();function ea(e,t,r){let n=ke(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Bp({...e,...Xs(t.name,e,t.result.$allModels),...Xs(t.name,e,t.result[n])})}function Bp(e){let t=new Se,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 pn(e,n=>({...n,needs:r(n.name,new Set)}))}function Xs(e,t,r){return r?pn(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:jp(t,o,i)})):{}}function jp(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function ta(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 ra(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var vn=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new Se;modelExtensionsCache=new Se;queryCallbacksCache=new Se;clientExtensions=rr(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=rr(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>ea(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=ke(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()}},Rt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new vn(t))}isEmpty(){return this.head===void 0}append(t){return new e(new vn(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();u();p();m();d();l();var An=class{constructor(t){this.name=t}};function na(e){return e instanceof An}function ia(e){return new An(e)}c();u();p();m();d();l();c();u();p();m();d();l();var oa=Symbol(),mr=class{constructor(t){if(t!==oa)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Rn:t}},Rn=new mr(oa);function Oe(e){return e instanceof mr}var Qp={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},sa="explicitly `undefined` values are not allowed";function Cn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=Rt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:f,previewFeatures:E,globalOmit:A}){let R=new _i({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:f,previewFeatures:E,globalOmit:A});return{modelName:e,action:Qp[t],query:dr(r,R)}}function dr({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:la(r,n),selection:Hp(e,t,i,n)}}function Hp(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Kp(e,n)):Gp(n,t,r)}function Gp(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&Jp(n,t,e),Wp(n,r,e),n}function Jp(e,t,r){for(let[n,i]of Object.entries(t)){if(Oe(i))continue;let o=r.nestSelection(n);if(Mi(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=dr(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=dr(i,o)}}function Wp(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=ra(i,n);for(let[s,a]of Object.entries(o)){if(Oe(a))continue;Mi(a,r.nestSelection(s));let f=r.findField(s);n?.[s]&&!f||(e[s]=!a)}}function Kp(e,t){let r={},n=t.getComputedFields(),i=ta(e,n);for(let[o,s]of Object.entries(i)){if(Oe(s))continue;let a=t.nestSelection(o);Mi(s,a);let f=t.findField(o);if(!(n?.[o]&&!f)){if(s===!1||s===void 0||Oe(s)){r[o]=!1;continue}if(s===!0){f?.kind==="object"?r[o]=dr({},a):r[o]=!0;continue}r[o]=dr(s,a)}}return r}function aa(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(ht(e)){if(mn(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(na(e))return{$type:"Param",value:e.name};if(vt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return zp(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:y.from(r,n,i).toString("base64")}}if(Yp(e))return e.values;if(wt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Le){if(e!==En.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Zp(e))return e.toJSON();if(typeof e=="object")return la(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function la(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);Oe(i)||(i!==void 0?r[n]=aa(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:sa}))}return r}function zp(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[qe(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"updateManyAndReturn":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:Ne(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};c();u();p();m();d();l();function ca(e){if(!e._hasPreviewFlag("metrics"))throw new ie("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var Ct=class{_client;constructor(t){this._client=t}prometheus(t){return ca(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return ca(this._client),this._client._engine.metrics({format:"json",...t})}};c();u();p();m();d();l();function ua(e,t){let r=rr(()=>Xp(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Xp(e){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Ni(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}c();u();p();m();d();l();var Li=new WeakMap,Sn="$$PrismaTypedSql",fr=class{constructor(t,r){Li.set(this,{sql:t,values:r}),Object.defineProperty(this,Sn,{value:Sn})}get sql(){return Li.get(this).sql}get values(){return Li.get(this).values}};function pa(e){return(...t)=>new fr(e,t)}function In(e){return e!=null&&e[Sn]===Sn}c();u();p();m();d();l();var nu=Ae(xi());c();u();p();m();d();l();ma();gs();Es();c();u();p();m();d();l();var fe=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();u();p();m();d();l();c();u();p();m();d();l();var On={enumerable:!0,configurable:!0,writable:!0};function Dn(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>On,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var ga=Symbol.for("nodejs.util.inspect.custom");function Pe(e,t){let r=em(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=ya(Reflect.ownKeys(o),r),a=ya(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 f=r.get(s);return f?f.getPropertyDescriptor?{...On,...f?.getPropertyDescriptor(s)}:On:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[ga]=function(){let o={...this};return delete o[ga],o},i}function em(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 ya(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}c();u();p();m();d();l();function St(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}c();u();p();m();d();l();function It(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}c();u();p();m();d();l();function ha(e){if(e===void 0)return"";let t=At(e);return new bt(0,{colors:hn}).write(t).toString()}c();u();p();m();d();l();var tm="P2037";function _n({error:e,user_facing_error:t},r,n){return t.error_code?new X(rm(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 rm(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===tm&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var $i=class{getLocation(){return null}};function je(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new $i}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var wa={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function kt(e={}){let t=im(e);return Object.entries(t).reduce((n,[i,o])=>(wa[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function im(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Mn(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ba(e,t){let r=Mn(e);return t({action:"aggregate",unpacker:r,argsMapper:kt})(e)}c();u();p();m();d();l();function om(e={}){let{select:t,...r}=e;return typeof t=="object"?kt({...r,_count:t}):kt({...r,_count:{_all:!0}})}function sm(e={}){return typeof e.select=="object"?t=>Mn(e)(t)._count:t=>Mn(e)(t)._count._all}function Ea(e,t){return t({action:"count",unpacker:sm(e),argsMapper:om})(e)}c();u();p();m();d();l();function am(e={}){let t=kt(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 lm(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function xa(e,t){return t({action:"groupBy",unpacker:lm(e),argsMapper:am})(e)}function Pa(e,t,r){if(t==="aggregate")return n=>ba(n,r);if(t==="count")return n=>Ea(n,r);if(t==="groupBy")return n=>xa(n,r)}c();u();p();m();d();l();function Ta(e,t){let r=t.fields.filter(i=>!i.relationName),n=Ms(r,"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 ar(e,o,s.type,s.isList,s.kind==="enum")},...Dn(Object.keys(n))})}c();u();p();m();d();l();c();u();p();m();d();l();var va=e=>Array.isArray(e)?e:e.split("."),Vi=(e,t)=>va(t).reduce((r,n)=>r&&r[n],e),Aa=(e,t,r)=>va(t).reduceRight((n,i,o,s)=>Object.assign({},Vi(e,s.slice(0,o)),{[i]:n}),r);function cm(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function um(e,t,r){return t===void 0?e??{}:Aa(t,r,e||!0)}function qi(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((f,E)=>({...f,[E.name]:E}),{});return f=>{let E=je(e._errorFormat),A=cm(n,i),R=um(f,o,A),S=r({dataPath:A,callsite:E})(R),C=pm(e,t);return new Proxy(S,{get(L,k){if(!C.includes(k))return L[k];let _e=[a[k].type,r,k],pe=[A,R];return qi(e,..._e,...pe)},...Dn([...C,...Object.getOwnPropertyNames(S)])})}}function pm(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var mm=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],dm=["aggregate","count","groupBy"];function Bi(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[fm(e,t),ym(e,t),gr(r),ce("name",()=>t),ce("$name",()=>t),ce("$parent",()=>e._appliedParent)];return Pe({},n)}function fm(e,t){let r=ke(t),n=Object.keys(nr).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>f=>{let E=je(e._errorFormat);return e._createPrismaPromise(A=>{let R={args:f,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:A,callsite:E};return e._request({...R,...a})},{action:o,args:f,model:t})};return mm.includes(o)?qi(e,t,s):gm(i)?Pa(e,i,s):s({})}}}function gm(e){return dm.includes(e)}function ym(e,t){return et(ce("fields",()=>{let r=e._runtimeDataModel.models[t];return Ta(t,r)}))}c();u();p();m();d();l();function Ra(e){return e.replace(/^./,t=>t.toUpperCase())}var ji=Symbol();function yr(e){let t=[hm(e),wm(e),ce(ji,()=>e),ce("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(gr(r)),Pe(e,t)}function hm(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function wm(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(ke),n=[...new Set(t.concat(r))];return et({getKeys(){return n},getPropertyValue(i){let o=Ra(i);if(e._runtimeDataModel.models[o]!==void 0)return Bi(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Bi(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Ca(e){return e[ji]?e[ji]:e}function Sa(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},$on:{value:void 0}});return yr(t)}c();u();p();m();d();l();c();u();p();m();d();l();function Ia({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let f of Object.values(o)){if(n){if(n[f.name])continue;let E=f.needs.filter(A=>n[A]);E.length>0&&a.push(St(E))}else if(r){if(!r[f.name])continue;let E=f.needs.filter(A=>!r[A]);E.length>0&&a.push(St(E))}bm(e,f.needs)&&s.push(Em(f,Pe(e,s)))}return s.length>0||a.length>0?Pe(e,[...s,...a]):e}function bm(e,t){return t.every(r=>Ai(e,r))}function Em(e,t){return et(ce(e.name,()=>e.compute(t)))}c();u();p();m();d();l();function Nn({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sA.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let E=typeof s=="object"?s:{};t[o]=Nn({visitor:i,result:t[o],args:E,modelName:f.type,runtimeDataModel:n})}}function Oa({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Nn({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,f,E)=>{let A=ke(f);return Ia({result:a,modelName:A,select:E.select,omit:E.select?void 0:{...o?.[A],...E.omit},extensions:n})}})}c();u();p();m();d();l();c();u();p();m();d();l();l();c();u();p();m();d();l();var xm=["$connect","$disconnect","$on","$transaction","$extends"],Da=xm;function _a(e){if(e instanceof fe)return Pm(e);if(In(e))return Tm(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:_a(t.args??{}),__internalParams:t,query:(s,a=t)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=$a(o,f),a.args=s,Na(e,a,r,n+1)}})})}function La(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 Na(e,t,s)}function Ua(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Fa(r,n,0,e):e(r)}}function Fa(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 f=a.customDataProxyFetch;return a.customDataProxyFetch=$a(i,f),Fa(a,t,r+1,n)}})}var Ma=e=>e;function $a(e=Ma,t=Ma){return r=>e(t(r))}c();u();p();m();d();l();var Va=K("prisma:client"),qa={Vercel:"vercel","Netlify CI":"netlify"};function Ba({postinstall:e,ciName:t,clientVersion:r}){if(Va("checkPlatformCaching:postinstall",e),Va("checkPlatformCaching:ciName",t),e===!0&&t&&t in qa){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 F(n,r)}}u();c();p();m();d();l();function Ha(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}u();c();p();m();d();l();u();c();p();m();d();l();var Om=()=>globalThis.process?.release?.name==="node",Dm=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,_m=()=>!!globalThis.Deno,Mm=()=>typeof globalThis.Netlify=="object",Nm=()=>typeof globalThis.EdgeRuntime=="object",Lm=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Um(){return[[Mm,"netlify"],[Nm,"edge-light"],[Lm,"workerd"],[_m,"deno"],[Dm,"bun"],[Om,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Fm={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 Ot(){let e=Um();return{id:e,prettyName:Fm[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}u();c();p();m();d();l();u();c();p();m();d();l();var Hi=Ae(Ai());u();c();p();m();d();l();function Ga(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}u();c();p();m();d();l();function Ja(e){return e.split(` +Learn how: https://pris.ly/d/${qa[t]}-build`;throw console.error(n),new F(n,r)}}c();u();p();m();d();l();function ja(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}c();u();p();m();d();l();c();u();p();m();d();l();var vm=()=>globalThis.process?.release?.name==="node",Am=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Rm=()=>!!globalThis.Deno,Cm=()=>typeof globalThis.Netlify=="object",Sm=()=>typeof globalThis.EdgeRuntime=="object",Im=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function km(){return[[Cm,"netlify"],[Sm,"edge-light"],[Im,"workerd"],[Rm,"deno"],[Am,"bun"],[vm,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Om={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 Ot(){let e=km();return{id:e,prettyName:Om[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}c();u();p();m();d();l();c();u();p();m();d();l();var Qi=Ae(vi());c();u();p();m();d();l();function Qa(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}c();u();p();m();d();l();function Ha(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(` -`)}u();c();p();m();d();l();var Wa=Ae(_s());function Ka({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,Wa.default)({user:t,repo:r,template:n,title:e,body:i})}function za({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=fs(6e3-(s?.length??0)),f=Ja((0,Hi.default)(a)),w=n?`# Description +`)}c();u();p();m();d();l();var Ga=Ae(Os());function Ja({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,Ga.default)({user:t,repo:r,template:n,title:e,body:i})}function Wa({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=ms(6e3-(s?.length??0)),f=Ha((0,Qi.default)(a)),E=n?`# Description \`\`\` ${n} -\`\`\``:"",A=(0,Hi.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: +\`\`\``:"",A=(0,Qi.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: ## Versions | Name | Version | @@ -25,7 +25,7 @@ ${n} | Query Engine | ${i?.padEnd(19)}| | Database | ${o?.padEnd(19)}| -${w} +${E} ## Logs \`\`\` @@ -44,40 +44,40 @@ ${f} ## Prisma Engine Query \`\`\` -${s?Ga(s):""} +${s?Qa(s):""} \`\`\` -`),C=Ka({title:r,body:A});return`${r} +`),R=Ja({title:r,body:A});return`${r} This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. -${tn(C)} +${tn(R)} 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. -`}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();l();u();c();p();m();d();l();l();function $(e,t){throw new Error(t)}function Gi(e,t){return e===t||e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>Gi(e[r],t[r]))}function Dt(e,t){let r=Object.keys(e),n=Object.keys(t);return(r.length{if(typeof e[o]==typeof t[o]&&typeof e[o]!="object")return e[o]===t[o];if(ae.isDecimal(e[o])||ae.isDecimal(t[o])){let s=Ya(e[o]),a=Ya(t[o]);return s&&a&&s.equals(a)}else if(e[o]instanceof Uint8Array||t[o]instanceof Uint8Array){let s=Za(e[o]),a=Za(t[o]);return s&&a&&s.equals(a)}else{if(e[o]instanceof Date||t[o]instanceof Date)return Xa(e[o])?.getTime()===Xa(t[o])?.getTime();if(typeof e[o]=="bigint"||typeof t[o]=="bigint")return el(e[o])===el(t[o]);if(typeof e[o]=="number"||typeof t[o]=="number")return tl(e[o])===tl(t[o])}return Gi(e[o],t[o])})}function Ya(e){return ae.isDecimal(e)?e:typeof e=="number"||typeof e=="string"?new ae(e):void 0}function Za(e){return y.isBuffer(e)?e:e instanceof Uint8Array?y.from(e.buffer,e.byteOffset,e.byteLength):typeof e=="string"?y.from(e,"base64"):void 0}function Xa(e){return e instanceof Date?e:typeof e=="string"||typeof e=="number"?new Date(e):void 0}function el(e){return typeof e=="bigint"?e:typeof e=="number"||typeof e=="string"?BigInt(e):void 0}function tl(e){return typeof e=="number"?e:typeof e=="string"?Number(e):void 0}function wr(e){return JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r instanceof Uint8Array?y.from(r).toString("base64"):r)}function Vm(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function $m(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function Qe(e){return e===null?e:Array.isArray(e)?e.map(Qe):typeof e=="object"?Vm(e)?qm(e):e.constructor!==null&&e.constructor.name!=="Object"?e:$m(e,Qe):e}function qm({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=y.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new v(t);case"Json":return JSON.parse(t);default:$(t,"Unknown tagged value")}}u();c();p();m();d();l();var ce=class extends Error{name="UserFacingError";code;meta;constructor(t,r,n){super(t),this.code=r,this.meta=n??{}}toQueryResponseErrorObject(){return{error:this.message,user_facing_error:{is_panic:!1,message:this.message,meta:this.meta,error_code:this.code}}}};function _t(e){if(!nn(e))throw e;let t=Bm(e),r=rl(e);throw!t||!r?e:new ce(r,t,{driverAdapterError:e})}function Wi(e){throw nn(e)?new ce(`Raw query failed. Code: \`${e.cause.originalCode??"N/A"}\`. Message: \`${e.cause.originalMessage??rl(e)}\``,"P2010",{driverAdapterError:e}):e}function Bm(e){switch(e.cause.kind){case"AuthenticationFailed":return"P1000";case"DatabaseNotReachable":return"P1001";case"DatabaseDoesNotExist":return"P1003";case"SocketTimeout":return"P1008";case"DatabaseAlreadyExists":return"P1009";case"DatabaseAccessDenied":return"P1010";case"TlsConnectionError":return"P1011";case"ConnectionClosed":return"P1017";case"TransactionAlreadyClosed":return"P1018";case"LengthMismatch":return"P2000";case"UniqueConstraintViolation":return"P2002";case"ForeignKeyConstraintViolation":return"P2003";case"UnsupportedNativeDataType":return"P2010";case"NullConstraintViolation":return"P2011";case"ValueOutOfRange":return"P2020";case"TableDoesNotExist":return"P2021";case"ColumnNotFound":return"P2022";case"InvalidIsolationLevel":case"InconsistentColumnData":return"P2023";case"MissingFullTextSearchIndex":return"P2030";case"TransactionWriteConflict":return"P2034";case"GenericJs":return"P2036";case"TooManyConnections":return"P2037";case"postgres":case"sqlite":case"mysql":case"mssql":return;default:$(e.cause,`Unknown error: ${e.cause}`)}}function rl(e){switch(e.cause.kind){case"AuthenticationFailed":return`Authentication failed against the database server, the provided database credentials for \`${e.cause.user??"(not available)"}\` are not valid`;case"DatabaseNotReachable":{let t=e.cause.host&&e.cause.port?`${e.cause.host}:${e.cause.port}`:e.cause.host;return`Can't reach database server${t?` at ${t}`:""}`}case"DatabaseDoesNotExist":return`Database \`${e.cause.db??"(not available)"}\` does not exist on the database server`;case"SocketTimeout":return"Operation has timed out";case"DatabaseAlreadyExists":return`Database \`${e.cause.db??"(not available)"}\` already exists on the database server`;case"DatabaseAccessDenied":return`User was denied access on the database \`${e.cause.db??"(not available)"}\``;case"TlsConnectionError":return`Error opening a TLS connection: ${e.cause.reason}`;case"ConnectionClosed":return"Server has closed the connection.";case"TransactionAlreadyClosed":return e.cause.cause;case"LengthMismatch":return`The provided value for the column is too long for the column's type. Column: ${e.cause.column??"(not available)"}`;case"UniqueConstraintViolation":return`Unique constraint failed on the ${Ji(e.cause.constraint)}`;case"ForeignKeyConstraintViolation":return`Foreign key constraint violated on the ${Ji(e.cause.constraint)}`;case"UnsupportedNativeDataType":return`Failed to deserialize column of type '${e.cause.type}'. If you're using $queryRaw and this column is explicitly marked as \`Unsupported\` in your Prisma schema, try casting this column to any supported Prisma type such as \`String\`.`;case"NullConstraintViolation":return`Null constraint violation on the ${Ji(e.cause.constraint)}`;case"ValueOutOfRange":return`Value out of range for the type: ${e.cause.cause}`;case"TableDoesNotExist":return`The table \`${e.cause.table??"(not available)"}\` does not exist in the current database.`;case"ColumnNotFound":return`The column \`${e.cause.column??"(not available)"}\` does not exist in the current database.`;case"InvalidIsolationLevel":return`Error in connector: Conversion error: ${e.cause.level}`;case"InconsistentColumnData":return`Inconsistent column data: ${e.cause.cause}`;case"MissingFullTextSearchIndex":return"Cannot find a fulltext index to use for the native search, try adding a @@fulltext([Fields...]) to your schema";case"TransactionWriteConflict":return"Transaction failed due to a write conflict or a deadlock. Please retry your transaction";case"GenericJs":return`Error in external connector (id ${e.cause.id})`;case"TooManyConnections":return`Too many database connections opened: ${e.cause.cause}`;case"sqlite":case"postgres":case"mysql":case"mssql":return;default:$(e.cause,`Unknown error: ${e.cause}`)}}function Ji(e){return e&&"fields"in e?`fields: (${e.fields.map(t=>`\`${t}\``).join(", ")})`:e&&"index"in e?`constraint: \`${e.index}\``:e&&"foreignKey"in e?"foreign key":"(not available)"}function nl(e,t){let r=e.map(i=>t.keys.reduce((o,s)=>(o[s]=Qe(i[s]),o),{})),n=new Set(t.nestedSelection);return t.arguments.map(i=>{let o=r.findIndex(s=>Dt(s,i));if(o===-1)return t.expectNonEmpty?new ce("An operation failed because it depends on one or more records that were required but not found","P2025"):null;{let s=Object.entries(e[o]).filter(([a])=>n.has(a));return Object.fromEntries(s)}})}u();c();p();m();d();l();l();var W=class extends Error{name="DataMapperError"};function sl(e,t,r){switch(t.type){case"AffectedRows":if(typeof e!="number")throw new W(`Expected an affected rows count, got: ${typeof e} (${e})`);return{count:e};case"Object":return Ki(e,t.fields,r,t.skipNulls);case"Value":return zi(e,"",t.resultType,r);default:$(t,`Invalid data mapping type: '${t.type}'`)}}function Ki(e,t,r,n){if(e===null)return null;if(Array.isArray(e)){let i=e;return n&&(i=i.filter(o=>o!==null)),i.map(o=>il(o,t,r))}if(typeof e=="object")return il(e,t,r);if(typeof e=="string"){let i;try{i=JSON.parse(e)}catch(o){throw new W("Expected an array or object, got a string that is not valid JSON",{cause:o})}return Ki(i,t,r,n)}throw new W(`Expected an array or an object, got: ${typeof e}`)}function il(e,t,r){if(typeof e!="object")throw new W(`Expected an object, but got '${typeof e}'`);let n={};for(let[i,o]of Object.entries(t))switch(o.type){case"AffectedRows":throw new W(`Unexpected 'AffectedRows' node in data mapping for field '${i}'`);case"Object":{if(o.serializedName!==null&&!Object.hasOwn(e,o.serializedName))throw new W(`Missing data field (Object): '${i}'; node: ${JSON.stringify(o)}; data: ${JSON.stringify(e)}`);let s=o.serializedName!==null?e[o.serializedName]:e;n[i]=Ki(s,o.fields,r,o.skipNulls);break}case"Value":{let s=o.dbName;if(Object.hasOwn(e,s))n[i]=zi(e[s],s,o.resultType,r);else throw new W(`Missing data field (Value): '${s}'; node: ${JSON.stringify(o)}; data: ${JSON.stringify(e)}`)}break;default:$(o,`DataMapper: Invalid data mapping node type: '${o.type}'`)}return n}function zi(e,t,r,n){if(e===null)return r.type==="Array"?[]:null;switch(r.type){case"Any":return e;case"String":{if(typeof e!="string")throw new W(`Expected a string in column '${t}', got ${typeof e}: ${e}`);return e}case"Int":switch(typeof e){case"number":return Math.trunc(e);case"string":{let i=Math.trunc(Number(e));if(Number.isNaN(i)||!Number.isFinite(i))throw new W(`Expected an integer in column '${t}', got string: ${e}`);if(!Number.isSafeInteger(i))throw new W(`Integer value in column '${t}' is too large to represent as a JavaScript number without loss of precision, got: ${e}. Consider using BigInt type.`);return i}default:throw new W(`Expected an integer in column '${t}', got ${typeof e}: ${e}`)}case"BigInt":{if(typeof e!="number"&&typeof e!="string")throw new W(`Expected a bigint in column '${t}', got ${typeof e}: ${e}`);return{$type:"BigInt",value:e}}case"Float":{if(typeof e=="number")return e;if(typeof e=="string"){let i=Number(e);if(Number.isNaN(i)&&!/^[-+]?nan$/.test(e.toLowerCase()))throw new W(`Expected a float in column '${t}', got string: ${e}`);return i}throw new W(`Expected a float in column '${t}', got ${typeof e}: ${e}`)}case"Boolean":{if(typeof e=="boolean")return e;if(typeof e=="number")return e===1;if(typeof e=="string"){if(e==="true"||e==="TRUE"||e==="1")return!0;if(e==="false"||e==="FALSE"||e==="0")return!1;throw new W(`Expected a boolean in column '${t}', got ${typeof e}: ${e}`)}if(e instanceof Uint8Array){for(let i of e)if(i!==0)return!0;return!1}throw new W(`Expected a boolean in column '${t}', got ${typeof e}: ${e}`)}case"Decimal":if(typeof e!="number"&&typeof e!="string"&&!ae.isDecimal(e))throw new W(`Expected a decimal in column '${t}', got ${typeof e}: ${e}`);return{$type:"Decimal",value:e};case"Date":{if(typeof e=="string")return{$type:"DateTime",value:ol(e)};if(typeof e=="number"||e instanceof Date)return{$type:"DateTime",value:e};throw new W(`Expected a date in column '${t}', got ${typeof e}: ${e}`)}case"Time":{if(typeof e=="string")return{$type:"DateTime",value:`1970-01-01T${ol(e)}`};throw new W(`Expected a time in column '${t}', got ${typeof e}: ${e}`)}case"Array":return e.map((o,s)=>zi(o,`${t}[${s}]`,r.inner,n));case"Object":return{$type:"Json",value:wr(e)};case"Json":return{$type:"Json",value:`${e}`};case"Bytes":{if(typeof e=="string"&&e.startsWith("\\x"))return{$type:"Bytes",value:y.from(e.slice(2),"hex").toString("base64")};if(Array.isArray(e))return{$type:"Bytes",value:y.from(e).toString("base64")};if(e instanceof Uint8Array)return{$type:"Bytes",value:y.from(e).toString("base64")};throw new W(`Expected a byte array in column '${t}', got ${typeof e}: ${e}`)}case"Enum":{let i=n[r.inner];if(i===void 0)throw new W(`Unknown enum '${r.inner}'`);let o=i[`${e}`];if(o===void 0)throw new W(`Value '${e}' not found in enum '${r.inner}'`);return o}default:$(r,`DataMapper: Unknown result type: ${r.type}`)}}var jm=/Z$|(?{let o=new Date,s=b.now(),a=await i(),f=b.now();return n?.({timestamp:o,duration:f-s,query:e.sql,params:e.args}),a})}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();function tt(e,t){var r="000000000"+e;return r.substr(r.length-t)}var al=Ae(ws(),1);function Hm(){try{return al.default.hostname()}catch{return g.env._CLUSTER_NETWORK_NAME_||g.env.COMPUTERNAME||"hostname"}}var ll=2,Gm=tt(g.pid.toString(36),ll),ul=Hm(),Jm=ul.length,Wm=tt(ul.split("").reduce(function(e,t){return+e+t.charCodeAt(0)},+Jm+36).toString(36),ll);function Yi(){return Gm+Wm}u();c();p();m();d();l();u();c();p();m();d();l();function Un(e){return typeof e=="string"&&/^c[a-z0-9]{20,32}$/.test(e)}function Zi(e){let n=Math.pow(36,4),i=0;function o(){return tt((Math.random()*n<<0).toString(36),4)}function s(){return i=int.length&&(Zt.getRandomValues(nt),Lt=0),Lt+=e}function ao(e=21){Ld(e|=0);let t="";for(let r=Lt-e;r{let n=new Uint8Array(1);return r.getRandomValues(n),n[0]/255};if(typeof r?.randomBytes=="function")return()=>r.randomBytes(1).readUInt8()/255;if(yt?.randomBytes)return()=>yt.randomBytes(1).readUInt8()/255;throw new ot(it.PRNGDetectFailure,"Failed to find a reliable PRNG")}function $d(){return jd()?self:typeof window<"u"?window:typeof globalThis<"u"||typeof globalThis<"u"?globalThis:null}function qd(e,t){let r="";for(;e>0;e--)r=Fd(t)+r;return r}function Bd(e,t=iu){if(isNaN(e))throw new ot(it.EncodeTimeValueMalformed,`Time must be a number: ${e}`);if(e>ru)throw new ot(it.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${ru}: ${e}`);if(e<0)throw new ot(it.EncodeTimeNegative,`Time must be positive: ${e}`);if(Number.isInteger(e)===!1)throw new ot(it.EncodeTimeValueMalformed,`Time must be an integer: ${e}`);let r,n="";for(let i=t;i>0;i--)r=e%Ar,n=nu.charAt(r)+n,e=(e-r)/Ar;return n}function jd(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function ou(e,t){let r=t||Vd(),n=!e||isNaN(e)?Date.now():e;return Bd(n,iu)+qd(Ud,r)}u();c();p();m();d();l();u();c();p();m();d();l();var oe=[];for(let e=0;e<256;++e)oe.push((e+256).toString(16).slice(1));function qn(e,t=0){return(oe[e[t+0]]+oe[e[t+1]]+oe[e[t+2]]+oe[e[t+3]]+"-"+oe[e[t+4]]+oe[e[t+5]]+"-"+oe[e[t+6]]+oe[e[t+7]]+"-"+oe[e[t+8]]+oe[e[t+9]]+"-"+oe[e[t+10]]+oe[e[t+11]]+oe[e[t+12]]+oe[e[t+13]]+oe[e[t+14]]+oe[e[t+15]]).toLowerCase()}u();c();p();m();d();l();Xe();var jn=new Uint8Array(256),Bn=jn.length;function Ut(){return Bn>jn.length-16&&(sn(jn),Bn=0),jn.slice(Bn,Bn+=16)}u();c();p();m();d();l();u();c();p();m();d();l();Xe();var lo={randomUUID:on};function Qd(e,t,r){if(lo.randomUUID&&!t&&!e)return lo.randomUUID();e=e||{};let n=e.random??e.rng?.()??Ut();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let i=0;i<16;++i)t[r+i]=n[i];return t}return qn(n)}var uo=Qd;u();c();p();m();d();l();var co={};function Hd(e,t,r){let n;if(e)n=su(e.random??e.rng?.()??Ut(),e.msecs,e.seq,t,r);else{let i=Date.now(),o=Ut();Gd(co,i,o),n=su(o,co.msecs,co.seq,t,r)}return t??qn(n)}function Gd(e,t,r){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function su(e,t,r,n,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(!n)n=new Uint8Array(16),i=0;else if(i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),r??=e[6]*127<<24|e[7]<<16|e[8]<<8|e[9],n[i++]=t/1099511627776&255,n[i++]=t/4294967296&255,n[i++]=t/16777216&255,n[i++]=t/65536&255,n[i++]=t/256&255,n[i++]=t&255,n[i++]=112|r>>>28&15,n[i++]=r>>>20&255,n[i++]=128|r>>>14&63,n[i++]=r>>>6&255,n[i++]=r<<2&255|e[10]&3,n[i++]=e[11],n[i++]=e[12],n[i++]=e[13],n[i++]=e[14],n[i++]=e[15],n}var po=Hd;var Qn=class{#e={};constructor(){this.register("uuid",new go),this.register("cuid",new yo),this.register("ulid",new ho),this.register("nanoid",new wo),this.register("product",new bo)}snapshot(t){return Object.create(this.#e,{now:{value:t==="mysql"?new fo:new mo}})}register(t,r){this.#e[t]=r}},mo=class{#e=new Date;generate(){return this.#e.toISOString()}},fo=class{#e=new Date;generate(){return this.#e.toISOString().replace("T"," ").replace("Z","")}},go=class{generate(t){if(t===4)return uo();if(t===7)return po();throw new Error("Invalid UUID generator arguments")}},yo=class{generate(t){if(t===1)return cl();if(t===2)return(0,au.createId)();throw new Error("Invalid CUID generator arguments")}},ho=class{generate(){return ou()}},wo=class{generate(t){if(typeof t=="number")return ao(t);if(t===void 0)return ao();throw new Error("Invalid Nanoid generator arguments")}},bo=class{generate(t,r){if(t===void 0||r===void 0)throw new Error("Invalid Product generator arguments");return Array.isArray(t)&&Array.isArray(r)?t.flatMap(n=>r.map(i=>[n,i])):Array.isArray(t)?t.map(n=>[n,r]):Array.isArray(r)?r.map(n=>[t,n]):[[t,r]]}};u();c();p();m();d();l();function Hn(e,t){return e==null?e:typeof e=="string"?Hn(JSON.parse(e),t):Array.isArray(e)?Wd(e,t):Jd(e,t)}function Jd(e,t){if(t.pagination){let{skip:r,take:n,cursor:i}=t.pagination;if(r!==null&&r>0||n===0||i!==null&&!Dt(e,i))return null}return uu(e,t.nested)}function uu(e,t){for(let[r,n]of Object.entries(t))e[r]=Hn(e[r],n);return e}function Wd(e,t){if(t.distinct!==null){let r=t.linkingFields!==null?[...t.distinct,...t.linkingFields]:t.distinct;e=Kd(e,r)}return t.pagination&&(e=zd(e,t.pagination,t.linkingFields)),t.reverse&&e.reverse(),Object.keys(t.nested).length===0?e:e.map(r=>uu(r,t.nested))}function Kd(e,t){let r=new Set,n=[];for(let i of e){let o=Cr(i,t);r.has(o)||(r.add(o),n.push(i))}return n}function zd(e,t,r){if(r===null)return lu(e,t);let n=new Map;for(let o of e){let s=Cr(o,r);n.has(s)||n.set(s,[]),n.get(s).push(o)}let i=Array.from(n.entries());return i.sort(([o],[s])=>os?1:0),i.flatMap(([,o])=>lu(o,t))}function lu(e,{cursor:t,skip:r,take:n}){let i=t!==null?e.findIndex(a=>Dt(a,t)):0;if(i===-1)return[];let o=i+(r??0),s=n!==null?o+n:e.length;return e.slice(o,s)}function Cr(e,t){return JSON.stringify(t.map(r=>e[r]))}u();c();p();m();d();l();u();c();p();m();d();l();function Eo(e){return typeof e=="object"&&e!==null&&e.prisma__type==="param"}function xo(e){return typeof e=="object"&&e!==null&&e.prisma__type==="generatorCall"}function cu(e){return typeof e=="object"&&e!==null&&e.prisma__type==="bytes"}function pu(e){return typeof e=="object"&&e!==null&&e.prisma__type==="bigint"}function vo(e,t,r,n){let i=e.type,o=mu(e.params,t,r);switch(i){case"rawSql":return[du(e.sql,mu(e.params,t,r))];case"templateSql":return(e.chunkable?tf(e.fragments,o,n):[o]).map(a=>{if(n!==void 0&&a.length>n)throw new ce("The query parameter limit supported by your database is exceeded.","P2029");return Yd(e.fragments,e.placeholderFormat,a)});default:$(i,"Invalid query type")}}function mu(e,t,r){return e.map(n=>Te(n,t,r))}function Te(e,t,r){let n=e;for(;ef(n);)if(Eo(n)){let i=t[n.prisma__value.name];if(i===void 0)throw new Error(`Missing value for query variable ${n.prisma__value.name}`);n=i}else if(xo(n)){let{name:i,args:o}=n.prisma__value,s=r[i];if(!s)throw new Error(`Encountered an unknown generator '${i}'`);n=s.generate(...o.map(a=>Te(a,t,r)))}else $(n,`Unexpected unevaluated value type: ${n}`);return Array.isArray(n)?n=n.map(i=>Te(i,t,r)):cu(n)?n=y.from(n.prisma__value,"base64"):pu(n)&&(n=BigInt(n.prisma__value)),n}function Yd(e,t,r){let n="",i={placeholderNumber:1},o=[];for(let s of To(e,r))o.push(...fu(s)),n+=Zd(s,t,i);return du(n,o)}function Zd(e,t,r){let n=e.type;switch(n){case"parameter":return Po(t,r.placeholderNumber++);case"stringChunk":return e.chunk;case"parameterTuple":return`(${e.value.length==0?"NULL":e.value.map(()=>Po(t,r.placeholderNumber++)).join(",")})`;case"parameterTupleList":return e.value.map(i=>{let o=i.map(()=>Po(t,r.placeholderNumber++)).join(e.itemSeparator);return`${e.itemPrefix}${o}${e.itemSuffix}`}).join(e.groupSeparator);default:$(n,"Invalid fragment type")}}function Po(e,t){return e.hasNumbering?`${e.prefix}${t}`:e.prefix}function du(e,t){let r=t.map(n=>Xd(n));return{sql:e,args:t,argTypes:r}}function Xd(e){return typeof e=="string"?"Text":typeof e=="number"?"Numeric":typeof e=="boolean"?"Boolean":Array.isArray(e)?"Array":y.isBuffer(e)?"Bytes":"Unknown"}function ef(e){return Eo(e)||xo(e)}function*To(e,t){let r=0;for(let n of e)switch(n.type){case"parameter":{if(r>=t.length)throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`);yield{...n,value:t[r++]};break}case"stringChunk":{yield n;break}case"parameterTuple":{if(r>=t.length)throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`);let i=t[r++];yield{...n,value:Array.isArray(i)?i:[i]};break}case"parameterTupleList":{if(r>=t.length)throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`);let i=t[r++];if(!Array.isArray(i))throw new Error("Malformed query template. Tuple list expected.");if(i.length===0)throw new Error("Malformed query template. Tuple list cannot be empty.");for(let o of i)if(!Array.isArray(o))throw new Error("Malformed query template. Tuple expected.");yield{...n,value:i};break}}}function*fu(e){switch(e.type){case"parameter":yield e.value;break;case"stringChunk":break;case"parameterTuple":yield*e.value;break;case"parameterTupleList":for(let t of e.value)yield*t;break}}function tf(e,t,r){let n=0,i=0;for(let s of To(e,t)){let a=0;for(let f of fu(s))a++;i=Math.max(i,a),n+=a}let o=[[]];for(let s of To(e,t))switch(s.type){case"parameter":{for(let a of o)a.push(s.value);break}case"stringChunk":break;case"parameterTuple":{let a=s.value.length,f=[];if(r&&o.length===1&&a===i&&n>r&&n-af.map(A=>[...w,A]));break}case"parameterTupleList":{let a=s.value.reduce((C,I)=>C+I.length,0),f=[],w=[],A=0;for(let C of s.value)r&&o.length===1&&a===i&&w.length>0&&n-a+A+C.length>r&&(f.push(w),w=[],A=0),w.push(C),A+=C.length;w.length>0&&f.push(w),o=o.flatMap(C=>f.map(I=>[...C,I]));break}}return o}function rf(e,t){let r=[];for(let n=0;n{switch(r){case O.Bytes:return n=>Array.isArray(n)?new Uint8Array(n):n;default:return n=>n}});return e.rows.map(r=>r.map((n,i)=>t[i](n)).reduce((n,i,o)=>{let s=e.columnNames[o].split("."),a=n;for(let f=0;fnf(t)),rows:e.rows.map(t=>t.map((r,n)=>Ft(r,e.columnTypes[n])))}}function Ft(e,t){if(e===null)return null;switch(t){case O.Int32:switch(typeof e){case"number":return Math.trunc(e);case"string":return Math.trunc(Number(e));default:throw new Error(`Cannot serialize value of type ${typeof e} as Int32`)}case O.Int32Array:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as Int32Array`);return e.map(r=>Ft(r,O.Int32));case O.Int64:switch(typeof e){case"number":return BigInt(Math.trunc(e));case"string":return e;default:throw new Error(`Cannot serialize value of type ${typeof e} as Int64`)}case O.Int64Array:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as Int64Array`);return e.map(r=>Ft(r,O.Int64));case O.Json:switch(typeof e){case"string":return JSON.parse(e);default:throw new Error(`Cannot serialize value of type ${typeof e} as Json`)}case O.JsonArray:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as JsonArray`);return e.map(r=>Ft(r,O.Json));case O.Bytes:if(Array.isArray(e))return new Uint8Array(e);throw new Error(`Cannot serialize value of type ${typeof e} as Bytes`);case O.BytesArray:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as BytesArray`);return e.map(r=>Ft(r,O.Bytes));case O.Boolean:switch(typeof e){case"boolean":return e;case"string":return e==="true"||e==="1";case"number":return e===1;default:throw new Error(`Cannot serialize value of type ${typeof e} as Boolean`)}case O.BooleanArray:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as BooleanArray`);return e.map(r=>Ft(r,O.Boolean));default:return e}}function nf(e){switch(e){case O.Int32:return"int";case O.Int64:return"bigint";case O.Float:return"float";case O.Double:return"double";case O.Text:return"string";case O.Enum:return"enum";case O.Bytes:return"bytes";case O.Boolean:return"bool";case O.Character:return"char";case O.Numeric:return"decimal";case O.Json:return"json";case O.Uuid:return"uuid";case O.DateTime:return"datetime";case O.Date:return"date";case O.Time:return"time";case O.Int32Array:return"int-array";case O.Int64Array:return"bigint-array";case O.FloatArray:return"float-array";case O.DoubleArray:return"double-array";case O.TextArray:return"string-array";case O.EnumArray:return"string-array";case O.BytesArray:return"bytes-array";case O.BooleanArray:return"bool-array";case O.CharacterArray:return"char-array";case O.NumericArray:return"decimal-array";case O.JsonArray:return"json-array";case O.UuidArray:return"uuid-array";case O.DateTimeArray:return"datetime-array";case O.DateArray:return"date-array";case O.TimeArray:return"time-array";case O.UnknownNumber:return"unknown";case O.Set:return"string";default:$(e,`Unexpected column type: ${e}`)}}u();c();p();m();d();l();function hu(e,t,r){if(!t.every(n=>Ao(e,n))){let n=of(e,r),i=sf(r);throw new ce(n,i,r.context)}}function Ao(e,t){switch(t.type){case"rowCountEq":return Array.isArray(e)?e.length===t.args:e===null?t.args===0:t.args===1;case"rowCountNeq":return Array.isArray(e)?e.length!==t.args:e===null?t.args!==0:t.args!==1;case"affectedRowCountEq":return e===t.args;case"never":return!1;default:$(t,`Unknown rule type: ${t.type}`)}}function of(e,t){switch(t.error_identifier){case"RELATION_VIOLATION":return`The change you are trying to make would violate the required relation '${t.context.relation}' between the \`${t.context.modelA}\` and \`${t.context.modelB}\` models.`;case"MISSING_RECORD":return`An operation failed because it depends on one or more records that were required but not found. No record was found for ${t.context.operation}.`;case"MISSING_RELATED_RECORD":{let r=t.context.neededFor?` (needed to ${t.context.neededFor})`:"";return`An operation failed because it depends on one or more records that were required but not found. No '${t.context.model}' record${r} was found for ${t.context.operation} on ${t.context.relationType} relation '${t.context.relation}'.`}case"INCOMPLETE_CONNECT_INPUT":return`An operation failed because it depends on one or more records that were required but not found. Expected ${t.context.expectedRows} records to be connected, found only ${Array.isArray(e)?e.length:e}.`;case"INCOMPLETE_CONNECT_OUTPUT":return`The required connected records were not found. Expected ${t.context.expectedRows} records to be connected after connect operation on ${t.context.relationType} relation '${t.context.relation}', found ${Array.isArray(e)?e.length:e}.`;case"RECORDS_NOT_CONNECTED":return`The records for relation \`${t.context.relation}\` between the \`${t.context.parent}\` and \`${t.context.child}\` models are not connected.`;default:$(t,`Unknown error identifier: ${t}`)}}function sf(e){switch(e.error_identifier){case"RELATION_VIOLATION":return"P2014";case"RECORDS_NOT_CONNECTED":return"P2017";case"INCOMPLETE_CONNECT_OUTPUT":return"P2018";case"MISSING_RECORD":case"MISSING_RELATED_RECORD":case"INCOMPLETE_CONNECT_INPUT":return"P2025";default:$(e,`Unknown error identifier: ${e}`)}}var Rr=class e{#e;#t;#r;#n=new Qn;#o;#i;#u;#s;#l;constructor({transactionManager:t,placeholderValues:r,onQuery:n,tracingHelper:i,serializer:o,rawSerializer:s,provider:a,connectionInfo:f}){this.#e=t,this.#t=r,this.#r=n,this.#o=i,this.#i=o,this.#u=s??o,this.#s=a,this.#l=f}static forSql(t){return new e({transactionManager:t.transactionManager,placeholderValues:t.placeholderValues,onQuery:t.onQuery,tracingHelper:t.tracingHelper,serializer:gu,rawSerializer:yu,provider:t.provider,connectionInfo:t.connectionInfo})}async run(t,r){let{value:n}=await this.interpretNode(t,r,this.#t,this.#n.snapshot(r.provider)).catch(i=>_t(i));return n}async interpretNode(t,r,n,i){switch(t.type){case"value":return{value:Te(t.args,n,i)};case"seq":{let o;for(let s of t.args)o=await this.interpretNode(s,r,n,i);return o??{value:void 0}}case"get":return{value:n[t.args.name]};case"let":{let o=Object.create(n);for(let s of t.args.bindings){let{value:a}=await this.interpretNode(s.expr,r,o,i);o[s.name]=a}return this.interpretNode(t.args.expr,r,o,i)}case"getFirstNonEmpty":{for(let o of t.args.names){let s=n[o];if(!wu(s))return{value:s}}return{value:[]}}case"concat":{let o=await Promise.all(t.args.map(s=>this.interpretNode(s,r,n,i).then(a=>a.value)));return{value:o.length>0?o.reduce((s,a)=>s.concat(Co(a)),[]):[]}}case"sum":{let o=await Promise.all(t.args.map(s=>this.interpretNode(s,r,n,i).then(a=>a.value)));return{value:o.length>0?o.reduce((s,a)=>De(s)+De(a)):0}}case"execute":{let o=vo(t.args,n,i,this.#a()),s=0;for(let a of o)s+=await this.#c(a,r,()=>r.executeRaw(a).catch(f=>t.args.type==="rawSql"?Wi(f):_t(f)));return{value:s}}case"query":{let o=vo(t.args,n,i,this.#a()),s;for(let a of o){let f=await this.#c(a,r,()=>r.queryRaw(a).catch(w=>t.args.type==="rawSql"?Wi(w):_t(w)));s===void 0?s=f:(s.rows.push(...f.rows),s.lastInsertId=f.lastInsertId)}return{value:t.args.type==="rawSql"?this.#u(s):this.#i(s),lastInsertId:s?.lastInsertId}}case"reverse":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);return{value:Array.isArray(o)?o.reverse():o,lastInsertId:s}}case"unique":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);if(!Array.isArray(o))return{value:o,lastInsertId:s};if(o.length>1)throw new Error(`Expected zero or one element, got ${o.length}`);return{value:o[0]??null,lastInsertId:s}}case"required":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);if(wu(o))throw new Error("Required value is empty");return{value:o,lastInsertId:s}}case"mapField":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.records,r,n,i);return{value:bu(o,t.args.field),lastInsertId:s}}case"join":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.parent,r,n,i);if(o===null)return{value:null,lastInsertId:s};let a=await Promise.all(t.args.children.map(async f=>({joinExpr:f,childRecords:(await this.interpretNode(f.child,r,n,i)).value})));return{value:af(o,a),lastInsertId:s}}case"transaction":{if(!this.#e.enabled)return this.interpretNode(t.args,r,n,i);let o=this.#e.manager,s=await o.startTransaction(),a=o.getTransaction(s,"query");try{let f=await this.interpretNode(t.args,a,n,i);return await o.commitTransaction(s.id),f}catch(f){throw await o.rollbackTransaction(s.id),f}}case"dataMap":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return{value:sl(o,t.args.structure,t.args.enums),lastInsertId:s}}case"validate":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return hu(o,t.args.rules,t.args),{value:o,lastInsertId:s}}case"if":{let{value:o}=await this.interpretNode(t.args.value,r,n,i);return Ao(o,t.args.rule)?await this.interpretNode(t.args.then,r,n,i):await this.interpretNode(t.args.else,r,n,i)}case"unit":return{value:void 0};case"diff":{let{value:o}=await this.interpretNode(t.args.from,r,n,i),{value:s}=await this.interpretNode(t.args.to,r,n,i),a=new Set(Co(s).map(f=>JSON.stringify(f)));return{value:Co(o).filter(f=>!a.has(JSON.stringify(f)))}}case"process":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return{value:Hn(o,t.args.operations),lastInsertId:s}}case"initializeRecord":{let{lastInsertId:o}=await this.interpretNode(t.args.expr,r,n,i),s={};for(let[a,f]of Object.entries(t.args.fields))s[a]=lf(f,o,n,i);return{value:s,lastInsertId:o}}case"mapRecord":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i),a=o===null?{}:Ro(o);for(let[f,w]of Object.entries(t.args.fields))a[f]=uf(w,a[f],n,i);return{value:a,lastInsertId:s}}default:$(t,`Unexpected node type: ${t.type}`)}}#a(){return this.#l?.maxBindValues!==void 0?this.#l.maxBindValues:this.#p()}#p(){if(this.#s!==void 0)switch(this.#s){case"cockroachdb":case"postgres":case"postgresql":case"prisma+postgres":return 32766;case"mysql":return 65535;case"sqlite":return 999;case"sqlserver":return 2098;case"mongodb":return;default:$(this.#s,`Unexpected provider: ${this.#s}`)}}#c(t,r,n){return Ln({query:t,execute:n,provider:this.#s??r.provider,tracingHelper:this.#o,onQuery:this.#r})}};function wu(e){return Array.isArray(e)?e.length===0:e==null}function Co(e){return Array.isArray(e)?e:[e]}function De(e){if(typeof e=="number")return e;if(typeof e=="string")return Number(e);throw new Error(`Expected number, got ${typeof e}`)}function Ro(e){if(typeof e=="object"&&e!==null)return e;throw new Error(`Expected object, got ${typeof e}`)}function bu(e,t){return Array.isArray(e)?e.map(r=>bu(r,t)):typeof e=="object"&&e!==null?e[t]??null:e}function af(e,t){for(let{joinExpr:r,childRecords:n}of t){let i=r.on.map(([a])=>a),o=r.on.map(([,a])=>a),s={};for(let a of Array.isArray(e)?e:[e]){let f=Ro(a),w=Cr(f,i);s[w]||(s[w]=[]),s[w].push(f),r.isRelationUnique?f[r.parentField]=null:f[r.parentField]=[]}for(let a of Array.isArray(n)?n:[n]){if(a===null)continue;let f=Cr(Ro(a),o);for(let w of s[f]??[])r.isRelationUnique?w[r.parentField]=a:w[r.parentField].push(a)}}return e}function lf(e,t,r,n){switch(e.type){case"value":return Te(e.value,r,n);case"lastInsertId":return t;default:$(e,`Unexpected field initializer type: ${e.type}`)}}function uf(e,t,r,n){switch(e.type){case"set":return Te(e.value,r,n);case"add":return De(t)+De(Te(e.value,r,n));case"subtract":return De(t)-De(Te(e.value,r,n));case"multiply":return De(t)*De(Te(e.value,r,n));case"divide":{let i=De(t),o=De(Te(e.value,r,n));return o===0?null:i/o}default:$(e,`Unexpected field operation type: ${e.type}`)}}u();c();p();m();d();l();u();c();p();m();d();l();async function cf(){return globalThis.crypto??await Promise.resolve().then(()=>(Xe(),xi))}async function Eu(){return(await cf()).randomUUID()}u();c();p();m();d();l();var be=class extends ce{name="TransactionManagerError";constructor(t,r){super("Transaction API error: "+t,"P2028",r)}},Ir=class extends be{constructor(){super("Transaction not found. Transaction ID is invalid, refers to an old closed transaction Prisma doesn't have information about anymore, or was obtained before disconnecting.")}},Gn=class extends be{constructor(t){super(`Transaction already closed: A ${t} cannot be executed on a committed transaction.`)}},Jn=class extends be{constructor(t){super(`Transaction is being closed: A ${t} cannot be executed on a closing transaction.`)}},Wn=class extends be{constructor(t){super(`Transaction already closed: A ${t} cannot be executed on a transaction that was rolled back.`)}},Kn=class extends be{constructor(){super("Unable to start a transaction in the given time.")}},zn=class extends be{constructor(t,{timeout:r,timeTaken:n}){super(`A ${t} cannot be executed on an expired transaction. The timeout for this transaction was ${r} ms, however ${n} ms passed since the start of the transaction. Consider increasing the interactive transaction timeout or doing less work in the transaction.`,{operation:t,timeout:r,timeTaken:n})}},Vt=class extends be{constructor(t){super(`Internal Consistency Error: ${t}`)}},Yn=class extends be{constructor(t){super(`Invalid isolation level: ${t}`,{isolationLevel:t})}};var pf=100,Sr=K("prisma:client:transactionManager"),mf=()=>({sql:"COMMIT",args:[],argTypes:[]}),df=()=>({sql:"ROLLBACK",args:[],argTypes:[]}),ff=()=>({sql:'-- Implicit "COMMIT" query via underlying driver',args:[],argTypes:[]}),gf=()=>({sql:'-- Implicit "ROLLBACK" query via underlying driver',args:[],argTypes:[]}),kr=class{transactions=new Map;closedTransactions=[];driverAdapter;transactionOptions;tracingHelper;#e;#t;constructor({driverAdapter:t,transactionOptions:r,tracingHelper:n,onQuery:i,provider:o}){this.driverAdapter=t,this.transactionOptions=r,this.tracingHelper=n,this.#e=i,this.#t=o}async startTransaction(t){return await this.tracingHelper.runInChildSpan("start_transaction",()=>this.#r(t))}async#r(t){let r=t!==void 0?this.validateOptions(t):this.transactionOptions,n={id:await Eu(),status:"waiting",timer:void 0,timeout:r.timeout,startedAt:Date.now(),transaction:void 0};this.transactions.set(n.id,n);let i=!1,o=setTimeout(()=>i=!0,r.maxWait);switch(n.transaction=await this.driverAdapter.startTransaction(r.isolationLevel).catch(_t),clearTimeout(o),n.status){case"waiting":if(i)throw await this.closeTransaction(n,"timed_out"),new Kn;return n.status="running",n.timer=this.startTransactionTimeout(n.id,r.timeout),{id:n.id};case"closing":case"timed_out":case"running":case"committed":case"rolled_back":throw new Vt(`Transaction in invalid state ${n.status} although it just finished startup.`);default:$(n.status,"Unknown transaction status.")}}async commitTransaction(t){return await this.tracingHelper.runInChildSpan("commit_transaction",async()=>{let r=this.getActiveTransaction(t,"commit");await this.closeTransaction(r,"committed")})}async rollbackTransaction(t){return await this.tracingHelper.runInChildSpan("rollback_transaction",async()=>{let r=this.getActiveTransaction(t,"rollback");await this.closeTransaction(r,"rolled_back")})}getTransaction(t,r){let n=this.getActiveTransaction(t.id,r);if(!n.transaction)throw new Ir;return n.transaction}getActiveTransaction(t,r){let n=this.transactions.get(t);if(!n){let i=this.closedTransactions.find(o=>o.id===t);if(i)switch(Sr("Transaction already closed.",{transactionId:t,status:i.status}),i.status){case"closing":case"waiting":case"running":throw new Vt("Active transaction found in closed transactions list.");case"committed":throw new Gn(r);case"rolled_back":throw new Wn(r);case"timed_out":throw new zn(r,{timeout:i.timeout,timeTaken:Date.now()-i.startedAt})}else throw Sr("Transaction not found.",t),new Ir}if(n.status==="closing")throw new Jn(r);if(["committed","rolled_back","timed_out"].includes(n.status))throw new Vt("Closed transaction found in active transactions map.");return n}async cancelAllTransactions(){await Promise.allSettled([...this.transactions.values()].map(t=>this.closeTransaction(t,"rolled_back")))}startTransactionTimeout(t,r){let n=Date.now();return setTimeout(async()=>{Sr("Transaction timed out.",{transactionId:t,timeoutStartedAt:n,timeout:r});let i=this.transactions.get(t);i&&["running","waiting"].includes(i.status)?await this.closeTransaction(i,"timed_out"):Sr("Transaction already committed or rolled back when timeout happened.",t)},r)}async closeTransaction(t,r){Sr("Closing transaction.",{transactionId:t.id,status:r}),t.status="closing";try{if(t.transaction&&r==="committed")if(t.transaction.options.usePhantomQuery)await this.#n(ff(),t.transaction,()=>t.transaction.commit());else{let n=mf();await this.#n(n,t.transaction,()=>t.transaction.executeRaw(n)),await t.transaction.commit()}else if(t.transaction)if(t.transaction.options.usePhantomQuery)await this.#n(gf(),t.transaction,()=>t.transaction.rollback());else{let n=df();await this.#n(n,t.transaction,()=>t.transaction.executeRaw(n)),await t.transaction.rollback()}}finally{t.status=r,clearTimeout(t.timer),t.timer=void 0,this.transactions.delete(t.id),this.closedTransactions.push(t),this.closedTransactions.length>pf&&this.closedTransactions.shift()}}validateOptions(t){if(!t.timeout)throw new be("timeout is required");if(!t.maxWait)throw new be("maxWait is required");if(t.isolationLevel==="SNAPSHOT")throw new Yn(t.isolationLevel);return{...t,timeout:t.timeout,maxWait:t.maxWait}}#n(t,r,n){return Ln({query:t,execute:n,provider:this.#t??r.provider,tracingHelper:this.tracingHelper,onQuery:this.#e})}};var Zn="6.14.0";u();c();p();m();d();l();var Xn=class e{#e;#t;#r;#n;constructor(t,r,n){this.#e=t,this.#t=r,this.#r=n,this.#n=r.getConnectionInfo?.()}static async connect(t){let r,n;try{r=await t.driverAdapterFactory.connect(),n=new kr({driverAdapter:r,transactionOptions:t.transactionOptions,tracingHelper:t.tracingHelper,onQuery:t.onQuery,provider:t.provider})}catch(i){throw await r?.dispose(),i}return new e(t,r,n)}getConnectionInfo(){let t=this.#n??{supportsRelationJoins:!1};return Promise.resolve({provider:this.#t.provider,connectionInfo:t})}async execute({plan:t,placeholderValues:r,transaction:n,batchIndex:i}){let o=n?this.#r.getTransaction(n,i!==void 0?"batch query":"query"):this.#t;return await Rr.forSql({transactionManager:n?{enabled:!1}:{enabled:!0,manager:this.#r},placeholderValues:r,onQuery:this.#e.onQuery,tracingHelper:this.#e.tracingHelper,provider:this.#e.provider,connectionInfo:this.#n}).run(t,o)}async startTransaction(t){return{...await this.#r.startTransaction(t),payload:void 0}}async commitTransaction(t){await this.#r.commitTransaction(t.id)}async rollbackTransaction(t){await this.#r.rollbackTransaction(t.id)}async disconnect(){try{await this.#r.cancelAllTransactions()}finally{await this.#t.dispose()}}};u();c();p();m();d();l();u();c();p();m();d();l();var ei=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function xu(e,t,r){let n=r||{},i=n.encode||encodeURIComponent;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!ei.test(e))throw new TypeError("argument name is invalid");let o=i(t);if(o&&!ei.test(o))throw new TypeError("argument val is invalid");let s=e+"="+o;if(n.maxAge!==void 0&&n.maxAge!==null){let a=n.maxAge-0;if(Number.isNaN(a)||!Number.isFinite(a))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(a)}if(n.domain){if(!ei.test(n.domain))throw new TypeError("option domain is invalid");s+="; Domain="+n.domain}if(n.path){if(!ei.test(n.path))throw new TypeError("option path is invalid");s+="; Path="+n.path}if(n.expires){if(!hf(n.expires)||Number.isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":{s+="; Priority=Low";break}case"medium":{s+="; Priority=Medium";break}case"high":{s+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:{s+="; SameSite=Strict";break}case"lax":{s+="; SameSite=Lax";break}case"strict":{s+="; SameSite=Strict";break}case"none":{s+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(s+="; Partitioned"),s}function hf(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function Pu(e,t){let r=(e||"").split(";").filter(f=>typeof f=="string"&&!!f.trim()),n=r.shift()||"",i=wf(n),o=i.name,s=i.value;try{s=t?.decode===!1?s:(t?.decode||decodeURIComponent)(s)}catch{}let a={name:o,value:s};for(let f of r){let w=f.split("="),A=(w.shift()||"").trimStart().toLowerCase(),C=w.join("=");switch(A){case"expires":{a.expires=new Date(C);break}case"max-age":{a.maxAge=Number.parseInt(C,10);break}case"secure":{a.secure=!0;break}case"httponly":{a.httpOnly=!0;break}case"samesite":{a.sameSite=C;break}default:a[A]=C}}return a}function wf(e){let t="",r="",n=e.split("=");return n.length>1?(t=n.shift(),r=n.join("=")):r=e,{name:t,value:r}}u();c();p();m();d();l();u();c();p();m();d();l();function $t({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 Ot().id==="workerd"?new F(`error: Environment variable not found: ${s.fromEnvVar}. +`}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();l();c();u();p();m();d();l();l();function $(e,t){throw new Error(t)}function Hi(e,t){return e===t||e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>Hi(e[r],t[r]))}function Dt(e,t){let r=Object.keys(e),n=Object.keys(t);return(r.length{if(typeof e[o]==typeof t[o]&&typeof e[o]!="object")return e[o]===t[o];if(ae.isDecimal(e[o])||ae.isDecimal(t[o])){let s=Ka(e[o]),a=Ka(t[o]);return s&&a&&s.equals(a)}else if(e[o]instanceof Uint8Array||t[o]instanceof Uint8Array){let s=za(e[o]),a=za(t[o]);return s&&a&&s.equals(a)}else{if(e[o]instanceof Date||t[o]instanceof Date)return Ya(e[o])?.getTime()===Ya(t[o])?.getTime();if(typeof e[o]=="bigint"||typeof t[o]=="bigint")return Za(e[o])===Za(t[o]);if(typeof e[o]=="number"||typeof t[o]=="number")return Xa(e[o])===Xa(t[o])}return Hi(e[o],t[o])})}function Ka(e){return ae.isDecimal(e)?e:typeof e=="number"||typeof e=="string"?new ae(e):void 0}function za(e){return y.isBuffer(e)?e:e instanceof Uint8Array?y.from(e.buffer,e.byteOffset,e.byteLength):typeof e=="string"?y.from(e,"base64"):void 0}function Ya(e){return e instanceof Date?e:typeof e=="string"||typeof e=="number"?new Date(e):void 0}function Za(e){return typeof e=="bigint"?e:typeof e=="number"||typeof e=="string"?BigInt(e):void 0}function Xa(e){return typeof e=="number"?e:typeof e=="string"?Number(e):void 0}function wr(e){return JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r instanceof Uint8Array?y.from(r).toString("base64"):r)}function Dm(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function _m(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function Qe(e){return e===null?e:Array.isArray(e)?e.map(Qe):typeof e=="object"?Dm(e)?Mm(e):e.constructor!==null&&e.constructor.name!=="Object"?e:_m(e,Qe):e}function Mm({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=y.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new v(t);case"Json":return JSON.parse(t);default:$(t,"Unknown tagged value")}}c();u();p();m();d();l();var ue=class extends Error{name="UserFacingError";code;meta;constructor(t,r,n){super(t),this.code=r,this.meta=n??{}}toQueryResponseErrorObject(){return{error:this.message,user_facing_error:{is_panic:!1,message:this.message,meta:this.meta,error_code:this.code}}}};function _t(e){if(!nn(e))throw e;let t=Nm(e),r=el(e);throw!t||!r?e:new ue(r,t,{driverAdapterError:e})}function Ji(e){throw nn(e)?new ue(`Raw query failed. Code: \`${e.cause.originalCode??"N/A"}\`. Message: \`${e.cause.originalMessage??el(e)}\``,"P2010",{driverAdapterError:e}):e}function Nm(e){switch(e.cause.kind){case"AuthenticationFailed":return"P1000";case"DatabaseNotReachable":return"P1001";case"DatabaseDoesNotExist":return"P1003";case"SocketTimeout":return"P1008";case"DatabaseAlreadyExists":return"P1009";case"DatabaseAccessDenied":return"P1010";case"TlsConnectionError":return"P1011";case"ConnectionClosed":return"P1017";case"TransactionAlreadyClosed":return"P1018";case"LengthMismatch":return"P2000";case"UniqueConstraintViolation":return"P2002";case"ForeignKeyConstraintViolation":return"P2003";case"UnsupportedNativeDataType":return"P2010";case"NullConstraintViolation":return"P2011";case"ValueOutOfRange":return"P2020";case"TableDoesNotExist":return"P2021";case"ColumnNotFound":return"P2022";case"InvalidIsolationLevel":case"InconsistentColumnData":return"P2023";case"MissingFullTextSearchIndex":return"P2030";case"TransactionWriteConflict":return"P2034";case"GenericJs":return"P2036";case"TooManyConnections":return"P2037";case"postgres":case"sqlite":case"mysql":case"mssql":return;default:$(e.cause,`Unknown error: ${e.cause}`)}}function el(e){switch(e.cause.kind){case"AuthenticationFailed":return`Authentication failed against the database server, the provided database credentials for \`${e.cause.user??"(not available)"}\` are not valid`;case"DatabaseNotReachable":{let t=e.cause.host&&e.cause.port?`${e.cause.host}:${e.cause.port}`:e.cause.host;return`Can't reach database server${t?` at ${t}`:""}`}case"DatabaseDoesNotExist":return`Database \`${e.cause.db??"(not available)"}\` does not exist on the database server`;case"SocketTimeout":return"Operation has timed out";case"DatabaseAlreadyExists":return`Database \`${e.cause.db??"(not available)"}\` already exists on the database server`;case"DatabaseAccessDenied":return`User was denied access on the database \`${e.cause.db??"(not available)"}\``;case"TlsConnectionError":return`Error opening a TLS connection: ${e.cause.reason}`;case"ConnectionClosed":return"Server has closed the connection.";case"TransactionAlreadyClosed":return e.cause.cause;case"LengthMismatch":return`The provided value for the column is too long for the column's type. Column: ${e.cause.column??"(not available)"}`;case"UniqueConstraintViolation":return`Unique constraint failed on the ${Gi(e.cause.constraint)}`;case"ForeignKeyConstraintViolation":return`Foreign key constraint violated on the ${Gi(e.cause.constraint)}`;case"UnsupportedNativeDataType":return`Failed to deserialize column of type '${e.cause.type}'. If you're using $queryRaw and this column is explicitly marked as \`Unsupported\` in your Prisma schema, try casting this column to any supported Prisma type such as \`String\`.`;case"NullConstraintViolation":return`Null constraint violation on the ${Gi(e.cause.constraint)}`;case"ValueOutOfRange":return`Value out of range for the type: ${e.cause.cause}`;case"TableDoesNotExist":return`The table \`${e.cause.table??"(not available)"}\` does not exist in the current database.`;case"ColumnNotFound":return`The column \`${e.cause.column??"(not available)"}\` does not exist in the current database.`;case"InvalidIsolationLevel":return`Error in connector: Conversion error: ${e.cause.level}`;case"InconsistentColumnData":return`Inconsistent column data: ${e.cause.cause}`;case"MissingFullTextSearchIndex":return"Cannot find a fulltext index to use for the native search, try adding a @@fulltext([Fields...]) to your schema";case"TransactionWriteConflict":return"Transaction failed due to a write conflict or a deadlock. Please retry your transaction";case"GenericJs":return`Error in external connector (id ${e.cause.id})`;case"TooManyConnections":return`Too many database connections opened: ${e.cause.cause}`;case"sqlite":case"postgres":case"mysql":case"mssql":return;default:$(e.cause,`Unknown error: ${e.cause}`)}}function Gi(e){return e&&"fields"in e?`fields: (${e.fields.map(t=>`\`${t}\``).join(", ")})`:e&&"index"in e?`constraint: \`${e.index}\``:e&&"foreignKey"in e?"foreign key":"(not available)"}function tl(e,t){let r=e.map(i=>t.keys.reduce((o,s)=>(o[s]=Qe(i[s]),o),{})),n=new Set(t.nestedSelection);return t.arguments.map(i=>{let o=r.findIndex(s=>Dt(s,i));if(o===-1)return t.expectNonEmpty?new ue("An operation failed because it depends on one or more records that were required but not found","P2025"):null;{let s=Object.entries(e[o]).filter(([a])=>n.has(a));return Object.fromEntries(s)}})}c();u();p();m();d();l();l();var G=class extends Error{name="DataMapperError"};function nl(e,t,r){switch(t.type){case"affectedRows":if(typeof e!="number")throw new G(`Expected an affected rows count, got: ${typeof e} (${e})`);return{count:e};case"object":return Ki(e,t.fields,r,t.skipNulls);case"field":return Wi(e,"",t.fieldType,r);default:$(t,`Invalid data mapping type: '${t.type}'`)}}function Ki(e,t,r,n){if(e===null)return null;if(Array.isArray(e)){let i=e;return n&&(i=i.filter(o=>o!==null)),i.map(o=>rl(o,t,r))}if(typeof e=="object")return rl(e,t,r);if(typeof e=="string"){let i;try{i=JSON.parse(e)}catch(o){throw new G("Expected an array or object, got a string that is not valid JSON",{cause:o})}return Ki(i,t,r,n)}throw new G(`Expected an array or an object, got: ${typeof e}`)}function rl(e,t,r){if(typeof e!="object")throw new G(`Expected an object, but got '${typeof e}'`);let n={};for(let[i,o]of Object.entries(t))switch(o.type){case"affectedRows":throw new G(`Unexpected 'AffectedRows' node in data mapping for field '${i}'`);case"object":{if(o.serializedName!==null&&!Object.hasOwn(e,o.serializedName))throw new G(`Missing data field (Object): '${i}'; node: ${JSON.stringify(o)}; data: ${JSON.stringify(e)}`);let s=o.serializedName!==null?e[o.serializedName]:e;n[i]=Ki(s,o.fields,r,o.skipNulls);break}case"field":{let s=o.dbName;if(Object.hasOwn(e,s))n[i]=Lm(e[s],s,o.fieldType,r);else throw new G(`Missing data field (Value): '${s}'; node: ${JSON.stringify(o)}; data: ${JSON.stringify(e)}`)}break;default:$(o,`DataMapper: Invalid data mapping node type: '${o.type}'`)}return n}function Lm(e,t,r,n){return e===null?r.arity==="list"?[]:null:r.arity==="list"?e.map((o,s)=>Wi(o,`${t}[${s}]`,r,n)):Wi(e,t,r,n)}function Wi(e,t,r,n){switch(r.type){case"unsupported":return e;case"string":{if(typeof e!="string")throw new G(`Expected a string in column '${t}', got ${typeof e}: ${e}`);return e}case"int":switch(typeof e){case"number":return Math.trunc(e);case"string":{let i=Math.trunc(Number(e));if(Number.isNaN(i)||!Number.isFinite(i))throw new G(`Expected an integer in column '${t}', got string: ${e}`);if(!Number.isSafeInteger(i))throw new G(`Integer value in column '${t}' is too large to represent as a JavaScript number without loss of precision, got: ${e}. Consider using BigInt type.`);return i}default:throw new G(`Expected an integer in column '${t}', got ${typeof e}: ${e}`)}case"bigint":{if(typeof e!="number"&&typeof e!="string")throw new G(`Expected a bigint in column '${t}', got ${typeof e}: ${e}`);return{$type:"BigInt",value:e}}case"float":{if(typeof e=="number")return e;if(typeof e=="string"){let i=Number(e);if(Number.isNaN(i)&&!/^[-+]?nan$/.test(e.toLowerCase()))throw new G(`Expected a float in column '${t}', got string: ${e}`);return i}throw new G(`Expected a float in column '${t}', got ${typeof e}: ${e}`)}case"boolean":{if(typeof e=="boolean")return e;if(typeof e=="number")return e===1;if(typeof e=="string"){if(e==="true"||e==="TRUE"||e==="1")return!0;if(e==="false"||e==="FALSE"||e==="0")return!1;throw new G(`Expected a boolean in column '${t}', got ${typeof e}: ${e}`)}if(Array.isArray(e)){for(let i of e)if(i!==0)return!0;return!1}throw new G(`Expected a boolean in column '${t}', got ${typeof e}: ${e}`)}case"decimal":if(typeof e!="number"&&typeof e!="string"&&!ae.isDecimal(e))throw new G(`Expected a decimal in column '${t}', got ${typeof e}: ${e}`);return{$type:"Decimal",value:e};case"datetime":{if(typeof e=="string")return{$type:"DateTime",value:Fm(e)};if(typeof e=="number"||e instanceof Date)return{$type:"DateTime",value:e};throw new G(`Expected a date in column '${t}', got ${typeof e}: ${e}`)}case"object":return{$type:"Json",value:wr(e)};case"json":return{$type:"Json",value:`${e}`};case"bytes":{switch(r.encoding){case"base64":if(typeof e!="string")throw new G(`Expected a base64-encoded byte array in column '${t}', got ${typeof e}: ${e}`);return{$type:"Bytes",value:e};case"hex":if(typeof e!="string"||!e.startsWith("\\x"))throw new G(`Expected a hex-encoded byte array in column '${t}', got ${typeof e}: ${e}`);return{$type:"Bytes",value:y.from(e.slice(2),"hex").toString("base64")};case"array":if(Array.isArray(e))return{$type:"Bytes",value:y.from(e).toString("base64")};if(e instanceof Uint8Array)return{$type:"Bytes",value:y.from(e).toString("base64")};throw new G(`Expected a byte array in column '${t}', got ${typeof e}: ${e}`);default:$(r.encoding,`DataMapper: Unknown bytes encoding: ${r.encoding}`)}break}case"enum":{let i=n[r.name];if(i===void 0)throw new G(`Unknown enum '${r.name}'`);let o=i[`${e}`];if(o===void 0)throw new G(`Value '${e}' not found in enum '${r.name}'`);return o}default:$(r,`DataMapper: Unknown result type: ${r.type}`)}}var Um=/\d{2}:\d{2}:\d{2}(?:\.\d+)?(Z|[+-]\d{2}(:?\d{2})?)?$/;function Fm(e){let t=Um.exec(e);if(t===null)return`${e}Z`;let r=e,[n,i,o]=t;return i!==void 0&&i!=="Z"&&o===void 0?r=`${e}:00`:i===void 0&&(r=`${e}Z`),n.length===e.length?`1970-01-01T${r}`:r}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var br;(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(br||(br={}));function $m(e){switch(e){case"postgresql":case"postgres":case"prisma+postgres":return"postgresql";case"sqlserver":return"mssql";case"mysql":case"sqlite":case"cockroachdb":case"mongodb":return e;default:$(e,`Unknown provider: ${e}`)}}async function Ln({query:e,tracingHelper:t,provider:r,onQuery:n,execute:i}){return await t.runInChildSpan({name:"db_query",kind:br.CLIENT,attributes:{"db.query.text":e.sql,"db.system.name":$m(r)}},async()=>{let o=new Date,s=w.now(),a=await i(),f=w.now();return n?.({timestamp:o,duration:f-s,query:e.sql,params:e.args}),a})}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();function tt(e,t){var r="000000000"+e;return r.substr(r.length-t)}var il=Ae(ys(),1);function Vm(){try{return il.default.hostname()}catch{return g.env._CLUSTER_NETWORK_NAME_||g.env.COMPUTERNAME||"hostname"}}var ol=2,qm=tt(g.pid.toString(36),ol),sl=Vm(),Bm=sl.length,jm=tt(sl.split("").reduce(function(e,t){return+e+t.charCodeAt(0)},+Bm+36).toString(36),ol);function zi(){return qm+jm}c();u();p();m();d();l();c();u();p();m();d();l();function Un(e){return typeof e=="string"&&/^c[a-z0-9]{20,32}$/.test(e)}function Yi(e){let n=Math.pow(36,4),i=0;function o(){return tt((Math.random()*n<<0).toString(36),4)}function s(){return i=int.length&&(Zt.getRandomValues(nt),Lt=0),Lt+=e}function so(e=21){Od(e|=0);let t="";for(let r=Lt-e;r{let n=new Uint8Array(1);return r.getRandomValues(n),n[0]/255};if(typeof r?.randomBytes=="function")return()=>r.randomBytes(1).readUInt8()/255;if(yt?.randomBytes)return()=>yt.randomBytes(1).readUInt8()/255;throw new ot(it.PRNGDetectFailure,"Failed to find a reliable PRNG")}function Nd(){return Fd()?self:typeof window<"u"?window:typeof globalThis<"u"||typeof globalThis<"u"?globalThis:null}function Ld(e,t){let r="";for(;e>0;e--)r=_d(t)+r;return r}function Ud(e,t=tc){if(isNaN(e))throw new ot(it.EncodeTimeValueMalformed,`Time must be a number: ${e}`);if(e>Xl)throw new ot(it.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${Xl}: ${e}`);if(e<0)throw new ot(it.EncodeTimeNegative,`Time must be positive: ${e}`);if(Number.isInteger(e)===!1)throw new ot(it.EncodeTimeValueMalformed,`Time must be an integer: ${e}`);let r,n="";for(let i=t;i>0;i--)r=e%Ar,n=ec.charAt(r)+n,e=(e-r)/Ar;return n}function Fd(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function rc(e,t){let r=t||Md(),n=!e||isNaN(e)?Date.now():e;return Ud(n,tc)+Ld(Dd,r)}c();u();p();m();d();l();c();u();p();m();d();l();var oe=[];for(let e=0;e<256;++e)oe.push((e+256).toString(16).slice(1));function qn(e,t=0){return(oe[e[t+0]]+oe[e[t+1]]+oe[e[t+2]]+oe[e[t+3]]+"-"+oe[e[t+4]]+oe[e[t+5]]+"-"+oe[e[t+6]]+oe[e[t+7]]+"-"+oe[e[t+8]]+oe[e[t+9]]+"-"+oe[e[t+10]]+oe[e[t+11]]+oe[e[t+12]]+oe[e[t+13]]+oe[e[t+14]]+oe[e[t+15]]).toLowerCase()}c();u();p();m();d();l();Xe();var jn=new Uint8Array(256),Bn=jn.length;function Ut(){return Bn>jn.length-16&&(sn(jn),Bn=0),jn.slice(Bn,Bn+=16)}c();u();p();m();d();l();c();u();p();m();d();l();Xe();var ao={randomUUID:on};function $d(e,t,r){if(ao.randomUUID&&!t&&!e)return ao.randomUUID();e=e||{};let n=e.random??e.rng?.()??Ut();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let i=0;i<16;++i)t[r+i]=n[i];return t}return qn(n)}var lo=$d;c();u();p();m();d();l();var co={};function Vd(e,t,r){let n;if(e)n=nc(e.random??e.rng?.()??Ut(),e.msecs,e.seq,t,r);else{let i=Date.now(),o=Ut();qd(co,i,o),n=nc(o,co.msecs,co.seq,t,r)}return t??qn(n)}function qd(e,t,r){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function nc(e,t,r,n,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(!n)n=new Uint8Array(16),i=0;else if(i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),r??=e[6]*127<<24|e[7]<<16|e[8]<<8|e[9],n[i++]=t/1099511627776&255,n[i++]=t/4294967296&255,n[i++]=t/16777216&255,n[i++]=t/65536&255,n[i++]=t/256&255,n[i++]=t&255,n[i++]=112|r>>>28&15,n[i++]=r>>>20&255,n[i++]=128|r>>>14&63,n[i++]=r>>>6&255,n[i++]=r<<2&255|e[10]&3,n[i++]=e[11],n[i++]=e[12],n[i++]=e[13],n[i++]=e[14],n[i++]=e[15],n}var uo=Vd;var Qn=class{#e={};constructor(){this.register("uuid",new mo),this.register("cuid",new fo),this.register("ulid",new go),this.register("nanoid",new yo),this.register("product",new ho)}snapshot(){return Object.create(this.#e,{now:{value:new po}})}register(t,r){this.#e[t]=r}},po=class{#e=new Date;generate(){return this.#e.toISOString()}},mo=class{generate(t){if(t===4)return lo();if(t===7)return uo();throw new Error("Invalid UUID generator arguments")}},fo=class{generate(t){if(t===1)return al();if(t===2)return(0,ic.createId)();throw new Error("Invalid CUID generator arguments")}},go=class{generate(){return rc()}},yo=class{generate(t){if(typeof t=="number")return so(t);if(t===void 0)return so();throw new Error("Invalid Nanoid generator arguments")}},ho=class{generate(t,r){if(t===void 0||r===void 0)throw new Error("Invalid Product generator arguments");return Array.isArray(t)&&Array.isArray(r)?t.flatMap(n=>r.map(i=>[n,i])):Array.isArray(t)?t.map(n=>[n,r]):Array.isArray(r)?r.map(n=>[t,n]):[[t,r]]}};c();u();p();m();d();l();function Hn(e,t){return e==null?e:typeof e=="string"?Hn(JSON.parse(e),t):Array.isArray(e)?jd(e,t):Bd(e,t)}function Bd(e,t){if(t.pagination){let{skip:r,take:n,cursor:i}=t.pagination;if(r!==null&&r>0||n===0||i!==null&&!Dt(e,i))return null}return sc(e,t.nested)}function sc(e,t){for(let[r,n]of Object.entries(t))e[r]=Hn(e[r],n);return e}function jd(e,t){if(t.distinct!==null){let r=t.linkingFields!==null?[...t.distinct,...t.linkingFields]:t.distinct;e=Qd(e,r)}return t.pagination&&(e=Hd(e,t.pagination,t.linkingFields)),t.reverse&&e.reverse(),Object.keys(t.nested).length===0?e:e.map(r=>sc(r,t.nested))}function Qd(e,t){let r=new Set,n=[];for(let i of e){let o=Rr(i,t);r.has(o)||(r.add(o),n.push(i))}return n}function Hd(e,t,r){if(r===null)return oc(e,t);let n=new Map;for(let o of e){let s=Rr(o,r);n.has(s)||n.set(s,[]),n.get(s).push(o)}let i=Array.from(n.entries());return i.sort(([o],[s])=>os?1:0),i.flatMap(([,o])=>oc(o,t))}function oc(e,{cursor:t,skip:r,take:n}){let i=t!==null?e.findIndex(a=>Dt(a,t)):0;if(i===-1)return[];let o=i+(r??0),s=n!==null?o+n:e.length;return e.slice(o,s)}function Rr(e,t){return JSON.stringify(t.map(r=>e[r]))}c();u();p();m();d();l();c();u();p();m();d();l();function wo(e){return typeof e=="object"&&e!==null&&e.prisma__type==="param"}function bo(e){return typeof e=="object"&&e!==null&&e.prisma__type==="generatorCall"}function Po(e,t,r,n){let i=e.args.map(o=>Te(o,t,r));switch(e.type){case"rawSql":return[Wd(e.sql,i,e.argTypes)];case"templateSql":return(e.chunkable?zd(e.fragments,i,n):[i]).map(s=>{if(n!==void 0&&s.length>n)throw new ue("The query parameter limit supported by your database is exceeded.","P2029");return Gd(e.fragments,e.placeholderFormat,s,e.argTypes)});default:$(e.type,"Invalid query type")}}function Te(e,t,r){for(;Kd(e);)if(wo(e)){let n=t[e.prisma__value.name];if(n===void 0)throw new Error(`Missing value for query variable ${e.prisma__value.name}`);e=n}else if(bo(e)){let{name:n,args:i}=e.prisma__value,o=r[n];if(!o)throw new Error(`Encountered an unknown generator '${n}'`);e=o.generate(...i.map(s=>Te(s,t,r)))}else $(e,`Unexpected unevaluated value type: ${e}`);return Array.isArray(e)&&(e=e.map(n=>Te(n,t,r))),e}function Gd(e,t,r,n){let i="",o={placeholderNumber:1},s=[],a=[];for(let f of xo(e,r,n)){if(i+=Jd(f,t,o),f.type==="stringChunk")continue;let E=s.length,A=s.push(...ac(f))-E;if(f.argType.arity==="tuple"){if(A%f.argType.elements.length!==0)throw new Error(`Malformed query template. Expected the number of parameters to match the tuple arity, but got ${A} parameters for a tuple of arity ${f.argType.elements.length}.`);for(let R=0;REo(t,r.placeholderNumber++)).join(",")})`;case"parameterTupleList":return e.value.map(i=>{let o=i.map(()=>Eo(t,r.placeholderNumber++)).join(e.itemSeparator);return`${e.itemPrefix}${o}${e.itemSuffix}`}).join(e.groupSeparator);default:$(n,"Invalid fragment type")}}function Eo(e,t){return e.hasNumbering?`${e.prefix}${t}`:e.prefix}function Wd(e,t,r){return{sql:e,args:t,argTypes:r}}function Kd(e){return wo(e)||bo(e)}function*xo(e,t,r){let n=0;for(let i of e)switch(i.type){case"parameter":{if(n>=t.length)throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`);yield{...i,value:t[n],argType:r?.[n]},n++;break}case"stringChunk":{yield i;break}case"parameterTuple":{if(n>=t.length)throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`);let o=t[n];yield{...i,value:Array.isArray(o)?o:[o],argType:r?.[n]},n++;break}case"parameterTupleList":{if(n>=t.length)throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`);let o=t[n];if(!Array.isArray(o))throw new Error("Malformed query template. Tuple list expected.");if(o.length===0)throw new Error("Malformed query template. Tuple list cannot be empty.");for(let s of o)if(!Array.isArray(s))throw new Error("Malformed query template. Tuple expected.");yield{...i,value:o,argType:r?.[n]},n++;break}}}function*ac(e){switch(e.type){case"parameter":yield e.value;break;case"stringChunk":break;case"parameterTuple":yield*e.value;break;case"parameterTupleList":for(let t of e.value)yield*t;break}}function zd(e,t,r){let n=0,i=0;for(let s of xo(e,t,void 0)){let a=0;for(let f of ac(s))a++;i=Math.max(i,a),n+=a}let o=[[]];for(let s of xo(e,t,void 0))switch(s.type){case"parameter":{for(let a of o)a.push(s.value);break}case"stringChunk":break;case"parameterTuple":{let a=s.value.length,f=[];if(r&&o.length===1&&a===i&&n>r&&n-af.map(A=>[...E,A]));break}case"parameterTupleList":{let a=s.value.reduce((R,S)=>R+S.length,0),f=[],E=[],A=0;for(let R of s.value)r&&o.length===1&&a===i&&E.length>0&&n-a+A+R.length>r&&(f.push(E),E=[],A=0),E.push(R),A+=R.length;E.length>0&&f.push(E),o=o.flatMap(R=>f.map(S=>[...R,S]));break}}return o}function Yd(e,t){let r=[];for(let n=0;nt.reduce((r,n,i)=>{let o=e.columnNames[i].split("."),s=r;for(let a=0;aZd(t)),rows:e.rows.map(t=>t.map((r,n)=>Ft(r,e.columnTypes[n])))}}function Ft(e,t){if(e===null)return null;switch(t){case O.Int32:switch(typeof e){case"number":return Math.trunc(e);case"string":return Math.trunc(Number(e));default:throw new Error(`Cannot serialize value of type ${typeof e} as Int32`)}case O.Int32Array:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as Int32Array`);return e.map(r=>Ft(r,O.Int32));case O.Int64:switch(typeof e){case"number":return BigInt(Math.trunc(e));case"string":return e;default:throw new Error(`Cannot serialize value of type ${typeof e} as Int64`)}case O.Int64Array:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as Int64Array`);return e.map(r=>Ft(r,O.Int64));case O.Json:switch(typeof e){case"string":return JSON.parse(e);default:throw new Error(`Cannot serialize value of type ${typeof e} as Json`)}case O.JsonArray:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as JsonArray`);return e.map(r=>Ft(r,O.Json));case O.Bytes:if(Array.isArray(e))return new Uint8Array(e);throw new Error(`Cannot serialize value of type ${typeof e} as Bytes`);case O.BytesArray:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as BytesArray`);return e.map(r=>Ft(r,O.Bytes));case O.Boolean:switch(typeof e){case"boolean":return e;case"string":return e==="true"||e==="1";case"number":return e===1;default:throw new Error(`Cannot serialize value of type ${typeof e} as Boolean`)}case O.BooleanArray:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as BooleanArray`);return e.map(r=>Ft(r,O.Boolean));default:return e}}function Zd(e){switch(e){case O.Int32:return"int";case O.Int64:return"bigint";case O.Float:return"float";case O.Double:return"double";case O.Text:return"string";case O.Enum:return"enum";case O.Bytes:return"bytes";case O.Boolean:return"bool";case O.Character:return"char";case O.Numeric:return"decimal";case O.Json:return"json";case O.Uuid:return"uuid";case O.DateTime:return"datetime";case O.Date:return"date";case O.Time:return"time";case O.Int32Array:return"int-array";case O.Int64Array:return"bigint-array";case O.FloatArray:return"float-array";case O.DoubleArray:return"double-array";case O.TextArray:return"string-array";case O.EnumArray:return"string-array";case O.BytesArray:return"bytes-array";case O.BooleanArray:return"bool-array";case O.CharacterArray:return"char-array";case O.NumericArray:return"decimal-array";case O.JsonArray:return"json-array";case O.UuidArray:return"uuid-array";case O.DateTimeArray:return"datetime-array";case O.DateArray:return"date-array";case O.TimeArray:return"time-array";case O.UnknownNumber:return"unknown";case O.Set:return"string";default:$(e,`Unexpected column type: ${e}`)}}c();u();p();m();d();l();function uc(e,t,r){if(!t.every(n=>To(e,n))){let n=Xd(e,r),i=ef(r);throw new ue(n,i,r.context)}}function To(e,t){switch(t.type){case"rowCountEq":return Array.isArray(e)?e.length===t.args:e===null?t.args===0:t.args===1;case"rowCountNeq":return Array.isArray(e)?e.length!==t.args:e===null?t.args!==0:t.args!==1;case"affectedRowCountEq":return e===t.args;case"never":return!1;default:$(t,`Unknown rule type: ${t.type}`)}}function Xd(e,t){switch(t.error_identifier){case"RELATION_VIOLATION":return`The change you are trying to make would violate the required relation '${t.context.relation}' between the \`${t.context.modelA}\` and \`${t.context.modelB}\` models.`;case"MISSING_RECORD":return`An operation failed because it depends on one or more records that were required but not found. No record was found for ${t.context.operation}.`;case"MISSING_RELATED_RECORD":{let r=t.context.neededFor?` (needed to ${t.context.neededFor})`:"";return`An operation failed because it depends on one or more records that were required but not found. No '${t.context.model}' record${r} was found for ${t.context.operation} on ${t.context.relationType} relation '${t.context.relation}'.`}case"INCOMPLETE_CONNECT_INPUT":return`An operation failed because it depends on one or more records that were required but not found. Expected ${t.context.expectedRows} records to be connected, found only ${Array.isArray(e)?e.length:e}.`;case"INCOMPLETE_CONNECT_OUTPUT":return`The required connected records were not found. Expected ${t.context.expectedRows} records to be connected after connect operation on ${t.context.relationType} relation '${t.context.relation}', found ${Array.isArray(e)?e.length:e}.`;case"RECORDS_NOT_CONNECTED":return`The records for relation \`${t.context.relation}\` between the \`${t.context.parent}\` and \`${t.context.child}\` models are not connected.`;default:$(t,`Unknown error identifier: ${t}`)}}function ef(e){switch(e.error_identifier){case"RELATION_VIOLATION":return"P2014";case"RECORDS_NOT_CONNECTED":return"P2017";case"INCOMPLETE_CONNECT_OUTPUT":return"P2018";case"MISSING_RECORD":case"MISSING_RELATED_RECORD":case"INCOMPLETE_CONNECT_INPUT":return"P2025";default:$(e,`Unknown error identifier: ${e}`)}}var Cr=class e{#e;#t;#r;#n=new Qn;#s;#i;#a;#o;#c;constructor({transactionManager:t,placeholderValues:r,onQuery:n,tracingHelper:i,serializer:o,rawSerializer:s,provider:a,connectionInfo:f}){this.#e=t,this.#t=r,this.#r=n,this.#s=i,this.#i=o,this.#a=s??o,this.#o=a,this.#c=f}static forSql(t){return new e({transactionManager:t.transactionManager,placeholderValues:t.placeholderValues,onQuery:t.onQuery,tracingHelper:t.tracingHelper,serializer:lc,rawSerializer:cc,provider:t.provider,connectionInfo:t.connectionInfo})}async run(t,r){let{value:n}=await this.interpretNode(t,r,this.#t,this.#n.snapshot()).catch(i=>_t(i));return n}async interpretNode(t,r,n,i){switch(t.type){case"value":return{value:Te(t.args,n,i)};case"seq":{let o;for(let s of t.args)o=await this.interpretNode(s,r,n,i);return o??{value:void 0}}case"get":return{value:n[t.args.name]};case"let":{let o=Object.create(n);for(let s of t.args.bindings){let{value:a}=await this.interpretNode(s.expr,r,o,i);o[s.name]=a}return this.interpretNode(t.args.expr,r,o,i)}case"getFirstNonEmpty":{for(let o of t.args.names){let s=n[o];if(!pc(s))return{value:s}}return{value:[]}}case"concat":{let o=await Promise.all(t.args.map(s=>this.interpretNode(s,r,n,i).then(a=>a.value)));return{value:o.length>0?o.reduce((s,a)=>s.concat(vo(a)),[]):[]}}case"sum":{let o=await Promise.all(t.args.map(s=>this.interpretNode(s,r,n,i).then(a=>a.value)));return{value:o.length>0?o.reduce((s,a)=>De(s)+De(a)):0}}case"execute":{let o=Po(t.args,n,i,this.#l()),s=0;for(let a of o)s+=await this.#u(a,r,()=>r.executeRaw(a).catch(f=>t.args.type==="rawSql"?Ji(f):_t(f)));return{value:s}}case"query":{let o=Po(t.args,n,i,this.#l()),s;for(let a of o){let f=await this.#u(a,r,()=>r.queryRaw(a).catch(E=>t.args.type==="rawSql"?Ji(E):_t(E)));s===void 0?s=f:(s.rows.push(...f.rows),s.lastInsertId=f.lastInsertId)}return{value:t.args.type==="rawSql"?this.#a(s):this.#i(s),lastInsertId:s?.lastInsertId}}case"reverse":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);return{value:Array.isArray(o)?o.reverse():o,lastInsertId:s}}case"unique":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);if(!Array.isArray(o))return{value:o,lastInsertId:s};if(o.length>1)throw new Error(`Expected zero or one element, got ${o.length}`);return{value:o[0]??null,lastInsertId:s}}case"required":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);if(pc(o))throw new Error("Required value is empty");return{value:o,lastInsertId:s}}case"mapField":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.records,r,n,i);return{value:mc(o,t.args.field),lastInsertId:s}}case"join":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.parent,r,n,i);if(o===null)return{value:null,lastInsertId:s};let a=await Promise.all(t.args.children.map(async f=>({joinExpr:f,childRecords:(await this.interpretNode(f.child,r,n,i)).value})));return{value:tf(o,a),lastInsertId:s}}case"transaction":{if(!this.#e.enabled)return this.interpretNode(t.args,r,n,i);let o=this.#e.manager,s=await o.startTransaction(),a=await o.getTransaction(s,"query");try{let f=await this.interpretNode(t.args,a,n,i);return await o.commitTransaction(s.id),f}catch(f){throw await o.rollbackTransaction(s.id),f}}case"dataMap":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return{value:nl(o,t.args.structure,t.args.enums),lastInsertId:s}}case"validate":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return uc(o,t.args.rules,t.args),{value:o,lastInsertId:s}}case"if":{let{value:o}=await this.interpretNode(t.args.value,r,n,i);return To(o,t.args.rule)?await this.interpretNode(t.args.then,r,n,i):await this.interpretNode(t.args.else,r,n,i)}case"unit":return{value:void 0};case"diff":{let{value:o}=await this.interpretNode(t.args.from,r,n,i),{value:s}=await this.interpretNode(t.args.to,r,n,i),a=new Set(vo(s).map(f=>JSON.stringify(f)));return{value:vo(o).filter(f=>!a.has(JSON.stringify(f)))}}case"process":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return{value:Hn(o,t.args.operations),lastInsertId:s}}case"initializeRecord":{let{lastInsertId:o}=await this.interpretNode(t.args.expr,r,n,i),s={};for(let[a,f]of Object.entries(t.args.fields))s[a]=rf(f,o,n,i);return{value:s,lastInsertId:o}}case"mapRecord":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i),a=o===null?{}:Ao(o);for(let[f,E]of Object.entries(t.args.fields))a[f]=nf(E,a[f],n,i);return{value:a,lastInsertId:s}}default:$(t,`Unexpected node type: ${t.type}`)}}#l(){return this.#c?.maxBindValues!==void 0?this.#c.maxBindValues:this.#p()}#p(){if(this.#o!==void 0)switch(this.#o){case"cockroachdb":case"postgres":case"postgresql":case"prisma+postgres":return 32766;case"mysql":return 65535;case"sqlite":return 999;case"sqlserver":return 2098;case"mongodb":return;default:$(this.#o,`Unexpected provider: ${this.#o}`)}}#u(t,r,n){return Ln({query:t,execute:n,provider:this.#o??r.provider,tracingHelper:this.#s,onQuery:this.#r})}};function pc(e){return Array.isArray(e)?e.length===0:e==null}function vo(e){return Array.isArray(e)?e:[e]}function De(e){if(typeof e=="number")return e;if(typeof e=="string")return Number(e);throw new Error(`Expected number, got ${typeof e}`)}function Ao(e){if(typeof e=="object"&&e!==null)return e;throw new Error(`Expected object, got ${typeof e}`)}function mc(e,t){return Array.isArray(e)?e.map(r=>mc(r,t)):typeof e=="object"&&e!==null?e[t]??null:e}function tf(e,t){for(let{joinExpr:r,childRecords:n}of t){let i=r.on.map(([a])=>a),o=r.on.map(([,a])=>a),s={};for(let a of Array.isArray(e)?e:[e]){let f=Ao(a),E=Rr(f,i);s[E]||(s[E]=[]),s[E].push(f),r.isRelationUnique?f[r.parentField]=null:f[r.parentField]=[]}for(let a of Array.isArray(n)?n:[n]){if(a===null)continue;let f=Rr(Ao(a),o);for(let E of s[f]??[])r.isRelationUnique?E[r.parentField]=a:E[r.parentField].push(a)}}return e}function rf(e,t,r,n){switch(e.type){case"value":return Te(e.value,r,n);case"lastInsertId":return t;default:$(e,`Unexpected field initializer type: ${e.type}`)}}function nf(e,t,r,n){switch(e.type){case"set":return Te(e.value,r,n);case"add":return De(t)+De(Te(e.value,r,n));case"subtract":return De(t)-De(Te(e.value,r,n));case"multiply":return De(t)*De(Te(e.value,r,n));case"divide":{let i=De(t),o=De(Te(e.value,r,n));return o===0?null:i/o}default:$(e,`Unexpected field operation type: ${e.type}`)}}c();u();p();m();d();l();c();u();p();m();d();l();async function of(){return globalThis.crypto??await Promise.resolve().then(()=>(Xe(),Ei))}async function dc(){return(await of()).randomUUID()}c();u();p();m();d();l();var Ee=class extends ue{name="TransactionManagerError";constructor(t,r){super("Transaction API error: "+t,"P2028",r)}},Sr=class extends Ee{constructor(){super("Transaction not found. Transaction ID is invalid, refers to an old closed transaction Prisma doesn't have information about anymore, or was obtained before disconnecting.")}},Gn=class extends Ee{constructor(t){super(`Transaction already closed: A ${t} cannot be executed on a committed transaction.`)}},Jn=class extends Ee{constructor(t){super(`Transaction already closed: A ${t} cannot be executed on a transaction that was rolled back.`)}},Wn=class extends Ee{constructor(){super("Unable to start a transaction in the given time.")}},Kn=class extends Ee{constructor(t,{timeout:r,timeTaken:n}){super(`A ${t} cannot be executed on an expired transaction. The timeout for this transaction was ${r} ms, however ${n} ms passed since the start of the transaction. Consider increasing the interactive transaction timeout or doing less work in the transaction.`,{operation:t,timeout:r,timeTaken:n})}},$t=class extends Ee{constructor(t){super(`Internal Consistency Error: ${t}`)}},zn=class extends Ee{constructor(t){super(`Invalid isolation level: ${t}`,{isolationLevel:t})}};var sf=100,Ir=K("prisma:client:transactionManager"),af=()=>({sql:"COMMIT",args:[],argTypes:[]}),lf=()=>({sql:"ROLLBACK",args:[],argTypes:[]}),cf=()=>({sql:'-- Implicit "COMMIT" query via underlying driver',args:[],argTypes:[]}),uf=()=>({sql:'-- Implicit "ROLLBACK" query via underlying driver',args:[],argTypes:[]}),kr=class{transactions=new Map;closedTransactions=[];driverAdapter;transactionOptions;tracingHelper;#e;#t;constructor({driverAdapter:t,transactionOptions:r,tracingHelper:n,onQuery:i,provider:o}){this.driverAdapter=t,this.transactionOptions=r,this.tracingHelper=n,this.#e=i,this.#t=o}async startTransaction(t){return await this.tracingHelper.runInChildSpan("start_transaction",()=>this.#r(t))}async#r(t){let r=t!==void 0?this.#a(t):this.transactionOptions,n={id:await dc(),status:"waiting",timer:void 0,timeout:r.timeout,startedAt:Date.now(),transaction:void 0};this.transactions.set(n.id,n);let i=!1,o=setTimeout(()=>i=!0,r.maxWait);switch(n.transaction=await this.driverAdapter.startTransaction(r.isolationLevel).catch(_t),clearTimeout(o),n.status){case"waiting":if(i)throw await this.#i(n,"timed_out"),new Wn;return n.status="running",n.timer=this.#s(n.id,r.timeout),{id:n.id};case"timed_out":case"running":case"committed":case"rolled_back":throw new $t(`Transaction in invalid state ${n.status} although it just finished startup.`);default:$(n.status,"Unknown transaction status.")}}async commitTransaction(t){return await this.tracingHelper.runInChildSpan("commit_transaction",async()=>{let r=this.#n(t,"commit");await this.#i(r,"committed")})}async rollbackTransaction(t){return await this.tracingHelper.runInChildSpan("rollback_transaction",async()=>{let r=this.#n(t,"rollback");await this.#i(r,"rolled_back")})}async getTransaction(t,r){let n=this.#n(t.id,r);if(n.status==="closing"&&(await n.closing,n=this.#n(t.id,r)),!n.transaction)throw new Sr;return n.transaction}#n(t,r){let n=this.transactions.get(t);if(!n){let i=this.closedTransactions.find(o=>o.id===t);if(i)switch(Ir("Transaction already closed.",{transactionId:t,status:i.status}),i.status){case"closing":case"waiting":case"running":throw new $t("Active transaction found in closed transactions list.");case"committed":throw new Gn(r);case"rolled_back":throw new Jn(r);case"timed_out":throw new Kn(r,{timeout:i.timeout,timeTaken:Date.now()-i.startedAt})}else throw Ir("Transaction not found.",t),new Sr}if(["committed","rolled_back","timed_out"].includes(n.status))throw new $t("Closed transaction found in active transactions map.");return n}async cancelAllTransactions(){await Promise.allSettled([...this.transactions.values()].map(t=>this.#i(t,"rolled_back")))}#s(t,r){let n=Date.now();return setTimeout(async()=>{Ir("Transaction timed out.",{transactionId:t,timeoutStartedAt:n,timeout:r});let i=this.transactions.get(t);i&&["running","waiting"].includes(i.status)?await this.#i(i,"timed_out"):Ir("Transaction already committed or rolled back when timeout happened.",t)},r)}async#i(t,r){let n=async()=>{Ir("Closing transaction.",{transactionId:t.id,status:r});try{if(t.transaction&&r==="committed")if(t.transaction.options.usePhantomQuery)await this.#o(cf(),t.transaction,()=>t.transaction.commit());else{let i=af();await this.#o(i,t.transaction,()=>t.transaction.executeRaw(i)),await t.transaction.commit()}else if(t.transaction)if(t.transaction.options.usePhantomQuery)await this.#o(uf(),t.transaction,()=>t.transaction.rollback());else{let i=lf();await this.#o(i,t.transaction,()=>t.transaction.executeRaw(i)),await t.transaction.rollback()}}finally{t.status=r,clearTimeout(t.timer),t.timer=void 0,this.transactions.delete(t.id),this.closedTransactions.push(t),this.closedTransactions.length>sf&&this.closedTransactions.shift()}};t.status==="closing"?(await t.closing,this.#n(t.id,r==="committed"?"commit":"rollback")):await Object.assign(t,{status:"closing",reason:r,closing:n()}).closing}#a(t){if(!t.timeout)throw new Ee("timeout is required");if(!t.maxWait)throw new Ee("maxWait is required");if(t.isolationLevel==="SNAPSHOT")throw new zn(t.isolationLevel);return{...t,timeout:t.timeout,maxWait:t.maxWait}}#o(t,r,n){return Ln({query:t,execute:n,provider:this.#t??r.provider,tracingHelper:this.tracingHelper,onQuery:this.#e})}};var Yn="6.15.0";c();u();p();m();d();l();var Zn=class e{#e;#t;#r;#n;constructor(t,r,n){this.#e=t,this.#t=r,this.#r=n,this.#n=r.getConnectionInfo?.()}static async connect(t){let r,n;try{r=await t.driverAdapterFactory.connect(),n=new kr({driverAdapter:r,transactionOptions:t.transactionOptions,tracingHelper:t.tracingHelper,onQuery:t.onQuery,provider:t.provider})}catch(i){throw await r?.dispose(),i}return new e(t,r,n)}getConnectionInfo(){let t=this.#n??{supportsRelationJoins:!1};return Promise.resolve({provider:this.#t.provider,connectionInfo:t})}async execute({plan:t,placeholderValues:r,transaction:n,batchIndex:i}){let o=n?await this.#r.getTransaction(n,i!==void 0?"batch query":"query"):this.#t;return await Cr.forSql({transactionManager:n?{enabled:!1}:{enabled:!0,manager:this.#r},placeholderValues:r,onQuery:this.#e.onQuery,tracingHelper:this.#e.tracingHelper,provider:this.#e.provider,connectionInfo:this.#n}).run(t,o)}async startTransaction(t){return{...await this.#r.startTransaction(t),payload:void 0}}async commitTransaction(t){await this.#r.commitTransaction(t.id)}async rollbackTransaction(t){await this.#r.rollbackTransaction(t.id)}async disconnect(){try{await this.#r.cancelAllTransactions()}finally{await this.#t.dispose()}}};c();u();p();m();d();l();c();u();p();m();d();l();var Xn=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function fc(e,t,r){let n=r||{},i=n.encode||encodeURIComponent;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!Xn.test(e))throw new TypeError("argument name is invalid");let o=i(t);if(o&&!Xn.test(o))throw new TypeError("argument val is invalid");let s=e+"="+o;if(n.maxAge!==void 0&&n.maxAge!==null){let a=n.maxAge-0;if(Number.isNaN(a)||!Number.isFinite(a))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(a)}if(n.domain){if(!Xn.test(n.domain))throw new TypeError("option domain is invalid");s+="; Domain="+n.domain}if(n.path){if(!Xn.test(n.path))throw new TypeError("option path is invalid");s+="; Path="+n.path}if(n.expires){if(!mf(n.expires)||Number.isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":{s+="; Priority=Low";break}case"medium":{s+="; Priority=Medium";break}case"high":{s+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:{s+="; SameSite=Strict";break}case"lax":{s+="; SameSite=Lax";break}case"strict":{s+="; SameSite=Strict";break}case"none":{s+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(s+="; Partitioned"),s}function mf(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function gc(e,t){let r=(e||"").split(";").filter(f=>typeof f=="string"&&!!f.trim()),n=r.shift()||"",i=df(n),o=i.name,s=i.value;try{s=t?.decode===!1?s:(t?.decode||decodeURIComponent)(s)}catch{}let a={name:o,value:s};for(let f of r){let E=f.split("="),A=(E.shift()||"").trimStart().toLowerCase(),R=E.join("=");switch(A){case"expires":{a.expires=new Date(R);break}case"max-age":{a.maxAge=Number.parseInt(R,10);break}case"secure":{a.secure=!0;break}case"httponly":{a.httpOnly=!0;break}case"samesite":{a.sameSite=R;break}default:a[A]=R}}return a}function df(e){let t="",r="",n=e.split("=");return n.length>1?(t=n.shift(),r=n.join("=")):r=e,{name:t,value:r}}c();u();p();m();d();l();c();u();p();m();d();l();function Vt({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 Ot().id==="workerd"?new F(`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 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}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var ti=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ge=class extends ti{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};u();c();p();m();d();l();function N(e,t){return{...e,isRetryable:t}}var st=class extends ge{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,N(r,!1))}};D(st,"InvalidDatasourceError");function ri(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=$t({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof g<"u"?g.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,searchParams:s}=i;if(o!=="prisma:"&&o!==ln)throw new st(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new st(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let f=Ti(i)?"http:":"https:",w=new URL(i.href.replace(o,f));return{apiKey:a,url:w}}u();c();p();m();d();l();var Tu=Ae(As()),qt=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;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,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Tu.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};u();c();p();m();d();l();function bf(e){return e[0]*1e3+e[1]/1e6}function Bt(e){return new Date(bf(e))}var vu=K("prisma:client:clientEngine:remoteExecutor"),ni=class{#e;#t;#r;#n;#o;constructor(t){this.#e=t.clientVersion,this.#n=t.logEmitter,this.#o=t.tracingHelper;let{url:r,apiKey:n}=ri({clientVersion:t.clientVersion,env:t.env,inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources});this.#r=new Io(r),this.#t=new qt({apiKey:n,engineHash:t.clientVersion,logLevel:t.logLevel,logQueries:t.logQueries,tracingHelper:t.tracingHelper})}async getConnectionInfo(){return await this.#i({path:"/connection-info",method:"GET"})}async execute({plan:t,placeholderValues:r,batchIndex:n,model:i,operation:o,transaction:s,customFetch:a}){return(await this.#i({path:s?`/transaction/${s.id}/query`:"/query",method:"POST",body:{model:i,operation:o,plan:t,params:r},batchRequestIdx:n,fetch:a})).data}async startTransaction(t){return{...await this.#i({path:"/transaction/start",method:"POST",body:t}),payload:void 0}}async commitTransaction(t){await this.#i({path:`/transaction/${t.id}/commit`,method:"POST"})}async rollbackTransaction(t){await this.#i({path:`/transaction/${t.id}/rollback`,method:"POST"})}disconnect(){return Promise.resolve()}async#i({path:t,method:r,body:n,fetch:i=globalThis.fetch,batchRequestIdx:o}){let s=await this.#r.request({method:r,path:t,headers:this.#t.build(),body:n,fetch:i});s.ok||await this.#u(s,o);let a=await s.json();return typeof a.extensions=="object"&&a.extensions!==null&&this.#s(a.extensions),a}async#u(t,r){let n=t.headers.get("Prisma-Error-Code"),i=await t.text(),o,s=i;try{o=JSON.parse(i)}catch{o={}}typeof o.code=="string"&&(n=o.code),typeof o.error=="string"?s=o.error:typeof o.message=="string"?s=o.message:typeof o.InvalidRequestError=="object"&&o.InvalidRequestError!==null&&typeof o.InvalidRequestError.reason=="string"&&(s=o.InvalidRequestError.reason),s=s||`HTTP ${t.status}: ${t.statusText}`;let a=typeof o.meta=="object"&&o.meta!==null?o.meta:o;throw new X(s,{clientVersion:this.#e,code:n??"P6000",batchRequestIdx:r,meta:a})}#s(t){if(t.logs)for(let r of t.logs)this.#l(r);t.traces&&this.#o.dispatchEngineSpans(t.traces)}#l(t){switch(t.level){case"debug":case"trace":vu(t);break;case"error":case"warn":case"info":{this.#n.emit(t.level,{timestamp:Bt(t.timestamp),message:t.attributes.message??"",target:t.target});break}case"query":{this.#n.emit("query",{query:t.attributes.query??"",timestamp:Bt(t.timestamp),duration:t.attributes.duration_ms??0,params:t.attributes.params??"",target:t.target});break}default:throw new Error(`Unexpected log level: ${t.level}`)}}},Io=class{#e;#t;#r;constructor(t){this.#e=t,this.#t=new Map}async request({method:t,path:r,headers:n,body:i,fetch:o}){let s=new URL(r,this.#e),a=this.#n(s);a&&(n.Cookie=a),this.#r&&(n["Accelerate-Query-Engine-Jwt"]=this.#r);let f=await o(s,{method:t,body:i!==void 0?JSON.stringify(i):void 0,headers:n});return vu(t,s,f.status,f.statusText),this.#r=f.headers.get("Accelerate-Query-Engine-Jwt")??void 0,this.#o(s,f),f}#n(t){let r=[],n=new Date;for(let[i,o]of this.#t){if(o.expires&&o.expires0?r.join("; "):void 0}#o(t,r){let n=r.headers.getSetCookie?.()||[];if(n.length===0){let i=r.headers.get("Set-Cookie");i&&n.push(i)}for(let i of n){let o=Pu(i),s=o.domain??t.hostname,a=o.path??"/",f=`${s}:${a}:${o.name}`;this.#t.set(f,{name:o.name,value:o.value,domain:s,path:a,expires:o.expires})}}};u();c();p();m();d();l();var So,Au={async loadQueryCompiler(e){let{clientVersion:t,compilerWasm:r}=e;if(r===void 0)throw new F("WASM query compiler was unexpectedly `undefined`",t);return So===void 0&&(So=(async()=>{let n=await r.getRuntime(),i=await r.getQueryCompilerWasmModule();if(i==null)throw new F("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let o={"./query_compiler_bg.js":n},s=new WebAssembly.Instance(i,o),a=s.exports.__wbindgen_start;return n.__wbg_set_wasm(s.exports),a(),n.QueryCompiler})()),await So}};var Cu="P2038",Or=K("prisma:client:clientEngine"),Iu=globalThis;Iu.PRISMA_WASM_PANIC_REGISTRY={set_message(e){throw new le(e,Zn)}};var Dr=class{name="ClientEngine";#e;#t={type:"disconnected"};#r;#n;config;datamodel;logEmitter;logQueries;logLevel;tracingHelper;#o;constructor(t,r,n){if(!t.previewFeatures?.includes("driverAdapters")&&!r)throw new F("EngineType `client` requires the driverAdapters preview feature to be enabled.",t.clientVersion,Cu);if(r)this.#n={remote:!0};else if(t.adapter)this.#n={remote:!1,driverAdapterFactory:t.adapter},Or("Using driver adapter: %O",t.adapter);else throw new F("Missing configured driver adapter. Engine type `client` requires an active driver adapter. Please check your PrismaClient initialization code.",t.clientVersion,Cu);this.#r=n??Au,this.config=t,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug"),this.logQueries&&(this.#o=i=>{this.logEmitter.emit("query",{...i,params:wr(i.params),target:"ClientEngine"})})}applyPendingMigrations(){throw new Error("Cannot call applyPendingMigrations on engine type client.")}async#i(){switch(this.#t.type){case"disconnected":{let t=this.tracingHelper.runInChildSpan("connect",async()=>{let r,n;try{r=await this.#u(),n=await this.#s(r)}catch(o){throw this.#t={type:"disconnected"},n?.free(),await r?.disconnect(),o}let i={executor:r,queryCompiler:n};return this.#t={type:"connected",engine:i},i});return this.#t={type:"connecting",promise:t},await t}case"connecting":return await this.#t.promise;case"connected":return this.#t.engine;case"disconnecting":return await this.#t.promise,await this.#i()}}async#u(){return this.#n.remote?new ni({clientVersion:this.config.clientVersion,env:this.config.env,inlineDatasources:this.config.inlineDatasources,logEmitter:this.logEmitter,logLevel:this.logLevel,logQueries:this.logQueries,overrideDatasources:this.config.overrideDatasources,tracingHelper:this.tracingHelper}):await Xn.connect({driverAdapterFactory:this.#n.driverAdapterFactory,tracingHelper:this.tracingHelper,transactionOptions:{...this.config.transactionOptions,isolationLevel:this.#m(this.config.transactionOptions.isolationLevel)},onQuery:this.#o,provider:this.config.activeProvider})}async#s(t){let r=this.#e;r===void 0&&(r=await this.#r.loadQueryCompiler(this.config),this.#e=r);let{provider:n,connectionInfo:i}=await t.getConnectionInfo();try{return this.#c(()=>new r({datamodel:this.datamodel,provider:n,connectionInfo:i}),void 0,!1)}catch(o){throw this.#l(o)}}#l(t){if(t instanceof le)return t;try{let r=JSON.parse(t.message);return new F(r.message,this.config.clientVersion,r.error_code)}catch{return t}}#a(t,r){if(t instanceof F)return t;if(t.code==="GenericFailure"&&t.message?.startsWith("PANIC:"))return new le(Ru(this,t.message,r),this.config.clientVersion);if(t instanceof ce)return new X(t.message,{code:t.code,meta:t.meta,clientVersion:this.config.clientVersion});try{let n=JSON.parse(t);return new ne(`${n.message} -${n.backtrace}`,{clientVersion:this.config.clientVersion})}catch{return t}}#p(t){return t instanceof le?t:typeof t.message=="string"&&typeof t.code=="string"?new X(t.message,{code:t.code,meta:t.meta,clientVersion:this.config.clientVersion}):typeof t.message=="string"?new ne(t.message,{clientVersion:this.config.clientVersion}):t}#c(t,r,n=!0){let i=Iu.PRISMA_WASM_PANIC_REGISTRY.set_message,o;globalThis.PRISMA_WASM_PANIC_REGISTRY.set_message=s=>{o=s};try{return t()}finally{if(globalThis.PRISMA_WASM_PANIC_REGISTRY.set_message=i,o)throw this.#e=void 0,n&&this.stop().catch(s=>Or("failed to disconnect:",s)),new le(Ru(this,o,r),this.config.clientVersion)}}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the client engine, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){await this.#i()}async stop(){switch(this.#t.type){case"disconnected":return;case"connecting":return await this.#t.promise,await this.stop();case"connected":{let t=this.#t.engine,r=this.tracingHelper.runInChildSpan("disconnect",async()=>{try{await t.executor.disconnect(),t.queryCompiler.free()}finally{this.#t={type:"disconnected"}}});return this.#t={type:"disconnecting",promise:r},await r}case"disconnecting":return await this.#t.promise}}version(){return"unknown"}async transaction(t,r,n){let i,{executor:o}=await this.#i();try{if(t==="start"){let s=n;i=await o.startTransaction({...s,isolationLevel:this.#m(s.isolationLevel)})}else if(t==="commit"){let s=n;await o.commitTransaction(s)}else if(t==="rollback"){let s=n;await o.rollbackTransaction(s)}else Ne(t,"Invalid transaction action.")}catch(s){throw this.#a(s)}return i?{id:i.id,payload:void 0}:void 0}async request(t,{interactiveTransaction:r,customDataProxyFetch:n}){Or("sending request");let i=JSON.stringify(t),{executor:o,queryCompiler:s}=await this.#i().catch(f=>{throw this.#a(f,i)}),a;try{a=this.#c(()=>s.compile(i),i)}catch(f){throw this.#p(f)}try{Or("query plan created",a);let f={},w=await o.execute({plan:a,model:t.modelName,operation:t.action,placeholderValues:f,transaction:r,batchIndex:void 0,customFetch:n?.(globalThis.fetch)});return Or("query plan executed"),{data:{[t.action]:w}}}catch(f){throw this.#a(f,i)}}async requestBatch(t,{transaction:r,customDataProxyFetch:n}){if(t.length===0)return[];let i=t[0].action,o=JSON.stringify(St(t,r)),{executor:s,queryCompiler:a}=await this.#i().catch(w=>{throw this.#a(w,o)}),f;try{f=a.compileBatch(o)}catch(w){throw this.#p(w)}try{let w;r?.kind==="itx"&&(w=r.options);let A={};switch(f.type){case"multi":{if(r?.kind!=="itx"){let R=r?.options.isolationLevel?{...this.config.transactionOptions,isolationLevel:r.options.isolationLevel}:this.config.transactionOptions;w=await this.transaction("start",{},R)}let C=[],I=!1;for(let[R,L]of f.plans.entries())try{let k=await s.execute({plan:L,placeholderValues:A,model:t[R].modelName,operation:t[R].action,batchIndex:R,transaction:w,customFetch:n?.(globalThis.fetch)});C.push({data:{[t[R].action]:k}})}catch(k){C.push(k),I=!0;break}return w!==void 0&&r?.kind!=="itx"&&(I?await this.transaction("rollback",{},w):await this.transaction("commit",{},w)),C}case"compacted":{if(!t.every(R=>R.action===i))throw new Error("All queries in a batch must have the same action");let C=await s.execute({plan:f.plan,placeholderValues:A,model:t[0].modelName,operation:i,batchIndex:void 0,transaction:w,customFetch:n?.(globalThis.fetch)});return nl(C,f).map(R=>({data:{[i]:R}}))}}}catch(w){throw this.#a(w,o)}}metrics(t){throw new Error("Method not implemented.")}#m(t){switch(t){case void 0:return;case"ReadUncommitted":return"READ UNCOMMITTED";case"ReadCommitted":return"READ COMMITTED";case"RepeatableRead":return"REPEATABLE READ";case"Serializable":return"SERIALIZABLE";case"Snapshot":return"SNAPSHOT";default:throw new X(`Inconsistent column data: Conversion failed: Invalid isolation level \`${t}\``,{code:"P2023",clientVersion:this.config.clientVersion,meta:{providedIsolationLevel:t}})}}};function Ru(e,t,r){return za({binaryTarget:void 0,title:t,version:e.config.clientVersion,engineVersion:"unknown",database:e.config.activeProvider,query:r})}u();c();p();m();d();l();u();c();p();m();d();l();var jt=class extends ge{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",N(t,!0))}};D(jt,"ForcedRetryError");u();c();p();m();d();l();var at=class extends ge{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,N(r,!1))}};D(at,"NotImplementedYetError");u();c();p();m();d();l();u();c();p();m();d();l();var Q=class extends ge{response;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{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",N(t,!0))}};D(lt,"SchemaMissingError");u();c();p();m();d();l();u();c();p();m();d();l();var ko="This request could not be understood by the server",_r=class extends Q{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||ko,N(t,!1)),n&&(this.code=n)}};D(_r,"BadRequestError");u();c();p();m();d();l();var Mr=class extends Q{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",N(t,!0)),this.logs=r}};D(Mr,"HealthcheckTimeoutError");u();c();p();m();d();l();var Nr=class extends Q{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,N(t,!0)),this.logs=n}};D(Nr,"EngineStartupError");u();c();p();m();d();l();var Lr=class extends Q{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",N(t,!1))}};D(Lr,"EngineVersionNotSupportedError");u();c();p();m();d();l();var Oo="Request timed out",Ur=class extends Q{name="GatewayTimeoutError";code="P5009";constructor(t,r=Oo){super(r,N(t,!1))}};D(Ur,"GatewayTimeoutError");u();c();p();m();d();l();var Ef="Interactive transaction error",Fr=class extends Q{name="InteractiveTransactionError";code="P5015";constructor(t,r=Ef){super(r,N(t,!1))}};D(Fr,"InteractiveTransactionError");u();c();p();m();d();l();var xf="Request parameters are invalid",Vr=class extends Q{name="InvalidRequestError";code="P5011";constructor(t,r=xf){super(r,N(t,!1))}};D(Vr,"InvalidRequestError");u();c();p();m();d();l();var Do="Requested resource does not exist",$r=class extends Q{name="NotFoundError";code="P5003";constructor(t,r=Do){super(r,N(t,!1))}};D($r,"NotFoundError");u();c();p();m();d();l();var _o="Unknown server error",Qt=class extends Q{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||_o,N(t,!0)),this.logs=n}};D(Qt,"ServerError");u();c();p();m();d();l();var Mo="Unauthorized, check your connection string",qr=class extends Q{name="UnauthorizedError";code="P5007";constructor(t,r=Mo){super(r,N(t,!1))}};D(qr,"UnauthorizedError");u();c();p();m();d();l();var No="Usage exceeded, retry again later",Br=class extends Q{name="UsageExceededError";code="P5008";constructor(t,r=No){super(r,N(t,!0))}};D(Br,"UsageExceededError");async function Pf(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 jr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await Pf(e);if(n.type==="QueryEngineError")throw new X(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Qt(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 Lr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Nr(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 Mr(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 Fr(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Vr(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new qr(r,Ht(Mo,n));if(e.status===404)return new $r(r,Ht(Do,n));if(e.status===429)throw new Br(r,Ht(No,n));if(e.status===504)throw new Ur(r,Ht(Oo,n));if(e.status>=500)throw new Qt(r,Ht(_o,n));if(e.status>=400)throw new _r(r,Ht(ko,n))}function Ht(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}u();c();p();m();d();l();function Su(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))}u();c();p();m();d();l();var Ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function ku(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,f,w,A;for(let C=0;C>18,a=(A&258048)>>12,f=(A&4032)>>6,w=A&63,r+=Ve[s]+Ve[a]+Ve[f]+Ve[w];return i==1?(A=t[o],s=(A&252)>>2,a=(A&3)<<4,r+=Ve[s]+Ve[a]+"=="):i==2&&(A=t[o]<<8|t[o+1],s=(A&64512)>>10,a=(A&1008)>>4,f=(A&15)<<2,r+=Ve[s]+Ve[a]+Ve[f]+"="),r}u();c();p();m();d();l();function Ou(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)}u();c();p();m();d();l();var Du={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};u();c();p();m();d();l();u();c();p();m();d();l();var Qr=class extends ge{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: -${t}`,N(r,!0))}};D(Qr,"RequestError");async function ut(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new Qr(a,{clientVersion:n,cause:s})}}var vf=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,_u=K("prisma:client:dataproxyEngine");async function Af(e,t){let r=Du["@prisma/engines-version"],n=t.clientVersion??"unknown";if(g.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return g.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.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&&vf.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,f,w]=s.split("."),A=Cf(`<=${a}.${f}.${w}`),C=await ut(A,{clientVersion:n});if(!C.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${C.status} ${C.statusText}, response body: ${await C.text()||""}`);let I=await C.text();_u("length of body fetched from unpkg.com",I.length);let R;try{R=JSON.parse(I)}catch(L){throw console.error("JSON.parse error: body fetched from unpkg.com: ",I),L}return R.version}throw new at("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Mu(e,t){let r=await Af(e,t);return _u("version",r),r}function Cf(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Nu=3,Hr=K("prisma:client:dataproxyEngine"),Gr=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){Ou(t),this.config=t,this.env=t.env,this.inlineSchema=ku(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{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new qt({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Mu(this.host,this.config),Hr("host",this.host),Hr("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":Hr(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:Bt(r.timestamp),message:r.attributes.message??"",target:r.target});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:Bt(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${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||Hr("schema response status",r.status);let n=await jr(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=St(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(f=>(f.extensions&&this.propagateResponseExtensions(f.extensions),"errors"in f?this.convertProtocolErrorsToClientError(f.errors):f))}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,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Hr("graphql response status",a.status),await this.handleError(await jr(a,this.clientVersion));let f=await a.json();if(f.extensions&&this.propagateResponseExtensions(f.extensions),"errors"in f)throw this.convertProtocolErrorsToClientError(f.errors);return"batchResult"in f?f.batchResult:f}})}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 f=await ut(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await jr(f,this.clientVersion));let w=await f.json(),{extensions:A}=w;A&&this.propagateResponseExtensions(A);let C=w.id,I=w["data-proxy"].endpoint;return{id:C,payload:{endpoint:I}}}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 jr(a,this.clientVersion));let f=await a.json(),{extensions:w}=f;w&&this.propagateResponseExtensions(w);return}}})}getURLAndAPIKey(){return ri({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}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 ge)||!i.isRetryable)throw i;if(r>=Nu)throw i instanceof jt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Nu} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Su(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 jt({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?_n(t[0],this.config.clientVersion,this.config.activeProvider):new ne(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};u();c();p();m();d();l();function Lu({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=k=>{i.push({_tag:"warning",value:k})},a=k=>{let M=k.join(` -`);o.push({_tag:"error",value:M})},f=!!e?.startsWith("prisma://"),w=un(e),A=!!t,C=f||w;!A&&r&&C&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let I=C||!r;A&&(I||n==="edge")&&(n==="edge"?a(["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."]):r?f&&a(["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."]):a(["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."]));let R={accelerate:I,ppg:w,driverAdapters:A};function L(k){return k.length>0}return L(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:R}:{ok:!0,diagnostics:{warnings:i},isUsing:R}}function Uu({copyEngine:e=!0},t){let r;try{r=$t({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...g.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Lu({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"wasm-compiler-edge"});for(let C of o.warnings)tr(...C.value);if(!n){let C=o.errors[0];throw new ie(C.value,{clientVersion:t.clientVersion})}let s=gt(t.generator),a=s==="library",f=s==="binary",w=s==="client",A=(i.accelerate||i.ppg)&&!i.driverAdapters;if(w)return new Dr(t,A);if(i.accelerate)return new Gr(t);i.driverAdapters,i.accelerate;{let C=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Ot().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 ie(C.join(` -`),{clientVersion:t.clientVersion})}return"wasm-compiler-edge"}u();c();p();m();d();l();function ii({generator:e}){return e?.previewFeatures??[]}u();c();p();m();d();l();var Fu=e=>({command:e});u();c();p();m();d();l();u();c();p();m();d();l();var Vu=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);u();c();p();m();d();l();l();function Gt(e){try{return $u(e,"fast")}catch{return $u(e,"slow")}}function $u(e,t){return JSON.stringify(e.map(r=>Bu(r,t)))}function Bu(e,t){if(Array.isArray(e))return e.map(r=>Bu(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(ht(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(ae.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(y.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(Rf(e))return{prisma__type:"bytes",prisma__value:y.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:y.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?ju(e):e}function Rf(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function ju(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(qu);let t={};for(let r of Object.keys(e))t[r]=qu(e[r]);return t}function qu(e){return typeof e=="bigint"?e.toString():ju(e)}var If=/^(\s*alter\s)/i,Qu=K("prisma:client");function Lo(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&If.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 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}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var ei=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ge=class extends ei{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};c();u();p();m();d();l();function N(e,t){return{...e,isRetryable:t}}var st=class extends ge{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,N(r,!1))}};D(st,"InvalidDatasourceError");function ti(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=Vt({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof g<"u"?g.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,searchParams:s}=i;if(o!=="prisma:"&&o!==ln)throw new st(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new st(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let f=Pi(i)?"http:":"https:",E=new URL(i.href.replace(o,f));return{apiKey:a,url:E}}c();u();p();m();d();l();var yc=Ae(Ts()),qt=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;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,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":yc.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};c();u();p();m();d();l();function ff(e){return e[0]*1e3+e[1]/1e6}function Bt(e){return new Date(ff(e))}var hc=K("prisma:client:clientEngine:remoteExecutor"),ri=class{#e;#t;#r;#n;#s;constructor(t){this.#e=t.clientVersion,this.#n=t.logEmitter,this.#s=t.tracingHelper;let{url:r,apiKey:n}=ti({clientVersion:t.clientVersion,env:t.env,inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources});this.#r=new Ro(r),this.#t=new qt({apiKey:n,engineHash:t.clientVersion,logLevel:t.logLevel,logQueries:t.logQueries,tracingHelper:t.tracingHelper})}async getConnectionInfo(){return await this.#i({path:"/connection-info",method:"GET"})}async execute({plan:t,placeholderValues:r,batchIndex:n,model:i,operation:o,transaction:s,customFetch:a}){return(await this.#i({path:s?`/transaction/${s.id}/query`:"/query",method:"POST",body:{model:i,operation:o,plan:t,params:r},batchRequestIdx:n,fetch:a})).data}async startTransaction(t){return{...await this.#i({path:"/transaction/start",method:"POST",body:t}),payload:void 0}}async commitTransaction(t){await this.#i({path:`/transaction/${t.id}/commit`,method:"POST"})}async rollbackTransaction(t){await this.#i({path:`/transaction/${t.id}/rollback`,method:"POST"})}disconnect(){return Promise.resolve()}async#i({path:t,method:r,body:n,fetch:i=globalThis.fetch,batchRequestIdx:o}){let s=await this.#r.request({method:r,path:t,headers:this.#t.build(),body:n,fetch:i});s.ok||await this.#a(s,o);let a=await s.json();return typeof a.extensions=="object"&&a.extensions!==null&&this.#o(a.extensions),a}async#a(t,r){let n=t.headers.get("Prisma-Error-Code"),i=await t.text(),o,s=i;try{o=JSON.parse(i)}catch{o={}}typeof o.code=="string"&&(n=o.code),typeof o.error=="string"?s=o.error:typeof o.message=="string"?s=o.message:typeof o.InvalidRequestError=="object"&&o.InvalidRequestError!==null&&typeof o.InvalidRequestError.reason=="string"&&(s=o.InvalidRequestError.reason),s=s||`HTTP ${t.status}: ${t.statusText}`;let a=typeof o.meta=="object"&&o.meta!==null?o.meta:o;throw new X(s,{clientVersion:this.#e,code:n??"P6000",batchRequestIdx:r,meta:a})}#o(t){if(t.logs)for(let r of t.logs)this.#c(r);t.traces&&this.#s.dispatchEngineSpans(t.traces)}#c(t){switch(t.level){case"debug":case"trace":hc(t);break;case"error":case"warn":case"info":{this.#n.emit(t.level,{timestamp:Bt(t.timestamp),message:t.attributes.message??"",target:t.target});break}case"query":{this.#n.emit("query",{query:t.attributes.query??"",timestamp:Bt(t.timestamp),duration:t.attributes.duration_ms??0,params:t.attributes.params??"",target:t.target});break}default:throw new Error(`Unexpected log level: ${t.level}`)}}},Ro=class{#e;#t;#r;constructor(t){this.#e=t,this.#t=new Map}async request({method:t,path:r,headers:n,body:i,fetch:o}){let s=new URL(r,this.#e),a=this.#n(s);a&&(n.Cookie=a),this.#r&&(n["Accelerate-Query-Engine-Jwt"]=this.#r);let f=await o(s.href,{method:t,body:i!==void 0?JSON.stringify(i):void 0,headers:n});return hc(t,s,f.status,f.statusText),this.#r=f.headers.get("Accelerate-Query-Engine-Jwt")??void 0,this.#s(s,f),f}#n(t){let r=[],n=new Date;for(let[i,o]of this.#t){if(o.expires&&o.expires0?r.join("; "):void 0}#s(t,r){let n=r.headers.getSetCookie?.()||[];if(n.length===0){let i=r.headers.get("Set-Cookie");i&&n.push(i)}for(let i of n){let o=gc(i),s=o.domain??t.hostname,a=o.path??"/",f=`${s}:${a}:${o.name}`;this.#t.set(f,{name:o.name,value:o.value,domain:s,path:a,expires:o.expires})}}};c();u();p();m();d();l();var Co,wc={async loadQueryCompiler(e){let{clientVersion:t,compilerWasm:r}=e;if(r===void 0)throw new F("WASM query compiler was unexpectedly `undefined`",t);return Co===void 0&&(Co=(async()=>{let n=await r.getRuntime(),i=await r.getQueryCompilerWasmModule();if(i==null)throw new F("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let o={"./query_compiler_bg.js":n},s=new WebAssembly.Instance(i,o),a=s.exports.__wbindgen_start;return n.__wbg_set_wasm(s.exports),a(),n.QueryCompiler})()),await Co}};var bc="P2038",Or=K("prisma:client:clientEngine"),xc=globalThis;xc.PRISMA_WASM_PANIC_REGISTRY={set_message(e){throw new le(e,Yn)}};var Dr=class{name="ClientEngine";#e;#t={type:"disconnected"};#r;#n;config;datamodel;logEmitter;logQueries;logLevel;tracingHelper;#s;constructor(t,r,n){if(!t.previewFeatures?.includes("driverAdapters")&&!r)throw new F("EngineType `client` requires the driverAdapters preview feature to be enabled.",t.clientVersion,bc);if(r)this.#n={remote:!0};else if(t.adapter)this.#n={remote:!1,driverAdapterFactory:t.adapter},Or("Using driver adapter: %O",t.adapter);else throw new F("Missing configured driver adapter. Engine type `client` requires an active driver adapter. Please check your PrismaClient initialization code.",t.clientVersion,bc);this.#r=n??wc,this.config=t,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug"),this.logQueries&&(this.#s=i=>{this.logEmitter.emit("query",{...i,params:wr(i.params),target:"ClientEngine"})})}applyPendingMigrations(){throw new Error("Cannot call applyPendingMigrations on engine type client.")}async#i(){switch(this.#t.type){case"disconnected":{let t=this.tracingHelper.runInChildSpan("connect",async()=>{let r,n;try{r=await this.#a(),n=await this.#o(r)}catch(o){throw this.#t={type:"disconnected"},n?.free(),await r?.disconnect(),o}let i={executor:r,queryCompiler:n};return this.#t={type:"connected",engine:i},i});return this.#t={type:"connecting",promise:t},await t}case"connecting":return await this.#t.promise;case"connected":return this.#t.engine;case"disconnecting":return await this.#t.promise,await this.#i()}}async#a(){return this.#n.remote?new ri({clientVersion:this.config.clientVersion,env:this.config.env,inlineDatasources:this.config.inlineDatasources,logEmitter:this.logEmitter,logLevel:this.logLevel,logQueries:this.logQueries,overrideDatasources:this.config.overrideDatasources,tracingHelper:this.tracingHelper}):await Zn.connect({driverAdapterFactory:this.#n.driverAdapterFactory,tracingHelper:this.tracingHelper,transactionOptions:{...this.config.transactionOptions,isolationLevel:this.#m(this.config.transactionOptions.isolationLevel)},onQuery:this.#s,provider:this.config.activeProvider})}async#o(t){let r=this.#e;r===void 0&&(r=await this.#r.loadQueryCompiler(this.config),this.#e=r);let{provider:n,connectionInfo:i}=await t.getConnectionInfo();try{return this.#u(()=>new r({datamodel:this.datamodel,provider:n,connectionInfo:i}),void 0,!1)}catch(o){throw this.#c(o)}}#c(t){if(t instanceof le)return t;try{let r=JSON.parse(t.message);return new F(r.message,this.config.clientVersion,r.error_code)}catch{return t}}#l(t,r){if(t instanceof F)return t;if(t.code==="GenericFailure"&&t.message?.startsWith("PANIC:"))return new le(Ec(this,t.message,r),this.config.clientVersion);if(t instanceof ue)return new X(t.message,{code:t.code,meta:t.meta,clientVersion:this.config.clientVersion});try{let n=JSON.parse(t);return new ne(`${n.message} +${n.backtrace}`,{clientVersion:this.config.clientVersion})}catch{return t}}#p(t){return t instanceof le?t:typeof t.message=="string"&&typeof t.code=="string"?new X(t.message,{code:t.code,meta:t.meta,clientVersion:this.config.clientVersion}):typeof t.message=="string"?new ne(t.message,{clientVersion:this.config.clientVersion}):t}#u(t,r,n=!0){let i=xc.PRISMA_WASM_PANIC_REGISTRY.set_message,o;globalThis.PRISMA_WASM_PANIC_REGISTRY.set_message=s=>{o=s};try{return t()}finally{if(globalThis.PRISMA_WASM_PANIC_REGISTRY.set_message=i,o)throw this.#e=void 0,n&&this.stop().catch(s=>Or("failed to disconnect:",s)),new le(Ec(this,o,r),this.config.clientVersion)}}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the client engine, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){await this.#i()}async stop(){switch(this.#t.type){case"disconnected":return;case"connecting":return await this.#t.promise,await this.stop();case"connected":{let t=this.#t.engine,r=this.tracingHelper.runInChildSpan("disconnect",async()=>{try{await t.executor.disconnect(),t.queryCompiler.free()}finally{this.#t={type:"disconnected"}}});return this.#t={type:"disconnecting",promise:r},await r}case"disconnecting":return await this.#t.promise}}version(){return"unknown"}async transaction(t,r,n){let i,{executor:o}=await this.#i();try{if(t==="start"){let s=n;i=await o.startTransaction({...s,isolationLevel:this.#m(s.isolationLevel)})}else if(t==="commit"){let s=n;await o.commitTransaction(s)}else if(t==="rollback"){let s=n;await o.rollbackTransaction(s)}else Ne(t,"Invalid transaction action.")}catch(s){throw this.#l(s)}return i?{id:i.id,payload:void 0}:void 0}async request(t,{interactiveTransaction:r,customDataProxyFetch:n}){Or("sending request");let i=JSON.stringify(t),{executor:o,queryCompiler:s}=await this.#i().catch(f=>{throw this.#l(f,i)}),a;try{a=this.#u(()=>s.compile(i),i)}catch(f){throw this.#p(f)}try{Or("query plan created",a);let f={},E=await o.execute({plan:a,model:t.modelName,operation:t.action,placeholderValues:f,transaction:r,batchIndex:void 0,customFetch:n?.(globalThis.fetch)});return Or("query plan executed"),{data:{[t.action]:E}}}catch(f){throw this.#l(f,i)}}async requestBatch(t,{transaction:r,customDataProxyFetch:n}){if(t.length===0)return[];let i=t[0].action,o=JSON.stringify(It(t,r)),{executor:s,queryCompiler:a}=await this.#i().catch(E=>{throw this.#l(E,o)}),f;try{f=a.compileBatch(o)}catch(E){throw this.#p(E)}try{let E;r?.kind==="itx"&&(E=r.options);let A={};switch(f.type){case"multi":{if(r?.kind!=="itx"){let C=r?.options.isolationLevel?{...this.config.transactionOptions,isolationLevel:r.options.isolationLevel}:this.config.transactionOptions;E=await this.transaction("start",{},C)}let R=[],S=!1;for(let[C,L]of f.plans.entries())try{let k=await s.execute({plan:L,placeholderValues:A,model:t[C].modelName,operation:t[C].action,batchIndex:C,transaction:E,customFetch:n?.(globalThis.fetch)});R.push({data:{[t[C].action]:k}})}catch(k){R.push(k),S=!0;break}return E!==void 0&&r?.kind!=="itx"&&(S?await this.transaction("rollback",{},E):await this.transaction("commit",{},E)),R}case"compacted":{if(!t.every(C=>C.action===i))throw new Error("All queries in a batch must have the same action");let R=await s.execute({plan:f.plan,placeholderValues:A,model:t[0].modelName,operation:i,batchIndex:void 0,transaction:E,customFetch:n?.(globalThis.fetch)});return tl(R,f).map(C=>({data:{[i]:C}}))}}}catch(E){throw this.#l(E,o)}}metrics(t){throw new Error("Method not implemented.")}#m(t){switch(t){case void 0:return;case"ReadUncommitted":return"READ UNCOMMITTED";case"ReadCommitted":return"READ COMMITTED";case"RepeatableRead":return"REPEATABLE READ";case"Serializable":return"SERIALIZABLE";case"Snapshot":return"SNAPSHOT";default:throw new X(`Inconsistent column data: Conversion failed: Invalid isolation level \`${t}\``,{code:"P2023",clientVersion:this.config.clientVersion,meta:{providedIsolationLevel:t}})}}};function Ec(e,t,r){return Wa({binaryTarget:void 0,title:t,version:e.config.clientVersion,engineVersion:"unknown",database:e.config.activeProvider,query:r})}c();u();p();m();d();l();c();u();p();m();d();l();var jt=class extends ge{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",N(t,!0))}};D(jt,"ForcedRetryError");c();u();p();m();d();l();var at=class extends ge{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,N(r,!1))}};D(at,"NotImplementedYetError");c();u();p();m();d();l();c();u();p();m();d();l();var Q=class extends ge{response;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{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",N(t,!0))}};D(lt,"SchemaMissingError");c();u();p();m();d();l();c();u();p();m();d();l();var So="This request could not be understood by the server",_r=class extends Q{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||So,N(t,!1)),n&&(this.code=n)}};D(_r,"BadRequestError");c();u();p();m();d();l();var Mr=class extends Q{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",N(t,!0)),this.logs=r}};D(Mr,"HealthcheckTimeoutError");c();u();p();m();d();l();var Nr=class extends Q{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,N(t,!0)),this.logs=n}};D(Nr,"EngineStartupError");c();u();p();m();d();l();var Lr=class extends Q{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",N(t,!1))}};D(Lr,"EngineVersionNotSupportedError");c();u();p();m();d();l();var Io="Request timed out",Ur=class extends Q{name="GatewayTimeoutError";code="P5009";constructor(t,r=Io){super(r,N(t,!1))}};D(Ur,"GatewayTimeoutError");c();u();p();m();d();l();var gf="Interactive transaction error",Fr=class extends Q{name="InteractiveTransactionError";code="P5015";constructor(t,r=gf){super(r,N(t,!1))}};D(Fr,"InteractiveTransactionError");c();u();p();m();d();l();var yf="Request parameters are invalid",$r=class extends Q{name="InvalidRequestError";code="P5011";constructor(t,r=yf){super(r,N(t,!1))}};D($r,"InvalidRequestError");c();u();p();m();d();l();var ko="Requested resource does not exist",Vr=class extends Q{name="NotFoundError";code="P5003";constructor(t,r=ko){super(r,N(t,!1))}};D(Vr,"NotFoundError");c();u();p();m();d();l();var Oo="Unknown server error",Qt=class extends Q{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||Oo,N(t,!0)),this.logs=n}};D(Qt,"ServerError");c();u();p();m();d();l();var Do="Unauthorized, check your connection string",qr=class extends Q{name="UnauthorizedError";code="P5007";constructor(t,r=Do){super(r,N(t,!1))}};D(qr,"UnauthorizedError");c();u();p();m();d();l();var _o="Usage exceeded, retry again later",Br=class extends Q{name="UsageExceededError";code="P5008";constructor(t,r=_o){super(r,N(t,!0))}};D(Br,"UsageExceededError");async function hf(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 jr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await hf(e);if(n.type==="QueryEngineError")throw new X(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Qt(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 Lr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Nr(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 Mr(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 Fr(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new $r(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new qr(r,Ht(Do,n));if(e.status===404)return new Vr(r,Ht(ko,n));if(e.status===429)throw new Br(r,Ht(_o,n));if(e.status===504)throw new Ur(r,Ht(Io,n));if(e.status>=500)throw new Qt(r,Ht(Oo,n));if(e.status>=400)throw new _r(r,Ht(So,n))}function Ht(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}c();u();p();m();d();l();function Pc(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))}c();u();p();m();d();l();var $e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Tc(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,f,E,A;for(let R=0;R>18,a=(A&258048)>>12,f=(A&4032)>>6,E=A&63,r+=$e[s]+$e[a]+$e[f]+$e[E];return i==1?(A=t[o],s=(A&252)>>2,a=(A&3)<<4,r+=$e[s]+$e[a]+"=="):i==2&&(A=t[o]<<8|t[o+1],s=(A&64512)>>10,a=(A&1008)>>4,f=(A&15)<<2,r+=$e[s]+$e[a]+$e[f]+"="),r}c();u();p();m();d();l();function vc(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)}c();u();p();m();d();l();var Ac={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};c();u();p();m();d();l();c();u();p();m();d();l();var Qr=class extends ge{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: +${t}`,N(r,!0))}};D(Qr,"RequestError");async function ct(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new Qr(a,{clientVersion:n,cause:s})}}var bf=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Rc=K("prisma:client:dataproxyEngine");async function Ef(e,t){let r=Ac["@prisma/engines-version"],n=t.clientVersion??"unknown";if(g.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return g.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.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&&bf.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,f,E]=s.split("."),A=xf(`<=${a}.${f}.${E}`),R=await ct(A,{clientVersion:n});if(!R.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${R.status} ${R.statusText}, response body: ${await R.text()||""}`);let S=await R.text();Rc("length of body fetched from unpkg.com",S.length);let C;try{C=JSON.parse(S)}catch(L){throw console.error("JSON.parse error: body fetched from unpkg.com: ",S),L}return C.version}throw new at("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Cc(e,t){let r=await Ef(e,t);return Rc("version",r),r}function xf(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Sc=3,Hr=K("prisma:client:dataproxyEngine"),Gr=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){vc(t),this.config=t,this.env=t.env,this.inlineSchema=Tc(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{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new qt({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Cc(this.host,this.config),Hr("host",this.host),Hr("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":Hr(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:Bt(r.timestamp),message:r.attributes.message??"",target:r.target});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:Bt(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await ct(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Hr("schema response status",r.status);let n=await jr(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=It(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(f=>(f.extensions&&this.propagateResponseExtensions(f.extensions),"errors"in f?this.convertProtocolErrorsToClientError(f.errors):f))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await ct(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Hr("graphql response status",a.status),await this.handleError(await jr(a,this.clientVersion));let f=await a.json();if(f.extensions&&this.propagateResponseExtensions(f.extensions),"errors"in f)throw this.convertProtocolErrorsToClientError(f.errors);return"batchResult"in f?f.batchResult:f}})}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 f=await ct(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await jr(f,this.clientVersion));let E=await f.json(),{extensions:A}=E;A&&this.propagateResponseExtensions(A);let R=E.id,S=E["data-proxy"].endpoint;return{id:R,payload:{endpoint:S}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await ct(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await jr(a,this.clientVersion));let f=await a.json(),{extensions:E}=f;E&&this.propagateResponseExtensions(E);return}}})}getURLAndAPIKey(){return ti({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}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 ge)||!i.isRetryable)throw i;if(r>=Sc)throw i instanceof jt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Sc} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Pc(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 jt({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?_n(t[0],this.config.clientVersion,this.config.activeProvider):new ne(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};c();u();p();m();d();l();function Ic({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=k=>{i.push({_tag:"warning",value:k})},a=k=>{let M=k.join(` +`);o.push({_tag:"error",value:M})},f=!!e?.startsWith("prisma://"),E=cn(e),A=!!t,R=f||E;!A&&r&&R&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let S=R||!r;A&&(S||n==="edge")&&(n==="edge"?a(["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."]):r?f&&a(["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."]):a(["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."]));let C={accelerate:S,ppg:E,driverAdapters:A};function L(k){return k.length>0}return L(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:C}:{ok:!0,diagnostics:{warnings:i},isUsing:C}}function kc({copyEngine:e=!0},t){let r;try{r=Vt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...g.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Ic({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"wasm-compiler-edge"});for(let R of o.warnings)tr(...R.value);if(!n){let R=o.errors[0];throw new ie(R.value,{clientVersion:t.clientVersion})}let s=gt(t.generator),a=s==="library",f=s==="binary",E=s==="client",A=(i.accelerate||i.ppg)&&!i.driverAdapters;if(E)return new Dr(t,A);if(i.accelerate)return new Gr(t);i.driverAdapters,i.accelerate;{let R=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Ot().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 ie(R.join(` +`),{clientVersion:t.clientVersion})}return"wasm-compiler-edge"}c();u();p();m();d();l();function ni({generator:e}){return e?.previewFeatures??[]}c();u();p();m();d();l();var Oc=e=>({command:e});c();u();p();m();d();l();c();u();p();m();d();l();var Dc=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);c();u();p();m();d();l();l();function Gt(e){try{return _c(e,"fast")}catch{return _c(e,"slow")}}function _c(e,t){return JSON.stringify(e.map(r=>Nc(r,t)))}function Nc(e,t){if(Array.isArray(e))return e.map(r=>Nc(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(ht(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(ae.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(y.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(Pf(e))return{prisma__type:"bytes",prisma__value:y.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:y.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Lc(e):e}function Pf(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Lc(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Mc);let t={};for(let r of Object.keys(e))t[r]=Mc(e[r]);return t}function Mc(e){return typeof e=="bigint"?e.toString():Lc(e)}var Tf=/^(\s*alter\s)/i,Uc=K("prisma:client");function Mo(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Tf.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 Uo=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Sn(r))n=r.sql,i={values:Gt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Gt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Gt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Gt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Vu(r),i={values:Gt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Qu(`prisma.${e}(${n}, ${i.values})`):Qu(`prisma.${e}(${n})`),{query:n,parameters:i}},Hu={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new fe(t,r)}},Gu={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};u();c();p();m();d();l();function Fo(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Ju(r(s)):Ju(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Ju(e){return typeof e.then=="function"?e:Promise.resolve(e)}u();c();p();m();d();l();var Sf=Ei.split(".")[0],kf={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Vo=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${Sf}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??kf}};function Wu(){return new Vo}u();c();p();m();d();l();function Ku(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}u();c();p();m();d();l();function zu(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)}u();c();p();m();d();l();var Zu=Ae(Ai());u();c();p();m();d();l();function oi(e){return typeof e.batchRequestIdx=="number"}u();c();p();m();d();l();function Yu(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push($o(e.query.arguments)),t.push($o(e.query.selection)),t.join("")}function $o(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${$o(n)})`:r}).join(" ")})`}u();c();p();m();d();l();var Of={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,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function qo(e){return Of[e]}u();c();p();m();d();l();var si=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;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;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 ai(e){let t=[],r=Df(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(C=>C.protocolQuery),f=this.client._tracingHelper.getTraceParent(s),w=n.some(C=>qo(C.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:f,transaction:Mf(o),containsWrite:w,customDataProxyFetch:i})).map((C,I)=>{if(C instanceof Error)return C;try{return this.mapQueryEngineResult(n[I],C)}catch(R){return R}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Xu(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:qo(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Yu(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=this.unpack(i,t,r);return g.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}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(_f(t),Nf(t,i))throw t;if(t instanceof X&&Lf(t)){let w=ec(t.meta);Tn({args:o,errors:[w],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let f=t.message;if(n&&(f=dn({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:f})),f=this.sanitizeMessage(f),t.code){let w=s?{modelName:s,...t.meta}:t.meta;throw new X(f,{code:t.code,clientVersion:this.client._clientVersion,meta:w,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new le(f,this.client._clientVersion);if(t instanceof ne)throw new ne(f,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof F)throw new F(f,this.client._clientVersion);if(t instanceof le)throw new le(f,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Zu.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(w=>w!=="select"&&w!=="include"),a=qi(o,s),f=i==="queryRaw"?ai(a):Qe(a);return n?n(f):f}get[Symbol.toStringTag](){return"RequestHandler"}};function Mf(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Xu(e)};Ne(e,"Unknown transaction kind")}}function Xu(e){return{id:e.id,payload:e.payload}}function Nf(e,t){return oi(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Lf(e){return e.code==="P2009"||e.code==="P2012"}function ec(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(ec)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}u();c();p();m();d();l();var tc=Zn;u();c();p();m();d();l();var sc=Ae(Si());u();c();p();m();d();l();var V=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};D(V,"PrismaClientConstructorValidationError");var rc=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],nc=["pretty","colorless","minimal"],ic=["info","query","warn","error"],Uf={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new V(`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=Jt(r,t)||` Available datasources: ${t.join(", ")}`;throw new V(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new V(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +`)}var No=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(In(r))n=r.sql,i={values:Gt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Gt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Gt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Gt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Dc(r),i={values:Gt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Uc(`prisma.${e}(${n}, ${i.values})`):Uc(`prisma.${e}(${n})`),{query:n,parameters:i}},Fc={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new fe(t,r)}},$c={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};c();u();p();m();d();l();function Lo(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Vc(r(s)):Vc(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Vc(e){return typeof e.then=="function"?e:Promise.resolve(e)}c();u();p();m();d();l();var vf=bi.split(".")[0],Af={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Uo=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${vf}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??Af}};function qc(){return new Uo}c();u();p();m();d();l();function Bc(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}c();u();p();m();d();l();function jc(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();u();p();m();d();l();var Hc=Ae(vi());c();u();p();m();d();l();function ii(e){return typeof e.batchRequestIdx=="number"}c();u();p();m();d();l();function Qc(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Fo(e.query.arguments)),t.push(Fo(e.query.selection)),t.join("")}function Fo(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Fo(n)})`:r}).join(" ")})`}c();u();p();m();d();l();var Rf={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,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function $o(e){return Rf[e]}c();u();p();m();d();l();var oi=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;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;iut("bigint",r));case"bytes-array":return t.map(r=>ut("bytes",r));case"decimal-array":return t.map(r=>ut("decimal",r));case"datetime-array":return t.map(r=>ut("datetime",r));case"date-array":return t.map(r=>ut("date",r));case"time-array":return t.map(r=>ut("time",r));default:return t}}function si(e){let t=[],r=Cf(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(R=>R.protocolQuery),f=this.client._tracingHelper.getTraceParent(s),E=n.some(R=>$o(R.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:f,transaction:If(o),containsWrite:E,customDataProxyFetch:i})).map((R,S)=>{if(R instanceof Error)return R;try{return this.mapQueryEngineResult(n[S],R)}catch(C){return C}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Gc(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:$o(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Qc(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=this.unpack(i,t,r);return g.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}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(Sf(t),kf(t,i))throw t;if(t instanceof X&&Of(t)){let E=Jc(t.meta);Tn({args:o,errors:[E],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let f=t.message;if(n&&(f=dn({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:f})),f=this.sanitizeMessage(f),t.code){let E=s?{modelName:s,...t.meta}:t.meta;throw new X(f,{code:t.code,clientVersion:this.client._clientVersion,meta:E,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new le(f,this.client._clientVersion);if(t instanceof ne)throw new ne(f,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof F)throw new F(f,this.client._clientVersion);if(t instanceof le)throw new le(f,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Hc.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(E=>E!=="select"&&E!=="include"),a=Vi(o,s),f=i==="queryRaw"?si(a):Qe(a);return n?n(f):f}get[Symbol.toStringTag](){return"RequestHandler"}};function If(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Gc(e)};Ne(e,"Unknown transaction kind")}}function Gc(e){return{id:e.id,payload:e.payload}}function kf(e,t){return ii(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Of(e){return e.code==="P2009"||e.code==="P2012"}function Jc(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Jc)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}c();u();p();m();d();l();var Wc=Yn;c();u();p();m();d();l();var Xc=Ae(Si());c();u();p();m();d();l();var V=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};D(V,"PrismaClientConstructorValidationError");var Kc=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],zc=["pretty","colorless","minimal"],Yc=["info","query","warn","error"],Df={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new V(`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=Jt(r,t)||` Available datasources: ${t.join(", ")}`;throw new V(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new V(`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 V(`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 V(`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&>(t.generator)==="client")throw new V('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e===null)return;if(e===void 0)throw new V('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!ii(t).includes("driverAdapters"))throw new V('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(gt(t.generator)==="binary")throw new V('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 V(`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 V(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!nc.includes(e)){let t=Jt(e,nc);throw new V(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new V(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!ic.includes(r)){let n=Jt(r,ic);throw new V(`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=Jt(i,o);throw new V(`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 V(`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 V(`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 V(`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 V('"omit" option is expected to be an object.');if(e===null)throw new V('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Vf(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let f=o.fields.find(w=>w.name===s);if(!f){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(f.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 V($f(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new V(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Jt(r,t);throw new V(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ac(e,t){for(let[r,n]of Object.entries(e)){if(!rc.includes(r)){let i=Jt(r,rc);throw new V(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Uf[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new V('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Jt(e,t){if(t.length===0||typeof e!="string")return"";let r=Ff(e,t);return r?` Did you mean "${r}"?`:""}function Ff(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,sc.default)(e,i)}));r.sort((i,o)=>i.distanceqe(n)===t);if(r)return e[r]}function $f(e,t){let r=At(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}=Pn(r,"colorless");return`Error validating "omit" option: +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&>(t.generator)==="client")throw new V('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e===null)return;if(e===void 0)throw new V('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!ni(t).includes("driverAdapters"))throw new V('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(gt(t.generator)==="binary")throw new V('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 V(`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 V(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!zc.includes(e)){let t=Jt(e,zc);throw new V(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new V(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Yc.includes(r)){let n=Jt(r,Yc);throw new V(`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=Jt(i,o);throw new V(`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 V(`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 V(`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 V(`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 V('"omit" option is expected to be an object.');if(e===null)throw new V('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Mf(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let f=o.fields.find(E=>E.name===s);if(!f){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(f.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 V(Nf(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new V(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Jt(r,t);throw new V(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function eu(e,t){for(let[r,n]of Object.entries(e)){if(!Kc.includes(r)){let i=Jt(r,Kc);throw new V(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Df[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new V('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Jt(e,t){if(t.length===0||typeof e!="string")return"";let r=_f(e,t);return r?` Did you mean "${r}"?`:""}function _f(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Xc.default)(e,i)}));r.sort((i,o)=>i.distanceqe(n)===t);if(r)return e[r]}function Nf(e,t){let r=At(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}=Pn(r,"colorless");return`Error validating "omit" option: ${i} -${n}`}u();c();p();m();d();l();function lc(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)))},f=w=>{o||(o=!0,r(w))};for(let w=0;w{n[w]=A,a()},A=>{if(!oi(A)){f(A);return}A.batchRequestIdx===w?f(A):(i||(i=A),a())})})}var We=K("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var qf={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Bf=Symbol.for("prisma.client.transaction.id"),jf={id:0,nextId(){return++this.id}};function pc(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=Fo();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Qa(e),n&&ac(n,e);let i=new kn().on("error",()=>{});this._extensions=Ct.empty(),this._previewFeatures=ii(e),this._clientVersion=e.clientVersion??tc,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Wu();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&rn.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&rn.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let f=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==f)throw new F(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${f}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new F("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 f=n??{},w=f.__internal??{},A=w.debug===!0;A&&K.enable("prisma:client");let C=rn.resolve(e.dirname,e.relativePath);ys.existsSync(C)||(C=e.dirname),We("dirname",e.dirname),We("relativePath",e.relativePath),We("cwd",C);let I=w.engine||{};if(f.errorFormat?this._errorFormat=f.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:A,allowTriggerPanic:I.allowTriggerPanic,prismaPath:I.binaryPath??void 0,engineEndpoint:I.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:f.log&&zu(f.log),logQueries:f.log&&!!(typeof f.log=="string"?f.log==="query":f.log.find(R=>typeof R=="string"?R==="query":R.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Ha(f,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:f.transactionOptions?.maxWait??2e3,timeout:f.transactionOptions?.timeout??5e3,isolationLevel:f.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:$t,getBatchRequestPayload:St,prismaGraphQLToJSError:_n,PrismaClientUnknownRequestError:ne,PrismaClientInitializationError:F,PrismaClientKnownRequestError:X,debug:K("prisma:client:accelerateEngine"),engineVersion:cc.version,clientVersion:e.clientVersion}},We("clientVersion",e.clientVersion),this._engine=Uu(e,this._engineConfig),this._requestHandler=new li(this,i),f.log)for(let R of f.log){let L=typeof R=="string"?R:R.emit==="stdout"?R.level:null;L&&this.$on(L,k=>{er.log(`${er.tags[L]??""}`,k.message||k.query)})}}catch(f){throw f.clientVersion=this._clientVersion,f}return this._appliedParent=yr(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$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{gs()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Uo({clientMethod:i,activeProvider:a}),callsite:je(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=uc(n,i);return Lo(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new ie("`$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=>(Lo(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new ie(`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:Fu,callsite:je(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:Uo({clientMethod:i,activeProvider:a}),callsite:je(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",...uc(n,i));throw new ie("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new ie("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=jf.nextId(),s=Ku(n.length),a=n.map((f,w)=>{if(f?.[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 A=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,C={kind:"batch",id:o,index:w,isolationLevel:A,lock:s};return f.requestTransaction?.(C)??f});return lc(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),f;try{let w={kind:"itx",...a};f=await n(this._createItxClient(w)),await this._engine.transaction("commit",o,a)}catch(w){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),w}return f}_createItxClient(n){return Pe(yr(Pe(Sa(this),[ue("_appliedParent",()=>this._appliedParent._createItxClient(n)),ue("_createPrismaPromise",()=>Fo(n)),ue(Bf,()=>n.id)])),[It(Ma)])}$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??qf,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async f=>{let{runInTransaction:w,args:A,...C}=f,I={...n,...C};A&&(I.args=i.middlewareArgsToRequestArgs(A)),n.transaction!==void 0&&w===!1&&delete I.transaction;let R=await Fa(this,I);return I.model?_a({result:R,modelName:I.model,args:I.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):R};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:f,argsMapper:w,transaction:A,unpacker:C,otelParentCtx:I,customDataProxyFetch:R}){try{n=w?w(n):n;let L={name:"serialize"},k=this._tracingHelper.runInChildSpan(L,()=>Rn({modelName:f,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 K.enabled("prisma:client")&&(We("Prisma Client call:"),We(`prisma.${i}(${ba(n)})`),We("Generated request:"),We(JSON.stringify(k,null,2)+` -`)),A?.kind==="batch"&&await A.lock,this._requestHandler.request({protocolQuery:k,modelName:f,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:A,unpacker:C,otelParentCtx:I,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:R})}catch(L){throw L.clientVersion=this._clientVersion,L}}$metrics=new Rt(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=ka}return t}function uc(e,t){return Qf(e)?[new fe(e,t),Hu]:[e,Gu]}function Qf(e){return Array.isArray(e)&&Array.isArray(e.raw)}u();c();p();m();d();l();var Hf=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function mc(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Hf.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}u();c();p();m();d();l();l();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +${n}`}c();u();p();m();d();l();function tu(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)))},f=E=>{o||(o=!0,r(E))};for(let E=0;E{n[E]=A,a()},A=>{if(!ii(A)){f(A);return}A.batchRequestIdx===E?f(A):(i||(i=A),a())})})}var We=K("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Lf={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Uf=Symbol.for("prisma.client.transaction.id"),Ff={id:0,nextId(){return++this.id}};function iu(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=Lo();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Ba(e),n&&eu(n,e);let i=new kn().on("error",()=>{});this._extensions=Rt.empty(),this._previewFeatures=ni(e),this._clientVersion=e.clientVersion??Wc,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=qc();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&rn.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&rn.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let f=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==f)throw new F(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${f}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new F("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 f=n??{},E=f.__internal??{},A=E.debug===!0;A&&K.enable("prisma:client");let R=rn.resolve(e.dirname,e.relativePath);fs.existsSync(R)||(R=e.dirname),We("dirname",e.dirname),We("relativePath",e.relativePath),We("cwd",R);let S=E.engine||{};if(f.errorFormat?this._errorFormat=f.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:R,dirname:e.dirname,enableDebugLogs:A,allowTriggerPanic:S.allowTriggerPanic,prismaPath:S.binaryPath??void 0,engineEndpoint:S.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:f.log&&jc(f.log),logQueries:f.log&&!!(typeof f.log=="string"?f.log==="query":f.log.find(C=>typeof C=="string"?C==="query":C.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:ja(f,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:f.transactionOptions?.maxWait??2e3,timeout:f.transactionOptions?.timeout??5e3,isolationLevel:f.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Vt,getBatchRequestPayload:It,prismaGraphQLToJSError:_n,PrismaClientUnknownRequestError:ne,PrismaClientInitializationError:F,PrismaClientKnownRequestError:X,debug:K("prisma:client:accelerateEngine"),engineVersion:nu.version,clientVersion:e.clientVersion}},We("clientVersion",e.clientVersion),this._engine=kc(e,this._engineConfig),this._requestHandler=new ai(this,i),f.log)for(let C of f.log){let L=typeof C=="string"?C:C.emit==="stdout"?C.level:null;L&&this.$on(L,k=>{er.log(`${er.tags[L]??""}`,k.message||k.query)})}}catch(f){throw f.clientVersion=this._clientVersion,f}return this._appliedParent=yr(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$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{ds()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:No({clientMethod:i,activeProvider:a}),callsite:je(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ru(n,i);return Mo(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new ie("`$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=>(Mo(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new ie(`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:Oc,callsite:je(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:No({clientMethod:i,activeProvider:a}),callsite:je(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",...ru(n,i));throw new ie("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new ie("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Ff.nextId(),s=Bc(n.length),a=n.map((f,E)=>{if(f?.[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 A=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,R={kind:"batch",id:o,index:E,isolationLevel:A,lock:s};return f.requestTransaction?.(R)??f});return tu(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),f;try{let E={kind:"itx",...a};f=await n(this._createItxClient(E)),await this._engine.transaction("commit",o,a)}catch(E){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),E}return f}_createItxClient(n){return Pe(yr(Pe(Ca(this),[ce("_appliedParent",()=>this._appliedParent._createItxClient(n)),ce("_createPrismaPromise",()=>Lo(n)),ce(Uf,()=>n.id)])),[St(Da)])}$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??Lf,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async f=>{let{runInTransaction:E,args:A,...R}=f,S={...n,...R};A&&(S.args=i.middlewareArgsToRequestArgs(A)),n.transaction!==void 0&&E===!1&&delete S.transaction;let C=await La(this,S);return S.model?Oa({result:C,modelName:S.model,args:S.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):C};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:f,argsMapper:E,transaction:A,unpacker:R,otelParentCtx:S,customDataProxyFetch:C}){try{n=E?E(n):n;let L={name:"serialize"},k=this._tracingHelper.runInChildSpan(L,()=>Cn({modelName:f,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 K.enabled("prisma:client")&&(We("Prisma Client call:"),We(`prisma.${i}(${ha(n)})`),We("Generated request:"),We(JSON.stringify(k,null,2)+` +`)),A?.kind==="batch"&&await A.lock,this._requestHandler.request({protocolQuery:k,modelName:f,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:A,unpacker:R,otelParentCtx:S,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:C})}catch(L){throw L.clientVersion=this._clientVersion,L}}$metrics=new Ct(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=Sa}return t}function ru(e,t){return $f(e)?[new fe(e,t),Fc]:[e,$c]}function $f(e){return Array.isArray(e)&&Array.isArray(e.raw)}c();u();p();m();d();l();var Vf=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function ou(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Vf.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}c();u();p();m();d();l();l();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); //# sourceMappingURL=wasm-compiler-edge.js.map diff --git a/src/generated/prisma/runtime/wasm-engine-edge.js b/src/generated/prisma/runtime/wasm-engine-edge.js index 0ca3b3b..d1d1381 100644 --- a/src/generated/prisma/runtime/wasm-engine-edge.js +++ b/src/generated/prisma/runtime/wasm-engine-edge.js @@ -1,27 +1,27 @@ /* !!! This is code generated by Prisma. Do not edit directly. !!! /* eslint-disable */ -"use strict";var Xo=Object.create;var kt=Object.defineProperty;var Zo=Object.getOwnPropertyDescriptor;var es=Object.getOwnPropertyNames;var ts=Object.getPrototypeOf,rs=Object.prototype.hasOwnProperty;var ie=(t,e)=>()=>(t&&(e=t(t=0)),e);var Fe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),nt=(t,e)=>{for(var r in e)kt(t,r,{get:e[r],enumerable:!0})},mn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of es(e))!rs.call(t,i)&&i!==r&&kt(t,i,{get:()=>e[i],enumerable:!(n=Zo(e,i))||n.enumerable});return t};var it=(t,e,r)=>(r=t!=null?Xo(ts(t)):{},mn(e||!t||!t.__esModule?kt(r,"default",{value:t,enumerable:!0}):r,t)),ns=t=>mn(kt({},"__esModule",{value:!0}),t);function Er(t,e){if(e=e.toLowerCase(),e==="utf8"||e==="utf-8")return new y(as.encode(t));if(e==="base64"||e==="base64url")return t=t.replace(/-/g,"+").replace(/_/g,"/"),t=t.replace(/[^A-Za-z0-9+/]/g,""),new y([...atob(t)].map(r=>r.charCodeAt(0)));if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return new y([...t].map(r=>r.charCodeAt(0)));if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let r=new y(t.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,f)=>function(h=0){return V(h,"offset"),X(h,"offset"),$(h,"offset",this.length-1),new DataView(this.buffer)[r[a]](h,f)},o=(a,f)=>function(h,C=0){let R=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),k=ss[R];return V(C,"offset"),X(C,"offset"),$(C,"offset",this.length-1),os(h,"value",k[0],k[1]),new DataView(this.buffer)[r[a]](C,h,f),C+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(f=>{f.includes("Uint")&&(t[f.replace("Uint","UInt")]=t[f]),f.includes("Float64")&&(t[f.replace("Float64","Double")]=t[f]),f.includes("Float32")&&(t[f.replace("Float32","Float")]=t[f])})};n.forEach((a,f)=>{a.startsWith("read")&&(t[a]=i(f,!1),t[a+"LE"]=i(f,!0),t[a+"BE"]=i(f,!1)),a.startsWith("write")&&(t[a]=o(f,!1),t[a+"LE"]=o(f,!0),t[a+"BE"]=o(f,!1)),s([a,a+"LE",a+"BE"])})}function dn(t){throw new Error(`Buffer polyfill does not implement "${t}"`)}function Dt(t,e){if(!(t instanceof Uint8Array))throw new TypeError(`The "${e}" argument must be an instance of Buffer or Uint8Array`)}function $(t,e,r=cs+1){if(t<0||t>r){let n=new RangeError(`The value of "${e}" is out of range. It must be >= 0 && <= ${r}. Received ${t}`);throw n.code="ERR_OUT_OF_RANGE",n}}function V(t,e){if(typeof t!="number"){let r=new TypeError(`The "${e}" argument must be of type number. Received type ${typeof t}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function X(t,e){if(!Number.isInteger(t)||Number.isNaN(t)){let r=new RangeError(`The value of "${e}" is out of range. It must be an integer. Received ${t}`);throw r.code="ERR_OUT_OF_RANGE",r}}function os(t,e,r,n){if(tn){let i=new RangeError(`The value of "${e}" is out of range. It must be >= ${r} and <= ${n}. Received ${t}`);throw i.code="ERR_OUT_OF_RANGE",i}}function pn(t,e){if(typeof t!="string"){let r=new TypeError(`The "${e}" argument must be of type string. Received type ${typeof t}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function ms(t,e="utf8"){return y.from(t,e)}var y,ss,as,ls,us,cs,b,Pr,u=ie(()=>{"use strict";y=class t extends Uint8Array{_isBuffer=!0;get offset(){return this.byteOffset}static alloc(e,r=0,n="utf8"){return pn(n,"encoding"),t.allocUnsafe(e).fill(r,n)}static allocUnsafe(e){return t.from(e)}static allocUnsafeSlow(e){return t.from(e)}static isBuffer(e){return e&&!!e._isBuffer}static byteLength(e,r="utf8"){if(typeof e=="string")return Er(e,r).byteLength;if(e&&e.byteLength)return e.byteLength;let n=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw n.code="ERR_INVALID_ARG_TYPE",n}static isEncoding(e){return us.includes(e)}static compare(e,r){Dt(e,"buff1"),Dt(r,"buff2");for(let n=0;nr[n])return 1}return e.length===r.length?0:e.length>r.length?1:-1}static from(e,r="utf8"){if(e&&typeof e=="object"&&e.type==="Buffer")return new t(e.data);if(typeof e=="number")return new t(new Uint8Array(e));if(typeof e=="string")return Er(e,r);if(ArrayBuffer.isView(e)){let{byteOffset:n,byteLength:i,buffer:o}=e;return"map"in e&&typeof e.map=="function"?new t(e.map(s=>s%256),n,i):new t(o,n,i)}if(e&&typeof e=="object"&&("length"in e||"byteLength"in e||"buffer"in e))return new t(e);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(e,r){if(e.length===0)return t.alloc(0);let n=[].concat(...e.map(o=>[...o])),i=t.alloc(r!==void 0?r:n.length);return i.set(r!==void 0?n.slice(0,r):n),i}slice(e=0,r=this.length){return this.subarray(e,r)}subarray(e=0,r=this.length){return Object.setPrototypeOf(super.subarray(e,r),t.prototype)}reverse(){return super.reverse(),this}readIntBE(e,r){V(e,"offset"),X(e,"offset"),$(e,"offset",this.length-1),V(r,"byteLength"),X(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o=0;o--)i.setUint8(o,e&255),e=e/256;return r+n}writeUintBE(e,r,n){return this.writeUIntBE(e,r,n)}writeUIntLE(e,r,n){V(r,"offset"),X(r,"offset"),$(r,"offset",this.length-1),V(n,"byteLength"),X(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=0;or===e[n])}copy(e,r=0,n=0,i=this.length){$(r,"targetStart"),$(n,"sourceStart",this.length),$(i,"sourceEnd"),r>>>=0,n>>>=0,i>>>=0;let o=0;for(;n=this.length?this.length-a:e.length),a);return this}includes(e,r=null,n="utf-8"){return this.indexOf(e,r,n)!==-1}lastIndexOf(e,r=null,n="utf-8"){return this.indexOf(e,r,n,!0)}indexOf(e,r=null,n="utf-8",i=!1){let o=i?this.findLastIndex.bind(this):this.findIndex.bind(this);n=typeof r=="string"?r:n;let s=t.from(typeof e=="number"?[e]:e,n),a=typeof r=="string"?0:r;return a=typeof r=="number"?a:null,a=Number.isNaN(a)?null:a,a??=i?this.length:0,a=a<0?this.length+a:a,s.length===0&&i===!1?a>=this.length?this.length:a:s.length===0&&i===!0?(a>=this.length?this.length:a)||this.length:o((f,h)=>(i?h<=a:h>=a)&&this[h]===s[0]&&s.every((R,k)=>this[h+k]===R))}toString(e="utf8",r=0,n=this.length){if(r=r<0?0:r,e=e.toString().toLowerCase(),n<=0)return"";if(e==="utf8"||e==="utf-8")return ls.decode(this.slice(r,n));if(e==="base64"||e==="base64url"){let i=btoa(this.reduce((o,s)=>o+Pr(s),""));return e==="base64url"?i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):i}if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return this.slice(r,n).reduce((i,o)=>i+Pr(o&(e==="ascii"?127:255)),"");if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let i=new DataView(this.buffer.slice(r,n));return Array.from({length:i.byteLength/2},(o,s)=>s*2+1i+o.toString(16).padStart(2,"0"),"");dn(`encoding "${e}"`)}toLocaleString(){return this.toString()}inspect(){return``}};ss={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]},as=new TextEncoder,ls=new TextDecoder,us=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],cs=4294967295;is(y.prototype);b=new Proxy(ms,{construct(t,[e,r]){return y.from(e,r)},get(t,e){return y[e]}}),Pr=String.fromCodePoint});var g,E,c=ie(()=>{"use strict";g={nextTick:(t,...e)=>{setTimeout(()=>{t(...e)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:E}=g});var P,m=ie(()=>{"use strict";P=globalThis.performance??(()=>{let t=Date.now();return{now:()=>Date.now()-t}})()});var x,p=ie(()=>{"use strict";x=()=>{};x.prototype=x});var w,d=ie(()=>{"use strict";w=class{value;constructor(e){this.value=e}deref(){return this.value}}});function hn(t,e){var r,n,i,o,s,a,f,h,C=t.constructor,R=C.precision;if(!t.s||!e.s)return e.s||(e=new C(t)),q?L(e,R):e;if(f=t.d,h=e.d,s=t.e,i=e.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=h.length):(n=h,i=s,a=f.length),s=Math.ceil(R/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=f.length,o=h.length,a-o<0&&(o=a,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/J|0,f[o]%=J;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return e.d=f,e.e=i,q?L(e,R):e}function ce(t,e,r){if(t!==~~t||tr)throw Error(ke+t)}function ue(t){var e,r,n,i=t.length-1,o="",s=t[0];if(i>0){for(o+=s,e=1;e16)throw Error(Tr+j(t));if(!t.s)return new C(te);for(e==null?(q=!1,a=R):a=e,s=new C(.03125);t.abs().gte(.1);)t=t.times(s),h+=5;for(n=Math.log(Oe(2,h))/Math.LN10*2+5|0,a+=n,r=i=o=new C(te),C.precision=a;;){if(i=L(i.times(t),a),r=r.times(++f),s=o.plus(he(i,r,a)),ue(s.d).slice(0,a)===ue(o.d).slice(0,a)){for(;h--;)o=L(o.times(o),a);return C.precision=R,e==null?(q=!0,L(o,R)):o}o=s}}function j(t){for(var e=t.e*N,r=t.d[0];r>=10;r/=10)e++;return e}function vr(t,e,r){if(e>t.LN10.sd())throw q=!0,r&&(t.precision=r),Error(oe+"LN10 precision limit exceeded");return L(new t(t.LN10),e)}function Pe(t){for(var e="";t--;)e+="0";return e}function ot(t,e){var r,n,i,o,s,a,f,h,C,R=1,k=10,A=t,_=A.d,O=A.constructor,D=O.precision;if(A.s<1)throw Error(oe+(A.s?"NaN":"-Infinity"));if(A.eq(te))return new O(0);if(e==null?(q=!1,h=D):h=e,A.eq(10))return e==null&&(q=!0),vr(O,h);if(h+=k,O.precision=h,r=ue(_),n=r.charAt(0),o=j(A),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)A=A.times(t),r=ue(A.d),n=r.charAt(0),R++;o=j(A),n>1?(A=new O("0."+r),o++):A=new O(n+"."+r.slice(1))}else return f=vr(O,h+2,D).times(o+""),A=ot(new O(n+"."+r.slice(1)),h-k).plus(f),O.precision=D,e==null?(q=!0,L(A,D)):A;for(a=s=A=he(A.minus(te),A.plus(te),h),C=L(A.times(A),h),i=3;;){if(s=L(s.times(C),h),f=a.plus(he(s,new O(i),h)),ue(f.d).slice(0,h)===ue(a.d).slice(0,h))return a=a.times(2),o!==0&&(a=a.plus(vr(O,h+2,D).times(o+""))),a=he(a,new O(R),h),O.precision=D,e==null?(q=!0,L(a,D)):a;a=f,i+=2}}function fn(t,e){var r,n,i;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;)++n;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(n,i),e){if(i-=n,r=r-n-1,t.e=Ne(r/N),t.d=[],n=(r+1)%N,r<0&&(n+=N),nIt||t.e<-It))throw Error(Tr+r)}else t.s=0,t.e=0,t.d=[0];return t}function L(t,e,r){var n,i,o,s,a,f,h,C,R=t.d;for(s=1,o=R[0];o>=10;o/=10)s++;if(n=e-s,n<0)n+=N,i=e,h=R[C=0];else{if(C=Math.ceil((n+1)/N),o=R.length,C>=o)return t;for(h=o=R[C],s=1;o>=10;o/=10)s++;n%=N,i=n-N+s}if(r!==void 0&&(o=Oe(10,s-i-1),a=h/o%10|0,f=e<0||R[C+1]!==void 0||h%o,f=r<4?(a||f)&&(r==0||r==(t.s<0?3:2)):a>5||a==5&&(r==4||f||r==6&&(n>0?i>0?h/Oe(10,s-i):0:R[C-1])%10&1||r==(t.s<0?8:7))),e<1||!R[0])return f?(o=j(t),R.length=1,e=e-o-1,R[0]=Oe(10,(N-e%N)%N),t.e=Ne(-e/N)||0):(R.length=1,R[0]=t.e=t.s=0),t;if(n==0?(R.length=C,o=1,C--):(R.length=C+1,o=Oe(10,N-n),R[C]=i>0?(h/Oe(10,s-i)%Oe(10,i)|0)*o:0),f)for(;;)if(C==0){(R[0]+=o)==J&&(R[0]=1,++t.e);break}else{if(R[C]+=o,R[C]!=J)break;R[C--]=0,o=1}for(n=R.length;R[--n]===0;)R.pop();if(q&&(t.e>It||t.e<-It))throw Error(Tr+j(t));return t}function wn(t,e){var r,n,i,o,s,a,f,h,C,R,k=t.constructor,A=k.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new k(t),q?L(e,A):e;if(f=t.d,R=e.d,n=e.e,h=t.e,f=f.slice(),s=h-n,s){for(C=s<0,C?(r=f,s=-s,a=R.length):(r=R,n=h,a=f.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=f.length,a=R.length,C=i0;--i)f[a++]=0;for(i=R.length;i>s;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+Pe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Pe(-i-1)+o,r&&(n=r-s)>0&&(o+=Pe(n))):i>=s?(o+=Pe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Pe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Pe(n))),t.s<0?"-"+o:o}function gn(t,e){if(t.length>e)return t.length=e,!0}function xn(t){var e,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(ke+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 fn(s,o.toString())}else if(typeof o!="string")throw Error(ke+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,ds.test(o))fn(s,o);else throw Error(ke+o)}if(i.prototype=S,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=xn,i.config=i.set=fs,t===void 0&&(t={}),t)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(ke+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(ke+r+": "+n);return this}var Ue,ps,Cr,q,oe,ke,Tr,Ne,Oe,ds,te,J,N,yn,It,S,he,Cr,Mt,En=ie(()=>{"use strict";u();c();m();p();d();l();Ue=1e9,ps={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},q=!0,oe="[DecimalError] ",ke=oe+"Invalid argument: ",Tr=oe+"Exponent out of range: ",Ne=Math.floor,Oe=Math.pow,ds=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,J=1e7,N=7,yn=9007199254740991,It=Ne(yn/N),S={};S.absoluteValue=S.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};S.comparedTo=S.cmp=function(t){var e,r,n,i,o=this;if(t=new o.constructor(t),o.s!==t.s)return o.s||-t.s;if(o.e!==t.e)return o.e>t.e^o.s<0?1:-1;for(n=o.d.length,i=t.d.length,e=0,r=nt.d[e]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};S.decimalPlaces=S.dp=function(){var t=this,e=t.d.length-1,r=(e-t.e)*N;if(e=t.d[e],e)for(;e%10==0;e/=10)r--;return r<0?0:r};S.dividedBy=S.div=function(t){return he(this,new this.constructor(t))};S.dividedToIntegerBy=S.idiv=function(t){var e=this,r=e.constructor;return L(he(e,new r(t),0,1),r.precision)};S.equals=S.eq=function(t){return!this.cmp(t)};S.exponent=function(){return j(this)};S.greaterThan=S.gt=function(t){return this.cmp(t)>0};S.greaterThanOrEqualTo=S.gte=function(t){return this.cmp(t)>=0};S.isInteger=S.isint=function(){return this.e>this.d.length-2};S.isNegative=S.isneg=function(){return this.s<0};S.isPositive=S.ispos=function(){return this.s>0};S.isZero=function(){return this.s===0};S.lessThan=S.lt=function(t){return this.cmp(t)<0};S.lessThanOrEqualTo=S.lte=function(t){return this.cmp(t)<1};S.logarithm=S.log=function(t){var e,r=this,n=r.constructor,i=n.precision,o=i+5;if(t===void 0)t=new n(10);else if(t=new n(t),t.s<1||t.eq(te))throw Error(oe+"NaN");if(r.s<1)throw Error(oe+(r.s?"NaN":"-Infinity"));return r.eq(te)?new n(0):(q=!1,e=he(ot(r,o),ot(t,o),o),q=!0,L(e,i))};S.minus=S.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?wn(e,t):hn(e,(t.s=-t.s,t))};S.modulo=S.mod=function(t){var e,r=this,n=r.constructor,i=n.precision;if(t=new n(t),!t.s)throw Error(oe+"NaN");return r.s?(q=!1,e=he(r,t,0,1).times(t),q=!0,r.minus(e)):L(new n(r),i)};S.naturalExponential=S.exp=function(){return bn(this)};S.naturalLogarithm=S.ln=function(){return ot(this)};S.negated=S.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};S.plus=S.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?hn(e,t):wn(e,(t.s=-t.s,t))};S.precision=S.sd=function(t){var e,r,n,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(ke+t);if(e=j(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 t&&e>r?e:r};S.squareRoot=S.sqrt=function(){var t,e,r,n,i,o,s,a=this,f=a.constructor;if(a.s<1){if(!a.s)return new f(0);throw Error(oe+"NaN")}for(t=j(a),q=!1,i=Math.sqrt(+a),i==0||i==1/0?(e=ue(a.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=Ne((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),n=new f(e)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(o=n,n=o.plus(he(a,o,s+2)).times(.5),ue(o.d).slice(0,s)===(e=ue(n.d)).slice(0,s)){if(e=e.slice(s-3,s+1),i==s&&e=="4999"){if(L(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(e!="9999")break;s+=4}return q=!0,L(n,r)};S.times=S.mul=function(t){var e,r,n,i,o,s,a,f,h,C=this,R=C.constructor,k=C.d,A=(t=new R(t)).d;if(!C.s||!t.s)return new R(0);for(t.s*=C.s,r=C.e+t.e,f=k.length,h=A.length,f=0;){for(e=0,i=f+n;i>n;)a=o[i]+A[n]*k[i-n-1]+e,o[i--]=a%J|0,e=a/J|0;o[i]=(o[i]+e)%J|0}for(;!o[--s];)o.pop();return e?++r:o.shift(),t.d=o,t.e=r,q?L(t,R.precision):t};S.toDecimalPlaces=S.todp=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(ce(t,0,Ue),e===void 0?e=n.rounding:ce(e,0,8),L(r,t+j(r)+1,e))};S.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=De(n,!0):(ce(t,0,Ue),e===void 0?e=i.rounding:ce(e,0,8),n=L(new i(n),t+1,e),r=De(n,!0,t+1)),r};S.toFixed=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?De(i):(ce(t,0,Ue),e===void 0?e=o.rounding:ce(e,0,8),n=L(new o(i),t+j(i)+1,e),r=De(n.abs(),!1,t+j(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};S.toInteger=S.toint=function(){var t=this,e=t.constructor;return L(new e(t),j(t)+1,e.rounding)};S.toNumber=function(){return+this};S.toPower=S.pow=function(t){var e,r,n,i,o,s,a=this,f=a.constructor,h=12,C=+(t=new f(t));if(!t.s)return new f(te);if(a=new f(a),!a.s){if(t.s<1)throw Error(oe+"Infinity");return a}if(a.eq(te))return a;if(n=f.precision,t.eq(te))return L(a,n);if(e=t.e,r=t.d.length-1,s=e>=r,o=a.s,s){if((r=C<0?-C:C)<=yn){for(i=new f(te),e=Math.ceil(n/N+4),q=!1;r%2&&(i=i.times(a),gn(i.d,e)),r=Ne(r/2),r!==0;)a=a.times(a),gn(a.d,e);return q=!0,t.s<0?new f(te).div(i):L(i,n)}}else if(o<0)throw Error(oe+"NaN");return o=o<0&&t.d[Math.max(e,r)]&1?-1:1,a.s=1,q=!1,i=t.times(ot(a,n+h)),q=!0,i=bn(i),i.s=o,i};S.toPrecision=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?(r=j(i),n=De(i,r<=o.toExpNeg||r>=o.toExpPos)):(ce(t,1,Ue),e===void 0?e=o.rounding:ce(e,0,8),i=L(new o(i),t,e),r=j(i),n=De(i,t<=r||r<=o.toExpNeg,t)),n};S.toSignificantDigits=S.tosd=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(ce(t,1,Ue),e===void 0?e=n.rounding:ce(e,0,8)),L(new n(r),t,e)};S.toString=S.valueOf=S.val=S.toJSON=S[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=j(t),r=t.constructor;return De(t,e<=r.toExpNeg||e>=r.toExpPos)};he=function(){function t(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 e(n,i,o,s){var a,f;if(o!=s)f=o>s?1:-1;else for(a=f=0;ai[a]?1:-1;break}return f}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,f,h,C,R,k,A,_,O,D,ye,z,F,Y,Se,xr,se,St,Ot=n.constructor,Yo=n.s==i.s?1:-1,le=n.d,B=i.d;if(!n.s)return new Ot(n);if(!i.s)throw Error(oe+"Division by zero");for(f=n.e-i.e,se=B.length,Se=le.length,A=new Ot(Yo),_=A.d=[],h=0;B[h]==(le[h]||0);)++h;if(B[h]>(le[h]||0)&&--f,o==null?z=o=Ot.precision:s?z=o+(j(n)-j(i))+1:z=o,z<0)return new Ot(0);if(z=z/N+2|0,h=0,se==1)for(C=0,B=B[0],z++;(h1&&(B=t(B,C),le=t(le,C),se=B.length,Se=le.length),Y=se,O=le.slice(0,se),D=O.length;D=J/2&&++xr;do C=0,a=e(B,O,se,D),a<0?(ye=O[0],se!=D&&(ye=ye*J+(O[1]||0)),C=ye/xr|0,C>1?(C>=J&&(C=J-1),R=t(B,C),k=R.length,D=O.length,a=e(R,O,k,D),a==1&&(C--,r(R,se{"use strict";En();v=class extends Mt{static isDecimal(e){return e instanceof Mt}static random(e=20){{let n=globalThis.crypto.getRandomValues(new Uint8Array(e)).reduce((i,o)=>i+o,"");return new Mt(`0.${n.slice(0,e)}`)}}},be=v});function xs(){return!1}function kr(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function Es(){return kr()}function Ps(){return[]}function vs(t){t(null,[])}function Ts(){return""}function Cs(){return""}function Rs(){}function As(){}function Ss(){}function Os(){}function ks(){}function Ds(){}function Is(){}function Ms(){}function _s(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Ls(t,e){e(null,kr())}var Fs,Us,Nn,qn=ie(()=>{"use strict";u();c();m();p();d();l();Fs={},Us={existsSync:xs,lstatSync:kr,stat:Ls,statSync:Es,readdirSync:Ps,readdir:vs,readlinkSync:Ts,realpathSync:Cs,chmodSync:Rs,renameSync:As,mkdirSync:Ss,rmdirSync:Os,rmSync:ks,unlinkSync:Ds,watchFile:Is,unwatchFile:Ms,watch:_s,promises:Fs},Nn=Us});function Ns(...t){return t.join("/")}function qs(...t){return t.join("/")}function Bs(t){let e=Bn(t),r=Vn(t),[n,i]=e.split(".");return{root:"/",dir:r,base:e,ext:i,name:n}}function Bn(t){let e=t.split("/");return e[e.length-1]}function Vn(t){return t.split("/").slice(0,-1).join("/")}function js(t){let e=t.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of e)i===".."?r.pop():r.push(i);let n=r.join("/");return t.startsWith("/")?"/"+n:n}var jn,Vs,$s,Qs,Ut,$n=ie(()=>{"use strict";u();c();m();p();d();l();jn="/",Vs=":";$s={sep:jn},Qs={basename:Bn,delimiter:Vs,dirname:Vn,join:qs,normalize:js,parse:Bs,posix:$s,resolve:Ns,sep:jn},Ut=Qs});var Qn=Fe((lm,Js)=>{Js.exports={name:"@prisma/internals",version:"6.14.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-engine-wasm":"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var Hn=Fe((xp,Kn)=>{"use strict";u();c();m();p();d();l();Kn.exports=(t,e=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof t!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(e===0)return t;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return t.replace(n,r.indent.repeat(e))}});var Xn=Fe((_p,Yn)=>{"use strict";u();c();m();p();d();l();Yn.exports=({onlyFirst:t=!1}={})=>{let e=["[\\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(e,t?void 0:"g")}});var ei=Fe((Vp,Zn)=>{"use strict";u();c();m();p();d();l();var ta=Xn();Zn.exports=t=>typeof t=="string"?t.replace(ta(),""):t});var Br=Fe((zy,oi)=>{"use strict";u();c();m();p();d();l();oi.exports=function(){function t(e,r,n,i,o){return en?n+1:e+1:i===o?r:r+1}return function(e,r){if(e===r)return 0;if(e.length>r.length){var n=e;e=r,r=n}for(var i=e.length,o=r.length;i>0&&e.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";u();c();m();p();d();l()});var mi=ie(()=>{"use strict";u();c();m();p();d();l()});var Li=Fe((YP,Ga)=>{Ga.exports={name:"@prisma/engines-version",version:"6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"717184b7b35ea05dfa71a3236b7af656013e1e49"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var sr,Fi=ie(()=>{"use strict";u();c();m();p();d();l();sr=class{events={};on(e,r){return this.events[e]||(this.events[e]=[]),this.events[e].push(r),this}emit(e,...r){return this.events[e]?(this.events[e].forEach(n=>{n(...r)}),!0):!1}}});var eu={};nt(eu,{DMMF:()=>pt,Debug:()=>G,Decimal:()=>be,Extensions:()=>Rr,MetricsClient:()=>Ye,PrismaClientInitializationError:()=>I,PrismaClientKnownRequestError:()=>Z,PrismaClientRustPanicError:()=>xe,PrismaClientUnknownRequestError:()=>Q,PrismaClientValidationError:()=>K,Public:()=>Ar,Sql:()=>ee,createParam:()=>Ai,defineDmmfProperty:()=>Mi,deserializeJsonResponse:()=>et,deserializeRawResult:()=>br,dmmfToRuntimeDataModel:()=>ii,empty:()=>Ni,getPrismaClient:()=>Ko,getRuntime:()=>Re,join:()=>Ui,makeStrictEnum:()=>Ho,makeTypedQueryFactory:()=>_i,objectEnumValues:()=>zt,raw:()=>Hr,serializeJsonQuery:()=>nr,skip:()=>rr,sqltag:()=>zr,warnEnvConflicts:()=>void 0,warnOnce:()=>ut});module.exports=ns(eu);u();c();m();p();d();l();var Rr={};nt(Rr,{defineExtension:()=>Pn,getExtensionContext:()=>vn});u();c();m();p();d();l();u();c();m();p();d();l();function Pn(t){return typeof t=="function"?t:e=>e.$extends(t)}u();c();m();p();d();l();function vn(t){return t}var Ar={};nt(Ar,{validator:()=>Tn});u();c();m();p();d();l();u();c();m();p();d();l();function Tn(...t){return e=>e}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Sr,Cn,Rn,An,Sn=!0;typeof g<"u"&&({FORCE_COLOR:Sr,NODE_DISABLE_COLORS:Cn,NO_COLOR:Rn,TERM:An}=g.env||{},Sn=g.stdout&&g.stdout.isTTY);var gs={enabled:!Cn&&Rn==null&&An!=="dumb"&&(Sr!=null&&Sr!=="0"||Sn)};function U(t,e){let r=new RegExp(`\\x1b\\[${e}m`,"g"),n=`\x1B[${t}m`,i=`\x1B[${e}m`;return function(o){return!gs.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Xu=U(0,0),_t=U(1,22),Lt=U(2,22),Zu=U(3,23),On=U(4,24),ec=U(7,27),tc=U(8,28),rc=U(9,29),nc=U(30,39),qe=U(31,39),kn=U(32,39),Dn=U(33,39),In=U(34,39),ic=U(35,39),Mn=U(36,39),oc=U(37,39),_n=U(90,39),sc=U(90,39),ac=U(40,49),lc=U(41,49),uc=U(42,49),cc=U(43,49),mc=U(44,49),pc=U(45,49),dc=U(46,49),fc=U(47,49);u();c();m();p();d();l();var ys=100,Ln=["green","yellow","blue","magenta","cyan","red"],Ft=[],Fn=Date.now(),hs=0,Or=typeof g<"u"?g.env:{};globalThis.DEBUG??=Or.DEBUG??"";globalThis.DEBUG_COLORS??=Or.DEBUG_COLORS?Or.DEBUG_COLORS==="true":!0;var st={enable(t){typeof t=="string"&&(globalThis.DEBUG=t)},disable(){let t=globalThis.DEBUG;return globalThis.DEBUG="",t},enabled(t){let e=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=e.some(i=>i===""||i[0]==="-"?!1:t.match(RegExp(i.split("*").join(".*")+"$"))),n=e.some(i=>i===""||i[0]!=="-"?!1:t.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...t)=>{let[e,r,...n]=t;(console.warn??console.log)(`${e} ${r}`,...n)},formatters:{}};function bs(t){let e={color:Ln[hs++%Ln.length],enabled:st.enabled(t),namespace:t,log:st.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=e;if(n.length!==0&&Ft.push([o,...n]),Ft.length>ys&&Ft.shift(),st.enabled(o)||i){let f=n.map(C=>typeof C=="string"?C:ws(C)),h=`+${Date.now()-Fn}ms`;Fn=Date.now(),a(o,...f,h)}};return new Proxy(r,{get:(n,i)=>e[i],set:(n,i,o)=>e[i]=o})}var G=new Proxy(bs,{get:(t,e)=>st[e],set:(t,e,r)=>st[e]=r});function ws(t,e=2){let r=new Set;return JSON.stringify(t,(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},e)}function Un(){Ft.length=0}u();c();m();p();d();l();u();c();m();p();d();l();var Dr=["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"];u();c();m();p();d();l();var Gs=Qn(),Ir=Gs.version;u();c();m();p();d();l();function Be(t){let e=Ws();return e||(t?.config.engineType==="library"?"library":t?.config.engineType==="binary"?"binary":t?.config.engineType==="client"?"client":Ks(t))}function Ws(){let t=g.env.PRISMA_CLIENT_ENGINE_TYPE;return t==="library"?"library":t==="binary"?"binary":t==="client"?"client":void 0}function Ks(t){return t?.previewFeatures.includes("queryCompiler")?"client":"library"}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();function Mr(t){return t.name==="DriverAdapterError"&&typeof t.cause=="object"}u();c();m();p();d();l();function Nt(t){return{ok:!0,value:t,map(e){return Nt(e(t))},flatMap(e){return e(t)}}}function Ie(t){return{ok:!1,error:t,map(){return Ie(t)},flatMap(){return Ie(t)}}}var Jn=G("driver-adapter-utils"),_r=class{registeredErrors=[];consumeError(e){return this.registeredErrors[e]}registerNewError(e){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:e},r}};var qt=(t,e=new _r)=>{let r={adapterName:t.adapterName,errorRegistry:e,queryRaw:we(e,t.queryRaw.bind(t)),executeRaw:we(e,t.executeRaw.bind(t)),executeScript:we(e,t.executeScript.bind(t)),dispose:we(e,t.dispose.bind(t)),provider:t.provider,startTransaction:async(...n)=>(await we(e,t.startTransaction.bind(t))(...n)).map(o=>Hs(e,o))};return t.getConnectionInfo&&(r.getConnectionInfo=zs(e,t.getConnectionInfo.bind(t))),r},Hs=(t,e)=>({adapterName:e.adapterName,provider:e.provider,options:e.options,queryRaw:we(t,e.queryRaw.bind(e)),executeRaw:we(t,e.executeRaw.bind(e)),commit:we(t,e.commit.bind(e)),rollback:we(t,e.rollback.bind(e))});function we(t,e){return async(...r)=>{try{return Nt(await e(...r))}catch(n){if(Jn("[error@wrapAsync]",n),Mr(n))return Ie(n.cause);let i=t.registerNewError(n);return Ie({kind:"GenericJs",id:i})}}}function zs(t,e){return(...r)=>{try{return Nt(e(...r))}catch(n){if(Jn("[error@wrapSync]",n),Mr(n))return Ie(n.cause);let i=t.registerNewError(n);return Ie({kind:"GenericJs",id:i})}}}u();c();m();p();d();l();var Gn="prisma+postgres",Wn=`${Gn}:`;function Lr(t){return t?.toString().startsWith(`${Wn}//`)??!1}var lt={};nt(lt,{error:()=>Zs,info:()=>Xs,log:()=>Ys,query:()=>ea,should:()=>zn,tags:()=>at,warn:()=>Fr});u();c();m();p();d();l();var at={error:qe("prisma:error"),warn:Dn("prisma:warn"),info:Mn("prisma:info"),query:In("prisma:query")},zn={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function Ys(...t){console.log(...t)}function Fr(t,...e){zn.warn()&&console.warn(`${at.warn} ${t}`,...e)}function Xs(t,...e){console.info(`${at.info} ${t}`,...e)}function Zs(t,...e){console.error(`${at.error} ${t}`,...e)}function ea(t,...e){console.log(`${at.query} ${t}`,...e)}u();c();m();p();d();l();function Bt(t,e){if(!t)throw new Error(`${e}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}u();c();m();p();d();l();function Me(t,e){throw new Error(e)}u();c();m();p();d();l();function Ur(t,e){return Object.prototype.hasOwnProperty.call(t,e)}u();c();m();p();d();l();function Vt(t,e){let r={};for(let n of Object.keys(t))r[n]=e(t[n],n);return r}u();c();m();p();d();l();function Nr(t,e){if(t.length===0)return;let r=t[0];for(let n=1;n{ti.has(t)||(ti.add(t),Fr(e,...r))};var I=class t extends Error{clientVersion;errorCode;retryable;constructor(e,r,n){super(e),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(t)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};re(I,"PrismaClientInitializationError");u();c();m();p();d();l();var Z=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(e,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(e),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(Z,"PrismaClientKnownRequestError");u();c();m();p();d();l();var xe=class extends Error{clientVersion;constructor(e,r){super(e),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};re(xe,"PrismaClientRustPanicError");u();c();m();p();d();l();var Q=class extends Error{clientVersion;batchRequestIdx;constructor(e,{clientVersion:r,batchRequestIdx:n}){super(e),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};re(Q,"PrismaClientUnknownRequestError");u();c();m();p();d();l();var K=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(e,{clientVersion:r}){super(e),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};re(K,"PrismaClientValidationError");u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var me=class{_map=new Map;get(e){return this._map.get(e)?.value}set(e,r){this._map.set(e,{value:r})}getOrCreate(e,r){let n=this._map.get(e);if(n)return n.value;let i=r();return this.set(e,i),i}};u();c();m();p();d();l();function ve(t){return t.substring(0,1).toLowerCase()+t.substring(1)}u();c();m();p();d();l();function ni(t,e){let r={};for(let n of t){let i=n[e];r[i]=n}return r}u();c();m();p();d();l();function ct(t){let e;return{get(){return e||(e={value:t()}),e.value}}}u();c();m();p();d();l();function ii(t){return{models:qr(t.models),enums:qr(t.enums),types:qr(t.types)}}function qr(t){let e={};for(let{name:r,...n}of t)e[r]=n;return e}u();c();m();p();d();l();function Ve(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function jt(t){return t.toString()!=="Invalid Date"}u();c();m();p();d();l();l();function je(t){return v.isDecimal(t)?!0:t!==null&&typeof t=="object"&&typeof t.s=="number"&&typeof t.e=="number"&&typeof t.toFixed=="function"&&Array.isArray(t.d)}u();c();m();p();d();l();u();c();m();p();d();l();var pt={};nt(pt,{ModelAction:()=>mt,datamodelEnumToSchemaEnum:()=>ra});u();c();m();p();d();l();u();c();m();p();d();l();function ra(t){return{name:t.name,values:t.values.map(e=>e.name)}}u();c();m();p();d();l();var mt=(F=>(F.findUnique="findUnique",F.findUniqueOrThrow="findUniqueOrThrow",F.findFirst="findFirst",F.findFirstOrThrow="findFirstOrThrow",F.findMany="findMany",F.create="create",F.createMany="createMany",F.createManyAndReturn="createManyAndReturn",F.update="update",F.updateMany="updateMany",F.updateManyAndReturn="updateManyAndReturn",F.upsert="upsert",F.delete="delete",F.deleteMany="deleteMany",F.groupBy="groupBy",F.count="count",F.aggregate="aggregate",F.findRaw="findRaw",F.aggregateRaw="aggregateRaw",F))(mt||{});var na=it(Hn());var ia={red:qe,gray:_n,dim:Lt,bold:_t,underline:On,highlightSource:t=>t.highlight()},oa={red:t=>t,gray:t=>t,dim:t=>t,bold:t=>t,underline:t=>t,highlightSource:t=>t};function sa({message:t,originalMethod:e,isPanic:r,callArguments:n}){return{functionName:`prisma.${e}()`,message:t,isPanic:r??!1,callArguments:n}}function aa({functionName:t,location:e,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],f=e?" 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(`\`${t}\``)} invocation${f}`))):a.push(s.red(`Invalid ${s.bold(`\`${t}\``)} invocation${f}`)),e&&a.push(s.underline(la(e))),i){a.push("");let h=[i.toString()];o&&(h.push(o),h.push(s.dim(")"))),a.push(h.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +"use strict";var Xo=Object.create;var kt=Object.defineProperty;var Zo=Object.getOwnPropertyDescriptor;var es=Object.getOwnPropertyNames;var ts=Object.getPrototypeOf,rs=Object.prototype.hasOwnProperty;var ie=(t,e)=>()=>(t&&(e=t(t=0)),e);var Fe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),nt=(t,e)=>{for(var r in e)kt(t,r,{get:e[r],enumerable:!0})},mn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of es(e))!rs.call(t,i)&&i!==r&&kt(t,i,{get:()=>e[i],enumerable:!(n=Zo(e,i))||n.enumerable});return t};var it=(t,e,r)=>(r=t!=null?Xo(ts(t)):{},mn(e||!t||!t.__esModule?kt(r,"default",{value:t,enumerable:!0}):r,t)),ns=t=>mn(kt({},"__esModule",{value:!0}),t);function xr(t,e){if(e=e.toLowerCase(),e==="utf8"||e==="utf-8")return new y(as.encode(t));if(e==="base64"||e==="base64url")return t=t.replace(/-/g,"+").replace(/_/g,"/"),t=t.replace(/[^A-Za-z0-9+/]/g,""),new y([...atob(t)].map(r=>r.charCodeAt(0)));if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return new y([...t].map(r=>r.charCodeAt(0)));if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let r=new y(t.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,f)=>function(h=0){return V(h,"offset"),X(h,"offset"),$(h,"offset",this.length-1),new DataView(this.buffer)[r[a]](h,f)},o=(a,f)=>function(h,C=0){let A=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),k=ss[A];return V(C,"offset"),X(C,"offset"),$(C,"offset",this.length-1),os(h,"value",k[0],k[1]),new DataView(this.buffer)[r[a]](C,h,f),C+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(f=>{f.includes("Uint")&&(t[f.replace("Uint","UInt")]=t[f]),f.includes("Float64")&&(t[f.replace("Float64","Double")]=t[f]),f.includes("Float32")&&(t[f.replace("Float32","Float")]=t[f])})};n.forEach((a,f)=>{a.startsWith("read")&&(t[a]=i(f,!1),t[a+"LE"]=i(f,!0),t[a+"BE"]=i(f,!1)),a.startsWith("write")&&(t[a]=o(f,!1),t[a+"LE"]=o(f,!0),t[a+"BE"]=o(f,!1)),s([a,a+"LE",a+"BE"])})}function dn(t){throw new Error(`Buffer polyfill does not implement "${t}"`)}function Dt(t,e){if(!(t instanceof Uint8Array))throw new TypeError(`The "${e}" argument must be an instance of Buffer or Uint8Array`)}function $(t,e,r=cs+1){if(t<0||t>r){let n=new RangeError(`The value of "${e}" is out of range. It must be >= 0 && <= ${r}. Received ${t}`);throw n.code="ERR_OUT_OF_RANGE",n}}function V(t,e){if(typeof t!="number"){let r=new TypeError(`The "${e}" argument must be of type number. Received type ${typeof t}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function X(t,e){if(!Number.isInteger(t)||Number.isNaN(t)){let r=new RangeError(`The value of "${e}" is out of range. It must be an integer. Received ${t}`);throw r.code="ERR_OUT_OF_RANGE",r}}function os(t,e,r,n){if(tn){let i=new RangeError(`The value of "${e}" is out of range. It must be >= ${r} and <= ${n}. Received ${t}`);throw i.code="ERR_OUT_OF_RANGE",i}}function pn(t,e){if(typeof t!="string"){let r=new TypeError(`The "${e}" argument must be of type string. Received type ${typeof t}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function ms(t,e="utf8"){return y.from(t,e)}var y,ss,as,ls,us,cs,b,Pr,u=ie(()=>{"use strict";y=class t extends Uint8Array{_isBuffer=!0;get offset(){return this.byteOffset}static alloc(e,r=0,n="utf8"){return pn(n,"encoding"),t.allocUnsafe(e).fill(r,n)}static allocUnsafe(e){return t.from(e)}static allocUnsafeSlow(e){return t.from(e)}static isBuffer(e){return e&&!!e._isBuffer}static byteLength(e,r="utf8"){if(typeof e=="string")return xr(e,r).byteLength;if(e&&e.byteLength)return e.byteLength;let n=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw n.code="ERR_INVALID_ARG_TYPE",n}static isEncoding(e){return us.includes(e)}static compare(e,r){Dt(e,"buff1"),Dt(r,"buff2");for(let n=0;nr[n])return 1}return e.length===r.length?0:e.length>r.length?1:-1}static from(e,r="utf8"){if(e&&typeof e=="object"&&e.type==="Buffer")return new t(e.data);if(typeof e=="number")return new t(new Uint8Array(e));if(typeof e=="string")return xr(e,r);if(ArrayBuffer.isView(e)){let{byteOffset:n,byteLength:i,buffer:o}=e;return"map"in e&&typeof e.map=="function"?new t(e.map(s=>s%256),n,i):new t(o,n,i)}if(e&&typeof e=="object"&&("length"in e||"byteLength"in e||"buffer"in e))return new t(e);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(e,r){if(e.length===0)return t.alloc(0);let n=[].concat(...e.map(o=>[...o])),i=t.alloc(r!==void 0?r:n.length);return i.set(r!==void 0?n.slice(0,r):n),i}slice(e=0,r=this.length){return this.subarray(e,r)}subarray(e=0,r=this.length){return Object.setPrototypeOf(super.subarray(e,r),t.prototype)}reverse(){return super.reverse(),this}readIntBE(e,r){V(e,"offset"),X(e,"offset"),$(e,"offset",this.length-1),V(r,"byteLength"),X(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o=0;o--)i.setUint8(o,e&255),e=e/256;return r+n}writeUintBE(e,r,n){return this.writeUIntBE(e,r,n)}writeUIntLE(e,r,n){V(r,"offset"),X(r,"offset"),$(r,"offset",this.length-1),V(n,"byteLength"),X(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=0;or===e[n])}copy(e,r=0,n=0,i=this.length){$(r,"targetStart"),$(n,"sourceStart",this.length),$(i,"sourceEnd"),r>>>=0,n>>>=0,i>>>=0;let o=0;for(;n=this.length?this.length-a:e.length),a);return this}includes(e,r=null,n="utf-8"){return this.indexOf(e,r,n)!==-1}lastIndexOf(e,r=null,n="utf-8"){return this.indexOf(e,r,n,!0)}indexOf(e,r=null,n="utf-8",i=!1){let o=i?this.findLastIndex.bind(this):this.findIndex.bind(this);n=typeof r=="string"?r:n;let s=t.from(typeof e=="number"?[e]:e,n),a=typeof r=="string"?0:r;return a=typeof r=="number"?a:null,a=Number.isNaN(a)?null:a,a??=i?this.length:0,a=a<0?this.length+a:a,s.length===0&&i===!1?a>=this.length?this.length:a:s.length===0&&i===!0?(a>=this.length?this.length:a)||this.length:o((f,h)=>(i?h<=a:h>=a)&&this[h]===s[0]&&s.every((A,k)=>this[h+k]===A))}toString(e="utf8",r=0,n=this.length){if(r=r<0?0:r,e=e.toString().toLowerCase(),n<=0)return"";if(e==="utf8"||e==="utf-8")return ls.decode(this.slice(r,n));if(e==="base64"||e==="base64url"){let i=btoa(this.reduce((o,s)=>o+Pr(s),""));return e==="base64url"?i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):i}if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return this.slice(r,n).reduce((i,o)=>i+Pr(o&(e==="ascii"?127:255)),"");if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let i=new DataView(this.buffer.slice(r,n));return Array.from({length:i.byteLength/2},(o,s)=>s*2+1i+o.toString(16).padStart(2,"0"),"");dn(`encoding "${e}"`)}toLocaleString(){return this.toString()}inspect(){return``}};ss={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]},as=new TextEncoder,ls=new TextDecoder,us=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],cs=4294967295;is(y.prototype);b=new Proxy(ms,{construct(t,[e,r]){return y.from(e,r)},get(t,e){return y[e]}}),Pr=String.fromCodePoint});var g,x,c=ie(()=>{"use strict";g={nextTick:(t,...e)=>{setTimeout(()=>{t(...e)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:x}=g});var P,m=ie(()=>{"use strict";P=globalThis.performance??(()=>{let t=Date.now();return{now:()=>Date.now()-t}})()});var E,p=ie(()=>{"use strict";E=()=>{};E.prototype=E});var w,d=ie(()=>{"use strict";w=class{value;constructor(e){this.value=e}deref(){return this.value}}});function hn(t,e){var r,n,i,o,s,a,f,h,C=t.constructor,A=C.precision;if(!t.s||!e.s)return e.s||(e=new C(t)),q?L(e,A):e;if(f=t.d,h=e.d,s=t.e,i=e.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=h.length):(n=h,i=s,a=f.length),s=Math.ceil(A/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=f.length,o=h.length,a-o<0&&(o=a,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/J|0,f[o]%=J;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return e.d=f,e.e=i,q?L(e,A):e}function ce(t,e,r){if(t!==~~t||tr)throw Error(ke+t)}function ue(t){var e,r,n,i=t.length-1,o="",s=t[0];if(i>0){for(o+=s,e=1;e16)throw Error(Tr+j(t));if(!t.s)return new C(te);for(e==null?(q=!1,a=A):a=e,s=new C(.03125);t.abs().gte(.1);)t=t.times(s),h+=5;for(n=Math.log(Oe(2,h))/Math.LN10*2+5|0,a+=n,r=i=o=new C(te),C.precision=a;;){if(i=L(i.times(t),a),r=r.times(++f),s=o.plus(he(i,r,a)),ue(s.d).slice(0,a)===ue(o.d).slice(0,a)){for(;h--;)o=L(o.times(o),a);return C.precision=A,e==null?(q=!0,L(o,A)):o}o=s}}function j(t){for(var e=t.e*N,r=t.d[0];r>=10;r/=10)e++;return e}function vr(t,e,r){if(e>t.LN10.sd())throw q=!0,r&&(t.precision=r),Error(oe+"LN10 precision limit exceeded");return L(new t(t.LN10),e)}function Pe(t){for(var e="";t--;)e+="0";return e}function ot(t,e){var r,n,i,o,s,a,f,h,C,A=1,k=10,R=t,_=R.d,O=R.constructor,D=O.precision;if(R.s<1)throw Error(oe+(R.s?"NaN":"-Infinity"));if(R.eq(te))return new O(0);if(e==null?(q=!1,h=D):h=e,R.eq(10))return e==null&&(q=!0),vr(O,h);if(h+=k,O.precision=h,r=ue(_),n=r.charAt(0),o=j(R),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(t),r=ue(R.d),n=r.charAt(0),A++;o=j(R),n>1?(R=new O("0."+r),o++):R=new O(n+"."+r.slice(1))}else return f=vr(O,h+2,D).times(o+""),R=ot(new O(n+"."+r.slice(1)),h-k).plus(f),O.precision=D,e==null?(q=!0,L(R,D)):R;for(a=s=R=he(R.minus(te),R.plus(te),h),C=L(R.times(R),h),i=3;;){if(s=L(s.times(C),h),f=a.plus(he(s,new O(i),h)),ue(f.d).slice(0,h)===ue(a.d).slice(0,h))return a=a.times(2),o!==0&&(a=a.plus(vr(O,h+2,D).times(o+""))),a=he(a,new O(A),h),O.precision=D,e==null?(q=!0,L(a,D)):a;a=f,i+=2}}function fn(t,e){var r,n,i;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;)++n;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(n,i),e){if(i-=n,r=r-n-1,t.e=Ne(r/N),t.d=[],n=(r+1)%N,r<0&&(n+=N),nIt||t.e<-It))throw Error(Tr+r)}else t.s=0,t.e=0,t.d=[0];return t}function L(t,e,r){var n,i,o,s,a,f,h,C,A=t.d;for(s=1,o=A[0];o>=10;o/=10)s++;if(n=e-s,n<0)n+=N,i=e,h=A[C=0];else{if(C=Math.ceil((n+1)/N),o=A.length,C>=o)return t;for(h=o=A[C],s=1;o>=10;o/=10)s++;n%=N,i=n-N+s}if(r!==void 0&&(o=Oe(10,s-i-1),a=h/o%10|0,f=e<0||A[C+1]!==void 0||h%o,f=r<4?(a||f)&&(r==0||r==(t.s<0?3:2)):a>5||a==5&&(r==4||f||r==6&&(n>0?i>0?h/Oe(10,s-i):0:A[C-1])%10&1||r==(t.s<0?8:7))),e<1||!A[0])return f?(o=j(t),A.length=1,e=e-o-1,A[0]=Oe(10,(N-e%N)%N),t.e=Ne(-e/N)||0):(A.length=1,A[0]=t.e=t.s=0),t;if(n==0?(A.length=C,o=1,C--):(A.length=C+1,o=Oe(10,N-n),A[C]=i>0?(h/Oe(10,s-i)%Oe(10,i)|0)*o:0),f)for(;;)if(C==0){(A[0]+=o)==J&&(A[0]=1,++t.e);break}else{if(A[C]+=o,A[C]!=J)break;A[C--]=0,o=1}for(n=A.length;A[--n]===0;)A.pop();if(q&&(t.e>It||t.e<-It))throw Error(Tr+j(t));return t}function wn(t,e){var r,n,i,o,s,a,f,h,C,A,k=t.constructor,R=k.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new k(t),q?L(e,R):e;if(f=t.d,A=e.d,n=e.e,h=t.e,f=f.slice(),s=h-n,s){for(C=s<0,C?(r=f,s=-s,a=A.length):(r=A,n=h,a=f.length),i=Math.max(Math.ceil(R/N),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,a=A.length,C=i0;--i)f[a++]=0;for(i=A.length;i>s;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+Pe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Pe(-i-1)+o,r&&(n=r-s)>0&&(o+=Pe(n))):i>=s?(o+=Pe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Pe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Pe(n))),t.s<0?"-"+o:o}function gn(t,e){if(t.length>e)return t.length=e,!0}function En(t){var e,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(ke+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 fn(s,o.toString())}else if(typeof o!="string")throw Error(ke+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,ds.test(o))fn(s,o);else throw Error(ke+o)}if(i.prototype=S,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=En,i.config=i.set=fs,t===void 0&&(t={}),t)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(ke+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(ke+r+": "+n);return this}var Ue,ps,Cr,q,oe,ke,Tr,Ne,Oe,ds,te,J,N,yn,It,S,he,Cr,Mt,xn=ie(()=>{"use strict";u();c();m();p();d();l();Ue=1e9,ps={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},q=!0,oe="[DecimalError] ",ke=oe+"Invalid argument: ",Tr=oe+"Exponent out of range: ",Ne=Math.floor,Oe=Math.pow,ds=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,J=1e7,N=7,yn=9007199254740991,It=Ne(yn/N),S={};S.absoluteValue=S.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};S.comparedTo=S.cmp=function(t){var e,r,n,i,o=this;if(t=new o.constructor(t),o.s!==t.s)return o.s||-t.s;if(o.e!==t.e)return o.e>t.e^o.s<0?1:-1;for(n=o.d.length,i=t.d.length,e=0,r=nt.d[e]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};S.decimalPlaces=S.dp=function(){var t=this,e=t.d.length-1,r=(e-t.e)*N;if(e=t.d[e],e)for(;e%10==0;e/=10)r--;return r<0?0:r};S.dividedBy=S.div=function(t){return he(this,new this.constructor(t))};S.dividedToIntegerBy=S.idiv=function(t){var e=this,r=e.constructor;return L(he(e,new r(t),0,1),r.precision)};S.equals=S.eq=function(t){return!this.cmp(t)};S.exponent=function(){return j(this)};S.greaterThan=S.gt=function(t){return this.cmp(t)>0};S.greaterThanOrEqualTo=S.gte=function(t){return this.cmp(t)>=0};S.isInteger=S.isint=function(){return this.e>this.d.length-2};S.isNegative=S.isneg=function(){return this.s<0};S.isPositive=S.ispos=function(){return this.s>0};S.isZero=function(){return this.s===0};S.lessThan=S.lt=function(t){return this.cmp(t)<0};S.lessThanOrEqualTo=S.lte=function(t){return this.cmp(t)<1};S.logarithm=S.log=function(t){var e,r=this,n=r.constructor,i=n.precision,o=i+5;if(t===void 0)t=new n(10);else if(t=new n(t),t.s<1||t.eq(te))throw Error(oe+"NaN");if(r.s<1)throw Error(oe+(r.s?"NaN":"-Infinity"));return r.eq(te)?new n(0):(q=!1,e=he(ot(r,o),ot(t,o),o),q=!0,L(e,i))};S.minus=S.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?wn(e,t):hn(e,(t.s=-t.s,t))};S.modulo=S.mod=function(t){var e,r=this,n=r.constructor,i=n.precision;if(t=new n(t),!t.s)throw Error(oe+"NaN");return r.s?(q=!1,e=he(r,t,0,1).times(t),q=!0,r.minus(e)):L(new n(r),i)};S.naturalExponential=S.exp=function(){return bn(this)};S.naturalLogarithm=S.ln=function(){return ot(this)};S.negated=S.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};S.plus=S.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?hn(e,t):wn(e,(t.s=-t.s,t))};S.precision=S.sd=function(t){var e,r,n,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(ke+t);if(e=j(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 t&&e>r?e:r};S.squareRoot=S.sqrt=function(){var t,e,r,n,i,o,s,a=this,f=a.constructor;if(a.s<1){if(!a.s)return new f(0);throw Error(oe+"NaN")}for(t=j(a),q=!1,i=Math.sqrt(+a),i==0||i==1/0?(e=ue(a.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=Ne((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),n=new f(e)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(o=n,n=o.plus(he(a,o,s+2)).times(.5),ue(o.d).slice(0,s)===(e=ue(n.d)).slice(0,s)){if(e=e.slice(s-3,s+1),i==s&&e=="4999"){if(L(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(e!="9999")break;s+=4}return q=!0,L(n,r)};S.times=S.mul=function(t){var e,r,n,i,o,s,a,f,h,C=this,A=C.constructor,k=C.d,R=(t=new A(t)).d;if(!C.s||!t.s)return new A(0);for(t.s*=C.s,r=C.e+t.e,f=k.length,h=R.length,f=0;){for(e=0,i=f+n;i>n;)a=o[i]+R[n]*k[i-n-1]+e,o[i--]=a%J|0,e=a/J|0;o[i]=(o[i]+e)%J|0}for(;!o[--s];)o.pop();return e?++r:o.shift(),t.d=o,t.e=r,q?L(t,A.precision):t};S.toDecimalPlaces=S.todp=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(ce(t,0,Ue),e===void 0?e=n.rounding:ce(e,0,8),L(r,t+j(r)+1,e))};S.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=De(n,!0):(ce(t,0,Ue),e===void 0?e=i.rounding:ce(e,0,8),n=L(new i(n),t+1,e),r=De(n,!0,t+1)),r};S.toFixed=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?De(i):(ce(t,0,Ue),e===void 0?e=o.rounding:ce(e,0,8),n=L(new o(i),t+j(i)+1,e),r=De(n.abs(),!1,t+j(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};S.toInteger=S.toint=function(){var t=this,e=t.constructor;return L(new e(t),j(t)+1,e.rounding)};S.toNumber=function(){return+this};S.toPower=S.pow=function(t){var e,r,n,i,o,s,a=this,f=a.constructor,h=12,C=+(t=new f(t));if(!t.s)return new f(te);if(a=new f(a),!a.s){if(t.s<1)throw Error(oe+"Infinity");return a}if(a.eq(te))return a;if(n=f.precision,t.eq(te))return L(a,n);if(e=t.e,r=t.d.length-1,s=e>=r,o=a.s,s){if((r=C<0?-C:C)<=yn){for(i=new f(te),e=Math.ceil(n/N+4),q=!1;r%2&&(i=i.times(a),gn(i.d,e)),r=Ne(r/2),r!==0;)a=a.times(a),gn(a.d,e);return q=!0,t.s<0?new f(te).div(i):L(i,n)}}else if(o<0)throw Error(oe+"NaN");return o=o<0&&t.d[Math.max(e,r)]&1?-1:1,a.s=1,q=!1,i=t.times(ot(a,n+h)),q=!0,i=bn(i),i.s=o,i};S.toPrecision=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?(r=j(i),n=De(i,r<=o.toExpNeg||r>=o.toExpPos)):(ce(t,1,Ue),e===void 0?e=o.rounding:ce(e,0,8),i=L(new o(i),t,e),r=j(i),n=De(i,t<=r||r<=o.toExpNeg,t)),n};S.toSignificantDigits=S.tosd=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(ce(t,1,Ue),e===void 0?e=n.rounding:ce(e,0,8)),L(new n(r),t,e)};S.toString=S.valueOf=S.val=S.toJSON=S[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=j(t),r=t.constructor;return De(t,e<=r.toExpNeg||e>=r.toExpPos)};he=function(){function t(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 e(n,i,o,s){var a,f;if(o!=s)f=o>s?1:-1;else for(a=f=0;ai[a]?1:-1;break}return f}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,f,h,C,A,k,R,_,O,D,ye,z,F,Y,Se,Er,se,St,Ot=n.constructor,Yo=n.s==i.s?1:-1,le=n.d,B=i.d;if(!n.s)return new Ot(n);if(!i.s)throw Error(oe+"Division by zero");for(f=n.e-i.e,se=B.length,Se=le.length,R=new Ot(Yo),_=R.d=[],h=0;B[h]==(le[h]||0);)++h;if(B[h]>(le[h]||0)&&--f,o==null?z=o=Ot.precision:s?z=o+(j(n)-j(i))+1:z=o,z<0)return new Ot(0);if(z=z/N+2|0,h=0,se==1)for(C=0,B=B[0],z++;(h1&&(B=t(B,C),le=t(le,C),se=B.length,Se=le.length),Y=se,O=le.slice(0,se),D=O.length;D=J/2&&++Er;do C=0,a=e(B,O,se,D),a<0?(ye=O[0],se!=D&&(ye=ye*J+(O[1]||0)),C=ye/Er|0,C>1?(C>=J&&(C=J-1),A=t(B,C),k=A.length,D=O.length,a=e(A,O,k,D),a==1&&(C--,r(A,se{"use strict";xn();v=class extends Mt{static isDecimal(e){return e instanceof Mt}static random(e=20){{let n=globalThis.crypto.getRandomValues(new Uint8Array(e)).reduce((i,o)=>i+o,"");return new Mt(`0.${n.slice(0,e)}`)}}},be=v});function Es(){return!1}function kr(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function xs(){return kr()}function Ps(){return[]}function vs(t){t(null,[])}function Ts(){return""}function Cs(){return""}function As(){}function Rs(){}function Ss(){}function Os(){}function ks(){}function Ds(){}function Is(){}function Ms(){}function _s(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Ls(t,e){e(null,kr())}var Fs,Us,Nn,qn=ie(()=>{"use strict";u();c();m();p();d();l();Fs={},Us={existsSync:Es,lstatSync:kr,stat:Ls,statSync:xs,readdirSync:Ps,readdir:vs,readlinkSync:Ts,realpathSync:Cs,chmodSync:As,renameSync:Rs,mkdirSync:Ss,rmdirSync:Os,rmSync:ks,unlinkSync:Ds,watchFile:Is,unwatchFile:Ms,watch:_s,promises:Fs},Nn=Us});function Ns(...t){return t.join("/")}function qs(...t){return t.join("/")}function Bs(t){let e=Bn(t),r=Vn(t),[n,i]=e.split(".");return{root:"/",dir:r,base:e,ext:i,name:n}}function Bn(t){let e=t.split("/");return e[e.length-1]}function Vn(t){return t.split("/").slice(0,-1).join("/")}function js(t){let e=t.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of e)i===".."?r.pop():r.push(i);let n=r.join("/");return t.startsWith("/")?"/"+n:n}var jn,Vs,$s,Qs,Ut,$n=ie(()=>{"use strict";u();c();m();p();d();l();jn="/",Vs=":";$s={sep:jn},Qs={basename:Bn,delimiter:Vs,dirname:Vn,join:qs,normalize:js,parse:Bs,posix:$s,resolve:Ns,sep:jn},Ut=Qs});var Qn=Fe((lm,Js)=>{Js.exports={name:"@prisma/internals",version:"6.15.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb","@prisma/schema-engine-wasm":"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var Hn=Fe((Ep,Kn)=>{"use strict";u();c();m();p();d();l();Kn.exports=(t,e=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof t!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(e===0)return t;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return t.replace(n,r.indent.repeat(e))}});var Xn=Fe((_p,Yn)=>{"use strict";u();c();m();p();d();l();Yn.exports=({onlyFirst:t=!1}={})=>{let e=["[\\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(e,t?void 0:"g")}});var ei=Fe((Vp,Zn)=>{"use strict";u();c();m();p();d();l();var ta=Xn();Zn.exports=t=>typeof t=="string"?t.replace(ta(),""):t});var Br=Fe((zy,oi)=>{"use strict";u();c();m();p();d();l();oi.exports=function(){function t(e,r,n,i,o){return en?n+1:e+1:i===o?r:r+1}return function(e,r){if(e===r)return 0;if(e.length>r.length){var n=e;e=r,r=n}for(var i=e.length,o=r.length;i>0&&e.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";u();c();m();p();d();l()});var mi=ie(()=>{"use strict";u();c();m();p();d();l()});var Li=Fe((YP,Ga)=>{Ga.exports={name:"@prisma/engines-version",version:"6.15.0-5.85179d7826409ee107a6ba334b5e305ae3fba9fb",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"85179d7826409ee107a6ba334b5e305ae3fba9fb"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var sr,Fi=ie(()=>{"use strict";u();c();m();p();d();l();sr=class{events={};on(e,r){return this.events[e]||(this.events[e]=[]),this.events[e].push(r),this}emit(e,...r){return this.events[e]?(this.events[e].forEach(n=>{n(...r)}),!0):!1}}});var eu={};nt(eu,{DMMF:()=>pt,Debug:()=>G,Decimal:()=>be,Extensions:()=>Ar,MetricsClient:()=>Ye,PrismaClientInitializationError:()=>I,PrismaClientKnownRequestError:()=>Z,PrismaClientRustPanicError:()=>Ee,PrismaClientUnknownRequestError:()=>Q,PrismaClientValidationError:()=>K,Public:()=>Rr,Sql:()=>ee,createParam:()=>Ri,defineDmmfProperty:()=>Mi,deserializeJsonResponse:()=>et,deserializeRawResult:()=>br,dmmfToRuntimeDataModel:()=>ii,empty:()=>Ni,getPrismaClient:()=>Ko,getRuntime:()=>Ae,join:()=>Ui,makeStrictEnum:()=>Ho,makeTypedQueryFactory:()=>_i,objectEnumValues:()=>zt,raw:()=>Hr,serializeJsonQuery:()=>nr,skip:()=>rr,sqltag:()=>zr,warnEnvConflicts:()=>void 0,warnOnce:()=>ut});module.exports=ns(eu);u();c();m();p();d();l();var Ar={};nt(Ar,{defineExtension:()=>Pn,getExtensionContext:()=>vn});u();c();m();p();d();l();u();c();m();p();d();l();function Pn(t){return typeof t=="function"?t:e=>e.$extends(t)}u();c();m();p();d();l();function vn(t){return t}var Rr={};nt(Rr,{validator:()=>Tn});u();c();m();p();d();l();u();c();m();p();d();l();function Tn(...t){return e=>e}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Sr,Cn,An,Rn,Sn=!0;typeof g<"u"&&({FORCE_COLOR:Sr,NODE_DISABLE_COLORS:Cn,NO_COLOR:An,TERM:Rn}=g.env||{},Sn=g.stdout&&g.stdout.isTTY);var gs={enabled:!Cn&&An==null&&Rn!=="dumb"&&(Sr!=null&&Sr!=="0"||Sn)};function U(t,e){let r=new RegExp(`\\x1b\\[${e}m`,"g"),n=`\x1B[${t}m`,i=`\x1B[${e}m`;return function(o){return!gs.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Xu=U(0,0),_t=U(1,22),Lt=U(2,22),Zu=U(3,23),On=U(4,24),ec=U(7,27),tc=U(8,28),rc=U(9,29),nc=U(30,39),qe=U(31,39),kn=U(32,39),Dn=U(33,39),In=U(34,39),ic=U(35,39),Mn=U(36,39),oc=U(37,39),_n=U(90,39),sc=U(90,39),ac=U(40,49),lc=U(41,49),uc=U(42,49),cc=U(43,49),mc=U(44,49),pc=U(45,49),dc=U(46,49),fc=U(47,49);u();c();m();p();d();l();var ys=100,Ln=["green","yellow","blue","magenta","cyan","red"],Ft=[],Fn=Date.now(),hs=0,Or=typeof g<"u"?g.env:{};globalThis.DEBUG??=Or.DEBUG??"";globalThis.DEBUG_COLORS??=Or.DEBUG_COLORS?Or.DEBUG_COLORS==="true":!0;var st={enable(t){typeof t=="string"&&(globalThis.DEBUG=t)},disable(){let t=globalThis.DEBUG;return globalThis.DEBUG="",t},enabled(t){let e=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=e.some(i=>i===""||i[0]==="-"?!1:t.match(RegExp(i.split("*").join(".*")+"$"))),n=e.some(i=>i===""||i[0]!=="-"?!1:t.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...t)=>{let[e,r,...n]=t;(console.warn??console.log)(`${e} ${r}`,...n)},formatters:{}};function bs(t){let e={color:Ln[hs++%Ln.length],enabled:st.enabled(t),namespace:t,log:st.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=e;if(n.length!==0&&Ft.push([o,...n]),Ft.length>ys&&Ft.shift(),st.enabled(o)||i){let f=n.map(C=>typeof C=="string"?C:ws(C)),h=`+${Date.now()-Fn}ms`;Fn=Date.now(),a(o,...f,h)}};return new Proxy(r,{get:(n,i)=>e[i],set:(n,i,o)=>e[i]=o})}var G=new Proxy(bs,{get:(t,e)=>st[e],set:(t,e,r)=>st[e]=r});function ws(t,e=2){let r=new Set;return JSON.stringify(t,(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},e)}function Un(){Ft.length=0}u();c();m();p();d();l();u();c();m();p();d();l();var Dr=["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"];u();c();m();p();d();l();var Gs=Qn(),Ir=Gs.version;u();c();m();p();d();l();function Be(t){let e=Ws();return e||(t?.config.engineType==="library"?"library":t?.config.engineType==="binary"?"binary":t?.config.engineType==="client"?"client":Ks(t))}function Ws(){let t=g.env.PRISMA_CLIENT_ENGINE_TYPE;return t==="library"?"library":t==="binary"?"binary":t==="client"?"client":void 0}function Ks(t){return t?.previewFeatures.includes("queryCompiler")?"client":"library"}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();function Mr(t){return t.name==="DriverAdapterError"&&typeof t.cause=="object"}u();c();m();p();d();l();function Nt(t){return{ok:!0,value:t,map(e){return Nt(e(t))},flatMap(e){return e(t)}}}function Ie(t){return{ok:!1,error:t,map(){return Ie(t)},flatMap(){return Ie(t)}}}var Jn=G("driver-adapter-utils"),_r=class{registeredErrors=[];consumeError(e){return this.registeredErrors[e]}registerNewError(e){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:e},r}};var qt=(t,e=new _r)=>{let r={adapterName:t.adapterName,errorRegistry:e,queryRaw:we(e,t.queryRaw.bind(t)),executeRaw:we(e,t.executeRaw.bind(t)),executeScript:we(e,t.executeScript.bind(t)),dispose:we(e,t.dispose.bind(t)),provider:t.provider,startTransaction:async(...n)=>(await we(e,t.startTransaction.bind(t))(...n)).map(o=>Hs(e,o))};return t.getConnectionInfo&&(r.getConnectionInfo=zs(e,t.getConnectionInfo.bind(t))),r},Hs=(t,e)=>({adapterName:e.adapterName,provider:e.provider,options:e.options,queryRaw:we(t,e.queryRaw.bind(e)),executeRaw:we(t,e.executeRaw.bind(e)),commit:we(t,e.commit.bind(e)),rollback:we(t,e.rollback.bind(e))});function we(t,e){return async(...r)=>{try{return Nt(await e(...r))}catch(n){if(Jn("[error@wrapAsync]",n),Mr(n))return Ie(n.cause);let i=t.registerNewError(n);return Ie({kind:"GenericJs",id:i})}}}function zs(t,e){return(...r)=>{try{return Nt(e(...r))}catch(n){if(Jn("[error@wrapSync]",n),Mr(n))return Ie(n.cause);let i=t.registerNewError(n);return Ie({kind:"GenericJs",id:i})}}}u();c();m();p();d();l();var Gn="prisma+postgres",Wn=`${Gn}:`;function Lr(t){return t?.toString().startsWith(`${Wn}//`)??!1}var lt={};nt(lt,{error:()=>Zs,info:()=>Xs,log:()=>Ys,query:()=>ea,should:()=>zn,tags:()=>at,warn:()=>Fr});u();c();m();p();d();l();var at={error:qe("prisma:error"),warn:Dn("prisma:warn"),info:Mn("prisma:info"),query:In("prisma:query")},zn={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function Ys(...t){console.log(...t)}function Fr(t,...e){zn.warn()&&console.warn(`${at.warn} ${t}`,...e)}function Xs(t,...e){console.info(`${at.info} ${t}`,...e)}function Zs(t,...e){console.error(`${at.error} ${t}`,...e)}function ea(t,...e){console.log(`${at.query} ${t}`,...e)}u();c();m();p();d();l();function Bt(t,e){if(!t)throw new Error(`${e}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}u();c();m();p();d();l();function Me(t,e){throw new Error(e)}u();c();m();p();d();l();function Ur(t,e){return Object.prototype.hasOwnProperty.call(t,e)}u();c();m();p();d();l();function Vt(t,e){let r={};for(let n of Object.keys(t))r[n]=e(t[n],n);return r}u();c();m();p();d();l();function Nr(t,e){if(t.length===0)return;let r=t[0];for(let n=1;n{ti.has(t)||(ti.add(t),Fr(e,...r))};var I=class t extends Error{clientVersion;errorCode;retryable;constructor(e,r,n){super(e),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(t)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};re(I,"PrismaClientInitializationError");u();c();m();p();d();l();var Z=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(e,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(e),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(Z,"PrismaClientKnownRequestError");u();c();m();p();d();l();var Ee=class extends Error{clientVersion;constructor(e,r){super(e),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};re(Ee,"PrismaClientRustPanicError");u();c();m();p();d();l();var Q=class extends Error{clientVersion;batchRequestIdx;constructor(e,{clientVersion:r,batchRequestIdx:n}){super(e),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};re(Q,"PrismaClientUnknownRequestError");u();c();m();p();d();l();var K=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(e,{clientVersion:r}){super(e),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};re(K,"PrismaClientValidationError");u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var me=class{_map=new Map;get(e){return this._map.get(e)?.value}set(e,r){this._map.set(e,{value:r})}getOrCreate(e,r){let n=this._map.get(e);if(n)return n.value;let i=r();return this.set(e,i),i}};u();c();m();p();d();l();function ve(t){return t.substring(0,1).toLowerCase()+t.substring(1)}u();c();m();p();d();l();function ni(t,e){let r={};for(let n of t){let i=n[e];r[i]=n}return r}u();c();m();p();d();l();function ct(t){let e;return{get(){return e||(e={value:t()}),e.value}}}u();c();m();p();d();l();function ii(t){return{models:qr(t.models),enums:qr(t.enums),types:qr(t.types)}}function qr(t){let e={};for(let{name:r,...n}of t)e[r]=n;return e}u();c();m();p();d();l();function Ve(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function jt(t){return t.toString()!=="Invalid Date"}u();c();m();p();d();l();l();function je(t){return v.isDecimal(t)?!0:t!==null&&typeof t=="object"&&typeof t.s=="number"&&typeof t.e=="number"&&typeof t.toFixed=="function"&&Array.isArray(t.d)}u();c();m();p();d();l();u();c();m();p();d();l();var pt={};nt(pt,{ModelAction:()=>mt,datamodelEnumToSchemaEnum:()=>ra});u();c();m();p();d();l();u();c();m();p();d();l();function ra(t){return{name:t.name,values:t.values.map(e=>e.name)}}u();c();m();p();d();l();var mt=(F=>(F.findUnique="findUnique",F.findUniqueOrThrow="findUniqueOrThrow",F.findFirst="findFirst",F.findFirstOrThrow="findFirstOrThrow",F.findMany="findMany",F.create="create",F.createMany="createMany",F.createManyAndReturn="createManyAndReturn",F.update="update",F.updateMany="updateMany",F.updateManyAndReturn="updateManyAndReturn",F.upsert="upsert",F.delete="delete",F.deleteMany="deleteMany",F.groupBy="groupBy",F.count="count",F.aggregate="aggregate",F.findRaw="findRaw",F.aggregateRaw="aggregateRaw",F))(mt||{});var na=it(Hn());var ia={red:qe,gray:_n,dim:Lt,bold:_t,underline:On,highlightSource:t=>t.highlight()},oa={red:t=>t,gray:t=>t,dim:t=>t,bold:t=>t,underline:t=>t,highlightSource:t=>t};function sa({message:t,originalMethod:e,isPanic:r,callArguments:n}){return{functionName:`prisma.${e}()`,message:t,isPanic:r??!1,callArguments:n}}function aa({functionName:t,location:e,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],f=e?" 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(`\`${t}\``)} invocation${f}`))):a.push(s.red(`Invalid ${s.bold(`\`${t}\``)} invocation${f}`)),e&&a.push(s.underline(la(e))),i){a.push("");let h=[i.toString()];o&&(h.push(o),h.push(s.dim(")"))),a.push(h.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` `)}function la(t){let e=[t.fileName];return t.lineNumber&&e.push(String(t.lineNumber)),t.columnNumber&&e.push(String(t.columnNumber)),e.join(":")}function $t(t){let e=t.showColors?ia:oa,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(t,e):r=sa(t),aa(r,e)}u();c();m();p();d();l();var di=it(Br());u();c();m();p();d();l();function li(t,e,r){let n=ui(t),i=ua(n),o=ma(i);o?Qt(o,e,r):e.addErrorMessage(()=>"Unknown error")}function ui(t){return t.errors.flatMap(e=>e.kind==="Union"?ui(e):[e])}function ua(t){let e=new Map,r=[];for(let n of t){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=e.get(i);o?e.set(i,{...n,argument:{...n.argument,typeNames:ca(o.argument.typeNames,n.argument.typeNames)}}):e.set(i,n)}return r.push(...e.values()),r}function ca(t,e){return[...new Set(t.concat(e))]}function ma(t){return Nr(t,(e,r)=>{let n=si(e),i=si(r);return n!==i?n-i:ai(e)-ai(r)})}function si(t){let e=0;return Array.isArray(t.selectionPath)&&(e+=t.selectionPath.length),Array.isArray(t.argumentPath)&&(e+=t.argumentPath.length),e}function ai(t){switch(t.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}u();c();m();p();d();l();var ne=class{constructor(e,r){this.name=e;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(e){let{colors:{green:r}}=e.context;e.addMarginSymbol(r(this.isRequired?"+":"?")),e.write(r(this.name)),this.isRequired||e.write(r("?")),e.write(r(": ")),typeof this.value=="string"?e.write(r(this.value)):e.write(this.value)}};u();c();m();p();d();l();u();c();m();p();d();l();mi();u();c();m();p();d();l();var $e=class{constructor(e=0,r){this.context=r;this.currentIndent=e}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(e){return typeof e=="string"?this.currentLine+=e:e.write(this),this}writeJoined(e,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(e){return this.marginSymbol=e,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let e=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+e.slice(1):e}};ci();u();c();m();p();d();l();u();c();m();p();d();l();var Jt=class{constructor(e){this.value=e}write(e){e.write(this.value)}markAsError(){this.value.markAsError()}};u();c();m();p();d();l();var Gt=t=>t,Wt={bold:Gt,red:Gt,green:Gt,dim:Gt,enabled:!1},pi={bold:_t,red:qe,green:kn,dim:Lt,enabled:!0},Qe={write(t){t.writeLine(",")}};u();c();m();p();d();l();var pe=class{constructor(e){this.contents=e}isUnderlined=!1;color=e=>e;underline(){return this.isUnderlined=!0,this}setColor(e){return this.color=e,this}write(e){let r=e.getCurrentLineLength();e.write(this.color(this.contents)),this.isUnderlined&&e.afterNextNewline(()=>{e.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};u();c();m();p();d();l();var Te=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var Je=class extends Te{items=[];addItem(e){return this.items.push(new Jt(e)),this}getField(e){return this.items[e]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(e){if(this.items.length===0){this.writeEmpty(e);return}this.writeWithItems(e)}writeEmpty(e){let r=new pe("[]");this.hasError&&r.setColor(e.context.colors.red).underline(),e.write(r)}writeWithItems(e){let{colors:r}=e.context;e.writeLine("[").withIndent(()=>e.writeJoined(Qe,this.items).newLine()).write("]"),this.hasError&&e.afterNextNewline(()=>{e.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Ge=class t extends Te{fields={};suggestions=[];addField(e){this.fields[e.name]=e}addSuggestion(e){this.suggestions.push(e)}getField(e){return this.fields[e]}getDeepField(e){let[r,...n]=e,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof t?a=o.value.getField(s):o.value instanceof Je&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(e){return e.length===0?this:this.getDeepField(e)?.value}hasField(e){return!!this.getField(e)}removeAllFields(){this.fields={}}removeField(e){delete this.fields[e]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(e){return this.getField(e)?.value}getDeepSubSelectionValue(e){let r=this;for(let n of e){if(!(r instanceof t))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(e){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of e){let o=n.value.getFieldValue(i);if(!o||!(o instanceof t))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let e=this.getField("select")?.value.asObject();if(e)return{kind:"select",value:e};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(e){return this.getSelectionParent()?.value.fields[e].value}getPrintWidth(){let e=Object.values(this.fields);return e.length==0?2:Math.max(...e.map(n=>n.getPrintWidth()))+2}write(e){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(e);return}this.writeWithContents(e,r)}asObject(){return this}writeEmpty(e){let r=new pe("{}");this.hasError&&r.setColor(e.context.colors.red).underline(),e.write(r)}writeWithContents(e,r){e.writeLine("{").withIndent(()=>{e.writeJoined(Qe,[...r,...this.suggestions]).newLine()}),e.write("}"),this.hasError&&e.afterNextNewline(()=>{e.writeLine(e.context.colors.red("~".repeat(this.getPrintWidth())))})}};u();c();m();p();d();l();var W=class extends Te{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(){}};u();c();m();p();d();l();var dt=class{fields=[];addField(e,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${e}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(e){let{colors:{green:r}}=e.context;e.writeLine(r("{")).withIndent(()=>{e.writeJoined(Qe,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Qt(t,e,r){switch(t.kind){case"MutuallyExclusiveFields":pa(t,e);break;case"IncludeOnScalar":da(t,e);break;case"EmptySelection":fa(t,e,r);break;case"UnknownSelectionField":ba(t,e);break;case"InvalidSelectionValue":wa(t,e);break;case"UnknownArgument":xa(t,e);break;case"UnknownInputField":Ea(t,e);break;case"RequiredArgumentMissing":Pa(t,e);break;case"InvalidArgumentType":va(t,e);break;case"InvalidArgumentValue":Ta(t,e);break;case"ValueTooLarge":Ca(t,e);break;case"SomeFieldsMissing":Ra(t,e);break;case"TooManyFieldsGiven":Aa(t,e);break;case"Union":li(t,e,r);break;default:throw new Error("not implemented: "+t.kind)}}function pa(t,e){let r=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();r&&(r.getField(t.firstField)?.markAsError(),r.getField(t.secondField)?.markAsError()),e.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${t.firstField}\``)} or ${n.green(`\`${t.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function da(t,e){let[r,n]=We(t.selectionPath),i=t.outputType,o=e.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ne(s.name,"true"));e.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${ft(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function fa(t,e,r){let n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){ga(t,e,i);return}if(n.hasField("select")){ya(t,e);return}}if(r?.[ve(t.outputType.name)]){ha(t,e);return}e.addErrorMessage(()=>`Unknown field at "${t.selectionPath.join(".")} selection"`)}function ga(t,e,r){r.removeAllFields();for(let n of t.outputType.fields)r.addSuggestion(new ne(n.name,"false"));e.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(t.outputType.name)}. At least one field must be included in the result`)}function ya(t,e){let r=t.outputType,n=e.arguments.getDeepSelectionParent(t.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),yi(n,r)),e.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${ft(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function ha(t,e){let r=new dt;for(let i of t.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ne("omit",r).makeRequired();if(t.selectionPath.length===0)e.arguments.addSuggestion(n);else{let[i,o]=We(t.selectionPath),a=e.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let f=a?.value.asObject()??new Ge;f.addSuggestion(n),a.value=f}}e.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(t.outputType.name)}. At least one field must be included in the result`)}function ba(t,e){let r=hi(t.selectionPath,e);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":yi(n,t.outputType);break;case"include":Sa(n,t.outputType);break;case"omit":Oa(n,t.outputType);break}}e.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${t.outputType.name}\``)}.`),i.push(ft(n)),i.join(" ")})}function wa(t,e){let r=hi(t.selectionPath,e);r.parentKind!=="unknown"&&r.field.value.markAsError(),e.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${t.underlyingError}`)}function xa(t,e){let r=t.argumentPath[0],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),ka(n,t.arguments)),e.addErrorMessage(i=>fi(i,r,t.arguments.map(o=>o.name)))}function Ea(t,e){let[r,n]=We(t.argumentPath),i=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(i){i.getDeepField(t.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&bi(o,t.inputType)}e.addErrorMessage(o=>fi(o,n,t.inputType.fields.map(s=>s.name)))}function fi(t,e,r){let n=[`Unknown argument \`${t.red(e)}\`.`],i=Ia(e,r);return i&&n.push(`Did you mean \`${t.green(i)}\`?`),r.length>0&&n.push(ft(t)),n.join(" ")}function Pa(t,e){let r;e.addErrorMessage(f=>r?.value instanceof W&&r.value.text==="null"?`Argument \`${f.green(o)}\` must not be ${f.red("null")}.`:`Argument \`${f.green(o)}\` is missing.`);let n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(!n)return;let[i,o]=We(t.argumentPath),s=new dt,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),t.inputTypes.length===1&&t.inputTypes[0].kind==="object"){for(let f of t.inputTypes[0].fields)s.addField(f.name,f.typeNames.join(" | "));a.addSuggestion(new ne(o,s).makeRequired())}else{let f=t.inputTypes.map(gi).join(" | ");a.addSuggestion(new ne(o,f).makeRequired())}if(t.dependentArgumentPath){n.getDeepField(t.dependentArgumentPath)?.markAsError();let[,f]=We(t.dependentArgumentPath);e.addErrorMessage(h=>`Argument \`${h.green(o)}\` is required because argument \`${h.green(f)}\` was provided.`)}}}function gi(t){return t.kind==="list"?`${gi(t.elementType)}[]`:t.name}function va(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&n.getDeepFieldValue(t.argumentPath)?.markAsError(),e.addErrorMessage(i=>{let o=Kt("or",t.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(t.inferredType)}.`})}function Ta(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&n.getDeepFieldValue(t.argumentPath)?.markAsError(),e.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(t.underlyingError&&o.push(`: ${t.underlyingError}`),o.push("."),t.argument.typeNames.length>0){let s=Kt("or",t.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Ca(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(t.argumentPath)?.value;s?.markAsError(),s instanceof W&&(i=s.text)}e.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 Ra(t,e){let r=t.argumentPath[t.argumentPath.length-1],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(t.argumentPath)?.asObject();i&&bi(i,t.inputType)}e.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(t.inputType.name)} needs`];return t.constraints.minFieldCount===1?t.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Kt("or",t.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${t.constraints.minFieldCount}`)} arguments.`),o.push(ft(i)),o.join(" ")})}function Aa(t,e){let r=t.argumentPath[t.argumentPath.length-1],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(t.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}e.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(t.inputType.name)} needs`];return t.constraints.minFieldCount===1&&t.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):t.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${t.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Kt("and",i.map(a=>o.red(a)))}. Please choose`),t.constraints.maxFieldCount===1?s.push("one."):s.push(`${t.constraints.maxFieldCount}.`),s.join(" ")})}function yi(t,e){for(let r of e.fields)t.hasField(r.name)||t.addSuggestion(new ne(r.name,"true"))}function Sa(t,e){for(let r of e.fields)r.isRelation&&!t.hasField(r.name)&&t.addSuggestion(new ne(r.name,"true"))}function Oa(t,e){for(let r of e.fields)!t.hasField(r.name)&&!r.isRelation&&t.addSuggestion(new ne(r.name,"true"))}function ka(t,e){for(let r of e)t.hasField(r.name)||t.addSuggestion(new ne(r.name,r.typeNames.join(" | ")))}function hi(t,e){let[r,n]=We(t),i=e.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),f=o?.getField(n);return o&&f?{parentKind:"select",parent:o,field:f,fieldName:n}:(f=s?.getField(n),s&&f?{parentKind:"include",field:f,parent:s,fieldName:n}:(f=a?.getField(n),a&&f?{parentKind:"omit",field:f,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function bi(t,e){if(e.kind==="object")for(let r of e.fields)t.hasField(r.name)||t.addSuggestion(new ne(r.name,r.typeNames.join(" | ")))}function We(t){let e=[...t],r=e.pop();if(!r)throw new Error("unexpected empty path");return[e,r]}function ft({green:t,enabled:e}){return"Available options are "+(e?`listed in ${t("green")}`:"marked with ?")+"."}function Kt(t,e){if(e.length===1)return e[0];let r=[...e],n=r.pop();return`${r.join(", ")} ${t} ${n}`}var Da=3;function Ia(t,e){let r=1/0,n;for(let i of e){let o=(0,di.default)(t,i);o>Da||o`}};function Ke(t){return t instanceof gt}u();c();m();p();d();l();var Ht=Symbol(),jr=new WeakMap,Ee=class{constructor(e){e===Ht?jr.set(this,`Prisma.${this._getName()}`):jr.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return jr.get(this)}},yt=class extends Ee{_getNamespace(){return"NullTypes"}},ht=class extends yt{#e};$r(ht,"DbNull");var bt=class extends yt{#e};$r(bt,"JsonNull");var wt=class extends yt{#e};$r(wt,"AnyNull");var zt={classes:{DbNull:ht,JsonNull:bt,AnyNull:wt},instances:{DbNull:new ht(Ht),JsonNull:new bt(Ht),AnyNull:new wt(Ht)}};function $r(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0})}u();c();m();p();d();l();var wi=": ",Yt=class{constructor(e,r){this.name=e;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+wi.length}write(e){let r=new pe(this.name);this.hasError&&r.underline().setColor(e.context.colors.red),e.write(r).write(wi).write(this.value)}};var Qr=class{arguments;errorMessages=[];constructor(e){this.arguments=e}write(e){e.write(this.arguments)}addErrorMessage(e){this.errorMessages.push(e)}renderAllMessages(e){return this.errorMessages.map(r=>r(e)).join(` -`)}};function He(t){return new Qr(xi(t))}function xi(t){let e=new Ge;for(let[r,n]of Object.entries(t)){let i=new Yt(r,Ei(n));e.addField(i)}return e}function Ei(t){if(typeof t=="string")return new W(JSON.stringify(t));if(typeof t=="number"||typeof t=="boolean")return new W(String(t));if(typeof t=="bigint")return new W(`${t}n`);if(t===null)return new W("null");if(t===void 0)return new W("undefined");if(je(t))return new W(`new Prisma.Decimal("${t.toFixed()}")`);if(t instanceof Uint8Array)return b.isBuffer(t)?new W(`Buffer.alloc(${t.byteLength})`):new W(`new Uint8Array(${t.byteLength})`);if(t instanceof Date){let e=jt(t)?t.toISOString():"Invalid Date";return new W(`new Date("${e}")`)}return t instanceof Ee?new W(`Prisma.${t._getName()}`):Ke(t)?new W(`prisma.${ve(t.modelName)}.$fields.${t.name}`):Array.isArray(t)?Ma(t):typeof t=="object"?xi(t):new W(Object.prototype.toString.call(t))}function Ma(t){let e=new Je;for(let r of t)e.addItem(Ei(r));return e}function Xt(t,e){let r=e==="pretty"?pi:Wt,n=t.renderAllMessages(r),i=new $e(0,{colors:r}).write(t).toString();return{message:n,args:i}}function Zt({args:t,errors:e,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=He(t);for(let R of e)Qt(R,a,s);let{message:f,args:h}=Xt(a,r),C=$t({message:f,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:h});throw new K(C,{clientVersion:o})}u();c();m();p();d();l();u();c();m();p();d();l();function de(t){return t.replace(/^./,e=>e.toLowerCase())}u();c();m();p();d();l();function vi(t,e,r){let n=de(r);return!e.result||!(e.result.$allModels||e.result[n])?t:_a({...t,...Pi(e.name,t,e.result.$allModels),...Pi(e.name,t,e.result[n])})}function _a(t){let e=new me,r=(n,i)=>e.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),t[n]?t[n].needs.flatMap(o=>r(o,i)):[n]));return Vt(t,n=>({...n,needs:r(n.name,new Set)}))}function Pi(t,e,r){return r?Vt(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:La(e,o,i)})):{}}function La(t,e,r){let n=t?.[e]?.compute;return n?i=>r({...i,[e]:n(i)}):r}function Ti(t,e){if(!e)return t;let r={...t};for(let n of Object.values(e))if(t[n.name])for(let i of n.needs)r[i]=!0;return r}function Ci(t,e){if(!e)return t;let r={...t};for(let n of Object.values(e))if(!t[n.name])for(let i of n.needs)delete r[i];return r}var er=class{constructor(e,r){this.extension=e;this.previous=r}computedFieldsCache=new me;modelExtensionsCache=new me;queryCallbacksCache=new me;clientExtensions=ct(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=ct(()=>{let e=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?e.concat(r):e});getAllComputedFields(e){return this.computedFieldsCache.getOrCreate(e,()=>vi(this.previous?.getAllComputedFields(e),this.extension,e))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(e){return this.modelExtensionsCache.getOrCreate(e,()=>{let r=de(e);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(e):{...this.previous?.getAllModelExtensions(e),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(e,r){return this.queryCallbacksCache.getOrCreate(`${e}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(e,r)??[],i=[],o=this.extension.query;return!o||!(o[e]||o.$allModels||o[r]||o.$allOperations)?n:(o[e]!==void 0&&(o[e][r]!==void 0&&i.push(o[e][r]),o[e].$allOperations!==void 0&&i.push(o[e].$allOperations)),e!=="$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()}},ze=class t{constructor(e){this.head=e}static empty(){return new t}static single(e){return new t(new er(e))}isEmpty(){return this.head===void 0}append(e){return new t(new er(e,this.head))}getAllComputedFields(e){return this.head?.getAllComputedFields(e)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(e){return this.head?.getAllModelExtensions(e)}getAllQueryCallbacks(e,r){return this.head?.getAllQueryCallbacks(e,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};u();c();m();p();d();l();var tr=class{constructor(e){this.name=e}};function Ri(t){return t instanceof tr}function Ai(t){return new tr(t)}u();c();m();p();d();l();u();c();m();p();d();l();var Si=Symbol(),xt=class{constructor(e){if(e!==Si)throw new Error("Skip instance can not be constructed directly")}ifUndefined(e){return e===void 0?rr:e}},rr=new xt(Si);function fe(t){return t instanceof xt}var Fa={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Oi="explicitly `undefined` values are not allowed";function nr({modelName:t,action:e,args:r,runtimeDataModel:n,extensions:i=ze.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:f,previewFeatures:h,globalOmit:C}){let R=new Jr({runtimeDataModel:n,modelName:t,action:e,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:f,previewFeatures:h,globalOmit:C});return{modelName:t,action:Fa[e],query:Et(r,R)}}function Et({select:t,include:e,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Di(r,n),selection:Ua(t,e,i,n)}}function Ua(t,e,r,n){return t?(e?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Va(t,n)):Na(n,e,r)}function Na(t,e,r){let n={};return t.modelOrType&&!t.isRawAction()&&(n.$composites=!0,n.$scalars=!0),e&&qa(n,e,t),Ba(n,r,t),n}function qa(t,e,r){for(let[n,i]of Object.entries(e)){if(fe(i))continue;let o=r.nestSelection(n);if(Gr(i,o),i===!1||i===void 0){t[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){t[n]=Et(i===!0?{}:i,o);continue}if(i===!0){t[n]=!0;continue}t[n]=Et(i,o)}}function Ba(t,e,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...e},o=Ci(i,n);for(let[s,a]of Object.entries(o)){if(fe(a))continue;Gr(a,r.nestSelection(s));let f=r.findField(s);n?.[s]&&!f||(t[s]=!a)}}function Va(t,e){let r={},n=e.getComputedFields(),i=Ti(t,n);for(let[o,s]of Object.entries(i)){if(fe(s))continue;let a=e.nestSelection(o);Gr(s,a);let f=e.findField(o);if(!(n?.[o]&&!f)){if(s===!1||s===void 0||fe(s)){r[o]=!1;continue}if(s===!0){f?.kind==="object"?r[o]=Et({},a):r[o]=!0;continue}r[o]=Et(s,a)}}return r}function ki(t,e){if(t===null)return null;if(typeof t=="string"||typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="bigint")return{$type:"BigInt",value:String(t)};if(Ve(t)){if(jt(t))return{$type:"DateTime",value:t.toISOString()};e.throwValidationError({kind:"InvalidArgumentValue",selectionPath:e.getSelectionPath(),argumentPath:e.getArgumentPath(),argument:{name:e.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Ri(t))return{$type:"Param",value:t.name};if(Ke(t))return{$type:"FieldRef",value:{_ref:t.name,_container:t.modelName}};if(Array.isArray(t))return ja(t,e);if(ArrayBuffer.isView(t)){let{buffer:r,byteOffset:n,byteLength:i}=t;return{$type:"Bytes",value:b.from(r,n,i).toString("base64")}}if($a(t))return t.values;if(je(t))return{$type:"Decimal",value:t.toFixed()};if(t instanceof Ee){if(t!==zt.instances[t._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:t._getName()}}if(Qa(t))return t.toJSON();if(typeof t=="object")return Di(t,e);e.throwValidationError({kind:"InvalidArgumentValue",selectionPath:e.getSelectionPath(),argumentPath:e.getArgumentPath(),argument:{name:e.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(t)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Di(t,e){if(t.$type)return{$type:"Raw",value:t};let r={};for(let n in t){let i=t[n],o=e.nestArgument(n);fe(i)||(i!==void 0?r[n]=ki(i,o):e.isPreviewFeatureOn("strictUndefinedChecks")&&e.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:e.getSelectionPath(),argument:{name:e.getArgumentName(),typeNames:[]},underlyingError:Oi}))}return r}function ja(t,e){let r=[];for(let n=0;n({name:e.name,typeName:"boolean",isRelation:e.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(e){return this.params.previewFeatures.includes(e)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(e){return this.modelOrType?.fields.find(r=>r.name===e)}nestSelection(e){let r=this.findField(e),n=r?.kind==="object"?r.type:void 0;return new t({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(e)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[ve(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":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:Me(this.params.action,"Unknown action")}}nestArgument(e){return new t({...this.params,argumentPath:this.params.argumentPath.concat(e)})}};u();c();m();p();d();l();function Ii(t){if(!t._hasPreviewFlag("metrics"))throw new K("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:t._clientVersion})}var Ye=class{_client;constructor(e){this._client=e}prometheus(e){return Ii(this._client),this._client._engine.metrics({format:"prometheus",...e})}json(e){return Ii(this._client),this._client._engine.metrics({format:"json",...e})}};u();c();m();p();d();l();function Mi(t,e){let r=ct(()=>Ja(e));Object.defineProperty(t,"dmmf",{get:()=>r.get()})}function Ja(t){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Wr(t){return Object.entries(t).map(([e,r])=>({name:e,...r}))}u();c();m();p();d();l();var Kr=new WeakMap,ir="$$PrismaTypedSql",Pt=class{constructor(e,r){Kr.set(this,{sql:e,values:r}),Object.defineProperty(this,ir,{value:ir})}get sql(){return Kr.get(this).sql}get values(){return Kr.get(this).values}};function _i(t){return(...e)=>new Pt(t,e)}function or(t){return t!=null&&t[ir]===ir}u();c();m();p();d();l();var Wo=it(Li());u();c();m();p();d();l();Fi();qn();$n();u();c();m();p();d();l();var ee=class t{constructor(e,r){if(e.length-1!==r.length)throw e.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${e.length} strings to have ${e.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof t?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=e[0];let i=0,o=0;for(;it.getPropertyValue(r))},getPropertyDescriptor(r){return t.getPropertyDescriptor?.(r)}}}u();c();m();p();d();l();u();c();m();p();d();l();var ar={enumerable:!0,configurable:!0,writable:!0};function lr(t){let e=new Set(t);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>ar,has:(r,n)=>e.has(n),set:(r,n,i)=>e.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...e]}}var qi=Symbol.for("nodejs.util.inspect.custom");function ae(t,e){let r=Wa(e),n=new Set,i=new Proxy(t,{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=Bi(Reflect.ownKeys(o),r),a=Bi(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 f=r.get(s);return f?f.getPropertyDescriptor?{...ar,...f?.getPropertyDescriptor(s)}:ar:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[qi]=function(){let o={...this};return delete o[qi],o},i}function Wa(t){let e=new Map;for(let r of t){let n=r.getKeys();for(let i of n)e.set(i,r)}return e}function Bi(t,e){return t.filter(r=>e.get(r)?.has?.(r)??!0)}u();c();m();p();d();l();function Xe(t){return{getKeys(){return t},has(){return!1},getPropertyValue(){}}}u();c();m();p();d();l();function ur(t,e){return{batch:t,transaction:e?.kind==="batch"?{isolationLevel:e.options.isolationLevel}:void 0}}u();c();m();p();d();l();function Vi(t){if(t===void 0)return"";let e=He(t);return new $e(0,{colors:Wt}).write(e).toString()}u();c();m();p();d();l();var Ka="P2037";function cr({error:t,user_facing_error:e},r,n){return e.error_code?new Z(Ha(e,n),{code:e.error_code,clientVersion:r,meta:e.meta,batchRequestIdx:e.batch_request_idx}):new Q(t,{clientVersion:r,batchRequestIdx:e.batch_request_idx})}function Ha(t,e){let r=t.message;return(e==="postgresql"||e==="postgres"||e==="mysql")&&t.error_code===Ka&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Yr=class{getLocation(){return null}};function Ce(t){return typeof $EnabledCallSite=="function"&&t!=="minimal"?new $EnabledCallSite:new Yr}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var ji={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Ze(t={}){let e=Ya(t);return Object.entries(e).reduce((n,[i,o])=>(ji[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Ya(t={}){return typeof t._count=="boolean"?{...t,_count:{_all:t._count}}:t}function mr(t={}){return e=>(typeof t._count=="boolean"&&(e._count=e._count._all),e)}function $i(t,e){let r=mr(t);return e({action:"aggregate",unpacker:r,argsMapper:Ze})(t)}u();c();m();p();d();l();function Xa(t={}){let{select:e,...r}=t;return typeof e=="object"?Ze({...r,_count:e}):Ze({...r,_count:{_all:!0}})}function Za(t={}){return typeof t.select=="object"?e=>mr(t)(e)._count:e=>mr(t)(e)._count._all}function Qi(t,e){return e({action:"count",unpacker:Za(t),argsMapper:Xa})(t)}u();c();m();p();d();l();function el(t={}){let e=Ze(t);if(Array.isArray(e.by))for(let r of e.by)typeof r=="string"&&(e.select[r]=!0);else typeof e.by=="string"&&(e.select[e.by]=!0);return e}function tl(t={}){return e=>(typeof t?._count=="boolean"&&e.forEach(r=>{r._count=r._count._all}),e)}function Ji(t,e){return e({action:"groupBy",unpacker:tl(t),argsMapper:el})(t)}function Gi(t,e,r){if(e==="aggregate")return n=>$i(n,r);if(e==="count")return n=>Qi(n,r);if(e==="groupBy")return n=>Ji(n,r)}u();c();m();p();d();l();function Wi(t,e){let r=e.fields.filter(i=>!i.relationName),n=ni(r,"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 gt(t,o,s.type,s.isList,s.kind==="enum")},...lr(Object.keys(n))})}u();c();m();p();d();l();u();c();m();p();d();l();var Ki=t=>Array.isArray(t)?t:t.split("."),Xr=(t,e)=>Ki(e).reduce((r,n)=>r&&r[n],t),Hi=(t,e,r)=>Ki(e).reduceRight((n,i,o,s)=>Object.assign({},Xr(t,s.slice(0,o)),{[i]:n}),r);function rl(t,e){return t===void 0||e===void 0?[]:[...e,"select",t]}function nl(t,e,r){return e===void 0?t??{}:Hi(e,r,t||!0)}function Zr(t,e,r,n,i,o){let a=t._runtimeDataModel.models[e].fields.reduce((f,h)=>({...f,[h.name]:h}),{});return f=>{let h=Ce(t._errorFormat),C=rl(n,i),R=nl(f,o,C),k=r({dataPath:C,callsite:h})(R),A=il(t,e);return new Proxy(k,{get(_,O){if(!A.includes(O))return _[O];let ye=[a[O].type,r,O],z=[C,R];return Zr(t,...ye,...z)},...lr([...A,...Object.getOwnPropertyNames(k)])})}}function il(t,e){return t._runtimeDataModel.models[e].fields.filter(r=>r.kind==="object").map(r=>r.name)}var ol=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],sl=["aggregate","count","groupBy"];function en(t,e){let r=t._extensions.getAllModelExtensions(e)??{},n=[al(t,e),ul(t,e),vt(r),H("name",()=>e),H("$name",()=>e),H("$parent",()=>t._appliedParent)];return ae({},n)}function al(t,e){let r=de(e),n=Object.keys(mt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>f=>{let h=Ce(t._errorFormat);return t._createPrismaPromise(C=>{let R={args:f,dataPath:[],action:o,model:e,clientMethod:`${r}.${i}`,jsModelName:r,transaction:C,callsite:h};return t._request({...R,...a})},{action:o,args:f,model:e})};return ol.includes(o)?Zr(t,e,s):ll(i)?Gi(t,i,s):s({})}}}function ll(t){return sl.includes(t)}function ul(t,e){return _e(H("fields",()=>{let r=t._runtimeDataModel.models[e];return Wi(e,r)}))}u();c();m();p();d();l();function zi(t){return t.replace(/^./,e=>e.toUpperCase())}var tn=Symbol();function Tt(t){let e=[cl(t),ml(t),H(tn,()=>t),H("$parent",()=>t._appliedParent)],r=t._extensions.getAllClientExtensions();return r&&e.push(vt(r)),ae(t,e)}function cl(t){let e=Object.getPrototypeOf(t._originalClient),r=[...new Set(Object.getOwnPropertyNames(e))];return{getKeys(){return r},getPropertyValue(n){return t[n]}}}function ml(t){let e=Object.keys(t._runtimeDataModel.models),r=e.map(de),n=[...new Set(e.concat(r))];return _e({getKeys(){return n},getPropertyValue(i){let o=zi(i);if(t._runtimeDataModel.models[o]!==void 0)return en(t,o);if(t._runtimeDataModel.models[i]!==void 0)return en(t,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Yi(t){return t[tn]?t[tn]:t}function Xi(t){if(typeof t=="function")return t(this);if(t.client?.__AccelerateEngine){let r=t.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let e=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(t)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return Tt(e)}u();c();m();p();d();l();u();c();m();p();d();l();function Zi({result:t,modelName:e,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(e);if(!o)return t;let s=[],a=[];for(let f of Object.values(o)){if(n){if(n[f.name])continue;let h=f.needs.filter(C=>n[C]);h.length>0&&a.push(Xe(h))}else if(r){if(!r[f.name])continue;let h=f.needs.filter(C=>!r[C]);h.length>0&&a.push(Xe(h))}pl(t,f.needs)&&s.push(dl(f,ae(t,s)))}return s.length>0||a.length>0?ae(t,[...s,...a]):t}function pl(t,e){return e.every(r=>Ur(t,r))}function dl(t,e){return _e(H(t.name,()=>t.compute(e)))}u();c();m();p();d();l();function pr({visitor:t,result:e,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(e)){for(let s=0;sC.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let h=typeof s=="object"?s:{};e[o]=pr({visitor:i,result:e[o],args:h,modelName:f.type,runtimeDataModel:n})}}function to({result:t,modelName:e,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||t==null||typeof t!="object"||!i.models[e]?t:pr({result:t,args:r??{},modelName:e,runtimeDataModel:i,visitor:(a,f,h)=>{let C=de(f);return Zi({result:a,modelName:C,select:h.select,omit:h.select?void 0:{...o?.[C],...h.omit},extensions:n})}})}u();c();m();p();d();l();u();c();m();p();d();l();l();u();c();m();p();d();l();var fl=["$connect","$disconnect","$on","$transaction","$extends"],ro=fl;function no(t){if(t instanceof ee)return gl(t);if(or(t))return yl(t);if(Array.isArray(t)){let r=[t[0]];for(let n=1;n{let o=e.customDataProxyFetch;return"transaction"in e&&i!==void 0&&(e.transaction?.kind==="batch"&&e.transaction.lock.then(),e.transaction=i),n===r.length?t._executeRequest(e):r[n]({model:e.model,operation:e.model?e.action:e.clientMethod,args:no(e.args??{}),__internalParams:e,query:(s,a=e)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=uo(o,f),a.args=s,oo(t,a,r,n+1)}})})}function so(t,e){let{jsModelName:r,action:n,clientMethod:i}=e,o=r?n:i;if(t._extensions.isEmpty())return t._executeRequest(e);let s=t._extensions.getAllQueryCallbacks(r??"$none",o);return oo(t,e,s)}function ao(t){return e=>{let r={requests:e},n=e[0].extensions.getAllBatchQueryCallbacks();return n.length?lo(r,n,0,t):t(r)}}function lo(t,e,r,n){if(r===e.length)return n(t);let i=t.customDataProxyFetch,o=t.requests[0].transaction;return e[r]({args:{queries:t.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:t,query(s,a=t){let f=a.customDataProxyFetch;return a.customDataProxyFetch=uo(i,f),lo(a,e,r+1,n)}})}var io=t=>t;function uo(t=io,e=io){return r=>t(e(r))}u();c();m();p();d();l();var co=G("prisma:client"),mo={Vercel:"vercel","Netlify CI":"netlify"};function po({postinstall:t,ciName:e,clientVersion:r}){if(co("checkPlatformCaching:postinstall",t),co("checkPlatformCaching:ciName",e),t===!0&&e&&e in mo){let n=`Prisma has detected that this project was built on ${e}, 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. +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let e=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+e.slice(1):e}};ci();u();c();m();p();d();l();u();c();m();p();d();l();var Jt=class{constructor(e){this.value=e}write(e){e.write(this.value)}markAsError(){this.value.markAsError()}};u();c();m();p();d();l();var Gt=t=>t,Wt={bold:Gt,red:Gt,green:Gt,dim:Gt,enabled:!1},pi={bold:_t,red:qe,green:kn,dim:Lt,enabled:!0},Qe={write(t){t.writeLine(",")}};u();c();m();p();d();l();var pe=class{constructor(e){this.contents=e}isUnderlined=!1;color=e=>e;underline(){return this.isUnderlined=!0,this}setColor(e){return this.color=e,this}write(e){let r=e.getCurrentLineLength();e.write(this.color(this.contents)),this.isUnderlined&&e.afterNextNewline(()=>{e.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};u();c();m();p();d();l();var Te=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var Je=class extends Te{items=[];addItem(e){return this.items.push(new Jt(e)),this}getField(e){return this.items[e]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(e){if(this.items.length===0){this.writeEmpty(e);return}this.writeWithItems(e)}writeEmpty(e){let r=new pe("[]");this.hasError&&r.setColor(e.context.colors.red).underline(),e.write(r)}writeWithItems(e){let{colors:r}=e.context;e.writeLine("[").withIndent(()=>e.writeJoined(Qe,this.items).newLine()).write("]"),this.hasError&&e.afterNextNewline(()=>{e.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Ge=class t extends Te{fields={};suggestions=[];addField(e){this.fields[e.name]=e}addSuggestion(e){this.suggestions.push(e)}getField(e){return this.fields[e]}getDeepField(e){let[r,...n]=e,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof t?a=o.value.getField(s):o.value instanceof Je&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(e){return e.length===0?this:this.getDeepField(e)?.value}hasField(e){return!!this.getField(e)}removeAllFields(){this.fields={}}removeField(e){delete this.fields[e]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(e){return this.getField(e)?.value}getDeepSubSelectionValue(e){let r=this;for(let n of e){if(!(r instanceof t))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(e){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of e){let o=n.value.getFieldValue(i);if(!o||!(o instanceof t))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let e=this.getField("select")?.value.asObject();if(e)return{kind:"select",value:e};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(e){return this.getSelectionParent()?.value.fields[e].value}getPrintWidth(){let e=Object.values(this.fields);return e.length==0?2:Math.max(...e.map(n=>n.getPrintWidth()))+2}write(e){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(e);return}this.writeWithContents(e,r)}asObject(){return this}writeEmpty(e){let r=new pe("{}");this.hasError&&r.setColor(e.context.colors.red).underline(),e.write(r)}writeWithContents(e,r){e.writeLine("{").withIndent(()=>{e.writeJoined(Qe,[...r,...this.suggestions]).newLine()}),e.write("}"),this.hasError&&e.afterNextNewline(()=>{e.writeLine(e.context.colors.red("~".repeat(this.getPrintWidth())))})}};u();c();m();p();d();l();var W=class extends Te{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(){}};u();c();m();p();d();l();var dt=class{fields=[];addField(e,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${e}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(e){let{colors:{green:r}}=e.context;e.writeLine(r("{")).withIndent(()=>{e.writeJoined(Qe,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Qt(t,e,r){switch(t.kind){case"MutuallyExclusiveFields":pa(t,e);break;case"IncludeOnScalar":da(t,e);break;case"EmptySelection":fa(t,e,r);break;case"UnknownSelectionField":ba(t,e);break;case"InvalidSelectionValue":wa(t,e);break;case"UnknownArgument":Ea(t,e);break;case"UnknownInputField":xa(t,e);break;case"RequiredArgumentMissing":Pa(t,e);break;case"InvalidArgumentType":va(t,e);break;case"InvalidArgumentValue":Ta(t,e);break;case"ValueTooLarge":Ca(t,e);break;case"SomeFieldsMissing":Aa(t,e);break;case"TooManyFieldsGiven":Ra(t,e);break;case"Union":li(t,e,r);break;default:throw new Error("not implemented: "+t.kind)}}function pa(t,e){let r=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();r&&(r.getField(t.firstField)?.markAsError(),r.getField(t.secondField)?.markAsError()),e.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${t.firstField}\``)} or ${n.green(`\`${t.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function da(t,e){let[r,n]=We(t.selectionPath),i=t.outputType,o=e.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ne(s.name,"true"));e.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${ft(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function fa(t,e,r){let n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){ga(t,e,i);return}if(n.hasField("select")){ya(t,e);return}}if(r?.[ve(t.outputType.name)]){ha(t,e);return}e.addErrorMessage(()=>`Unknown field at "${t.selectionPath.join(".")} selection"`)}function ga(t,e,r){r.removeAllFields();for(let n of t.outputType.fields)r.addSuggestion(new ne(n.name,"false"));e.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(t.outputType.name)}. At least one field must be included in the result`)}function ya(t,e){let r=t.outputType,n=e.arguments.getDeepSelectionParent(t.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),yi(n,r)),e.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${ft(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function ha(t,e){let r=new dt;for(let i of t.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ne("omit",r).makeRequired();if(t.selectionPath.length===0)e.arguments.addSuggestion(n);else{let[i,o]=We(t.selectionPath),a=e.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let f=a?.value.asObject()??new Ge;f.addSuggestion(n),a.value=f}}e.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(t.outputType.name)}. At least one field must be included in the result`)}function ba(t,e){let r=hi(t.selectionPath,e);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":yi(n,t.outputType);break;case"include":Sa(n,t.outputType);break;case"omit":Oa(n,t.outputType);break}}e.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${t.outputType.name}\``)}.`),i.push(ft(n)),i.join(" ")})}function wa(t,e){let r=hi(t.selectionPath,e);r.parentKind!=="unknown"&&r.field.value.markAsError(),e.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${t.underlyingError}`)}function Ea(t,e){let r=t.argumentPath[0],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),ka(n,t.arguments)),e.addErrorMessage(i=>fi(i,r,t.arguments.map(o=>o.name)))}function xa(t,e){let[r,n]=We(t.argumentPath),i=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(i){i.getDeepField(t.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&bi(o,t.inputType)}e.addErrorMessage(o=>fi(o,n,t.inputType.fields.map(s=>s.name)))}function fi(t,e,r){let n=[`Unknown argument \`${t.red(e)}\`.`],i=Ia(e,r);return i&&n.push(`Did you mean \`${t.green(i)}\`?`),r.length>0&&n.push(ft(t)),n.join(" ")}function Pa(t,e){let r;e.addErrorMessage(f=>r?.value instanceof W&&r.value.text==="null"?`Argument \`${f.green(o)}\` must not be ${f.red("null")}.`:`Argument \`${f.green(o)}\` is missing.`);let n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(!n)return;let[i,o]=We(t.argumentPath),s=new dt,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),t.inputTypes.length===1&&t.inputTypes[0].kind==="object"){for(let f of t.inputTypes[0].fields)s.addField(f.name,f.typeNames.join(" | "));a.addSuggestion(new ne(o,s).makeRequired())}else{let f=t.inputTypes.map(gi).join(" | ");a.addSuggestion(new ne(o,f).makeRequired())}if(t.dependentArgumentPath){n.getDeepField(t.dependentArgumentPath)?.markAsError();let[,f]=We(t.dependentArgumentPath);e.addErrorMessage(h=>`Argument \`${h.green(o)}\` is required because argument \`${h.green(f)}\` was provided.`)}}}function gi(t){return t.kind==="list"?`${gi(t.elementType)}[]`:t.name}function va(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&n.getDeepFieldValue(t.argumentPath)?.markAsError(),e.addErrorMessage(i=>{let o=Kt("or",t.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(t.inferredType)}.`})}function Ta(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&n.getDeepFieldValue(t.argumentPath)?.markAsError(),e.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(t.underlyingError&&o.push(`: ${t.underlyingError}`),o.push("."),t.argument.typeNames.length>0){let s=Kt("or",t.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Ca(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(t.argumentPath)?.value;s?.markAsError(),s instanceof W&&(i=s.text)}e.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 Aa(t,e){let r=t.argumentPath[t.argumentPath.length-1],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(t.argumentPath)?.asObject();i&&bi(i,t.inputType)}e.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(t.inputType.name)} needs`];return t.constraints.minFieldCount===1?t.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Kt("or",t.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${t.constraints.minFieldCount}`)} arguments.`),o.push(ft(i)),o.join(" ")})}function Ra(t,e){let r=t.argumentPath[t.argumentPath.length-1],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(t.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}e.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(t.inputType.name)} needs`];return t.constraints.minFieldCount===1&&t.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):t.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${t.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Kt("and",i.map(a=>o.red(a)))}. Please choose`),t.constraints.maxFieldCount===1?s.push("one."):s.push(`${t.constraints.maxFieldCount}.`),s.join(" ")})}function yi(t,e){for(let r of e.fields)t.hasField(r.name)||t.addSuggestion(new ne(r.name,"true"))}function Sa(t,e){for(let r of e.fields)r.isRelation&&!t.hasField(r.name)&&t.addSuggestion(new ne(r.name,"true"))}function Oa(t,e){for(let r of e.fields)!t.hasField(r.name)&&!r.isRelation&&t.addSuggestion(new ne(r.name,"true"))}function ka(t,e){for(let r of e)t.hasField(r.name)||t.addSuggestion(new ne(r.name,r.typeNames.join(" | ")))}function hi(t,e){let[r,n]=We(t),i=e.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),f=o?.getField(n);return o&&f?{parentKind:"select",parent:o,field:f,fieldName:n}:(f=s?.getField(n),s&&f?{parentKind:"include",field:f,parent:s,fieldName:n}:(f=a?.getField(n),a&&f?{parentKind:"omit",field:f,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function bi(t,e){if(e.kind==="object")for(let r of e.fields)t.hasField(r.name)||t.addSuggestion(new ne(r.name,r.typeNames.join(" | ")))}function We(t){let e=[...t],r=e.pop();if(!r)throw new Error("unexpected empty path");return[e,r]}function ft({green:t,enabled:e}){return"Available options are "+(e?`listed in ${t("green")}`:"marked with ?")+"."}function Kt(t,e){if(e.length===1)return e[0];let r=[...e],n=r.pop();return`${r.join(", ")} ${t} ${n}`}var Da=3;function Ia(t,e){let r=1/0,n;for(let i of e){let o=(0,di.default)(t,i);o>Da||o`}};function Ke(t){return t instanceof gt}u();c();m();p();d();l();var Ht=Symbol(),jr=new WeakMap,xe=class{constructor(e){e===Ht?jr.set(this,`Prisma.${this._getName()}`):jr.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return jr.get(this)}},yt=class extends xe{_getNamespace(){return"NullTypes"}},ht=class extends yt{#e};$r(ht,"DbNull");var bt=class extends yt{#e};$r(bt,"JsonNull");var wt=class extends yt{#e};$r(wt,"AnyNull");var zt={classes:{DbNull:ht,JsonNull:bt,AnyNull:wt},instances:{DbNull:new ht(Ht),JsonNull:new bt(Ht),AnyNull:new wt(Ht)}};function $r(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0})}u();c();m();p();d();l();var wi=": ",Yt=class{constructor(e,r){this.name=e;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+wi.length}write(e){let r=new pe(this.name);this.hasError&&r.underline().setColor(e.context.colors.red),e.write(r).write(wi).write(this.value)}};var Qr=class{arguments;errorMessages=[];constructor(e){this.arguments=e}write(e){e.write(this.arguments)}addErrorMessage(e){this.errorMessages.push(e)}renderAllMessages(e){return this.errorMessages.map(r=>r(e)).join(` +`)}};function He(t){return new Qr(Ei(t))}function Ei(t){let e=new Ge;for(let[r,n]of Object.entries(t)){let i=new Yt(r,xi(n));e.addField(i)}return e}function xi(t){if(typeof t=="string")return new W(JSON.stringify(t));if(typeof t=="number"||typeof t=="boolean")return new W(String(t));if(typeof t=="bigint")return new W(`${t}n`);if(t===null)return new W("null");if(t===void 0)return new W("undefined");if(je(t))return new W(`new Prisma.Decimal("${t.toFixed()}")`);if(t instanceof Uint8Array)return b.isBuffer(t)?new W(`Buffer.alloc(${t.byteLength})`):new W(`new Uint8Array(${t.byteLength})`);if(t instanceof Date){let e=jt(t)?t.toISOString():"Invalid Date";return new W(`new Date("${e}")`)}return t instanceof xe?new W(`Prisma.${t._getName()}`):Ke(t)?new W(`prisma.${ve(t.modelName)}.$fields.${t.name}`):Array.isArray(t)?Ma(t):typeof t=="object"?Ei(t):new W(Object.prototype.toString.call(t))}function Ma(t){let e=new Je;for(let r of t)e.addItem(xi(r));return e}function Xt(t,e){let r=e==="pretty"?pi:Wt,n=t.renderAllMessages(r),i=new $e(0,{colors:r}).write(t).toString();return{message:n,args:i}}function Zt({args:t,errors:e,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=He(t);for(let A of e)Qt(A,a,s);let{message:f,args:h}=Xt(a,r),C=$t({message:f,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:h});throw new K(C,{clientVersion:o})}u();c();m();p();d();l();u();c();m();p();d();l();function de(t){return t.replace(/^./,e=>e.toLowerCase())}u();c();m();p();d();l();function vi(t,e,r){let n=de(r);return!e.result||!(e.result.$allModels||e.result[n])?t:_a({...t,...Pi(e.name,t,e.result.$allModels),...Pi(e.name,t,e.result[n])})}function _a(t){let e=new me,r=(n,i)=>e.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),t[n]?t[n].needs.flatMap(o=>r(o,i)):[n]));return Vt(t,n=>({...n,needs:r(n.name,new Set)}))}function Pi(t,e,r){return r?Vt(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:La(e,o,i)})):{}}function La(t,e,r){let n=t?.[e]?.compute;return n?i=>r({...i,[e]:n(i)}):r}function Ti(t,e){if(!e)return t;let r={...t};for(let n of Object.values(e))if(t[n.name])for(let i of n.needs)r[i]=!0;return r}function Ci(t,e){if(!e)return t;let r={...t};for(let n of Object.values(e))if(!t[n.name])for(let i of n.needs)delete r[i];return r}var er=class{constructor(e,r){this.extension=e;this.previous=r}computedFieldsCache=new me;modelExtensionsCache=new me;queryCallbacksCache=new me;clientExtensions=ct(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=ct(()=>{let e=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?e.concat(r):e});getAllComputedFields(e){return this.computedFieldsCache.getOrCreate(e,()=>vi(this.previous?.getAllComputedFields(e),this.extension,e))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(e){return this.modelExtensionsCache.getOrCreate(e,()=>{let r=de(e);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(e):{...this.previous?.getAllModelExtensions(e),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(e,r){return this.queryCallbacksCache.getOrCreate(`${e}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(e,r)??[],i=[],o=this.extension.query;return!o||!(o[e]||o.$allModels||o[r]||o.$allOperations)?n:(o[e]!==void 0&&(o[e][r]!==void 0&&i.push(o[e][r]),o[e].$allOperations!==void 0&&i.push(o[e].$allOperations)),e!=="$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()}},ze=class t{constructor(e){this.head=e}static empty(){return new t}static single(e){return new t(new er(e))}isEmpty(){return this.head===void 0}append(e){return new t(new er(e,this.head))}getAllComputedFields(e){return this.head?.getAllComputedFields(e)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(e){return this.head?.getAllModelExtensions(e)}getAllQueryCallbacks(e,r){return this.head?.getAllQueryCallbacks(e,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};u();c();m();p();d();l();var tr=class{constructor(e){this.name=e}};function Ai(t){return t instanceof tr}function Ri(t){return new tr(t)}u();c();m();p();d();l();u();c();m();p();d();l();var Si=Symbol(),Et=class{constructor(e){if(e!==Si)throw new Error("Skip instance can not be constructed directly")}ifUndefined(e){return e===void 0?rr:e}},rr=new Et(Si);function fe(t){return t instanceof Et}var Fa={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Oi="explicitly `undefined` values are not allowed";function nr({modelName:t,action:e,args:r,runtimeDataModel:n,extensions:i=ze.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:f,previewFeatures:h,globalOmit:C}){let A=new Jr({runtimeDataModel:n,modelName:t,action:e,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:f,previewFeatures:h,globalOmit:C});return{modelName:t,action:Fa[e],query:xt(r,A)}}function xt({select:t,include:e,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Di(r,n),selection:Ua(t,e,i,n)}}function Ua(t,e,r,n){return t?(e?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Va(t,n)):Na(n,e,r)}function Na(t,e,r){let n={};return t.modelOrType&&!t.isRawAction()&&(n.$composites=!0,n.$scalars=!0),e&&qa(n,e,t),Ba(n,r,t),n}function qa(t,e,r){for(let[n,i]of Object.entries(e)){if(fe(i))continue;let o=r.nestSelection(n);if(Gr(i,o),i===!1||i===void 0){t[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){t[n]=xt(i===!0?{}:i,o);continue}if(i===!0){t[n]=!0;continue}t[n]=xt(i,o)}}function Ba(t,e,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...e},o=Ci(i,n);for(let[s,a]of Object.entries(o)){if(fe(a))continue;Gr(a,r.nestSelection(s));let f=r.findField(s);n?.[s]&&!f||(t[s]=!a)}}function Va(t,e){let r={},n=e.getComputedFields(),i=Ti(t,n);for(let[o,s]of Object.entries(i)){if(fe(s))continue;let a=e.nestSelection(o);Gr(s,a);let f=e.findField(o);if(!(n?.[o]&&!f)){if(s===!1||s===void 0||fe(s)){r[o]=!1;continue}if(s===!0){f?.kind==="object"?r[o]=xt({},a):r[o]=!0;continue}r[o]=xt(s,a)}}return r}function ki(t,e){if(t===null)return null;if(typeof t=="string"||typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="bigint")return{$type:"BigInt",value:String(t)};if(Ve(t)){if(jt(t))return{$type:"DateTime",value:t.toISOString()};e.throwValidationError({kind:"InvalidArgumentValue",selectionPath:e.getSelectionPath(),argumentPath:e.getArgumentPath(),argument:{name:e.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Ai(t))return{$type:"Param",value:t.name};if(Ke(t))return{$type:"FieldRef",value:{_ref:t.name,_container:t.modelName}};if(Array.isArray(t))return ja(t,e);if(ArrayBuffer.isView(t)){let{buffer:r,byteOffset:n,byteLength:i}=t;return{$type:"Bytes",value:b.from(r,n,i).toString("base64")}}if($a(t))return t.values;if(je(t))return{$type:"Decimal",value:t.toFixed()};if(t instanceof xe){if(t!==zt.instances[t._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:t._getName()}}if(Qa(t))return t.toJSON();if(typeof t=="object")return Di(t,e);e.throwValidationError({kind:"InvalidArgumentValue",selectionPath:e.getSelectionPath(),argumentPath:e.getArgumentPath(),argument:{name:e.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(t)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Di(t,e){if(t.$type)return{$type:"Raw",value:t};let r={};for(let n in t){let i=t[n],o=e.nestArgument(n);fe(i)||(i!==void 0?r[n]=ki(i,o):e.isPreviewFeatureOn("strictUndefinedChecks")&&e.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:e.getSelectionPath(),argument:{name:e.getArgumentName(),typeNames:[]},underlyingError:Oi}))}return r}function ja(t,e){let r=[];for(let n=0;n({name:e.name,typeName:"boolean",isRelation:e.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(e){return this.params.previewFeatures.includes(e)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(e){return this.modelOrType?.fields.find(r=>r.name===e)}nestSelection(e){let r=this.findField(e),n=r?.kind==="object"?r.type:void 0;return new t({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(e)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[ve(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":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:Me(this.params.action,"Unknown action")}}nestArgument(e){return new t({...this.params,argumentPath:this.params.argumentPath.concat(e)})}};u();c();m();p();d();l();function Ii(t){if(!t._hasPreviewFlag("metrics"))throw new K("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:t._clientVersion})}var Ye=class{_client;constructor(e){this._client=e}prometheus(e){return Ii(this._client),this._client._engine.metrics({format:"prometheus",...e})}json(e){return Ii(this._client),this._client._engine.metrics({format:"json",...e})}};u();c();m();p();d();l();function Mi(t,e){let r=ct(()=>Ja(e));Object.defineProperty(t,"dmmf",{get:()=>r.get()})}function Ja(t){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Wr(t){return Object.entries(t).map(([e,r])=>({name:e,...r}))}u();c();m();p();d();l();var Kr=new WeakMap,ir="$$PrismaTypedSql",Pt=class{constructor(e,r){Kr.set(this,{sql:e,values:r}),Object.defineProperty(this,ir,{value:ir})}get sql(){return Kr.get(this).sql}get values(){return Kr.get(this).values}};function _i(t){return(...e)=>new Pt(t,e)}function or(t){return t!=null&&t[ir]===ir}u();c();m();p();d();l();var Wo=it(Li());u();c();m();p();d();l();Fi();qn();$n();u();c();m();p();d();l();var ee=class t{constructor(e,r){if(e.length-1!==r.length)throw e.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${e.length} strings to have ${e.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof t?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=e[0];let i=0,o=0;for(;it.getPropertyValue(r))},getPropertyDescriptor(r){return t.getPropertyDescriptor?.(r)}}}u();c();m();p();d();l();u();c();m();p();d();l();var ar={enumerable:!0,configurable:!0,writable:!0};function lr(t){let e=new Set(t);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>ar,has:(r,n)=>e.has(n),set:(r,n,i)=>e.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...e]}}var qi=Symbol.for("nodejs.util.inspect.custom");function ae(t,e){let r=Wa(e),n=new Set,i=new Proxy(t,{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=Bi(Reflect.ownKeys(o),r),a=Bi(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 f=r.get(s);return f?f.getPropertyDescriptor?{...ar,...f?.getPropertyDescriptor(s)}:ar:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[qi]=function(){let o={...this};return delete o[qi],o},i}function Wa(t){let e=new Map;for(let r of t){let n=r.getKeys();for(let i of n)e.set(i,r)}return e}function Bi(t,e){return t.filter(r=>e.get(r)?.has?.(r)??!0)}u();c();m();p();d();l();function Xe(t){return{getKeys(){return t},has(){return!1},getPropertyValue(){}}}u();c();m();p();d();l();function ur(t,e){return{batch:t,transaction:e?.kind==="batch"?{isolationLevel:e.options.isolationLevel}:void 0}}u();c();m();p();d();l();function Vi(t){if(t===void 0)return"";let e=He(t);return new $e(0,{colors:Wt}).write(e).toString()}u();c();m();p();d();l();var Ka="P2037";function cr({error:t,user_facing_error:e},r,n){return e.error_code?new Z(Ha(e,n),{code:e.error_code,clientVersion:r,meta:e.meta,batchRequestIdx:e.batch_request_idx}):new Q(t,{clientVersion:r,batchRequestIdx:e.batch_request_idx})}function Ha(t,e){let r=t.message;return(e==="postgresql"||e==="postgres"||e==="mysql")&&t.error_code===Ka&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Yr=class{getLocation(){return null}};function Ce(t){return typeof $EnabledCallSite=="function"&&t!=="minimal"?new $EnabledCallSite:new Yr}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var ji={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Ze(t={}){let e=Ya(t);return Object.entries(e).reduce((n,[i,o])=>(ji[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Ya(t={}){return typeof t._count=="boolean"?{...t,_count:{_all:t._count}}:t}function mr(t={}){return e=>(typeof t._count=="boolean"&&(e._count=e._count._all),e)}function $i(t,e){let r=mr(t);return e({action:"aggregate",unpacker:r,argsMapper:Ze})(t)}u();c();m();p();d();l();function Xa(t={}){let{select:e,...r}=t;return typeof e=="object"?Ze({...r,_count:e}):Ze({...r,_count:{_all:!0}})}function Za(t={}){return typeof t.select=="object"?e=>mr(t)(e)._count:e=>mr(t)(e)._count._all}function Qi(t,e){return e({action:"count",unpacker:Za(t),argsMapper:Xa})(t)}u();c();m();p();d();l();function el(t={}){let e=Ze(t);if(Array.isArray(e.by))for(let r of e.by)typeof r=="string"&&(e.select[r]=!0);else typeof e.by=="string"&&(e.select[e.by]=!0);return e}function tl(t={}){return e=>(typeof t?._count=="boolean"&&e.forEach(r=>{r._count=r._count._all}),e)}function Ji(t,e){return e({action:"groupBy",unpacker:tl(t),argsMapper:el})(t)}function Gi(t,e,r){if(e==="aggregate")return n=>$i(n,r);if(e==="count")return n=>Qi(n,r);if(e==="groupBy")return n=>Ji(n,r)}u();c();m();p();d();l();function Wi(t,e){let r=e.fields.filter(i=>!i.relationName),n=ni(r,"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 gt(t,o,s.type,s.isList,s.kind==="enum")},...lr(Object.keys(n))})}u();c();m();p();d();l();u();c();m();p();d();l();var Ki=t=>Array.isArray(t)?t:t.split("."),Xr=(t,e)=>Ki(e).reduce((r,n)=>r&&r[n],t),Hi=(t,e,r)=>Ki(e).reduceRight((n,i,o,s)=>Object.assign({},Xr(t,s.slice(0,o)),{[i]:n}),r);function rl(t,e){return t===void 0||e===void 0?[]:[...e,"select",t]}function nl(t,e,r){return e===void 0?t??{}:Hi(e,r,t||!0)}function Zr(t,e,r,n,i,o){let a=t._runtimeDataModel.models[e].fields.reduce((f,h)=>({...f,[h.name]:h}),{});return f=>{let h=Ce(t._errorFormat),C=rl(n,i),A=nl(f,o,C),k=r({dataPath:C,callsite:h})(A),R=il(t,e);return new Proxy(k,{get(_,O){if(!R.includes(O))return _[O];let ye=[a[O].type,r,O],z=[C,A];return Zr(t,...ye,...z)},...lr([...R,...Object.getOwnPropertyNames(k)])})}}function il(t,e){return t._runtimeDataModel.models[e].fields.filter(r=>r.kind==="object").map(r=>r.name)}var ol=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],sl=["aggregate","count","groupBy"];function en(t,e){let r=t._extensions.getAllModelExtensions(e)??{},n=[al(t,e),ul(t,e),vt(r),H("name",()=>e),H("$name",()=>e),H("$parent",()=>t._appliedParent)];return ae({},n)}function al(t,e){let r=de(e),n=Object.keys(mt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>f=>{let h=Ce(t._errorFormat);return t._createPrismaPromise(C=>{let A={args:f,dataPath:[],action:o,model:e,clientMethod:`${r}.${i}`,jsModelName:r,transaction:C,callsite:h};return t._request({...A,...a})},{action:o,args:f,model:e})};return ol.includes(o)?Zr(t,e,s):ll(i)?Gi(t,i,s):s({})}}}function ll(t){return sl.includes(t)}function ul(t,e){return _e(H("fields",()=>{let r=t._runtimeDataModel.models[e];return Wi(e,r)}))}u();c();m();p();d();l();function zi(t){return t.replace(/^./,e=>e.toUpperCase())}var tn=Symbol();function Tt(t){let e=[cl(t),ml(t),H(tn,()=>t),H("$parent",()=>t._appliedParent)],r=t._extensions.getAllClientExtensions();return r&&e.push(vt(r)),ae(t,e)}function cl(t){let e=Object.getPrototypeOf(t._originalClient),r=[...new Set(Object.getOwnPropertyNames(e))];return{getKeys(){return r},getPropertyValue(n){return t[n]}}}function ml(t){let e=Object.keys(t._runtimeDataModel.models),r=e.map(de),n=[...new Set(e.concat(r))];return _e({getKeys(){return n},getPropertyValue(i){let o=zi(i);if(t._runtimeDataModel.models[o]!==void 0)return en(t,o);if(t._runtimeDataModel.models[i]!==void 0)return en(t,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Yi(t){return t[tn]?t[tn]:t}function Xi(t){if(typeof t=="function")return t(this);if(t.client?.__AccelerateEngine){let r=t.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let e=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(t)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return Tt(e)}u();c();m();p();d();l();u();c();m();p();d();l();function Zi({result:t,modelName:e,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(e);if(!o)return t;let s=[],a=[];for(let f of Object.values(o)){if(n){if(n[f.name])continue;let h=f.needs.filter(C=>n[C]);h.length>0&&a.push(Xe(h))}else if(r){if(!r[f.name])continue;let h=f.needs.filter(C=>!r[C]);h.length>0&&a.push(Xe(h))}pl(t,f.needs)&&s.push(dl(f,ae(t,s)))}return s.length>0||a.length>0?ae(t,[...s,...a]):t}function pl(t,e){return e.every(r=>Ur(t,r))}function dl(t,e){return _e(H(t.name,()=>t.compute(e)))}u();c();m();p();d();l();function pr({visitor:t,result:e,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(e)){for(let s=0;sC.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let h=typeof s=="object"?s:{};e[o]=pr({visitor:i,result:e[o],args:h,modelName:f.type,runtimeDataModel:n})}}function to({result:t,modelName:e,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||t==null||typeof t!="object"||!i.models[e]?t:pr({result:t,args:r??{},modelName:e,runtimeDataModel:i,visitor:(a,f,h)=>{let C=de(f);return Zi({result:a,modelName:C,select:h.select,omit:h.select?void 0:{...o?.[C],...h.omit},extensions:n})}})}u();c();m();p();d();l();u();c();m();p();d();l();l();u();c();m();p();d();l();var fl=["$connect","$disconnect","$on","$transaction","$extends"],ro=fl;function no(t){if(t instanceof ee)return gl(t);if(or(t))return yl(t);if(Array.isArray(t)){let r=[t[0]];for(let n=1;n{let o=e.customDataProxyFetch;return"transaction"in e&&i!==void 0&&(e.transaction?.kind==="batch"&&e.transaction.lock.then(),e.transaction=i),n===r.length?t._executeRequest(e):r[n]({model:e.model,operation:e.model?e.action:e.clientMethod,args:no(e.args??{}),__internalParams:e,query:(s,a=e)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=uo(o,f),a.args=s,oo(t,a,r,n+1)}})})}function so(t,e){let{jsModelName:r,action:n,clientMethod:i}=e,o=r?n:i;if(t._extensions.isEmpty())return t._executeRequest(e);let s=t._extensions.getAllQueryCallbacks(r??"$none",o);return oo(t,e,s)}function ao(t){return e=>{let r={requests:e},n=e[0].extensions.getAllBatchQueryCallbacks();return n.length?lo(r,n,0,t):t(r)}}function lo(t,e,r,n){if(r===e.length)return n(t);let i=t.customDataProxyFetch,o=t.requests[0].transaction;return e[r]({args:{queries:t.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:t,query(s,a=t){let f=a.customDataProxyFetch;return a.customDataProxyFetch=uo(i,f),lo(a,e,r+1,n)}})}var io=t=>t;function uo(t=io,e=io){return r=>t(e(r))}u();c();m();p();d();l();var co=G("prisma:client"),mo={Vercel:"vercel","Netlify CI":"netlify"};function po({postinstall:t,ciName:e,clientVersion:r}){if(co("checkPlatformCaching:postinstall",t),co("checkPlatformCaching:ciName",e),t===!0&&e&&e in mo){let n=`Prisma has detected that this project was built on ${e}, 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/${mo[e]}-build`;throw console.error(n),new I(n,r)}}u();c();m();p();d();l();function fo(t,e){return t?t.datasources?t.datasources:t.datasourceUrl?{[e[0]]:{url:t.datasourceUrl}}:{}:{}}u();c();m();p();d();l();u();c();m();p();d();l();var hl=()=>globalThis.process?.release?.name==="node",bl=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,wl=()=>!!globalThis.Deno,xl=()=>typeof globalThis.Netlify=="object",El=()=>typeof globalThis.EdgeRuntime=="object",Pl=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function vl(){return[[xl,"netlify"],[El,"edge-light"],[Pl,"workerd"],[wl,"deno"],[bl,"bun"],[hl,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Tl={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 Re(){let t=vl();return{id:t,prettyName:Tl[t]||t,isEdge:["workerd","deno","netlify","edge-light"].includes(t)}}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();l();u();c();m();p();d();l();l();function go(t,e){throw new Error(e)}function Cl(t){return t!==null&&typeof t=="object"&&typeof t.$type=="string"}function Rl(t,e){let r={};for(let n of Object.keys(t))r[n]=e(t[n],n);return r}function et(t){return t===null?t:Array.isArray(t)?t.map(et):typeof t=="object"?Cl(t)?Al(t):t.constructor!==null&&t.constructor.name!=="Object"?t:Rl(t,et):t}function Al({$type:t,value:e}){switch(t){case"BigInt":return BigInt(e);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=b.from(e,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(e);case"Decimal":return new v(e);case"Json":return JSON.parse(e);default:go(e,"Unknown tagged value")}}var yo="6.14.0";u();c();m();p();d();l();function dr({inlineDatasources:t,overrideDatasources:e,env:r,clientVersion:n}){let i,o=Object.keys(t)[0],s=t[o]?.url,a=e[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 Re().id==="workerd"?new I(`error: Environment variable not found: ${s.fromEnvVar}. +Learn how: https://pris.ly/d/${mo[e]}-build`;throw console.error(n),new I(n,r)}}u();c();m();p();d();l();function fo(t,e){return t?t.datasources?t.datasources:t.datasourceUrl?{[e[0]]:{url:t.datasourceUrl}}:{}:{}}u();c();m();p();d();l();u();c();m();p();d();l();var hl=()=>globalThis.process?.release?.name==="node",bl=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,wl=()=>!!globalThis.Deno,El=()=>typeof globalThis.Netlify=="object",xl=()=>typeof globalThis.EdgeRuntime=="object",Pl=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function vl(){return[[El,"netlify"],[xl,"edge-light"],[Pl,"workerd"],[wl,"deno"],[bl,"bun"],[hl,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Tl={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 Ae(){let t=vl();return{id:t,prettyName:Tl[t]||t,isEdge:["workerd","deno","netlify","edge-light"].includes(t)}}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();l();u();c();m();p();d();l();l();function go(t,e){throw new Error(e)}function Cl(t){return t!==null&&typeof t=="object"&&typeof t.$type=="string"}function Al(t,e){let r={};for(let n of Object.keys(t))r[n]=e(t[n],n);return r}function et(t){return t===null?t:Array.isArray(t)?t.map(et):typeof t=="object"?Cl(t)?Rl(t):t.constructor!==null&&t.constructor.name!=="Object"?t:Al(t,et):t}function Rl({$type:t,value:e}){switch(t){case"BigInt":return BigInt(e);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=b.from(e,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(e);case"Decimal":return new v(e);case"Json":return JSON.parse(e);default:go(e,"Unknown tagged value")}}var yo="6.15.0";u();c();m();p();d();l();function dr({inlineDatasources:t,overrideDatasources:e,env:r,clientVersion:n}){let i,o=Object.keys(t)[0],s=t[o]?.url,a=e[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 Ae().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}u();c();m();p();d();l();u();c();m();p();d();l();function ho(t){if(t?.kind==="itx")return t.options.id}u();c();m();p();d();l();var rn,bo={async loadLibrary(t){let{clientVersion:e,adapter:r,engineWasm:n}=t;if(r===void 0)throw new I(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Re().prettyName})`,e);if(n===void 0)throw new I("WASM engine was unexpectedly `undefined`",e);rn===void 0&&(rn=(async()=>{let o=await n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new I("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",e);let a={"./query_engine_bg.js":o},f=new WebAssembly.Instance(s,a),h=f.exports.__wbindgen_start;return o.__wbg_set_wasm(f.exports),h(),o.QueryEngine})());let i=await rn;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var Ol="P2036",ge=G("prisma:client:libraryEngine");function kl(t){return t.item_type==="query"&&"query"in t}function Dl(t){return"level"in t?t.level==="error"&&t.message==="PANIC":!1}var sO=[...Dr,"native"],Il=0xffffffffffffffffn,nn=1n;function Ml(){let t=nn++;return nn>Il&&(nn=1n),t}var Rt=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(e,r){this.libraryLoader=r??bo,this.config=e,this.libraryStarted=!1,this.logQueries=e.logQueries??!1,this.logLevel=e.logLevel??"error",this.logEmitter=e.logEmitter,this.datamodel=e.inlineSchema,this.tracingHelper=e.tracingHelper,e.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(e.overrideDatasources)[0],i=e.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(e){return{applyPendingMigrations:e.applyPendingMigrations?.bind(e),commitTransaction:this.withRequestId(e.commitTransaction.bind(e)),connect:this.withRequestId(e.connect.bind(e)),disconnect:this.withRequestId(e.disconnect.bind(e)),metrics:e.metrics?.bind(e),query:this.withRequestId(e.query.bind(e)),rollbackTransaction:this.withRequestId(e.rollbackTransaction.bind(e)),sdlSchema:e.sdlSchema?.bind(e),startTransaction:this.withRequestId(e.startTransaction.bind(e)),trace:e.trace.bind(e),free:e.free?.bind(e)}}withRequestId(e){return async(...r)=>{let n=Ml().toString();try{return await e(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(e,r,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(r),s;if(e==="start"){let f=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(f,o)}else e==="commit"?s=await this.engine?.commitTransaction(n.id,o):e==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(_l(a)){let f=this.getExternalAdapterError(a,i?.errorRegistry);throw f?f.error:new Z(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new Q(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(ge("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(e){if(!e)throw new Q("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(e)}catch{throw new Q("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 e=new w(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(qt));let r=await this.adapterPromise;r&&ge("Using driver adapter: %O",r),this.engine=this.wrapEngine(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",enableTracing:this.tracingHelper.isEnabled()},n=>{e.deref()?.logger(n)},r))}catch(e){let r=e,n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(n.message,this.config.clientVersion,n.error_code)}}}logger(e){let r=this.parseEngineResponse(e);r&&(r.level=r?.level.toLowerCase()??"unknown",kl(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(Dl(r),this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path})))}parseInitError(e){try{return JSON.parse(e)}catch{}return e}parseRequestError(e){try{return JSON.parse(e)}catch{}return e}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(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return ge(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let e=async()=>{ge("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(qt)),await this.adapterPromise,ge("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.tracingHelper.runInChildSpan("connect",e),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return ge("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let e=async()=>{await new Promise(n=>setImmediate(n)),ge("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,ge("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",e),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(e){return this.library?.debugPanic(e)}async request(e,{traceparent:r,interactiveTransaction:n}){ge(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(e);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new Q(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}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 Q(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(e,{transaction:r,traceparent:n}){ge("requestBatch");let i=ur(e,r);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),ho(r));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new Q(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:f,errors:h}=a;if(Array.isArray(f))return f.map(C=>C.errors&&C.errors.length>0?this.loggerRustPanic??this.buildQueryError(C.errors[0],o?.errorRegistry):{data:C});throw h&&h.length===1?new Error(h[0].error):new Error(JSON.stringify(a))}buildQueryError(e,r){e.user_facing_error.is_panic;let n=this.getExternalAdapterError(e.user_facing_error,r);return n?n.error:cr(e,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(e,r){if(e.error_code===Ol&&r){let n=e.meta?.id;Bt(typeof n=="number","Malformed external JS error received from the engine");let i=r.consumeError(n);return Bt(i,"External error with reported id was not registered"),i}}async metrics(e){await this.start();let r=await this.engine.metrics(JSON.stringify(e));return e.format==="prometheus"?r:this.parseEngineResponse(r)}};function _l(t){return typeof t=="object"&&t!==null&&t.error_code!==void 0}u();c();m();p();d();l();var At="Accelerate has not been setup correctly. Make sure your client is using `.$extends(withAccelerate())`. See https://pris.ly/d/accelerate-getting-started",fr=class{constructor(e){this.config=e;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}name="AccelerateEngine";resolveDatasourceUrl;getBatchRequestPayload;prismaGraphQLToJSError;PrismaClientUnknownRequestError;PrismaClientInitializationError;PrismaClientKnownRequestError;debug;engineVersion;clientVersion;onBeforeExit(e){}async start(){}async stop(){}version(e){return"unknown"}transaction(e,r,n){throw new I(At,this.config.clientVersion)}metrics(e){throw new I(At,this.config.clientVersion)}request(e,r){throw new I(At,this.config.clientVersion)}requestBatch(e,r){throw new I(At,this.config.clientVersion)}applyPendingMigrations(){throw new I(At,this.config.clientVersion)}};u();c();m();p();d();l();function wo({url:t,adapter:e,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=O=>{i.push({_tag:"warning",value:O})},a=O=>{let D=O.join(` -`);o.push({_tag:"error",value:D})},f=!!t?.startsWith("prisma://"),h=Lr(t),C=!!e,R=f||h;!C&&r&&R&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let k=R||!r;C&&(k||n==="edge")&&(n==="edge"?a(["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."]):r?f&&a(["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."]):a(["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."]));let A={accelerate:k,ppg:h,driverAdapters:C};function _(O){return O.length>0}return _(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:A}:{ok:!0,diagnostics:{warnings:i},isUsing:A}}function xo({copyEngine:t=!0},e){let r;try{r=dr({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,env:{...e.env,...g.env},clientVersion:e.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=wo({url:r,adapter:e.adapter,copyEngine:t,targetBuildType:"wasm-engine-edge"});for(let R of o.warnings)ut(...R.value);if(!n){let R=o.errors[0];throw new K(R.value,{clientVersion:e.clientVersion})}let s=Be(e.generator),a=s==="library",f=s==="binary",h=s==="client",C=(i.accelerate||i.ppg)&&!i.driverAdapters;if(i.accelerate,i.driverAdapters)return new Rt(e);if(i.accelerate)return new fr(e);{let R=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Re().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 K(R.join(` -`),{clientVersion:e.clientVersion})}return"wasm-engine-edge"}u();c();m();p();d();l();function gr({generator:t}){return t?.previewFeatures??[]}u();c();m();p();d();l();var Eo=t=>({command:t});u();c();m();p();d();l();u();c();m();p();d();l();var Po=t=>t.strings.reduce((e,r,n)=>`${e}@P${n}${r}`);u();c();m();p();d();l();l();function tt(t){try{return vo(t,"fast")}catch{return vo(t,"slow")}}function vo(t,e){return JSON.stringify(t.map(r=>Co(r,e)))}function Co(t,e){if(Array.isArray(t))return t.map(r=>Co(r,e));if(typeof t=="bigint")return{prisma__type:"bigint",prisma__value:t.toString()};if(Ve(t))return{prisma__type:"date",prisma__value:t.toJSON()};if(be.isDecimal(t))return{prisma__type:"decimal",prisma__value:t.toJSON()};if(b.isBuffer(t))return{prisma__type:"bytes",prisma__value:t.toString("base64")};if(Ll(t))return{prisma__type:"bytes",prisma__value:b.from(t).toString("base64")};if(ArrayBuffer.isView(t)){let{buffer:r,byteOffset:n,byteLength:i}=t;return{prisma__type:"bytes",prisma__value:b.from(r,n,i).toString("base64")}}return typeof t=="object"&&e==="slow"?Ro(t):t}function Ll(t){return t instanceof ArrayBuffer||t instanceof SharedArrayBuffer?!0:typeof t=="object"&&t!==null?t[Symbol.toStringTag]==="ArrayBuffer"||t[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Ro(t){if(typeof t!="object"||t===null)return t;if(typeof t.toJSON=="function")return t.toJSON();if(Array.isArray(t))return t.map(To);let e={};for(let r of Object.keys(t))e[r]=To(t[r]);return e}function To(t){return typeof t=="bigint"?t.toString():Ro(t)}var Fl=/^(\s*alter\s)/i,Ao=G("prisma:client");function on(t,e,r,n){if(!(t!=="postgresql"&&t!=="cockroachdb")&&r.length>0&&Fl.exec(e))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 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}u();c();m();p();d();l();u();c();m();p();d();l();function ho(t){if(t?.kind==="itx")return t.options.id}u();c();m();p();d();l();var rn,bo={async loadLibrary(t){let{clientVersion:e,adapter:r,engineWasm:n}=t;if(r===void 0)throw new I(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Ae().prettyName})`,e);if(n===void 0)throw new I("WASM engine was unexpectedly `undefined`",e);rn===void 0&&(rn=(async()=>{let o=await n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new I("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",e);let a={"./query_engine_bg.js":o},f=new WebAssembly.Instance(s,a),h=f.exports.__wbindgen_start;return o.__wbg_set_wasm(f.exports),h(),o.QueryEngine})());let i=await rn;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var Ol="P2036",ge=G("prisma:client:libraryEngine");function kl(t){return t.item_type==="query"&&"query"in t}function Dl(t){return"level"in t?t.level==="error"&&t.message==="PANIC":!1}var sO=[...Dr,"native"],Il=0xffffffffffffffffn,nn=1n;function Ml(){let t=nn++;return nn>Il&&(nn=1n),t}var At=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(e,r){this.libraryLoader=r??bo,this.config=e,this.libraryStarted=!1,this.logQueries=e.logQueries??!1,this.logLevel=e.logLevel??"error",this.logEmitter=e.logEmitter,this.datamodel=e.inlineSchema,this.tracingHelper=e.tracingHelper,e.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(e.overrideDatasources)[0],i=e.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(e){return{applyPendingMigrations:e.applyPendingMigrations?.bind(e),commitTransaction:this.withRequestId(e.commitTransaction.bind(e)),connect:this.withRequestId(e.connect.bind(e)),disconnect:this.withRequestId(e.disconnect.bind(e)),metrics:e.metrics?.bind(e),query:this.withRequestId(e.query.bind(e)),rollbackTransaction:this.withRequestId(e.rollbackTransaction.bind(e)),sdlSchema:e.sdlSchema?.bind(e),startTransaction:this.withRequestId(e.startTransaction.bind(e)),trace:e.trace.bind(e),free:e.free?.bind(e)}}withRequestId(e){return async(...r)=>{let n=Ml().toString();try{return await e(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(e,r,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(r),s;if(e==="start"){let f=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(f,o)}else e==="commit"?s=await this.engine?.commitTransaction(n.id,o):e==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(_l(a)){let f=this.getExternalAdapterError(a,i?.errorRegistry);throw f?f.error:new Z(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new Q(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(ge("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(e){if(!e)throw new Q("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(e)}catch{throw new Q("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 e=new w(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(qt));let r=await this.adapterPromise;r&&ge("Using driver adapter: %O",r),this.engine=this.wrapEngine(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",enableTracing:this.tracingHelper.isEnabled()},n=>{e.deref()?.logger(n)},r))}catch(e){let r=e,n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(n.message,this.config.clientVersion,n.error_code)}}}logger(e){let r=this.parseEngineResponse(e);r&&(r.level=r?.level.toLowerCase()??"unknown",kl(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(Dl(r),this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path})))}parseInitError(e){try{return JSON.parse(e)}catch{}return e}parseRequestError(e){try{return JSON.parse(e)}catch{}return e}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(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return ge(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let e=async()=>{ge("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(qt)),await this.adapterPromise,ge("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.tracingHelper.runInChildSpan("connect",e),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return ge("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let e=async()=>{await new Promise(n=>setImmediate(n)),ge("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,ge("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",e),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(e){return this.library?.debugPanic(e)}async request(e,{traceparent:r,interactiveTransaction:n}){ge(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(e);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new Q(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}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 Q(`${a.message} +${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(e,{transaction:r,traceparent:n}){ge("requestBatch");let i=ur(e,r);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),ho(r));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new Q(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:f,errors:h}=a;if(Array.isArray(f))return f.map(C=>C.errors&&C.errors.length>0?this.loggerRustPanic??this.buildQueryError(C.errors[0],o?.errorRegistry):{data:C});throw h&&h.length===1?new Error(h[0].error):new Error(JSON.stringify(a))}buildQueryError(e,r){e.user_facing_error.is_panic;let n=this.getExternalAdapterError(e.user_facing_error,r);return n?n.error:cr(e,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(e,r){if(e.error_code===Ol&&r){let n=e.meta?.id;Bt(typeof n=="number","Malformed external JS error received from the engine");let i=r.consumeError(n);return Bt(i,"External error with reported id was not registered"),i}}async metrics(e){await this.start();let r=await this.engine.metrics(JSON.stringify(e));return e.format==="prometheus"?r:this.parseEngineResponse(r)}};function _l(t){return typeof t=="object"&&t!==null&&t.error_code!==void 0}u();c();m();p();d();l();var Rt="Accelerate has not been setup correctly. Make sure your client is using `.$extends(withAccelerate())`. See https://pris.ly/d/accelerate-getting-started",fr=class{constructor(e){this.config=e;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}name="AccelerateEngine";resolveDatasourceUrl;getBatchRequestPayload;prismaGraphQLToJSError;PrismaClientUnknownRequestError;PrismaClientInitializationError;PrismaClientKnownRequestError;debug;engineVersion;clientVersion;onBeforeExit(e){}async start(){}async stop(){}version(e){return"unknown"}transaction(e,r,n){throw new I(Rt,this.config.clientVersion)}metrics(e){throw new I(Rt,this.config.clientVersion)}request(e,r){throw new I(Rt,this.config.clientVersion)}requestBatch(e,r){throw new I(Rt,this.config.clientVersion)}applyPendingMigrations(){throw new I(Rt,this.config.clientVersion)}};u();c();m();p();d();l();function wo({url:t,adapter:e,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=O=>{i.push({_tag:"warning",value:O})},a=O=>{let D=O.join(` +`);o.push({_tag:"error",value:D})},f=!!t?.startsWith("prisma://"),h=Lr(t),C=!!e,A=f||h;!C&&r&&A&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let k=A||!r;C&&(k||n==="edge")&&(n==="edge"?a(["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."]):r?f&&a(["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."]):a(["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."]));let R={accelerate:k,ppg:h,driverAdapters:C};function _(O){return O.length>0}return _(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:R}:{ok:!0,diagnostics:{warnings:i},isUsing:R}}function Eo({copyEngine:t=!0},e){let r;try{r=dr({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,env:{...e.env,...g.env},clientVersion:e.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=wo({url:r,adapter:e.adapter,copyEngine:t,targetBuildType:"wasm-engine-edge"});for(let A of o.warnings)ut(...A.value);if(!n){let A=o.errors[0];throw new K(A.value,{clientVersion:e.clientVersion})}let s=Be(e.generator),a=s==="library",f=s==="binary",h=s==="client",C=(i.accelerate||i.ppg)&&!i.driverAdapters;if(i.accelerate,i.driverAdapters)return new At(e);if(i.accelerate)return new fr(e);{let A=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Ae().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 K(A.join(` +`),{clientVersion:e.clientVersion})}return"wasm-engine-edge"}u();c();m();p();d();l();function gr({generator:t}){return t?.previewFeatures??[]}u();c();m();p();d();l();var xo=t=>({command:t});u();c();m();p();d();l();u();c();m();p();d();l();var Po=t=>t.strings.reduce((e,r,n)=>`${e}@P${n}${r}`);u();c();m();p();d();l();l();function tt(t){try{return vo(t,"fast")}catch{return vo(t,"slow")}}function vo(t,e){return JSON.stringify(t.map(r=>Co(r,e)))}function Co(t,e){if(Array.isArray(t))return t.map(r=>Co(r,e));if(typeof t=="bigint")return{prisma__type:"bigint",prisma__value:t.toString()};if(Ve(t))return{prisma__type:"date",prisma__value:t.toJSON()};if(be.isDecimal(t))return{prisma__type:"decimal",prisma__value:t.toJSON()};if(b.isBuffer(t))return{prisma__type:"bytes",prisma__value:t.toString("base64")};if(Ll(t))return{prisma__type:"bytes",prisma__value:b.from(t).toString("base64")};if(ArrayBuffer.isView(t)){let{buffer:r,byteOffset:n,byteLength:i}=t;return{prisma__type:"bytes",prisma__value:b.from(r,n,i).toString("base64")}}return typeof t=="object"&&e==="slow"?Ao(t):t}function Ll(t){return t instanceof ArrayBuffer||t instanceof SharedArrayBuffer?!0:typeof t=="object"&&t!==null?t[Symbol.toStringTag]==="ArrayBuffer"||t[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Ao(t){if(typeof t!="object"||t===null)return t;if(typeof t.toJSON=="function")return t.toJSON();if(Array.isArray(t))return t.map(To);let e={};for(let r of Object.keys(t))e[r]=To(t[r]);return e}function To(t){return typeof t=="bigint"?t.toString():Ao(t)}var Fl=/^(\s*alter\s)/i,Ro=G("prisma:client");function on(t,e,r,n){if(!(t!=="postgresql"&&t!=="cockroachdb")&&r.length>0&&Fl.exec(e))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 sn=({clientMethod:t,activeProvider:e})=>r=>{let n="",i;if(or(r))n=r.sql,i={values:tt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:tt(s||[]),__prismaRawParameters__:!0}}else switch(e){case"sqlite":case"mysql":{n=r.sql,i={values:tt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:tt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Po(r),i={values:tt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${e} provider does not support ${t}`)}return i?.values?Ao(`prisma.${t}(${n}, ${i.values})`):Ao(`prisma.${t}(${n})`),{query:n,parameters:i}},So={requestArgsToMiddlewareArgs(t){return[t.strings,...t.values]},middlewareArgsToRequestArgs(t){let[e,...r]=t;return new ee(e,r)}},Oo={requestArgsToMiddlewareArgs(t){return[t]},middlewareArgsToRequestArgs(t){return t[0]}};u();c();m();p();d();l();function an(t){return function(r,n){let i,o=(s=t)=>{try{return s===void 0||s?.kind==="itx"?i??=ko(r(s)):ko(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function ko(t){return typeof t.then=="function"?t:Promise.resolve(t)}u();c();m();p();d();l();var Ul=Ir.split(".")[0],Nl={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(t,e){return e()}},ln=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(e){return this.getGlobalTracingHelper().getTraceParent(e)}dispatchEngineSpans(e){return this.getGlobalTracingHelper().dispatchEngineSpans(e)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(e,r){return this.getGlobalTracingHelper().runInChildSpan(e,r)}getGlobalTracingHelper(){let e=globalThis[`V${Ul}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return e?.helper??r?.helper??Nl}};function Do(){return new ln}u();c();m();p();d();l();function Io(t,e=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--t===0&&r(e()),i?.(n)}}}u();c();m();p();d();l();function Mo(t){return typeof t=="string"?t:t.reduce((e,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?e:e&&(r==="info"||e==="info")?"info":n},void 0)}u();c();m();p();d();l();var Lo=it(ei());u();c();m();p();d();l();function yr(t){return typeof t.batchRequestIdx=="number"}u();c();m();p();d();l();function _o(t){if(t.action!=="findUnique"&&t.action!=="findUniqueOrThrow")return;let e=[];return t.modelName&&e.push(t.modelName),t.query.arguments&&e.push(un(t.query.arguments)),e.push(un(t.query.selection)),e.join("")}function un(t){return`(${Object.keys(t).sort().map(r=>{let n=t[r];return typeof n=="object"&&n!==null?`(${r} ${un(n)})`:r}).join(" ")})`}u();c();m();p();d();l();var ql={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,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function cn(t){return ql[t]}u();c();m();p();d();l();var hr=class{constructor(e){this.options=e;this.batches={}}batches;tickActive=!1;request(e){let r=this.options.batchBy(e);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:e,resolve:n,reject:i})})):this.options.singleLoader(e)}dispatchBatches(){for(let e in this.batches){let r=this.batches[e];delete this.batches[e],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 e.map(r=>Le("bytes",r));case"decimal-array":return e.map(r=>Le("decimal",r));case"datetime-array":return e.map(r=>Le("datetime",r));case"date-array":return e.map(r=>Le("date",r));case"time-array":return e.map(r=>Le("time",r));default:return e}}function br(t){let e=[],r=Bl(t);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(R=>R.protocolQuery),f=this.client._tracingHelper.getTraceParent(s),h=n.some(R=>cn(R.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:f,transaction:jl(o),containsWrite:h,customDataProxyFetch:i})).map((R,k)=>{if(R instanceof Error)return R;try{return this.mapQueryEngineResult(n[k],R)}catch(A){return A}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Fo(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:cn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:_o(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(e){try{return await this.dataloader.request(e)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=e;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:e.globalOmit})}}mapQueryEngineResult({dataPath:e,unpacker:r},n){let i=n?.data,o=this.unpack(i,e,r);return g.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(e){try{this.handleRequestError(e)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:e.clientMethod,timestamp:new Date}),r}}handleRequestError({error:e,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Vl(e),$l(e,i))throw e;if(e instanceof Z&&Ql(e)){let h=Uo(e.meta);Zt({args:o,errors:[h],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let f=e.message;if(n&&(f=$t({callsite:n,originalMethod:r,isPanic:e.isPanic,showColors:this.client._errorFormat==="pretty",message:f})),f=this.sanitizeMessage(f),e.code){let h=s?{modelName:s,...e.meta}:e.meta;throw new Z(f,{code:e.code,clientVersion:this.client._clientVersion,meta:h,batchRequestIdx:e.batchRequestIdx})}else{if(e.isPanic)throw new xe(f,this.client._clientVersion);if(e instanceof Q)throw new Q(f,{clientVersion:this.client._clientVersion,batchRequestIdx:e.batchRequestIdx});if(e instanceof I)throw new I(f,this.client._clientVersion);if(e instanceof xe)throw new xe(f,this.client._clientVersion)}throw e.clientVersion=this.client._clientVersion,e}sanitizeMessage(e){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Lo.default)(e):e}unpack(e,r,n){if(!e||(e.data&&(e=e.data),!e))return e;let i=Object.keys(e)[0],o=Object.values(e)[0],s=r.filter(h=>h!=="select"&&h!=="include"),a=Xr(o,s),f=i==="queryRaw"?br(a):et(a);return n?n(f):f}get[Symbol.toStringTag](){return"RequestHandler"}};function jl(t){if(t){if(t.kind==="batch")return{kind:"batch",options:{isolationLevel:t.isolationLevel}};if(t.kind==="itx")return{kind:"itx",options:Fo(t)};Me(t,"Unknown transaction kind")}}function Fo(t){return{id:t.id,payload:t.payload}}function $l(t,e){return yr(t)&&e?.kind==="batch"&&t.batchRequestIdx!==e.index}function Ql(t){return t.code==="P2009"||t.code==="P2012"}function Uo(t){if(t.kind==="Union")return{kind:"Union",errors:t.errors.map(Uo)};if(Array.isArray(t.selectionPath)){let[,...e]=t.selectionPath;return{...t,selectionPath:e}}return t}u();c();m();p();d();l();var No=yo;u();c();m();p();d();l();var $o=it(Br());u();c();m();p();d();l();var M=class extends Error{constructor(e){super(e+` +`)}var sn=({clientMethod:t,activeProvider:e})=>r=>{let n="",i;if(or(r))n=r.sql,i={values:tt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:tt(s||[]),__prismaRawParameters__:!0}}else switch(e){case"sqlite":case"mysql":{n=r.sql,i={values:tt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:tt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Po(r),i={values:tt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${e} provider does not support ${t}`)}return i?.values?Ro(`prisma.${t}(${n}, ${i.values})`):Ro(`prisma.${t}(${n})`),{query:n,parameters:i}},So={requestArgsToMiddlewareArgs(t){return[t.strings,...t.values]},middlewareArgsToRequestArgs(t){let[e,...r]=t;return new ee(e,r)}},Oo={requestArgsToMiddlewareArgs(t){return[t]},middlewareArgsToRequestArgs(t){return t[0]}};u();c();m();p();d();l();function an(t){return function(r,n){let i,o=(s=t)=>{try{return s===void 0||s?.kind==="itx"?i??=ko(r(s)):ko(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function ko(t){return typeof t.then=="function"?t:Promise.resolve(t)}u();c();m();p();d();l();var Ul=Ir.split(".")[0],Nl={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(t,e){return e()}},ln=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(e){return this.getGlobalTracingHelper().getTraceParent(e)}dispatchEngineSpans(e){return this.getGlobalTracingHelper().dispatchEngineSpans(e)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(e,r){return this.getGlobalTracingHelper().runInChildSpan(e,r)}getGlobalTracingHelper(){let e=globalThis[`V${Ul}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return e?.helper??r?.helper??Nl}};function Do(){return new ln}u();c();m();p();d();l();function Io(t,e=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--t===0&&r(e()),i?.(n)}}}u();c();m();p();d();l();function Mo(t){return typeof t=="string"?t:t.reduce((e,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?e:e&&(r==="info"||e==="info")?"info":n},void 0)}u();c();m();p();d();l();var Lo=it(ei());u();c();m();p();d();l();function yr(t){return typeof t.batchRequestIdx=="number"}u();c();m();p();d();l();function _o(t){if(t.action!=="findUnique"&&t.action!=="findUniqueOrThrow")return;let e=[];return t.modelName&&e.push(t.modelName),t.query.arguments&&e.push(un(t.query.arguments)),e.push(un(t.query.selection)),e.join("")}function un(t){return`(${Object.keys(t).sort().map(r=>{let n=t[r];return typeof n=="object"&&n!==null?`(${r} ${un(n)})`:r}).join(" ")})`}u();c();m();p();d();l();var ql={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,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function cn(t){return ql[t]}u();c();m();p();d();l();var hr=class{constructor(e){this.options=e;this.batches={}}batches;tickActive=!1;request(e){let r=this.options.batchBy(e);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:e,resolve:n,reject:i})})):this.options.singleLoader(e)}dispatchBatches(){for(let e in this.batches){let r=this.batches[e];delete this.batches[e],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 e.map(r=>Le("bytes",r));case"decimal-array":return e.map(r=>Le("decimal",r));case"datetime-array":return e.map(r=>Le("datetime",r));case"date-array":return e.map(r=>Le("date",r));case"time-array":return e.map(r=>Le("time",r));default:return e}}function br(t){let e=[],r=Bl(t);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(A=>A.protocolQuery),f=this.client._tracingHelper.getTraceParent(s),h=n.some(A=>cn(A.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:f,transaction:jl(o),containsWrite:h,customDataProxyFetch:i})).map((A,k)=>{if(A instanceof Error)return A;try{return this.mapQueryEngineResult(n[k],A)}catch(R){return R}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Fo(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:cn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:_o(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(e){try{return await this.dataloader.request(e)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=e;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:e.globalOmit})}}mapQueryEngineResult({dataPath:e,unpacker:r},n){let i=n?.data,o=this.unpack(i,e,r);return g.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(e){try{this.handleRequestError(e)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:e.clientMethod,timestamp:new Date}),r}}handleRequestError({error:e,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Vl(e),$l(e,i))throw e;if(e instanceof Z&&Ql(e)){let h=Uo(e.meta);Zt({args:o,errors:[h],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let f=e.message;if(n&&(f=$t({callsite:n,originalMethod:r,isPanic:e.isPanic,showColors:this.client._errorFormat==="pretty",message:f})),f=this.sanitizeMessage(f),e.code){let h=s?{modelName:s,...e.meta}:e.meta;throw new Z(f,{code:e.code,clientVersion:this.client._clientVersion,meta:h,batchRequestIdx:e.batchRequestIdx})}else{if(e.isPanic)throw new Ee(f,this.client._clientVersion);if(e instanceof Q)throw new Q(f,{clientVersion:this.client._clientVersion,batchRequestIdx:e.batchRequestIdx});if(e instanceof I)throw new I(f,this.client._clientVersion);if(e instanceof Ee)throw new Ee(f,this.client._clientVersion)}throw e.clientVersion=this.client._clientVersion,e}sanitizeMessage(e){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Lo.default)(e):e}unpack(e,r,n){if(!e||(e.data&&(e=e.data),!e))return e;let i=Object.keys(e)[0],o=Object.values(e)[0],s=r.filter(h=>h!=="select"&&h!=="include"),a=Xr(o,s),f=i==="queryRaw"?br(a):et(a);return n?n(f):f}get[Symbol.toStringTag](){return"RequestHandler"}};function jl(t){if(t){if(t.kind==="batch")return{kind:"batch",options:{isolationLevel:t.isolationLevel}};if(t.kind==="itx")return{kind:"itx",options:Fo(t)};Me(t,"Unknown transaction kind")}}function Fo(t){return{id:t.id,payload:t.payload}}function $l(t,e){return yr(t)&&e?.kind==="batch"&&t.batchRequestIdx!==e.index}function Ql(t){return t.code==="P2009"||t.code==="P2012"}function Uo(t){if(t.kind==="Union")return{kind:"Union",errors:t.errors.map(Uo)};if(Array.isArray(t.selectionPath)){let[,...e]=t.selectionPath;return{...t,selectionPath:e}}return t}u();c();m();p();d();l();var No=yo;u();c();m();p();d();l();var $o=it(Br());u();c();m();p();d();l();var M=class extends Error{constructor(e){super(e+` Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};re(M,"PrismaClientConstructorValidationError");var qo=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Bo=["pretty","colorless","minimal"],Vo=["info","query","warn","error"],Jl={datasources:(t,{datasourceNames:e})=>{if(t){if(typeof t!="object"||Array.isArray(t))throw new M(`Invalid value ${JSON.stringify(t)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(t)){if(!e.includes(r)){let i=rt(r,e)||` Available datasources: ${e.join(", ")}`;throw new M(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new M(`Invalid value ${JSON.stringify(t)} 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 M(`Invalid value ${JSON.stringify(t)} for datasource "${r}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new M(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. @@ -30,6 +30,6 @@ Expected string or undefined.`)},errorFormat:t=>{if(t){if(typeof t!="string")thr ${i} -${n}`}u();c();m();p();d();l();function Jo(t){return t.length===0?Promise.resolve([]):new Promise((e,r)=>{let n=new Array(t.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===t.length&&(o=!0,i?r(i):e(n)))},f=h=>{o||(o=!0,r(h))};for(let h=0;h{n[h]=C,a()},C=>{if(!yr(C)){f(C);return}C.batchRequestIdx===h?f(C):(i||(i=C),a())})})}var Ae=G("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Hl={requestArgsToMiddlewareArgs:t=>t,middlewareArgsToRequestArgs:t=>t},zl=Symbol.for("prisma.client.transaction.id"),Yl={id:0,nextId(){return++this.id}};function Ko(t){class e{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=an();constructor(n){t=n?.__internal?.configOverride?.(t)??t,po(t),n&&Qo(n,t);let i=new sr().on("error",()=>{});this._extensions=ze.empty(),this._previewFeatures=gr(t),this._clientVersion=t.clientVersion??No,this._activeProvider=t.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Do();let o=t.relativeEnvPaths&&{rootEnvPath:t.relativeEnvPaths.rootEnvPath&&Ut.resolve(t.dirname,t.relativeEnvPaths.rootEnvPath),schemaEnvPath:t.relativeEnvPaths.schemaEnvPath&&Ut.resolve(t.dirname,t.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let f=t.activeProvider==="postgresql"||t.activeProvider==="cockroachdb"?"postgres":t.activeProvider;if(s.provider!==f)throw new I(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${f}\` 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=t.injectableEdgeEnv?.();try{let f=n??{},h=f.__internal??{},C=h.debug===!0;C&&G.enable("prisma:client");let R=Ut.resolve(t.dirname,t.relativePath);Nn.existsSync(R)||(R=t.dirname),Ae("dirname",t.dirname),Ae("relativePath",t.relativePath),Ae("cwd",R);let k=h.engine||{};if(f.errorFormat?this._errorFormat=f.errorFormat:g.env.NODE_ENV==="production"?this._errorFormat="minimal":g.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=t.runtimeDataModel,this._engineConfig={cwd:R,dirname:t.dirname,enableDebugLogs:C,allowTriggerPanic:k.allowTriggerPanic,prismaPath:k.binaryPath??void 0,engineEndpoint:k.endpoint,generator:t.generator,showColors:this._errorFormat==="pretty",logLevel:f.log&&Mo(f.log),logQueries:f.log&&!!(typeof f.log=="string"?f.log==="query":f.log.find(A=>typeof A=="string"?A==="query":A.level==="query")),env:a?.parsed??{},flags:[],engineWasm:t.engineWasm,compilerWasm:t.compilerWasm,clientVersion:t.clientVersion,engineVersion:t.engineVersion,previewFeatures:this._previewFeatures,activeProvider:t.activeProvider,inlineSchema:t.inlineSchema,overrideDatasources:fo(f,t.datasourceNames),inlineDatasources:t.inlineDatasources,inlineSchemaHash:t.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:f.transactionOptions?.maxWait??2e3,timeout:f.transactionOptions?.timeout??5e3,isolationLevel:f.transactionOptions?.isolationLevel},logEmitter:i,isBundled:t.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:dr,getBatchRequestPayload:ur,prismaGraphQLToJSError:cr,PrismaClientUnknownRequestError:Q,PrismaClientInitializationError:I,PrismaClientKnownRequestError:Z,debug:G("prisma:client:accelerateEngine"),engineVersion:Wo.version,clientVersion:t.clientVersion}},Ae("clientVersion",t.clientVersion),this._engine=xo(t,this._engineConfig),this._requestHandler=new wr(this,i),f.log)for(let A of f.log){let _=typeof A=="string"?A:A.emit==="stdout"?A.level:null;_&&this.$on(_,O=>{lt.log(`${lt.tags[_]??""}`,O.message||O.query)})}}catch(f){throw f.clientVersion=this._clientVersion,f}return this._appliedParent=Tt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$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{Un()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:sn({clientMethod:i,activeProvider:a}),callsite:Ce(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Go(n,i);return on(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new K("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(on(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(t.activeProvider!=="mongodb")throw new K(`The ${t.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:Eo,callsite:Ce(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:sn({clientMethod:i,activeProvider:a}),callsite:Ce(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",...Go(n,i));throw new K("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new K("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Yl.nextId(),s=Io(n.length),a=n.map((f,h)=>{if(f?.[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,R={kind:"batch",id:o,index:h,isolationLevel:C,lock:s};return f.requestTransaction?.(R)??f});return Jo(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),f;try{let h={kind:"itx",...a};f=await n(this._createItxClient(h)),await this._engine.transaction("commit",o,a)}catch(h){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),h}return f}_createItxClient(n){return ae(Tt(ae(Yi(this),[H("_appliedParent",()=>this._appliedParent._createItxClient(n)),H("_createPrismaPromise",()=>an(n)),H(zl,()=>n.id)])),[Xe(ro)])}$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??Hl,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async f=>{let{runInTransaction:h,args:C,...R}=f,k={...n,...R};C&&(k.args=i.middlewareArgsToRequestArgs(C)),n.transaction!==void 0&&h===!1&&delete k.transaction;let A=await so(this,k);return k.model?to({result:A,modelName:k.model,args:k.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):A};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:f,argsMapper:h,transaction:C,unpacker:R,otelParentCtx:k,customDataProxyFetch:A}){try{n=h?h(n):n;let _={name:"serialize"},O=this._tracingHelper.runInChildSpan(_,()=>nr({modelName:f,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 G.enabled("prisma:client")&&(Ae("Prisma Client call:"),Ae(`prisma.${i}(${Vi(n)})`),Ae("Generated request:"),Ae(JSON.stringify(O,null,2)+` -`)),C?.kind==="batch"&&await C.lock,this._requestHandler.request({protocolQuery:O,modelName:f,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:C,unpacker:R,otelParentCtx:k,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:A})}catch(_){throw _.clientVersion=this._clientVersion,_}}$metrics=new Ye(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=Xi}return e}function Go(t,e){return Xl(t)?[new ee(t,e),So]:[t,Oo]}function Xl(t){return Array.isArray(t)&&Array.isArray(t.raw)}u();c();m();p();d();l();var Zl=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Ho(t){return new Proxy(t,{get(e,r){if(r in e)return e[r];if(!Zl.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}u();c();m();p();d();l();l();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +${n}`}u();c();m();p();d();l();function Jo(t){return t.length===0?Promise.resolve([]):new Promise((e,r)=>{let n=new Array(t.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===t.length&&(o=!0,i?r(i):e(n)))},f=h=>{o||(o=!0,r(h))};for(let h=0;h{n[h]=C,a()},C=>{if(!yr(C)){f(C);return}C.batchRequestIdx===h?f(C):(i||(i=C),a())})})}var Re=G("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Hl={requestArgsToMiddlewareArgs:t=>t,middlewareArgsToRequestArgs:t=>t},zl=Symbol.for("prisma.client.transaction.id"),Yl={id:0,nextId(){return++this.id}};function Ko(t){class e{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=an();constructor(n){t=n?.__internal?.configOverride?.(t)??t,po(t),n&&Qo(n,t);let i=new sr().on("error",()=>{});this._extensions=ze.empty(),this._previewFeatures=gr(t),this._clientVersion=t.clientVersion??No,this._activeProvider=t.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Do();let o=t.relativeEnvPaths&&{rootEnvPath:t.relativeEnvPaths.rootEnvPath&&Ut.resolve(t.dirname,t.relativeEnvPaths.rootEnvPath),schemaEnvPath:t.relativeEnvPaths.schemaEnvPath&&Ut.resolve(t.dirname,t.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let f=t.activeProvider==="postgresql"||t.activeProvider==="cockroachdb"?"postgres":t.activeProvider;if(s.provider!==f)throw new I(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${f}\` 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=t.injectableEdgeEnv?.();try{let f=n??{},h=f.__internal??{},C=h.debug===!0;C&&G.enable("prisma:client");let A=Ut.resolve(t.dirname,t.relativePath);Nn.existsSync(A)||(A=t.dirname),Re("dirname",t.dirname),Re("relativePath",t.relativePath),Re("cwd",A);let k=h.engine||{};if(f.errorFormat?this._errorFormat=f.errorFormat:g.env.NODE_ENV==="production"?this._errorFormat="minimal":g.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=t.runtimeDataModel,this._engineConfig={cwd:A,dirname:t.dirname,enableDebugLogs:C,allowTriggerPanic:k.allowTriggerPanic,prismaPath:k.binaryPath??void 0,engineEndpoint:k.endpoint,generator:t.generator,showColors:this._errorFormat==="pretty",logLevel:f.log&&Mo(f.log),logQueries:f.log&&!!(typeof f.log=="string"?f.log==="query":f.log.find(R=>typeof R=="string"?R==="query":R.level==="query")),env:a?.parsed??{},flags:[],engineWasm:t.engineWasm,compilerWasm:t.compilerWasm,clientVersion:t.clientVersion,engineVersion:t.engineVersion,previewFeatures:this._previewFeatures,activeProvider:t.activeProvider,inlineSchema:t.inlineSchema,overrideDatasources:fo(f,t.datasourceNames),inlineDatasources:t.inlineDatasources,inlineSchemaHash:t.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:f.transactionOptions?.maxWait??2e3,timeout:f.transactionOptions?.timeout??5e3,isolationLevel:f.transactionOptions?.isolationLevel},logEmitter:i,isBundled:t.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:dr,getBatchRequestPayload:ur,prismaGraphQLToJSError:cr,PrismaClientUnknownRequestError:Q,PrismaClientInitializationError:I,PrismaClientKnownRequestError:Z,debug:G("prisma:client:accelerateEngine"),engineVersion:Wo.version,clientVersion:t.clientVersion}},Re("clientVersion",t.clientVersion),this._engine=Eo(t,this._engineConfig),this._requestHandler=new wr(this,i),f.log)for(let R of f.log){let _=typeof R=="string"?R:R.emit==="stdout"?R.level:null;_&&this.$on(_,O=>{lt.log(`${lt.tags[_]??""}`,O.message||O.query)})}}catch(f){throw f.clientVersion=this._clientVersion,f}return this._appliedParent=Tt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$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{Un()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:sn({clientMethod:i,activeProvider:a}),callsite:Ce(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Go(n,i);return on(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new K("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(on(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(t.activeProvider!=="mongodb")throw new K(`The ${t.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:xo,callsite:Ce(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:sn({clientMethod:i,activeProvider:a}),callsite:Ce(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",...Go(n,i));throw new K("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new K("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Yl.nextId(),s=Io(n.length),a=n.map((f,h)=>{if(f?.[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,A={kind:"batch",id:o,index:h,isolationLevel:C,lock:s};return f.requestTransaction?.(A)??f});return Jo(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),f;try{let h={kind:"itx",...a};f=await n(this._createItxClient(h)),await this._engine.transaction("commit",o,a)}catch(h){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),h}return f}_createItxClient(n){return ae(Tt(ae(Yi(this),[H("_appliedParent",()=>this._appliedParent._createItxClient(n)),H("_createPrismaPromise",()=>an(n)),H(zl,()=>n.id)])),[Xe(ro)])}$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??Hl,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async f=>{let{runInTransaction:h,args:C,...A}=f,k={...n,...A};C&&(k.args=i.middlewareArgsToRequestArgs(C)),n.transaction!==void 0&&h===!1&&delete k.transaction;let R=await so(this,k);return k.model?to({result:R,modelName:k.model,args:k.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):R};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:f,argsMapper:h,transaction:C,unpacker:A,otelParentCtx:k,customDataProxyFetch:R}){try{n=h?h(n):n;let _={name:"serialize"},O=this._tracingHelper.runInChildSpan(_,()=>nr({modelName:f,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 G.enabled("prisma:client")&&(Re("Prisma Client call:"),Re(`prisma.${i}(${Vi(n)})`),Re("Generated request:"),Re(JSON.stringify(O,null,2)+` +`)),C?.kind==="batch"&&await C.lock,this._requestHandler.request({protocolQuery:O,modelName:f,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:C,unpacker:A,otelParentCtx:k,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:R})}catch(_){throw _.clientVersion=this._clientVersion,_}}$metrics=new Ye(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=Xi}return e}function Go(t,e){return Xl(t)?[new ee(t,e),So]:[t,Oo]}function Xl(t){return Array.isArray(t)&&Array.isArray(t.raw)}u();c();m();p();d();l();var Zl=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Ho(t){return new Proxy(t,{get(e,r){if(r in e)return e[r];if(!Zl.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}u();c();m();p();d();l();l();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); //# sourceMappingURL=wasm-engine-edge.js.map diff --git a/src/generated/prisma/schema.prisma b/src/generated/prisma/schema.prisma index 3c077c9..6680311 100644 --- a/src/generated/prisma/schema.prisma +++ b/src/generated/prisma/schema.prisma @@ -48,6 +48,8 @@ model User { status UserStatus @default(offline) // 👈 neu lastActiveAt DateTime? // optional: wann zuletzt aktiv + + readyAcceptances MatchReady[] @relation("MatchReadyUser") } enum UserStatus { @@ -153,6 +155,8 @@ model Match { updatedAt DateTime @updatedAt schedule Schedule? + + readyAcceptances MatchReady[] @relation("MatchReadyMatch") } model MatchPlayer { @@ -354,3 +358,15 @@ model MapVoteStep { @@index([teamId]) @@index([chosenBy]) } + +model MatchReady { + matchId String + steamId String + acceptedAt DateTime @default(now()) + + match Match @relation("MatchReadyMatch", fields: [matchId], references: [id]) + user User @relation("MatchReadyUser", fields: [steamId], references: [steamId]) + + @@id([matchId, steamId]) + @@index([steamId]) +} diff --git a/src/generated/prisma/wasm.js b/src/generated/prisma/wasm.js index bc8f3c3..e4be08d 100644 --- a/src/generated/prisma/wasm.js +++ b/src/generated/prisma/wasm.js @@ -20,12 +20,12 @@ exports.Prisma = Prisma exports.$Enums = {} /** - * Prisma Client JS version: 6.14.0 - * Query Engine version: 717184b7b35ea05dfa71a3236b7af656013e1e49 + * Prisma Client JS version: 6.15.0 + * Query Engine version: 85179d7826409ee107a6ba334b5e305ae3fba9fb */ Prisma.prismaVersion = { - client: "6.14.0", - engine: "717184b7b35ea05dfa71a3236b7af656013e1e49" + client: "6.15.0", + engine: "85179d7826409ee107a6ba334b5e305ae3fba9fb" } Prisma.PrismaClientKnownRequestError = () => { @@ -304,6 +304,12 @@ exports.Prisma.MapVoteStepScalarFieldEnum = { chosenBy: 'chosenBy' }; +exports.Prisma.MatchReadyScalarFieldEnum = { + matchId: 'matchId', + steamId: 'steamId', + acceptedAt: 'acceptedAt' +}; + exports.Prisma.SortOrder = { asc: 'asc', desc: 'desc' @@ -362,7 +368,8 @@ exports.Prisma.ModelName = { DemoFile: 'DemoFile', ServerRequest: 'ServerRequest', MapVote: 'MapVote', - MapVoteStep: 'MapVoteStep' + MapVoteStep: 'MapVoteStep', + MatchReady: 'MatchReady' }; /**