prisma 6.5.0-integration-fix-improve-global-omit-api-performance-2.2 → 6.5.0-integration-feat-prisma-config-without-new-package.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -150,7 +150,7 @@ export declare type ClientArgs = {
150
150
  client: ClientArg;
151
151
  };
152
152
 
153
- export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin<never, never, never>;
153
+ export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin<never, never, never, never>;
154
154
 
155
155
  export declare type ClientOptionDef = undefined | {
156
156
  [K in string]: any;
@@ -665,13 +665,13 @@ export declare interface DecimalJsLike {
665
665
 
666
666
  export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>;
667
667
 
668
- export declare type DefaultSelection<Payload extends OperationPayload, Args = {}, GlobalOmitOptions = {}> = Args extends {
668
+ export declare type DefaultSelection<Payload extends OperationPayload, Args = {}, ClientOptions = {}> = Args extends {
669
669
  omit: infer LocalOmit;
670
670
  } ? ApplyOmit<UnwrapPayload<{
671
671
  default: Payload;
672
- }>['default'], PatchFlat<LocalOmit, ExtractGlobalOmit<GlobalOmitOptions, Uncapitalize<Payload['name']>>>> : ApplyOmit<UnwrapPayload<{
672
+ }>['default'], PatchFlat<LocalOmit, ExtractGlobalOmit<ClientOptions, Uncapitalize<Payload['name']>>>> : ApplyOmit<UnwrapPayload<{
673
673
  default: Payload;
674
- }>['default'], ExtractGlobalOmit<GlobalOmitOptions, Uncapitalize<Payload['name']>>>;
674
+ }>['default'], ExtractGlobalOmit<ClientOptions, Uncapitalize<Payload['name']>>>;
675
675
 
676
676
  export declare function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel): void;
677
677
 
@@ -966,38 +966,38 @@ export declare interface DriverAdapter extends SqlQueryable {
966
966
  }
967
967
 
968
968
  /** Client */
969
- export declare type DynamicClientExtensionArgs<C_, TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>> = {
969
+ export declare type DynamicClientExtensionArgs<C_, TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>, ClientOptions> = {
970
970
  [P in keyof C_]: unknown;
971
971
  } & {
972
972
  [K: symbol]: {
973
- ctx: Optional<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>, ITXClientDenyList> & {
974
- $parent: Optional<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>, ITXClientDenyList>;
973
+ ctx: Optional<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs, ClientOptions>, ITXClientDenyList> & {
974
+ $parent: Optional<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs, ClientOptions>, ITXClientDenyList>;
975
975
  };
976
976
  };
977
977
  };
978
978
 
979
- export declare type DynamicClientExtensionThis<TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>> = {
979
+ export declare type DynamicClientExtensionThis<TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>, ClientOptions> = {
980
980
  [P in keyof ExtArgs['client']]: Return<ExtArgs['client'][P]>;
981
981
  } & {
982
- [P in Exclude<TypeMap['meta']['modelProps'], keyof ExtArgs['client']>]: DynamicModelExtensionThis<TypeMap, ModelKey<TypeMap, P>, ExtArgs>;
982
+ [P in Exclude<TypeMap['meta']['modelProps'], keyof ExtArgs['client']>]: DynamicModelExtensionThis<TypeMap, ModelKey<TypeMap, P>, ExtArgs, ClientOptions>;
983
983
  } & {
984
984
  [P in Exclude<keyof TypeMap['other']['operations'], keyof ExtArgs['client']>]: P extends keyof ClientOtherOps ? ClientOtherOps[P] : never;
985
985
  } & {
986
- [P in Exclude<ClientBuiltInProp, keyof ExtArgs['client']>]: DynamicClientExtensionThisBuiltin<TypeMap, TypeMapCb, ExtArgs>[P];
986
+ [P in Exclude<ClientBuiltInProp, keyof ExtArgs['client']>]: DynamicClientExtensionThisBuiltin<TypeMap, TypeMapCb, ExtArgs, ClientOptions>[P];
987
987
  } & {
988
988
  [K: symbol]: {
989
989
  types: TypeMap['other'];
990
990
  };
991
991
  };
992
992
 
993
- export declare type DynamicClientExtensionThisBuiltin<TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>> = {
993
+ export declare type DynamicClientExtensionThisBuiltin<TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>, ClientOptions> = {
994
994
  $extends: ExtendsHook<'extends', TypeMapCb, ExtArgs, Call<TypeMapCb, {
995
995
  extArgs: ExtArgs;
996
- }>>;
996
+ }>, ClientOptions>;
997
997
  $transaction<P extends PrismaPromise<any>[]>(arg: [...P], options?: {
998
998
  isolationLevel?: TypeMap['meta']['txIsolationLevel'];
999
999
  }): Promise<UnwrapTuple<P>>;
1000
- $transaction<R>(fn: (client: Omit<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>, ITXClientDenyList>) => Promise<R>, options?: {
1000
+ $transaction<R>(fn: (client: Omit<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs, ClientOptions>, ITXClientDenyList>) => Promise<R>, options?: {
1001
1001
  maxWait?: number;
1002
1002
  timeout?: number;
1003
1003
  isolationLevel?: TypeMap['meta']['txIsolationLevel'];
@@ -1007,7 +1007,7 @@ export declare type DynamicClientExtensionThisBuiltin<TypeMap extends TypeMapDef
1007
1007
  };
1008
1008
 
1009
1009
  /** Model */
1010
- export declare type DynamicModelExtensionArgs<M_, TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>> = {
1010
+ export declare type DynamicModelExtensionArgs<M_, TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>, ClientOptions> = {
1011
1011
  [K in keyof M_]: K extends '$allModels' ? {
1012
1012
  [P in keyof M_[K]]?: unknown;
1013
1013
  } & {
@@ -1016,8 +1016,8 @@ export declare type DynamicModelExtensionArgs<M_, TypeMap extends TypeMapDef, Ty
1016
1016
  [P in keyof M_[K]]?: unknown;
1017
1017
  } & {
1018
1018
  [K: symbol]: {
1019
- ctx: DynamicModelExtensionThis<TypeMap, ModelKey<TypeMap, K>, ExtArgs> & {
1020
- $parent: DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>;
1019
+ ctx: DynamicModelExtensionThis<TypeMap, ModelKey<TypeMap, K>, ExtArgs, ClientOptions> & {
1020
+ $parent: DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs, ClientOptions>;
1021
1021
  } & {
1022
1022
  $name: ModelKey<TypeMap, K>;
1023
1023
  } & {
@@ -1030,26 +1030,26 @@ export declare type DynamicModelExtensionArgs<M_, TypeMap extends TypeMapDef, Ty
1030
1030
  } : never;
1031
1031
  };
1032
1032
 
1033
- export declare type DynamicModelExtensionFluentApi<TypeMap extends TypeMapDef, M extends PropertyKey, P extends PropertyKey, Null> = {
1033
+ export declare type DynamicModelExtensionFluentApi<TypeMap extends TypeMapDef, M extends PropertyKey, P extends PropertyKey, Null, ClientOptions> = {
1034
1034
  [K in keyof TypeMap['model'][M]['payload']['objects']]: <A>(args?: Exact<A, Path<TypeMap['model'][M]['operations'][P]['args']['select'], [K]>>) => PrismaPromise<Path<DynamicModelExtensionFnResultBase<TypeMap, M, {
1035
1035
  select: {
1036
1036
  [P in K]: A;
1037
1037
  };
1038
- }, P>, [K]> | Null> & DynamicModelExtensionFluentApi<TypeMap, (TypeMap['model'][M]['payload']['objects'][K] & {})['name'], P, Null | Select<TypeMap['model'][M]['payload']['objects'][K], null>>;
1038
+ }, P, ClientOptions>, [K]> | Null> & DynamicModelExtensionFluentApi<TypeMap, (TypeMap['model'][M]['payload']['objects'][K] & {})['name'], P, Null | Select<TypeMap['model'][M]['payload']['objects'][K], null>, ClientOptions>;
1039
1039
  };
1040
1040
 
1041
- export declare type DynamicModelExtensionFnResult<TypeMap extends TypeMapDef, M extends PropertyKey, A, P extends PropertyKey, Null> = P extends FluentOperation ? DynamicModelExtensionFluentApi<TypeMap, M, P, Null> & PrismaPromise<DynamicModelExtensionFnResultBase<TypeMap, M, A, P> | Null> : PrismaPromise<DynamicModelExtensionFnResultBase<TypeMap, M, A, P>>;
1041
+ export declare type DynamicModelExtensionFnResult<TypeMap extends TypeMapDef, M extends PropertyKey, A, P extends PropertyKey, Null, ClientOptions> = P extends FluentOperation ? DynamicModelExtensionFluentApi<TypeMap, M, P, Null, ClientOptions> & PrismaPromise<DynamicModelExtensionFnResultBase<TypeMap, M, A, P, ClientOptions> | Null> : PrismaPromise<DynamicModelExtensionFnResultBase<TypeMap, M, A, P, ClientOptions>>;
1042
1042
 
1043
- export declare type DynamicModelExtensionFnResultBase<TypeMap extends TypeMapDef, M extends PropertyKey, A, P extends PropertyKey> = GetResult<TypeMap['model'][M]['payload'], A, P & Operation, TypeMap['globalOmitOptions']>;
1043
+ export declare type DynamicModelExtensionFnResultBase<TypeMap extends TypeMapDef, M extends PropertyKey, A, P extends PropertyKey, ClientOptions> = GetResult<TypeMap['model'][M]['payload'], A, P & Operation, ClientOptions>;
1044
1044
 
1045
1045
  export declare type DynamicModelExtensionFnResultNull<P extends PropertyKey> = P extends 'findUnique' | 'findFirst' ? null : never;
1046
1046
 
1047
- export declare type DynamicModelExtensionOperationFn<TypeMap extends TypeMapDef, M extends PropertyKey, P extends PropertyKey> = {} extends TypeMap['model'][M]['operations'][P]['args'] ? <A extends TypeMap['model'][M]['operations'][P]['args']>(args?: Exact<A, TypeMap['model'][M]['operations'][P]['args']>) => DynamicModelExtensionFnResult<TypeMap, M, A, P, DynamicModelExtensionFnResultNull<P>> : <A extends TypeMap['model'][M]['operations'][P]['args']>(args: Exact<A, TypeMap['model'][M]['operations'][P]['args']>) => DynamicModelExtensionFnResult<TypeMap, M, A, P, DynamicModelExtensionFnResultNull<P>>;
1047
+ export declare type DynamicModelExtensionOperationFn<TypeMap extends TypeMapDef, M extends PropertyKey, P extends PropertyKey, ClientOptions> = {} extends TypeMap['model'][M]['operations'][P]['args'] ? <A extends TypeMap['model'][M]['operations'][P]['args']>(args?: Exact<A, TypeMap['model'][M]['operations'][P]['args']>) => DynamicModelExtensionFnResult<TypeMap, M, A, P, DynamicModelExtensionFnResultNull<P>, ClientOptions> : <A extends TypeMap['model'][M]['operations'][P]['args']>(args: Exact<A, TypeMap['model'][M]['operations'][P]['args']>) => DynamicModelExtensionFnResult<TypeMap, M, A, P, DynamicModelExtensionFnResultNull<P>, ClientOptions>;
1048
1048
 
1049
- export declare type DynamicModelExtensionThis<TypeMap extends TypeMapDef, M extends PropertyKey, ExtArgs extends Record<string, any>> = {
1049
+ export declare type DynamicModelExtensionThis<TypeMap extends TypeMapDef, M extends PropertyKey, ExtArgs extends Record<string, any>, ClientOptions> = {
1050
1050
  [P in keyof ExtArgs['model'][Uncapitalize<M & string>]]: Return<ExtArgs['model'][Uncapitalize<M & string>][P]>;
1051
1051
  } & {
1052
- [P in Exclude<keyof TypeMap['model'][M]['operations'], keyof ExtArgs['model'][Uncapitalize<M & string>]>]: DynamicModelExtensionOperationFn<TypeMap, M, P>;
1052
+ [P in Exclude<keyof TypeMap['model'][M]['operations'], keyof ExtArgs['model'][Uncapitalize<M & string>]>]: DynamicModelExtensionOperationFn<TypeMap, M, P, ClientOptions>;
1053
1053
  } & {
1054
1054
  [P in Exclude<'fields', keyof ExtArgs['model'][Uncapitalize<M & string>]>]: TypeMap['model'][M]['fields'];
1055
1055
  } & {
@@ -1362,7 +1362,7 @@ declare type ExtendedSpanOptions = SpanOptions & {
1362
1362
  /** $extends, defineExtension */
1363
1363
  export declare interface ExtendsHook<Variant extends 'extends' | 'define', TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>, TypeMap extends TypeMapDef = Call<TypeMapCb, {
1364
1364
  extArgs: ExtArgs;
1365
- }>> {
1365
+ }>, ClientOptions = {}> {
1366
1366
  extArgs: ExtArgs;
1367
1367
  <R_ extends {
1368
1368
  [K in TypeMap['meta']['modelProps'] | '$allModels']?: unknown;
@@ -1372,7 +1372,7 @@ export declare interface ExtendsHook<Variant extends 'extends' | 'define', TypeM
1372
1372
  [K in TypeMap['meta']['modelProps'] | '$allModels' | keyof TypeMap['other']['operations'] | '$allOperations']?: unknown;
1373
1373
  }, C_ extends {
1374
1374
  [K in string]?: unknown;
1375
- }, C, Args extends InternalArgs = InternalArgs<R, M, {}, C>, MergedArgs extends InternalArgs = MergeExtArgs<TypeMap, ExtArgs, Args>>(extension: ((client: DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>) => {
1375
+ }, C, Args extends InternalArgs = InternalArgs<R, M, {}, C>, MergedArgs extends InternalArgs = MergeExtArgs<TypeMap, ExtArgs, Args>>(extension: ((client: DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs, ClientOptions>) => {
1376
1376
  $extends: {
1377
1377
  extArgs: Args;
1378
1378
  };
@@ -1380,12 +1380,12 @@ export declare interface ExtendsHook<Variant extends 'extends' | 'define', TypeM
1380
1380
  name?: string;
1381
1381
  query?: DynamicQueryExtensionArgs<Q_, TypeMap>;
1382
1382
  result?: DynamicResultExtensionArgs<R_, TypeMap> & R;
1383
- model?: DynamicModelExtensionArgs<M_, TypeMap, TypeMapCb, ExtArgs> & M;
1384
- client?: DynamicClientExtensionArgs<C_, TypeMap, TypeMapCb, ExtArgs> & C;
1383
+ model?: DynamicModelExtensionArgs<M_, TypeMap, TypeMapCb, ExtArgs, ClientOptions> & M;
1384
+ client?: DynamicClientExtensionArgs<C_, TypeMap, TypeMapCb, ExtArgs, ClientOptions> & C;
1385
1385
  }): {
1386
1386
  extends: DynamicClientExtensionThis<Call<TypeMapCb, {
1387
1387
  extArgs: MergedArgs;
1388
- }>, TypeMapCb, MergedArgs>;
1388
+ }>, TypeMapCb, MergedArgs, ClientOptions>;
1389
1389
  define: (client: any) => {
1390
1390
  $extends: {
1391
1391
  extArgs: Args;
@@ -1509,12 +1509,12 @@ export declare type GetCountResult<A> = A extends {
1509
1509
 
1510
1510
  declare function getExtensionContext<T>(that: T): Context_2<T>;
1511
1511
 
1512
- export declare type GetFindResult<P extends OperationPayload, A, GlobalOmitOptions> = Equals<A, any> extends 1 ? DefaultSelection<P, A, GlobalOmitOptions> : A extends {
1512
+ export declare type GetFindResult<P extends OperationPayload, A, ClientOptions> = Equals<A, any> extends 1 ? DefaultSelection<P, A, ClientOptions> : A extends {
1513
1513
  select: infer S extends object;
1514
1514
  } & Record<string, unknown> | {
1515
1515
  include: infer I extends object;
1516
1516
  } & Record<string, unknown> ? {
1517
- [K in keyof S | keyof I as (S & I)[K] extends false | undefined | Skip | null ? never : K]: (S & I)[K] extends object ? P extends SelectablePayloadFields<K, (infer O)[]> ? O extends OperationPayload ? GetFindResult<O, (S & I)[K], GlobalOmitOptions>[] : never : P extends SelectablePayloadFields<K, infer O | null> ? O extends OperationPayload ? GetFindResult<O, (S & I)[K], GlobalOmitOptions> | SelectField<P, K> & null : never : K extends '_count' ? Count<GetFindResult<P, (S & I)[K], GlobalOmitOptions>> : never : P extends SelectablePayloadFields<K, (infer O)[]> ? O extends OperationPayload ? DefaultSelection<O, {}, GlobalOmitOptions>[] : never : P extends SelectablePayloadFields<K, infer O | null> ? O extends OperationPayload ? DefaultSelection<O, {}, GlobalOmitOptions> | SelectField<P, K> & null : never : P extends {
1517
+ [K in keyof S | keyof I as (S & I)[K] extends false | undefined | Skip | null ? never : K]: (S & I)[K] extends object ? P extends SelectablePayloadFields<K, (infer O)[]> ? O extends OperationPayload ? GetFindResult<O, (S & I)[K], ClientOptions>[] : never : P extends SelectablePayloadFields<K, infer O | null> ? O extends OperationPayload ? GetFindResult<O, (S & I)[K], ClientOptions> | SelectField<P, K> & null : never : K extends '_count' ? Count<GetFindResult<P, (S & I)[K], ClientOptions>> : never : P extends SelectablePayloadFields<K, (infer O)[]> ? O extends OperationPayload ? DefaultSelection<O, {}, ClientOptions>[] : never : P extends SelectablePayloadFields<K, infer O | null> ? O extends OperationPayload ? DefaultSelection<O, {}, ClientOptions> | SelectField<P, K> & null : never : P extends {
1518
1518
  scalars: {
1519
1519
  [k in K]: infer O;
1520
1520
  };
@@ -1523,7 +1523,7 @@ export declare type GetFindResult<P extends OperationPayload, A, GlobalOmitOptio
1523
1523
  include: any;
1524
1524
  } & Record<string, unknown> ? DefaultSelection<P, A & {
1525
1525
  omit: A['omit'];
1526
- }, GlobalOmitOptions> : unknown) : DefaultSelection<P, A, GlobalOmitOptions>;
1526
+ }, ClientOptions> : unknown) : DefaultSelection<P, A, ClientOptions>;
1527
1527
 
1528
1528
  export declare type GetGroupByResult<P extends OperationPayload, A> = A extends {
1529
1529
  by: string[];
@@ -1769,20 +1769,20 @@ declare type GetPrismaClientConfig = {
1769
1769
  compilerWasm?: CompilerWasmLoadingConfig;
1770
1770
  };
1771
1771
 
1772
- export declare type GetResult<Payload extends OperationPayload, Args, OperationName extends Operation = 'findUniqueOrThrow', GlobalOmitOptions = {}> = {
1773
- findUnique: GetFindResult<Payload, Args, GlobalOmitOptions> | null;
1774
- findUniqueOrThrow: GetFindResult<Payload, Args, GlobalOmitOptions>;
1775
- findFirst: GetFindResult<Payload, Args, GlobalOmitOptions> | null;
1776
- findFirstOrThrow: GetFindResult<Payload, Args, GlobalOmitOptions>;
1777
- findMany: GetFindResult<Payload, Args, GlobalOmitOptions>[];
1778
- create: GetFindResult<Payload, Args, GlobalOmitOptions>;
1772
+ export declare type GetResult<Payload extends OperationPayload, Args, OperationName extends Operation = 'findUniqueOrThrow', ClientOptions = {}> = {
1773
+ findUnique: GetFindResult<Payload, Args, ClientOptions> | null;
1774
+ findUniqueOrThrow: GetFindResult<Payload, Args, ClientOptions>;
1775
+ findFirst: GetFindResult<Payload, Args, ClientOptions> | null;
1776
+ findFirstOrThrow: GetFindResult<Payload, Args, ClientOptions>;
1777
+ findMany: GetFindResult<Payload, Args, ClientOptions>[];
1778
+ create: GetFindResult<Payload, Args, ClientOptions>;
1779
1779
  createMany: GetBatchResult;
1780
- createManyAndReturn: GetFindResult<Payload, Args, GlobalOmitOptions>[];
1781
- update: GetFindResult<Payload, Args, GlobalOmitOptions>;
1780
+ createManyAndReturn: GetFindResult<Payload, Args, ClientOptions>[];
1781
+ update: GetFindResult<Payload, Args, ClientOptions>;
1782
1782
  updateMany: GetBatchResult;
1783
- updateManyAndReturn: GetFindResult<Payload, Args, GlobalOmitOptions>[];
1784
- upsert: GetFindResult<Payload, Args, GlobalOmitOptions>;
1785
- delete: GetFindResult<Payload, Args, GlobalOmitOptions>;
1783
+ updateManyAndReturn: GetFindResult<Payload, Args, ClientOptions>[];
1784
+ upsert: GetFindResult<Payload, Args, ClientOptions>;
1785
+ delete: GetFindResult<Payload, Args, ClientOptions>;
1786
1786
  deleteMany: GetBatchResult;
1787
1787
  aggregate: GetAggregateResult<Payload, Args>;
1788
1788
  count: GetCountResult<Args>;
@@ -3368,6 +3368,7 @@ export declare class TypedSql<Values extends readonly unknown[], Result> {
3368
3368
 
3369
3369
  export declare type TypeMapCbDef = Fn<{
3370
3370
  extArgs: InternalArgs;
3371
+ clientOptions: ClientOptionDef;
3371
3372
  }, TypeMapDef>;
3372
3373
 
3373
3374
  /** Shared */
@@ -1,4 +1,4 @@
1
- "use strict";var du=Object.create;var Mr=Object.defineProperty;var mu=Object.getOwnPropertyDescriptor;var fu=Object.getOwnPropertyNames;var gu=Object.getPrototypeOf,hu=Object.prototype.hasOwnProperty;var H=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Gt=(e,t)=>{for(var r in t)Mr(e,r,{get:t[r],enumerable:!0})},So=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fu(t))!hu.call(e,i)&&i!==r&&Mr(e,i,{get:()=>t[i],enumerable:!(n=mu(t,i))||n.enumerable});return e};var _=(e,t,r)=>(r=e!=null?du(gu(e)):{},So(t||!e||!e.__esModule?Mr(r,"default",{value:e,enumerable:!0}):r,e)),yu=e=>So(Mr({},"__esModule",{value:!0}),e);var zo=H((Gf,ci)=>{"use strict";var P=ci.exports;ci.exports.default=P;var D="\x1B[",Yt="\x1B]",ft="\x07",Hr=";",Yo=process.env.TERM_PROGRAM==="Apple_Terminal";P.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?D+(e+1)+"G":D+(t+1)+";"+(e+1)+"H"};P.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let r="";return e<0?r+=D+-e+"D":e>0&&(r+=D+e+"C"),t<0?r+=D+-t+"A":t>0&&(r+=D+t+"B"),r};P.cursorUp=(e=1)=>D+e+"A";P.cursorDown=(e=1)=>D+e+"B";P.cursorForward=(e=1)=>D+e+"C";P.cursorBackward=(e=1)=>D+e+"D";P.cursorLeft=D+"G";P.cursorSavePosition=Yo?"\x1B7":D+"s";P.cursorRestorePosition=Yo?"\x1B8":D+"u";P.cursorGetPosition=D+"6n";P.cursorNextLine=D+"E";P.cursorPrevLine=D+"F";P.cursorHide=D+"?25l";P.cursorShow=D+"?25h";P.eraseLines=e=>{let t="";for(let r=0;r<e;r++)t+=P.eraseLine+(r<e-1?P.cursorUp():"");return e&&(t+=P.cursorLeft),t};P.eraseEndLine=D+"K";P.eraseStartLine=D+"1K";P.eraseLine=D+"2K";P.eraseDown=D+"J";P.eraseUp=D+"1J";P.eraseScreen=D+"2J";P.scrollUp=D+"S";P.scrollDown=D+"T";P.clearScreen="\x1Bc";P.clearTerminal=process.platform==="win32"?`${P.eraseScreen}${D}0f`:`${P.eraseScreen}${D}3J${D}H`;P.beep=ft;P.link=(e,t)=>[Yt,"8",Hr,Hr,t,ft,e,Yt,"8",Hr,Hr,ft].join("");P.image=(e,t={})=>{let r=`${Yt}1337;File=inline=1`;return t.width&&(r+=`;width=${t.width}`),t.height&&(r+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0"),r+":"+e.toString("base64")+ft};P.iTerm={setCwd:(e=process.cwd())=>`${Yt}50;CurrentDir=${e}${ft}`,annotation:(e,t={})=>{let r=`${Yt}1337;`,n=typeof t.x<"u",i=typeof t.y<"u";if((n||i)&&!(n&&i&&typeof t.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),r+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?r+=(n?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):r+=e,r+ft}}});var pi=H((Jf,Zo)=>{"use strict";Zo.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}});var ts=H((Wf,es)=>{"use strict";var oc=require("os"),Xo=require("tty"),ge=pi(),{env:J}=process,Je;ge("no-color")||ge("no-colors")||ge("color=false")||ge("color=never")?Je=0:(ge("color")||ge("colors")||ge("color=true")||ge("color=always"))&&(Je=1);"FORCE_COLOR"in J&&(J.FORCE_COLOR==="true"?Je=1:J.FORCE_COLOR==="false"?Je=0:Je=J.FORCE_COLOR.length===0?1:Math.min(parseInt(J.FORCE_COLOR,10),3));function di(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function mi(e,t){if(Je===0)return 0;if(ge("color=16m")||ge("color=full")||ge("color=truecolor"))return 3;if(ge("color=256"))return 2;if(e&&!t&&Je===void 0)return 0;let r=Je||0;if(J.TERM==="dumb")return r;if(process.platform==="win32"){let n=oc.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in J)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in J)||J.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in J)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(J.TEAMCITY_VERSION)?1:0;if(J.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in J){let n=parseInt((J.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(J.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(J.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(J.TERM)||"COLORTERM"in J?1:r}function sc(e){let t=mi(e,e&&e.isTTY);return di(t)}es.exports={supportsColor:sc,stdout:di(mi(!0,Xo.isatty(1))),stderr:di(mi(!0,Xo.isatty(2)))}});var is=H((Hf,ns)=>{"use strict";var ac=ts(),gt=pi();function rs(e){if(/^\d{3,4}$/.test(e)){let r=/(\d{1,2})(\d{2})/.exec(e);return{major:0,minor:parseInt(r[1],10),patch:parseInt(r[2],10)}}let t=(e||"").split(".").map(r=>parseInt(r,10));return{major:t[0],minor:t[1],patch:t[2]}}function fi(e){let{env:t}=process;if("FORCE_HYPERLINK"in t)return!(t.FORCE_HYPERLINK.length>0&&parseInt(t.FORCE_HYPERLINK,10)===0);if(gt("no-hyperlink")||gt("no-hyperlinks")||gt("hyperlink=false")||gt("hyperlink=never"))return!1;if(gt("hyperlink=true")||gt("hyperlink=always")||"NETLIFY"in t)return!0;if(!ac.supportsColor(e)||e&&!e.isTTY||process.platform==="win32"||"CI"in t||"TEAMCITY_VERSION"in t)return!1;if("TERM_PROGRAM"in t){let r=rs(t.TERM_PROGRAM_VERSION);switch(t.TERM_PROGRAM){case"iTerm.app":return r.major===3?r.minor>=1:r.major>3;case"WezTerm":return r.major>=20200620;case"vscode":return r.major>1||r.major===1&&r.minor>=72}}if("VTE_VERSION"in t){if(t.VTE_VERSION==="0.50.0")return!1;let r=rs(t.VTE_VERSION);return r.major>0||r.minor>=50}return!1}ns.exports={supportsHyperlink:fi,stdout:fi(process.stdout),stderr:fi(process.stderr)}});var ss=H((Kf,zt)=>{"use strict";var lc=zo(),gi=is(),os=(e,t,{target:r="stdout",...n}={})=>gi[r]?lc.link(e,t):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,t):`${e} (\u200B${t}\u200B)`;zt.exports=(e,t,r={})=>os(e,t,r);zt.exports.stderr=(e,t,r={})=>os(e,t,{target:"stderr",...r});zt.exports.isSupported=gi.stdout;zt.exports.stderr.isSupported=gi.stderr});var ls=H((og,uc)=>{uc.exports={name:"@prisma/internals",version:"6.5.0-integration-fix-improve-global-omit-api-performance-2.2",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 <suchanek@prisma.io>",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:{"@antfu/ni":"0.21.12","@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":"2.1.0",dotenv:"16.4.7",esbuild:"0.24.2","escape-string-regexp":"4.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"5.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","read-package-up":"11.0.0",resolve:"1.22.10","string-width":"4.2.3","strip-ansi":"6.0.1","strip-indent":"3.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"2.1.1",tmp:"0.2.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/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.5.0-35.c4e2705a07520fd27af6feba131ff83c38cd0c5c","@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=H((ag,pc)=>{pc.exports={name:"@prisma/engines-version",version:"6.5.0-35.c4e2705a07520fd27af6feba131ff83c38cd0c5c",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"c4e2705a07520fd27af6feba131ff83c38cd0c5c"},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 bi=H(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.enginesVersion=void 0;Kr.enginesVersion=Ei().prisma.enginesVersion});var ps=H((Rg,fc)=>{fc.exports={name:"dotenv",version:"16.4.7",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"},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 gs=H((Sg,Le)=>{"use strict";var vi=require("fs"),Ti=require("path"),gc=require("os"),hc=require("crypto"),yc=ps(),Ci=yc.version,Ec=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function bc(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,`
1
+ "use strict";var du=Object.create;var Mr=Object.defineProperty;var mu=Object.getOwnPropertyDescriptor;var fu=Object.getOwnPropertyNames;var gu=Object.getPrototypeOf,hu=Object.prototype.hasOwnProperty;var H=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Gt=(e,t)=>{for(var r in t)Mr(e,r,{get:t[r],enumerable:!0})},So=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fu(t))!hu.call(e,i)&&i!==r&&Mr(e,i,{get:()=>t[i],enumerable:!(n=mu(t,i))||n.enumerable});return e};var _=(e,t,r)=>(r=e!=null?du(gu(e)):{},So(t||!e||!e.__esModule?Mr(r,"default",{value:e,enumerable:!0}):r,e)),yu=e=>So(Mr({},"__esModule",{value:!0}),e);var zo=H((Gf,ci)=>{"use strict";var P=ci.exports;ci.exports.default=P;var D="\x1B[",Yt="\x1B]",ft="\x07",Hr=";",Yo=process.env.TERM_PROGRAM==="Apple_Terminal";P.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?D+(e+1)+"G":D+(t+1)+";"+(e+1)+"H"};P.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let r="";return e<0?r+=D+-e+"D":e>0&&(r+=D+e+"C"),t<0?r+=D+-t+"A":t>0&&(r+=D+t+"B"),r};P.cursorUp=(e=1)=>D+e+"A";P.cursorDown=(e=1)=>D+e+"B";P.cursorForward=(e=1)=>D+e+"C";P.cursorBackward=(e=1)=>D+e+"D";P.cursorLeft=D+"G";P.cursorSavePosition=Yo?"\x1B7":D+"s";P.cursorRestorePosition=Yo?"\x1B8":D+"u";P.cursorGetPosition=D+"6n";P.cursorNextLine=D+"E";P.cursorPrevLine=D+"F";P.cursorHide=D+"?25l";P.cursorShow=D+"?25h";P.eraseLines=e=>{let t="";for(let r=0;r<e;r++)t+=P.eraseLine+(r<e-1?P.cursorUp():"");return e&&(t+=P.cursorLeft),t};P.eraseEndLine=D+"K";P.eraseStartLine=D+"1K";P.eraseLine=D+"2K";P.eraseDown=D+"J";P.eraseUp=D+"1J";P.eraseScreen=D+"2J";P.scrollUp=D+"S";P.scrollDown=D+"T";P.clearScreen="\x1Bc";P.clearTerminal=process.platform==="win32"?`${P.eraseScreen}${D}0f`:`${P.eraseScreen}${D}3J${D}H`;P.beep=ft;P.link=(e,t)=>[Yt,"8",Hr,Hr,t,ft,e,Yt,"8",Hr,Hr,ft].join("");P.image=(e,t={})=>{let r=`${Yt}1337;File=inline=1`;return t.width&&(r+=`;width=${t.width}`),t.height&&(r+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0"),r+":"+e.toString("base64")+ft};P.iTerm={setCwd:(e=process.cwd())=>`${Yt}50;CurrentDir=${e}${ft}`,annotation:(e,t={})=>{let r=`${Yt}1337;`,n=typeof t.x<"u",i=typeof t.y<"u";if((n||i)&&!(n&&i&&typeof t.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),r+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?r+=(n?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):r+=e,r+ft}}});var pi=H((Jf,Zo)=>{"use strict";Zo.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}});var ts=H((Wf,es)=>{"use strict";var oc=require("os"),Xo=require("tty"),ge=pi(),{env:J}=process,Je;ge("no-color")||ge("no-colors")||ge("color=false")||ge("color=never")?Je=0:(ge("color")||ge("colors")||ge("color=true")||ge("color=always"))&&(Je=1);"FORCE_COLOR"in J&&(J.FORCE_COLOR==="true"?Je=1:J.FORCE_COLOR==="false"?Je=0:Je=J.FORCE_COLOR.length===0?1:Math.min(parseInt(J.FORCE_COLOR,10),3));function di(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function mi(e,t){if(Je===0)return 0;if(ge("color=16m")||ge("color=full")||ge("color=truecolor"))return 3;if(ge("color=256"))return 2;if(e&&!t&&Je===void 0)return 0;let r=Je||0;if(J.TERM==="dumb")return r;if(process.platform==="win32"){let n=oc.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in J)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in J)||J.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in J)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(J.TEAMCITY_VERSION)?1:0;if(J.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in J){let n=parseInt((J.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(J.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(J.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(J.TERM)||"COLORTERM"in J?1:r}function sc(e){let t=mi(e,e&&e.isTTY);return di(t)}es.exports={supportsColor:sc,stdout:di(mi(!0,Xo.isatty(1))),stderr:di(mi(!0,Xo.isatty(2)))}});var is=H((Hf,ns)=>{"use strict";var ac=ts(),gt=pi();function rs(e){if(/^\d{3,4}$/.test(e)){let r=/(\d{1,2})(\d{2})/.exec(e);return{major:0,minor:parseInt(r[1],10),patch:parseInt(r[2],10)}}let t=(e||"").split(".").map(r=>parseInt(r,10));return{major:t[0],minor:t[1],patch:t[2]}}function fi(e){let{env:t}=process;if("FORCE_HYPERLINK"in t)return!(t.FORCE_HYPERLINK.length>0&&parseInt(t.FORCE_HYPERLINK,10)===0);if(gt("no-hyperlink")||gt("no-hyperlinks")||gt("hyperlink=false")||gt("hyperlink=never"))return!1;if(gt("hyperlink=true")||gt("hyperlink=always")||"NETLIFY"in t)return!0;if(!ac.supportsColor(e)||e&&!e.isTTY||process.platform==="win32"||"CI"in t||"TEAMCITY_VERSION"in t)return!1;if("TERM_PROGRAM"in t){let r=rs(t.TERM_PROGRAM_VERSION);switch(t.TERM_PROGRAM){case"iTerm.app":return r.major===3?r.minor>=1:r.major>3;case"WezTerm":return r.major>=20200620;case"vscode":return r.major>1||r.major===1&&r.minor>=72}}if("VTE_VERSION"in t){if(t.VTE_VERSION==="0.50.0")return!1;let r=rs(t.VTE_VERSION);return r.major>0||r.minor>=50}return!1}ns.exports={supportsHyperlink:fi,stdout:fi(process.stdout),stderr:fi(process.stderr)}});var ss=H((Kf,zt)=>{"use strict";var lc=zo(),gi=is(),os=(e,t,{target:r="stdout",...n}={})=>gi[r]?lc.link(e,t):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,t):`${e} (\u200B${t}\u200B)`;zt.exports=(e,t,r={})=>os(e,t,r);zt.exports.stderr=(e,t,r={})=>os(e,t,{target:"stderr",...r});zt.exports.isSupported=gi.stdout;zt.exports.stderr.isSupported=gi.stderr});var ls=H((og,uc)=>{uc.exports={name:"@prisma/internals",version:"6.5.0-integration-feat-prisma-config-without-new-package.1",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 <suchanek@prisma.io>",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:{"@antfu/ni":"0.21.12","@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":"2.1.0",dotenv:"16.4.7",esbuild:"0.24.2","escape-string-regexp":"4.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"5.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","read-package-up":"11.0.0",resolve:"1.22.10","string-width":"4.2.3","strip-ansi":"6.0.1","strip-indent":"3.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"2.1.1",tmp:"0.2.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/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.5.0-35.c4e2705a07520fd27af6feba131ff83c38cd0c5c","@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=H((ag,pc)=>{pc.exports={name:"@prisma/engines-version",version:"6.5.0-35.c4e2705a07520fd27af6feba131ff83c38cd0c5c",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"c4e2705a07520fd27af6feba131ff83c38cd0c5c"},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 bi=H(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.enginesVersion=void 0;Kr.enginesVersion=Ei().prisma.enginesVersion});var ps=H((Rg,fc)=>{fc.exports={name:"dotenv",version:"16.4.7",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"},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 gs=H((Sg,Le)=>{"use strict";var vi=require("fs"),Ti=require("path"),gc=require("os"),hc=require("crypto"),yc=ps(),Ci=yc.version,Ec=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function bc(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,`
2
2
  `);let n;for(;(n=Ec.exec(r))!=null;){let i=n[1],o=n[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,`
3
3
  `),o=o.replace(/\\r/g,"\r")),t[i]=o}return t}function wc(e){let t=fs(e),r=Q.configDotenv({path:t});if(!r.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw s.code="MISSING_DATA",s}let n=ms(e).split(","),i=n.length,o;for(let s=0;s<i;s++)try{let a=n[s].trim(),l=vc(r,a);o=Q.decrypt(l.ciphertext,l.key);break}catch(a){if(s+1>=i)throw a}return Q.parse(o)}function xc(e){console.log(`[dotenv@${Ci}][INFO] ${e}`)}function Pc(e){console.log(`[dotenv@${Ci}][WARN] ${e}`)}function Yr(e){console.log(`[dotenv@${Ci}][DEBUG] ${e}`)}function ms(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 vc(e,t){let r;try{r=new URL(t)}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=r.password;if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let i=r.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 fs(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)vi.existsSync(r)&&(t=r.endsWith(".vault")?r:`${r}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=Ti.resolve(process.cwd(),".env.vault");return vi.existsSync(t)?t:null}function ds(e){return e[0]==="~"?Ti.join(gc.homedir(),e.slice(1)):e}function Tc(e){xc("Loading env from encrypted .env.vault");let t=Q._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),Q.populate(r,t,e),{parsed:t}}function Cc(e){let t=Ti.resolve(process.cwd(),".env"),r="utf8",n=!!(e&&e.debug);e&&e.encoding?r=e.encoding:n&&Yr("No encoding is specified. UTF-8 is used by default");let i=[t];if(e&&e.path)if(!Array.isArray(e.path))i=[ds(e.path)];else{i=[];for(let l of e.path)i.push(ds(l))}let o,s={};for(let l of i)try{let u=Q.parse(vi.readFileSync(l,{encoding:r}));Q.populate(s,u,e)}catch(u){n&&Yr(`Failed to load ${l} ${u.message}`),o=u}let a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),Q.populate(a,s,e),o?{parsed:s,error:o}:{parsed:s}}function Rc(e){if(ms(e).length===0)return Q.configDotenv(e);let t=fs(e);return t?Q._configVault(e):(Pc(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),Q.configDotenv(e))}function Sc(e,t){let r=Buffer.from(t.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=hc.createDecipheriv("aes-256-gcm",r,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 Ac(e,t,r={}){let n=!!(r&&r.debug),i=!!(r&&r.override);if(typeof t!="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(t))Object.prototype.hasOwnProperty.call(e,o)?(i===!0&&(e[o]=t[o]),n&&Yr(i===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=t[o]}var Q={configDotenv:Cc,_configVault:Tc,_parseVault:wc,config:Rc,decrypt:Sc,parse:bc,populate:Ac};Le.exports.configDotenv=Q.configDotenv;Le.exports._configVault=Q._configVault;Le.exports._parseVault=Q._parseVault;Le.exports.config=Q.config;Le.exports.decrypt=Q.decrypt;Le.exports.parse=Q.parse;Le.exports.populate=Q.populate;Le.exports=Q});var xs=H((Ng,ws)=>{"use strict";ws.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var vs=H((Lg,Ps)=>{"use strict";var _c=xs();Ps.exports=e=>{let t=_c(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var ki=H((Bg,Cs)=>{"use strict";Cs.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Is=H((Gg,As)=>{"use strict";As.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Ni=H((Jg,ks)=>{"use strict";var Vc=Is();ks.exports=e=>typeof e=="string"?e.replace(Vc(),""):e});var Os=H((Kg,en)=>{"use strict";en.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()};en.exports.default=en.exports});var Ui=H((sy,Xs)=>{"use strict";Xs.exports=function(){function e(t,r,n,i,o){return t<r||n<r?t>n?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<i&&t.charCodeAt(s)===r.charCodeAt(s);)s++;if(i-=s,o-=s,i===0||o<3)return o;var a=0,l,u,c,p,d,f,g,h,k,v,R,C,O=[];for(l=0;l<i;l++)O.push(l+1),O.push(t.charCodeAt(s+l));for(var A=O.length-1;a<o-3;)for(k=r.charCodeAt(s+(u=a)),v=r.charCodeAt(s+(c=a+1)),R=r.charCodeAt(s+(p=a+2)),C=r.charCodeAt(s+(d=a+3)),f=a+=4,l=0;l<A;l+=2)g=O[l],h=O[l+1],u=e(g,u,c,k,h),c=e(u,c,p,v,h),p=e(c,p,d,R,h),f=e(p,d,f,C,h),O[l]=f,d=p,p=c,c=u,u=g;for(;a<o;)for(k=r.charCodeAt(s+(u=a)),f=++a,l=0;l<A;l+=2)g=O[l],O[l]=f=e(g,u,f,k,O[l+1]),u=g;return f}}()});var uf={};Gt(uf,{Debug:()=>ti,Decimal:()=>Te,Extensions:()=>Hn,MetricsClient:()=>_t,PrismaClientInitializationError:()=>T,PrismaClientKnownRequestError:()=>ee,PrismaClientRustPanicError:()=>ce,PrismaClientUnknownRequestError:()=>B,PrismaClientValidationError:()=>te,Public:()=>Kn,Sql:()=>ae,createParam:()=>wa,defineDmmfProperty:()=>Sa,deserializeJsonResponse:()=>xt,deserializeRawResult:()=>Gn,dmmfToRuntimeDataModel:()=>Ra,empty:()=>ka,getPrismaClient:()=>uu,getRuntime:()=>Ln,join:()=>Ia,makeStrictEnum:()=>cu,makeTypedQueryFactory:()=>Aa,objectEnumValues:()=>xn,raw:()=>Zi,serializeJsonQuery:()=>An,skip:()=>Sn,sqltag:()=>Xi,warnEnvConflicts:()=>pu,warnOnce:()=>nr});module.exports=yu(uf);var Hn={};Gt(Hn,{defineExtension:()=>Ao,getExtensionContext:()=>Io});function Ao(e){return typeof e=="function"?e:t=>t.$extends(e)}function Io(e){return e}var Kn={};Gt(Kn,{validator:()=>ko});function ko(...e){return t=>t}function Yn(e){return e.name==="DriverAdapterError"&&typeof e.cause=="object"}function $r(e){return{ok:!0,value:e,map(t){return $r(t(e))},flatMap(t){return t(e)}}}function rt(e){return{ok:!1,error:e,map(){return rt(e)},flatMap(){return rt(e)}}}var zn=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},Zn=e=>{let t=new zn,r=de(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:de(t,e.queryRaw.bind(e)),executeRaw:de(t,e.executeRaw.bind(e)),executeScript:de(t,e.executeScript.bind(e)),dispose:de(t,e.dispose.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>Eu(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=wu(t,e.getConnectionInfo.bind(e))),n},Eu=(e,t)=>{let r=de(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:de(e,t.queryRaw.bind(t)),executeRaw:de(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>bu(e,o))}},bu=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:de(e,t.queryRaw.bind(t)),executeRaw:de(e,t.executeRaw.bind(t)),commit:de(e,t.commit.bind(t)),rollback:de(e,t.rollback.bind(t))});function de(e,t){return async(...r)=>{try{return $r(await t(...r))}catch(n){if(Yn(n))return rt(n.cause);let i=e.registerNewError(n);return rt({kind:"GenericJs",id:i})}}}function wu(e,t){return(...r)=>{try{return $r(t(...r))}catch(n){if(Yn(n))return rt(n.cause);let i=e.registerNewError(n);return rt({kind:"GenericJs",id:i})}}}var qr={};Gt(qr,{$:()=>Lo,bgBlack:()=>ku,bgBlue:()=>Nu,bgCyan:()=>Fu,bgGreen:()=>_u,bgMagenta:()=>Lu,bgRed:()=>Ou,bgWhite:()=>Mu,bgYellow:()=>Du,black:()=>Ru,blue:()=>nt,bold:()=>K,cyan:()=>De,dim:()=>Oe,gray:()=>Jt,green:()=>Ve,grey:()=>Iu,hidden:()=>Tu,inverse:()=>vu,italic:()=>Pu,magenta:()=>Su,red:()=>me,reset:()=>xu,strikethrough:()=>Cu,underline:()=>X,white:()=>Au,yellow:()=>_e});var Xn,Oo,_o,Do,No=!0;typeof process<"u"&&({FORCE_COLOR:Xn,NODE_DISABLE_COLORS:Oo,NO_COLOR:_o,TERM:Do}=process.env||{},No=process.stdout&&process.stdout.isTTY);var Lo={enabled:!Oo&&_o==null&&Do!=="dumb"&&(Xn!=null&&Xn!=="0"||No)};function $(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Lo.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var xu=$(0,0),K=$(1,22),Oe=$(2,22),Pu=$(3,23),X=$(4,24),vu=$(7,27),Tu=$(8,28),Cu=$(9,29),Ru=$(30,39),me=$(31,39),Ve=$(32,39),_e=$(33,39),nt=$(34,39),Su=$(35,39),De=$(36,39),Au=$(37,39),Jt=$(90,39),Iu=$(90,39),ku=$(40,49),Ou=$(41,49),_u=$(42,49),Du=$(43,49),Nu=$(44,49),Lu=$(45,49),Fu=$(46,49),Mu=$(47,49);var $u=100,Fo=["green","yellow","blue","magenta","cyan","red"],Wt=[],Mo=Date.now(),qu=0,ei=typeof process<"u"?process.env:{};globalThis.DEBUG??=ei.DEBUG??"";globalThis.DEBUG_COLORS??=ei.DEBUG_COLORS?ei.DEBUG_COLORS==="true":!0;var Ht={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 Vu(e){let t={color:Fo[qu++%Fo.length],enabled:Ht.enabled(e),namespace:e,log:Ht.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Wt.push([o,...n]),Wt.length>$u&&Wt.shift(),Ht.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:ju(c)),u=`+${Date.now()-Mo}ms`;Mo=Date.now(),globalThis.DEBUG_COLORS?a(qr[s](K(o)),...l,qr[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var ti=new Proxy(Vu,{get:(e,t)=>Ht[t],set:(e,t,r)=>Ht[t]=r});function ju(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 $o(e=7500){let t=Wt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(`
4
4
  `);return t.length<e?t:t.slice(-e)}function qo(){Wt.length=0}var F=ti;var Vo=_(require("fs"));function ri(){let e=process.env.PRISMA_QUERY_ENGINE_LIBRARY;if(!(e&&Vo.default.existsSync(e))&&process.arch==="ia32")throw new Error('The default query engine type (Node-API, "library") is currently not supported for 32bit Node. Please set `engineType = "binary"` in the "generator" block of your "schema.prisma" file (or use the environment variables "PRISMA_CLIENT_ENGINE_TYPE=binary" and/or "PRISMA_CLI_QUERY_ENGINE_TYPE=binary".)')}var ni=["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"];var Vr="libquery_engine";function jr(e,t){let r=t==="url";return e.includes("windows")?r?"query_engine.dll.node":`query_engine-${e}.dll.node`:e.includes("darwin")?r?`${Vr}.dylib.node`:`${Vr}-${e}.dylib.node`:r?`${Vr}.so.node`:`${Vr}-${e}.so.node`}var Qo=_(require("child_process")),li=_(require("fs/promises")),Jr=_(require("os"));var Ne=Symbol.for("@ts-pattern/matcher"),Bu=Symbol.for("@ts-pattern/isVariadic"),Ur="@ts-pattern/anonymous-select-key",ii=e=>!!(e&&typeof e=="object"),Br=e=>e&&!!e[Ne],xe=(e,t,r)=>{if(Br(e)){let n=e[Ne](),{matched:i,selections:o}=n.match(t);return i&&o&&Object.keys(o).forEach(s=>r(s,o[s])),i}if(ii(e)){if(!ii(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],o=[];for(let s of e.keys()){let a=e[s];Br(a)&&a[Bu]?o.push(a):o.length?i.push(a):n.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+i.length)return!1;let s=t.slice(0,n.length),a=i.length===0?[]:t.slice(-i.length),l=t.slice(n.length,i.length===0?1/0:-i.length);return n.every((u,c)=>xe(u,s[c],r))&&i.every((u,c)=>xe(u,a[c],r))&&(o.length===0||xe(o[0],l,r))}return e.length===t.length&&e.every((s,a)=>xe(s,t[a],r))}return Reflect.ownKeys(e).every(n=>{let i=e[n];return(n in t||Br(o=i)&&o[Ne]().matcherType==="optional")&&xe(i,t[n],r);var o})}return Object.is(t,e)},Ge=e=>{var t,r,n;return ii(e)?Br(e)?(t=(r=(n=e[Ne]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Kt(e,Ge):Kt(Object.values(e),Ge):[]},Kt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function fe(e){return Object.assign(e,{optional:()=>Uu(e),and:t=>j(e,t),or:t=>Qu(e,t),select:t=>t===void 0?jo(e):jo(t,e)})}function Uu(e){return fe({[Ne]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return t===void 0?(Ge(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:xe(e,t,n),selections:r}},getSelectionKeys:()=>Ge(e),matcherType:"optional"})})}function j(...e){return fe({[Ne]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return{matched:e.every(i=>xe(i,t,n)),selections:r}},getSelectionKeys:()=>Kt(e,Ge),matcherType:"and"})})}function Qu(...e){return fe({[Ne]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return Kt(e,Ge).forEach(i=>n(i,void 0)),{matched:e.some(i=>xe(i,t,n)),selections:r}},getSelectionKeys:()=>Kt(e,Ge),matcherType:"or"})})}function I(e){return{[Ne]:()=>({match:t=>({matched:!!e(t)})})}}function jo(...e){let t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return fe({[Ne]:()=>({match:n=>{let i={[t??Ur]:n};return{matched:r===void 0||xe(r,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[t??Ur].concat(r===void 0?[]:Ge(r))})})}function be(e){return typeof e=="number"}function je(e){return typeof e=="string"}function Be(e){return typeof e=="bigint"}var kf=fe(I(function(e){return!0}));var Ue=e=>Object.assign(fe(e),{startsWith:t=>{return Ue(j(e,(r=t,I(n=>je(n)&&n.startsWith(r)))));var r},endsWith:t=>{return Ue(j(e,(r=t,I(n=>je(n)&&n.endsWith(r)))));var r},minLength:t=>Ue(j(e,(r=>I(n=>je(n)&&n.length>=r))(t))),length:t=>Ue(j(e,(r=>I(n=>je(n)&&n.length===r))(t))),maxLength:t=>Ue(j(e,(r=>I(n=>je(n)&&n.length<=r))(t))),includes:t=>{return Ue(j(e,(r=t,I(n=>je(n)&&n.includes(r)))));var r},regex:t=>{return Ue(j(e,(r=t,I(n=>je(n)&&!!n.match(r)))));var r}}),Of=Ue(I(je)),we=e=>Object.assign(fe(e),{between:(t,r)=>we(j(e,((n,i)=>I(o=>be(o)&&n<=o&&i>=o))(t,r))),lt:t=>we(j(e,(r=>I(n=>be(n)&&n<r))(t))),gt:t=>we(j(e,(r=>I(n=>be(n)&&n>r))(t))),lte:t=>we(j(e,(r=>I(n=>be(n)&&n<=r))(t))),gte:t=>we(j(e,(r=>I(n=>be(n)&&n>=r))(t))),int:()=>we(j(e,I(t=>be(t)&&Number.isInteger(t)))),finite:()=>we(j(e,I(t=>be(t)&&Number.isFinite(t)))),positive:()=>we(j(e,I(t=>be(t)&&t>0))),negative:()=>we(j(e,I(t=>be(t)&&t<0)))}),_f=we(I(be)),Qe=e=>Object.assign(fe(e),{between:(t,r)=>Qe(j(e,((n,i)=>I(o=>Be(o)&&n<=o&&i>=o))(t,r))),lt:t=>Qe(j(e,(r=>I(n=>Be(n)&&n<r))(t))),gt:t=>Qe(j(e,(r=>I(n=>Be(n)&&n>r))(t))),lte:t=>Qe(j(e,(r=>I(n=>Be(n)&&n<=r))(t))),gte:t=>Qe(j(e,(r=>I(n=>Be(n)&&n>=r))(t))),positive:()=>Qe(j(e,I(t=>Be(t)&&t>0))),negative:()=>Qe(j(e,I(t=>Be(t)&&t<0)))}),Df=Qe(I(Be)),Nf=fe(I(function(e){return typeof e=="boolean"})),Lf=fe(I(function(e){return typeof e=="symbol"})),Ff=fe(I(function(e){return e==null})),Mf=fe(I(function(e){return e!=null}));var oi=class extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}},si={matched:!1,value:void 0};function mt(e){return new ai(e,si)}var ai=class e{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;let r=t[t.length-1],n=[t[0]],i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let o=!1,s={},a=(u,c)=>{o=!0,s[u]=c},l=!n.some(u=>xe(u,this.input,a))||i&&!i(this.input)?si:{matched:!0,value:r(o?Ur in s?s[Ur]:s:this.input,this.input)};return new e(this.input,l)}when(t,r){if(this.state.matched)return this;let n=!!t(this.input);return new e(this.input,n?{matched:!0,value:r(this.input,this.input)}:si)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new oi(this.input)}run(){return this.exhaustive()}returnType(){return this}};var Go=require("util");var Gu={warn:_e("prisma:warn")},Ju={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Qr(e,...t){Ju.warn()&&console.warn(`${Gu.warn} ${e}`,...t)}var Wu=(0,Go.promisify)(Qo.default.exec),ne=F("prisma:get-platform"),Hu=["1.0.x","1.1.x","3.0.x"];async function Jo(){let e=Jr.default.platform(),t=process.arch;if(e==="freebsd"){let s=await Wr("freebsd-version");if(s&&s.trim().length>0){let l=/^(\d+)\.?/.exec(s);if(l)return{platform:"freebsd",targetDistro:`freebsd${l[1]}`,arch:t}}}if(e!=="linux")return{platform:e,arch:t};let r=await Yu(),n=await ic(),i=Zu({arch:t,archFromUname:n,familyDistro:r.familyDistro}),{libssl:o}=await Xu(i);return{platform:"linux",libssl:o,arch:t,archFromUname:n,...r}}function Ku(e){let t=/^ID="?([^"\n]*)"?$/im,r=/^ID_LIKE="?([^"\n]*)"?$/im,n=t.exec(e),i=n&&n[1]&&n[1].toLowerCase()||"",o=r.exec(e),s=o&&o[1]&&o[1].toLowerCase()||"",a=mt({id:i,idLike:s}).with({id:"alpine"},({id:l})=>({targetDistro:"musl",familyDistro:l,originalDistro:l})).with({id:"raspbian"},({id:l})=>({targetDistro:"arm",familyDistro:"debian",originalDistro:l})).with({id:"nixos"},({id:l})=>({targetDistro:"nixos",originalDistro:l,familyDistro:"nixos"})).with({id:"debian"},{id:"ubuntu"},({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).with({id:"rhel"},{id:"centos"},{id:"fedora"},({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).when(({idLike:l})=>l.includes("debian")||l.includes("ubuntu"),({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).when(({idLike:l})=>i==="arch"||l.includes("arch"),({id:l})=>({targetDistro:"debian",familyDistro:"arch",originalDistro:l})).when(({idLike:l})=>l.includes("centos")||l.includes("fedora")||l.includes("rhel")||l.includes("suse"),({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).otherwise(({id:l})=>({targetDistro:void 0,familyDistro:void 0,originalDistro:l}));return ne(`Found distro info:
@@ -118,7 +118,7 @@ Example:
118
118
  await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`)
119
119
 
120
120
  More Information: https://pris.ly/d/execute-raw
121
- `)}var Po=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(kn(r))n=r.sql,i={values:Bt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Bt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Bt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Bt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Dl(r),i={values:Bt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?$l(`prisma.${e}(${n}, ${i.values})`):$l(`prisma.${e}(${n})`),{query:n,parameters:i}},ql={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ae(t,r)}},Vl={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function vo(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=jl(r(s)):jl(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 jl(e){return typeof e.then=="function"?e:Promise.resolve(e)}var Qm=yi.split(".")[0],Gm={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},To=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${Qm}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??Gm}};function Bl(){return new To}function Ul(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}function Ql(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}var Bn=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};var Jl=_(Ni());function Un(e){return typeof e.batchRequestIdx=="number"}function Gl(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Co(e.query.arguments)),t.push(Co(e.query.selection)),t.join("")}function Co(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Co(n)})`:r}).join(" ")})`}var Jm={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 Ro(e){return Jm[e]}var Qn=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i<r.length;i++)r[i].reject(n);else for(let i=0;i<r.length;i++){let o=n[i];o instanceof Error?r[i].reject(o):r[i].resolve(o)}}).catch(n=>{for(let i=0;i<r.length;i++)r[i].reject(n)}))}}get[Symbol.toStringTag](){return"DataLoader"}};function pt(e,t){if(t===null)return t;switch(e){case"bigint":return BigInt(t);case"bytes":{let{buffer:r,byteOffset:n,byteLength:i}=Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"decimal":return new Te(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"bigint-array":return t.map(r=>pt("bigint",r));case"bytes-array":return t.map(r=>pt("bytes",r));case"decimal-array":return t.map(r=>pt("decimal",r));case"datetime-array":return t.map(r=>pt("datetime",r));case"date-array":return t.map(r=>pt("date",r));case"time-array":return t.map(r=>pt("time",r));default:return t}}function Gn(e){let t=[],r=Wm(e);for(let n=0;n<e.rows.length;n++){let i=e.rows[n],o={...r};for(let s=0;s<i.length;s++)o[e.columns[s]]=pt(e.types[s],i[s]);t.push(o)}return t}function Wm(e){let t={};for(let r=0;r<e.columns.length;r++)t[e.columns[r]]=null;return t}var Hm=F("prisma:client:request_handler"),Jn=class{constructor(t,r){this.logEmitter=r,this.client=t,this.dataloader=new Qn({batchLoader:el(async({requests:n,customDataProxyFetch:i})=>{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(p=>p.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(p=>Ro(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Km(o),containsWrite:u,customDataProxyFetch:i})).map((p,d)=>{if(p instanceof Error)return p;try{return this.mapQueryEngineResult(n[d],p)}catch(f){return f}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Wl(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Ro(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Gl(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 process.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(Hm(t),Ym(t,i))throw t;if(t instanceof ee&&zm(t)){let u=Hl(t.meta);Tn({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=fn({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 ee(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 B)throw new B(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof T)throw new T(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,Jl.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=ro(o,s),l=i==="queryRaw"?Gn(a):xt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Km(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Wl(e)};Fe(e,"Unknown transaction kind")}}function Wl(e){return{id:e.id,payload:e.payload}}function Ym(e,t){return Un(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function zm(e){return e.code==="P2009"||e.code==="P2012"}function Hl(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Hl)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}var Kl="6.5.0-integration-fix-improve-global-omit-api-performance-2.2";var Yl=Kl;var tu=_(Ui());var N=class extends Error{constructor(t){super(t+`
121
+ `)}var Po=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(kn(r))n=r.sql,i={values:Bt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Bt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Bt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Bt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Dl(r),i={values:Bt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?$l(`prisma.${e}(${n}, ${i.values})`):$l(`prisma.${e}(${n})`),{query:n,parameters:i}},ql={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ae(t,r)}},Vl={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function vo(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=jl(r(s)):jl(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 jl(e){return typeof e.then=="function"?e:Promise.resolve(e)}var Qm=yi.split(".")[0],Gm={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},To=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${Qm}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??Gm}};function Bl(){return new To}function Ul(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}function Ql(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}var Bn=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};var Jl=_(Ni());function Un(e){return typeof e.batchRequestIdx=="number"}function Gl(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Co(e.query.arguments)),t.push(Co(e.query.selection)),t.join("")}function Co(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Co(n)})`:r}).join(" ")})`}var Jm={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 Ro(e){return Jm[e]}var Qn=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i<r.length;i++)r[i].reject(n);else for(let i=0;i<r.length;i++){let o=n[i];o instanceof Error?r[i].reject(o):r[i].resolve(o)}}).catch(n=>{for(let i=0;i<r.length;i++)r[i].reject(n)}))}}get[Symbol.toStringTag](){return"DataLoader"}};function pt(e,t){if(t===null)return t;switch(e){case"bigint":return BigInt(t);case"bytes":{let{buffer:r,byteOffset:n,byteLength:i}=Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"decimal":return new Te(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"bigint-array":return t.map(r=>pt("bigint",r));case"bytes-array":return t.map(r=>pt("bytes",r));case"decimal-array":return t.map(r=>pt("decimal",r));case"datetime-array":return t.map(r=>pt("datetime",r));case"date-array":return t.map(r=>pt("date",r));case"time-array":return t.map(r=>pt("time",r));default:return t}}function Gn(e){let t=[],r=Wm(e);for(let n=0;n<e.rows.length;n++){let i=e.rows[n],o={...r};for(let s=0;s<i.length;s++)o[e.columns[s]]=pt(e.types[s],i[s]);t.push(o)}return t}function Wm(e){let t={};for(let r=0;r<e.columns.length;r++)t[e.columns[r]]=null;return t}var Hm=F("prisma:client:request_handler"),Jn=class{constructor(t,r){this.logEmitter=r,this.client=t,this.dataloader=new Qn({batchLoader:el(async({requests:n,customDataProxyFetch:i})=>{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(p=>p.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(p=>Ro(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Km(o),containsWrite:u,customDataProxyFetch:i})).map((p,d)=>{if(p instanceof Error)return p;try{return this.mapQueryEngineResult(n[d],p)}catch(f){return f}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Wl(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Ro(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Gl(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 process.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(Hm(t),Ym(t,i))throw t;if(t instanceof ee&&zm(t)){let u=Hl(t.meta);Tn({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=fn({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 ee(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 B)throw new B(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof T)throw new T(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,Jl.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=ro(o,s),l=i==="queryRaw"?Gn(a):xt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Km(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Wl(e)};Fe(e,"Unknown transaction kind")}}function Wl(e){return{id:e.id,payload:e.payload}}function Ym(e,t){return Un(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function zm(e){return e.code==="P2009"||e.code==="P2012"}function Hl(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Hl)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}var Kl="6.5.0-integration-feat-prisma-config-without-new-package.1";var Yl=Kl;var tu=_(Ui());var N=class extends Error{constructor(t){super(t+`
122
122
  Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};w(N,"PrismaClientConstructorValidationError");var zl=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Zl=["pretty","colorless","minimal"],Xl=["info","query","warn","error"],Xm={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new N(`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=Ut(r,t)||` Available datasources: ${t.join(", ")}`;throw new N(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new N(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor.
123
123
  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 N(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor.
124
124
  It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new N(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor.