UNPKG

@partyxjimmy/client

Version:

Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.

21 lines (19 loc) 195 kB
"use strict";var lu=Object.create;var Fr=Object.defineProperty;var uu=Object.getOwnPropertyDescriptor;var cu=Object.getOwnPropertyNames;var pu=Object.getPrototypeOf,du=Object.prototype.hasOwnProperty;var Z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ut=(e,t)=>{for(var r in t)Fr(e,r,{get:t[r],enumerable:!0})},vo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of cu(t))!du.call(e,i)&&i!==r&&Fr(e,i,{get:()=>t[i],enumerable:!(n=uu(t,i))||n.enumerable});return e};var _=(e,t,r)=>(r=e!=null?lu(pu(e)):{},vo(t||!e||!e.__esModule?Fr(r,"default",{value:e,enumerable:!0}):r,e)),mu=e=>vo(Fr({},"__esModule",{value:!0}),e);var Wo=Z((vf,ni)=>{"use strict";var P=ni.exports;ni.exports.default=P;var D="\x1B[",Ht="\x1B]",mt="\x07",Jr=";",Jo=process.env.TERM_PROGRAM==="Apple_Terminal";P.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?D+(e+1)+"G":D+(t+1)+";"+(e+1)+"H"};P.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let r="";return e<0?r+=D+-e+"D":e>0&&(r+=D+e+"C"),t<0?r+=D+-t+"A":t>0&&(r+=D+t+"B"),r};P.cursorUp=(e=1)=>D+e+"A";P.cursorDown=(e=1)=>D+e+"B";P.cursorForward=(e=1)=>D+e+"C";P.cursorBackward=(e=1)=>D+e+"D";P.cursorLeft=D+"G";P.cursorSavePosition=Jo?"\x1B7":D+"s";P.cursorRestorePosition=Jo?"\x1B8":D+"u";P.cursorGetPosition=D+"6n";P.cursorNextLine=D+"E";P.cursorPrevLine=D+"F";P.cursorHide=D+"?25l";P.cursorShow=D+"?25h";P.eraseLines=e=>{let t="";for(let r=0;r<e;r++)t+=P.eraseLine+(r<e-1?P.cursorUp():"");return e&&(t+=P.cursorLeft),t};P.eraseEndLine=D+"K";P.eraseStartLine=D+"1K";P.eraseLine=D+"2K";P.eraseDown=D+"J";P.eraseUp=D+"1J";P.eraseScreen=D+"2J";P.scrollUp=D+"S";P.scrollDown=D+"T";P.clearScreen="\x1Bc";P.clearTerminal=process.platform==="win32"?`${P.eraseScreen}${D}0f`:`${P.eraseScreen}${D}3J${D}H`;P.beep=mt;P.link=(e,t)=>[Ht,"8",Jr,Jr,t,mt,e,Ht,"8",Jr,Jr,mt].join("");P.image=(e,t={})=>{let r=`${Ht}1337;File=inline=1`;return t.width&&(r+=`;width=${t.width}`),t.height&&(r+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0"),r+":"+e.toString("base64")+mt};P.iTerm={setCwd:(e=process.cwd())=>`${Ht}50;CurrentDir=${e}${mt}`,annotation:(e,t={})=>{let r=`${Ht}1337;`,n=typeof t.x<"u",i=typeof t.y<"u";if((n||i)&&!(n&&i&&typeof t.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),r+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?r+=(n?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):r+=e,r+mt}}});var ii=Z((Tf,Ho)=>{"use strict";Ho.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}});var zo=Z((Rf,Yo)=>{"use strict";var Zu=require("os"),Ko=require("tty"),fe=ii(),{env:J}=process,Je;fe("no-color")||fe("no-colors")||fe("color=false")||fe("color=never")?Je=0:(fe("color")||fe("colors")||fe("color=true")||fe("color=always"))&&(Je=1);"FORCE_COLOR"in J&&(J.FORCE_COLOR==="true"?Je=1:J.FORCE_COLOR==="false"?Je=0:Je=J.FORCE_COLOR.length===0?1:Math.min(parseInt(J.FORCE_COLOR,10),3));function oi(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function si(e,t){if(Je===0)return 0;if(fe("color=16m")||fe("color=full")||fe("color=truecolor"))return 3;if(fe("color=256"))return 2;if(e&&!t&&Je===void 0)return 0;let r=Je||0;if(J.TERM==="dumb")return r;if(process.platform==="win32"){let n=Zu.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in J)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in J)||J.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in J)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(J.TEAMCITY_VERSION)?1:0;if(J.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in J){let n=parseInt((J.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(J.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(J.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(J.TERM)||"COLORTERM"in J?1:r}function Xu(e){let t=si(e,e&&e.isTTY);return oi(t)}Yo.exports={supportsColor:Xu,stdout:oi(si(!0,Ko.isatty(1))),stderr:oi(si(!0,Ko.isatty(2)))}});var es=Z((Cf,Xo)=>{"use strict";var ec=zo(),ft=ii();function Zo(e){if(/^\d{3,4}$/.test(e)){let r=/(\d{1,2})(\d{2})/.exec(e);return{major:0,minor:parseInt(r[1],10),patch:parseInt(r[2],10)}}let t=(e||"").split(".").map(r=>parseInt(r,10));return{major:t[0],minor:t[1],patch:t[2]}}function ai(e){let{env:t}=process;if("FORCE_HYPERLINK"in t)return!(t.FORCE_HYPERLINK.length>0&&parseInt(t.FORCE_HYPERLINK,10)===0);if(ft("no-hyperlink")||ft("no-hyperlinks")||ft("hyperlink=false")||ft("hyperlink=never"))return!1;if(ft("hyperlink=true")||ft("hyperlink=always")||"NETLIFY"in t)return!0;if(!ec.supportsColor(e)||e&&!e.isTTY||process.platform==="win32"||"CI"in t||"TEAMCITY_VERSION"in t)return!1;if("TERM_PROGRAM"in t){let r=Zo(t.TERM_PROGRAM_VERSION);switch(t.TERM_PROGRAM){case"iTerm.app":return r.major===3?r.minor>=1:r.major>3;case"WezTerm":return r.major>=20200620;case"vscode":return r.major>1||r.major===1&&r.minor>=72}}if("VTE_VERSION"in t){if(t.VTE_VERSION==="0.50.0")return!1;let r=Zo(t.VTE_VERSION);return r.major>0||r.minor>=50}return!1}Xo.exports={supportsHyperlink:ai,stdout:ai(process.stdout),stderr:ai(process.stderr)}});var rs=Z((Sf,Kt)=>{"use strict";var tc=Wo(),li=es(),ts=(e,t,{target:r="stdout",...n}={})=>li[r]?tc.link(e,t):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,t):`${e} (\u200B${t}\u200B)`;Kt.exports=(e,t,r={})=>ts(e,t,r);Kt.exports.stderr=(e,t,r={})=>ts(e,t,{target:"stderr",...r});Kt.exports.isSupported=li.stdout;Kt.exports.stderr.isSupported=li.stderr});var ci=Z((Mf,rc)=>{rc.exports={name:"@prisma/engines-version",version:"6.3.0-17.acc0b9dd43eb689cbd20c9470515d719db10d0b0",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"acc0b9dd43eb689cbd20c9470515d719db10d0b0"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.68",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var pi=Z(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.enginesVersion=void 0;Wr.enginesVersion=ci().prisma.enginesVersion});var ss=Z((rg,oc)=>{oc.exports={name:"dotenv",version:"16.4.7",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var cs=Z((ng,Le)=>{"use strict";var gi=require("fs"),hi=require("path"),sc=require("os"),ac=require("crypto"),lc=ss(),yi=lc.version,uc=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function cc(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,` `);let n;for(;(n=uc.exec(r))!=null;){let i=n[1],o=n[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,` `),o=o.replace(/\\r/g,"\r")),t[i]=o}return t}function pc(e){let t=us(e),r=Q.configDotenv({path:t});if(!r.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw s.code="MISSING_DATA",s}let n=ls(e).split(","),i=n.length,o;for(let s=0;s<i;s++)try{let a=n[s].trim(),l=fc(r,a);o=Q.decrypt(l.ciphertext,l.key);break}catch(a){if(s+1>=i)throw a}return Q.parse(o)}function dc(e){console.log(`[dotenv@${yi}][INFO] ${e}`)}function mc(e){console.log(`[dotenv@${yi}][WARN] ${e}`)}function Hr(e){console.log(`[dotenv@${yi}][DEBUG] ${e}`)}function ls(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function fc(e,t){let r;try{r=new URL(t)}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let n=r.password;if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let i=r.searchParams.get("environment");if(!i){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let o=`DOTENV_VAULT_${i.toUpperCase()}`,s=e.parsed[o];if(!s){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:s,key:n}}function us(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)gi.existsSync(r)&&(t=r.endsWith(".vault")?r:`${r}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=hi.resolve(process.cwd(),".env.vault");return gi.existsSync(t)?t:null}function as(e){return e[0]==="~"?hi.join(sc.homedir(),e.slice(1)):e}function gc(e){dc("Loading env from encrypted .env.vault");let t=Q._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),Q.populate(r,t,e),{parsed:t}}function hc(e){let t=hi.resolve(process.cwd(),".env"),r="utf8",n=!!(e&&e.debug);e&&e.encoding?r=e.encoding:n&&Hr("No encoding is specified. UTF-8 is used by default");let i=[t];if(e&&e.path)if(!Array.isArray(e.path))i=[as(e.path)];else{i=[];for(let l of e.path)i.push(as(l))}let o,s={};for(let l of i)try{let u=Q.parse(gi.readFileSync(l,{encoding:r}));Q.populate(s,u,e)}catch(u){n&&Hr(`Failed to load ${l} ${u.message}`),o=u}let a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),Q.populate(a,s,e),o?{parsed:s,error:o}:{parsed:s}}function yc(e){if(ls(e).length===0)return Q.configDotenv(e);let t=us(e);return t?Q._configVault(e):(mc(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),Q.configDotenv(e))}function Ec(e,t){let r=Buffer.from(t.slice(-64),"hex"),n=Buffer.from(e,"base64"),i=n.subarray(0,12),o=n.subarray(-16);n=n.subarray(12,-16);try{let s=ac.createDecipheriv("aes-256-gcm",r,i);return s.setAuthTag(o),`${s.update(n)}${s.final()}`}catch(s){let a=s instanceof RangeError,l=s.message==="Invalid key length",u=s.message==="Unsupported state or unable to authenticate data";if(a||l){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(u){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw s}}function bc(e,t,r={}){let n=!!(r&&r.debug),i=!!(r&&r.override);if(typeof t!="object"){let o=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw o.code="OBJECT_REQUIRED",o}for(let o of Object.keys(t))Object.prototype.hasOwnProperty.call(e,o)?(i===!0&&(e[o]=t[o]),n&&Hr(i===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=t[o]}var Q={configDotenv:hc,_configVault:gc,_parseVault:pc,config:yc,decrypt:Ec,parse:cc,populate:bc};Le.exports.configDotenv=Q.configDotenv;Le.exports._configVault=Q._configVault;Le.exports._parseVault=Q._parseVault;Le.exports.config=Q.config;Le.exports.decrypt=Q.decrypt;Le.exports.parse=Q.parse;Le.exports.populate=Q.populate;Le.exports=Q});var hs=Z((cg,gs)=>{"use strict";gs.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Es=Z((pg,ys)=>{"use strict";var vc=hs();ys.exports=e=>{let t=vc(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var Pi=Z((Eg,ws)=>{"use strict";ws.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Ts=Z((xg,vs)=>{"use strict";vs.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Ci=Z((Pg,Rs)=>{"use strict";var kc=Ts();Rs.exports=e=>typeof e=="string"?e.replace(kc(),""):e});var Cs=Z((Rg,Zr)=>{"use strict";Zr.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};Zr.exports.default=Zr.exports});var Fi=Z((Lh,Hs)=>{"use strict";Hs.exports=function(){function e(t,r,n,i,o){return t<r||n<r?t>n?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s<i&&t.charCodeAt(s)===r.charCodeAt(s);)s++;if(i-=s,o-=s,i===0||o<3)return o;var a=0,l,u,c,p,d,f,g,h,O,v,C,R,k=[];for(l=0;l<i;l++)k.push(l+1),k.push(t.charCodeAt(s+l));for(var A=k.length-1;a<o-3;)for(O=r.charCodeAt(s+(u=a)),v=r.charCodeAt(s+(c=a+1)),C=r.charCodeAt(s+(p=a+2)),R=r.charCodeAt(s+(d=a+3)),f=a+=4,l=0;l<A;l+=2)g=k[l],h=k[l+1],u=e(g,u,c,O,h),c=e(u,c,p,v,h),p=e(c,p,d,C,h),f=e(p,d,f,R,h),k[l]=f,d=p,p=c,c=u,u=g;for(;a<o;)for(O=r.charCodeAt(s+(u=a)),f=++a,l=0;l<A;l+=2)g=k[l],k[l]=f=e(g,u,f,O,k[l+1]),u=g;return f}}()});var Hm={};Ut(Hm,{Debug:()=>Hn,Decimal:()=>Pe,Extensions:()=>Qn,MetricsClient:()=>kt,PrismaClientInitializationError:()=>T,PrismaClientKnownRequestError:()=>ee,PrismaClientRustPanicError:()=>ce,PrismaClientUnknownRequestError:()=>B,PrismaClientValidationError:()=>te,Public:()=>Gn,Sql:()=>ae,createParam:()=>ga,defineDmmfProperty:()=>xa,deserializeJsonResponse:()=>wt,deserializeRawResult:()=>jn,dmmfToRuntimeDataModel:()=>wa,empty:()=>Ra,getPrismaClient:()=>ou,getRuntime:()=>kn,join:()=>Ta,makeStrictEnum:()=>su,makeTypedQueryFactory:()=>Pa,objectEnumValues:()=>En,raw:()=>Hi,serializeJsonQuery:()=>Rn,skip:()=>Tn,sqltag:()=>Ki,warnEnvConflicts:()=>au,warnOnce:()=>tr});module.exports=mu(Hm);var Qn={};Ut(Qn,{defineExtension:()=>To,getExtensionContext:()=>Ro});function To(e){return typeof e=="function"?e:t=>t.$extends(e)}function Ro(e){return e}var Gn={};Ut(Gn,{validator:()=>Co});function Co(...e){return t=>t}var Mr={};Ut(Mr,{$:()=>ko,bgBlack:()=>vu,bgBlue:()=>Su,bgCyan:()=>Iu,bgGreen:()=>Ru,bgMagenta:()=>Au,bgRed:()=>Tu,bgWhite:()=>Ou,bgYellow:()=>Cu,black:()=>bu,blue:()=>rt,bold:()=>H,cyan:()=>De,dim:()=>ke,gray:()=>Qt,green:()=>Ve,grey:()=>Pu,hidden:()=>yu,inverse:()=>hu,italic:()=>gu,magenta:()=>wu,red:()=>de,reset:()=>fu,strikethrough:()=>Eu,underline:()=>X,white:()=>xu,yellow:()=>_e});var Jn,So,Ao,Io,Oo=!0;typeof process<"u"&&({FORCE_COLOR:Jn,NODE_DISABLE_COLORS:So,NO_COLOR:Ao,TERM:Io}=process.env||{},Oo=process.stdout&&process.stdout.isTTY);var ko={enabled:!So&&Ao==null&&Io!=="dumb"&&(Jn!=null&&Jn!=="0"||Oo)};function $(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!ko.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var fu=$(0,0),H=$(1,22),ke=$(2,22),gu=$(3,23),X=$(4,24),hu=$(7,27),yu=$(8,28),Eu=$(9,29),bu=$(30,39),de=$(31,39),Ve=$(32,39),_e=$(33,39),rt=$(34,39),wu=$(35,39),De=$(36,39),xu=$(37,39),Qt=$(90,39),Pu=$(90,39),vu=$(40,49),Tu=$(41,49),Ru=$(42,49),Cu=$(43,49),Su=$(44,49),Au=$(45,49),Iu=$(46,49),Ou=$(47,49);var ku=100,_o=["green","yellow","blue","magenta","cyan","red"],Gt=[],Do=Date.now(),_u=0,Wn=typeof process<"u"?process.env:{};globalThis.DEBUG??=Wn.DEBUG??"";globalThis.DEBUG_COLORS??=Wn.DEBUG_COLORS?Wn.DEBUG_COLORS==="true":!0;var Jt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Du(e){let t={color:_o[_u++%_o.length],enabled:Jt.enabled(e),namespace:e,log:Jt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Gt.push([o,...n]),Gt.length>ku&&Gt.shift(),Jt.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:Nu(c)),u=`+${Date.now()-Do}ms`;Do=Date.now(),globalThis.DEBUG_COLORS?a(Mr[s](H(o)),...l,Mr[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Hn=new Proxy(Du,{get:(e,t)=>Jt[t],set:(e,t,r)=>Jt[t]=r});function Nu(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function No(e=7500){let t=Gt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` `);return t.length<e?t:t.slice(-e)}function Lo(){Gt.length=0}var F=Hn;var Fo=_(require("fs"));function Kn(){let e=process.env.PRISMA_QUERY_ENGINE_LIBRARY;if(!(e&&Fo.default.existsSync(e))&&process.arch==="ia32")throw new Error('The default query engine type (Node-API, "library") is currently not supported for 32bit Node. Please set `engineType = "binary"` in the "generator" block of your "schema.prisma" file (or use the environment variables "PRISMA_CLIENT_ENGINE_TYPE=binary" and/or "PRISMA_CLI_QUERY_ENGINE_TYPE=binary".)')}var Yn=["darwin","darwin-arm64","debian-openssl-1.0.x","debian-openssl-1.1.x","debian-openssl-3.0.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","rhel-openssl-3.0.x","linux-arm64-openssl-1.1.x","linux-arm64-openssl-1.0.x","linux-arm64-openssl-3.0.x","linux-arm-openssl-1.1.x","linux-arm-openssl-1.0.x","linux-arm-openssl-3.0.x","linux-musl","linux-musl-openssl-3.0.x","linux-musl-arm64-openssl-1.1.x","linux-musl-arm64-openssl-3.0.x","linux-nixos","linux-static-x64","linux-static-arm64","windows","freebsd11","freebsd12","freebsd13","freebsd14","freebsd15","openbsd","netbsd","arm"];var $r="libquery_engine";function qr(e,t){let r=t==="url";return e.includes("windows")?r?"query_engine.dll.node":`query_engine-${e}.dll.node`:e.includes("darwin")?r?`${$r}.dylib.node`:`${$r}-${e}.dylib.node`:r?`${$r}.so.node`:`${$r}-${e}.so.node`}var Vo=_(require("child_process")),ti=_(require("fs/promises")),Qr=_(require("os"));var Ne=Symbol.for("@ts-pattern/matcher"),Lu=Symbol.for("@ts-pattern/isVariadic"),jr="@ts-pattern/anonymous-select-key",zn=e=>!!(e&&typeof e=="object"),Vr=e=>e&&!!e[Ne],we=(e,t,r)=>{if(Vr(e)){let n=e[Ne](),{matched:i,selections:o}=n.match(t);return i&&o&&Object.keys(o).forEach(s=>r(s,o[s])),i}if(zn(e)){if(!zn(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],o=[];for(let s of e.keys()){let a=e[s];Vr(a)&&a[Lu]?o.push(a):o.length?i.push(a):n.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+i.length)return!1;let s=t.slice(0,n.length),a=i.length===0?[]:t.slice(-i.length),l=t.slice(n.length,i.length===0?1/0:-i.length);return n.every((u,c)=>we(u,s[c],r))&&i.every((u,c)=>we(u,a[c],r))&&(o.length===0||we(o[0],l,r))}return e.length===t.length&&e.every((s,a)=>we(s,t[a],r))}return Reflect.ownKeys(e).every(n=>{let i=e[n];return(n in t||Vr(o=i)&&o[Ne]().matcherType==="optional")&&we(i,t[n],r);var o})}return Object.is(t,e)},Ge=e=>{var t,r,n;return zn(e)?Vr(e)?(t=(r=(n=e[Ne]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Wt(e,Ge):Wt(Object.values(e),Ge):[]},Wt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function me(e){return Object.assign(e,{optional:()=>Fu(e),and:t=>j(e,t),or:t=>Mu(e,t),select:t=>t===void 0?Mo(e):Mo(t,e)})}function Fu(e){return me({[Ne]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return t===void 0?(Ge(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:we(e,t,n),selections:r}},getSelectionKeys:()=>Ge(e),matcherType:"optional"})})}function j(...e){return me({[Ne]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return{matched:e.every(i=>we(i,t,n)),selections:r}},getSelectionKeys:()=>Wt(e,Ge),matcherType:"and"})})}function Mu(...e){return me({[Ne]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return Wt(e,Ge).forEach(i=>n(i,void 0)),{matched:e.some(i=>we(i,t,n)),selections:r}},getSelectionKeys:()=>Wt(e,Ge),matcherType:"or"})})}function I(e){return{[Ne]:()=>({match:t=>({matched:!!e(t)})})}}function Mo(...e){let t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return me({[Ne]:()=>({match:n=>{let i={[t??jr]:n};return{matched:r===void 0||we(r,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[t??jr].concat(r===void 0?[]:Ge(r))})})}function Ee(e){return typeof e=="number"}function je(e){return typeof e=="string"}function Be(e){return typeof e=="bigint"}var lf=me(I(function(e){return!0}));var Ue=e=>Object.assign(me(e),{startsWith:t=>{return Ue(j(e,(r=t,I(n=>je(n)&&n.startsWith(r)))));var r},endsWith:t=>{return Ue(j(e,(r=t,I(n=>je(n)&&n.endsWith(r)))));var r},minLength:t=>Ue(j(e,(r=>I(n=>je(n)&&n.length>=r))(t))),length:t=>Ue(j(e,(r=>I(n=>je(n)&&n.length===r))(t))),maxLength:t=>Ue(j(e,(r=>I(n=>je(n)&&n.length<=r))(t))),includes:t=>{return Ue(j(e,(r=t,I(n=>je(n)&&n.includes(r)))));var r},regex:t=>{return Ue(j(e,(r=t,I(n=>je(n)&&!!n.match(r)))));var r}}),uf=Ue(I(je)),be=e=>Object.assign(me(e),{between:(t,r)=>be(j(e,((n,i)=>I(o=>Ee(o)&&n<=o&&i>=o))(t,r))),lt:t=>be(j(e,(r=>I(n=>Ee(n)&&n<r))(t))),gt:t=>be(j(e,(r=>I(n=>Ee(n)&&n>r))(t))),lte:t=>be(j(e,(r=>I(n=>Ee(n)&&n<=r))(t))),gte:t=>be(j(e,(r=>I(n=>Ee(n)&&n>=r))(t))),int:()=>be(j(e,I(t=>Ee(t)&&Number.isInteger(t)))),finite:()=>be(j(e,I(t=>Ee(t)&&Number.isFinite(t)))),positive:()=>be(j(e,I(t=>Ee(t)&&t>0))),negative:()=>be(j(e,I(t=>Ee(t)&&t<0)))}),cf=be(I(Ee)),Qe=e=>Object.assign(me(e),{between:(t,r)=>Qe(j(e,((n,i)=>I(o=>Be(o)&&n<=o&&i>=o))(t,r))),lt:t=>Qe(j(e,(r=>I(n=>Be(n)&&n<r))(t))),gt:t=>Qe(j(e,(r=>I(n=>Be(n)&&n>r))(t))),lte:t=>Qe(j(e,(r=>I(n=>Be(n)&&n<=r))(t))),gte:t=>Qe(j(e,(r=>I(n=>Be(n)&&n>=r))(t))),positive:()=>Qe(j(e,I(t=>Be(t)&&t>0))),negative:()=>Qe(j(e,I(t=>Be(t)&&t<0)))}),pf=Qe(I(Be)),df=me(I(function(e){return typeof e=="boolean"})),mf=me(I(function(e){return typeof e=="symbol"})),ff=me(I(function(e){return e==null})),gf=me(I(function(e){return e!=null}));var Zn=class extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}},Xn={matched:!1,value:void 0};function dt(e){return new ei(e,Xn)}var ei=class e{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;let r=t[t.length-1],n=[t[0]],i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let o=!1,s={},a=(u,c)=>{o=!0,s[u]=c},l=!n.some(u=>we(u,this.input,a))||i&&!i(this.input)?Xn:{matched:!0,value:r(o?jr in s?s[jr]:s:this.input,this.input)};return new e(this.input,l)}when(t,r){if(this.state.matched)return this;let n=!!t(this.input);return new e(this.input,n?{matched:!0,value:r(this.input,this.input)}:Xn)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new Zn(this.input)}run(){return this.exhaustive()}returnType(){return this}};var jo=require("util");var $u={warn:_e("prisma:warn")},qu={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Br(e,...t){qu.warn()&&console.warn(`${$u.warn} ${e}`,...t)}var Vu=(0,jo.promisify)(Vo.default.exec),ne=F("prisma:get-platform"),ju=["1.0.x","1.1.x","3.0.x"];async function Bo(){let e=Qr.default.platform(),t=process.arch;if(e==="freebsd"){let s=await Gr("freebsd-version");if(s&&s.trim().length>0){let l=/^(\d+)\.?/.exec(s);if(l)return{platform:"freebsd",targetDistro:`freebsd${l[1]}`,arch:t}}}if(e!=="linux")return{platform:e,arch:t};let r=await Uu(),n=await zu(),i=Gu({arch:t,archFromUname:n,familyDistro:r.familyDistro}),{libssl:o}=await Ju(i);return{platform:"linux",libssl:o,arch:t,archFromUname:n,...r}}function Bu(e){let t=/^ID="?([^"\n]*)"?$/im,r=/^ID_LIKE="?([^"\n]*)"?$/im,n=t.exec(e),i=n&&n[1]&&n[1].toLowerCase()||"",o=r.exec(e),s=o&&o[1]&&o[1].toLowerCase()||"",a=dt({id:i,idLike:s}).with({id:"alpine"},({id:l})=>({targetDistro:"musl",familyDistro:l,originalDistro:l})).with({id:"raspbian"},({id:l})=>({targetDistro:"arm",familyDistro:"debian",originalDistro:l})).with({id:"nixos"},({id:l})=>({targetDistro:"nixos",originalDistro:l,familyDistro:"nixos"})).with({id:"debian"},{id:"ubuntu"},({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).with({id:"rhel"},{id:"centos"},{id:"fedora"},({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).when(({idLike:l})=>l.includes("debian")||l.includes("ubuntu"),({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).when(({idLike:l})=>i==="arch"||l.includes("arch"),({id:l})=>({targetDistro:"debian",familyDistro:"arch",originalDistro:l})).when(({idLike:l})=>l.includes("centos")||l.includes("fedora")||l.includes("rhel")||l.includes("suse"),({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).otherwise(({id:l})=>({targetDistro:void 0,familyDistro:void 0,originalDistro:l}));return ne(`Found distro info: ${JSON.stringify(a,null,2)}`),a}async function Uu(){let e="/etc/os-release";try{let t=await ti.default.readFile(e,{encoding:"utf-8"});return Bu(t)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function Qu(e){let t=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(t){let r=`${t[1]}.x`;return Uo(r)}}function $o(e){let t=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(t){let r=`${t[1]}${t[2]??".0"}.x`;return Uo(r)}}function Uo(e){let t=(()=>{if(Go(e))return e;let r=e.split(".");return r[1]="0",r.join(".")})();if(ju.includes(t))return t}function Gu(e){return dt(e).with({familyDistro:"musl"},()=>(ne('Trying platform-specific paths for "alpine"'),["/lib","/usr/lib"])).with({familyDistro:"debian"},({archFromUname:t})=>(ne('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${t}-linux-gnu`,`/lib/${t}-linux-gnu`])).with({familyDistro:"rhel"},()=>(ne('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:t,arch:r,archFromUname:n})=>(ne(`Don't know any platform-specific paths for "${t}" on ${r} (${n})`),[]))}async function Ju(e){let t='grep -v "libssl.so.0"',r=await qo(e);if(r){ne(`Found libssl.so file using platform-specific paths: ${r}`);let o=$o(r);if(ne(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"libssl-specific-path"}}ne('Falling back to "ldconfig" and other generic paths');let n=await Gr(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${t}`);if(n||(n=await qo(["/lib64","/usr/lib64","/lib","/usr/lib"])),n){ne(`Found libssl.so file using "ldconfig" or other generic paths: ${n}`);let o=$o(n);if(ne(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"ldconfig"}}let i=await Gr("openssl version -v");if(i){ne(`Found openssl binary with version: ${i}`);let o=Qu(i);if(ne(`The parsed openssl version is: ${o}`),o)return{libssl:o,strategy:"openssl-binary"}}return ne("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function qo(e){for(let t of e){let r=await Wu(t);if(r)return r}}async function Wu(e){try{return(await ti.default.readdir(e)).find(r=>r.startsWith("libssl.so.")&&!r.startsWith("libssl.so.0"))}catch(t){if(t.code==="ENOENT")return;throw t}}async function nt(){let{binaryTarget:e}=await Qo();return e}function Hu(e){return e.binaryTarget!==void 0}async function ri(){let{memoized:e,...t}=await Qo();return t}var Ur={};async function Qo(){if(Hu(Ur))return Promise.resolve({...Ur,memoized:!0});let e=await Bo(),t=Ku(e);return Ur={...e,binaryTarget:t},{...Ur,memoized:!1}}function Ku(e){let{platform:t,arch:r,archFromUname:n,libssl:i,targetDistro:o,familyDistro:s,originalDistro:a}=e;t==="linux"&&!["x64","arm64"].includes(r)&&Br(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures (detected "${r}" instead). If you are using your own custom Prisma engines, you can ignore this warning, as long as you've compiled the engines for your system architecture "${n}".`);let l="1.1.x";if(t==="linux"&&i===void 0){let c=dt({familyDistro:s}).with({familyDistro:"debian"},()=>"Please manually install OpenSSL via `apt-get update -y && apt-get install -y openssl` and try installing Prisma again. If you're running Prisma on Docker, add this command to your Dockerfile, or switch to an image that already has OpenSSL installed.").otherwise(()=>"Please manually install OpenSSL and try installing Prisma again.");Br(`Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-${l}". ${c}`)}let u="debian";if(t==="linux"&&o===void 0&&ne(`Distro is "${a}". Falling back to Prisma engines built for "${u}".`),t==="darwin"&&r==="arm64")return"darwin-arm64";if(t==="darwin")return"darwin";if(t==="win32")return"windows";if(t==="freebsd")return o;if(t==="openbsd")return"openbsd";if(t==="netbsd")return"netbsd";if(t==="linux"&&o==="nixos")return"linux-nixos";if(t==="linux"&&r==="arm64")return`${o==="musl"?"linux-musl-arm64":"linux-arm64"}-openssl-${i||l}`;if(t==="linux"&&r==="arm")return`linux-arm-openssl-${i||l}`;if(t==="linux"&&o==="musl"){let c="linux-musl";return!i||Go(i)?c:`${c}-openssl-${i}`}return t==="linux"&&o&&i?`${o}-openssl-${i}`:(t!=="linux"&&Br(`Prisma detected unknown OS "${t}" and may not work as expected. Defaulting to "linux".`),i?`${u}-openssl-${i}`:o?`${o}-openssl-${l}`:`${u}-openssl-${l}`)}async function Yu(e){try{return await e()}catch{return}}function Gr(e){return Yu(async()=>{let t=await Vu(e);return ne(`Command "${e}" successfully returned "${t.stdout}"`),t.stdout})}async function zu(){return typeof Qr.default.machine=="function"?Qr.default.machine():(await Gr("uname -m"))?.trim()}function Go(e){return e.startsWith("1.")}var ns=_(rs());function ui(e){return(0,ns.default)(e,e,{fallback:X})}var nc=_(pi());var q=_(require("path")),ic=_(pi()),Wf=F("prisma:engines");function is(){return q.default.join(__dirname,"../")}var Hf="libquery-engine";q.default.join(__dirname,"../query-engine-darwin");q.default.join(__dirname,"../query-engine-darwin-arm64");q.default.join(__dirname,"../query-engine-debian-openssl-1.0.x");q.default.join(__dirname,"../query-engine-debian-openssl-1.1.x");q.default.join(__dirname,"../query-engine-debian-openssl-3.0.x");q.default.join(__dirname,"../query-engine-linux-static-x64");q.default.join(__dirname,"../query-engine-linux-static-arm64");q.default.join(__dirname,"../query-engine-rhel-openssl-1.0.x");q.default.join(__dirname,"../query-engine-rhel-openssl-1.1.x");q.default.join(__dirname,"../query-engine-rhel-openssl-3.0.x");q.default.join(__dirname,"../libquery_engine-darwin.dylib.node");q.default.join(__dirname,"../libquery_engine-darwin-arm64.dylib.node");q.default.join(__dirname,"../libquery_engine-debian-openssl-1.0.x.so.node");q.default.join(__dirname,"../libquery_engine-debian-openssl-1.1.x.so.node");q.default.join(__dirname,"../libquery_engine-debian-openssl-3.0.x.so.node");q.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.0.x.so.node");q.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.1.x.so.node");q.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-3.0.x.so.node");q.default.join(__dirname,"../libquery_engine-linux-musl.so.node");q.default.join(__dirname,"../libquery_engine-linux-musl-openssl-3.0.x.so.node");q.default.join(__dirname,"../libquery_engine-rhel-openssl-1.0.x.so.node");q.default.join(__dirname,"../libquery_engine-rhel-openssl-1.1.x.so.node");q.default.join(__dirname,"../libquery_engine-rhel-openssl-3.0.x.so.node");q.default.join(__dirname,"../query_engine-windows.dll.node");var di=_(require("fs")),os=F("chmodPlusX");function mi(e){if(process.platform==="win32")return;let t=di.default.statSync(e),r=t.mode|64|8|1;if(t.mode===r){os(`Execution permissions of ${e} are fine`);return}let n=r.toString(8).slice(-3);os(`Have to call chmodPlusX on ${e}`),di.default.chmodSync(e,n)}function fi(e){let t=e.e,r=a=>`Prisma cannot find the required \`${a}\` system library in your system`,n=t.message.includes("cannot open shared object file"),i=`Please refer to the documentation about Prisma's system requirements: ${ui("https://pris.ly/d/system-requirements")}`,o=`Unable to require(\`${ke(e.id)}\`).`,s=dt({message:t.message,code:t.code}).with({code:"ENOENT"},()=>"File does not exist.").when(({message:a})=>n&&a.includes("libz"),()=>`${r("libz")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libgcc_s"),()=>`${r("libgcc_s")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libssl"),()=>{let a=e.platformInfo.libssl?`openssl-${e.platformInfo.libssl}`:"openssl";return`${r("libssl")}. Please install ${a} and try again.`}).when(({message:a})=>a.includes("GLIBC"),()=>`Prisma has detected an incompatible version of the \`glibc\` C standard library installed in your system. This probably means your system may be too old to run Prisma. ${i}`).when(({message:a})=>e.platformInfo.platform==="linux"&&a.includes("symbol not found"),()=>`The Prisma engines are not compatible with your system ${e.platformInfo.originalDistro} on (${e.platformInfo.archFromUname}) which uses the \`${e.platformInfo.binaryTarget}\` binaryTarget by default. ${i}`).otherwise(()=>`The Prisma engines do not seem to be compatible with your system. ${i}`);return`${o} ${s} Details: ${t.message}`}var bi=_(cs()),Kr=_(require("fs"));var gt=_(require("path"));function ps(e){let t=e.ignoreProcessEnv?{}:process.env,r=n=>n.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g)?.reduce(function(o,s){let a=/(.?)\${([a-zA-Z0-9_]+)?}/g.exec(s);if(!a)return o;let l=a[1],u,c;if(l==="\\")c=a[0],u=c.replace("\\$","$");else{let p=a[2];c=a[0].substring(l.length),u=Object.hasOwnProperty.call(t,p)?t[p]:e.parsed[p]||"",u=r(u)}return o.replace(c,u)},n)??n;for(let n in e.parsed){let i=Object.hasOwnProperty.call(t,n)?t[n]:e.parsed[n];e.parsed[n]=r(i)}for(let n in e.parsed)t[n]=e.parsed[n];return e}var Ei=F("prisma:tryLoadEnv");function Yt({rootEnvPath:e,schemaEnvPath:t},r={conflictCheck:"none"}){let n=ds(e);r.conflictCheck!=="none"&&wc(n,t,r.conflictCheck);let i=null;return ms(n?.path,t)||(i=ds(t)),!n&&!i&&Ei("No Environment variables loaded"),i?.dotenvResult.error?console.error(de(H("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(` `),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function wc(e,t,r){let n=e?.dotenvResult.parsed,i=!ms(e?.path,t);if(n&&t&&i&&Kr.default.existsSync(t)){let o=bi.default.parse(Kr.default.readFileSync(t)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=gt.default.relative(process.cwd(),e.path),l=gt.default.relative(process.cwd(),t);if(r==="error"){let u=`There is a conflict between env var${s.length>1?"s":""} in ${X(a)} and ${X(l)} Conflicting env vars: ${s.map(c=>` ${H(c)}`).join(` `)} We suggest to move the contents of ${X(l)} to ${X(a)} to consolidate your env vars. `;throw new Error(u)}else if(r==="warn"){let u=`Conflict for env var${s.length>1?"s":""} ${s.map(c=>H(c)).join(", ")} in ${X(a)} and ${X(l)} Env vars from ${X(l)} overwrite the ones from ${X(a)} `;console.warn(`${_e("warn(prisma)")} ${u}`)}}}}function ds(e){if(xc(e)){Ei(`Environment variables loaded from ${e}`);let t=bi.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:ps(t),message:ke(`Environment variables loaded from ${gt.default.relative(process.cwd(),e)}`),path:e}}else Ei(`Environment variables not found at ${e}`);return null}function ms(e,t){return e&&t&&gt.default.resolve(e)===gt.default.resolve(t)}function xc(e){return!!(e&&Kr.default.existsSync(e))}var fs="library";function ht(e){let t=Pc();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":fs)}function Pc(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}var bs="prisma+postgres",Yr=`${bs}:`;function wi(e){return e?.startsWith(`${Yr}//`)??!1}var zt;(t=>{let e;(A=>(A.findUnique="findUnique",A.findUniqueOrThrow="findUniqueOrThrow",A.findFirst="findFirst",A.findFirstOrThrow="findFirstOrThrow",A.findMany="findMany",A.create="create",A.createMany="createMany",A.createManyAndReturn="createManyAndReturn",A.update="update",A.updateMany="updateMany",A.updateManyAndReturn="updateManyAndReturn",A.upsert="upsert",A.delete="delete",A.deleteMany="deleteMany",A.groupBy="groupBy",A.count="count",A.aggregate="aggregate",A.findRaw="findRaw",A.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(zt||={});var Zt=_(require("path"));function xi(e){return Zt.default.sep===Zt.default.posix.sep?e:e.split(Zt.default.sep).join(Zt.default.posix.sep)}var xs=_(Pi());function Ti(e){return String(new vi(e))}var vi=class{constructor(t){this.config=t}toString(){let{config:t}=this,r=t.provider.fromEnvVar?`env("${t.provider.fromEnvVar}")`:t.provider.value,n=JSON.parse(JSON.stringify({provider:r,binaryTargets:Tc(t.binaryTargets)}));return`generator ${t.name} { ${(0,xs.default)(Rc(n),2)} }`}};function Tc(e){let t;if(e.length>0){let r=e.find(n=>n.fromEnvVar!==null);r?t=`env("${r.fromEnvVar}")`:t=e.map(n=>n.native?"native":n.value)}else t=void 0;return t}function Rc(e){let t=Object.keys(e).reduce((r,n)=>Math.max(r,n.length),0);return Object.entries(e).map(([r,n])=>`${r.padEnd(t)} = ${Cc(n)}`).join(` `)}function Cc(e){return JSON.parse(JSON.stringify(e,(t,r)=>Array.isArray(r)?`[${r.map(n=>JSON.stringify(n)).join(", ")}]`:JSON.stringify(r)))}var er={};Ut(er,{error:()=>Ic,info:()=>Ac,log:()=>Sc,query:()=>Oc,should:()=>Ps,tags:()=>Xt,warn:()=>Ri});var Xt={error:de("prisma:error"),warn:_e("prisma:warn"),info:De("prisma:info"),query:rt("prisma:query")},Ps={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Sc(...e){console.log(...e)}function Ri(e,...t){Ps.warn()&&console.warn(`${Xt.warn} ${e}`,...t)}function Ac(e,...t){console.info(`${Xt.info} ${e}`,...t)}function Ic(e,...t){console.error(`${Xt.error} ${e}`,...t)}function Oc(e,...t){console.log(`${Xt.query} ${e}`,...t)}function zr(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}function Fe(e,t){throw new Error(t)}function Si(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Ai=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});function yt(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function Ii(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n<e.length;n++)t(r,e[n])<0&&(r=e[n]);return r}function w(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}var Ss=new Set,tr=(e,t,...r)=>{Ss.has(e)||(Ss.add(e),Ri(t,...r))};var T=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};w(T,"PrismaClientInitializationError");var ee=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};w(ee,"PrismaClientKnownRequestError");var ce=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};w(ce,"PrismaClientRustPanicError");var B=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};w(B,"PrismaClientUnknownRequestError");var te=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};w(te,"PrismaClientValidationError");var Et=9e15,Ye=1e9,Oi="0123456789abcdef",tn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",rn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",ki={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Et,maxE:Et,crypto:!1},ks,Me,b=!0,on="[DecimalError] ",Ke=on+"Invalid argument: ",_s=on+"Precision limit exceeded",Ds=on+"crypto unavailable",Ns="[object Decimal]",re=Math.floor,G=Math.pow,_c=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Dc=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Nc=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ls=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,he=1e7,E=7,Lc=9007199254740991,Fc=tn.length-1,_i=rn.length-1,m={toStringTag:Ns};m.absoluteValue=m.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),y(e)};m.ceil=function(){return y(new this.constructor(this),this.e+1,2)};m.clampedTo=m.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(Ke+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};m.comparedTo=m.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=n<i?n:i;t<r;++t)if(s[t]!==a[t])return s[t]>a[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};m.cosine=m.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+E,n.rounding=1,r=Mc(n,Vs(n,r)),n.precision=e,n.rounding=t,y(Me==2||Me==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};m.cubeRoot=m.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,c=this,p=c.constructor;if(!c.isFinite()||c.isZero())return new p(c);for(b=!1,o=c.s*G(c.s*c,1/3),!o||Math.abs(o)==1/0?(r=K(c.d),e=c.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=G(r,1/3),e=re((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new p(r),n.s=c.s):n=new p(o.toString()),s=(e=p.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(c),n=M(u.plus(c).times(a),u.plus(l),s+2,1),K(a.d).slice(0,s)===(r=K(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(y(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(y(n,e+1,1),t=!n.times(n).times(n).eq(c));break}return b=!0,y(n,e,p.rounding,t)};m.decimalPlaces=m.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-re(this.e/E))*E,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};m.dividedBy=m.div=function(e){return M(this,new this.constructor(e))};m.dividedToIntegerBy=m.divToInt=function(e){var t=this,r=t.constructor;return y(M(t,new r(e),0,1,1),r.precision,r.rounding)};m.equals=m.eq=function(e){return this.cmp(e)===0};m.floor=function(){return y(new this.constructor(this),this.e+1,3)};m.greaterThan=m.gt=function(e){return this.cmp(e)>0};m.greaterThanOrEqualTo=m.gte=function(e){var t=this.cmp(e);return t==1||t===0};m.hyperbolicCosine=m.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/an(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=bt(s,1,o.times(t),new s(1),!0);for(var l,u=e,c=new s(8);u--;)l=o.times(o),o=a.minus(l.times(c.minus(l.times(c))));return y(o,s.precision=r,s.rounding=n,!0)};m.hyperbolicSine=m.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=bt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/an(5,e)),i=bt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,y(i,t,r,!0)};m.hyperbolicTangent=m.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,M(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};m.inverseCosine=m.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?ge(r,i,o):new r(0):new r(NaN):t.isZero()?ge(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=ge(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};m.inverseHyperbolicCosine=m.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,b=!1,r=r.times(r).minus(1).sqrt().plus(r),b=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};m.inverseHyperbolicSine=m.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,b=!1,r=r.times(r).plus(1).sqrt().plus(r),b=!0,n.precision=e,n.rounding=t,r.ln())};m.inverseHyperbolicTangent=m.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?y(new o(i),e,t,!0):(o.precision=r=n-i.e,i=M(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};m.inverseSine=m.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=ge(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};m.inverseTangent=m.atan=function(){var e,t,r,n,i,o,s,a,