@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.
13 lines (12 loc) • 194 kB
JavaScript
"use strict";var Gu=Object.create;var Lr=Object.defineProperty;var Hu=Object.getOwnPropertyDescriptor;var Wu=Object.getOwnPropertyNames;var Ju=Object.getPrototypeOf,Ku=Object.prototype.hasOwnProperty;var bo=(e,t)=>()=>(e&&(t=e(e=0)),t);var B=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),nt=(e,t)=>{for(var r in t)Lr(e,r,{get:t[r],enumerable:!0})},Po=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Wu(t))!Ku.call(e,i)&&i!==r&&Lr(e,i,{get:()=>t[i],enumerable:!(n=Hu(t,i))||n.enumerable});return e};var $=(e,t,r)=>(r=e!=null?Gu(Ju(e)):{},Po(t||!e||!e.__esModule?Lr(r,"default",{value:e,enumerable:!0}):r,e)),zu=e=>Po(Lr({},"__esModule",{value:!0}),e);var Fo=B((Cg,wc)=>{wc.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 $o=B((Rg,Vo)=>{"use strict";Vo.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Bo=B((Og,Uo)=>{"use strict";Uo.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 Ho=B((_g,Go)=>{"use strict";Go.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 ii=B((Mg,Wo)=>{"use strict";var Cc=Ho();Wo.exports=e=>typeof e=="string"?e.replace(Cc(),""):e});var Jo=B((Lg,Ac)=>{Ac.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 Zo=B((Vg,Te)=>{"use strict";var si=require("node:fs"),ai=require("node:path"),Sc=require("node:os"),Rc=require("node:crypto"),kc=Jo(),li=kc.version,Ic=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Oc(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,`
`);let n;for(;(n=Ic.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 Dc(e){let t=Yo(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=zo(e).split(","),i=n.length,o;for(let s=0;s<i;s++)try{let a=n[s].trim(),l=Nc(r,a);o=q.decrypt(l.ciphertext,l.key);break}catch(a){if(s+1>=i)throw a}return q.parse(o)}function _c(e){console.log(`[dotenv@${li}][INFO] ${e}`)}function Mc(e){console.log(`[dotenv@${li}][WARN] ${e}`)}function qr(e){console.log(`[dotenv@${li}][DEBUG] ${e}`)}function zo(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 Nc(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 Yo(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)si.existsSync(r)&&(t=r.endsWith(".vault")?r:`${r}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=ai.resolve(process.cwd(),".env.vault");return si.existsSync(t)?t:null}function Ko(e){return e[0]==="~"?ai.join(Sc.homedir(),e.slice(1)):e}function Fc(e){_c("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 Lc(e){let t=ai.resolve(process.cwd(),".env"),r="utf8",n=!!(e&&e.debug);e&&e.encoding?r=e.encoding:n&&qr("No encoding is specified. UTF-8 is used by default");let i=[t];if(e&&e.path)if(!Array.isArray(e.path))i=[Ko(e.path)];else{i=[];for(let l of e.path)i.push(Ko(l))}let o,s={};for(let l of i)try{let u=q.parse(si.readFileSync(l,{encoding:r}));q.populate(s,u,e)}catch(u){n&&qr(`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 Vc(e){if(zo(e).length===0)return q.configDotenv(e);let t=Yo(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 $c(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=Rc.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 qc(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&&qr(i===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=t[o]}var q={configDotenv:Lc,_configVault:Fc,_parseVault:Dc,config:Vc,decrypt:$c,parse:Oc,populate:qc};Te.exports.configDotenv=q.configDotenv;Te.exports._configVault=q._configVault;Te.exports._parseVault=q._parseVault;Te.exports.config=q.config;Te.exports.decrypt=q.decrypt;Te.exports.parse=q.parse;Te.exports.populate=q.populate;Te.exports=q});var rs=B((Qg,Ur)=>{"use strict";Ur.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};Ur.exports.default=Ur.exports});var Ei=B((Ey,As)=>{"use strict";As.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,R,T,C,w,I=[];for(l=0;l<i;l++)I.push(l+1),I.push(t.charCodeAt(s+l));for(var le=I.length-1;a<o-3;)for(R=r.charCodeAt(s+(u=a)),T=r.charCodeAt(s+(c=a+1)),C=r.charCodeAt(s+(p=a+2)),w=r.charCodeAt(s+(d=a+3)),f=a+=4,l=0;l<le;l+=2)g=I[l],h=I[l+1],u=e(g,u,c,R,h),c=e(u,c,p,T,h),p=e(c,p,d,C,h),f=e(p,d,f,w,h),I[l]=f,d=p,p=c,c=u,u=g;for(;a<o;)for(R=r.charCodeAt(s+(u=a)),f=++a,l=0;l<le;l+=2)g=I[l],I[l]=f=e(g,u,f,R,I[l+1]),u=g;return f}}()});var Os=bo(()=>{"use strict"});var Ds=bo(()=>{"use strict"});var ra=B((JE,Md)=>{Md.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 qi=B(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.anumber=$i;We.abytes=Qa;We.ahash=Om;We.aexists=Dm;We.aoutput=_m;function $i(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Im(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Qa(e,...t){if(!Im(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Om(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");$i(e.outputLen),$i(e.blockLen)}function Dm(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function _m(e,t){Qa(e);let r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}});var dl=B(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.add5L=P.add5H=P.add4H=P.add4L=P.add3H=P.add3L=P.rotlBL=P.rotlBH=P.rotlSL=P.rotlSH=P.rotr32L=P.rotr32H=P.rotrBL=P.rotrBH=P.rotrSL=P.rotrSH=P.shrSL=P.shrSH=P.toBig=void 0;P.fromBig=Ui;P.split=Ga;P.add=ol;var Cn=BigInt(2**32-1),ji=BigInt(32);function Ui(e,t=!1){return t?{h:Number(e&Cn),l:Number(e>>ji&Cn)}:{h:Number(e>>ji&Cn)|0,l:Number(e&Cn)|0}}function Ga(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i<e.length;i++){let{h:o,l:s}=Ui(e[i],t);[r[i],n[i]]=[o,s]}return[r,n]}var Ha=(e,t)=>BigInt(e>>>0)<<ji|BigInt(t>>>0);P.toBig=Ha;var Wa=(e,t,r)=>e>>>r;P.shrSH=Wa;var Ja=(e,t,r)=>e<<32-r|t>>>r;P.shrSL=Ja;var Ka=(e,t,r)=>e>>>r|t<<32-r;P.rotrSH=Ka;var za=(e,t,r)=>e<<32-r|t>>>r;P.rotrSL=za;var Ya=(e,t,r)=>e<<64-r|t>>>r-32;P.rotrBH=Ya;var Za=(e,t,r)=>e>>>r-32|t<<64-r;P.rotrBL=Za;var Xa=(e,t)=>t;P.rotr32H=Xa;var el=(e,t)=>e;P.rotr32L=el;var tl=(e,t,r)=>e<<r|t>>>32-r;P.rotlSH=tl;var rl=(e,t,r)=>t<<r|e>>>32-r;P.rotlSL=rl;var nl=(e,t,r)=>t<<r-32|e>>>64-r;P.rotlBH=nl;var il=(e,t,r)=>e<<r-32|t>>>64-r;P.rotlBL=il;function ol(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:i|0}}var sl=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);P.add3L=sl;var al=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;P.add3H=al;var ll=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);P.add4L=ll;var ul=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;P.add4H=ul;var cl=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);P.add5L=cl;var pl=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;P.add5H=pl;var Mm={fromBig:Ui,split:Ga,toBig:Ha,shrSH:Wa,shrSL:Ja,rotrSH:Ka,rotrSL:za,rotrBH:Ya,rotrBL:Za,rotr32H:Xa,rotr32L:el,rotlSH:tl,rotlSL:rl,rotlBH:nl,rotlBL:il,add:ol,add3L:sl,add3H:al,add4L:ll,add4H:ul,add5H:pl,add5L:cl};P.default=Mm});var ml=B(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.crypto=void 0;var Le=require("node:crypto");An.crypto=Le&&typeof Le=="object"&&"webcrypto"in Le?Le.webcrypto:Le&&typeof Le=="object"&&"randomBytes"in Le?Le:void 0});var hl=B(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.Hash=S.nextTick=S.byteSwapIfBE=S.isLE=void 0;S.isBytes=Nm;S.u8=Fm;S.u32=Lm;S.createView=Vm;S.rotr=$m;S.rotl=qm;S.byteSwap=Gi;S.byteSwap32=jm;S.bytesToHex=Bm;S.hexToBytes=Qm;S.asyncLoop=Hm;S.utf8ToBytes=gl;S.toBytes=Sn;S.concatBytes=Wm;S.checkOpts=Jm;S.wrapConstructor=Km;S.wrapConstructorWithOpts=zm;S.wrapXOFConstructorWithOpts=Ym;S.randomBytes=Zm;var Tt=ml(),Qi=qi();function Nm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Fm(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function Lm(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Vm(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function $m(e,t){return e<<32-t|e>>>t}function qm(e,t){return e<<t|e>>>32-t>>>0}S.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Gi(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}S.byteSwapIfBE=S.isLE?e=>e:e=>Gi(e);function jm(e){for(let t=0;t<e.length;t++)e[t]=Gi(e[t])}var Um=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Bm(e){(0,Qi.abytes)(e);let t="";for(let r=0;r<e.length;r++)t+=Um[e[r]];return t}var Se={_0:48,_9:57,A:65,F:70,a:97,f:102};function fl(e){if(e>=Se._0&&e<=Se._9)return e-Se._0;if(e>=Se.A&&e<=Se.F)return e-(Se.A-10);if(e>=Se.a&&e<=Se.f)return e-(Se.a-10)}function Qm(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let i=0,o=0;i<r;i++,o+=2){let s=fl(e.charCodeAt(o)),a=fl(e.charCodeAt(o+1));if(s===void 0||a===void 0){let l=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+l+'" at index '+o)}n[i]=s*16+a}return n}var Gm=async()=>{};S.nextTick=Gm;async function Hm(e,t,r){let n=Date.now();for(let i=0;i<e;i++){r(i);let o=Date.now()-n;o>=0&&o<t||(await(0,S.nextTick)(),n+=o)}}function gl(e){if(typeof e!="string")throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}function Sn(e){return typeof e=="string"&&(e=gl(e)),(0,Qi.abytes)(e),e}function Wm(...e){let t=0;for(let n=0;n<e.length;n++){let i=e[n];(0,Qi.abytes)(i),t+=i.length}let r=new Uint8Array(t);for(let n=0,i=0;n<e.length;n++){let o=e[n];r.set(o,i),i+=o.length}return r}var Bi=class{clone(){return this._cloneInto()}};S.Hash=Bi;function Jm(e,t){if(t!==void 0&&{}.toString.call(t)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(e,t)}function Km(e){let t=n=>e().update(Sn(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function zm(e){let t=(n,i)=>e(i).update(Sn(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function Ym(e){let t=(n,i)=>e(i).update(Sn(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function Zm(e=32){if(Tt.crypto&&typeof Tt.crypto.getRandomValues=="function")return Tt.crypto.getRandomValues(new Uint8Array(e));if(Tt.crypto&&typeof Tt.crypto.randomBytes=="function")return Tt.crypto.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}});var Tl=B(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.shake256=F.shake128=F.keccak_512=F.keccak_384=F.keccak_256=F.keccak_224=F.sha3_512=F.sha3_384=F.sha3_256=F.sha3_224=F.Keccak=void 0;F.keccakP=Pl;var Ct=qi(),mr=dl(),Re=hl(),El=[],xl=[],bl=[],Xm=BigInt(0),dr=BigInt(1),ef=BigInt(2),tf=BigInt(7),rf=BigInt(256),nf=BigInt(113);for(let e=0,t=dr,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],El.push(2*(5*n+r)),xl.push((e+1)*(e+2)/2%64);let i=Xm;for(let o=0;o<7;o++)t=(t<<dr^(t>>tf)*nf)%rf,t&ef&&(i^=dr<<(dr<<BigInt(o))-dr);bl.push(i)}var[of,sf]=(0,mr.split)(bl,!0),yl=(e,t,r)=>r>32?(0,mr.rotlBH)(e,t,r):(0,mr.rotlSH)(e,t,r),wl=(e,t,r)=>r>32?(0,mr.rotlBL)(e,t,r):(0,mr.rotlSL)(e,t,r);function Pl(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let s=0;s<10;s++)r[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,l=(s+2)%10,u=r[l],c=r[l+1],p=yl(u,c,1)^r[a],d=wl(u,c,1)^r[a+1];for(let f=0;f<50;f+=10)e[s+f]^=p,e[s+f+1]^=d}let i=e[2],o=e[3];for(let s=0;s<24;s++){let a=xl[s],l=yl(i,o,a),u=wl(i,o,a),c=El[s];i=e[c],o=e[c+1],e[c]=l,e[c+1]=u}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)r[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~r[(a+2)%10]&r[(a+4)%10]}e[0]^=of[n],e[1]^=sf[n]}r.fill(0)}var fr=class e extends Re.Hash{constructor(t,r,n,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,Ct.anumber)(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,Re.u32)(this.state)}keccak(){Re.isLE||(0,Re.byteSwap32)(this.state32),Pl(this.state32,this.rounds),Re.isLE||(0,Re.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,Ct.aexists)(this);let{blockLen:r,state:n}=this;t=(0,Re.toBytes)(t);let i=t.length;for(let o=0;o<i;){let s=Math.min(r-this.pos,i-o);for(let a=0;a<s;a++)n[this.pos++]^=t[o++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:r,pos:n,blockLen:i}=this;t[n]^=r,(r&128)!==0&&n===i-1&&this.keccak(),t[i-1]^=128,this.keccak()}writeInto(t){(0,Ct.aexists)(this,!1),(0,Ct.abytes)(t),this.finish();let r=this.state,{blockLen:n}=this;for(let i=0,o=t.length;i<o;){this.posOut>=n&&this.keccak();let s=Math.min(n-this.posOut,o-i);t.set(r.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,Ct.anumber)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,Ct.aoutput)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:n,outputLen:i,rounds:o,enableXOF:s}=this;return t||(t=new e(r,n,i,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=n,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}};F.Keccak=fr;var Ve=(e,t,r)=>(0,Re.wrapConstructor)(()=>new fr(t,e,r));F.sha3_224=Ve(6,144,224/8);F.sha3_256=Ve(6,136,256/8);F.sha3_384=Ve(6,104,384/8);F.sha3_512=Ve(6,72,512/8);F.keccak_224=Ve(1,144,224/8);F.keccak_256=Ve(1,136,256/8);F.keccak_384=Ve(1,104,384/8);F.keccak_512=Ve(1,72,512/8);var vl=(e,t,r)=>(0,Re.wrapXOFConstructorWithOpts)((n={})=>new fr(t,e,n.dkLen===void 0?r:n.dkLen,!0));F.shake128=vl(31,168,128/8);F.shake256=vl(31,136,256/8)});var Dl=B((n0,$e)=>{"use strict";var{sha3_512:af}=Tl(),Al=24,gr=32,Hi=(e=4,t=Math.random)=>{let r="";for(;r.length<e;)r=r+Math.floor(t()*36).toString(36);return r};function Sl(e){let t=8n,r=0n;for(let n of e.values()){let i=BigInt(n);r=(r<<t)+i}return r}var Rl=(e="")=>Sl(af(e)).toString(36).slice(1),Cl=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),lf=e=>Cl[Math.floor(e()*Cl.length)],kl=({globalObj:e=typeof global<"u"?global:typeof window<"u"?window:{},random:t=Math.random}={})=>{let r=Object.keys(e).toString(),n=r.length?r+Hi(gr,t):Hi(gr,t);return Rl(n).substring(0,gr)},Il=e=>()=>e++,uf=476782367,Ol=({random:e=Math.random,counter:t=Il(Math.floor(e()*uf)),length:r=Al,fingerprint:n=kl({random:e})}={})=>function(){let o=lf(e),s=Date.now().toString(36),a=t().toString(36),l=Hi(r,e),u=`${s+l+a+n}`;return`${o+Rl(u).substring(1,r)}`},cf=Ol(),pf=(e,{minLength:t=2,maxLength:r=gr}={})=>{let n=e.length,i=/^[0-9a-z]+$/;try{if(typeof e=="string"&&n>=t&&n<=r&&i.test(e))return!0}finally{}return!1};$e.exports.getConstants=()=>({defaultLength:Al,bigLength:gr});$e.exports.init=Ol;$e.exports.createId=cf;$e.exports.bufToBigInt=Sl;$e.exports.createCounter=Il;$e.exports.createFingerprint=kl;$e.exports.isCuid=pf});var _l=B((i0,hr)=>{"use strict";var{createId:df,init:mf,getConstants:ff,isCuid:gf}=Dl();hr.exports.createId=df;hr.exports.init=mf;hr.exports.getConstants=ff;hr.exports.isCuid=gf});var mg={};nt(mg,{DMMF:()=>zt,Debug:()=>L,Decimal:()=>he,Extensions:()=>zn,MetricsClient:()=>xt,PrismaClientInitializationError:()=>k,PrismaClientKnownRequestError:()=>Q,PrismaClientRustPanicError:()=>ce,PrismaClientUnknownRequestError:()=>K,PrismaClientValidationError:()=>z,Public:()=>Yn,Sql:()=>ie,createParam:()=>Js,defineDmmfProperty:()=>ea,deserializeJsonResponse:()=>ut,deserializeRawResult:()=>Hn,dmmfToRuntimeDataModel:()=>xs,empty:()=>ia,getPrismaClient:()=>Uu,getRuntime:()=>vn,join:()=>na,makeStrictEnum:()=>Bu,makeTypedQueryFactory:()=>ta,objectEnumValues:()=>ln,raw:()=>Ri,serializeJsonQuery:()=>gn,skip:()=>fn,sqltag:()=>ki,warnEnvConflicts:()=>Qu,warnOnce:()=>Wt});module.exports=zu(mg);var zn={};nt(zn,{defineExtension:()=>vo,getExtensionContext:()=>To});function vo(e){return typeof e=="function"?e:t=>t.$extends(e)}function To(e){return e}var Yn={};nt(Yn,{validator:()=>Co});function Co(...e){return t=>t}var Vr={};nt(Vr,{$:()=>Io,bgBlack:()=>sc,bgBlue:()=>cc,bgCyan:()=>dc,bgGreen:()=>lc,bgMagenta:()=>pc,bgRed:()=>ac,bgWhite:()=>mc,bgYellow:()=>uc,black:()=>rc,blue:()=>Be,bold:()=>X,cyan:()=>ve,dim:()=>je,gray:()=>qt,green:()=>$t,grey:()=>oc,hidden:()=>ec,inverse:()=>Xu,italic:()=>Zu,magenta:()=>nc,red:()=>Pe,reset:()=>Yu,strikethrough:()=>tc,underline:()=>re,white:()=>ic,yellow:()=>Ue});var Zn,Ao,So,Ro,ko=!0;typeof process<"u"&&({FORCE_COLOR:Zn,NODE_DISABLE_COLORS:Ao,NO_COLOR:So,TERM:Ro}=process.env||{},ko=process.stdout&&process.stdout.isTTY);var Io={enabled:!Ao&&So==null&&Ro!=="dumb"&&(Zn!=null&&Zn!=="0"||ko)};function M(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Io.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Yu=M(0,0),X=M(1,22),je=M(2,22),Zu=M(3,23),re=M(4,24),Xu=M(7,27),ec=M(8,28),tc=M(9,29),rc=M(30,39),Pe=M(31,39),$t=M(32,39),Ue=M(33,39),Be=M(34,39),nc=M(35,39),ve=M(36,39),ic=M(37,39),qt=M(90,39),oc=M(90,39),sc=M(40,49),ac=M(41,49),lc=M(42,49),uc=M(43,49),cc=M(44,49),pc=M(45,49),dc=M(46,49),mc=M(47,49);var fc=100,Oo=["green","yellow","blue","magenta","cyan","red"],jt=[],Do=Date.now(),gc=0,Xn=typeof process<"u"?process.env:{};globalThis.DEBUG??=Xn.DEBUG??"";globalThis.DEBUG_COLORS??=Xn.DEBUG_COLORS?Xn.DEBUG_COLORS==="true":!0;var Ut={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 hc(e){let t={color:Oo[gc++%Oo.length],enabled:Ut.enabled(e),namespace:e,log:Ut.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&jt.push([o,...n]),jt.length>fc&&jt.shift(),Ut.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:yc(c)),u=`+${Date.now()-Do}ms`;Do=Date.now(),globalThis.DEBUG_COLORS?a(Vr[s](X(o)),...l,Vr[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var L=new Proxy(hc,{get:(e,t)=>Ut[t],set:(e,t,r)=>Ut[t]=r});function yc(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function _o(e=7500){let t=jt.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 Mo(){jt.length=0}var No=L;var Ec=Fo(),ei=Ec.version;var Lo="library";function it(e){let t=xc();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Lo)}function xc(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}var qo=$($o(),1);function ti(e){let t=(0,qo.default)(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}var jo="prisma+postgres",$r=`${jo}:`;function ri(e){return e?.startsWith(`${$r}//`)??!1}var Qt={};nt(Qt,{error:()=>vc,info:()=>Pc,log:()=>bc,query:()=>Tc,should:()=>Qo,tags:()=>Bt,warn:()=>ni});var Bt={error:Pe("prisma:error"),warn:Ue("prisma:warn"),info:ve("prisma:info"),query:Be("prisma:query")},Qo={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function bc(...e){console.log(...e)}function ni(e,...t){Qo.warn()&&console.warn(`${Bt.warn} ${e}`,...t)}function Pc(e,...t){console.info(`${Bt.info} ${e}`,...t)}function vc(e,...t){console.error(`${Bt.error} ${e}`,...t)}function Tc(e,...t){console.log(`${Bt.query} ${e}`,...t)}function ue(e,t){throw new Error(t)}var Gt=$(require("node:path"));function oi(e){return Gt.default.sep===Gt.default.posix.sep?e:e.split(Gt.default.sep).join(Gt.default.posix.sep)}var ci=$(Zo()),jr=$(require("node:fs"));var ot=$(require("node:path"));function Xo(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 ui=No("prisma:tryLoadEnv");function Ht({rootEnvPath:e,schemaEnvPath:t},r={conflictCheck:"none"}){let n=es(e);r.conflictCheck!=="none"&&jc(n,t,r.conflictCheck);let i=null;return ts(n?.path,t)||(i=es(t)),!n&&!i&&ui("No Environment variables loaded"),i?.dotenvResult.error?console.error(Pe(X("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(`
`),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function jc(e,t,r){let n=e?.dotenvResult.parsed,i=!ts(e?.path,t);if(n&&t&&i&&jr.default.existsSync(t)){let o=ci.default.parse(jr.default.readFileSync(t)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=ot.default.relative(process.cwd(),e.path),l=ot.default.relative(process.cwd(),t);if(r==="error"){let u=`There is a conflict between env var${s.length>1?"s":""} in ${re(a)} and ${re(l)}
Conflicting env vars:
${s.map(c=>` ${X(c)}`).join(`
`)}
We suggest to move the contents of ${re(l)} to ${re(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=>X(c)).join(", ")} in ${re(a)} and ${re(l)}
Env vars from ${re(l)} overwrite the ones from ${re(a)}
`;console.warn(`${Ue("warn(prisma)")} ${u}`)}}}}function es(e){if(Uc(e)){ui(`Environment variables loaded from ${e}`);let t=ci.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:Xo(t),message:je(`Environment variables loaded from ${ot.default.relative(process.cwd(),e)}`),path:e}}else ui(`Environment variables not found at ${e}`);return null}function ts(e,t){return e&&t&&ot.default.resolve(e)===ot.default.resolve(t)}function Uc(e){return!!(e&&jr.default.existsSync(e))}function pi(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function st(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function di(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 b(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}var ns=new Set,Wt=(e,t,...r)=>{ns.has(e)||(ns.add(e),ni(t,...r))};var k=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};b(k,"PrismaClientInitializationError");var Q=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};b(Q,"PrismaClientKnownRequestError");var ce=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};b(ce,"PrismaClientRustPanicError");var K=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};b(K,"PrismaClientUnknownRequestError");var z=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};b(z,"PrismaClientValidationError");var at=9e15,_e=1e9,mi="0123456789abcdef",Gr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Hr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",fi={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-at,maxE:at,crypto:!1},ls,Ce,x=!0,Jr="[DecimalError] ",De=Jr+"Invalid argument: ",us=Jr+"Precision limit exceeded",cs=Jr+"crypto unavailable",ps="[object Decimal]",Y=Math.floor,j=Math.pow,Bc=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Qc=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Gc=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,ds=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,E=7,Hc=9007199254740991,Wc=Gr.length-1,gi=Hr.length-1,m={toStringTag:ps};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(De+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=Jc(n,ys(n,r)),n.precision=e,n.rounding=t,y(Ce==2||Ce==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(x=!1,o=c.s*j(c.s*c,1/3),!o||Math.abs(o)==1/0?(r=G(c.d),e=c.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=j(r,1/3),e=Y((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=_(u.plus(c).times(a),u.plus(l),s+2,1),G(a.d).slice(0,s)===(r=G(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 x=!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-Y(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 _(this,new this.constructor(e))};m.dividedToIntegerBy=m.divToInt=function(e){var t=this,r=t.constructor;return y(_(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/zr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=lt(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=lt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/zr(5,e)),i=lt(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,_(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};m.inverseCosine=m.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?fe(t,n,i):new t(0):new t(NaN):e.isZero()?fe(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};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,x=!1,r=r.times(r).minus(1).sqrt().plus(r),x=!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,x=!1,r=r.times(r).plus(1).sqrt().plus(r),x=!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=_(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=fe(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,l,u=this,c=u.constructor,p=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&p+4<=gi)return s=fe(c,p+4,d).times(.25),s.s=u.s,s}else{if(!u.s)return new c(NaN);if(p+4<=gi)return s=fe(c,p+4,d).times(.5),s.s=u.s,s}for(c.precision=a=p+10,c.rounding=1,r=Math.min(28,a/E+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(x=!1,t=Math.ceil(a/E),n=1,l=u.times(u),s=new c(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<<r-1)),x=!0,y(s,c.precision=p,c.rounding=d,!0)};m.isFinite=function(){return!!this.d};m.isInteger=m.isInt=function(){return!!this.d&&Y(this.e/E)>this.d.length-2};m.isNaN=function(){return!this.s};m.isNegative=m.isNeg=function(){return this.s<0};m.isPositive=m.isPos=function(){return this.s>0};m.isZero=function(){return!!this.d&&this.d[0]===0};m.lessThan=m.lt=function(e){return this.cmp(e)<0};m.lessThanOrEqualTo=m.lte=function(e){return this.cmp(e)<1};m.logarithm=m.log=function(e){var t,r,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding,f=5;if(e==null)e=new c(10),t=!0;else{if(e=new c(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new c(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(x=!1,a=p+f,s=Oe(u,a),n=t?Wr(c,a+10):Oe(e,a),l=_(s,n,a,1),Jt(l.d,i=p,d))do if(a+=10,s=Oe(u,a),n=t?Wr(c,a+10):Oe(e,a),l=_(s,n,a,1),!o){+G(l.d).slice(i+1,i+15)+1==1e14&&(l=y(l,p+1,0));break}while(Jt(l.d,i+=10,d));return x=!0,y(l,p,d)};m.minus=m.sub=function(e){var t,r,n,i,o,s,a,l,u,c,p,d,f=this,g=f.constructor;if(e=new g(e),!f.d||!e.d)return!f.s||!e.s?e=new g(NaN):f.d?e.s=-e.s:e=new g(e.d||f.s!==e.s?f:NaN),e;if(f.s!=e.s)return e.s=-e.s,f.plus(e);if(u=f.d,d=e.d,a=g.precision,l=g.rounding,!u[0]||!d[0]){if(d[0])e.s=-e.s;else if(u[0])e=new g(f);else return new g(l===3?-0:0);return x?y(e,a,l):e}if(r=Y(e.e/E),c=Y(f.e/E),u=u.slice(),o=c-r,o){for(p=o<0,p?(t=u,o=-o,s=d.length):(t=d,r=c,s=u.length),n=Math.max(Math.ceil(a/E),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=d.length,p=n<s,p&&(s=n),n=0;n<s;n++)if(u[n]!=d[n]){p=u[n]<d[n];break}o=0}for(p&&(t=u,u=d,d=t,e.s=-e.s),s=u.length,n=d.length-s;n>0;--n)u[s++]=0;for(n=d.length;n>o;){if(u[--n]<d[n]){for(i=n;i&&u[--i]===0;)u[i]=pe-1;--u[i],u[n]+=pe}u[n]-=d[n]}for(;u[--s]===0;)u.pop();for(;u[0]===0;u.shift())--r;return u[0]?(e.d=u,e.e=Kr(u,r),x?y(e,a,l):e):new g(l===3?-0:0)};m.modulo=m.mod=function(e){var t,r=this,n=r.constructor;return e=new n(e),!r.d||!e.s||e.d&&!e.d[0]?new n(NaN):!e.d||r.d&&!r.d[0]?y(new n(r),n.precision,n.rounding):(x=!1,n.modulo==9?(t=_(r,e.abs(),0,3,1),t.s*=e.s):t=_(r,e,0,n.modulo,1),t=t.times(e),x=!0,r.minus(t))};m.naturalExponential=m.exp=function(){return hi(this)};m.naturalLogarithm=m.ln=function(){return Oe(this)};m.negated=m.neg=function(){var e=new this.constructor(this);return e.s=-e.s,y(e)};m.plus=m.add=function(e){var t,r,n,i,o,s,a,l,u,c,p=this,d=p.constructor;if(e=new d(e),!p.d||!e.d)return!p.s||!e.s?e=new d(NaN):p.d||(e=new d(e.d||p.s===e.s?p:NaN)),e;if(p.s!=e.s)return e.s=-e.s,p.minus(e);if(u=p.d,c=e.d,a=d.precision,l=d.rounding,!u[0]||!c[0])return c[0]||(e=new d(p)),x?y(e,a,l):e;if(o=Y(p.e/E),n=Y(e.e/E),u=u.slice(),i=o-n,i){for(i<0?(r=u,i=-i,s=c.length):(r=c,n=o,s=u.length),o=Math.ceil(a/E),s=o>s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=c.length,s-i<0&&(i=s,r=c,c=u,u=r),t=0;i;)t=(u[--i]=u[i]+c[i]+t)/pe|0,u[i]%=pe;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=Kr(u,n),x?y(e,a,l):e};m.precision=m.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(De+e);return r.d?(t=ms(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};m.round=function(){var e=this,t=e.constructor;return y(new t(e),e.e+1,t.rounding)};m.sine=m.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+E,n.rounding=1,r=zc(n,ys(n,r)),n.precision=e,n.rounding=t,y(Ce>2?r.neg():r,e,t,!0)):new n(NaN)};m.squareRoot=m.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,c=s.constructor;if(u!==1||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(x=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=G(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=Y((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new c(t)):n=new c(u.toString()),r=(l=c.precision)+3;;)if(o=n,n=o.plus(_(s,o,r+2,1)).times(.5),G(o.d).slice(0,r)===(t=G(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(y(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(y(n,l+1,1),e=!n.times(n).eq(s));break}return x=!0,y(n,l,c.rounding,e)};m.tangent=m.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=_(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,y(Ce==2||Ce==4?r.neg():r,e,t,!0)):new n(NaN)};m.times=m.mul=function(e){var t,r,n,i,o,s,a,l,u,c=this,p=c.constructor,d=c.d,f=(e=new p(e)).d;if(e.s*=c.s,!d||!d[0]||!f||!f[0])return new p(!e.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:!d||!f?e.s/0:e.s*0);for(r=Y(c.e/E)+Y(e.e/E),l=d.length,u=f.length,l<u&&(o=d,d=f,f=o,s=l,l=u,u=s),o=[],s=l+u,n=s;n--;)o.push(0);for(n=u;--n>=0;){for(t=0,i=l+n;i>n;)a=o[i]+f[n]*d[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=Kr(o,r),x?y(e,p.precision,p.rounding):e};m.toBinary=function(e,t){return yi(this,2,e,t)};m.toDecimalPlaces=m.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ne(e,0,_e),t===void 0?t=n.rounding:ne(t,0,8),y(r,e+r.e+1,t))};m.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ge(n,!0):(ne(e,0,_e),t===void 0?t=i.rounding:ne(t,0,8),n=y(new i(n),e+1,t),r=ge(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};m.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=ge(i):(ne(e,0,_e),t===void 0?t=o.rounding:ne(t,0,8),n=y(new o(i),e+i.e+1,t),r=ge(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};m.toFraction=function(e){var t,r,n,i,o,s,a,l,u,c,p,d,f=this,g=f.d,h=f.constructor;if(!g)return new h(f);if(u=r=new h(1),n=l=new h(0),t=new h(n),o=t.e=ms(g)-f.e-1,s=o%E,t.d[0]=j(10,s<0?E+s:s),e==null)e=o>0?t:u;else{if(a=new h(e),!a.isInt()||a.lt(u))throw Error(De+a);e=a.gt(t)?o>0?t:u:a}for(x=!1,a=new h(G(g)),c=h.precision,h.precision=o=g.length*E*2;p=_(a,t,0,1,1),i=r.plus(p.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(p.times(i)),l=i,i=t,t=a.minus(p.times(i)),a=i;return i=_(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=f.s,d=_(u,n,o,1).minus(f).abs().cmp(_(l,r,o,1).minus(f).abs())<1?[u,n]:[l,r],h.precision=c,x=!0,d};m.toHexadecimal=m.toHex=function(e,t){return yi(this,16,e,t)};m.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ne(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(x=!1,r=_(r,e,0,t,1).times(e),x=!0,y(r)):(e.s=r.s,r=e),r};m.toNumber=function(){return+this};m.toOctal=function(e,t){return yi(this,8,e,t)};m.toPower=m.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(j(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return y(a,n,o);if(t=Y(e.e/E),t>=e.d.length-1&&(r=u<0?-u:u)<=Hc)return i=fs(l,a,r,n),e.s<0?new l(1).div(i):y(i,n,o);if(s=a.s,s<0){if(t<e.d.length-1)return new l(NaN);if((e.d[t]&1)==0&&(s=1),a.e==0&&a.d[0]==1&&a.d.length==1)return a.s=s,a}return r=j(+a,u),t=r==0||!isFinite(r)?Y(u*(Math.log("0."+G(a.d))/Math.LN10+a.e+1)):new l(r+"").e,t>l.maxE+1||t<l.minE-1?new l(t>0?s/0:0):(x=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=hi(e.times(Oe(a,n+r)),n),i.d&&(i=y(i,n+5,1),Jt(i.d,n,o)&&(t=n+10,i=y(hi(e.times(Oe(a,t+r)),t),t+5,1),+G(i.d).slice(n+1,n+15)+1==1e14&&(i=y(i,n+1,0)))),i.s=s,x=!0,l.rounding=o,y(i,n,o))};m.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ge(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ne(e,1,_e),t===void 0?t=i.rounding:ne(t,0,8),n=y(new i(n),e,t),r=ge(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};m.toSignificantDigits=m.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ne(e,1,_e),t===void 0?t=n.rounding:ne(t,0,8)),y(new n(r),e,t)};m.toString=function(){var e=this,t=e.constructor,r=ge(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};m.truncated=m.trunc=function(){return y(new this.constructor(this),this.e+1,1)};m.valueOf=m.toJSON=function(){var e=this,t=e.constructor,r=ge(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function G(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t<i;t++)n=e[t]+"",r=E-n.length,r&&(o+=Ie(r)),o+=n;s=e[t],n=s+"",r=E-n.length,r&&(o+=Ie(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return o+s}function ne(e,t,r){if(e!==~~e||e<t||e>r)throw Error(De+e)}function Jt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=E,i=0):(i=Math.ceil((t+1)/E),t%=E),o=j(10,E-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1=