UNPKG

@axiia/prisma-client-denofix

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.

33 lines (31 loc) 201 kB
// @ts-self-types="./library.d.mts" import * as __banner_node_module from "node:module"; import * as __banner_node_path from "node:path"; import * as process from "node:process"; import * as __banner_node_url from "node:url"; import * as __banner_node_buffer from "node:buffer"; if (!globalThis.Buffer) { globalThis.Buffer = __banner_node_buffer.Buffer } const __filename = __banner_node_url.fileURLToPath(import.meta.url); const __dirname = __banner_node_path.dirname(__filename); const require = __banner_node_module.createRequire(import.meta.url); var eu=Object.create;var Qn=Object.defineProperty;var ru=Object.getOwnPropertyDescriptor;var tu=Object.getOwnPropertyNames;var nu=Object.getPrototypeOf,iu=Object.prototype.hasOwnProperty;var fr=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,t)=>(typeof require<"u"?require:r)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ro=(e,r)=>()=>(e&&(r=e(e=0)),r);var te=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),gr=(e,r)=>{for(var t in r)Qn(e,t,{get:r[t],enumerable:!0})},ou=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of tu(r))!iu.call(e,i)&&i!==t&&Qn(e,i,{get:()=>r[i],enumerable:!(n=ru(r,i))||n.enumerable});return e};var se=(e,r,t)=>(t=e!=null?eu(nu(e)):{},ou(r||!e||!e.__esModule?Qn(t,"default",{value:e,enumerable:!0}):t,e));var ii=te(($g,Xo)=>{"use strict";Xo.exports=(e,r=process.argv)=>{let t=e.startsWith("-")?"":e.length===1?"-":"--",n=r.indexOf(t+e),i=r.indexOf("--");return n!==-1&&(i===-1||n<i)}});var ts=te((qg,rs)=>{"use strict";var vc=fr("node:os"),es=fr("node:tty"),pe=ii(),{env:U}=process,Qe;pe("no-color")||pe("no-colors")||pe("color=false")||pe("color=never")?Qe=0:(pe("color")||pe("colors")||pe("color=true")||pe("color=always"))&&(Qe=1);"FORCE_COLOR"in U&&(U.FORCE_COLOR==="true"?Qe=1:U.FORCE_COLOR==="false"?Qe=0:Qe=U.FORCE_COLOR.length===0?1:Math.min(parseInt(U.FORCE_COLOR,10),3));function oi(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function si(e,r){if(Qe===0)return 0;if(pe("color=16m")||pe("color=full")||pe("color=truecolor"))return 3;if(pe("color=256"))return 2;if(e&&!r&&Qe===void 0)return 0;let t=Qe||0;if(U.TERM==="dumb")return t;if(process.platform==="win32"){let n=vc.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in U)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in U)||U.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in U)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(U.TEAMCITY_VERSION)?1:0;if(U.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in U){let n=parseInt((U.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(U.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(U.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(U.TERM)||"COLORTERM"in U?1:t}function Pc(e){let r=si(e,e&&e.isTTY);return oi(r)}rs.exports={supportsColor:Pc,stdout:oi(si(!0,es.isatty(1))),stderr:oi(si(!0,es.isatty(2)))}});var os=te((jg,is)=>{"use strict";var Tc=ts(),Er=ii();function ns(e){if(/^\d{3,4}$/.test(e)){let t=/(\d{1,2})(\d{2})/.exec(e)||[];return{major:0,minor:parseInt(t[1],10),patch:parseInt(t[2],10)}}let r=(e||"").split(".").map(t=>parseInt(t,10));return{major:r[0],minor:r[1],patch:r[2]}}function ai(e){let{CI:r,FORCE_HYPERLINK:t,NETLIFY:n,TEAMCITY_VERSION:i,TERM_PROGRAM:o,TERM_PROGRAM_VERSION:s,VTE_VERSION:a,TERM:l}=process.env;if(t)return!(t.length>0&&parseInt(t,10)===0);if(Er("no-hyperlink")||Er("no-hyperlinks")||Er("hyperlink=false")||Er("hyperlink=never"))return!1;if(Er("hyperlink=true")||Er("hyperlink=always")||n)return!0;if(!Tc.supportsColor(e)||e&&!e.isTTY)return!1;if("WT_SESSION"in process.env)return!0;if(process.platform==="win32"||r||i)return!1;if(o){let u=ns(s||"");switch(o){case"iTerm.app":return u.major===3?u.minor>=1:u.major>3;case"WezTerm":return u.major>=20200620;case"vscode":return u.major>1||u.major===1&&u.minor>=72;case"ghostty":return!0}}if(a){if(a==="0.50.0")return!1;let u=ns(a);return u.major>0||u.minor>=50}switch(l){case"alacritty":return!0}return!1}is.exports={supportsHyperlink:ai,stdout:ai(process.stdout),stderr:ai(process.stderr)}});var ss=te((Xg,Sc)=>{Sc.exports={name:"@prisma/internals",version:"6.6.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek <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.4.7",esbuild:"0.25.1","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","read-package-up":"11.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.6.0-53.f676762280b54cd07c770017ed3711ddde35f37a","@prisma/schema-engine-wasm":"6.6.0-53.f676762280b54cd07c770017ed3711ddde35f37a","@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 ci=te((th,Ac)=>{Ac.exports={name:"@prisma/engines-version",version:"6.6.0-53.f676762280b54cd07c770017ed3711ddde35f37a",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"f676762280b54cd07c770017ed3711ddde35f37a"},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 pi=te(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.enginesVersion=void 0;Jt.enginesVersion=ci().prisma.enginesVersion});var ds=te((Ph,ps)=>{"use strict";ps.exports=e=>{let r=e.match(/^[ \t]*(?=\S)/gm);return r?r.reduce((t,n)=>Math.min(t,n.length),1/0):0}});var hi=te((Rh,gs)=>{"use strict";gs.exports=(e,r=1,t)=>{if(t={indent:" ",includeEmptyLines:!1,...t},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof r!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof r}\``);if(typeof t.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t.indent}\``);if(r===0)return e;let n=t.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,t.indent.repeat(r))}});var Es=te((Ih,bs)=>{"use strict";bs.exports=({onlyFirst:e=!1}={})=>{let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}});var wi=te((kh,ws)=>{"use strict";var $c=Es();ws.exports=e=>typeof e=="string"?e.replace($c(),""):e});var xs=te((Lh,qc)=>{qc.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 Ss=te((Fh,_e)=>{"use strict";var vi=fr("node:fs"),Pi=fr("node:path"),jc=fr("node:os"),Vc=fr("node:crypto"),Bc=xs(),Ti=Bc.version,Uc=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Gc(e){let r={},t=e.toString();t=t.replace(/\r\n?/mg,` `);let n;for(;(n=Uc.exec(t))!=null;){let i=n[1],o=n[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,` `),o=o.replace(/\\r/g,"\r")),r[i]=o}return r}function Qc(e){let r=Ts(e),t=V.configDotenv({path:r});if(!t.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${r} for an unknown reason`);throw s.code="MISSING_DATA",s}let n=Ps(e).split(","),i=n.length,o;for(let s=0;s<i;s++)try{let a=n[s].trim(),l=Hc(t,a);o=V.decrypt(l.ciphertext,l.key);break}catch(a){if(s+1>=i)throw a}return V.parse(o)}function Wc(e){console.log(`[dotenv@${Ti}][INFO] ${e}`)}function Jc(e){console.log(`[dotenv@${Ti}][WARN] ${e}`)}function zt(e){console.log(`[dotenv@${Ti}][DEBUG] ${e}`)}function Ps(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 Hc(e,r){let t;try{t=new URL(r)}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let n=t.password;if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let i=t.searchParams.get("environment");if(!i){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let o=`DOTENV_VAULT_${i.toUpperCase()}`,s=e.parsed[o];if(!s){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:s,key:n}}function Ts(e){let r=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let t of e.path)vi.existsSync(t)&&(r=t.endsWith(".vault")?t:`${t}.vault`);else r=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else r=Pi.resolve(process.cwd(),".env.vault");return vi.existsSync(r)?r:null}function vs(e){return e[0]==="~"?Pi.join(jc.homedir(),e.slice(1)):e}function Kc(e){Wc("Loading env from encrypted .env.vault");let r=V._parseVault(e),t=process.env;return e&&e.processEnv!=null&&(t=e.processEnv),V.populate(t,r,e),{parsed:r}}function Yc(e){let r=Pi.resolve(process.cwd(),".env"),t="utf8",n=!!(e&&e.debug);e&&e.encoding?t=e.encoding:n&&zt("No encoding is specified. UTF-8 is used by default");let i=[r];if(e&&e.path)if(!Array.isArray(e.path))i=[vs(e.path)];else{i=[];for(let l of e.path)i.push(vs(l))}let o,s={};for(let l of i)try{let u=V.parse(vi.readFileSync(l,{encoding:t}));V.populate(s,u,e)}catch(u){n&&zt(`Failed to load ${l} ${u.message}`),o=u}let a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),V.populate(a,s,e),o?{parsed:s,error:o}:{parsed:s}}function zc(e){if(Ps(e).length===0)return V.configDotenv(e);let r=Ts(e);return r?V._configVault(e):(Jc(`You set DOTENV_KEY but you are missing a .env.vault file at ${r}. Did you forget to build it?`),V.configDotenv(e))}function Zc(e,r){let t=Buffer.from(r.slice(-64),"hex"),n=Buffer.from(e,"base64"),i=n.subarray(0,12),o=n.subarray(-16);n=n.subarray(12,-16);try{let s=Vc.createDecipheriv("aes-256-gcm",t,i);return s.setAuthTag(o),`${s.update(n)}${s.final()}`}catch(s){let a=s instanceof RangeError,l=s.message==="Invalid key length",u=s.message==="Unsupported state or unable to authenticate data";if(a||l){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(u){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw s}}function Xc(e,r,t={}){let n=!!(t&&t.debug),i=!!(t&&t.override);if(typeof r!="object"){let o=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw o.code="OBJECT_REQUIRED",o}for(let o of Object.keys(r))Object.prototype.hasOwnProperty.call(e,o)?(i===!0&&(e[o]=r[o]),n&&zt(i===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=r[o]}var V={configDotenv:Yc,_configVault:Kc,_parseVault:Qc,config:zc,decrypt:Zc,parse:Gc,populate:Xc};_e.exports.configDotenv=V.configDotenv;_e.exports._configVault=V._configVault;_e.exports._parseVault=V._parseVault;_e.exports.config=V.config;_e.exports.decrypt=V.decrypt;_e.exports.parse=V.parse;_e.exports.populate=V.populate;_e.exports=V});var Is=te((Gh,Zt)=>{"use strict";Zt.exports=(e={})=>{let r;if(e.repoUrl)r=e.repoUrl;else if(e.user&&e.repo)r=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let t=new URL(`${r}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}t.searchParams.set(i,o)}}return t.toString()};Zt.exports.default=Zt.exports});var Fi=te((vb,Ys)=>{"use strict";Ys.exports=function(){function e(r,t,n,i,o){return r<t||n<t?r>n?n+1:r+1:i===o?t:t+1}return function(r,t){if(r===t)return 0;if(r.length>t.length){var n=r;r=t,t=n}for(var i=r.length,o=t.length;i>0&&r.charCodeAt(i-1)===t.charCodeAt(o-1);)i--,o--;for(var s=0;s<i&&r.charCodeAt(s)===t.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,I,P,S,b,k=[];for(l=0;l<i;l++)k.push(l+1),k.push(r.charCodeAt(s+l));for(var me=k.length-1;a<o-3;)for(I=t.charCodeAt(s+(u=a)),P=t.charCodeAt(s+(c=a+1)),S=t.charCodeAt(s+(p=a+2)),b=t.charCodeAt(s+(d=a+3)),f=a+=4,l=0;l<me;l+=2)g=k[l],h=k[l+1],u=e(g,u,c,I,h),c=e(u,c,p,P,h),p=e(c,p,d,S,h),f=e(p,d,f,b,h),k[l]=f,d=p,p=c,c=u,u=g;for(;a<o;)for(I=t.charCodeAt(s+(u=a)),f=++a,l=0;l<me;l+=2)g=k[l],k[l]=f=e(g,u,f,I,k[l+1]),u=g;return f}}()});var ra=Ro(()=>{"use strict"});var ta=Ro(()=>{"use strict"});var Io={};gr(Io,{defineExtension:()=>Co,getExtensionContext:()=>Ao});function Co(e){return typeof e=="function"?e:r=>r.$extends(e)}function Ao(e){return e}var Oo={};gr(Oo,{validator:()=>ko});function ko(...e){return r=>r}var Ft={};gr(Ft,{$:()=>Fo,bgBlack:()=>gu,bgBlue:()=>Eu,bgCyan:()=>xu,bgGreen:()=>yu,bgMagenta:()=>wu,bgRed:()=>hu,bgWhite:()=>vu,bgYellow:()=>bu,black:()=>pu,blue:()=>tr,bold:()=>Q,cyan:()=>ke,dim:()=>Ae,gray:()=>Wr,green:()=>qe,grey:()=>fu,hidden:()=>uu,inverse:()=>lu,italic:()=>au,magenta:()=>du,red:()=>ue,reset:()=>su,strikethrough:()=>cu,underline:()=>K,white:()=>mu,yellow:()=>Ie});var Wn,Do,_o,No,Lo=!0;typeof process<"u"&&({FORCE_COLOR:Wn,NODE_DISABLE_COLORS:Do,NO_COLOR:_o,TERM:No}=process.env||{},Lo=process.stdout&&process.stdout.isTTY);var Fo={enabled:!Do&&_o==null&&No!=="dumb"&&(Wn!=null&&Wn!=="0"||Lo)};function N(e,r){let t=new RegExp(`\\x1b\\[${r}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${r}m`;return function(o){return!Fo.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(t,i+n):o)+i}}var su=N(0,0),Q=N(1,22),Ae=N(2,22),au=N(3,23),K=N(4,24),lu=N(7,27),uu=N(8,28),cu=N(9,29),pu=N(30,39),ue=N(31,39),qe=N(32,39),Ie=N(33,39),tr=N(34,39),du=N(35,39),ke=N(36,39),mu=N(37,39),Wr=N(90,39),fu=N(90,39),gu=N(40,49),hu=N(41,49),yu=N(42,49),bu=N(43,49),Eu=N(44,49),wu=N(45,49),xu=N(46,49),vu=N(47,49);var Pu=100,Mo=["green","yellow","blue","magenta","cyan","red"],Jr=[],$o=Date.now(),Tu=0,Jn=typeof process<"u"?process.env:{};globalThis.DEBUG??=Jn.DEBUG??"";globalThis.DEBUG_COLORS??=Jn.DEBUG_COLORS?Jn.DEBUG_COLORS==="true":!0;var Hr={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let r=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),t=r.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=r.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return t&&!n},log:(...e)=>{let[r,t,...n]=e;(console.warn??console.log)(`${r} ${t}`,...n)},formatters:{}};function Su(e){let r={color:Mo[Tu++%Mo.length],enabled:Hr.enabled(e),namespace:e,log:Hr.log,extend:()=>{}},t=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=r;if(n.length!==0&&Jr.push([o,...n]),Jr.length>Pu&&Jr.shift(),Hr.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:Ru(c)),u=`+${Date.now()-$o}ms`;$o=Date.now(),globalThis.DEBUG_COLORS?a(Ft[s](Q(o)),...l,Ft[s](u)):a(o,...l,u)}};return new Proxy(t,{get:(n,i)=>r[i],set:(n,i,o)=>r[i]=o})}var L=new Proxy(Su,{get:(e,r)=>Hr[r],set:(e,r,t)=>Hr[r]=t});function Ru(e,r=2){let t=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(t.has(i))return"[Circular *]";t.add(i)}else if(typeof i=="bigint")return i.toString();return i},r)}function qo(e=7500){let r=Jr.map(([t,...n])=>`${t} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` `);return r.length<e?r:r.slice(-e)}function jo(){Jr.length=0}var hr=L;import Cu from"node:fs";function Hn(){let e=process.env.PRISMA_QUERY_ENGINE_LIBRARY;if(!(e&&Cu.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 Kn=["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 Mt="libquery_engine";function $t(e,r){let t=r==="url";return e.includes("windows")?t?"query_engine.dll.node":`query_engine-${e}.dll.node`:e.includes("darwin")?t?`${Mt}.dylib.node`:`${Mt}-${e}.dylib.node`:t?`${Mt}.so.node`:`${Mt}-${e}.so.node`}import _u from"node:child_process";import Go from"node:fs/promises";import ei from"node:os";var Oe=Symbol.for("@ts-pattern/matcher"),Au=Symbol.for("@ts-pattern/isVariadic"),jt="@ts-pattern/anonymous-select-key",Yn=e=>!!(e&&typeof e=="object"),qt=e=>e&&!!e[Oe],Ee=(e,r,t)=>{if(qt(e)){let n=e[Oe](),{matched:i,selections:o}=n.match(r);return i&&o&&Object.keys(o).forEach(s=>t(s,o[s])),i}if(Yn(e)){if(!Yn(r))return!1;if(Array.isArray(e)){if(!Array.isArray(r))return!1;let n=[],i=[],o=[];for(let s of e.keys()){let a=e[s];qt(a)&&a[Au]?o.push(a):o.length?i.push(a):n.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(r.length<n.length+i.length)return!1;let s=r.slice(0,n.length),a=i.length===0?[]:r.slice(-i.length),l=r.slice(n.length,i.length===0?1/0:-i.length);return n.every((u,c)=>Ee(u,s[c],t))&&i.every((u,c)=>Ee(u,a[c],t))&&(o.length===0||Ee(o[0],l,t))}return e.length===r.length&&e.every((s,a)=>Ee(s,r[a],t))}return Reflect.ownKeys(e).every(n=>{let i=e[n];return(n in r||qt(o=i)&&o[Oe]().matcherType==="optional")&&Ee(i,r[n],t);var o})}return Object.is(r,e)},Ge=e=>{var r,t,n;return Yn(e)?qt(e)?(r=(t=(n=e[Oe]()).getSelectionKeys)==null?void 0:t.call(n))!=null?r:[]:Array.isArray(e)?Kr(e,Ge):Kr(Object.values(e),Ge):[]},Kr=(e,r)=>e.reduce((t,n)=>t.concat(r(n)),[]);function ce(e){return Object.assign(e,{optional:()=>Iu(e),and:r=>$(e,r),or:r=>ku(e,r),select:r=>r===void 0?Vo(e):Vo(r,e)})}function Iu(e){return ce({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return r===void 0?(Ge(e).forEach(i=>n(i,void 0)),{matched:!0,selections:t}):{matched:Ee(e,r,n),selections:t}},getSelectionKeys:()=>Ge(e),matcherType:"optional"})})}function $(...e){return ce({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return{matched:e.every(i=>Ee(i,r,n)),selections:t}},getSelectionKeys:()=>Kr(e,Ge),matcherType:"and"})})}function ku(...e){return ce({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return Kr(e,Ge).forEach(i=>n(i,void 0)),{matched:e.some(i=>Ee(i,r,n)),selections:t}},getSelectionKeys:()=>Kr(e,Ge),matcherType:"or"})})}function C(e){return{[Oe]:()=>({match:r=>({matched:!!e(r)})})}}function Vo(...e){let r=typeof e[0]=="string"?e[0]:void 0,t=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return ce({[Oe]:()=>({match:n=>{let i={[r??jt]:n};return{matched:t===void 0||Ee(t,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[r??jt].concat(t===void 0?[]:Ge(t))})})}function ye(e){return typeof e=="number"}function je(e){return typeof e=="string"}function Ve(e){return typeof e=="bigint"}var eg=ce(C(function(e){return!0}));var Be=e=>Object.assign(ce(e),{startsWith:r=>{return Be($(e,(t=r,C(n=>je(n)&&n.startsWith(t)))));var t},endsWith:r=>{return Be($(e,(t=r,C(n=>je(n)&&n.endsWith(t)))));var t},minLength:r=>Be($(e,(t=>C(n=>je(n)&&n.length>=t))(r))),length:r=>Be($(e,(t=>C(n=>je(n)&&n.length===t))(r))),maxLength:r=>Be($(e,(t=>C(n=>je(n)&&n.length<=t))(r))),includes:r=>{return Be($(e,(t=r,C(n=>je(n)&&n.includes(t)))));var t},regex:r=>{return Be($(e,(t=r,C(n=>je(n)&&!!n.match(t)))));var t}}),rg=Be(C(je)),be=e=>Object.assign(ce(e),{between:(r,t)=>be($(e,((n,i)=>C(o=>ye(o)&&n<=o&&i>=o))(r,t))),lt:r=>be($(e,(t=>C(n=>ye(n)&&n<t))(r))),gt:r=>be($(e,(t=>C(n=>ye(n)&&n>t))(r))),lte:r=>be($(e,(t=>C(n=>ye(n)&&n<=t))(r))),gte:r=>be($(e,(t=>C(n=>ye(n)&&n>=t))(r))),int:()=>be($(e,C(r=>ye(r)&&Number.isInteger(r)))),finite:()=>be($(e,C(r=>ye(r)&&Number.isFinite(r)))),positive:()=>be($(e,C(r=>ye(r)&&r>0))),negative:()=>be($(e,C(r=>ye(r)&&r<0)))}),tg=be(C(ye)),Ue=e=>Object.assign(ce(e),{between:(r,t)=>Ue($(e,((n,i)=>C(o=>Ve(o)&&n<=o&&i>=o))(r,t))),lt:r=>Ue($(e,(t=>C(n=>Ve(n)&&n<t))(r))),gt:r=>Ue($(e,(t=>C(n=>Ve(n)&&n>t))(r))),lte:r=>Ue($(e,(t=>C(n=>Ve(n)&&n<=t))(r))),gte:r=>Ue($(e,(t=>C(n=>Ve(n)&&n>=t))(r))),positive:()=>Ue($(e,C(r=>Ve(r)&&r>0))),negative:()=>Ue($(e,C(r=>Ve(r)&&r<0)))}),ng=Ue(C(Ve)),ig=ce(C(function(e){return typeof e=="boolean"})),og=ce(C(function(e){return typeof e=="symbol"})),sg=ce(C(function(e){return e==null})),ag=ce(C(function(e){return e!=null}));var zn=class extends Error{constructor(r){let t;try{t=JSON.stringify(r)}catch{t=r}super(`Pattern matching error: no pattern matches value ${t}`),this.input=void 0,this.input=r}},Zn={matched:!1,value:void 0};function yr(e){return new Xn(e,Zn)}var Xn=class e{constructor(r,t){this.input=void 0,this.state=void 0,this.input=r,this.state=t}with(...r){if(this.state.matched)return this;let t=r[r.length-1],n=[r[0]],i;r.length===3&&typeof r[1]=="function"?i=r[1]:r.length>2&&n.push(...r.slice(1,r.length-1));let o=!1,s={},a=(u,c)=>{o=!0,s[u]=c},l=!n.some(u=>Ee(u,this.input,a))||i&&!i(this.input)?Zn:{matched:!0,value:t(o?jt in s?s[jt]:s:this.input,this.input)};return new e(this.input,l)}when(r,t){if(this.state.matched)return this;let n=!!r(this.input);return new e(this.input,n?{matched:!0,value:t(this.input,this.input)}:Zn)}otherwise(r){return this.state.matched?this.state.value:r(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new zn(this.input)}run(){return this.exhaustive()}returnType(){return this}};import{promisify as Nu}from"node:util";var Ou={warn:Ie("prisma:warn")},Du={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Vt(e,...r){Du.warn()&&console.warn(`${Ou.warn} ${e}`,...r)}var Lu=Nu(_u.exec),z=hr("prisma:get-platform"),Fu=["1.0.x","1.1.x","3.0.x"];async function Qo(){let e=ei.platform(),r=process.arch;if(e==="freebsd"){let s=await Ut("freebsd-version");if(s&&s.trim().length>0){let l=/^(\d+)\.?/.exec(s);if(l)return{platform:"freebsd",targetDistro:`freebsd${l[1]}`,arch:r}}}if(e!=="linux")return{platform:e,arch:r};let t=await $u(),n=await Wu(),i=ju({arch:r,archFromUname:n,familyDistro:t.familyDistro}),{libssl:o}=await Vu(i);return{platform:"linux",libssl:o,arch:r,archFromUname:n,...t}}function Mu(e){let r=/^ID="?([^"\n]*)"?$/im,t=/^ID_LIKE="?([^"\n]*)"?$/im,n=r.exec(e),i=n&&n[1]&&n[1].toLowerCase()||"",o=t.exec(e),s=o&&o[1]&&o[1].toLowerCase()||"",a=yr({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 z(`Found distro info: ${JSON.stringify(a,null,2)}`),a}async function $u(){let e="/etc/os-release";try{let r=await Go.readFile(e,{encoding:"utf-8"});return Mu(r)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function qu(e){let r=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(r){let t=`${r[1]}.x`;return Wo(t)}}function Bo(e){let r=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(r){let t=`${r[1]}${r[2]??".0"}.x`;return Wo(t)}}function Wo(e){let r=(()=>{if(Ho(e))return e;let t=e.split(".");return t[1]="0",t.join(".")})();if(Fu.includes(r))return r}function ju(e){return yr(e).with({familyDistro:"musl"},()=>(z('Trying platform-specific paths for "alpine"'),["/lib","/usr/lib"])).with({familyDistro:"debian"},({archFromUname:r})=>(z('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${r}-linux-gnu`,`/lib/${r}-linux-gnu`])).with({familyDistro:"rhel"},()=>(z('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:r,arch:t,archFromUname:n})=>(z(`Don't know any platform-specific paths for "${r}" on ${t} (${n})`),[]))}async function Vu(e){let r='grep -v "libssl.so.0"',t=await Uo(e);if(t){z(`Found libssl.so file using platform-specific paths: ${t}`);let o=Bo(t);if(z(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"libssl-specific-path"}}z('Falling back to "ldconfig" and other generic paths');let n=await Ut(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${r}`);if(n||(n=await Uo(["/lib64","/usr/lib64","/lib","/usr/lib"])),n){z(`Found libssl.so file using "ldconfig" or other generic paths: ${n}`);let o=Bo(n);if(z(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"ldconfig"}}let i=await Ut("openssl version -v");if(i){z(`Found openssl binary with version: ${i}`);let o=qu(i);if(z(`The parsed openssl version is: ${o}`),o)return{libssl:o,strategy:"openssl-binary"}}return z("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function Uo(e){for(let r of e){let t=await Bu(r);if(t)return t}}async function Bu(e){try{return(await Go.readdir(e)).find(t=>t.startsWith("libssl.so.")&&!t.startsWith("libssl.so.0"))}catch(r){if(r.code==="ENOENT")return;throw r}}async function nr(){let{binaryTarget:e}=await Jo();return e}function Uu(e){return e.binaryTarget!==void 0}async function ri(){let{memoized:e,...r}=await Jo();return r}var Bt={};async function Jo(){if(Uu(Bt))return Promise.resolve({...Bt,memoized:!0});let e=await Qo(),r=Gu(e);return Bt={...e,binaryTarget:r},{...Bt,memoized:!1}}function Gu(e){let{platform:r,arch:t,archFromUname:n,libssl:i,targetDistro:o,familyDistro:s,originalDistro:a}=e;r==="linux"&&!["x64","arm64"].includes(t)&&Vt(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures (detected "${t}" instead). If you are using your own custom Prisma engines, you can ignore this warning, as long as you've compiled the engines for your system architecture "${n}".`);let l="1.1.x";if(r==="linux"&&i===void 0){let c=yr({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.");Vt(`Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-${l}". ${c}`)}let u="debian";if(r==="linux"&&o===void 0&&z(`Distro is "${a}". Falling back to Prisma engines built for "${u}".`),r==="darwin"&&t==="arm64")return"darwin-arm64";if(r==="darwin")return"darwin";if(r==="win32")return"windows";if(r==="freebsd")return o;if(r==="openbsd")return"openbsd";if(r==="netbsd")return"netbsd";if(r==="linux"&&o==="nixos")return"linux-nixos";if(r==="linux"&&t==="arm64")return`${o==="musl"?"linux-musl-arm64":"linux-arm64"}-openssl-${i||l}`;if(r==="linux"&&t==="arm")return`linux-arm-openssl-${i||l}`;if(r==="linux"&&o==="musl"){let c="linux-musl";return!i||Ho(i)?c:`${c}-openssl-${i}`}return r==="linux"&&o&&i?`${o}-openssl-${i}`:(r!=="linux"&&Vt(`Prisma detected unknown OS "${r}" and may not work as expected. Defaulting to "linux".`),i?`${u}-openssl-${i}`:o?`${o}-openssl-${l}`:`${u}-openssl-${l}`)}async function Qu(e){try{return await e()}catch{return}}function Ut(e){return Qu(async()=>{let r=await Lu(e);return z(`Command "${e}" successfully returned "${r.stdout}"`),r.stdout})}async function Wu(){return typeof ei.machine=="function"?ei.machine():(await Ut("uname -m"))?.trim()}function Ho(e){return e.startsWith("1.")}var Qt={};gr(Qt,{beep:()=>bc,clearScreen:()=>fc,clearTerminal:()=>gc,cursorBackward:()=>Xu,cursorDown:()=>zu,cursorForward:()=>Zu,cursorGetPosition:()=>tc,cursorHide:()=>oc,cursorLeft:()=>zo,cursorMove:()=>Yu,cursorNextLine:()=>nc,cursorPrevLine:()=>ic,cursorRestorePosition:()=>rc,cursorSavePosition:()=>ec,cursorShow:()=>sc,cursorTo:()=>Ku,cursorUp:()=>Yo,enterAlternativeScreen:()=>hc,eraseDown:()=>cc,eraseEndLine:()=>lc,eraseLine:()=>Zo,eraseLines:()=>ac,eraseScreen:()=>ti,eraseStartLine:()=>uc,eraseUp:()=>pc,exitAlternativeScreen:()=>yc,iTerm:()=>xc,image:()=>wc,link:()=>Ec,scrollDown:()=>mc,scrollUp:()=>dc});import ni from"node:process";var Gt=globalThis.window?.document!==void 0,Eg=globalThis.process?.versions?.node!==void 0,wg=globalThis.process?.versions?.bun!==void 0,xg=globalThis.Deno?.version?.deno!==void 0,vg=globalThis.process?.versions?.electron!==void 0,Pg=globalThis.navigator?.userAgent?.includes("jsdom")===!0,Tg=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,Sg=typeof DedicatedWorkerGlobalScope<"u"&&globalThis instanceof DedicatedWorkerGlobalScope,Rg=typeof SharedWorkerGlobalScope<"u"&&globalThis instanceof SharedWorkerGlobalScope,Cg=typeof ServiceWorkerGlobalScope<"u"&&globalThis instanceof ServiceWorkerGlobalScope,Yr=globalThis.navigator?.userAgentData?.platform,Ag=Yr==="macOS"||globalThis.navigator?.platform==="MacIntel"||globalThis.navigator?.userAgent?.includes(" Mac ")===!0||globalThis.process?.platform==="darwin",Ig=Yr==="Windows"||globalThis.navigator?.platform==="Win32"||globalThis.process?.platform==="win32",kg=Yr==="Linux"||globalThis.navigator?.platform?.startsWith("Linux")===!0||globalThis.navigator?.userAgent?.includes(" Linux ")===!0||globalThis.process?.platform==="linux",Og=Yr==="iOS"||globalThis.navigator?.platform==="MacIntel"&&globalThis.navigator?.maxTouchPoints>1||/iPad|iPhone|iPod/.test(globalThis.navigator?.platform),Dg=Yr==="Android"||globalThis.navigator?.platform==="Android"||globalThis.navigator?.userAgent?.includes(" Android ")===!0||globalThis.process?.platform==="android";var A="\x1B[",Zr="\x1B]",br="\x07",zr=";",Ko=!Gt&&ni.env.TERM_PROGRAM==="Apple_Terminal",Ju=!Gt&&ni.platform==="win32",Hu=Gt?()=>{throw new Error("`process.cwd()` only works in Node.js, not the browser.")}:ni.cwd,Ku=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof r!="number"?A+(e+1)+"G":A+(r+1)+zr+(e+1)+"H"},Yu=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let t="";return e<0?t+=A+-e+"D":e>0&&(t+=A+e+"C"),r<0?t+=A+-r+"A":r>0&&(t+=A+r+"B"),t},Yo=(e=1)=>A+e+"A",zu=(e=1)=>A+e+"B",Zu=(e=1)=>A+e+"C",Xu=(e=1)=>A+e+"D",zo=A+"G",ec=Ko?"\x1B7":A+"s",rc=Ko?"\x1B8":A+"u",tc=A+"6n",nc=A+"E",ic=A+"F",oc=A+"?25l",sc=A+"?25h",ac=e=>{let r="";for(let t=0;t<e;t++)r+=Zo+(t<e-1?Yo():"");return e&&(r+=zo),r},lc=A+"K",uc=A+"1K",Zo=A+"2K",cc=A+"J",pc=A+"1J",ti=A+"2J",dc=A+"S",mc=A+"T",fc="\x1Bc",gc=Ju?`${ti}${A}0f`:`${ti}${A}3J${A}H`,hc=A+"?1049h",yc=A+"?1049l",bc=br,Ec=(e,r)=>[Zr,"8",zr,zr,r,br,e,Zr,"8",zr,zr,br].join(""),wc=(e,r={})=>{let t=`${Zr}1337;File=inline=1`;return r.width&&(t+=`;width=${r.width}`),r.height&&(t+=`;height=${r.height}`),r.preserveAspectRatio===!1&&(t+=";preserveAspectRatio=0"),t+":"+Buffer.from(e).toString("base64")+br},xc={setCwd:(e=Hu())=>`${Zr}50;CurrentDir=${e}${br}`,annotation(e,r={}){let t=`${Zr}1337;`,n=r.x!==void 0,i=r.y!==void 0;if((n||i)&&!(n&&i&&r.length!==void 0))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replaceAll("|",""),t+=r.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",r.length>0?t+=(n?[e,r.length,r.x,r.y]:[r.length,e]).join("|"):t+=e,t+br}};var Wt=se(os(),1);function ir(e,r,{target:t="stdout",...n}={}){return Wt.default[t]?Qt.link(e,r):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,r):`${e} (\u200B${r}\u200B)`}ir.isSupported=Wt.default.stdout;ir.stderr=(e,r,t={})=>ir(e,r,{target:"stderr",...t});ir.stderr.isSupported=Wt.default.stderr;function li(e){return ir(e,e,{fallback:K})}var Rc=ss(),ui=Rc.version;var as="library";function wr(e){let r=Cc();return r||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":as)}function Cc(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}var Ic=se(pi());var kc=se(pi());import M from"node:path";var mh=L("prisma:engines");function ls(){return M.join(__dirname,"../")}var fh="libquery-engine";M.join(__dirname,"../query-engine-darwin");M.join(__dirname,"../query-engine-darwin-arm64");M.join(__dirname,"../query-engine-debian-openssl-1.0.x");M.join(__dirname,"../query-engine-debian-openssl-1.1.x");M.join(__dirname,"../query-engine-debian-openssl-3.0.x");M.join(__dirname,"../query-engine-linux-static-x64");M.join(__dirname,"../query-engine-linux-static-arm64");M.join(__dirname,"../query-engine-rhel-openssl-1.0.x");M.join(__dirname,"../query-engine-rhel-openssl-1.1.x");M.join(__dirname,"../query-engine-rhel-openssl-3.0.x");M.join(__dirname,"../libquery_engine-darwin.dylib.node");M.join(__dirname,"../libquery_engine-darwin-arm64.dylib.node");M.join(__dirname,"../libquery_engine-debian-openssl-1.0.x.so.node");M.join(__dirname,"../libquery_engine-debian-openssl-1.1.x.so.node");M.join(__dirname,"../libquery_engine-debian-openssl-3.0.x.so.node");M.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.0.x.so.node");M.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.1.x.so.node");M.join(__dirname,"../libquery_engine-linux-arm64-openssl-3.0.x.so.node");M.join(__dirname,"../libquery_engine-linux-musl.so.node");M.join(__dirname,"../libquery_engine-linux-musl-openssl-3.0.x.so.node");M.join(__dirname,"../libquery_engine-rhel-openssl-1.0.x.so.node");M.join(__dirname,"../libquery_engine-rhel-openssl-1.1.x.so.node");M.join(__dirname,"../libquery_engine-rhel-openssl-3.0.x.so.node");M.join(__dirname,"../query_engine-windows.dll.node");import us from"node:fs";var cs=hr("chmodPlusX");function di(e){if(process.platform==="win32")return;let r=us.statSync(e),t=r.mode|64|8|1;if(r.mode===t){cs(`Execution permissions of ${e} are fine`);return}let n=t.toString(8).slice(-3);cs(`Have to call chmodPlusX on ${e}`),us.chmodSync(e,n)}function mi(e){let r=e.e,t=a=>`Prisma cannot find the required \`${a}\` system library in your system`,n=r.message.includes("cannot open shared object file"),i=`Please refer to the documentation about Prisma's system requirements: ${li("https://pris.ly/d/system-requirements")}`,o=`Unable to require(\`${Ae(e.id)}\`).`,s=yr({message:r.message,code:r.code}).with({code:"ENOENT"},()=>"File does not exist.").when(({message:a})=>n&&a.includes("libz"),()=>`${t("libz")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libgcc_s"),()=>`${t("libgcc_s")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libssl"),()=>{let a=e.platformInfo.libssl?`openssl-${e.platformInfo.libssl}`:"openssl";return`${t("libssl")}. Please install ${a} and try again.`}).when(({message:a})=>a.includes("GLIBC"),()=>`Prisma has detected an incompatible version of the \`glibc\` C standard library installed in your system. This probably means your system may be too old to run Prisma. ${i}`).when(({message:a})=>e.platformInfo.platform==="linux"&&a.includes("symbol not found"),()=>`The Prisma engines are not compatible with your system ${e.platformInfo.originalDistro} on (${e.platformInfo.archFromUname}) which uses the \`${e.platformInfo.binaryTarget}\` binaryTarget by default. ${i}`).otherwise(()=>`The Prisma engines do not seem to be compatible with your system. ${i}`);return`${o} ${s} Details: ${r.message}`}var ms=se(ds(),1);function fi(e){let r=(0,ms.default)(e);if(r===0)return e;let t=new RegExp(`^[ \\t]{${r}}`,"gm");return e.replace(t,"")}var fs="prisma+postgres",Ht=`${fs}:`;function gi(e){return e?.startsWith(`${Ht}//`)??!1}var hs=se(hi());function bi(e){return String(new yi(e))}var yi=class{constructor(r){this.config=r}toString(){let{config:r}=this,t=r.provider.fromEnvVar?`env("${r.provider.fromEnvVar}")`:r.provider.value,n=JSON.parse(JSON.stringify({provider:t,binaryTargets:Oc(r.binaryTargets)}));return`generator ${r.name} { ${(0,hs.default)(Dc(n),2)} }`}};function Oc(e){let r;if(e.length>0){let t=e.find(n=>n.fromEnvVar!==null);t?r=`env("${t.fromEnvVar}")`:r=e.map(n=>n.native?"native":n.value)}else r=void 0;return r}function Dc(e){let r=Object.keys(e).reduce((t,n)=>Math.max(t,n.length),0);return Object.entries(e).map(([t,n])=>`${t.padEnd(r)} = ${_c(n)}`).join(` `)}function _c(e){return JSON.parse(JSON.stringify(e,(r,t)=>Array.isArray(t)?`[${t.map(n=>JSON.stringify(n)).join(", ")}]`:JSON.stringify(t)))}var et={};gr(et,{error:()=>Fc,info:()=>Lc,log:()=>Nc,query:()=>Mc,should:()=>ys,tags:()=>Xr,warn:()=>Ei});var Xr={error:ue("prisma:error"),warn:Ie("prisma:warn"),info:ke("prisma:info"),query:tr("prisma:query")},ys={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Nc(...e){console.log(...e)}function Ei(e,...r){ys.warn()&&console.warn(`${Xr.warn} ${e}`,...r)}function Lc(e,...r){console.info(`${Xr.info} ${e}`,...r)}function Fc(e,...r){console.error(`${Xr.error} ${e}`,...r)}function Mc(e,...r){console.log(`${Xr.query} ${e}`,...r)}function Kt(e,r){if(!e)throw new Error(`${r}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}function De(e,r){throw new Error(r)}import Yt from"node:path";function xi(e){return Yt.sep===Yt.posix.sep?e:e.split(Yt.sep).join(Yt.posix.sep)}var Ci=se(Ss());import Si from"node:fs";import rt from"node:path";function Rs(e){let r=e.ignoreProcessEnv?{}:process.env,t=n=>n.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g)?.reduce(function(o,s){let a=/(.?)\${([a-zA-Z0-9_]+)?}/g.exec(s);if(!a)return o;let l=a[1],u,c;if(l==="\\")c=a[0],u=c.replace("\\$","$");else{let p=a[2];c=a[0].substring(l.length),u=Object.hasOwnProperty.call(r,p)?r[p]:e.parsed[p]||"",u=t(u)}return o.replace(c,u)},n)??n;for(let n in e.parsed){let i=Object.hasOwnProperty.call(r,n)?r[n]:e.parsed[n];e.parsed[n]=t(i)}for(let n in e.parsed)r[n]=e.parsed[n];return e}var Ri=hr("prisma:tryLoadEnv");function tt({rootEnvPath:e,schemaEnvPath:r},t={conflictCheck:"none"}){let n=Cs(e);t.conflictCheck!=="none"&&ep(n,r,t.conflictCheck);let i=null;return As(n?.path,r)||(i=Cs(r)),!n&&!i&&Ri("No Environment variables loaded"),i?.dotenvResult.error?console.error(ue(Q("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(` `),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function ep(e,r,t){let n=e?.dotenvResult.parsed,i=!As(e?.path,r);if(n&&r&&i&&Si.existsSync(r)){let o=Ci.default.parse(Si.readFileSync(r)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=rt.relative(process.cwd(),e.path),l=rt.relative(process.cwd(),r);if(t==="error"){let u=`There is a conflict between env var${s.length>1?"s":""} in ${K(a)} and ${K(l)} Conflicting env vars: ${s.map(c=>` ${Q(c)}`).join(` `)} We suggest to move the contents of ${K(l)} to ${K(a)} to consolidate your env vars. `;throw new Error(u)}else if(t==="warn"){let u=`Conflict for env var${s.length>1?"s":""} ${s.map(c=>Q(c)).join(", ")} in ${K(a)} and ${K(l)} Env vars from ${K(l)} overwrite the ones from ${K(a)} `;console.warn(`${Ie("warn(prisma)")} ${u}`)}}}}function Cs(e){if(rp(e)){Ri(`Environment variables loaded from ${e}`);let r=Ci.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:Rs(r),message:Ae(`Environment variables loaded from ${rt.relative(process.cwd(),e)}`),path:e}}else Ri(`Environment variables not found at ${e}`);return null}function As(e,r){return e&&r&&rt.resolve(e)===rt.resolve(r)}function rp(e){return!!(e&&Si.existsSync(e))}function Ai(e,r){return Object.prototype.hasOwnProperty.call(e,r)}function xr(e,r){let t={};for(let n of Object.keys(e))t[n]=r(e[n],n);return t}function Ii(e,r){if(e.length===0)return;let t=e[0];for(let n=1;n<e.length;n++)r(t,e[n])<0&&(t=e[n]);return t}function x(e,r){Object.defineProperty(e,"name",{value:r,configurable:!0})}var ks=new Set,Xt=(e,r,...t)=>{ks.has(e)||(ks.add(e),Ei(r,...t))};var T=class e extends Error{clientVersion;errorCode;retryable;constructor(r,t,n){super(r),this.name="PrismaClientInitializationError",this.clientVersion=t,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};x(T,"PrismaClientInitializationError");var Z=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(r,{code:t,clientVersion:n,meta:i,batchRequestIdx:o}){super(r),this.name="PrismaClientKnownRequestError",this.code=t,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};x(Z,"PrismaClientKnownRequestError");var de=class extends Error{clientVersion;constructor(r,t){super(r),this.name="PrismaClientRustPanicError",this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};x(de,"PrismaClientRustPanicError");var q=class extends Error{clientVersion;batchRequestIdx;constructor(r,{clientVersion:t,batchRequestIdx:n}){super(r),this.name="PrismaClientUnknownRequestError",this.clientVersion=t,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};x(q,"PrismaClientUnknownRequestError");var X=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(r,{clientVersion:t}){super(r),this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};x(X,"PrismaClientValidationError");var vr=9e15,Ke=1e9,ki="0123456789abcdef",nn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",on="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Oi={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-vr,maxE:vr,crypto:!1},Ns,Ne,w=!0,an="[DecimalError] ",He=an+"Invalid argument: ",Ls=an+"Precision limit exceeded",Fs=an+"crypto unavailable",Ms="[object Decimal]",Y=Math.floor,B=Math.pow,tp=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,np=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,ip=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,$s=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fe=1e7,E=7,op=9007199254740991,sp=nn.length-1,Di=on.length-1,m={toStringTag:Ms};m.absoluteValue=m.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),y(e)};m.ceil=function(){return y(new this.constructor(this),this.e+1,2)};m.clampedTo=m.clamp=function(e,r){var t,n=this,i=n.constructor;if(e=new i(e),r=new i(r),!e.s||!r.s)return new i(NaN);if(e.gt(r))throw Error(He+r);return t=n.cmp(e),t<0?e:n.cmp(r)>0?r:new i(n)};m.comparedTo=m.cmp=function(e){var r,t,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,r=0,t=n<i?n:i;r<t;++r)if(s[r]!==a[r])return s[r]>a[r]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};m.cosine=m.cos=function(){var e,r,t=this,n=t.constructor;return t.d?t.d[0]?(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+E,n.rounding=1,t=ap(n,Us(n,t)),n.precision=e,n.rounding=r,y(Ne==2||Ne==3?t.neg():t,e,r,!0)):new n(1):new n(NaN)};m.cubeRoot=m.cbrt=function(){var e,r,t,n,i,o,s,a,l,u,c=this,p=c.constructor;if(!c.isFinite()||c.isZero())return new p(c);for(w=!1,o=c.s*B(c.s*c,1/3),!o||Math.abs(o)==1/0?(t=W(c.d),e=c.e,(o=(e-t.length+1)%3)&&(t+=o==1||o==-2?"0":"00"),o=B(t,1/3),e=Y((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new p(t),n.s=c.s):n=new p(o.toString()),s=(e=p.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(c),n=_(u.plus(c).times(a),u.plus(l),s+2,1),W(a.d).slice(0,s)===(t=W(n.d)).slice(0,s))if(t=t.slice(s-3,s+1),t=="9999"||!i&&t=="4999"){if(!i&&(y(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}s+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(y(n,e+1,1),r=!