@prisma/client 6.16.0-integration-feat-orm-1074-package-dev-export.2 → 6.16.0-integration-feat-orm-1074-package-dev-export.3

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.
@@ -1,17 +1,17 @@
1
- "use strict";var os=Object.create;var Ot=Object.defineProperty;var ss=Object.getOwnPropertyDescriptor;var as=Object.getOwnPropertyNames;var ls=Object.getPrototypeOf,us=Object.prototype.hasOwnProperty;var ee=(t,e)=>()=>(t&&(e=t(t=0)),e);var _e=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Fe=(t,e)=>{for(var r in e)Ot(t,r,{get:e[r],enumerable:!0})},St=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of as(e))!us.call(t,i)&&i!==r&&Ot(t,i,{get:()=>e[i],enumerable:!(n=ss(e,i))||n.enumerable});return t},B=(t,e,r)=>(St(t,e,"default"),r&&St(r,e,"default")),st=(t,e,r)=>(r=t!=null?os(ls(t)):{},St(e||!t||!t.__esModule?Ot(r,"default",{value:t,enumerable:!0}):r,t)),cs=t=>St(Ot({},"__esModule",{value:!0}),t);function Er(t,e){if(e=e.toLowerCase(),e==="utf8"||e==="utf-8")return new h(fs.encode(t));if(e==="base64"||e==="base64url")return t=t.replace(/-/g,"+").replace(/_/g,"/"),t=t.replace(/[^A-Za-z0-9+/]/g,""),new h([...atob(t)].map(r=>r.charCodeAt(0)));if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return new h([...t].map(r=>r.charCodeAt(0)));if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let r=new h(t.length*2),n=new DataView(r.buffer);for(let i=0;i<t.length;i++)n.setUint16(i*2,t.charCodeAt(i),!0);return r}if(e==="hex"){let r=new h(t.length/2);for(let n=0,i=0;i<t.length;i+=2,n++)r[n]=parseInt(t.slice(i,i+2),16);return r}dn(`encoding "${e}"`)}function ms(t){let r=Object.getOwnPropertyNames(DataView.prototype).filter(a=>a.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,f)=>function(g=0){return j(g,"offset"),Y(g,"offset"),Q(g,"offset",this.length-1),new DataView(this.buffer)[r[a]](g,f)},o=(a,f)=>function(g,C=0){let A=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),k=ds[A];return j(C,"offset"),Y(C,"offset"),Q(C,"offset",this.length-1),ps(g,"value",k[0],k[1]),new DataView(this.buffer)[r[a]](C,g,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 kt(t,e){if(!(t instanceof Uint8Array))throw new TypeError(`The "${e}" argument must be an instance of Buffer or Uint8Array`)}function Q(t,e,r=hs+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 j(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 Y(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 ps(t,e,r,n){if(t<r||t>n){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 bs(t,e="utf8"){return h.from(t,e)}var h,ds,fs,gs,ys,hs,w,Pr,u=ee(()=>{"use strict";h=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 ys.includes(e)}static compare(e,r){kt(e,"buff1"),kt(r,"buff2");for(let n=0;n<e.length;n++){if(e[n]<r[n])return-1;if(e[n]>r[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){j(e,"offset"),Y(e,"offset"),Q(e,"offset",this.length-1),j(r,"byteLength"),Y(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o<r;o++)i=i*256+n.getUint8(o);return n.getUint8(0)&128&&(i-=Math.pow(256,r)),i}readIntLE(e,r){j(e,"offset"),Y(e,"offset"),Q(e,"offset",this.length-1),j(r,"byteLength"),Y(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o<r;o++)i+=n.getUint8(o)*Math.pow(256,o);return n.getUint8(r-1)&128&&(i-=Math.pow(256,r)),i}readUIntBE(e,r){j(e,"offset"),Y(e,"offset"),Q(e,"offset",this.length-1),j(r,"byteLength"),Y(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o<r;o++)i=i*256+n.getUint8(o);return i}readUintBE(e,r){return this.readUIntBE(e,r)}readUIntLE(e,r){j(e,"offset"),Y(e,"offset"),Q(e,"offset",this.length-1),j(r,"byteLength"),Y(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o<r;o++)i+=n.getUint8(o)*Math.pow(256,o);return i}readUintLE(e,r){return this.readUIntLE(e,r)}writeIntBE(e,r,n){return e=e<0?e+Math.pow(256,n):e,this.writeUIntBE(e,r,n)}writeIntLE(e,r,n){return e=e<0?e+Math.pow(256,n):e,this.writeUIntLE(e,r,n)}writeUIntBE(e,r,n){j(r,"offset"),Y(r,"offset"),Q(r,"offset",this.length-1),j(n,"byteLength"),Y(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=n-1;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){j(r,"offset"),Y(r,"offset"),Q(r,"offset",this.length-1),j(n,"byteLength"),Y(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=0;o<n;o++)i.setUint8(o,e&255),e=e/256;return r+n}writeUintLE(e,r,n){return this.writeUIntLE(e,r,n)}toJSON(){return{type:"Buffer",data:Array.from(this)}}swap16(){let e=new DataView(this.buffer,this.byteOffset,this.byteLength);for(let r=0;r<this.length;r+=2)e.setUint16(r,e.getUint16(r,!0),!1);return this}swap32(){let e=new DataView(this.buffer,this.byteOffset,this.byteLength);for(let r=0;r<this.length;r+=4)e.setUint32(r,e.getUint32(r,!0),!1);return this}swap64(){let e=new DataView(this.buffer,this.byteOffset,this.byteLength);for(let r=0;r<this.length;r+=8)e.setBigUint64(r,e.getBigUint64(r,!0),!1);return this}compare(e,r=0,n=e.length,i=0,o=this.length){return kt(e,"target"),j(r,"targetStart"),j(n,"targetEnd"),j(i,"sourceStart"),j(o,"sourceEnd"),Q(r,"targetStart"),Q(n,"targetEnd",e.length),Q(i,"sourceStart"),Q(o,"sourceEnd",this.length),t.compare(this.slice(i,o),e.slice(r,n))}equals(e){return kt(e,"otherBuffer"),this.length===e.length&&this.every((r,n)=>r===e[n])}copy(e,r=0,n=0,i=this.length){Q(r,"targetStart"),Q(n,"sourceStart",this.length),Q(i,"sourceEnd"),r>>>=0,n>>>=0,i>>>=0;let o=0;for(;n<i&&!(this[n]===void 0||e[r]===void 0);)e[r]=this[n],o++,n++,r++;return o}write(e,r,n,i="utf8"){let o=typeof r=="string"?0:r??0,s=typeof n=="string"?this.length-o:n??this.length-o;return i=typeof r=="string"?r:typeof n=="string"?n:i,j(o,"offset"),j(s,"length"),Q(o,"offset",this.length),Q(s,"length",this.length),(i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")&&(s=s-s%2),Er(e,i).copy(this,o,0,s)}fill(e=0,r=0,n=this.length,i="utf-8"){let o=typeof r=="string"?0:r,s=typeof n=="string"?this.length:n;if(i=typeof r=="string"?r:typeof n=="string"?n:i,e=t.from(typeof e=="number"?[e]:e??[],i),pn(i,"encoding"),Q(o,"offset",this.length),Q(s,"end",this.length),e.length!==0)for(let a=o;a<s;a+=e.length)super.set(e.slice(0,e.length+a>=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,g)=>(i?g<=a:g>=a)&&this[g]===s[0]&&s.every((A,k)=>this[g+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 gs.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+1<i.byteLength?Pr(i.getUint16(s*2,!0)):"").join("")}if(e==="hex")return this.slice(r,n).reduce((i,o)=>i+o.toString(16).padStart(2,"0"),"");dn(`encoding "${e}"`)}toLocaleString(){return this.toString()}inspect(){return`<Buffer ${this.toString("hex").match(/.{1,2}/g).join(" ")}>`}};ds={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]},fs=new TextEncoder,gs=new TextDecoder,ys=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],hs=4294967295;ms(h.prototype);w=new Proxy(bs,{construct(t,[e,r]){return h.from(e,r)},get(t,e){return h[e]}}),Pr=String.fromCodePoint});var y,P,c=ee(()=>{"use strict";y={nextTick:(t,...e)=>{setTimeout(()=>{t(...e)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:P}=y});var v,m=ee(()=>{"use strict";v=globalThis.performance??(()=>{let t=Date.now();return{now:()=>Date.now()-t}})()});var E,p=ee(()=>{"use strict";E=()=>{};E.prototype=E});var x,d=ee(()=>{"use strict";x=class{value;constructor(e){this.value=e}deref(){return this.value}}});function hn(t,e){var r,n,i,o,s,a,f,g,C=t.constructor,A=C.precision;if(!t.s||!e.s)return e.s||(e=new C(t)),N?L(e,A):e;if(f=t.d,g=e.d,s=t.e,i=e.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=g.length):(n=g,i=s,a=f.length),s=Math.ceil(A/q),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=g.length,a-o<0&&(o=a,n=g,g=f,f=n),r=0;o;)r=(f[--o]=f[o]+g[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,N?L(e,A):e}function se(t,e,r){if(t!==~~t||t<e||t>r)throw Error(Ce+t)}function oe(t){var e,r,n,i=t.length-1,o="",s=t[0];if(i>0){for(o+=s,e=1;e<i;e++)n=t[e]+"",r=q-n.length,r&&(o+=he(r)),o+=n;s=t[e],n=s+"",r=q-n.length,r&&(o+=he(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return o+s}function bn(t,e){var r,n,i,o,s,a,f=0,g=0,C=t.constructor,A=C.precision;if($(t)>16)throw Error(Tr+$(t));if(!t.s)return new C(X);for(e==null?(N=!1,a=A):a=e,s=new C(.03125);t.abs().gte(.1);)t=t.times(s),g+=5;for(n=Math.log(Te(2,g))/Math.LN10*2+5|0,a+=n,r=i=o=new C(X),C.precision=a;;){if(i=L(i.times(t),a),r=r.times(++f),s=o.plus(fe(i,r,a)),oe(s.d).slice(0,a)===oe(o.d).slice(0,a)){for(;g--;)o=L(o.times(o),a);return C.precision=A,e==null?(N=!0,L(o,A)):o}o=s}}function $(t){for(var e=t.e*q,r=t.d[0];r>=10;r/=10)e++;return e}function vr(t,e,r){if(e>t.LN10.sd())throw N=!0,r&&(t.precision=r),Error(te+"LN10 precision limit exceeded");return L(new t(t.LN10),e)}function he(t){for(var e="";t--;)e+="0";return e}function at(t,e){var r,n,i,o,s,a,f,g,C,A=1,k=10,R=t,M=R.d,O=R.constructor,D=O.precision;if(R.s<1)throw Error(te+(R.s?"NaN":"-Infinity"));if(R.eq(X))return new O(0);if(e==null?(N=!1,g=D):g=e,R.eq(10))return e==null&&(N=!0),vr(O,g);if(g+=k,O.precision=g,r=oe(M),n=r.charAt(0),o=$(R),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(t),r=oe(R.d),n=r.charAt(0),A++;o=$(R),n>1?(R=new O("0."+r),o++):R=new O(n+"."+r.slice(1))}else return f=vr(O,g+2,D).times(o+""),R=at(new O(n+"."+r.slice(1)),g-k).plus(f),O.precision=D,e==null?(N=!0,L(R,D)):R;for(a=s=R=fe(R.minus(X),R.plus(X),g),C=L(R.times(R),g),i=3;;){if(s=L(s.times(C),g),f=a.plus(fe(s,new O(i),g)),oe(f.d).slice(0,g)===oe(a.d).slice(0,g))return a=a.times(2),o!==0&&(a=a.plus(vr(O,g+2,D).times(o+""))),a=fe(a,new O(A),g),O.precision=D,e==null?(N=!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=qe(r/q),t.d=[],n=(r+1)%q,r<0&&(n+=q),n<i){for(n&&t.d.push(+e.slice(0,n)),i-=q;n<i;)t.d.push(+e.slice(n,n+=q));e=e.slice(n),n=q-e.length}else n-=i;for(;n--;)e+="0";if(t.d.push(+e),N&&(t.e>Dt||t.e<-Dt))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,g,C,A=t.d;for(s=1,o=A[0];o>=10;o/=10)s++;if(n=e-s,n<0)n+=q,i=e,g=A[C=0];else{if(C=Math.ceil((n+1)/q),o=A.length,C>=o)return t;for(g=o=A[C],s=1;o>=10;o/=10)s++;n%=q,i=n-q+s}if(r!==void 0&&(o=Te(10,s-i-1),a=g/o%10|0,f=e<0||A[C+1]!==void 0||g%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?g/Te(10,s-i):0:A[C-1])%10&1||r==(t.s<0?8:7))),e<1||!A[0])return f?(o=$(t),A.length=1,e=e-o-1,A[0]=Te(10,(q-e%q)%q),t.e=qe(-e/q)||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=Te(10,q-n),A[C]=i>0?(g/Te(10,s-i)%Te(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(N&&(t.e>Dt||t.e<-Dt))throw Error(Tr+$(t));return t}function wn(t,e){var r,n,i,o,s,a,f,g,C,A,k=t.constructor,R=k.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new k(t),N?L(e,R):e;if(f=t.d,A=e.d,n=e.e,g=t.e,f=f.slice(),s=g-n,s){for(C=s<0,C?(r=f,s=-s,a=A.length):(r=A,n=g,a=f.length),i=Math.max(Math.ceil(R/q),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=i<a,C&&(a=i),i=0;i<a;i++)if(f[i]!=A[i]){C=f[i]<A[i];break}s=0}for(C&&(r=f,f=A,A=r,e.s=-e.s),a=f.length,i=A.length-a;i>0;--i)f[a++]=0;for(i=A.length;i>s;){if(f[--i]<A[i]){for(o=i;o&&f[--o]===0;)f[o]=J-1;--f[o],f[i]+=J}f[i]-=A[i]}for(;f[--a]===0;)f.pop();for(;f[0]===0;f.shift())--n;return f[0]?(e.d=f,e.e=n,N?L(e,R):e):new k(0)}function Ae(t,e,r){var n,i=$(t),o=oe(t.d),s=o.length;return e?(r&&(n=r-s)>0?o=o.charAt(0)+"."+o.slice(1)+he(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+he(-i-1)+o,r&&(n=r-s)>0&&(o+=he(n))):i>=s?(o+=he(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+he(n))):((n=i+1)<s&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(o+="."),o+=he(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(Ce+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(Ce+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,xs.test(o))fn(s,o);else throw Error(Ce+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=Es,t===void 0&&(t={}),t)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e<n.length;)t.hasOwnProperty(r=n[e++])||(t[r]=this[r]);return i.config(t),i}function Es(t){if(!t||typeof t!="object")throw Error(te+"Object expected");var e,r,n,i=["precision",1,Ue,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<i.length;e+=3)if((n=t[r=i[e]])!==void 0)if(qe(n)===n&&n>=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(Ce+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ce+r+": "+n);return this}var Ue,ws,Cr,N,te,Ce,Tr,qe,Te,xs,X,J,q,yn,Dt,S,fe,Cr,It,En=ee(()=>{"use strict";u();c();m();p();d();l();Ue=1e9,ws={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},N=!0,te="[DecimalError] ",Ce=te+"Invalid argument: ",Tr=te+"Exponent out of range: ",qe=Math.floor,Te=Math.pow,xs=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,J=1e7,q=7,yn=9007199254740991,Dt=qe(yn/q),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=n<i?n:i;e<r;++e)if(o.d[e]!==t.d[e])return o.d[e]>t.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)*q;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 fe(this,new this.constructor(t))};S.dividedToIntegerBy=S.idiv=function(t){var e=this,r=e.constructor;return L(fe(e,new r(t),0,1),r.precision)};S.equals=S.eq=function(t){return!this.cmp(t)};S.exponent=function(){return $(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(X))throw Error(te+"NaN");if(r.s<1)throw Error(te+(r.s?"NaN":"-Infinity"));return r.eq(X)?new n(0):(N=!1,e=fe(at(r,o),at(t,o),o),N=!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(te+"NaN");return r.s?(N=!1,e=fe(r,t,0,1).times(t),N=!0,r.minus(e)):L(new n(r),i)};S.naturalExponential=S.exp=function(){return bn(this)};S.naturalLogarithm=S.ln=function(){return at(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(Ce+t);if(e=$(i)+1,n=i.d.length-1,r=n*q+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(te+"NaN")}for(t=$(a),N=!1,i=Math.sqrt(+a),i==0||i==1/0?(e=oe(a.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=qe((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(fe(a,o,s+2)).times(.5),oe(o.d).slice(0,s)===(e=oe(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 N=!0,L(n,r)};S.times=S.mul=function(t){var e,r,n,i,o,s,a,f,g,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,g=R.length,f<g&&(o=k,k=R,R=o,s=f,f=g,g=s),o=[],s=f+g,n=s;n--;)o.push(0);for(n=g;--n>=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,N?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:(se(t,0,Ue),e===void 0?e=n.rounding:se(e,0,8),L(r,t+$(r)+1,e))};S.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=Ae(n,!0):(se(t,0,Ue),e===void 0?e=i.rounding:se(e,0,8),n=L(new i(n),t+1,e),r=Ae(n,!0,t+1)),r};S.toFixed=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?Ae(i):(se(t,0,Ue),e===void 0?e=o.rounding:se(e,0,8),n=L(new o(i),t+$(i)+1,e),r=Ae(n.abs(),!1,t+$(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};S.toInteger=S.toint=function(){var t=this,e=t.constructor;return L(new e(t),$(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,g=12,C=+(t=new f(t));if(!t.s)return new f(X);if(a=new f(a),!a.s){if(t.s<1)throw Error(te+"Infinity");return a}if(a.eq(X))return a;if(n=f.precision,t.eq(X))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(X),e=Math.ceil(n/q+4),N=!1;r%2&&(i=i.times(a),gn(i.d,e)),r=qe(r/2),r!==0;)a=a.times(a),gn(a.d,e);return N=!0,t.s<0?new f(X).div(i):L(i,n)}}else if(o<0)throw Error(te+"NaN");return o=o<0&&t.d[Math.max(e,r)]&1?-1:1,a.s=1,N=!1,i=t.times(at(a,n+g)),N=!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=$(i),n=Ae(i,r<=o.toExpNeg||r>=o.toExpPos)):(se(t,1,Ue),e===void 0?e=o.rounding:se(e,0,8),i=L(new o(i),t,e),r=$(i),n=Ae(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):(se(t,1,Ue),e===void 0?e=n.rounding:se(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=$(t),r=t.constructor;return Ae(t,e<=r.toExpNeg||e>=r.toExpPos)};fe=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;a<o;a++)if(n[a]!=i[a]){f=n[a]>i[a]?1:-1;break}return f}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]<i[o]?1:0,n[o]=s*J+n[o]-i[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,o,s){var a,f,g,C,A,k,R,M,O,D,de,H,_,z,ve,xr,re,At,Rt=n.constructor,is=n.s==i.s?1:-1,ie=n.d,V=i.d;if(!n.s)return new Rt(n);if(!i.s)throw Error(te+"Division by zero");for(f=n.e-i.e,re=V.length,ve=ie.length,R=new Rt(is),M=R.d=[],g=0;V[g]==(ie[g]||0);)++g;if(V[g]>(ie[g]||0)&&--f,o==null?H=o=Rt.precision:s?H=o+($(n)-$(i))+1:H=o,H<0)return new Rt(0);if(H=H/q+2|0,g=0,re==1)for(C=0,V=V[0],H++;(g<ve||C)&&H--;g++)_=C*J+(ie[g]||0),M[g]=_/V|0,C=_%V|0;else{for(C=J/(V[0]+1)|0,C>1&&(V=t(V,C),ie=t(ie,C),re=V.length,ve=ie.length),z=re,O=ie.slice(0,re),D=O.length;D<re;)O[D++]=0;At=V.slice(),At.unshift(0),xr=V[0],V[1]>=J/2&&++xr;do C=0,a=e(V,O,re,D),a<0?(de=O[0],re!=D&&(de=de*J+(O[1]||0)),C=de/xr|0,C>1?(C>=J&&(C=J-1),A=t(V,C),k=A.length,D=O.length,a=e(A,O,k,D),a==1&&(C--,r(A,re<k?At:V,k))):(C==0&&(a=C=1),A=V.slice()),k=A.length,k<D&&A.unshift(0),r(O,A,D),a==-1&&(D=O.length,a=e(V,O,re,D),a<1&&(C++,r(O,re<D?At:V,D))),D=O.length):a===0&&(C++,O=[0]),M[g++]=C,a&&O[0]?O[D++]=ie[z]||0:(O=[ie[z]],D=1);while((z++<ve||O[0]!==void 0)&&H--)}return M[0]||M.shift(),R.e=f,L(R,s?o+$(R)+1:o)}}();Cr=xn(ws);X=new Cr(1);It=Cr});var b,l=ee(()=>{"use strict";En();b=class extends It{static isDecimal(e){return e instanceof It}static random(e=20){{let n=globalThis.crypto.getRandomValues(new Uint8Array(e)).reduce((i,o)=>i+o,"");return new It(`0.${n.slice(0,e)}`)}}}});function Rs(){return!1}function Dr(){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 Ss(){return Dr()}function Os(){return[]}function ks(t){t(null,[])}function Ds(){return""}function Is(){return""}function Ms(){}function Ls(){}function _s(){}function Fs(){}function Us(){}function qs(){}function Ns(){}function Bs(){}function Vs(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function js(t,e){e(null,Dr())}var $s,Qs,Bn,Vn=ee(()=>{"use strict";u();c();m();p();d();l();$s={},Qs={existsSync:Rs,lstatSync:Dr,stat:js,statSync:Ss,readdirSync:Os,readdir:ks,readlinkSync:Ds,realpathSync:Is,chmodSync:Ms,renameSync:Ls,mkdirSync:_s,rmdirSync:Fs,rmSync:Us,unlinkSync:qs,watchFile:Ns,unwatchFile:Bs,watch:Vs,promises:$s},Bn=Qs});function Js(...t){return t.join("/")}function Gs(...t){return t.join("/")}function Ws(t){let e=jn(t),r=$n(t),[n,i]=e.split(".");return{root:"/",dir:r,base:e,ext:i,name:n}}function jn(t){let e=t.split("/");return e[e.length-1]}function $n(t){return t.split("/").slice(0,-1).join("/")}function Hs(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 Qn,Ks,zs,Ys,Ft,Jn=ee(()=>{"use strict";u();c();m();p();d();l();Qn="/",Ks=":";zs={sep:Qn},Ys={basename:jn,delimiter:Ks,dirname:$n,join:Gs,normalize:Hs,parse:Ws,posix:zs,resolve:Js,sep:Qn},Ft=Ys});var Gn=_e((hp,Xs)=>{Xs.exports={name:"@prisma/internals",version:"6.16.0-integration-feat-orm-1074-package-dev-export.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:{"@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.16.0-3.1ad4ad872cc519cc74e2896087a9b7d399d89b4d","@prisma/schema-engine-wasm":"6.16.0-3.1ad4ad872cc519cc74e2896087a9b7d399d89b4d","@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 Yn=_e((Od,zn)=>{"use strict";u();c();m();p();d();l();zn.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 ei=_e(($d,Zn)=>{"use strict";u();c();m();p();d();l();Zn.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 ri=_e((zd,ti)=>{"use strict";u();c();m();p();d();l();var la=ei();ti.exports=t=>typeof t=="string"?t.replace(la(),""):t});var Vr=_e((by,oi)=>{"use strict";u();c();m();p();d();l();oi.exports=function(){function t(e,r,n,i,o){return e<r||n<r?e>n?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<i&&e.charCodeAt(s)===r.charCodeAt(s);)s++;if(i-=s,o-=s,i===0||o<3)return o;var a=0,f,g,C,A,k,R,M,O,D,de,H,_,z=[];for(f=0;f<i;f++)z.push(f+1),z.push(e.charCodeAt(s+f));for(var ve=z.length-1;a<o-3;)for(D=r.charCodeAt(s+(g=a)),de=r.charCodeAt(s+(C=a+1)),H=r.charCodeAt(s+(A=a+2)),_=r.charCodeAt(s+(k=a+3)),R=a+=4,f=0;f<ve;f+=2)M=z[f],O=z[f+1],g=t(M,g,C,D,O),C=t(g,C,A,de,O),A=t(C,A,k,H,O),R=t(A,k,R,_,O),z[f]=R,k=A,A=C,C=g,g=M;for(;a<o;)for(D=r.charCodeAt(s+(g=a)),R=++a,f=0;f<ve;f+=2)M=z[f],z[f]=R=t(M,g,R,D,z[f+1]),g=M;return R}}()});var ci=ee(()=>{"use strict";u();c();m();p();d();l()});var mi=ee(()=>{"use strict";u();c();m();p();d();l()});var Ui=_e((lP,Za)=>{Za.exports={name:"@prisma/engines-version",version:"6.16.0-3.1ad4ad872cc519cc74e2896087a9b7d399d89b4d",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"1ad4ad872cc519cc74e2896087a9b7d399d89b4d"},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 nr,qi=ee(()=>{"use strict";u();c();m();p();d();l();nr=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 lu={};Fe(lu,{DMMF:()=>ft,Debug:()=>G,Decimal:()=>b,Extensions:()=>Ar,MetricsClient:()=>Ye,PrismaClientInitializationError:()=>ye.PrismaClientInitializationError,PrismaClientKnownRequestError:()=>Ie.PrismaClientKnownRequestError,PrismaClientRustPanicError:()=>it.PrismaClientRustPanicError,PrismaClientUnknownRequestError:()=>Me.PrismaClientUnknownRequestError,PrismaClientValidationError:()=>Le.PrismaClientValidationError,Public:()=>Rr,Sql:()=>pe.Sql,createParam:()=>Oi,defineDmmfProperty:()=>Fi,deserializeJsonResponse:()=>tt,deserializeRawResult:()=>br,dmmfToRuntimeDataModel:()=>An,empty:()=>pe.empty,getPrismaClient:()=>es,getRuntime:()=>Ee,join:()=>pe.join,makeStrictEnum:()=>ts,makeTypedQueryFactory:()=>Kr,objectEnumValues:()=>rs.objectEnumValues,raw:()=>pe.raw,serializeJsonQuery:()=>tr,skip:()=>Zt,sqltag:()=>pe.sqltag,warnEnvConflicts:()=>void 0,warnOnce:()=>pt});module.exports=cs(lu);u();c();m();p();d();l();var Ar={};Fe(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={};Fe(Rr,{validator:()=>Tn});u();c();m();p();d();l();u();c();m();p();d();l();function Tn(...t){return e=>e}var ye=require("./utilities"),Ie=require("./utilities"),it=require("./utilities"),Me=require("./utilities"),Le=require("./utilities");u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var ae=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 be(t){return t.substring(0,1).toLowerCase()+t.substring(1)}u();c();m();p();d();l();function Cn(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 lt(t){let e;return{get(){return e||(e={value:t()}),e.value}}}u();c();m();p();d();l();function An(t){return{models:Sr(t.models),enums:Sr(t.enums),types:Sr(t.types)}}function Sr(t){let e={};for(let{name:r,...n}of t)e[r]=n;return e}u();c();m();p();d();l();u();c();m();p();d();l();var Or,Rn,Sn,On,kn=!0;typeof y<"u"&&({FORCE_COLOR:Or,NODE_DISABLE_COLORS:Rn,NO_COLOR:Sn,TERM:On}=y.env||{},kn=y.stdout&&y.stdout.isTTY);var Ps={enabled:!Rn&&Sn==null&&On!=="dumb"&&(Or!=null&&Or!=="0"||kn)};function F(t,e){let r=new RegExp(`\\x1b\\[${e}m`,"g"),n=`\x1B[${t}m`,i=`\x1B[${e}m`;return function(o){return!Ps.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var am=F(0,0),Mt=F(1,22),Lt=F(2,22),lm=F(3,23),Dn=F(4,24),um=F(7,27),cm=F(8,28),mm=F(9,29),pm=F(30,39),Ne=F(31,39),In=F(32,39),Mn=F(33,39),Ln=F(34,39),dm=F(35,39),_n=F(36,39),fm=F(37,39),Fn=F(90,39),gm=F(90,39),ym=F(40,49),hm=F(41,49),bm=F(42,49),wm=F(43,49),xm=F(44,49),Em=F(45,49),Pm=F(46,49),vm=F(47,49);u();c();m();p();d();l();var vs=100,Un=["green","yellow","blue","magenta","cyan","red"],_t=[],qn=Date.now(),Ts=0,kr=typeof y<"u"?y.env:{};globalThis.DEBUG??=kr.DEBUG??"";globalThis.DEBUG_COLORS??=kr.DEBUG_COLORS?kr.DEBUG_COLORS==="true":!0;var ut={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 Cs(t){let e={color:Un[Ts++%Un.length],enabled:ut.enabled(t),namespace:t,log:ut.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=e;if(n.length!==0&&_t.push([o,...n]),_t.length>vs&&_t.shift(),ut.enabled(o)||i){let f=n.map(C=>typeof C=="string"?C:As(C)),g=`+${Date.now()-qn}ms`;qn=Date.now(),a(o,...f,g)}};return new Proxy(r,{get:(n,i)=>e[i],set:(n,i,o)=>e[i]=o})}var G=new Proxy(Cs,{get:(t,e)=>ut[e],set:(t,e,r)=>ut[e]=r});function As(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 Nn(){_t.length=0}u();c();m();p();d();l();u();c();m();p();d();l();var Ir=["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 Zs=Gn(),Mr=Zs.version;u();c();m();p();d();l();function Be(t){let e=ea();return e||(t?.config.engineType==="library"?"library":t?.config.engineType==="binary"?"binary":t?.config.engineType==="client"?"client":ta(t))}function ea(){let t=y.env.PRISMA_CLIENT_ENGINE_TYPE;return t==="library"?"library":t==="binary"?"binary":t==="client"?"client":void 0}function ta(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 Lr(t){return t.name==="DriverAdapterError"&&typeof t.cause=="object"}u();c();m();p();d();l();function Ut(t){return{ok:!0,value:t,map(e){return Ut(e(t))},flatMap(e){return e(t)}}}function Re(t){return{ok:!1,error:t,map(){return Re(t)},flatMap(){return Re(t)}}}var Wn=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:ge(e,t.queryRaw.bind(t)),executeRaw:ge(e,t.executeRaw.bind(t)),executeScript:ge(e,t.executeScript.bind(t)),dispose:ge(e,t.dispose.bind(t)),provider:t.provider,startTransaction:async(...n)=>(await ge(e,t.startTransaction.bind(t))(...n)).map(o=>ra(e,o))};return t.getConnectionInfo&&(r.getConnectionInfo=na(e,t.getConnectionInfo.bind(t))),r},ra=(t,e)=>({adapterName:e.adapterName,provider:e.provider,options:e.options,queryRaw:ge(t,e.queryRaw.bind(e)),executeRaw:ge(t,e.executeRaw.bind(e)),commit:ge(t,e.commit.bind(e)),rollback:ge(t,e.rollback.bind(e))});function ge(t,e){return async(...r)=>{try{return Ut(await e(...r))}catch(n){if(Wn("[error@wrapAsync]",n),Lr(n))return Re(n.cause);let i=t.registerNewError(n);return Re({kind:"GenericJs",id:i})}}}function na(t,e){return(...r)=>{try{return Ut(e(...r))}catch(n){if(Wn("[error@wrapSync]",n),Lr(n))return Re(n.cause);let i=t.registerNewError(n);return Re({kind:"GenericJs",id:i})}}}u();c();m();p();d();l();var Kn="prisma+postgres",Hn=`${Kn}:`;function Fr(t){return t?.toString().startsWith(`${Hn}//`)??!1}var mt={};Fe(mt,{error:()=>sa,info:()=>oa,log:()=>ia,query:()=>aa,should:()=>Xn,tags:()=>ct,warn:()=>Ur});u();c();m();p();d();l();var ct={error:Ne("prisma:error"),warn:Mn("prisma:warn"),info:_n("prisma:info"),query:Ln("prisma:query")},Xn={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function ia(...t){console.log(...t)}function Ur(t,...e){Xn.warn()&&console.warn(`${ct.warn} ${t}`,...e)}function oa(t,...e){console.info(`${ct.info} ${t}`,...e)}function sa(t,...e){console.error(`${ct.error} ${t}`,...e)}function aa(t,...e){console.log(`${ct.query} ${t}`,...e)}u();c();m();p();d();l();function Nt(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 Se(t,e){throw new Error(e)}u();c();m();p();d();l();function qr(t,e){return Object.prototype.hasOwnProperty.call(t,e)}u();c();m();p();d();l();function Bt(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<t.length;n++)e(r,t[n])<0&&(r=t[n]);return r}u();c();m();p();d();l();function Br(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0})}u();c();m();p();d();l();var ni=new Set,pt=(t,e,...r)=>{ni.has(t)||(ni.add(t),Ur(e,...r))};u();c();m();p();d();l();function Ve(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function Vt(t){return t.toString()!=="Invalid Date"}u();c();m();p();d();l();l();function je(t){return b.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 ft={};Fe(ft,{ModelAction:()=>dt,datamodelEnumToSchemaEnum:()=>ua});u();c();m();p();d();l();u();c();m();p();d();l();function ua(t){return{name:t.name,values:t.values.map(e=>e.name)}}u();c();m();p();d();l();var dt=(_=>(_.findUnique="findUnique",_.findUniqueOrThrow="findUniqueOrThrow",_.findFirst="findFirst",_.findFirstOrThrow="findFirstOrThrow",_.findMany="findMany",_.create="create",_.createMany="createMany",_.createManyAndReturn="createManyAndReturn",_.update="update",_.updateMany="updateMany",_.updateManyAndReturn="updateManyAndReturn",_.upsert="upsert",_.delete="delete",_.deleteMany="deleteMany",_.groupBy="groupBy",_.count="count",_.aggregate="aggregate",_.findRaw="findRaw",_.aggregateRaw="aggregateRaw",_))(dt||{});var ca=st(Yn());var ma={red:Ne,gray:Fn,dim:Lt,bold:Mt,underline:Dn,highlightSource:t=>t.highlight()},pa={red:t=>t,gray:t=>t,dim:t=>t,bold:t=>t,underline:t=>t,highlightSource:t=>t};function da({message:t,originalMethod:e,isPanic:r,callArguments:n}){return{functionName:`prisma.${e}()`,message:t,isPanic:r??!1,callArguments:n}}function fa({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(ga(e))),i){a.push("");let g=[i.toString()];o&&(g.push(o),g.push(s.dim(")"))),a.push(g.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(`
2
- `)}function ga(t){let e=[t.fileName];return t.lineNumber&&e.push(String(t.lineNumber)),t.columnNumber&&e.push(String(t.columnNumber)),e.join(":")}function jt(t){let e=t.showColors?ma:pa,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(t,e):r=da(t),fa(r,e)}var vi=require("./utilities");u();c();m();p();d();l();var di=st(Vr());u();c();m();p();d();l();function li(t,e,r){let n=ui(t),i=ya(n),o=ba(i);o?$t(o,e,r):e.addErrorMessage(()=>"Unknown error")}function ui(t){return t.errors.flatMap(e=>e.kind==="Union"?ui(e):[e])}function ya(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:ha(o.argument.typeNames,n.argument.typeNames)}}):e.set(i,n)}return r.push(...e.values()),r}function ha(t,e){return[...new Set(t.concat(e))]}function ba(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 Z=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;o<r.length;o++)n(r[o],this),o!==i&&this.write(e);return this}writeLine(e){return this.write(e).newLine()}newLine(){this.lines.push(this.indentedCurrentLine()),this.currentLine="",this.marginSymbol=void 0;let e=this.afterNextNewLineCallback;return this.afterNextNewLineCallback=void 0,e?.(),this}withIndent(e){return this.indent(),e(this),this.unindent(),this}afterNextNewline(e){return this.afterNextNewLineCallback=e,this}indent(){return this.currentIndent++,this}unindent(){return this.currentIndent>0&&this.currentIndent--,this}addMarginSymbol(e){return this.marginSymbol=e,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(`
1
+ "use strict";var os=Object.create;var Ot=Object.defineProperty;var ss=Object.getOwnPropertyDescriptor;var as=Object.getOwnPropertyNames;var ls=Object.getPrototypeOf,us=Object.prototype.hasOwnProperty;var ee=(t,e)=>()=>(t&&(e=t(t=0)),e);var _e=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Fe=(t,e)=>{for(var r in e)Ot(t,r,{get:e[r],enumerable:!0})},St=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of as(e))!us.call(t,i)&&i!==r&&Ot(t,i,{get:()=>e[i],enumerable:!(n=ss(e,i))||n.enumerable});return t},B=(t,e,r)=>(St(t,e,"default"),r&&St(r,e,"default")),st=(t,e,r)=>(r=t!=null?os(ls(t)):{},St(e||!t||!t.__esModule?Ot(r,"default",{value:t,enumerable:!0}):r,t)),cs=t=>St(Ot({},"__esModule",{value:!0}),t);function Er(t,e){if(e=e.toLowerCase(),e==="utf8"||e==="utf-8")return new h(fs.encode(t));if(e==="base64"||e==="base64url")return t=t.replace(/-/g,"+").replace(/_/g,"/"),t=t.replace(/[^A-Za-z0-9+/]/g,""),new h([...atob(t)].map(r=>r.charCodeAt(0)));if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return new h([...t].map(r=>r.charCodeAt(0)));if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let r=new h(t.length*2),n=new DataView(r.buffer);for(let i=0;i<t.length;i++)n.setUint16(i*2,t.charCodeAt(i),!0);return r}if(e==="hex"){let r=new h(t.length/2);for(let n=0,i=0;i<t.length;i+=2,n++)r[n]=parseInt(t.slice(i,i+2),16);return r}dn(`encoding "${e}"`)}function ms(t){let r=Object.getOwnPropertyNames(DataView.prototype).filter(a=>a.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,f)=>function(g=0){return j(g,"offset"),Y(g,"offset"),Q(g,"offset",this.length-1),new DataView(this.buffer)[r[a]](g,f)},o=(a,f)=>function(g,C=0){let A=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),k=ds[A];return j(C,"offset"),Y(C,"offset"),Q(C,"offset",this.length-1),ps(g,"value",k[0],k[1]),new DataView(this.buffer)[r[a]](C,g,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 kt(t,e){if(!(t instanceof Uint8Array))throw new TypeError(`The "${e}" argument must be an instance of Buffer or Uint8Array`)}function Q(t,e,r=hs+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 j(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 Y(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 ps(t,e,r,n){if(t<r||t>n){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 bs(t,e="utf8"){return h.from(t,e)}var h,ds,fs,gs,ys,hs,w,Pr,u=ee(()=>{"use strict";h=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 ys.includes(e)}static compare(e,r){kt(e,"buff1"),kt(r,"buff2");for(let n=0;n<e.length;n++){if(e[n]<r[n])return-1;if(e[n]>r[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){j(e,"offset"),Y(e,"offset"),Q(e,"offset",this.length-1),j(r,"byteLength"),Y(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o<r;o++)i=i*256+n.getUint8(o);return n.getUint8(0)&128&&(i-=Math.pow(256,r)),i}readIntLE(e,r){j(e,"offset"),Y(e,"offset"),Q(e,"offset",this.length-1),j(r,"byteLength"),Y(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o<r;o++)i+=n.getUint8(o)*Math.pow(256,o);return n.getUint8(r-1)&128&&(i-=Math.pow(256,r)),i}readUIntBE(e,r){j(e,"offset"),Y(e,"offset"),Q(e,"offset",this.length-1),j(r,"byteLength"),Y(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o<r;o++)i=i*256+n.getUint8(o);return i}readUintBE(e,r){return this.readUIntBE(e,r)}readUIntLE(e,r){j(e,"offset"),Y(e,"offset"),Q(e,"offset",this.length-1),j(r,"byteLength"),Y(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o<r;o++)i+=n.getUint8(o)*Math.pow(256,o);return i}readUintLE(e,r){return this.readUIntLE(e,r)}writeIntBE(e,r,n){return e=e<0?e+Math.pow(256,n):e,this.writeUIntBE(e,r,n)}writeIntLE(e,r,n){return e=e<0?e+Math.pow(256,n):e,this.writeUIntLE(e,r,n)}writeUIntBE(e,r,n){j(r,"offset"),Y(r,"offset"),Q(r,"offset",this.length-1),j(n,"byteLength"),Y(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=n-1;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){j(r,"offset"),Y(r,"offset"),Q(r,"offset",this.length-1),j(n,"byteLength"),Y(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=0;o<n;o++)i.setUint8(o,e&255),e=e/256;return r+n}writeUintLE(e,r,n){return this.writeUIntLE(e,r,n)}toJSON(){return{type:"Buffer",data:Array.from(this)}}swap16(){let e=new DataView(this.buffer,this.byteOffset,this.byteLength);for(let r=0;r<this.length;r+=2)e.setUint16(r,e.getUint16(r,!0),!1);return this}swap32(){let e=new DataView(this.buffer,this.byteOffset,this.byteLength);for(let r=0;r<this.length;r+=4)e.setUint32(r,e.getUint32(r,!0),!1);return this}swap64(){let e=new DataView(this.buffer,this.byteOffset,this.byteLength);for(let r=0;r<this.length;r+=8)e.setBigUint64(r,e.getBigUint64(r,!0),!1);return this}compare(e,r=0,n=e.length,i=0,o=this.length){return kt(e,"target"),j(r,"targetStart"),j(n,"targetEnd"),j(i,"sourceStart"),j(o,"sourceEnd"),Q(r,"targetStart"),Q(n,"targetEnd",e.length),Q(i,"sourceStart"),Q(o,"sourceEnd",this.length),t.compare(this.slice(i,o),e.slice(r,n))}equals(e){return kt(e,"otherBuffer"),this.length===e.length&&this.every((r,n)=>r===e[n])}copy(e,r=0,n=0,i=this.length){Q(r,"targetStart"),Q(n,"sourceStart",this.length),Q(i,"sourceEnd"),r>>>=0,n>>>=0,i>>>=0;let o=0;for(;n<i&&!(this[n]===void 0||e[r]===void 0);)e[r]=this[n],o++,n++,r++;return o}write(e,r,n,i="utf8"){let o=typeof r=="string"?0:r??0,s=typeof n=="string"?this.length-o:n??this.length-o;return i=typeof r=="string"?r:typeof n=="string"?n:i,j(o,"offset"),j(s,"length"),Q(o,"offset",this.length),Q(s,"length",this.length),(i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")&&(s=s-s%2),Er(e,i).copy(this,o,0,s)}fill(e=0,r=0,n=this.length,i="utf-8"){let o=typeof r=="string"?0:r,s=typeof n=="string"?this.length:n;if(i=typeof r=="string"?r:typeof n=="string"?n:i,e=t.from(typeof e=="number"?[e]:e??[],i),pn(i,"encoding"),Q(o,"offset",this.length),Q(s,"end",this.length),e.length!==0)for(let a=o;a<s;a+=e.length)super.set(e.slice(0,e.length+a>=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,g)=>(i?g<=a:g>=a)&&this[g]===s[0]&&s.every((A,k)=>this[g+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 gs.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+1<i.byteLength?Pr(i.getUint16(s*2,!0)):"").join("")}if(e==="hex")return this.slice(r,n).reduce((i,o)=>i+o.toString(16).padStart(2,"0"),"");dn(`encoding "${e}"`)}toLocaleString(){return this.toString()}inspect(){return`<Buffer ${this.toString("hex").match(/.{1,2}/g).join(" ")}>`}};ds={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]},fs=new TextEncoder,gs=new TextDecoder,ys=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],hs=4294967295;ms(h.prototype);w=new Proxy(bs,{construct(t,[e,r]){return h.from(e,r)},get(t,e){return h[e]}}),Pr=String.fromCodePoint});var y,P,c=ee(()=>{"use strict";y={nextTick:(t,...e)=>{setTimeout(()=>{t(...e)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:P}=y});var v,m=ee(()=>{"use strict";v=globalThis.performance??(()=>{let t=Date.now();return{now:()=>Date.now()-t}})()});var E,p=ee(()=>{"use strict";E=()=>{};E.prototype=E});var x,d=ee(()=>{"use strict";x=class{value;constructor(e){this.value=e}deref(){return this.value}}});function hn(t,e){var r,n,i,o,s,a,f,g,C=t.constructor,A=C.precision;if(!t.s||!e.s)return e.s||(e=new C(t)),N?L(e,A):e;if(f=t.d,g=e.d,s=t.e,i=e.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=g.length):(n=g,i=s,a=f.length),s=Math.ceil(A/q),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=g.length,a-o<0&&(o=a,n=g,g=f,f=n),r=0;o;)r=(f[--o]=f[o]+g[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,N?L(e,A):e}function se(t,e,r){if(t!==~~t||t<e||t>r)throw Error(Ce+t)}function oe(t){var e,r,n,i=t.length-1,o="",s=t[0];if(i>0){for(o+=s,e=1;e<i;e++)n=t[e]+"",r=q-n.length,r&&(o+=he(r)),o+=n;s=t[e],n=s+"",r=q-n.length,r&&(o+=he(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return o+s}function bn(t,e){var r,n,i,o,s,a,f=0,g=0,C=t.constructor,A=C.precision;if($(t)>16)throw Error(Tr+$(t));if(!t.s)return new C(X);for(e==null?(N=!1,a=A):a=e,s=new C(.03125);t.abs().gte(.1);)t=t.times(s),g+=5;for(n=Math.log(Te(2,g))/Math.LN10*2+5|0,a+=n,r=i=o=new C(X),C.precision=a;;){if(i=L(i.times(t),a),r=r.times(++f),s=o.plus(fe(i,r,a)),oe(s.d).slice(0,a)===oe(o.d).slice(0,a)){for(;g--;)o=L(o.times(o),a);return C.precision=A,e==null?(N=!0,L(o,A)):o}o=s}}function $(t){for(var e=t.e*q,r=t.d[0];r>=10;r/=10)e++;return e}function vr(t,e,r){if(e>t.LN10.sd())throw N=!0,r&&(t.precision=r),Error(te+"LN10 precision limit exceeded");return L(new t(t.LN10),e)}function he(t){for(var e="";t--;)e+="0";return e}function at(t,e){var r,n,i,o,s,a,f,g,C,A=1,k=10,R=t,M=R.d,O=R.constructor,D=O.precision;if(R.s<1)throw Error(te+(R.s?"NaN":"-Infinity"));if(R.eq(X))return new O(0);if(e==null?(N=!1,g=D):g=e,R.eq(10))return e==null&&(N=!0),vr(O,g);if(g+=k,O.precision=g,r=oe(M),n=r.charAt(0),o=$(R),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(t),r=oe(R.d),n=r.charAt(0),A++;o=$(R),n>1?(R=new O("0."+r),o++):R=new O(n+"."+r.slice(1))}else return f=vr(O,g+2,D).times(o+""),R=at(new O(n+"."+r.slice(1)),g-k).plus(f),O.precision=D,e==null?(N=!0,L(R,D)):R;for(a=s=R=fe(R.minus(X),R.plus(X),g),C=L(R.times(R),g),i=3;;){if(s=L(s.times(C),g),f=a.plus(fe(s,new O(i),g)),oe(f.d).slice(0,g)===oe(a.d).slice(0,g))return a=a.times(2),o!==0&&(a=a.plus(vr(O,g+2,D).times(o+""))),a=fe(a,new O(A),g),O.precision=D,e==null?(N=!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=qe(r/q),t.d=[],n=(r+1)%q,r<0&&(n+=q),n<i){for(n&&t.d.push(+e.slice(0,n)),i-=q;n<i;)t.d.push(+e.slice(n,n+=q));e=e.slice(n),n=q-e.length}else n-=i;for(;n--;)e+="0";if(t.d.push(+e),N&&(t.e>Dt||t.e<-Dt))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,g,C,A=t.d;for(s=1,o=A[0];o>=10;o/=10)s++;if(n=e-s,n<0)n+=q,i=e,g=A[C=0];else{if(C=Math.ceil((n+1)/q),o=A.length,C>=o)return t;for(g=o=A[C],s=1;o>=10;o/=10)s++;n%=q,i=n-q+s}if(r!==void 0&&(o=Te(10,s-i-1),a=g/o%10|0,f=e<0||A[C+1]!==void 0||g%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?g/Te(10,s-i):0:A[C-1])%10&1||r==(t.s<0?8:7))),e<1||!A[0])return f?(o=$(t),A.length=1,e=e-o-1,A[0]=Te(10,(q-e%q)%q),t.e=qe(-e/q)||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=Te(10,q-n),A[C]=i>0?(g/Te(10,s-i)%Te(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(N&&(t.e>Dt||t.e<-Dt))throw Error(Tr+$(t));return t}function wn(t,e){var r,n,i,o,s,a,f,g,C,A,k=t.constructor,R=k.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new k(t),N?L(e,R):e;if(f=t.d,A=e.d,n=e.e,g=t.e,f=f.slice(),s=g-n,s){for(C=s<0,C?(r=f,s=-s,a=A.length):(r=A,n=g,a=f.length),i=Math.max(Math.ceil(R/q),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=i<a,C&&(a=i),i=0;i<a;i++)if(f[i]!=A[i]){C=f[i]<A[i];break}s=0}for(C&&(r=f,f=A,A=r,e.s=-e.s),a=f.length,i=A.length-a;i>0;--i)f[a++]=0;for(i=A.length;i>s;){if(f[--i]<A[i]){for(o=i;o&&f[--o]===0;)f[o]=J-1;--f[o],f[i]+=J}f[i]-=A[i]}for(;f[--a]===0;)f.pop();for(;f[0]===0;f.shift())--n;return f[0]?(e.d=f,e.e=n,N?L(e,R):e):new k(0)}function Ae(t,e,r){var n,i=$(t),o=oe(t.d),s=o.length;return e?(r&&(n=r-s)>0?o=o.charAt(0)+"."+o.slice(1)+he(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+he(-i-1)+o,r&&(n=r-s)>0&&(o+=he(n))):i>=s?(o+=he(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+he(n))):((n=i+1)<s&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(o+="."),o+=he(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(Ce+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(Ce+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,xs.test(o))fn(s,o);else throw Error(Ce+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=Es,t===void 0&&(t={}),t)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e<n.length;)t.hasOwnProperty(r=n[e++])||(t[r]=this[r]);return i.config(t),i}function Es(t){if(!t||typeof t!="object")throw Error(te+"Object expected");var e,r,n,i=["precision",1,Ue,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<i.length;e+=3)if((n=t[r=i[e]])!==void 0)if(qe(n)===n&&n>=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(Ce+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ce+r+": "+n);return this}var Ue,ws,Cr,N,te,Ce,Tr,qe,Te,xs,X,J,q,yn,Dt,S,fe,Cr,It,En=ee(()=>{"use strict";u();c();m();p();d();l();Ue=1e9,ws={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},N=!0,te="[DecimalError] ",Ce=te+"Invalid argument: ",Tr=te+"Exponent out of range: ",qe=Math.floor,Te=Math.pow,xs=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,J=1e7,q=7,yn=9007199254740991,Dt=qe(yn/q),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=n<i?n:i;e<r;++e)if(o.d[e]!==t.d[e])return o.d[e]>t.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)*q;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 fe(this,new this.constructor(t))};S.dividedToIntegerBy=S.idiv=function(t){var e=this,r=e.constructor;return L(fe(e,new r(t),0,1),r.precision)};S.equals=S.eq=function(t){return!this.cmp(t)};S.exponent=function(){return $(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(X))throw Error(te+"NaN");if(r.s<1)throw Error(te+(r.s?"NaN":"-Infinity"));return r.eq(X)?new n(0):(N=!1,e=fe(at(r,o),at(t,o),o),N=!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(te+"NaN");return r.s?(N=!1,e=fe(r,t,0,1).times(t),N=!0,r.minus(e)):L(new n(r),i)};S.naturalExponential=S.exp=function(){return bn(this)};S.naturalLogarithm=S.ln=function(){return at(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(Ce+t);if(e=$(i)+1,n=i.d.length-1,r=n*q+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(te+"NaN")}for(t=$(a),N=!1,i=Math.sqrt(+a),i==0||i==1/0?(e=oe(a.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=qe((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(fe(a,o,s+2)).times(.5),oe(o.d).slice(0,s)===(e=oe(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 N=!0,L(n,r)};S.times=S.mul=function(t){var e,r,n,i,o,s,a,f,g,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,g=R.length,f<g&&(o=k,k=R,R=o,s=f,f=g,g=s),o=[],s=f+g,n=s;n--;)o.push(0);for(n=g;--n>=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,N?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:(se(t,0,Ue),e===void 0?e=n.rounding:se(e,0,8),L(r,t+$(r)+1,e))};S.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=Ae(n,!0):(se(t,0,Ue),e===void 0?e=i.rounding:se(e,0,8),n=L(new i(n),t+1,e),r=Ae(n,!0,t+1)),r};S.toFixed=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?Ae(i):(se(t,0,Ue),e===void 0?e=o.rounding:se(e,0,8),n=L(new o(i),t+$(i)+1,e),r=Ae(n.abs(),!1,t+$(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};S.toInteger=S.toint=function(){var t=this,e=t.constructor;return L(new e(t),$(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,g=12,C=+(t=new f(t));if(!t.s)return new f(X);if(a=new f(a),!a.s){if(t.s<1)throw Error(te+"Infinity");return a}if(a.eq(X))return a;if(n=f.precision,t.eq(X))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(X),e=Math.ceil(n/q+4),N=!1;r%2&&(i=i.times(a),gn(i.d,e)),r=qe(r/2),r!==0;)a=a.times(a),gn(a.d,e);return N=!0,t.s<0?new f(X).div(i):L(i,n)}}else if(o<0)throw Error(te+"NaN");return o=o<0&&t.d[Math.max(e,r)]&1?-1:1,a.s=1,N=!1,i=t.times(at(a,n+g)),N=!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=$(i),n=Ae(i,r<=o.toExpNeg||r>=o.toExpPos)):(se(t,1,Ue),e===void 0?e=o.rounding:se(e,0,8),i=L(new o(i),t,e),r=$(i),n=Ae(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):(se(t,1,Ue),e===void 0?e=n.rounding:se(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=$(t),r=t.constructor;return Ae(t,e<=r.toExpNeg||e>=r.toExpPos)};fe=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;a<o;a++)if(n[a]!=i[a]){f=n[a]>i[a]?1:-1;break}return f}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]<i[o]?1:0,n[o]=s*J+n[o]-i[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,o,s){var a,f,g,C,A,k,R,M,O,D,de,H,_,z,ve,xr,re,At,Rt=n.constructor,is=n.s==i.s?1:-1,ie=n.d,V=i.d;if(!n.s)return new Rt(n);if(!i.s)throw Error(te+"Division by zero");for(f=n.e-i.e,re=V.length,ve=ie.length,R=new Rt(is),M=R.d=[],g=0;V[g]==(ie[g]||0);)++g;if(V[g]>(ie[g]||0)&&--f,o==null?H=o=Rt.precision:s?H=o+($(n)-$(i))+1:H=o,H<0)return new Rt(0);if(H=H/q+2|0,g=0,re==1)for(C=0,V=V[0],H++;(g<ve||C)&&H--;g++)_=C*J+(ie[g]||0),M[g]=_/V|0,C=_%V|0;else{for(C=J/(V[0]+1)|0,C>1&&(V=t(V,C),ie=t(ie,C),re=V.length,ve=ie.length),z=re,O=ie.slice(0,re),D=O.length;D<re;)O[D++]=0;At=V.slice(),At.unshift(0),xr=V[0],V[1]>=J/2&&++xr;do C=0,a=e(V,O,re,D),a<0?(de=O[0],re!=D&&(de=de*J+(O[1]||0)),C=de/xr|0,C>1?(C>=J&&(C=J-1),A=t(V,C),k=A.length,D=O.length,a=e(A,O,k,D),a==1&&(C--,r(A,re<k?At:V,k))):(C==0&&(a=C=1),A=V.slice()),k=A.length,k<D&&A.unshift(0),r(O,A,D),a==-1&&(D=O.length,a=e(V,O,re,D),a<1&&(C++,r(O,re<D?At:V,D))),D=O.length):a===0&&(C++,O=[0]),M[g++]=C,a&&O[0]?O[D++]=ie[z]||0:(O=[ie[z]],D=1);while((z++<ve||O[0]!==void 0)&&H--)}return M[0]||M.shift(),R.e=f,L(R,s?o+$(R)+1:o)}}();Cr=xn(ws);X=new Cr(1);It=Cr});var b,l=ee(()=>{"use strict";En();b=class extends It{static isDecimal(e){return e instanceof It}static random(e=20){{let n=globalThis.crypto.getRandomValues(new Uint8Array(e)).reduce((i,o)=>i+o,"");return new It(`0.${n.slice(0,e)}`)}}}});function Rs(){return!1}function Dr(){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 Ss(){return Dr()}function Os(){return[]}function ks(t){t(null,[])}function Ds(){return""}function Is(){return""}function Ms(){}function Ls(){}function _s(){}function Fs(){}function Us(){}function qs(){}function Ns(){}function Bs(){}function Vs(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function js(t,e){e(null,Dr())}var $s,Qs,Bn,Vn=ee(()=>{"use strict";u();c();m();p();d();l();$s={},Qs={existsSync:Rs,lstatSync:Dr,stat:js,statSync:Ss,readdirSync:Os,readdir:ks,readlinkSync:Ds,realpathSync:Is,chmodSync:Ms,renameSync:Ls,mkdirSync:_s,rmdirSync:Fs,rmSync:Us,unlinkSync:qs,watchFile:Ns,unwatchFile:Bs,watch:Vs,promises:$s},Bn=Qs});function Js(...t){return t.join("/")}function Gs(...t){return t.join("/")}function Ws(t){let e=jn(t),r=$n(t),[n,i]=e.split(".");return{root:"/",dir:r,base:e,ext:i,name:n}}function jn(t){let e=t.split("/");return e[e.length-1]}function $n(t){return t.split("/").slice(0,-1).join("/")}function Hs(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 Qn,Ks,zs,Ys,Ft,Jn=ee(()=>{"use strict";u();c();m();p();d();l();Qn="/",Ks=":";zs={sep:Qn},Ys={basename:jn,delimiter:Ks,dirname:$n,join:Gs,normalize:Hs,parse:Ws,posix:zs,resolve:Js,sep:Qn},Ft=Ys});var Gn=_e((hp,Xs)=>{Xs.exports={name:"@prisma/internals",version:"6.16.0-integration-feat-orm-1074-package-dev-export.3",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:{"@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.16.0-3.1ad4ad872cc519cc74e2896087a9b7d399d89b4d","@prisma/schema-engine-wasm":"6.16.0-3.1ad4ad872cc519cc74e2896087a9b7d399d89b4d","@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 Yn=_e((Od,zn)=>{"use strict";u();c();m();p();d();l();zn.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 ei=_e(($d,Zn)=>{"use strict";u();c();m();p();d();l();Zn.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 ri=_e((zd,ti)=>{"use strict";u();c();m();p();d();l();var la=ei();ti.exports=t=>typeof t=="string"?t.replace(la(),""):t});var Vr=_e((by,oi)=>{"use strict";u();c();m();p();d();l();oi.exports=function(){function t(e,r,n,i,o){return e<r||n<r?e>n?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<i&&e.charCodeAt(s)===r.charCodeAt(s);)s++;if(i-=s,o-=s,i===0||o<3)return o;var a=0,f,g,C,A,k,R,M,O,D,de,H,_,z=[];for(f=0;f<i;f++)z.push(f+1),z.push(e.charCodeAt(s+f));for(var ve=z.length-1;a<o-3;)for(D=r.charCodeAt(s+(g=a)),de=r.charCodeAt(s+(C=a+1)),H=r.charCodeAt(s+(A=a+2)),_=r.charCodeAt(s+(k=a+3)),R=a+=4,f=0;f<ve;f+=2)M=z[f],O=z[f+1],g=t(M,g,C,D,O),C=t(g,C,A,de,O),A=t(C,A,k,H,O),R=t(A,k,R,_,O),z[f]=R,k=A,A=C,C=g,g=M;for(;a<o;)for(D=r.charCodeAt(s+(g=a)),R=++a,f=0;f<ve;f+=2)M=z[f],z[f]=R=t(M,g,R,D,z[f+1]),g=M;return R}}()});var ci=ee(()=>{"use strict";u();c();m();p();d();l()});var mi=ee(()=>{"use strict";u();c();m();p();d();l()});var Ui=_e((lP,Za)=>{Za.exports={name:"@prisma/engines-version",version:"6.16.0-3.1ad4ad872cc519cc74e2896087a9b7d399d89b4d",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"1ad4ad872cc519cc74e2896087a9b7d399d89b4d"},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 nr,qi=ee(()=>{"use strict";u();c();m();p();d();l();nr=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 lu={};Fe(lu,{DMMF:()=>ft,Debug:()=>G,Decimal:()=>b,Extensions:()=>Ar,MetricsClient:()=>Ye,PrismaClientInitializationError:()=>ye.PrismaClientInitializationError,PrismaClientKnownRequestError:()=>Ie.PrismaClientKnownRequestError,PrismaClientRustPanicError:()=>it.PrismaClientRustPanicError,PrismaClientUnknownRequestError:()=>Me.PrismaClientUnknownRequestError,PrismaClientValidationError:()=>Le.PrismaClientValidationError,Public:()=>Rr,Sql:()=>pe.Sql,createParam:()=>Oi,defineDmmfProperty:()=>Fi,deserializeJsonResponse:()=>tt,deserializeRawResult:()=>br,dmmfToRuntimeDataModel:()=>An,empty:()=>pe.empty,getPrismaClient:()=>es,getRuntime:()=>Ee,join:()=>pe.join,makeStrictEnum:()=>ts,makeTypedQueryFactory:()=>Kr,objectEnumValues:()=>rs.objectEnumValues,raw:()=>pe.raw,serializeJsonQuery:()=>tr,skip:()=>Zt,sqltag:()=>pe.sqltag,warnEnvConflicts:()=>void 0,warnOnce:()=>pt});module.exports=cs(lu);u();c();m();p();d();l();var Ar={};Fe(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={};Fe(Rr,{validator:()=>Tn});u();c();m();p();d();l();u();c();m();p();d();l();function Tn(...t){return e=>e}var ye=require("./utilities.js"),Ie=require("./utilities.js"),it=require("./utilities.js"),Me=require("./utilities.js"),Le=require("./utilities.js");u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var ae=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 be(t){return t.substring(0,1).toLowerCase()+t.substring(1)}u();c();m();p();d();l();function Cn(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 lt(t){let e;return{get(){return e||(e={value:t()}),e.value}}}u();c();m();p();d();l();function An(t){return{models:Sr(t.models),enums:Sr(t.enums),types:Sr(t.types)}}function Sr(t){let e={};for(let{name:r,...n}of t)e[r]=n;return e}u();c();m();p();d();l();u();c();m();p();d();l();var Or,Rn,Sn,On,kn=!0;typeof y<"u"&&({FORCE_COLOR:Or,NODE_DISABLE_COLORS:Rn,NO_COLOR:Sn,TERM:On}=y.env||{},kn=y.stdout&&y.stdout.isTTY);var Ps={enabled:!Rn&&Sn==null&&On!=="dumb"&&(Or!=null&&Or!=="0"||kn)};function F(t,e){let r=new RegExp(`\\x1b\\[${e}m`,"g"),n=`\x1B[${t}m`,i=`\x1B[${e}m`;return function(o){return!Ps.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var am=F(0,0),Mt=F(1,22),Lt=F(2,22),lm=F(3,23),Dn=F(4,24),um=F(7,27),cm=F(8,28),mm=F(9,29),pm=F(30,39),Ne=F(31,39),In=F(32,39),Mn=F(33,39),Ln=F(34,39),dm=F(35,39),_n=F(36,39),fm=F(37,39),Fn=F(90,39),gm=F(90,39),ym=F(40,49),hm=F(41,49),bm=F(42,49),wm=F(43,49),xm=F(44,49),Em=F(45,49),Pm=F(46,49),vm=F(47,49);u();c();m();p();d();l();var vs=100,Un=["green","yellow","blue","magenta","cyan","red"],_t=[],qn=Date.now(),Ts=0,kr=typeof y<"u"?y.env:{};globalThis.DEBUG??=kr.DEBUG??"";globalThis.DEBUG_COLORS??=kr.DEBUG_COLORS?kr.DEBUG_COLORS==="true":!0;var ut={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 Cs(t){let e={color:Un[Ts++%Un.length],enabled:ut.enabled(t),namespace:t,log:ut.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=e;if(n.length!==0&&_t.push([o,...n]),_t.length>vs&&_t.shift(),ut.enabled(o)||i){let f=n.map(C=>typeof C=="string"?C:As(C)),g=`+${Date.now()-qn}ms`;qn=Date.now(),a(o,...f,g)}};return new Proxy(r,{get:(n,i)=>e[i],set:(n,i,o)=>e[i]=o})}var G=new Proxy(Cs,{get:(t,e)=>ut[e],set:(t,e,r)=>ut[e]=r});function As(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 Nn(){_t.length=0}u();c();m();p();d();l();u();c();m();p();d();l();var Ir=["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 Zs=Gn(),Mr=Zs.version;u();c();m();p();d();l();function Be(t){let e=ea();return e||(t?.config.engineType==="library"?"library":t?.config.engineType==="binary"?"binary":t?.config.engineType==="client"?"client":ta(t))}function ea(){let t=y.env.PRISMA_CLIENT_ENGINE_TYPE;return t==="library"?"library":t==="binary"?"binary":t==="client"?"client":void 0}function ta(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 Lr(t){return t.name==="DriverAdapterError"&&typeof t.cause=="object"}u();c();m();p();d();l();function Ut(t){return{ok:!0,value:t,map(e){return Ut(e(t))},flatMap(e){return e(t)}}}function Re(t){return{ok:!1,error:t,map(){return Re(t)},flatMap(){return Re(t)}}}var Wn=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:ge(e,t.queryRaw.bind(t)),executeRaw:ge(e,t.executeRaw.bind(t)),executeScript:ge(e,t.executeScript.bind(t)),dispose:ge(e,t.dispose.bind(t)),provider:t.provider,startTransaction:async(...n)=>(await ge(e,t.startTransaction.bind(t))(...n)).map(o=>ra(e,o))};return t.getConnectionInfo&&(r.getConnectionInfo=na(e,t.getConnectionInfo.bind(t))),r},ra=(t,e)=>({adapterName:e.adapterName,provider:e.provider,options:e.options,queryRaw:ge(t,e.queryRaw.bind(e)),executeRaw:ge(t,e.executeRaw.bind(e)),commit:ge(t,e.commit.bind(e)),rollback:ge(t,e.rollback.bind(e))});function ge(t,e){return async(...r)=>{try{return Ut(await e(...r))}catch(n){if(Wn("[error@wrapAsync]",n),Lr(n))return Re(n.cause);let i=t.registerNewError(n);return Re({kind:"GenericJs",id:i})}}}function na(t,e){return(...r)=>{try{return Ut(e(...r))}catch(n){if(Wn("[error@wrapSync]",n),Lr(n))return Re(n.cause);let i=t.registerNewError(n);return Re({kind:"GenericJs",id:i})}}}u();c();m();p();d();l();var Kn="prisma+postgres",Hn=`${Kn}:`;function Fr(t){return t?.toString().startsWith(`${Hn}//`)??!1}var mt={};Fe(mt,{error:()=>sa,info:()=>oa,log:()=>ia,query:()=>aa,should:()=>Xn,tags:()=>ct,warn:()=>Ur});u();c();m();p();d();l();var ct={error:Ne("prisma:error"),warn:Mn("prisma:warn"),info:_n("prisma:info"),query:Ln("prisma:query")},Xn={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function ia(...t){console.log(...t)}function Ur(t,...e){Xn.warn()&&console.warn(`${ct.warn} ${t}`,...e)}function oa(t,...e){console.info(`${ct.info} ${t}`,...e)}function sa(t,...e){console.error(`${ct.error} ${t}`,...e)}function aa(t,...e){console.log(`${ct.query} ${t}`,...e)}u();c();m();p();d();l();function Nt(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 Se(t,e){throw new Error(e)}u();c();m();p();d();l();function qr(t,e){return Object.prototype.hasOwnProperty.call(t,e)}u();c();m();p();d();l();function Bt(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<t.length;n++)e(r,t[n])<0&&(r=t[n]);return r}u();c();m();p();d();l();function Br(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0})}u();c();m();p();d();l();var ni=new Set,pt=(t,e,...r)=>{ni.has(t)||(ni.add(t),Ur(e,...r))};u();c();m();p();d();l();function Ve(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function Vt(t){return t.toString()!=="Invalid Date"}u();c();m();p();d();l();l();function je(t){return b.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 ft={};Fe(ft,{ModelAction:()=>dt,datamodelEnumToSchemaEnum:()=>ua});u();c();m();p();d();l();u();c();m();p();d();l();function ua(t){return{name:t.name,values:t.values.map(e=>e.name)}}u();c();m();p();d();l();var dt=(_=>(_.findUnique="findUnique",_.findUniqueOrThrow="findUniqueOrThrow",_.findFirst="findFirst",_.findFirstOrThrow="findFirstOrThrow",_.findMany="findMany",_.create="create",_.createMany="createMany",_.createManyAndReturn="createManyAndReturn",_.update="update",_.updateMany="updateMany",_.updateManyAndReturn="updateManyAndReturn",_.upsert="upsert",_.delete="delete",_.deleteMany="deleteMany",_.groupBy="groupBy",_.count="count",_.aggregate="aggregate",_.findRaw="findRaw",_.aggregateRaw="aggregateRaw",_))(dt||{});var ca=st(Yn());var ma={red:Ne,gray:Fn,dim:Lt,bold:Mt,underline:Dn,highlightSource:t=>t.highlight()},pa={red:t=>t,gray:t=>t,dim:t=>t,bold:t=>t,underline:t=>t,highlightSource:t=>t};function da({message:t,originalMethod:e,isPanic:r,callArguments:n}){return{functionName:`prisma.${e}()`,message:t,isPanic:r??!1,callArguments:n}}function fa({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(ga(e))),i){a.push("");let g=[i.toString()];o&&(g.push(o),g.push(s.dim(")"))),a.push(g.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(`
2
+ `)}function ga(t){let e=[t.fileName];return t.lineNumber&&e.push(String(t.lineNumber)),t.columnNumber&&e.push(String(t.columnNumber)),e.join(":")}function jt(t){let e=t.showColors?ma:pa,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(t,e):r=da(t),fa(r,e)}var vi=require("./utilities.js");u();c();m();p();d();l();var di=st(Vr());u();c();m();p();d();l();function li(t,e,r){let n=ui(t),i=ya(n),o=ba(i);o?$t(o,e,r):e.addErrorMessage(()=>"Unknown error")}function ui(t){return t.errors.flatMap(e=>e.kind==="Union"?ui(e):[e])}function ya(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:ha(o.argument.typeNames,n.argument.typeNames)}}):e.set(i,n)}return r.push(...e.values()),r}function ha(t,e){return[...new Set(t.concat(e))]}function ba(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 Z=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;o<r.length;o++)n(r[o],this),o!==i&&this.write(e);return this}writeLine(e){return this.write(e).newLine()}newLine(){this.lines.push(this.indentedCurrentLine()),this.currentLine="",this.marginSymbol=void 0;let e=this.afterNextNewLineCallback;return this.afterNextNewLineCallback=void 0,e?.(),this}withIndent(e){return this.indent(),e(this),this.unindent(),this}afterNextNewline(e){return this.afterNextNewLineCallback=e,this}indent(){return this.currentIndent++,this}unindent(){return this.currentIndent>0&&this.currentIndent--,this}addMarginSymbol(e){return this.marginSymbol=e,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(`
3
3
  `)}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 Qt=class{constructor(e){this.value=e}write(e){e.write(this.value)}markAsError(){this.value.markAsError()}};u();c();m();p();d();l();var Jt=t=>t,Gt={bold:Jt,red:Jt,green:Jt,dim:Jt,enabled:!1},pi={bold:Mt,red:Ne,green:In,dim:Lt,enabled:!0},Qe={write(t){t.writeLine(",")}};u();c();m();p();d();l();var le=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 we=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var Je=class extends we{items=[];addItem(e){return this.items.push(new Qt(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 le("[]");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 we{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 le("{}");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 we{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new le(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};u();c();m();p();d();l();var gt=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 $t(t,e,r){switch(t.kind){case"MutuallyExclusiveFields":wa(t,e);break;case"IncludeOnScalar":xa(t,e);break;case"EmptySelection":Ea(t,e,r);break;case"UnknownSelectionField":Ca(t,e);break;case"InvalidSelectionValue":Aa(t,e);break;case"UnknownArgument":Ra(t,e);break;case"UnknownInputField":Sa(t,e);break;case"RequiredArgumentMissing":Oa(t,e);break;case"InvalidArgumentType":ka(t,e);break;case"InvalidArgumentValue":Da(t,e);break;case"ValueTooLarge":Ia(t,e);break;case"SomeFieldsMissing":Ma(t,e);break;case"TooManyFieldsGiven":La(t,e);break;case"Union":li(t,e,r);break;default:throw new Error("not implemented: "+t.kind)}}function wa(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 xa(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 Z(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)}. ${yt(s)}`:a+=".",a+=`
4
- Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Ea(t,e,r){let n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Pa(t,e,i);return}if(n.hasField("select")){va(t,e);return}}if(r?.[be(t.outputType.name)]){Ta(t,e);return}e.addErrorMessage(()=>`Unknown field at "${t.selectionPath.join(".")} selection"`)}function Pa(t,e,r){r.removeAllFields();for(let n of t.outputType.fields)r.addSuggestion(new Z(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 va(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. ${yt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Ta(t,e){let r=new gt;for(let i of t.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new Z("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 Ca(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":_a(n,t.outputType);break;case"omit":Fa(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(yt(n)),i.join(" ")})}function Aa(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 Ra(t,e){let r=t.argumentPath[0],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Ua(n,t.arguments)),e.addErrorMessage(i=>fi(i,r,t.arguments.map(o=>o.name)))}function Sa(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=Na(e,r);return i&&n.push(`Did you mean \`${t.green(i)}\`?`),r.length>0&&n.push(yt(t)),n.join(" ")}function Oa(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 gt,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 Z(o,s).makeRequired())}else{let f=t.inputTypes.map(gi).join(" | ");a.addSuggestion(new Z(o,f).makeRequired())}if(t.dependentArgumentPath){n.getDeepField(t.dependentArgumentPath)?.markAsError();let[,f]=We(t.dependentArgumentPath);e.addErrorMessage(g=>`Argument \`${g.green(o)}\` is required because argument \`${g.green(f)}\` was provided.`)}}}function gi(t){return t.kind==="list"?`${gi(t.elementType)}[]`:t.name}function ka(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=Wt("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 Da(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=Wt("or",t.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Ia(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 Ma(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")} ${Wt("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(yt(i)),o.join(" ")})}function La(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 ${Wt("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 Z(r.name,"true"))}function _a(t,e){for(let r of e.fields)r.isRelation&&!t.hasField(r.name)&&t.addSuggestion(new Z(r.name,"true"))}function Fa(t,e){for(let r of e.fields)!t.hasField(r.name)&&!r.isRelation&&t.addSuggestion(new Z(r.name,"true"))}function Ua(t,e){for(let r of e)t.hasField(r.name)||t.addSuggestion(new Z(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 Z(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 yt({green:t,enabled:e}){return"Available options are "+(e?`listed in ${t("green")}`:"marked with ?")+"."}function Wt(t,e){if(e.length===1)return e[0];let r=[...e],n=r.pop();return`${r.join(", ")} ${t} ${n}`}var qa=3;function Na(t,e){let r=1/0,n;for(let i of e){let o=(0,di.default)(t,i);o>qa||o<r&&(r=o,n=i)}return n}u();c();m();p();d();l();u();c();m();p();d();l();var ht=class{modelName;name;typeName;isList;isEnum;constructor(e,r,n,i,o){this.modelName=e,this.name=r,this.typeName=n,this.isList=i,this.isEnum=o}_toGraphQLInputType(){let e=this.isList?"List":"",r=this.isEnum?"Enum":"";return`${e}${r}${this.typeName}FieldRefInput<${this.modelName}>`}};function Ke(t){return t instanceof ht}var xi=require("./utilities");u();c();m();p();d();l();var wi=": ",Kt=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 le(this.name);this.hasError&&r.underline().setColor(e.context.colors.red),e.write(r).write(wi).write(this.value)}};var $r=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(`
5
- `)}};function He(t){return new $r(Ei(t))}function Ei(t){let e=new Ge;for(let[r,n]of Object.entries(t)){let i=new Kt(r,Pi(n));e.addField(i)}return e}function Pi(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 w.isBuffer(t)?new W(`Buffer.alloc(${t.byteLength})`):new W(`new Uint8Array(${t.byteLength})`);if(t instanceof Date){let e=Vt(t)?t.toISOString():"Invalid Date";return new W(`new Date("${e}")`)}return t instanceof xi.ObjectEnumValue?new W(`Prisma.${t._getName()}`):Ke(t)?new W(`prisma.${be(t.modelName)}.$fields.${t.name}`):Array.isArray(t)?Ba(t):typeof t=="object"?Ei(t):new W(Object.prototype.toString.call(t))}function Ba(t){let e=new Je;for(let r of t)e.addItem(Pi(r));return e}function Ht(t,e){let r=e==="pretty"?pi:Gt,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)$t(A,a,s);let{message:f,args:g}=Ht(a,r),C=jt({message:f,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:g});throw new vi.PrismaClientValidationError(C,{clientVersion:o})}u();c();m();p();d();l();u();c();m();p();d();l();function ue(t){return t.replace(/^./,e=>e.toLowerCase())}u();c();m();p();d();l();function Ci(t,e,r){let n=ue(r);return!e.result||!(e.result.$allModels||e.result[n])?t:Va({...t,...Ti(e.name,t,e.result.$allModels),...Ti(e.name,t,e.result[n])})}function Va(t){let e=new ae,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 Bt(t,n=>({...n,needs:r(n.name,new Set)}))}function Ti(t,e,r){return r?Bt(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:ja(e,o,i)})):{}}function ja(t,e,r){let n=t?.[e]?.compute;return n?i=>r({...i,[e]:n(i)}):r}function Ai(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 Ri(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 Yt=class{constructor(e,r){this.extension=e;this.previous=r}computedFieldsCache=new ae;modelExtensionsCache=new ae;queryCallbacksCache=new ae;clientExtensions=lt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=lt(()=>{let e=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?e.concat(r):e});getAllComputedFields(e){return this.computedFieldsCache.getOrCreate(e,()=>Ci(this.previous?.getAllComputedFields(e),this.extension,e))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(e){return this.modelExtensionsCache.getOrCreate(e,()=>{let r=ue(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 Yt(e))}isEmpty(){return this.head===void 0}append(e){return new t(new Yt(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 Xt=class{constructor(e){this.name=e}};function Si(t){return t instanceof Xt}function Oi(t){return new Xt(t)}u();c();m();p();d();l();u();c();m();p();d();l();var ki=Symbol(),bt=class{constructor(e){if(e!==ki)throw new Error("Skip instance can not be constructed directly")}ifUndefined(e){return e===void 0?Zt:e}},Zt=new bt(ki);function ce(t){return t instanceof bt}var er=require("./utilities"),$a={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"},Di="explicitly `undefined` values are not allowed";function tr({modelName:t,action:e,args:r,runtimeDataModel:n,extensions:i=ze.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:f,previewFeatures:g,globalOmit:C}){let A=new Qr({runtimeDataModel:n,modelName:t,action:e,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:f,previewFeatures:g,globalOmit:C});return{modelName:t,action:$a[e],query:wt(r,A)}}function wt({select:t,include:e,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Mi(r,n),selection:Qa(t,e,i,n)}}function Qa(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()}),Ka(t,n)):Ja(n,e,r)}function Ja(t,e,r){let n={};return t.modelOrType&&!t.isRawAction()&&(n.$composites=!0,n.$scalars=!0),e&&Ga(n,e,t),Wa(n,r,t),n}function Ga(t,e,r){for(let[n,i]of Object.entries(e)){if(ce(i))continue;let o=r.nestSelection(n);if(Jr(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]=wt(i===!0?{}:i,o);continue}if(i===!0){t[n]=!0;continue}t[n]=wt(i,o)}}function Wa(t,e,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...e},o=Ri(i,n);for(let[s,a]of Object.entries(o)){if(ce(a))continue;Jr(a,r.nestSelection(s));let f=r.findField(s);n?.[s]&&!f||(t[s]=!a)}}function Ka(t,e){let r={},n=e.getComputedFields(),i=Ai(t,n);for(let[o,s]of Object.entries(i)){if(ce(s))continue;let a=e.nestSelection(o);Jr(s,a);let f=e.findField(o);if(!(n?.[o]&&!f)){if(s===!1||s===void 0||ce(s)){r[o]=!1;continue}if(s===!0){f?.kind==="object"?r[o]=wt({},a):r[o]=!0;continue}r[o]=wt(s,a)}}return r}function Ii(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(Vt(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(Si(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 Ha(t,e);if(ArrayBuffer.isView(t)){let{buffer:r,byteOffset:n,byteLength:i}=t;return{$type:"Bytes",value:w.from(r,n,i).toString("base64")}}if(za(t))return t.values;if(je(t))return{$type:"Decimal",value:t.toFixed()};if(t instanceof er.ObjectEnumValue){if(t!==er.objectEnumValues.instances[t._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:t._getName()}}if(Ya(t))return t.toJSON();if(typeof t=="object")return Mi(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 Mi(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);ce(i)||(i!==void 0?r[n]=Ii(i,o):e.isPreviewFeatureOn("strictUndefinedChecks")&&e.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:e.getSelectionPath(),argument:{name:e.getArgumentName(),typeNames:[]},underlyingError:Di}))}return r}function Ha(t,e){let r=[];for(let n=0;n<t.length;n++){let i=e.nestArgument(String(n)),o=t[n];if(o===void 0||ce(o)){let s=o===void 0?"undefined":"Prisma.skip";e.throwValidationError({kind:"InvalidArgumentValue",selectionPath:i.getSelectionPath(),argumentPath:i.getArgumentPath(),argument:{name:`${e.getArgumentName()}[${n}]`,typeNames:[]},underlyingError:`Can not use \`${s}\` value within array. Use \`null\` or filter out \`${s}\` values`})}r.push(Ii(o,i))}return r}function za(t){return typeof t=="object"&&t!==null&&t.__prismaRawParameters__===!0}function Ya(t){return typeof t=="object"&&t!==null&&typeof t.toJSON=="function"}function Jr(t,e){t===void 0&&e.isPreviewFeatureOn("strictUndefinedChecks")&&e.throwValidationError({kind:"InvalidSelectionValue",selectionPath:e.getSelectionPath(),underlyingError:Di})}var Qr=class t{constructor(e){this.params=e;this.params.modelName&&(this.modelOrType=this.params.runtimeDataModel.models[this.params.modelName]??this.params.runtimeDataModel.types[this.params.modelName])}modelOrType;throwValidationError(e){zt({errors:[e],originalMethod:this.params.originalMethod,args:this.params.rootArgs??{},callsite:this.params.callsite,errorFormat:this.params.errorFormat,clientVersion:this.params.clientVersion,globalOmit:this.params.globalOmit})}getSelectionPath(){return this.params.selectionPath}getArgumentPath(){return this.params.argumentPath}getArgumentName(){return this.params.argumentPath[this.params.argumentPath.length-1]}getOutputTypeDescription(){if(!(!this.params.modelName||!this.modelOrType))return{name:this.params.modelName,fields:this.modelOrType.fields.map(e=>({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?.[be(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:Se(this.params.action,"Unknown action")}}nestArgument(e){return new t({...this.params,argumentPath:this.params.argumentPath.concat(e)})}};u();c();m();p();d();l();var _i=require("./utilities");function Li(t){if(!t._hasPreviewFlag("metrics"))throw new _i.PrismaClientValidationError("`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 Li(this._client),this._client._engine.metrics({format:"prometheus",...e})}json(e){return Li(this._client),this._client._engine.metrics({format:"json",...e})}};u();c();m();p();d();l();function Fi(t,e){let r=lt(()=>Xa(e));Object.defineProperty(t,"dmmf",{get:()=>r.get()})}function Xa(t){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Gr(t){return Object.entries(t).map(([e,r])=>({name:e,...r}))}var rs=require("./utilities");u();c();m();p();d();l();var Wr=new WeakMap,rr="$$PrismaTypedSql",Xe=class{constructor(e,r){Wr.set(this,{sql:e,values:r}),Object.defineProperty(this,rr,{value:rr})}get sql(){return Wr.get(this).sql}get values(){return Wr.get(this).values}};function Kr(t){return(...e)=>new Xe(t,e)}function xt(t){return t!=null&&t[rr]===rr}u();c();m();p();d();l();var Xo=st(Ui());u();c();m();p();d();l();qi();Vn();Jn();var Zo=require("./utilities");u();c();m();p();d();l();u();c();m();p();d();l();function Et(t){return{getKeys(){return Object.keys(t)},getPropertyValue(e){return t[e]}}}u();c();m();p();d();l();function K(t,e){return{getKeys(){return[t]},getPropertyValue(){return e()}}}u();c();m();p();d();l();function Oe(t){let e=new ae;return{getKeys(){return t.getKeys()},getPropertyValue(r){return e.getOrCreate(r,()=>t.getPropertyValue(r))},getPropertyDescriptor(r){return t.getPropertyDescriptor?.(r)}}}u();c();m();p();d();l();u();c();m();p();d();l();var ir={enumerable:!0,configurable:!0,writable:!0};function or(t){let e=new Set(t);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>ir,has:(r,n)=>e.has(n),set:(r,n,i)=>e.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...e]}}var Ni=Symbol.for("nodejs.util.inspect.custom");function ne(t,e){let r=el(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?{...ir,...f?.getPropertyDescriptor(s)}:ir:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Ni]=function(){let o={...this};return delete o[Ni],o},i}function el(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 Ze(t){return{getKeys(){return t},has(){return!1},getPropertyValue(){}}}u();c();m();p();d();l();function sr(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:Gt}).write(e).toString()}u();c();m();p();d();l();var ji=require("./utilities"),$i=require("./utilities"),tl="P2037";function ar({error:t,user_facing_error:e},r,n){return e.error_code?new ji.PrismaClientKnownRequestError(rl(e,n),{code:e.error_code,clientVersion:r,meta:e.meta,batchRequestIdx:e.batch_request_idx}):new $i.PrismaClientUnknownRequestError(t,{clientVersion:r,batchRequestIdx:e.batch_request_idx})}function rl(t,e){let r=t.message;return(e==="postgresql"||e==="postgres"||e==="mysql")&&t.error_code===tl&&(r+=`
6
- 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 Hr=class{getLocation(){return null}};function xe(t){return typeof $EnabledCallSite=="function"&&t!=="minimal"?new $EnabledCallSite:new Hr}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Qi={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function et(t={}){let e=il(t);return Object.entries(e).reduce((n,[i,o])=>(Qi[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function il(t={}){return typeof t._count=="boolean"?{...t,_count:{_all:t._count}}:t}function lr(t={}){return e=>(typeof t._count=="boolean"&&(e._count=e._count._all),e)}function Ji(t,e){let r=lr(t);return e({action:"aggregate",unpacker:r,argsMapper:et})(t)}u();c();m();p();d();l();function ol(t={}){let{select:e,...r}=t;return typeof e=="object"?et({...r,_count:e}):et({...r,_count:{_all:!0}})}function sl(t={}){return typeof t.select=="object"?e=>lr(t)(e)._count:e=>lr(t)(e)._count._all}function Gi(t,e){return e({action:"count",unpacker:sl(t),argsMapper:ol})(t)}u();c();m();p();d();l();function al(t={}){let e=et(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 ll(t={}){return e=>(typeof t?._count=="boolean"&&e.forEach(r=>{r._count=r._count._all}),e)}function Wi(t,e){return e({action:"groupBy",unpacker:ll(t),argsMapper:al})(t)}function Ki(t,e,r){if(e==="aggregate")return n=>Ji(n,r);if(e==="count")return n=>Gi(n,r);if(e==="groupBy")return n=>Wi(n,r)}u();c();m();p();d();l();function Hi(t,e){let r=e.fields.filter(i=>!i.relationName),n=Cn(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 ht(t,o,s.type,s.isList,s.kind==="enum")},...or(Object.keys(n))})}u();c();m();p();d();l();u();c();m();p();d();l();var zi=t=>Array.isArray(t)?t:t.split("."),zr=(t,e)=>zi(e).reduce((r,n)=>r&&r[n],t),Yi=(t,e,r)=>zi(e).reduceRight((n,i,o,s)=>Object.assign({},zr(t,s.slice(0,o)),{[i]:n}),r);function ul(t,e){return t===void 0||e===void 0?[]:[...e,"select",t]}function cl(t,e,r){return e===void 0?t??{}:Yi(e,r,t||!0)}function Yr(t,e,r,n,i,o){let a=t._runtimeDataModel.models[e].fields.reduce((f,g)=>({...f,[g.name]:g}),{});return f=>{let g=xe(t._errorFormat),C=ul(n,i),A=cl(f,o,C),k=r({dataPath:C,callsite:g})(A),R=ml(t,e);return new Proxy(k,{get(M,O){if(!R.includes(O))return M[O];let de=[a[O].type,r,O],H=[C,A];return Yr(t,...de,...H)},...or([...R,...Object.getOwnPropertyNames(k)])})}}function ml(t,e){return t._runtimeDataModel.models[e].fields.filter(r=>r.kind==="object").map(r=>r.name)}var pl=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],dl=["aggregate","count","groupBy"];function Xr(t,e){let r=t._extensions.getAllModelExtensions(e)??{},n=[fl(t,e),yl(t,e),Et(r),K("name",()=>e),K("$name",()=>e),K("$parent",()=>t._appliedParent)];return ne({},n)}function fl(t,e){let r=ue(e),n=Object.keys(dt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>f=>{let g=xe(t._errorFormat);return t._createPrismaPromise(C=>{let A={args:f,dataPath:[],action:o,model:e,clientMethod:`${r}.${i}`,jsModelName:r,transaction:C,callsite:g};return t._request({...A,...a})},{action:o,args:f,model:e})};return pl.includes(o)?Yr(t,e,s):gl(i)?Ki(t,i,s):s({})}}}function gl(t){return dl.includes(t)}function yl(t,e){return Oe(K("fields",()=>{let r=t._runtimeDataModel.models[e];return Hi(e,r)}))}u();c();m();p();d();l();function Xi(t){return t.replace(/^./,e=>e.toUpperCase())}var Zr=Symbol();function Pt(t){let e=[hl(t),bl(t),K(Zr,()=>t),K("$parent",()=>t._appliedParent)],r=t._extensions.getAllClientExtensions();return r&&e.push(Et(r)),ne(t,e)}function hl(t){let e=Object.getPrototypeOf(t._originalClient),r=[...new Set(Object.getOwnPropertyNames(e))];return{getKeys(){return r},getPropertyValue(n){return t[n]}}}function bl(t){let e=Object.keys(t._runtimeDataModel.models),r=e.map(ue),n=[...new Set(e.concat(r))];return Oe({getKeys(){return n},getPropertyValue(i){let o=Xi(i);if(t._runtimeDataModel.models[o]!==void 0)return Xr(t,o);if(t._runtimeDataModel.models[i]!==void 0)return Xr(t,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Zi(t){return t[Zr]?t[Zr]:t}function eo(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 Pt(e)}u();c();m();p();d();l();u();c();m();p();d();l();function to({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 g=f.needs.filter(C=>n[C]);g.length>0&&a.push(Ze(g))}else if(r){if(!r[f.name])continue;let g=f.needs.filter(C=>!r[C]);g.length>0&&a.push(Ze(g))}wl(t,f.needs)&&s.push(xl(f,ne(t,s)))}return s.length>0||a.length>0?ne(t,[...s,...a]):t}function wl(t,e){return e.every(r=>qr(t,r))}function xl(t,e){return Oe(K(t.name,()=>t.compute(e)))}u();c();m();p();d();l();function ur({visitor:t,result:e,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(e)){for(let s=0;s<e.length;s++)e[s]=ur({result:e[s],args:r,modelName:i,runtimeDataModel:n,visitor:t});return e}let o=t(e,i,r)??e;return r.include&&ro({includeOrSelect:r.include,result:o,parentModelName:i,runtimeDataModel:n,visitor:t}),r.select&&ro({includeOrSelect:r.select,result:o,parentModelName:i,runtimeDataModel:n,visitor:t}),o}function ro({includeOrSelect:t,result:e,parentModelName:r,runtimeDataModel:n,visitor:i}){for(let[o,s]of Object.entries(t)){if(!s||e[o]==null||ce(s))continue;let f=n.models[r].fields.find(C=>C.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let g=typeof s=="object"?s:{};e[o]=ur({visitor:i,result:e[o],args:g,modelName:f.type,runtimeDataModel:n})}}function no({result:t,modelName:e,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||t==null||typeof t!="object"||!i.models[e]?t:ur({result:t,args:r??{},modelName:e,runtimeDataModel:i,visitor:(a,f,g)=>{let C=ue(f);return to({result:a,modelName:C,select:g.select,omit:g.select?void 0:{...o?.[C],...g.omit},extensions:n})}})}u();c();m();p();d();l();u();c();m();p();d();l();l();var tn=require("./utilities");var U={};Fe(U,{Param:()=>Pl,TypedSql:()=>Xe,isTypedSql:()=>xt,itxClientDenyList:()=>en,makeTypedQueryFactory:()=>Kr});u();c();m();p();d();l();u();c();m();p();d();l();var El=["$connect","$disconnect","$on","$transaction","$extends"],en=El;B(U,require("./utilities"));u();c();m();p();d();l();function Pl(t){return{name:t}}var io=require("./utilities");function oo(t){if(t instanceof tn.Sql)return vl(t);if(xt(t))return Tl(t);if(Array.isArray(t)){let r=[t[0]];for(let n=1;n<t.length;n++)r[n]=vt(t[n]);return r}let e={};for(let r in t)e[r]=vt(t[r]);return e}function vl(t){return new tn.Sql(t.strings,t.values)}function Tl(t){return new Xe(t.sql,t.values)}function vt(t){if(typeof t!="object"||t==null||t instanceof io.ObjectEnumValue||Ke(t))return t;if(je(t))return new b(t.toFixed());if(Ve(t))return new Date(+t);if(ArrayBuffer.isView(t))return t.slice(0);if(Array.isArray(t)){let e=t.length,r;for(r=Array(e);e--;)r[e]=vt(t[e]);return r}if(typeof t=="object"){let e={};for(let r in t)r==="__proto__"?Object.defineProperty(e,r,{value:vt(t[r]),configurable:!0,enumerable:!0,writable:!0}):e[r]=vt(t[r]);return e}Se(t,"Unknown value")}function ao(t,e,r,n=0){return t._createPrismaPromise(i=>{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:oo(e.args??{}),__internalParams:e,query:(s,a=e)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=mo(o,f),a.args=s,ao(t,a,r,n+1)}})})}function lo(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 ao(t,e,s)}function uo(t){return e=>{let r={requests:e},n=e[0].extensions.getAllBatchQueryCallbacks();return n.length?co(r,n,0,t):t(r)}}function co(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=mo(i,f),co(a,e,r+1,n)}})}var so=t=>t;function mo(t=so,e=so){return r=>t(e(r))}u();c();m();p();d();l();var go=require("./utilities"),po=G("prisma:client"),fo={Vercel:"vercel","Netlify CI":"netlify"};function yo({postinstall:t,ciName:e,clientVersion:r}){if(po("checkPlatformCaching:postinstall",t),po("checkPlatformCaching:ciName",e),t===!0&&e&&e in fo){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.
4
+ Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Ea(t,e,r){let n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Pa(t,e,i);return}if(n.hasField("select")){va(t,e);return}}if(r?.[be(t.outputType.name)]){Ta(t,e);return}e.addErrorMessage(()=>`Unknown field at "${t.selectionPath.join(".")} selection"`)}function Pa(t,e,r){r.removeAllFields();for(let n of t.outputType.fields)r.addSuggestion(new Z(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 va(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. ${yt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Ta(t,e){let r=new gt;for(let i of t.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new Z("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 Ca(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":_a(n,t.outputType);break;case"omit":Fa(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(yt(n)),i.join(" ")})}function Aa(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 Ra(t,e){let r=t.argumentPath[0],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Ua(n,t.arguments)),e.addErrorMessage(i=>fi(i,r,t.arguments.map(o=>o.name)))}function Sa(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=Na(e,r);return i&&n.push(`Did you mean \`${t.green(i)}\`?`),r.length>0&&n.push(yt(t)),n.join(" ")}function Oa(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 gt,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 Z(o,s).makeRequired())}else{let f=t.inputTypes.map(gi).join(" | ");a.addSuggestion(new Z(o,f).makeRequired())}if(t.dependentArgumentPath){n.getDeepField(t.dependentArgumentPath)?.markAsError();let[,f]=We(t.dependentArgumentPath);e.addErrorMessage(g=>`Argument \`${g.green(o)}\` is required because argument \`${g.green(f)}\` was provided.`)}}}function gi(t){return t.kind==="list"?`${gi(t.elementType)}[]`:t.name}function ka(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=Wt("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 Da(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=Wt("or",t.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Ia(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 Ma(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")} ${Wt("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(yt(i)),o.join(" ")})}function La(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 ${Wt("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 Z(r.name,"true"))}function _a(t,e){for(let r of e.fields)r.isRelation&&!t.hasField(r.name)&&t.addSuggestion(new Z(r.name,"true"))}function Fa(t,e){for(let r of e.fields)!t.hasField(r.name)&&!r.isRelation&&t.addSuggestion(new Z(r.name,"true"))}function Ua(t,e){for(let r of e)t.hasField(r.name)||t.addSuggestion(new Z(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 Z(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 yt({green:t,enabled:e}){return"Available options are "+(e?`listed in ${t("green")}`:"marked with ?")+"."}function Wt(t,e){if(e.length===1)return e[0];let r=[...e],n=r.pop();return`${r.join(", ")} ${t} ${n}`}var qa=3;function Na(t,e){let r=1/0,n;for(let i of e){let o=(0,di.default)(t,i);o>qa||o<r&&(r=o,n=i)}return n}u();c();m();p();d();l();u();c();m();p();d();l();var ht=class{modelName;name;typeName;isList;isEnum;constructor(e,r,n,i,o){this.modelName=e,this.name=r,this.typeName=n,this.isList=i,this.isEnum=o}_toGraphQLInputType(){let e=this.isList?"List":"",r=this.isEnum?"Enum":"";return`${e}${r}${this.typeName}FieldRefInput<${this.modelName}>`}};function Ke(t){return t instanceof ht}var xi=require("./utilities.js");u();c();m();p();d();l();var wi=": ",Kt=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 le(this.name);this.hasError&&r.underline().setColor(e.context.colors.red),e.write(r).write(wi).write(this.value)}};var $r=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(`
5
+ `)}};function He(t){return new $r(Ei(t))}function Ei(t){let e=new Ge;for(let[r,n]of Object.entries(t)){let i=new Kt(r,Pi(n));e.addField(i)}return e}function Pi(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 w.isBuffer(t)?new W(`Buffer.alloc(${t.byteLength})`):new W(`new Uint8Array(${t.byteLength})`);if(t instanceof Date){let e=Vt(t)?t.toISOString():"Invalid Date";return new W(`new Date("${e}")`)}return t instanceof xi.ObjectEnumValue?new W(`Prisma.${t._getName()}`):Ke(t)?new W(`prisma.${be(t.modelName)}.$fields.${t.name}`):Array.isArray(t)?Ba(t):typeof t=="object"?Ei(t):new W(Object.prototype.toString.call(t))}function Ba(t){let e=new Je;for(let r of t)e.addItem(Pi(r));return e}function Ht(t,e){let r=e==="pretty"?pi:Gt,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)$t(A,a,s);let{message:f,args:g}=Ht(a,r),C=jt({message:f,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:g});throw new vi.PrismaClientValidationError(C,{clientVersion:o})}u();c();m();p();d();l();u();c();m();p();d();l();function ue(t){return t.replace(/^./,e=>e.toLowerCase())}u();c();m();p();d();l();function Ci(t,e,r){let n=ue(r);return!e.result||!(e.result.$allModels||e.result[n])?t:Va({...t,...Ti(e.name,t,e.result.$allModels),...Ti(e.name,t,e.result[n])})}function Va(t){let e=new ae,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 Bt(t,n=>({...n,needs:r(n.name,new Set)}))}function Ti(t,e,r){return r?Bt(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:ja(e,o,i)})):{}}function ja(t,e,r){let n=t?.[e]?.compute;return n?i=>r({...i,[e]:n(i)}):r}function Ai(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 Ri(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 Yt=class{constructor(e,r){this.extension=e;this.previous=r}computedFieldsCache=new ae;modelExtensionsCache=new ae;queryCallbacksCache=new ae;clientExtensions=lt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=lt(()=>{let e=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?e.concat(r):e});getAllComputedFields(e){return this.computedFieldsCache.getOrCreate(e,()=>Ci(this.previous?.getAllComputedFields(e),this.extension,e))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(e){return this.modelExtensionsCache.getOrCreate(e,()=>{let r=ue(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 Yt(e))}isEmpty(){return this.head===void 0}append(e){return new t(new Yt(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 Xt=class{constructor(e){this.name=e}};function Si(t){return t instanceof Xt}function Oi(t){return new Xt(t)}u();c();m();p();d();l();u();c();m();p();d();l();var ki=Symbol(),bt=class{constructor(e){if(e!==ki)throw new Error("Skip instance can not be constructed directly")}ifUndefined(e){return e===void 0?Zt:e}},Zt=new bt(ki);function ce(t){return t instanceof bt}var er=require("./utilities.js"),$a={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"},Di="explicitly `undefined` values are not allowed";function tr({modelName:t,action:e,args:r,runtimeDataModel:n,extensions:i=ze.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:f,previewFeatures:g,globalOmit:C}){let A=new Qr({runtimeDataModel:n,modelName:t,action:e,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:f,previewFeatures:g,globalOmit:C});return{modelName:t,action:$a[e],query:wt(r,A)}}function wt({select:t,include:e,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Mi(r,n),selection:Qa(t,e,i,n)}}function Qa(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()}),Ka(t,n)):Ja(n,e,r)}function Ja(t,e,r){let n={};return t.modelOrType&&!t.isRawAction()&&(n.$composites=!0,n.$scalars=!0),e&&Ga(n,e,t),Wa(n,r,t),n}function Ga(t,e,r){for(let[n,i]of Object.entries(e)){if(ce(i))continue;let o=r.nestSelection(n);if(Jr(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]=wt(i===!0?{}:i,o);continue}if(i===!0){t[n]=!0;continue}t[n]=wt(i,o)}}function Wa(t,e,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...e},o=Ri(i,n);for(let[s,a]of Object.entries(o)){if(ce(a))continue;Jr(a,r.nestSelection(s));let f=r.findField(s);n?.[s]&&!f||(t[s]=!a)}}function Ka(t,e){let r={},n=e.getComputedFields(),i=Ai(t,n);for(let[o,s]of Object.entries(i)){if(ce(s))continue;let a=e.nestSelection(o);Jr(s,a);let f=e.findField(o);if(!(n?.[o]&&!f)){if(s===!1||s===void 0||ce(s)){r[o]=!1;continue}if(s===!0){f?.kind==="object"?r[o]=wt({},a):r[o]=!0;continue}r[o]=wt(s,a)}}return r}function Ii(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(Vt(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(Si(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 Ha(t,e);if(ArrayBuffer.isView(t)){let{buffer:r,byteOffset:n,byteLength:i}=t;return{$type:"Bytes",value:w.from(r,n,i).toString("base64")}}if(za(t))return t.values;if(je(t))return{$type:"Decimal",value:t.toFixed()};if(t instanceof er.ObjectEnumValue){if(t!==er.objectEnumValues.instances[t._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:t._getName()}}if(Ya(t))return t.toJSON();if(typeof t=="object")return Mi(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 Mi(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);ce(i)||(i!==void 0?r[n]=Ii(i,o):e.isPreviewFeatureOn("strictUndefinedChecks")&&e.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:e.getSelectionPath(),argument:{name:e.getArgumentName(),typeNames:[]},underlyingError:Di}))}return r}function Ha(t,e){let r=[];for(let n=0;n<t.length;n++){let i=e.nestArgument(String(n)),o=t[n];if(o===void 0||ce(o)){let s=o===void 0?"undefined":"Prisma.skip";e.throwValidationError({kind:"InvalidArgumentValue",selectionPath:i.getSelectionPath(),argumentPath:i.getArgumentPath(),argument:{name:`${e.getArgumentName()}[${n}]`,typeNames:[]},underlyingError:`Can not use \`${s}\` value within array. Use \`null\` or filter out \`${s}\` values`})}r.push(Ii(o,i))}return r}function za(t){return typeof t=="object"&&t!==null&&t.__prismaRawParameters__===!0}function Ya(t){return typeof t=="object"&&t!==null&&typeof t.toJSON=="function"}function Jr(t,e){t===void 0&&e.isPreviewFeatureOn("strictUndefinedChecks")&&e.throwValidationError({kind:"InvalidSelectionValue",selectionPath:e.getSelectionPath(),underlyingError:Di})}var Qr=class t{constructor(e){this.params=e;this.params.modelName&&(this.modelOrType=this.params.runtimeDataModel.models[this.params.modelName]??this.params.runtimeDataModel.types[this.params.modelName])}modelOrType;throwValidationError(e){zt({errors:[e],originalMethod:this.params.originalMethod,args:this.params.rootArgs??{},callsite:this.params.callsite,errorFormat:this.params.errorFormat,clientVersion:this.params.clientVersion,globalOmit:this.params.globalOmit})}getSelectionPath(){return this.params.selectionPath}getArgumentPath(){return this.params.argumentPath}getArgumentName(){return this.params.argumentPath[this.params.argumentPath.length-1]}getOutputTypeDescription(){if(!(!this.params.modelName||!this.modelOrType))return{name:this.params.modelName,fields:this.modelOrType.fields.map(e=>({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?.[be(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:Se(this.params.action,"Unknown action")}}nestArgument(e){return new t({...this.params,argumentPath:this.params.argumentPath.concat(e)})}};u();c();m();p();d();l();var _i=require("./utilities.js");function Li(t){if(!t._hasPreviewFlag("metrics"))throw new _i.PrismaClientValidationError("`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 Li(this._client),this._client._engine.metrics({format:"prometheus",...e})}json(e){return Li(this._client),this._client._engine.metrics({format:"json",...e})}};u();c();m();p();d();l();function Fi(t,e){let r=lt(()=>Xa(e));Object.defineProperty(t,"dmmf",{get:()=>r.get()})}function Xa(t){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Gr(t){return Object.entries(t).map(([e,r])=>({name:e,...r}))}var rs=require("./utilities.js");u();c();m();p();d();l();var Wr=new WeakMap,rr="$$PrismaTypedSql",Xe=class{constructor(e,r){Wr.set(this,{sql:e,values:r}),Object.defineProperty(this,rr,{value:rr})}get sql(){return Wr.get(this).sql}get values(){return Wr.get(this).values}};function Kr(t){return(...e)=>new Xe(t,e)}function xt(t){return t!=null&&t[rr]===rr}u();c();m();p();d();l();var Xo=st(Ui());u();c();m();p();d();l();qi();Vn();Jn();var Zo=require("./utilities.js");u();c();m();p();d();l();u();c();m();p();d();l();function Et(t){return{getKeys(){return Object.keys(t)},getPropertyValue(e){return t[e]}}}u();c();m();p();d();l();function K(t,e){return{getKeys(){return[t]},getPropertyValue(){return e()}}}u();c();m();p();d();l();function Oe(t){let e=new ae;return{getKeys(){return t.getKeys()},getPropertyValue(r){return e.getOrCreate(r,()=>t.getPropertyValue(r))},getPropertyDescriptor(r){return t.getPropertyDescriptor?.(r)}}}u();c();m();p();d();l();u();c();m();p();d();l();var ir={enumerable:!0,configurable:!0,writable:!0};function or(t){let e=new Set(t);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>ir,has:(r,n)=>e.has(n),set:(r,n,i)=>e.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...e]}}var Ni=Symbol.for("nodejs.util.inspect.custom");function ne(t,e){let r=el(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?{...ir,...f?.getPropertyDescriptor(s)}:ir:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Ni]=function(){let o={...this};return delete o[Ni],o},i}function el(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 Ze(t){return{getKeys(){return t},has(){return!1},getPropertyValue(){}}}u();c();m();p();d();l();function sr(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:Gt}).write(e).toString()}u();c();m();p();d();l();var ji=require("./utilities.js"),$i=require("./utilities.js"),tl="P2037";function ar({error:t,user_facing_error:e},r,n){return e.error_code?new ji.PrismaClientKnownRequestError(rl(e,n),{code:e.error_code,clientVersion:r,meta:e.meta,batchRequestIdx:e.batch_request_idx}):new $i.PrismaClientUnknownRequestError(t,{clientVersion:r,batchRequestIdx:e.batch_request_idx})}function rl(t,e){let r=t.message;return(e==="postgresql"||e==="postgres"||e==="mysql")&&t.error_code===tl&&(r+=`
6
+ 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 Hr=class{getLocation(){return null}};function xe(t){return typeof $EnabledCallSite=="function"&&t!=="minimal"?new $EnabledCallSite:new Hr}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Qi={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function et(t={}){let e=il(t);return Object.entries(e).reduce((n,[i,o])=>(Qi[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function il(t={}){return typeof t._count=="boolean"?{...t,_count:{_all:t._count}}:t}function lr(t={}){return e=>(typeof t._count=="boolean"&&(e._count=e._count._all),e)}function Ji(t,e){let r=lr(t);return e({action:"aggregate",unpacker:r,argsMapper:et})(t)}u();c();m();p();d();l();function ol(t={}){let{select:e,...r}=t;return typeof e=="object"?et({...r,_count:e}):et({...r,_count:{_all:!0}})}function sl(t={}){return typeof t.select=="object"?e=>lr(t)(e)._count:e=>lr(t)(e)._count._all}function Gi(t,e){return e({action:"count",unpacker:sl(t),argsMapper:ol})(t)}u();c();m();p();d();l();function al(t={}){let e=et(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 ll(t={}){return e=>(typeof t?._count=="boolean"&&e.forEach(r=>{r._count=r._count._all}),e)}function Wi(t,e){return e({action:"groupBy",unpacker:ll(t),argsMapper:al})(t)}function Ki(t,e,r){if(e==="aggregate")return n=>Ji(n,r);if(e==="count")return n=>Gi(n,r);if(e==="groupBy")return n=>Wi(n,r)}u();c();m();p();d();l();function Hi(t,e){let r=e.fields.filter(i=>!i.relationName),n=Cn(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 ht(t,o,s.type,s.isList,s.kind==="enum")},...or(Object.keys(n))})}u();c();m();p();d();l();u();c();m();p();d();l();var zi=t=>Array.isArray(t)?t:t.split("."),zr=(t,e)=>zi(e).reduce((r,n)=>r&&r[n],t),Yi=(t,e,r)=>zi(e).reduceRight((n,i,o,s)=>Object.assign({},zr(t,s.slice(0,o)),{[i]:n}),r);function ul(t,e){return t===void 0||e===void 0?[]:[...e,"select",t]}function cl(t,e,r){return e===void 0?t??{}:Yi(e,r,t||!0)}function Yr(t,e,r,n,i,o){let a=t._runtimeDataModel.models[e].fields.reduce((f,g)=>({...f,[g.name]:g}),{});return f=>{let g=xe(t._errorFormat),C=ul(n,i),A=cl(f,o,C),k=r({dataPath:C,callsite:g})(A),R=ml(t,e);return new Proxy(k,{get(M,O){if(!R.includes(O))return M[O];let de=[a[O].type,r,O],H=[C,A];return Yr(t,...de,...H)},...or([...R,...Object.getOwnPropertyNames(k)])})}}function ml(t,e){return t._runtimeDataModel.models[e].fields.filter(r=>r.kind==="object").map(r=>r.name)}var pl=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],dl=["aggregate","count","groupBy"];function Xr(t,e){let r=t._extensions.getAllModelExtensions(e)??{},n=[fl(t,e),yl(t,e),Et(r),K("name",()=>e),K("$name",()=>e),K("$parent",()=>t._appliedParent)];return ne({},n)}function fl(t,e){let r=ue(e),n=Object.keys(dt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>f=>{let g=xe(t._errorFormat);return t._createPrismaPromise(C=>{let A={args:f,dataPath:[],action:o,model:e,clientMethod:`${r}.${i}`,jsModelName:r,transaction:C,callsite:g};return t._request({...A,...a})},{action:o,args:f,model:e})};return pl.includes(o)?Yr(t,e,s):gl(i)?Ki(t,i,s):s({})}}}function gl(t){return dl.includes(t)}function yl(t,e){return Oe(K("fields",()=>{let r=t._runtimeDataModel.models[e];return Hi(e,r)}))}u();c();m();p();d();l();function Xi(t){return t.replace(/^./,e=>e.toUpperCase())}var Zr=Symbol();function Pt(t){let e=[hl(t),bl(t),K(Zr,()=>t),K("$parent",()=>t._appliedParent)],r=t._extensions.getAllClientExtensions();return r&&e.push(Et(r)),ne(t,e)}function hl(t){let e=Object.getPrototypeOf(t._originalClient),r=[...new Set(Object.getOwnPropertyNames(e))];return{getKeys(){return r},getPropertyValue(n){return t[n]}}}function bl(t){let e=Object.keys(t._runtimeDataModel.models),r=e.map(ue),n=[...new Set(e.concat(r))];return Oe({getKeys(){return n},getPropertyValue(i){let o=Xi(i);if(t._runtimeDataModel.models[o]!==void 0)return Xr(t,o);if(t._runtimeDataModel.models[i]!==void 0)return Xr(t,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Zi(t){return t[Zr]?t[Zr]:t}function eo(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 Pt(e)}u();c();m();p();d();l();u();c();m();p();d();l();function to({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 g=f.needs.filter(C=>n[C]);g.length>0&&a.push(Ze(g))}else if(r){if(!r[f.name])continue;let g=f.needs.filter(C=>!r[C]);g.length>0&&a.push(Ze(g))}wl(t,f.needs)&&s.push(xl(f,ne(t,s)))}return s.length>0||a.length>0?ne(t,[...s,...a]):t}function wl(t,e){return e.every(r=>qr(t,r))}function xl(t,e){return Oe(K(t.name,()=>t.compute(e)))}u();c();m();p();d();l();function ur({visitor:t,result:e,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(e)){for(let s=0;s<e.length;s++)e[s]=ur({result:e[s],args:r,modelName:i,runtimeDataModel:n,visitor:t});return e}let o=t(e,i,r)??e;return r.include&&ro({includeOrSelect:r.include,result:o,parentModelName:i,runtimeDataModel:n,visitor:t}),r.select&&ro({includeOrSelect:r.select,result:o,parentModelName:i,runtimeDataModel:n,visitor:t}),o}function ro({includeOrSelect:t,result:e,parentModelName:r,runtimeDataModel:n,visitor:i}){for(let[o,s]of Object.entries(t)){if(!s||e[o]==null||ce(s))continue;let f=n.models[r].fields.find(C=>C.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let g=typeof s=="object"?s:{};e[o]=ur({visitor:i,result:e[o],args:g,modelName:f.type,runtimeDataModel:n})}}function no({result:t,modelName:e,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||t==null||typeof t!="object"||!i.models[e]?t:ur({result:t,args:r??{},modelName:e,runtimeDataModel:i,visitor:(a,f,g)=>{let C=ue(f);return to({result:a,modelName:C,select:g.select,omit:g.select?void 0:{...o?.[C],...g.omit},extensions:n})}})}u();c();m();p();d();l();u();c();m();p();d();l();l();var tn=require("./utilities.js");var U={};Fe(U,{Param:()=>Pl,TypedSql:()=>Xe,isTypedSql:()=>xt,itxClientDenyList:()=>en,makeTypedQueryFactory:()=>Kr});u();c();m();p();d();l();u();c();m();p();d();l();var El=["$connect","$disconnect","$on","$transaction","$extends"],en=El;B(U,require("./utilities.js"));u();c();m();p();d();l();function Pl(t){return{name:t}}var io=require("./utilities.js");function oo(t){if(t instanceof tn.Sql)return vl(t);if(xt(t))return Tl(t);if(Array.isArray(t)){let r=[t[0]];for(let n=1;n<t.length;n++)r[n]=vt(t[n]);return r}let e={};for(let r in t)e[r]=vt(t[r]);return e}function vl(t){return new tn.Sql(t.strings,t.values)}function Tl(t){return new Xe(t.sql,t.values)}function vt(t){if(typeof t!="object"||t==null||t instanceof io.ObjectEnumValue||Ke(t))return t;if(je(t))return new b(t.toFixed());if(Ve(t))return new Date(+t);if(ArrayBuffer.isView(t))return t.slice(0);if(Array.isArray(t)){let e=t.length,r;for(r=Array(e);e--;)r[e]=vt(t[e]);return r}if(typeof t=="object"){let e={};for(let r in t)r==="__proto__"?Object.defineProperty(e,r,{value:vt(t[r]),configurable:!0,enumerable:!0,writable:!0}):e[r]=vt(t[r]);return e}Se(t,"Unknown value")}function ao(t,e,r,n=0){return t._createPrismaPromise(i=>{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:oo(e.args??{}),__internalParams:e,query:(s,a=e)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=mo(o,f),a.args=s,ao(t,a,r,n+1)}})})}function lo(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 ao(t,e,s)}function uo(t){return e=>{let r={requests:e},n=e[0].extensions.getAllBatchQueryCallbacks();return n.length?co(r,n,0,t):t(r)}}function co(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=mo(i,f),co(a,e,r+1,n)}})}var so=t=>t;function mo(t=so,e=so){return r=>t(e(r))}u();c();m();p();d();l();var go=require("./utilities.js"),po=G("prisma:client"),fo={Vercel:"vercel","Netlify CI":"netlify"};function yo({postinstall:t,ciName:e,clientVersion:r}){if(po("checkPlatformCaching:postinstall",t),po("checkPlatformCaching:ciName",e),t===!0&&e&&e in fo){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.
7
7
 
8
- Learn how: https://pris.ly/d/${fo[e]}-build`;throw console.error(n),new go.PrismaClientInitializationError(n,r)}}u();c();m();p();d();l();function ho(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 Cl=()=>globalThis.process?.release?.name==="node",Al=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Rl=()=>!!globalThis.Deno,Sl=()=>typeof globalThis.Netlify=="object",Ol=()=>typeof globalThis.EdgeRuntime=="object",kl=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Dl(){return[[Sl,"netlify"],[Ol,"edge-light"],[kl,"workerd"],[Rl,"deno"],[Al,"bun"],[Cl,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Il={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 Ee(){let t=Dl();return{id:t,prettyName:Il[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 bo(t,e){throw new Error(e)}function Ml(t){return t!==null&&typeof t=="object"&&typeof t.$type=="string"}function Ll(t,e){let r={};for(let n of Object.keys(t))r[n]=e(t[n],n);return r}function tt(t){return t===null?t:Array.isArray(t)?t.map(tt):typeof t=="object"?Ml(t)?_l(t):t.constructor!==null&&t.constructor.name!=="Object"?t:Ll(t,tt):t}function _l({$type:t,value:e}){switch(t){case"BigInt":return BigInt(e);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=w.from(e,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(e);case"Decimal":return new b(e);case"Json":return JSON.parse(e);default:bo(e,"Unknown tagged value")}}var wo="6.16.0-integration-feat-orm-1074-package-dev-export.2";u();c();m();p();d();l();var cr=require("./utilities");function mr({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 Ee().id==="workerd"?new cr.PrismaClientInitializationError(`error: Environment variable not found: ${s.fromEnvVar}.
8
+ Learn how: https://pris.ly/d/${fo[e]}-build`;throw console.error(n),new go.PrismaClientInitializationError(n,r)}}u();c();m();p();d();l();function ho(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 Cl=()=>globalThis.process?.release?.name==="node",Al=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Rl=()=>!!globalThis.Deno,Sl=()=>typeof globalThis.Netlify=="object",Ol=()=>typeof globalThis.EdgeRuntime=="object",kl=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Dl(){return[[Sl,"netlify"],[Ol,"edge-light"],[kl,"workerd"],[Rl,"deno"],[Al,"bun"],[Cl,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Il={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 Ee(){let t=Dl();return{id:t,prettyName:Il[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 bo(t,e){throw new Error(e)}function Ml(t){return t!==null&&typeof t=="object"&&typeof t.$type=="string"}function Ll(t,e){let r={};for(let n of Object.keys(t))r[n]=e(t[n],n);return r}function tt(t){return t===null?t:Array.isArray(t)?t.map(tt):typeof t=="object"?Ml(t)?_l(t):t.constructor!==null&&t.constructor.name!=="Object"?t:Ll(t,tt):t}function _l({$type:t,value:e}){switch(t){case"BigInt":return BigInt(e);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=w.from(e,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(e);case"Decimal":return new b(e);case"Json":return JSON.parse(e);default:bo(e,"Unknown tagged value")}}var wo="6.16.0-integration-feat-orm-1074-package-dev-export.3";u();c();m();p();d();l();var cr=require("./utilities.js");function mr({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 Ee().id==="workerd"?new cr.PrismaClientInitializationError(`error: Environment variable not found: ${s.fromEnvVar}.
9
9
 
10
10
  In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`.
11
- To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new cr.PrismaClientInitializationError(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new cr.PrismaClientInitializationError("error: Missing URL environment variable, value, or override.",n);return i}u();c();m();p();d();l();var dr=require("./utilities"),Po=require("./utilities"),CS=require("./utilities"),ke=require("./utilities");u();c();m();p();d();l();function xo(t){if(t?.kind==="itx")return t.options.id}u();c();m();p();d();l();var pr=require("./utilities"),rn,Eo={async loadLibrary(t){let{clientVersion:e,adapter:r,engineWasm:n}=t;if(r===void 0)throw new pr.PrismaClientInitializationError(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Ee().prettyName})`,e);if(n===void 0)throw new pr.PrismaClientInitializationError("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 pr.PrismaClientInitializationError("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),g=f.exports.__wbindgen_start;return o.__wbg_set_wasm(f.exports),g(),o.QueryEngine})());let i=await rn;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var Ul="P2036",me=G("prisma:client:libraryEngine");function ql(t){return t.item_type==="query"&&"query"in t}function Nl(t){return"level"in t?t.level==="error"&&t.message==="PANIC":!1}var DS=[...Ir,"native"],Bl=0xffffffffffffffffn,nn=1n;function Vl(){let t=nn++;return nn>Bl&&(nn=1n),t}var Tt=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??Eo,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=Vl().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(jl(a)){let f=this.getExternalAdapterError(a,i?.errorRegistry);throw f?f.error:new Po.PrismaClientKnownRequestError(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new ke.PrismaClientUnknownRequestError(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(me("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 ke.PrismaClientUnknownRequestError("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(e)}catch{throw new ke.PrismaClientUnknownRequestError("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 x(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(qt));let r=await this.adapterPromise;r&&me("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=>{e.deref()?.logger(n)},r))}catch(e){let r=e,n=this.parseInitError(r.message);throw typeof n=="string"?r:new dr.PrismaClientInitializationError(n.message,this.config.clientVersion,n.error_code)}}}logger(e){let r=this.parseEngineResponse(e);r&&(r.level=r?.level.toLowerCase()??"unknown",ql(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(Nl(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 me(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let e=async()=>{me("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,me("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new dr.PrismaClientInitializationError(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 me("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)),me("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,me("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}){me(`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 ke.PrismaClientUnknownRequestError(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof dr.PrismaClientInitializationError)throw s;s.code==="GenericFailure"&&s.message?.startsWith("PANIC:");let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new ke.PrismaClientUnknownRequestError(`${a.message}
12
- ${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(e,{transaction:r,traceparent:n}){me("requestBatch");let i=sr(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}),xo(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 ke.PrismaClientUnknownRequestError(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:f,errors:g}=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 g&&g.length===1?new Error(g[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:ar(e,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(e,r){if(e.error_code===Ul&&r){let n=e.meta?.id;Nt(typeof n=="number","Malformed external JS error received from the engine");let i=r.consumeError(n);return Nt(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 jl(t){return typeof t=="object"&&t!==null&&t.error_code!==void 0}u();c();m();p();d();l();var rt=require("./utilities"),Ct="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 rt.PrismaClientInitializationError(Ct,this.config.clientVersion)}metrics(e){throw new rt.PrismaClientInitializationError(Ct,this.config.clientVersion)}request(e,r){throw new rt.PrismaClientInitializationError(Ct,this.config.clientVersion)}requestBatch(e,r){throw new rt.PrismaClientInitializationError(Ct,this.config.clientVersion)}applyPendingMigrations(){throw new rt.PrismaClientInitializationError(Ct,this.config.clientVersion)}};var on=require("./utilities");u();c();m();p();d();l();function vo({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(`
11
+ To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new cr.PrismaClientInitializationError(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new cr.PrismaClientInitializationError("error: Missing URL environment variable, value, or override.",n);return i}u();c();m();p();d();l();var dr=require("./utilities.js"),Po=require("./utilities.js"),CS=require("./utilities.js"),ke=require("./utilities.js");u();c();m();p();d();l();function xo(t){if(t?.kind==="itx")return t.options.id}u();c();m();p();d();l();var pr=require("./utilities.js"),rn,Eo={async loadLibrary(t){let{clientVersion:e,adapter:r,engineWasm:n}=t;if(r===void 0)throw new pr.PrismaClientInitializationError(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Ee().prettyName})`,e);if(n===void 0)throw new pr.PrismaClientInitializationError("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 pr.PrismaClientInitializationError("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),g=f.exports.__wbindgen_start;return o.__wbg_set_wasm(f.exports),g(),o.QueryEngine})());let i=await rn;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var Ul="P2036",me=G("prisma:client:libraryEngine");function ql(t){return t.item_type==="query"&&"query"in t}function Nl(t){return"level"in t?t.level==="error"&&t.message==="PANIC":!1}var DS=[...Ir,"native"],Bl=0xffffffffffffffffn,nn=1n;function Vl(){let t=nn++;return nn>Bl&&(nn=1n),t}var Tt=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??Eo,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=Vl().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(jl(a)){let f=this.getExternalAdapterError(a,i?.errorRegistry);throw f?f.error:new Po.PrismaClientKnownRequestError(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new ke.PrismaClientUnknownRequestError(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(me("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 ke.PrismaClientUnknownRequestError("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(e)}catch{throw new ke.PrismaClientUnknownRequestError("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 x(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(qt));let r=await this.adapterPromise;r&&me("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=>{e.deref()?.logger(n)},r))}catch(e){let r=e,n=this.parseInitError(r.message);throw typeof n=="string"?r:new dr.PrismaClientInitializationError(n.message,this.config.clientVersion,n.error_code)}}}logger(e){let r=this.parseEngineResponse(e);r&&(r.level=r?.level.toLowerCase()??"unknown",ql(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(Nl(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 me(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let e=async()=>{me("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,me("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new dr.PrismaClientInitializationError(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 me("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)),me("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,me("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}){me(`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 ke.PrismaClientUnknownRequestError(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof dr.PrismaClientInitializationError)throw s;s.code==="GenericFailure"&&s.message?.startsWith("PANIC:");let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new ke.PrismaClientUnknownRequestError(`${a.message}
12
+ ${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(e,{transaction:r,traceparent:n}){me("requestBatch");let i=sr(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}),xo(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 ke.PrismaClientUnknownRequestError(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:f,errors:g}=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 g&&g.length===1?new Error(g[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:ar(e,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(e,r){if(e.error_code===Ul&&r){let n=e.meta?.id;Nt(typeof n=="number","Malformed external JS error received from the engine");let i=r.consumeError(n);return Nt(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 jl(t){return typeof t=="object"&&t!==null&&t.error_code!==void 0}u();c();m();p();d();l();var rt=require("./utilities.js"),Ct="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 rt.PrismaClientInitializationError(Ct,this.config.clientVersion)}metrics(e){throw new rt.PrismaClientInitializationError(Ct,this.config.clientVersion)}request(e,r){throw new rt.PrismaClientInitializationError(Ct,this.config.clientVersion)}requestBatch(e,r){throw new rt.PrismaClientInitializationError(Ct,this.config.clientVersion)}applyPendingMigrations(){throw new rt.PrismaClientInitializationError(Ct,this.config.clientVersion)}};var on=require("./utilities.js");u();c();m();p();d();l();function vo({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(`
13
13
  `);o.push({_tag:"error",value:D})},f=!!t?.startsWith("prisma://"),g=Fr(t),C=!!e,A=f||g;!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:g,driverAdapters:C};function M(O){return O.length>0}return M(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:R}:{ok:!0,diagnostics:{warnings:i},isUsing:R}}function To({copyEngine:t=!0},e){let r;try{r=mr({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,env:{...e.env,...y.env},clientVersion:e.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=vo({url:r,adapter:e.adapter,copyEngine:t,targetBuildType:"wasm-engine-edge"});for(let A of o.warnings)pt(...A.value);if(!n){let A=o.errors[0];throw new on.PrismaClientValidationError(A.value,{clientVersion:e.clientVersion})}let s=Be(e.generator),a=s==="library",f=s==="binary",g=s==="client",C=(i.accelerate||i.ppg)&&!i.driverAdapters;if(i.accelerate,i.driverAdapters)return new Tt(e);if(i.accelerate)return new fr(e);{let A=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Ee().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 on.PrismaClientValidationError(A.join(`
14
- `),{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 Co=t=>({command:t});u();c();m();p();d();l();var Io=require("./utilities");u();c();m();p();d();l();var Ao=t=>t.strings.reduce((e,r,n)=>`${e}@P${n}${r}`);u();c();m();p();d();l();l();function nt(t){try{return Ro(t,"fast")}catch{return Ro(t,"slow")}}function Ro(t,e){return JSON.stringify(t.map(r=>Oo(r,e)))}function Oo(t,e){if(Array.isArray(t))return t.map(r=>Oo(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(b.isDecimal(t))return{prisma__type:"decimal",prisma__value:t.toJSON()};if(w.isBuffer(t))return{prisma__type:"bytes",prisma__value:t.toString("base64")};if($l(t))return{prisma__type:"bytes",prisma__value:w.from(t).toString("base64")};if(ArrayBuffer.isView(t)){let{buffer:r,byteOffset:n,byteLength:i}=t;return{prisma__type:"bytes",prisma__value:w.from(r,n,i).toString("base64")}}return typeof t=="object"&&e==="slow"?ko(t):t}function $l(t){return t instanceof ArrayBuffer||t instanceof SharedArrayBuffer?!0:typeof t=="object"&&t!==null?t[Symbol.toStringTag]==="ArrayBuffer"||t[Symbol.toStringTag]==="SharedArrayBuffer":!1}function ko(t){if(typeof t!="object"||t===null)return t;if(typeof t.toJSON=="function")return t.toJSON();if(Array.isArray(t))return t.map(So);let e={};for(let r of Object.keys(t))e[r]=So(t[r]);return e}function So(t){return typeof t=="bigint"?t.toString():ko(t)}var Ql=/^(\s*alter\s)/i,Do=G("prisma:client");function sn(t,e,r,n){if(!(t!=="postgresql"&&t!=="cockroachdb")&&r.length>0&&Ql.exec(e))throw new Error(`Running ALTER using ${n} is not supported
14
+ `),{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 Co=t=>({command:t});u();c();m();p();d();l();var Io=require("./utilities.js");u();c();m();p();d();l();var Ao=t=>t.strings.reduce((e,r,n)=>`${e}@P${n}${r}`);u();c();m();p();d();l();l();function nt(t){try{return Ro(t,"fast")}catch{return Ro(t,"slow")}}function Ro(t,e){return JSON.stringify(t.map(r=>Oo(r,e)))}function Oo(t,e){if(Array.isArray(t))return t.map(r=>Oo(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(b.isDecimal(t))return{prisma__type:"decimal",prisma__value:t.toJSON()};if(w.isBuffer(t))return{prisma__type:"bytes",prisma__value:t.toString("base64")};if($l(t))return{prisma__type:"bytes",prisma__value:w.from(t).toString("base64")};if(ArrayBuffer.isView(t)){let{buffer:r,byteOffset:n,byteLength:i}=t;return{prisma__type:"bytes",prisma__value:w.from(r,n,i).toString("base64")}}return typeof t=="object"&&e==="slow"?ko(t):t}function $l(t){return t instanceof ArrayBuffer||t instanceof SharedArrayBuffer?!0:typeof t=="object"&&t!==null?t[Symbol.toStringTag]==="ArrayBuffer"||t[Symbol.toStringTag]==="SharedArrayBuffer":!1}function ko(t){if(typeof t!="object"||t===null)return t;if(typeof t.toJSON=="function")return t.toJSON();if(Array.isArray(t))return t.map(So);let e={};for(let r of Object.keys(t))e[r]=So(t[r]);return e}function So(t){return typeof t=="bigint"?t.toString():ko(t)}var Ql=/^(\s*alter\s)/i,Do=G("prisma:client");function sn(t,e,r,n){if(!(t!=="postgresql"&&t!=="cockroachdb")&&r.length>0&&Ql.exec(e))throw new Error(`Running ALTER using ${n} is not supported
15
15
  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.
16
16
 
17
17
  Example:
@@ -28,5 +28,5 @@ Expected string or undefined.`)},errorFormat:t=>{if(t){if(typeof t!="string")thr
28
28
  ${i}
29
29
 
30
30
  ${n}`}u();c();m();p();d();l();function zo(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=g=>{o||(o=!0,r(g))};for(let g=0;g<t.length;g++)t[g].then(C=>{n[g]=C,a()},C=>{if(!yr(C)){f(C);return}C.batchRequestIdx===g?f(C):(i||(i=C),a())})})}var Pe=G("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var nu={requestArgsToMiddlewareArgs:t=>t,middlewareArgsToRequestArgs:t=>t},iu=Symbol.for("prisma.client.transaction.id"),ou={id:0,nextId(){return++this.id}};function es(t){class e{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=ln();constructor(n){t=n?.__internal?.configOverride?.(t)??t,yo(t),n&&Ho(n,t);let i=new nr().on("error",()=>{});this._extensions=ze.empty(),this._previewFeatures=gr(t),this._clientVersion=t.clientVersion??$o,this._activeProvider=t.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Fo();let o=t.relativeEnvPaths&&{rootEnvPath:t.relativeEnvPaths.rootEnvPath&&Ft.resolve(t.dirname,t.relativeEnvPaths.rootEnvPath),schemaEnvPath:t.relativeEnvPaths.schemaEnvPath&&Ft.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 ye.PrismaClientInitializationError(`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 ye.PrismaClientInitializationError("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??{},g=f.__internal??{},C=g.debug===!0;C&&G.enable("prisma:client");let A=Ft.resolve(t.dirname,t.relativePath);Bn.existsSync(A)||(A=t.dirname),Pe("dirname",t.dirname),Pe("relativePath",t.relativePath),Pe("cwd",A);let k=g.engine||{};if(f.errorFormat?this._errorFormat=f.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.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&&qo(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:ho(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:mr,getBatchRequestPayload:sr,prismaGraphQLToJSError:ar,PrismaClientUnknownRequestError:Me.PrismaClientUnknownRequestError,PrismaClientInitializationError:ye.PrismaClientInitializationError,PrismaClientKnownRequestError:Ie.PrismaClientKnownRequestError,debug:G("prisma:client:accelerateEngine"),engineVersion:Xo.version,clientVersion:t.clientVersion}},Pe("clientVersion",t.clientVersion),this._engine=To(t,this._engineConfig),this._requestHandler=new wr(this,i),f.log)for(let R of f.log){let M=typeof R=="string"?R:R.emit==="stdout"?R.level:null;M&&this.$on(M,O=>{mt.log(`${mt.tags[M]??""}`,O.message||O.query)})}}catch(f){throw f.clientVersion=this._clientVersion,f}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{Nn()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:an({clientMethod:i,activeProvider:a}),callsite:xe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Yo(n,i);return sn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw`<SQL>`":"prisma.$executeRaw(sql`<SQL>`)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new Le.PrismaClientValidationError("`$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=>(sn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(<SQL>, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(t.activeProvider!=="mongodb")throw new Le.PrismaClientValidationError(`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:Co,callsite:xe(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:an({clientMethod:i,activeProvider:a}),callsite:xe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Yo(n,i));throw new Le.PrismaClientValidationError("`$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 Le.PrismaClientValidationError("`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=ou.nextId(),s=Uo(n.length),a=n.map((f,g)=>{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:g,isolationLevel:C,lock:s};return f.requestTransaction?.(A)??f});return zo(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 g={kind:"itx",...a};f=await n(this._createItxClient(g)),await this._engine.transaction("commit",o,a)}catch(g){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),g}return f}_createItxClient(n){return ne(Pt(ne(Zi(this),[K("_appliedParent",()=>this._appliedParent._createItxClient(n)),K("_createPrismaPromise",()=>ln(n)),K(iu,()=>n.id)])),[Ze(en)])}$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??nu,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:g,args:C,...A}=f,k={...n,...A};C&&(k.args=i.middlewareArgsToRequestArgs(C)),n.transaction!==void 0&&g===!1&&delete k.transaction;let R=await lo(this,k);return k.model?no({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:g,transaction:C,unpacker:A,otelParentCtx:k,customDataProxyFetch:R}){try{n=g?g(n):n;let M={name:"serialize"},O=this._tracingHelper.runInChildSpan(M,()=>tr({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")&&(Pe("Prisma Client call:"),Pe(`prisma.${i}(${Vi(n)})`),Pe("Generated request:"),Pe(JSON.stringify(O,null,2)+`
31
- `)),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(M){throw M.clientVersion=this._clientVersion,M}}$metrics=new Ye(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=eo}return e}function Yo(t,e){return su(t)?[new Zo.Sql(t,e),Mo]:[t,Lo]}function su(t){return Array.isArray(t)&&Array.isArray(t.raw)}u();c();m();p();d();l();var au=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function ts(t){return new Proxy(t,{get(e,r){if(r in e)return e[r];if(!au.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}var pe=require("./utilities");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});
31
+ `)),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(M){throw M.clientVersion=this._clientVersion,M}}$metrics=new Ye(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=eo}return e}function Yo(t,e){return su(t)?[new Zo.Sql(t,e),Mo]:[t,Lo]}function su(t){return Array.isArray(t)&&Array.isArray(t.raw)}u();c();m();p();d();l();var au=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function ts(t){return new Proxy(t,{get(e,r){if(r in e)return e[r];if(!au.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}var pe=require("./utilities.js");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});
32
32
  //# sourceMappingURL=wasm-engine-edge.js.map