@fnlb-project/database 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,920 @@
1
+ // @bun
2
+ var qc=Object.create;var{getPrototypeOf:Wc,defineProperty:KC,getOwnPropertyNames:zc}=Object;var Cc=Object.prototype.hasOwnProperty;var JA=(F,A,B)=>{B=F!=null?qc(Wc(F)):{};let D=A||!F||!F.__esModule?KC(B,"default",{value:F,enumerable:!0}):B;for(let J of zc(F))if(!Cc.call(D,J))KC(D,J,{get:()=>F[J],enumerable:!0});return D};var K=(F,A)=>()=>(A||F((A={exports:{}}).exports,A),A.exports);var u9=K((UC,QC)=>{/*!
3
+ * Connection states
4
+ */var z2=QC.exports=UC=Object.create(null);z2[0]="disconnected";z2[1]="connected";z2[2]="connecting";z2[3]="disconnecting";z2[99]="uninitialized";z2.disconnected=0;z2.connected=1;z2.connecting=2;z2.disconnecting=3;z2.uninitialized=99});var Z6=K((vK1,LC)=>{/*!
5
+ * Centralize this so we can more easily work around issues with people
6
+ * stubbing out `process.nextTick()` in tests using sinon:
7
+ * https://github.com/sinonjs/lolex#automatically-incrementing-mocked-time
8
+ * See gh-6074
9
+ */var Kc=typeof process!=="undefined"&&typeof process.nextTick==="function"?process.nextTick.bind(process):(F)=>setTimeout(F,0);LC.exports=function F(A){return Kc(A)}});var wC=K((hK1,RC)=>{/*!
10
+ * Module dependencies.
11
+ */var Uc=import.meta.require("events").EventEmitter,Qc=u9(),VC=Z6();function _1(F,A,B){if(B===void 0)B={};if(this.opts=B,this.name=F,this.collectionName=F,this.conn=A,this.queue=[],this.buffer=!0,this.emitter=new Uc,Qc.connected===this.conn.readyState)this.onOpen()}_1.prototype.name;_1.prototype.collectionName;_1.prototype.conn;_1.prototype.onOpen=function(){this.buffer=!1,VC(()=>this.doQueue())};_1.prototype.onClose=function(){};_1.prototype.addQueue=function(F,A){return this.queue.push([F,A]),this};_1.prototype.removeQueue=function(F,A){let B=this.queue.findIndex((D)=>D[0]===F&&D[1]===A);if(B===-1)return!1;return this.queue.splice(B,1),!0};_1.prototype.doQueue=function(){for(let A of this.queue)if(typeof A[0]==="function")A[0].apply(this,A[1]);else this[A[0]].apply(this,A[1]);this.queue=[];let F=this;return VC(function(){F.emitter.emit("queue")}),this};_1.prototype.ensureIndex=function(){throw new Error("Collection#ensureIndex unimplemented by driver")};_1.prototype.createIndex=function(){throw new Error("Collection#createIndex unimplemented by driver")};_1.prototype.findAndModify=function(){throw new Error("Collection#findAndModify unimplemented by driver")};_1.prototype.findOneAndUpdate=function(){throw new Error("Collection#findOneAndUpdate unimplemented by driver")};_1.prototype.findOneAndDelete=function(){throw new Error("Collection#findOneAndDelete unimplemented by driver")};_1.prototype.findOneAndReplace=function(){throw new Error("Collection#findOneAndReplace unimplemented by driver")};_1.prototype.findOne=function(){throw new Error("Collection#findOne unimplemented by driver")};_1.prototype.find=function(){throw new Error("Collection#find unimplemented by driver")};_1.prototype.insert=function(){throw new Error("Collection#insert unimplemented by driver")};_1.prototype.insertOne=function(){throw new Error("Collection#insertOne unimplemented by driver")};_1.prototype.insertMany=function(){throw new Error("Collection#insertMany unimplemented by driver")};_1.prototype.save=function(){throw new Error("Collection#save unimplemented by driver")};_1.prototype.updateOne=function(){throw new Error("Collection#updateOne unimplemented by driver")};_1.prototype.updateMany=function(){throw new Error("Collection#updateMany unimplemented by driver")};_1.prototype.deleteOne=function(){throw new Error("Collection#deleteOne unimplemented by driver")};_1.prototype.deleteMany=function(){throw new Error("Collection#deleteMany unimplemented by driver")};_1.prototype.getIndexes=function(){throw new Error("Collection#getIndexes unimplemented by driver")};_1.prototype.watch=function(){throw new Error("Collection#watch unimplemented by driver")};/*!
12
+ * ignore
13
+ */_1.prototype._shouldBufferCommands=function F(){let A=this.opts;if(A.bufferCommands!=null)return A.bufferCommands;if(A&&A.schemaUserProvidedOptions!=null&&A.schemaUserProvidedOptions.bufferCommands!=null)return A.schemaUserProvidedOptions.bufferCommands;return this.conn._shouldBufferCommands()};/*!
14
+ * ignore
15
+ */_1.prototype._getBufferTimeoutMS=function F(){let A=this.conn,B=this.opts;if(B.bufferTimeoutMS!=null)return B.bufferTimeoutMS;if(B&&B.schemaUserProvidedOptions!=null&&B.schemaUserProvidedOptions.bufferTimeoutMS!=null)return B.schemaUserProvidedOptions.bufferTimeoutMS;if(A.config.bufferTimeoutMS!=null)return A.config.bufferTimeoutMS;if(A.base!=null&&A.base.get("bufferTimeoutMS")!=null)return A.base.get("bufferTimeoutMS");return 1e4};/*!
16
+ * Module exports.
17
+ */RC.exports=_1});var z1=K((mK1,IC)=>{/*!
18
+ * ignore
19
+ */class LX extends Error{}Object.defineProperty(LX.prototype,"name",{value:"MongooseError"});IC.exports=LX});var H6=K((Yl)=>{var Lc=(()=>{let F=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype),Symbol.toStringTag).get;return(A)=>F.call(A)})();function _9(F){return Lc(F)==="Uint8Array"}function pX(F){return typeof F==="object"&&F!=null&&Symbol.toStringTag in F&&(F[Symbol.toStringTag]==="ArrayBuffer"||F[Symbol.toStringTag]==="SharedArrayBuffer")}function g9(F){return F instanceof RegExp||Object.prototype.toString.call(F)==="[object RegExp]"}function iX(F){return typeof F==="object"&&F!=null&&Symbol.toStringTag in F&&F[Symbol.toStringTag]==="Map"}function b9(F){return F instanceof Date||Object.prototype.toString.call(F)==="[object Date]"}function i2(F,A){return JSON.stringify(F,(B,D)=>{if(typeof D==="bigint")return{$numberLong:`${D}`};else if(iX(D))return Object.fromEntries(D);return D})}function Vc(F){if(F!=null&&typeof F==="object"&&"stylize"in F&&typeof F.stylize==="function")return F.stylize}var b4=6,h9=Symbol.for("@@mdb.bson.version"),g8=2147483647,b8=-2147483648,hC=Math.pow(2,63)-1,mC=-Math.pow(2,63),dC=Math.pow(2,53),cC=-Math.pow(2,53),nX=1,lC=2,sX=3,pC=4,aX=5,Rc=6,iC=7,nC=8,sC=9,rX=10,YA=11,wc=12,tX=13,aC=14,rC=15,x8=16,tC=17,oX=18,oC=19,eC=255,FK=127,Ic=0,eX=4,AK=Object.freeze({double:1,string:2,object:3,array:4,binData:5,undefined:6,objectId:7,bool:8,date:9,null:10,regex:11,dbPointer:12,javascript:13,symbol:14,javascriptWithScope:15,int:16,timestamp:17,long:18,decimal:19,minKey:-1,maxKey:127});class g extends Error{get bsonError(){return!0}get name(){return"BSONError"}constructor(F,A){super(F,A)}static isBSONError(F){return F!=null&&typeof F==="object"&&"bsonError"in F&&F.bsonError===!0&&"name"in F&&"message"in F&&"stack"in F}}class A4 extends g{get name(){return"BSONVersionError"}constructor(){super(`Unsupported BSON version, bson types must be from bson ${b4}.x.x`)}}class f8 extends g{get name(){return"BSONRuntimeError"}constructor(F){super(F)}}class x6 extends g{get name(){return"BSONOffsetError"}constructor(F,A,B){super(`${F}. offset: ${A}`,B);this.offset=A}}var NC,PC;function BK(F,A,B,D){if(D){NC??=new TextDecoder("utf8",{fatal:!0});try{return NC.decode(F.subarray(A,B))}catch(J){throw new g("Invalid UTF-8 string in BSON document",{cause:J})}}return PC??=new TextDecoder("utf8",{fatal:!1}),PC.decode(F.subarray(A,B))}function DK(F,A,B){if(F.length===0)return"";let D=B-A;if(D===0)return"";if(D>20)return null;if(D===1&&F[A]<128)return String.fromCharCode(F[A]);if(D===2&&F[A]<128&&F[A+1]<128)return String.fromCharCode(F[A])+String.fromCharCode(F[A+1]);if(D===3&&F[A]<128&&F[A+1]<128&&F[A+2]<128)return String.fromCharCode(F[A])+String.fromCharCode(F[A+1])+String.fromCharCode(F[A+2]);let J=[];for(let X=A;X<B;X++){let Z=F[X];if(Z>127)return null;J.push(Z)}return String.fromCharCode(...J)}function Nc(F,A,B){if(A.length===0)return 0;if(A.length>25)return null;if(F.length-B<A.length)return null;for(let D=0,J=B;D<A.length;D++,J++){let X=A.charCodeAt(D);if(X>127)return null;F[J]=X}return A.length}function Pc(F){return U3.fromNumberArray(Array.from({length:F},()=>Math.floor(Math.random()*256)))}var Mc=(()=>{try{return import.meta.require("crypto").randomBytes}catch{return Pc}})(),U3={toLocalBufferType(F){if(Buffer.isBuffer(F))return F;if(ArrayBuffer.isView(F))return Buffer.from(F.buffer,F.byteOffset,F.byteLength);let A=F?.[Symbol.toStringTag]??Object.prototype.toString.call(F);if(A==="ArrayBuffer"||A==="SharedArrayBuffer"||A==="[object ArrayBuffer]"||A==="[object SharedArrayBuffer]")return Buffer.from(F);throw new g("Cannot create Buffer from the passed potentialBuffer.")},allocate(F){return Buffer.alloc(F)},allocateUnsafe(F){return Buffer.allocUnsafe(F)},equals(F,A){return U3.toLocalBufferType(F).equals(A)},fromNumberArray(F){return Buffer.from(F)},fromBase64(F){return Buffer.from(F,"base64")},toBase64(F){return U3.toLocalBufferType(F).toString("base64")},fromISO88591(F){return Buffer.from(F,"binary")},toISO88591(F){return U3.toLocalBufferType(F).toString("binary")},fromHex(F){return Buffer.from(F,"hex")},toHex(F){return U3.toLocalBufferType(F).toString("hex")},toUTF8(F,A,B,D){let J=B-A<=20?DK(F,A,B):null;if(J!=null)return J;let X=U3.toLocalBufferType(F).toString("utf8",A,B);if(D){for(let Z=0;Z<X.length;Z++)if(X.charCodeAt(Z)===65533){BK(F,A,B,!0);break}}return X},utf8ByteLength(F){return Buffer.byteLength(F,"utf8")},encodeUTF8Into(F,A,B){let D=Nc(F,A,B);if(D!=null)return D;return U3.toLocalBufferType(F).write(A,B,void 0,"utf8")},randomBytes:Mc,swap32(F){return U3.toLocalBufferType(F).swap32()}};function Tc(){let{navigator:F}=globalThis;return typeof F==="object"&&F.product==="ReactNative"}function jc(F){if(F<0)throw new RangeError(`The argument 'byteLength' is invalid. Received ${F}`);return _8.fromNumberArray(Array.from({length:F},()=>Math.floor(Math.random()*256)))}var kc=(()=>{let{crypto:F}=globalThis;if(F!=null&&typeof F.getRandomValues==="function")return(A)=>{return F.getRandomValues(_8.allocate(A))};else{if(Tc()){let{console:A}=globalThis;A?.warn?.("BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.")}return jc}})(),MC=/(\d|[a-f])/i,_8={toLocalBufferType(F){let A=F?.[Symbol.toStringTag]??Object.prototype.toString.call(F);if(A==="Uint8Array")return F;if(ArrayBuffer.isView(F))return new Uint8Array(F.buffer.slice(F.byteOffset,F.byteOffset+F.byteLength));if(A==="ArrayBuffer"||A==="SharedArrayBuffer"||A==="[object ArrayBuffer]"||A==="[object SharedArrayBuffer]")return new Uint8Array(F);throw new g("Cannot make a Uint8Array from passed potentialBuffer.")},allocate(F){if(typeof F!=="number")throw new TypeError(`The "size" argument must be of type number. Received ${String(F)}`);return new Uint8Array(F)},allocateUnsafe(F){return _8.allocate(F)},equals(F,A){if(F.byteLength!==A.byteLength)return!1;for(let B=0;B<F.byteLength;B++)if(F[B]!==A[B])return!1;return!0},fromNumberArray(F){return Uint8Array.from(F)},fromBase64(F){return Uint8Array.from(atob(F),(A)=>A.charCodeAt(0))},toBase64(F){return btoa(_8.toISO88591(F))},fromISO88591(F){return Uint8Array.from(F,(A)=>A.charCodeAt(0)&255)},toISO88591(F){return Array.from(Uint16Array.from(F),(A)=>String.fromCharCode(A)).join("")},fromHex(F){let A=F.length%2===0?F:F.slice(0,F.length-1),B=[];for(let D=0;D<A.length;D+=2){let J=A[D],X=A[D+1];if(!MC.test(J))break;if(!MC.test(X))break;let Z=Number.parseInt(`${J}${X}`,16);B.push(Z)}return Uint8Array.from(B)},toHex(F){return Array.from(F,(A)=>A.toString(16).padStart(2,"0")).join("")},toUTF8(F,A,B,D){let J=B-A<=20?DK(F,A,B):null;if(J!=null)return J;return BK(F,A,B,D)},utf8ByteLength(F){return new TextEncoder().encode(F).byteLength},encodeUTF8Into(F,A,B){let D=new TextEncoder().encode(A);return F.set(D,B),D.byteLength},randomBytes:kc,swap32(F){if(F.length%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let A=0;A<F.length;A+=4){let B=F[A],D=F[A+1],J=F[A+2],X=F[A+3];F[A]=X,F[A+1]=J,F[A+2]=D,F[A+3]=B}return F}},Oc=typeof Buffer==="function"&&Buffer.prototype?._isBuffer!==!0,x=Oc?U3:_8;class C2{get[h9](){return b4}[Symbol.for("nodejs.util.inspect.custom")](F,A,B){return this.inspect(F,A,B)}}var y9=new Float64Array(1),M1=new Uint8Array(y9.buffer,0,8);y9[0]=-1;var VX=M1[7]===0,A1={isBigEndian:VX,getNonnegativeInt32LE(F,A){if(F[A+3]>127)throw new RangeError(`Size cannot be negative at offset: ${A}`);return F[A]|F[A+1]<<8|F[A+2]<<16|F[A+3]<<24},getInt32LE(F,A){return F[A]|F[A+1]<<8|F[A+2]<<16|F[A+3]<<24},getUint32LE(F,A){return F[A]+F[A+1]*256+F[A+2]*65536+F[A+3]*16777216},getUint32BE(F,A){return F[A+3]+F[A+2]*256+F[A+1]*65536+F[A]*16777216},getBigInt64LE(F,A){let B=A1.getUint32LE(F,A),D=A1.getUint32LE(F,A+4);return(BigInt(D)<<BigInt(32))+BigInt(B)},getFloat64LE:VX?(F,A)=>{return M1[7]=F[A],M1[6]=F[A+1],M1[5]=F[A+2],M1[4]=F[A+3],M1[3]=F[A+4],M1[2]=F[A+5],M1[1]=F[A+6],M1[0]=F[A+7],y9[0]}:(F,A)=>{return M1[0]=F[A],M1[1]=F[A+1],M1[2]=F[A+2],M1[3]=F[A+3],M1[4]=F[A+4],M1[5]=F[A+5],M1[6]=F[A+6],M1[7]=F[A+7],y9[0]},setInt32BE(F,A,B){return F[A+3]=B,B>>>=8,F[A+2]=B,B>>>=8,F[A+1]=B,B>>>=8,F[A]=B,4},setInt32LE(F,A,B){return F[A]=B,B>>>=8,F[A+1]=B,B>>>=8,F[A+2]=B,B>>>=8,F[A+3]=B,4},setBigInt64LE(F,A,B){let D=BigInt(4294967295),J=Number(B&D);F[A]=J,J>>=8,F[A+1]=J,J>>=8,F[A+2]=J,J>>=8,F[A+3]=J;let X=Number(B>>BigInt(32)&D);return F[A+4]=X,X>>=8,F[A+5]=X,X>>=8,F[A+6]=X,X>>=8,F[A+7]=X,8},setFloat64LE:VX?(F,A,B)=>{return y9[0]=B,F[A]=M1[7],F[A+1]=M1[6],F[A+2]=M1[5],F[A+3]=M1[4],F[A+4]=M1[3],F[A+5]=M1[2],F[A+6]=M1[1],F[A+7]=M1[0],8}:(F,A,B)=>{return y9[0]=B,F[A]=M1[0],F[A+1]=M1[1],F[A+2]=M1[2],F[A+3]=M1[3],F[A+4]=M1[4],F[A+5]=M1[5],F[A+6]=M1[6],F[A+7]=M1[7],8}};class e extends C2{get _bsontype(){return"Binary"}constructor(F,A){super();if(F!=null&&typeof F==="string"&&!ArrayBuffer.isView(F)&&!pX(F)&&!Array.isArray(F))throw new g("Binary can only be constructed from Uint8Array or number[]");if(this.sub_type=A??e.BSON_BINARY_SUBTYPE_DEFAULT,F==null)this.buffer=x.allocate(e.BUFFER_SIZE),this.position=0;else this.buffer=Array.isArray(F)?x.fromNumberArray(F):x.toLocalBufferType(F),this.position=this.buffer.byteLength}put(F){if(typeof F==="string"&&F.length!==1)throw new g("only accepts single character String");else if(typeof F!=="number"&&F.length!==1)throw new g("only accepts single character Uint8Array or Array");let A;if(typeof F==="string")A=F.charCodeAt(0);else if(typeof F==="number")A=F;else A=F[0];if(A<0||A>255)throw new g("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.byteLength>this.position)this.buffer[this.position++]=A;else{let B=x.allocate(e.BUFFER_SIZE+this.buffer.length);B.set(this.buffer,0),this.buffer=B,this.buffer[this.position++]=A}}write(F,A){if(A=typeof A==="number"?A:this.position,this.buffer.byteLength<A+F.length){let B=x.allocate(this.buffer.byteLength+F.length);B.set(this.buffer,0),this.buffer=B}if(ArrayBuffer.isView(F))this.buffer.set(x.toLocalBufferType(F),A),this.position=A+F.byteLength>this.position?A+F.length:this.position;else if(typeof F==="string")throw new g("input cannot be string")}read(F,A){A=A&&A>0?A:this.position;let B=F+A;return this.buffer.subarray(F,B>this.position?this.position:B)}value(){return this.buffer.length===this.position?this.buffer:this.buffer.subarray(0,this.position)}length(){return this.position}toJSON(){return x.toBase64(this.buffer.subarray(0,this.position))}toString(F){if(F==="hex")return x.toHex(this.buffer.subarray(0,this.position));if(F==="base64")return x.toBase64(this.buffer.subarray(0,this.position));if(F==="utf8"||F==="utf-8")return x.toUTF8(this.buffer,0,this.position,!1);return x.toUTF8(this.buffer,0,this.position,!1)}toExtendedJSON(F){if(F=F||{},this.sub_type===e.SUBTYPE_VECTOR)JK(this);let A=x.toBase64(this.buffer),B=Number(this.sub_type).toString(16);if(F.legacy)return{$binary:A,$type:B.length===1?"0"+B:B};return{$binary:{base64:A,subType:B.length===1?"0"+B:B}}}toUUID(){if(this.sub_type===e.SUBTYPE_UUID)return new _0(this.buffer.subarray(0,this.position));throw new g(`Binary sub_type "${this.sub_type}" is not supported for converting to UUID. Only "${e.SUBTYPE_UUID}" is currently supported.`)}static createFromHexString(F,A){return new e(x.fromHex(F),A)}static createFromBase64(F,A){return new e(x.fromBase64(F),A)}static fromExtendedJSON(F,A){A=A||{};let B,D;if("$binary"in F){if(A.legacy&&typeof F.$binary==="string"&&"$type"in F)D=F.$type?parseInt(F.$type,16):0,B=x.fromBase64(F.$binary);else if(typeof F.$binary!=="string")D=F.$binary.subType?parseInt(F.$binary.subType,16):0,B=x.fromBase64(F.$binary.base64)}else if("$uuid"in F)D=4,B=_0.bytesFromString(F.$uuid);if(!B)throw new g(`Unexpected Binary Extended JSON format ${JSON.stringify(F)}`);return D===eX?new _0(B):new e(B,D)}inspect(F,A,B){B??=i2;let D=x.toBase64(this.buffer.subarray(0,this.position)),J=B(D,A),X=B(this.sub_type,A);return`Binary.createFromBase64(${J}, ${X})`}toInt8Array(){if(this.sub_type!==e.SUBTYPE_VECTOR)throw new g("Binary sub_type is not Vector");if(this.buffer[0]!==e.VECTOR_TYPE.Int8)throw new g("Binary datatype field is not Int8");return new Int8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position))}toFloat32Array(){if(this.sub_type!==e.SUBTYPE_VECTOR)throw new g("Binary sub_type is not Vector");if(this.buffer[0]!==e.VECTOR_TYPE.Float32)throw new g("Binary datatype field is not Float32");let F=new Uint8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position));if(A1.isBigEndian)x.swap32(F);return new Float32Array(F.buffer)}toPackedBits(){if(this.sub_type!==e.SUBTYPE_VECTOR)throw new g("Binary sub_type is not Vector");if(this.buffer[0]!==e.VECTOR_TYPE.PackedBit)throw new g("Binary datatype field is not packed bit");return new Uint8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position))}toBits(){if(this.sub_type!==e.SUBTYPE_VECTOR)throw new g("Binary sub_type is not Vector");if(this.buffer[0]!==e.VECTOR_TYPE.PackedBit)throw new g("Binary datatype field is not packed bit");let A=(this.length()-2)*8-this.buffer[1],B=new Int8Array(A);for(let D=0;D<B.length;D++){let J=D/8|0,X=this.buffer[J+2],Z=7-D%8,Y=X>>Z&1;B[D]=Y}return B}static fromInt8Array(F){let A=x.allocate(F.byteLength+2);A[0]=e.VECTOR_TYPE.Int8,A[1]=0;let B=new Uint8Array(F.buffer,F.byteOffset,F.byteLength);return A.set(B,2),new this(A,this.SUBTYPE_VECTOR)}static fromFloat32Array(F){let A=x.allocate(F.byteLength+2);A[0]=e.VECTOR_TYPE.Float32,A[1]=0;let B=new Uint8Array(F.buffer,F.byteOffset,F.byteLength);if(A.set(B,2),A1.isBigEndian)x.swap32(new Uint8Array(A.buffer,2));return new this(A,this.SUBTYPE_VECTOR)}static fromPackedBits(F,A=0){let B=x.allocate(F.byteLength+2);return B[0]=e.VECTOR_TYPE.PackedBit,B[1]=A,B.set(F,2),new this(B,this.SUBTYPE_VECTOR)}static fromBits(F){let A=F.length+7>>>3,B=new Uint8Array(A+2);B[0]=e.VECTOR_TYPE.PackedBit;let D=F.length%8;B[1]=D===0?0:8-D;for(let J=0;J<F.length;J++){let X=J>>>3,Z=F[J];if(Z!==0&&Z!==1)throw new g(`Invalid bit value at ${J}: must be 0 or 1, found ${F[J]}`);if(Z===0)continue;let Y=7-J%8;B[X+2]|=Z<<Y}return new this(B,e.SUBTYPE_VECTOR)}}e.BSON_BINARY_SUBTYPE_DEFAULT=0;e.BUFFER_SIZE=256;e.SUBTYPE_DEFAULT=0;e.SUBTYPE_FUNCTION=1;e.SUBTYPE_BYTE_ARRAY=2;e.SUBTYPE_UUID_OLD=3;e.SUBTYPE_UUID=4;e.SUBTYPE_MD5=5;e.SUBTYPE_ENCRYPTED=6;e.SUBTYPE_COLUMN=7;e.SUBTYPE_SENSITIVE=8;e.SUBTYPE_VECTOR=9;e.SUBTYPE_USER_DEFINED=128;e.VECTOR_TYPE=Object.freeze({Int8:3,Float32:39,PackedBit:16});function JK(F){if(F.sub_type!==e.SUBTYPE_VECTOR)return;let A=F.position,B=F.buffer[0],D=F.buffer[1];if((B===e.VECTOR_TYPE.Float32||B===e.VECTOR_TYPE.Int8)&&D!==0)throw new g("Invalid Vector: padding must be zero for int8 and float32 vectors");if(B===e.VECTOR_TYPE.PackedBit&&D!==0&&A===2)throw new g("Invalid Vector: padding must be zero for packed bit vectors that are empty");if(B===e.VECTOR_TYPE.PackedBit&&D>7)throw new g(`Invalid Vector: padding must be a value between 0 and 7. found: ${D}`)}var RX=16,Sc=/^[0-9A-F]{32}$/i,uc=/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i;class _0 extends e{constructor(F){let A;if(F==null)A=_0.generate();else if(F instanceof _0)A=x.toLocalBufferType(new Uint8Array(F.buffer));else if(ArrayBuffer.isView(F)&&F.byteLength===RX)A=x.toLocalBufferType(F);else if(typeof F==="string")A=_0.bytesFromString(F);else throw new g("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");super(A,eX)}get id(){return this.buffer}set id(F){this.buffer=F}toHexString(F=!0){if(F)return[x.toHex(this.buffer.subarray(0,4)),x.toHex(this.buffer.subarray(4,6)),x.toHex(this.buffer.subarray(6,8)),x.toHex(this.buffer.subarray(8,10)),x.toHex(this.buffer.subarray(10,16))].join("-");return x.toHex(this.buffer)}toString(F){if(F==="hex")return x.toHex(this.id);if(F==="base64")return x.toBase64(this.id);return this.toHexString()}toJSON(){return this.toHexString()}equals(F){if(!F)return!1;if(F instanceof _0)return x.equals(F.id,this.id);try{return x.equals(new _0(F).id,this.id)}catch{return!1}}toBinary(){return new e(this.id,e.SUBTYPE_UUID)}static generate(){let F=x.randomBytes(RX);return F[6]=F[6]&15|64,F[8]=F[8]&63|128,F}static isValid(F){if(!F)return!1;if(typeof F==="string")return _0.isValidUUIDString(F);if(_9(F))return F.byteLength===RX;return F._bsontype==="Binary"&&F.sub_type===this.SUBTYPE_UUID&&F.buffer.byteLength===16}static createFromHexString(F){let A=_0.bytesFromString(F);return new _0(A)}static createFromBase64(F){return new _0(x.fromBase64(F))}static bytesFromString(F){if(!_0.isValidUUIDString(F))throw new g("UUID string representation must be 32 hex digits or canonical hyphenated representation");return x.fromHex(F.replace(/-/g,""))}static isValidUUIDString(F){return Sc.test(F)||uc.test(F)}inspect(F,A,B){return B??=i2,`new UUID(${B(this.toHexString(),A)})`}}class L3 extends C2{get _bsontype(){return"Code"}constructor(F,A){super();this.code=F.toString(),this.scope=A??null}toJSON(){if(this.scope!=null)return{code:this.code,scope:this.scope};return{code:this.code}}toExtendedJSON(){if(this.scope)return{$code:this.code,$scope:this.scope};return{$code:this.code}}static fromExtendedJSON(F){return new L3(F.$code,F.$scope)}inspect(F,A,B){B??=i2;let D=B(this.code,A),J=D.includes(`
20
+ `);if(this.scope!=null)D+=`,${J?`
21
+ `:" "}${B(this.scope,A)}`;let X=J&&this.scope===null;return`new Code(${J?`
22
+ `:""}${D}${X?`
23
+ `:""})`}}function XK(F){return F!=null&&typeof F==="object"&&"$id"in F&&F.$id!=null&&"$ref"in F&&typeof F.$ref==="string"&&(!("$db"in F)||("$db"in F)&&typeof F.$db==="string")}class o6 extends C2{get _bsontype(){return"DBRef"}constructor(F,A,B,D){super();let J=F.split(".");if(J.length===2)B=J.shift(),F=J.shift();this.collection=F,this.oid=A,this.db=B,this.fields=D||{}}get namespace(){return this.collection}set namespace(F){this.collection=F}toJSON(){let F=Object.assign({$ref:this.collection,$id:this.oid},this.fields);if(this.db!=null)F.$db=this.db;return F}toExtendedJSON(F){F=F||{};let A={$ref:this.collection,$id:this.oid};if(F.legacy)return A;if(this.db)A.$db=this.db;return A=Object.assign(A,this.fields),A}static fromExtendedJSON(F){let A=Object.assign({},F);return delete A.$ref,delete A.$id,delete A.$db,new o6(F.$ref,F.$id,F.$db,A)}inspect(F,A,B){B??=i2;let D=[B(this.namespace,A),B(this.oid,A),...this.db?[B(this.db,A)]:[],...Object.keys(this.fields).length>0?[B(this.fields,A)]:[]];return D[1]=B===i2?`new ObjectId(${D[1]})`:D[1],`new DBRef(${D.join(", ")})`}}function ZK(F){if(F==="")return F;let A=0,B=F[A]==="-",D=F[A]==="+";if(D||B)A+=1;let J=!1;for(;A<F.length&&F[A]==="0";++A)J=!0;if(!J)return D?F.slice(1):F;return`${B?"-":""}${F.length===A?"0":F.slice(A)}`}function xc(F,A){A=A??10;let B="0123456789abcdefghijklmnopqrstuvwxyz".slice(0,A);return new RegExp(`[^-+${B}]`,"i").test(F)?!1:F}var Y6=void 0;try{Y6=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}var TC=65536,fc=16777216,v9=TC*TC,YK=v9*v9,jC=YK/2,kC={},OC={},_c=20,gc=/^(\+?0|(\+|-)?[1-9][0-9]*)$/;class N extends C2{get _bsontype(){return"Long"}get __isLong__(){return!0}constructor(F=0,A,B){super();let D=typeof A==="boolean"?A:Boolean(B),J=typeof A==="number"?A:0,X=typeof F==="string"?N.fromString(F,D):typeof F==="bigint"?N.fromBigInt(F,D):{low:F|0,high:J|0,unsigned:D};this.low=X.low,this.high=X.high,this.unsigned=X.unsigned}static fromBits(F,A,B){return new N(F,A,B)}static fromInt(F,A){let B,D,J;if(A){if(F>>>=0,J=0<=F&&F<256){if(D=OC[F],D)return D}if(B=N.fromBits(F,(F|0)<0?-1:0,!0),J)OC[F]=B;return B}else{if(F|=0,J=-128<=F&&F<128){if(D=kC[F],D)return D}if(B=N.fromBits(F,F<0?-1:0,!1),J)kC[F]=B;return B}}static fromNumber(F,A){if(isNaN(F))return A?N.UZERO:N.ZERO;if(A){if(F<0)return N.UZERO;if(F>=YK)return N.MAX_UNSIGNED_VALUE}else{if(F<=-jC)return N.MIN_VALUE;if(F+1>=jC)return N.MAX_VALUE}if(F<0)return N.fromNumber(-F,A).neg();return N.fromBits(F%v9|0,F/v9|0,A)}static fromBigInt(F,A){let B=BigInt(4294967295),D=BigInt(32);return new N(Number(F&B),Number(F>>D&B),A)}static _fromString(F,A,B){if(F.length===0)throw new g("empty string");if(B<2||36<B)throw new g("radix");let D;if((D=F.indexOf("-"))>0)throw new g("interior hyphen");else if(D===0)return N._fromString(F.substring(1),A,B).neg();let J=N.fromNumber(Math.pow(B,8)),X=N.ZERO;for(let Z=0;Z<F.length;Z+=8){let Y=Math.min(8,F.length-Z),$=parseInt(F.substring(Z,Z+Y),B);if(Y<8){let G=N.fromNumber(Math.pow(B,Y));X=X.mul(G).add(N.fromNumber($))}else X=X.mul(J),X=X.add(N.fromNumber($))}return X.unsigned=A,X}static fromStringStrict(F,A,B){let D=!1;if(typeof A==="number")B=A,A=!1;else D=!!A;if(B??=10,F.trim()!==F)throw new g(`Input: '${F}' contains leading and/or trailing whitespace`);if(!xc(F,B))throw new g(`Input: '${F}' contains invalid characters for radix: ${B}`);let J=ZK(F),X=N._fromString(J,D,B);if(X.toString(B).toLowerCase()!==J.toLowerCase())throw new g(`Input: ${F} is not representable as ${X.unsigned?"an unsigned":"a signed"} 64-bit Long ${B!=null?`with radix: ${B}`:""}`);return X}static fromString(F,A,B){let D=!1;if(typeof A==="number")B=A,A=!1;else D=!!A;if(B??=10,F==="NaN"&&B<24)return N.ZERO;else if((F==="Infinity"||F==="+Infinity"||F==="-Infinity")&&B<35)return N.ZERO;return N._fromString(F,D,B)}static fromBytes(F,A,B){return B?N.fromBytesLE(F,A):N.fromBytesBE(F,A)}static fromBytesLE(F,A){return new N(F[0]|F[1]<<8|F[2]<<16|F[3]<<24,F[4]|F[5]<<8|F[6]<<16|F[7]<<24,A)}static fromBytesBE(F,A){return new N(F[4]<<24|F[5]<<16|F[6]<<8|F[7],F[0]<<24|F[1]<<16|F[2]<<8|F[3],A)}static isLong(F){return F!=null&&typeof F==="object"&&"__isLong__"in F&&F.__isLong__===!0}static fromValue(F,A){if(typeof F==="number")return N.fromNumber(F,A);if(typeof F==="string")return N.fromString(F,A);return N.fromBits(F.low,F.high,typeof A==="boolean"?A:F.unsigned)}add(F){if(!N.isLong(F))F=N.fromValue(F);let A=this.high>>>16,B=this.high&65535,D=this.low>>>16,J=this.low&65535,X=F.high>>>16,Z=F.high&65535,Y=F.low>>>16,$=F.low&65535,G=0,E=0,H=0,q=0;return q+=J+$,H+=q>>>16,q&=65535,H+=D+Y,E+=H>>>16,H&=65535,E+=B+Z,G+=E>>>16,E&=65535,G+=A+X,G&=65535,N.fromBits(H<<16|q,G<<16|E,this.unsigned)}and(F){if(!N.isLong(F))F=N.fromValue(F);return N.fromBits(this.low&F.low,this.high&F.high,this.unsigned)}compare(F){if(!N.isLong(F))F=N.fromValue(F);if(this.eq(F))return 0;let A=this.isNegative(),B=F.isNegative();if(A&&!B)return-1;if(!A&&B)return 1;if(!this.unsigned)return this.sub(F).isNegative()?-1:1;return F.high>>>0>this.high>>>0||F.high===this.high&&F.low>>>0>this.low>>>0?-1:1}comp(F){return this.compare(F)}divide(F){if(!N.isLong(F))F=N.fromValue(F);if(F.isZero())throw new g("division by zero");if(Y6){if(!this.unsigned&&this.high===-2147483648&&F.low===-1&&F.high===-1)return this;let J=(this.unsigned?Y6.div_u:Y6.div_s)(this.low,this.high,F.low,F.high);return N.fromBits(J,Y6.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?N.UZERO:N.ZERO;let A,B,D;if(!this.unsigned){if(this.eq(N.MIN_VALUE))if(F.eq(N.ONE)||F.eq(N.NEG_ONE))return N.MIN_VALUE;else if(F.eq(N.MIN_VALUE))return N.ONE;else if(A=this.shr(1).div(F).shl(1),A.eq(N.ZERO))return F.isNegative()?N.ONE:N.NEG_ONE;else return B=this.sub(F.mul(A)),D=A.add(B.div(F)),D;else if(F.eq(N.MIN_VALUE))return this.unsigned?N.UZERO:N.ZERO;if(this.isNegative()){if(F.isNegative())return this.neg().div(F.neg());return this.neg().div(F).neg()}else if(F.isNegative())return this.div(F.neg()).neg();D=N.ZERO}else{if(!F.unsigned)F=F.toUnsigned();if(F.gt(this))return N.UZERO;if(F.gt(this.shru(1)))return N.UONE;D=N.UZERO}B=this;while(B.gte(F)){A=Math.max(1,Math.floor(B.toNumber()/F.toNumber()));let J=Math.ceil(Math.log(A)/Math.LN2),X=J<=48?1:Math.pow(2,J-48),Z=N.fromNumber(A),Y=Z.mul(F);while(Y.isNegative()||Y.gt(B))A-=X,Z=N.fromNumber(A,this.unsigned),Y=Z.mul(F);if(Z.isZero())Z=N.ONE;D=D.add(Z),B=B.sub(Y)}return D}div(F){return this.divide(F)}equals(F){if(!N.isLong(F))F=N.fromValue(F);if(this.unsigned!==F.unsigned&&this.high>>>31===1&&F.high>>>31===1)return!1;return this.high===F.high&&this.low===F.low}eq(F){return this.equals(F)}getHighBits(){return this.high}getHighBitsUnsigned(){return this.high>>>0}getLowBits(){return this.low}getLowBitsUnsigned(){return this.low>>>0}getNumBitsAbs(){if(this.isNegative())return this.eq(N.MIN_VALUE)?64:this.neg().getNumBitsAbs();let F=this.high!==0?this.high:this.low,A;for(A=31;A>0;A--)if((F&1<<A)!==0)break;return this.high!==0?A+33:A+1}greaterThan(F){return this.comp(F)>0}gt(F){return this.greaterThan(F)}greaterThanOrEqual(F){return this.comp(F)>=0}gte(F){return this.greaterThanOrEqual(F)}ge(F){return this.greaterThanOrEqual(F)}isEven(){return(this.low&1)===0}isNegative(){return!this.unsigned&&this.high<0}isOdd(){return(this.low&1)===1}isPositive(){return this.unsigned||this.high>=0}isZero(){return this.high===0&&this.low===0}lessThan(F){return this.comp(F)<0}lt(F){return this.lessThan(F)}lessThanOrEqual(F){return this.comp(F)<=0}lte(F){return this.lessThanOrEqual(F)}modulo(F){if(!N.isLong(F))F=N.fromValue(F);if(Y6){let A=(this.unsigned?Y6.rem_u:Y6.rem_s)(this.low,this.high,F.low,F.high);return N.fromBits(A,Y6.get_high(),this.unsigned)}return this.sub(this.div(F).mul(F))}mod(F){return this.modulo(F)}rem(F){return this.modulo(F)}multiply(F){if(this.isZero())return N.ZERO;if(!N.isLong(F))F=N.fromValue(F);if(Y6){let W=Y6.mul(this.low,this.high,F.low,F.high);return N.fromBits(W,Y6.get_high(),this.unsigned)}if(F.isZero())return N.ZERO;if(this.eq(N.MIN_VALUE))return F.isOdd()?N.MIN_VALUE:N.ZERO;if(F.eq(N.MIN_VALUE))return this.isOdd()?N.MIN_VALUE:N.ZERO;if(this.isNegative())if(F.isNegative())return this.neg().mul(F.neg());else return this.neg().mul(F).neg();else if(F.isNegative())return this.mul(F.neg()).neg();if(this.lt(N.TWO_PWR_24)&&F.lt(N.TWO_PWR_24))return N.fromNumber(this.toNumber()*F.toNumber(),this.unsigned);let A=this.high>>>16,B=this.high&65535,D=this.low>>>16,J=this.low&65535,X=F.high>>>16,Z=F.high&65535,Y=F.low>>>16,$=F.low&65535,G=0,E=0,H=0,q=0;return q+=J*$,H+=q>>>16,q&=65535,H+=D*$,E+=H>>>16,H&=65535,H+=J*Y,E+=H>>>16,H&=65535,E+=B*$,G+=E>>>16,E&=65535,E+=D*Y,G+=E>>>16,E&=65535,E+=J*Z,G+=E>>>16,E&=65535,G+=A*$+B*Y+D*Z+J*X,G&=65535,N.fromBits(H<<16|q,G<<16|E,this.unsigned)}mul(F){return this.multiply(F)}negate(){if(!this.unsigned&&this.eq(N.MIN_VALUE))return N.MIN_VALUE;return this.not().add(N.ONE)}neg(){return this.negate()}not(){return N.fromBits(~this.low,~this.high,this.unsigned)}notEquals(F){return!this.equals(F)}neq(F){return this.notEquals(F)}ne(F){return this.notEquals(F)}or(F){if(!N.isLong(F))F=N.fromValue(F);return N.fromBits(this.low|F.low,this.high|F.high,this.unsigned)}shiftLeft(F){if(N.isLong(F))F=F.toInt();if((F&=63)===0)return this;else if(F<32)return N.fromBits(this.low<<F,this.high<<F|this.low>>>32-F,this.unsigned);else return N.fromBits(0,this.low<<F-32,this.unsigned)}shl(F){return this.shiftLeft(F)}shiftRight(F){if(N.isLong(F))F=F.toInt();if((F&=63)===0)return this;else if(F<32)return N.fromBits(this.low>>>F|this.high<<32-F,this.high>>F,this.unsigned);else return N.fromBits(this.high>>F-32,this.high>=0?0:-1,this.unsigned)}shr(F){return this.shiftRight(F)}shiftRightUnsigned(F){if(N.isLong(F))F=F.toInt();if(F&=63,F===0)return this;else{let A=this.high;if(F<32){let B=this.low;return N.fromBits(B>>>F|A<<32-F,A>>>F,this.unsigned)}else if(F===32)return N.fromBits(A,0,this.unsigned);else return N.fromBits(A>>>F-32,0,this.unsigned)}}shr_u(F){return this.shiftRightUnsigned(F)}shru(F){return this.shiftRightUnsigned(F)}subtract(F){if(!N.isLong(F))F=N.fromValue(F);return this.add(F.neg())}sub(F){return this.subtract(F)}toInt(){return this.unsigned?this.low>>>0:this.low}toNumber(){if(this.unsigned)return(this.high>>>0)*v9+(this.low>>>0);return this.high*v9+(this.low>>>0)}toBigInt(){return BigInt(this.toString())}toBytes(F){return F?this.toBytesLE():this.toBytesBE()}toBytesLE(){let F=this.high,A=this.low;return[A&255,A>>>8&255,A>>>16&255,A>>>24,F&255,F>>>8&255,F>>>16&255,F>>>24]}toBytesBE(){let F=this.high,A=this.low;return[F>>>24,F>>>16&255,F>>>8&255,F&255,A>>>24,A>>>16&255,A>>>8&255,A&255]}toSigned(){if(!this.unsigned)return this;return N.fromBits(this.low,this.high,!1)}toString(F){if(F=F||10,F<2||36<F)throw new g("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(N.MIN_VALUE)){let J=N.fromNumber(F),X=this.div(J),Z=X.mul(J).sub(this);return X.toString(F)+Z.toInt().toString(F)}else return"-"+this.neg().toString(F);let A=N.fromNumber(Math.pow(F,6),this.unsigned),B=this,D="";while(!0){let J=B.div(A),Z=(B.sub(J.mul(A)).toInt()>>>0).toString(F);if(B=J,B.isZero())return Z+D;else{while(Z.length<6)Z="0"+Z;D=""+Z+D}}}toUnsigned(){if(this.unsigned)return this;return N.fromBits(this.low,this.high,!0)}xor(F){if(!N.isLong(F))F=N.fromValue(F);return N.fromBits(this.low^F.low,this.high^F.high,this.unsigned)}eqz(){return this.isZero()}le(F){return this.lessThanOrEqual(F)}toExtendedJSON(F){if(F&&F.relaxed)return this.toNumber();return{$numberLong:this.toString()}}static fromExtendedJSON(F,A){let{useBigInt64:B=!1,relaxed:D=!0}={...A};if(F.$numberLong.length>_c)throw new g("$numberLong string is too long");if(!gc.test(F.$numberLong))throw new g(`$numberLong string "${F.$numberLong}" is in an invalid format`);if(B){let X=BigInt(F.$numberLong);return BigInt.asIntN(64,X)}let J=N.fromString(F.$numberLong);if(D)return J.toNumber();return J}inspect(F,A,B){B??=i2;let D=B(this.toString(),A),J=this.unsigned?`, ${B(this.unsigned,A)}`:"";return`new Long(${D}${J})`}}N.TWO_PWR_24=N.fromInt(fc);N.MAX_UNSIGNED_VALUE=N.fromBits(-1,-1,!0);N.ZERO=N.fromInt(0);N.UZERO=N.fromInt(0,!0);N.ONE=N.fromInt(1);N.UONE=N.fromInt(1,!0);N.NEG_ONE=N.fromInt(-1);N.MAX_VALUE=N.fromBits(-1,2147483647,!1);N.MIN_VALUE=N.fromBits(0,-2147483648,!1);var bc=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,yc=/^(\+|-)?(Infinity|inf)$/i,vc=/^(\+|-)?NaN$/i,x9=6111,S8=-6176,SC=6176,uC=34,wX=x.fromNumberArray([124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),xC=x.fromNumberArray([248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),fC=x.fromNumberArray([120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),hc=/^([-+])?(\d+)?$/,mc=31,_C=16383,dc=30,cc=31;function gC(F){return!isNaN(parseInt(F,10))}function lc(F){let A=N.fromNumber(1e9),B=N.fromNumber(0);if(!F.parts[0]&&!F.parts[1]&&!F.parts[2]&&!F.parts[3])return{quotient:F,rem:B};for(let D=0;D<=3;D++)B=B.shiftLeft(32),B=B.add(new N(F.parts[D],0)),F.parts[D]=B.div(A).low,B=B.modulo(A);return{quotient:F,rem:B}}function pc(F,A){if(!F&&!A)return{high:N.fromNumber(0),low:N.fromNumber(0)};let B=F.shiftRightUnsigned(32),D=new N(F.getLowBits(),0),J=A.shiftRightUnsigned(32),X=new N(A.getLowBits(),0),Z=B.multiply(J),Y=B.multiply(X),$=D.multiply(J),G=D.multiply(X);return Z=Z.add(Y.shiftRightUnsigned(32)),Y=new N(Y.getLowBits(),0).add($).add(G.shiftRightUnsigned(32)),Z=Z.add(Y.shiftRightUnsigned(32)),G=Y.shiftLeft(32).add(new N(G.getLowBits(),0)),{high:Z,low:G}}function ic(F,A){let B=F.high>>>0,D=A.high>>>0;if(B<D)return!0;else if(B===D){let J=F.low>>>0,X=A.low>>>0;if(J<X)return!0}return!1}function u6(F,A){throw new g(`"${F}" is not a valid Decimal128 string - ${A}`)}class r0 extends C2{get _bsontype(){return"Decimal128"}constructor(F){super();if(typeof F==="string")this.bytes=r0.fromString(F).bytes;else if(F instanceof Uint8Array||_9(F)){if(F.byteLength!==16)throw new g("Decimal128 must take a Buffer of 16 bytes");this.bytes=F}else throw new g("Decimal128 must take a Buffer or string")}static fromString(F){return r0._fromString(F,{allowRounding:!1})}static fromStringWithRounding(F){return r0._fromString(F,{allowRounding:!0})}static _fromString(F,A){let B=!1,D=!1,J=!1,X=!1,Z=0,Y=0,$=0,G=0,E=0,H=[0],q=0,W=0,z=0,C=0,U=new N(0,0),Q=new N(0,0),L=0,V=0;if(F.length>=7000)throw new g(""+F+" not a valid Decimal128 string");let w=F.match(bc),j=F.match(yc),T=F.match(vc);if(!w&&!j&&!T||F.length===0)throw new g(""+F+" not a valid Decimal128 string");if(w){let O=w[2],_=w[4],k=w[5],y=w[6];if(_&&y===void 0)u6(F,"missing exponent power");if(_&&O===void 0)u6(F,"missing exponent base");if(_===void 0&&(k||y))u6(F,"missing e before exponent")}if(F[V]==="+"||F[V]==="-")D=!0,B=F[V++]==="-";if(!gC(F[V])&&F[V]!=="."){if(F[V]==="i"||F[V]==="I")return new r0(B?xC:fC);else if(F[V]==="N")return new r0(wX)}while(gC(F[V])||F[V]==="."){if(F[V]==="."){if(J)u6(F,"contains multiple periods");J=!0,V=V+1;continue}if(q<uC){if(F[V]!=="0"||X){if(!X)E=Y;X=!0,H[W++]=parseInt(F[V],10),q=q+1}}if(X)$=$+1;if(J)G=G+1;Y=Y+1,V=V+1}if(J&&!Y)throw new g(""+F+" not a valid Decimal128 string");if(F[V]==="e"||F[V]==="E"){let O=F.substr(++V).match(hc);if(!O||!O[2])return new r0(wX);C=parseInt(O[0],10),V=V+O[0].length}if(F[V])return new r0(wX);if(!q)H[0]=0,$=1,q=1,Z=0;else if(z=q-1,Z=$,Z!==1)while(F[E+Z-1+Number(D)+Number(J)]==="0")Z=Z-1;if(C<=G&&G>C+16384)C=S8;else C=C-G;while(C>x9){if(z=z+1,z>=uC){if(Z===0){C=x9;break}u6(F,"overflow")}C=C-1}if(A.allowRounding){while(C<S8||q<$){if(z===0&&Z<q){C=S8,Z=0;break}if(q<$)$=$-1;else z=z-1;if(C<x9)C=C+1;else{if(H.join("").match(/^0+$/)){C=x9;break}u6(F,"overflow")}}if(z+1<Z){let O=Y;if(J)E=E+1,O=O+1;if(D)E=E+1,O=O+1;let _=parseInt(F[E+z+1],10),k=0;if(_>=5){if(k=1,_===5){k=H[z]%2===1?1:0;for(let y=E+z+2;y<O;y++)if(parseInt(F[y],10)){k=1;break}}}if(k){let y=z;for(;y>=0;y--)if(++H[y]>9){if(H[y]=0,y===0)if(C<x9)C=C+1,H[y]=1;else return new r0(B?xC:fC)}else break}}}else{while(C<S8||q<$){if(z===0){if(Z===0){C=S8;break}u6(F,"exponent underflow")}if(q<$){if(F[$-1+Number(D)+Number(J)]!=="0"&&Z!==0)u6(F,"inexact rounding");$=$-1}else{if(H[z]!==0)u6(F,"inexact rounding");z=z-1}if(C<x9)C=C+1;else u6(F,"overflow")}if(z+1<Z){if(J)E=E+1;if(D)E=E+1;if(parseInt(F[E+z+1],10)!==0)u6(F,"inexact rounding")}}if(U=N.fromNumber(0),Q=N.fromNumber(0),Z===0)U=N.fromNumber(0),Q=N.fromNumber(0);else if(z<17){let O=0;Q=N.fromNumber(H[O++]),U=new N(0,0);for(;O<=z;O++)Q=Q.multiply(N.fromNumber(10)),Q=Q.add(N.fromNumber(H[O]))}else{let O=0;U=N.fromNumber(H[O++]);for(;O<=z-17;O++)U=U.multiply(N.fromNumber(10)),U=U.add(N.fromNumber(H[O]));Q=N.fromNumber(H[O++]);for(;O<=z;O++)Q=Q.multiply(N.fromNumber(10)),Q=Q.add(N.fromNumber(H[O]))}let M=pc(U,N.fromString("100000000000000000"));if(M.low=M.low.add(Q),ic(M.low,Q))M.high=M.high.add(N.fromNumber(1));L=C+SC;let f={low:N.fromNumber(0),high:N.fromNumber(0)};if(M.high.shiftRightUnsigned(49).and(N.fromNumber(1)).equals(N.fromNumber(1)))f.high=f.high.or(N.fromNumber(3).shiftLeft(61)),f.high=f.high.or(N.fromNumber(L).and(N.fromNumber(16383).shiftLeft(47))),f.high=f.high.or(M.high.and(N.fromNumber(140737488355327)));else f.high=f.high.or(N.fromNumber(L&16383).shiftLeft(49)),f.high=f.high.or(M.high.and(N.fromNumber(562949953421311)));if(f.low=M.low,B)f.high=f.high.or(N.fromString("9223372036854775808"));let m=x.allocateUnsafe(16);return V=0,m[V++]=f.low.low&255,m[V++]=f.low.low>>8&255,m[V++]=f.low.low>>16&255,m[V++]=f.low.low>>24&255,m[V++]=f.low.high&255,m[V++]=f.low.high>>8&255,m[V++]=f.low.high>>16&255,m[V++]=f.low.high>>24&255,m[V++]=f.high.low&255,m[V++]=f.high.low>>8&255,m[V++]=f.high.low>>16&255,m[V++]=f.high.low>>24&255,m[V++]=f.high.high&255,m[V++]=f.high.high>>8&255,m[V++]=f.high.high>>16&255,m[V++]=f.high.high>>24&255,new r0(m)}toString(){let F,A=0,B=new Array(36);for(let V=0;V<B.length;V++)B[V]=0;let D=0,J=!1,X,Z={parts:[0,0,0,0]},Y,$,G=[];D=0;let E=this.bytes,H=E[D++]|E[D++]<<8|E[D++]<<16|E[D++]<<24,q=E[D++]|E[D++]<<8|E[D++]<<16|E[D++]<<24,W=E[D++]|E[D++]<<8|E[D++]<<16|E[D++]<<24,z=E[D++]|E[D++]<<8|E[D++]<<16|E[D++]<<24;if(D=0,{low:new N(H,q),high:new N(W,z)}.high.lessThan(N.ZERO))G.push("-");let U=z>>26&mc;if(U>>3===3)if(U===dc)return G.join("")+"Infinity";else if(U===cc)return"NaN";else F=z>>15&_C,X=8+(z>>14&1);else X=z>>14&7,F=z>>17&_C;let Q=F-SC;if(Z.parts[0]=(z&16383)+((X&15)<<14),Z.parts[1]=W,Z.parts[2]=q,Z.parts[3]=H,Z.parts[0]===0&&Z.parts[1]===0&&Z.parts[2]===0&&Z.parts[3]===0)J=!0;else for($=3;$>=0;$--){let V=0,w=lc(Z);if(Z=w.quotient,V=w.rem.low,!V)continue;for(Y=8;Y>=0;Y--)B[$*9+Y]=V%10,V=Math.floor(V/10)}if(J)A=1,B[D]=0;else{A=36;while(!B[D])A=A-1,D=D+1}let L=A-1+Q;if(L>=34||L<=-7||Q>0){if(A>34){if(G.push("0"),Q>0)G.push(`E+${Q}`);else if(Q<0)G.push(`E${Q}`);return G.join("")}if(G.push(`${B[D++]}`),A=A-1,A)G.push(".");for(let V=0;V<A;V++)G.push(`${B[D++]}`);if(G.push("E"),L>0)G.push(`+${L}`);else G.push(`${L}`)}else if(Q>=0)for(let V=0;V<A;V++)G.push(`${B[D++]}`);else{let V=A+Q;if(V>0)for(let w=0;w<V;w++)G.push(`${B[D++]}`);else G.push("0");G.push(".");while(V++<0)G.push("0");for(let w=0;w<A-Math.max(V-1,0);w++)G.push(`${B[D++]}`)}return G.join("")}toJSON(){return{$numberDecimal:this.toString()}}toExtendedJSON(){return{$numberDecimal:this.toString()}}static fromExtendedJSON(F){return r0.fromString(F.$numberDecimal)}inspect(F,A,B){return B??=i2,`new Decimal128(${B(this.toString(),A)})`}}class $6 extends C2{get _bsontype(){return"Double"}constructor(F){super();if(F instanceof Number)F=F.valueOf();this.value=+F}static fromString(F){let A=Number(F);if(F==="NaN")return new $6(NaN);if(F==="Infinity")return new $6(1/0);if(F==="-Infinity")return new $6(-1/0);if(!Number.isFinite(A))throw new g(`Input: ${F} is not representable as a Double`);if(F.trim()!==F)throw new g(`Input: '${F}' contains whitespace`);if(F==="")throw new g("Input is an empty string");if(/[^-0-9.+eE]/.test(F))throw new g(`Input: '${F}' is not in decimal or exponential notation`);return new $6(A)}valueOf(){return this.value}toJSON(){return this.value}toString(F){return this.value.toString(F)}toExtendedJSON(F){if(F&&(F.legacy||F.relaxed&&isFinite(this.value)))return this.value;if(Object.is(Math.sign(this.value),-0))return{$numberDouble:"-0.0"};return{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}}static fromExtendedJSON(F,A){let B=parseFloat(F.$numberDouble);return A&&A.relaxed?B:new $6(B)}inspect(F,A,B){return B??=i2,`new Double(${B(this.value,A)})`}}class V3 extends C2{get _bsontype(){return"Int32"}constructor(F){super();if(F instanceof Number)F=F.valueOf();this.value=+F|0}static fromString(F){let A=ZK(F),B=Number(F);if(g8<B)throw new g(`Input: '${F}' is larger than the maximum value for Int32`);else if(b8>B)throw new g(`Input: '${F}' is smaller than the minimum value for Int32`);else if(!Number.isSafeInteger(B))throw new g(`Input: '${F}' is not a safe integer`);else if(B.toString()!==A)throw new g(`Input: '${F}' is not a valid Int32 string`);return new V3(B)}valueOf(){return this.value}toString(F){return this.value.toString(F)}toJSON(){return this.value}toExtendedJSON(F){if(F&&(F.relaxed||F.legacy))return this.value;return{$numberInt:this.value.toString()}}static fromExtendedJSON(F,A){return A&&A.relaxed?parseInt(F.$numberInt,10):new V3(F.$numberInt)}inspect(F,A,B){return B??=i2,`new Int32(${B(this.value,A)})`}}class y4 extends C2{get _bsontype(){return"MaxKey"}toExtendedJSON(){return{$maxKey:1}}static fromExtendedJSON(){return new y4}inspect(){return"new MaxKey()"}}class v4 extends C2{get _bsontype(){return"MinKey"}toExtendedJSON(){return{$minKey:1}}static fromExtendedJSON(){return new v4}inspect(){return"new MinKey()"}}var g4=null,u8=new WeakMap;class p1 extends C2{get _bsontype(){return"ObjectId"}constructor(F){super();let A;if(typeof F==="object"&&F&&"id"in F){if(typeof F.id!=="string"&&!ArrayBuffer.isView(F.id))throw new g("Argument passed in must have an id that is of type string or Buffer");if("toHexString"in F&&typeof F.toHexString==="function")A=x.fromHex(F.toHexString());else A=F.id}else A=F;if(A==null||typeof A==="number")this.buffer=p1.generate(typeof A==="number"?A:void 0);else if(ArrayBuffer.isView(A)&&A.byteLength===12)this.buffer=x.toLocalBufferType(A);else if(typeof A==="string")if(p1.validateHexString(A)){if(this.buffer=x.fromHex(A),p1.cacheHexString)u8.set(this,A)}else throw new g("input must be a 24 character hex string, 12 byte Uint8Array, or an integer");else throw new g("Argument passed in does not match the accepted types")}get id(){return this.buffer}set id(F){if(this.buffer=F,p1.cacheHexString)u8.set(this,x.toHex(F))}static validateHexString(F){if(F?.length!==24)return!1;for(let A=0;A<24;A++){let B=F.charCodeAt(A);if(B>=48&&B<=57||B>=97&&B<=102||B>=65&&B<=70)continue;return!1}return!0}toHexString(){if(p1.cacheHexString){let A=u8.get(this);if(A)return A}let F=x.toHex(this.id);if(p1.cacheHexString)u8.set(this,F);return F}static getInc(){return p1.index=(p1.index+1)%16777215}static generate(F){if(typeof F!=="number")F=Math.floor(Date.now()/1000);let A=p1.getInc(),B=x.allocateUnsafe(12);if(A1.setInt32BE(B,0,F),g4===null)g4=x.randomBytes(5);return B[4]=g4[0],B[5]=g4[1],B[6]=g4[2],B[7]=g4[3],B[8]=g4[4],B[11]=A&255,B[10]=A>>8&255,B[9]=A>>16&255,B}toString(F){if(F==="base64")return x.toBase64(this.id);if(F==="hex")return this.toHexString();return this.toHexString()}toJSON(){return this.toHexString()}static is(F){return F!=null&&typeof F==="object"&&"_bsontype"in F&&F._bsontype==="ObjectId"}equals(F){if(F===void 0||F===null)return!1;if(p1.is(F))return this.buffer[11]===F.buffer[11]&&x.equals(this.buffer,F.buffer);if(typeof F==="string")return F.toLowerCase()===this.toHexString();if(typeof F==="object"&&typeof F.toHexString==="function"){let A=F.toHexString(),B=this.toHexString();return typeof A==="string"&&A.toLowerCase()===B}return!1}getTimestamp(){let F=new Date,A=A1.getUint32BE(this.buffer,0);return F.setTime(Math.floor(A)*1000),F}static createPk(){return new p1}serializeInto(F,A){return F[A]=this.buffer[0],F[A+1]=this.buffer[1],F[A+2]=this.buffer[2],F[A+3]=this.buffer[3],F[A+4]=this.buffer[4],F[A+5]=this.buffer[5],F[A+6]=this.buffer[6],F[A+7]=this.buffer[7],F[A+8]=this.buffer[8],F[A+9]=this.buffer[9],F[A+10]=this.buffer[10],F[A+11]=this.buffer[11],12}static createFromTime(F){let A=x.allocate(12);for(let B=11;B>=4;B--)A[B]=0;return A1.setInt32BE(A,0,F),new p1(A)}static createFromHexString(F){if(F?.length!==24)throw new g("hex string must be 24 characters");return new p1(x.fromHex(F))}static createFromBase64(F){if(F?.length!==16)throw new g("base64 string must be 16 characters");return new p1(x.fromBase64(F))}static isValid(F){if(F==null)return!1;if(typeof F==="string")return p1.validateHexString(F);try{return new p1(F),!0}catch{return!1}}toExtendedJSON(){if(this.toHexString)return{$oid:this.toHexString()};return{$oid:this.toString("hex")}}static fromExtendedJSON(F){return new p1(F.$oid)}isCached(){return p1.cacheHexString&&u8.has(this)}inspect(F,A,B){return B??=i2,`new ObjectId(${B(this.toHexString(),A)})`}}p1.index=Math.floor(Math.random()*16777215);function XA(F,A,B){let D=5;if(Array.isArray(F))for(let J=0;J<F.length;J++)D+=bC(J.toString(),F[J],A,!0,B);else{if(typeof F?.toBSON==="function")F=F.toBSON();for(let J of Object.keys(F))D+=bC(J,F[J],A,!1,B)}return D}function bC(F,A,B=!1,D=!1,J=!1){if(typeof A?.toBSON==="function")A=A.toBSON();switch(typeof A){case"string":return 1+x.utf8ByteLength(F)+1+4+x.utf8ByteLength(A)+1;case"number":if(Math.floor(A)===A&&A>=cC&&A<=dC)if(A>=b8&&A<=g8)return(F!=null?x.utf8ByteLength(F)+1:0)+5;else return(F!=null?x.utf8ByteLength(F)+1:0)+9;else return(F!=null?x.utf8ByteLength(F)+1:0)+9;case"undefined":if(D||!J)return(F!=null?x.utf8ByteLength(F)+1:0)+1;return 0;case"boolean":return(F!=null?x.utf8ByteLength(F)+1:0)+2;case"object":if(A!=null&&typeof A._bsontype==="string"&&A[h9]!==b4)throw new A4;else if(A==null||A._bsontype==="MinKey"||A._bsontype==="MaxKey")return(F!=null?x.utf8ByteLength(F)+1:0)+1;else if(A._bsontype==="ObjectId")return(F!=null?x.utf8ByteLength(F)+1:0)+13;else if(A instanceof Date||b9(A))return(F!=null?x.utf8ByteLength(F)+1:0)+9;else if(ArrayBuffer.isView(A)||A instanceof ArrayBuffer||pX(A))return(F!=null?x.utf8ByteLength(F)+1:0)+6+A.byteLength;else if(A._bsontype==="Long"||A._bsontype==="Double"||A._bsontype==="Timestamp")return(F!=null?x.utf8ByteLength(F)+1:0)+9;else if(A._bsontype==="Decimal128")return(F!=null?x.utf8ByteLength(F)+1:0)+17;else if(A._bsontype==="Code")if(A.scope!=null&&Object.keys(A.scope).length>0)return(F!=null?x.utf8ByteLength(F)+1:0)+1+4+4+x.utf8ByteLength(A.code.toString())+1+XA(A.scope,B,J);else return(F!=null?x.utf8ByteLength(F)+1:0)+1+4+x.utf8ByteLength(A.code.toString())+1;else if(A._bsontype==="Binary"){let X=A;if(X.sub_type===e.SUBTYPE_BYTE_ARRAY)return(F!=null?x.utf8ByteLength(F)+1:0)+(X.position+1+4+1+4);else return(F!=null?x.utf8ByteLength(F)+1:0)+(X.position+1+4+1)}else if(A._bsontype==="Symbol")return(F!=null?x.utf8ByteLength(F)+1:0)+x.utf8ByteLength(A.value)+4+1+1;else if(A._bsontype==="DBRef"){let X=Object.assign({$ref:A.collection,$id:A.oid},A.fields);if(A.db!=null)X.$db=A.db;return(F!=null?x.utf8ByteLength(F)+1:0)+1+XA(X,B,J)}else if(A instanceof RegExp||g9(A))return(F!=null?x.utf8ByteLength(F)+1:0)+1+x.utf8ByteLength(A.source)+1+(A.global?1:0)+(A.ignoreCase?1:0)+(A.multiline?1:0)+1;else if(A._bsontype==="BSONRegExp")return(F!=null?x.utf8ByteLength(F)+1:0)+1+x.utf8ByteLength(A.pattern)+1+x.utf8ByteLength(A.options)+1;else return(F!=null?x.utf8ByteLength(F)+1:0)+XA(A,B,J)+1;case"function":if(B)return(F!=null?x.utf8ByteLength(F)+1:0)+1+4+x.utf8ByteLength(A.toString())+1}return 0}function nc(F){return F.split("").sort().join("")}class E6 extends C2{get _bsontype(){return"BSONRegExp"}constructor(F,A){super();if(this.pattern=F,this.options=nc(A??""),this.pattern.indexOf("\x00")!==-1)throw new g(`BSON Regex patterns cannot contain null bytes, found: ${JSON.stringify(this.pattern)}`);if(this.options.indexOf("\x00")!==-1)throw new g(`BSON Regex options cannot contain null bytes, found: ${JSON.stringify(this.options)}`);for(let B=0;B<this.options.length;B++)if(!(this.options[B]==="i"||this.options[B]==="m"||this.options[B]==="x"||this.options[B]==="l"||this.options[B]==="s"||this.options[B]==="u"))throw new g(`The regular expression option [${this.options[B]}] is not supported`)}static parseOptions(F){return F?F.split("").sort().join(""):""}toExtendedJSON(F){if(F=F||{},F.legacy)return{$regex:this.pattern,$options:this.options};return{$regularExpression:{pattern:this.pattern,options:this.options}}}static fromExtendedJSON(F){if("$regex"in F)if(typeof F.$regex!=="string"){if(F.$regex._bsontype==="BSONRegExp")return F}else return new E6(F.$regex,E6.parseOptions(F.$options));if("$regularExpression"in F)return new E6(F.$regularExpression.pattern,E6.parseOptions(F.$regularExpression.options));throw new g(`Unexpected BSONRegExp EJSON object form: ${JSON.stringify(F)}`)}inspect(F,A,B){let D=Vc(A)??((Z)=>Z);B??=i2;let J=D(B(this.pattern),"regexp"),X=D(B(this.options),"regexp");return`new BSONRegExp(${J}, ${X})`}}class h4 extends C2{get _bsontype(){return"BSONSymbol"}constructor(F){super();this.value=F}valueOf(){return this.value}toString(){return this.value}toJSON(){return this.value}toExtendedJSON(){return{$symbol:this.value}}static fromExtendedJSON(F){return new h4(F.$symbol)}inspect(F,A,B){return B??=i2,`new BSONSymbol(${B(this.value,A)})`}}var sc=N;class G6 extends sc{get _bsontype(){return"Timestamp"}get i(){return this.low>>>0}get t(){return this.high>>>0}constructor(F){if(F==null)super(0,0,!0);else if(typeof F==="bigint")super(F,!0);else if(N.isLong(F))super(F.low,F.high,!0);else if(typeof F==="object"&&"t"in F&&"i"in F){if(typeof F.t!=="number"&&(typeof F.t!=="object"||F.t._bsontype!=="Int32"))throw new g("Timestamp constructed from { t, i } must provide t as a number");if(typeof F.i!=="number"&&(typeof F.i!=="object"||F.i._bsontype!=="Int32"))throw new g("Timestamp constructed from { t, i } must provide i as a number");let A=Number(F.t),B=Number(F.i);if(A<0||Number.isNaN(A))throw new g("Timestamp constructed from { t, i } must provide a positive t");if(B<0||Number.isNaN(B))throw new g("Timestamp constructed from { t, i } must provide a positive i");if(A>4294967295)throw new g("Timestamp constructed from { t, i } must provide t equal or less than uint32 max");if(B>4294967295)throw new g("Timestamp constructed from { t, i } must provide i equal or less than uint32 max");super(B,A,!0)}else throw new g("A Timestamp can only be constructed with: bigint, Long, or { t: number; i: number }")}toJSON(){return{$timestamp:this.toString()}}static fromInt(F){return new G6(N.fromInt(F,!0))}static fromNumber(F){return new G6(N.fromNumber(F,!0))}static fromBits(F,A){return new G6({i:F,t:A})}static fromString(F,A){return new G6(N.fromString(F,!0,A))}toExtendedJSON(){return{$timestamp:{t:this.t,i:this.i}}}static fromExtendedJSON(F){let A=N.isLong(F.$timestamp.i)?F.$timestamp.i.getLowBitsUnsigned():F.$timestamp.i,B=N.isLong(F.$timestamp.t)?F.$timestamp.t.getLowBitsUnsigned():F.$timestamp.t;return new G6({t:B,i:A})}inspect(F,A,B){B??=i2;let D=B(this.t,A),J=B(this.i,A);return`new Timestamp({ t: ${D}, i: ${J} })`}}G6.MAX_VALUE=N.MAX_UNSIGNED_VALUE;var ac=N.fromNumber(dC),rc=N.fromNumber(cC);function $K(F,A,B){A=A==null?{}:A;let D=A&&A.index?A.index:0,J=A1.getInt32LE(F,D);if(J<5)throw new g(`bson size must be >= 5, is ${J}`);if(A.allowObjectSmallerThanBufferSize&&F.length<J)throw new g(`buffer length ${F.length} must be >= bson size ${J}`);if(!A.allowObjectSmallerThanBufferSize&&F.length!==J)throw new g(`buffer length ${F.length} must === bson size ${J}`);if(J+D>F.byteLength)throw new g(`(bson size ${J} + options.index ${D} must be <= buffer length ${F.byteLength})`);if(F[D+J-1]!==0)throw new g("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");return ZA(F,D,A,B)}var tc=/^\$ref$|^\$id$|^\$db$/;function ZA(F,A,B,D=!1){let J=B.fieldsAsRaw==null?null:B.fieldsAsRaw,X=B.raw==null?!1:B.raw,Z=typeof B.bsonRegExp==="boolean"?B.bsonRegExp:!1,Y=B.promoteBuffers??!1,$=B.promoteLongs??!0,G=B.promoteValues??!0,E=B.useBigInt64??!1;if(E&&!G)throw new g("Must either request bigint or Long for int64 deserialization");if(E&&!$)throw new g("Must either request bigint or Long for int64 deserialization");let H=B.validation==null?{utf8:!0}:B.validation,q=!0,W,z,C=H.utf8;if(typeof C==="boolean")W=C;else{q=!1;let T=Object.keys(C).map(function(M){return C[M]});if(T.length===0)throw new g("UTF-8 validation setting cannot be empty");if(typeof T[0]!=="boolean")throw new g("Invalid UTF-8 validation option, must specify boolean values");if(W=T[0],!T.every((M)=>M===W))throw new g("Invalid UTF-8 validation option - keys must be all true or all false")}if(!q){z=new Set;for(let T of Object.keys(C))z.add(T)}let U=A;if(F.length<5)throw new g("corrupt bson message < 5 bytes long");let Q=A1.getInt32LE(F,A);if(A+=4,Q<5||Q>F.length)throw new g("corrupt bson message");let L=D?[]:{},V=0,w=!1,j=D?!1:null;while(!w){let T=F[A++];if(T===0)break;let M=A;while(F[M]!==0&&M<F.length)M++;if(M>=F.byteLength)throw new g("Bad BSON Document: illegal CString");let f=D?V++:x.toUTF8(F,A,M,!1),m=!0;if(q||z?.has(f))m=W;else m=!W;if(j!==!1&&f[0]==="$")j=tc.test(f);let O;if(A=M+1,T===lC){let _=A1.getInt32LE(F,A);if(A+=4,_<=0||_>F.length-A||F[A+_-1]!==0)throw new g("bad string length in bson");O=x.toUTF8(F,A,A+_-1,m),A=A+_}else if(T===iC){let _=x.allocateUnsafe(12);for(let k=0;k<12;k++)_[k]=F[A+k];O=new p1(_),A=A+12}else if(T===x8&&G===!1)O=new V3(A1.getInt32LE(F,A)),A+=4;else if(T===x8)O=A1.getInt32LE(F,A),A+=4;else if(T===nX){if(O=A1.getFloat64LE(F,A),A+=8,G===!1)O=new $6(O)}else if(T===sC){let _=A1.getInt32LE(F,A),k=A1.getInt32LE(F,A+4);A+=8,O=new Date(new N(_,k).toNumber())}else if(T===nC){if(F[A]!==0&&F[A]!==1)throw new g("illegal boolean type value");O=F[A++]===1}else if(T===sX){let _=A,k=A1.getInt32LE(F,A);if(k<=0||k>F.length-A)throw new g("bad embedded document length in bson");if(X)O=F.subarray(A,A+k);else{let y=B;if(!q)y={...B,validation:{utf8:m}};O=ZA(F,_,y,!1)}A=A+k}else if(T===pC){let _=A,k=A1.getInt32LE(F,A),y=B,s=A+k;if(J&&J[f])y={...B,raw:!0};if(!q)y={...y,validation:{utf8:m}};if(O=ZA(F,_,y,!0),A=A+k,F[A-1]!==0)throw new g("invalid array terminator byte");if(A!==s)throw new g("corrupted array bson")}else if(T===Rc)O=void 0;else if(T===rX)O=null;else if(T===oX)if(E)O=A1.getBigInt64LE(F,A),A+=8;else{let _=A1.getInt32LE(F,A),k=A1.getInt32LE(F,A+4);A+=8;let y=new N(_,k);if($&&G===!0)O=y.lessThanOrEqual(ac)&&y.greaterThanOrEqual(rc)?y.toNumber():y;else O=y}else if(T===oC){let _=x.allocateUnsafe(16);for(let k=0;k<16;k++)_[k]=F[A+k];A=A+16,O=new r0(_)}else if(T===aX){let _=A1.getInt32LE(F,A);A+=4;let k=_,y=F[A++];if(_<0)throw new g("Negative binary type element size found");if(_>F.byteLength)throw new g("Binary type size larger than document size");if(y===e.SUBTYPE_BYTE_ARRAY){if(_=A1.getInt32LE(F,A),A+=4,_<0)throw new g("Negative binary type element size found for subtype 0x02");if(_>k-4)throw new g("Binary type with subtype 0x02 contains too long binary size");if(_<k-4)throw new g("Binary type with subtype 0x02 contains too short binary size")}if(Y&&G)O=x.toLocalBufferType(F.subarray(A,A+_));else if(O=new e(F.subarray(A,A+_),y),y===eX&&_0.isValid(O))O=O.toUUID();A=A+_}else if(T===YA&&Z===!1){M=A;while(F[M]!==0&&M<F.length)M++;if(M>=F.length)throw new g("Bad BSON Document: illegal CString");let _=x.toUTF8(F,A,M,!1);A=M+1,M=A;while(F[M]!==0&&M<F.length)M++;if(M>=F.length)throw new g("Bad BSON Document: illegal CString");let k=x.toUTF8(F,A,M,!1);A=M+1;let y=new Array(k.length);for(M=0;M<k.length;M++)switch(k[M]){case"m":y[M]="m";break;case"s":y[M]="g";break;case"i":y[M]="i";break}O=new RegExp(_,y.join(""))}else if(T===YA&&Z===!0){M=A;while(F[M]!==0&&M<F.length)M++;if(M>=F.length)throw new g("Bad BSON Document: illegal CString");let _=x.toUTF8(F,A,M,!1);A=M+1,M=A;while(F[M]!==0&&M<F.length)M++;if(M>=F.length)throw new g("Bad BSON Document: illegal CString");let k=x.toUTF8(F,A,M,!1);A=M+1,O=new E6(_,k)}else if(T===aC){let _=A1.getInt32LE(F,A);if(A+=4,_<=0||_>F.length-A||F[A+_-1]!==0)throw new g("bad string length in bson");let k=x.toUTF8(F,A,A+_-1,m);O=G?k:new h4(k),A=A+_}else if(T===tC)O=new G6({i:A1.getUint32LE(F,A),t:A1.getUint32LE(F,A+4)}),A+=8;else if(T===eC)O=new v4;else if(T===FK)O=new y4;else if(T===tX){let _=A1.getInt32LE(F,A);if(A+=4,_<=0||_>F.length-A||F[A+_-1]!==0)throw new g("bad string length in bson");let k=x.toUTF8(F,A,A+_-1,m);O=new L3(k),A=A+_}else if(T===rC){let _=A1.getInt32LE(F,A);if(A+=4,_<13)throw new g("code_w_scope total size shorter minimum expected length");let k=A1.getInt32LE(F,A);if(A+=4,k<=0||k>F.length-A||F[A+k-1]!==0)throw new g("bad string length in bson");let y=x.toUTF8(F,A,A+k-1,m);A=A+k;let s=A,P1=A1.getInt32LE(F,A),n0=ZA(F,s,B,!1);if(A=A+P1,_<8+P1+k)throw new g("code_w_scope total size is too short, truncating scope");if(_>8+P1+k)throw new g("code_w_scope total size is too long, clips outer document");O=new L3(y,n0)}else if(T===wc){let _=A1.getInt32LE(F,A);if(A+=4,_<=0||_>F.length-A||F[A+_-1]!==0)throw new g("bad string length in bson");let k=x.toUTF8(F,A,A+_-1,m);A=A+_;let y=x.allocateUnsafe(12);for(let P1=0;P1<12;P1++)y[P1]=F[A+P1];let s=new p1(y);A=A+12,O=new o6(k,s)}else throw new g(`Detected unknown BSON type ${T.toString(16)} for fieldname "${f}"`);if(f==="__proto__")Object.defineProperty(L,f,{value:O,writable:!0,enumerable:!0,configurable:!0});else L[f]=O}if(Q!==A-U){if(D)throw new g("corrupt array bson");throw new g("corrupt object bson")}if(!j)return L;if(XK(L)){let T=Object.assign({},L);return delete T.$ref,delete T.$id,delete T.$db,new o6(L.$ref,L.$id,L.$db,T)}return L}var $A=/\x00/,yC=new Set(["$db","$ref","$id","$clusterTime"]);function IX(F,A,B,D){F[D++]=lC;let J=x.encodeUTF8Into(F,A,D);D=D+J+1,F[D-1]=0;let X=x.encodeUTF8Into(F,B,D+4);return A1.setInt32LE(F,D,X+1),D=D+4+X,F[D++]=0,D}function NX(F,A,B,D){let X=!Object.is(B,-0)&&Number.isSafeInteger(B)&&B<=g8&&B>=b8?x8:nX;F[D++]=X;let Z=x.encodeUTF8Into(F,A,D);if(D=D+Z,F[D++]=0,X===x8)D+=A1.setInt32LE(F,D,B);else D+=A1.setFloat64LE(F,D,B);return D}function PX(F,A,B,D){F[D++]=oX;let J=x.encodeUTF8Into(F,A,D);return D+=J,F[D++]=0,D+=A1.setBigInt64LE(F,D,B),D}function f9(F,A,B,D){F[D++]=rX;let J=x.encodeUTF8Into(F,A,D);return D=D+J,F[D++]=0,D}function MX(F,A,B,D){F[D++]=nC;let J=x.encodeUTF8Into(F,A,D);return D=D+J,F[D++]=0,F[D++]=B?1:0,D}function TX(F,A,B,D){F[D++]=sC;let J=x.encodeUTF8Into(F,A,D);D=D+J,F[D++]=0;let X=N.fromNumber(B.getTime()),Z=X.getLowBits(),Y=X.getHighBits();return D+=A1.setInt32LE(F,D,Z),D+=A1.setInt32LE(F,D,Y),D}function jX(F,A,B,D){F[D++]=YA;let J=x.encodeUTF8Into(F,A,D);if(D=D+J,F[D++]=0,B.source&&B.source.match($A)!=null)throw new g("value "+B.source+" must not contain null bytes");if(D=D+x.encodeUTF8Into(F,B.source,D),F[D++]=0,B.ignoreCase)F[D++]=105;if(B.global)F[D++]=115;if(B.multiline)F[D++]=109;return F[D++]=0,D}function kX(F,A,B,D){F[D++]=YA;let J=x.encodeUTF8Into(F,A,D);if(D=D+J,F[D++]=0,B.pattern.match($A)!=null)throw new g("pattern "+B.pattern+" must not contain null bytes");D=D+x.encodeUTF8Into(F,B.pattern,D),F[D++]=0;let X=B.options.split("").sort().join("");return D=D+x.encodeUTF8Into(F,X,D),F[D++]=0,D}function OX(F,A,B,D){if(B===null)F[D++]=rX;else if(B._bsontype==="MinKey")F[D++]=eC;else F[D++]=FK;let J=x.encodeUTF8Into(F,A,D);return D=D+J,F[D++]=0,D}function SX(F,A,B,D){F[D++]=iC;let J=x.encodeUTF8Into(F,A,D);return D=D+J,F[D++]=0,D+=B.serializeInto(F,D),D}function uX(F,A,B,D){F[D++]=aX;let J=x.encodeUTF8Into(F,A,D);D=D+J,F[D++]=0;let X=B.length;if(D+=A1.setInt32LE(F,D,X),F[D++]=Ic,X<=16)for(let Z=0;Z<X;Z++)F[D+Z]=B[Z];else F.set(B,D);return D=D+X,D}function xX(F,A,B,D,J,X,Z,Y,$){if($.has(B))throw new g("Cannot convert circular structure to BSON");$.add(B),F[D++]=Array.isArray(B)?pC:sX;let G=x.encodeUTF8Into(F,A,D);D=D+G,F[D++]=0;let E=y8(F,B,J,D,X+1,Z,Y,$);return $.delete(B),E}function fX(F,A,B,D){F[D++]=oC;let J=x.encodeUTF8Into(F,A,D);D=D+J,F[D++]=0;for(let X=0;X<16;X++)F[D+X]=B.bytes[X];return D+16}function _X(F,A,B,D){F[D++]=B._bsontype==="Long"?oX:tC;let J=x.encodeUTF8Into(F,A,D);D=D+J,F[D++]=0;let X=B.getLowBits(),Z=B.getHighBits();return D+=A1.setInt32LE(F,D,X),D+=A1.setInt32LE(F,D,Z),D}function gX(F,A,B,D){B=B.valueOf(),F[D++]=x8;let J=x.encodeUTF8Into(F,A,D);return D=D+J,F[D++]=0,D+=A1.setInt32LE(F,D,B),D}function bX(F,A,B,D){F[D++]=nX;let J=x.encodeUTF8Into(F,A,D);return D=D+J,F[D++]=0,D+=A1.setFloat64LE(F,D,B.value),D}function yX(F,A,B,D){F[D++]=tX;let J=x.encodeUTF8Into(F,A,D);D=D+J,F[D++]=0;let X=B.toString(),Z=x.encodeUTF8Into(F,X,D+4)+1;return A1.setInt32LE(F,D,Z),D=D+4+Z-1,F[D++]=0,D}function vX(F,A,B,D,J=!1,X=0,Z=!1,Y=!0,$){if(B.scope&&typeof B.scope==="object"){F[D++]=rC;let G=x.encodeUTF8Into(F,A,D);D=D+G,F[D++]=0;let E=D,H=B.code;D=D+4;let q=x.encodeUTF8Into(F,H,D+4)+1;A1.setInt32LE(F,D,q),F[D+4+q-1]=0,D=D+q+4;let W=y8(F,B.scope,J,D,X+1,Z,Y,$);D=W-1;let z=W-E;E+=A1.setInt32LE(F,E,z),F[D++]=0}else{F[D++]=tX;let G=x.encodeUTF8Into(F,A,D);D=D+G,F[D++]=0;let E=B.code.toString(),H=x.encodeUTF8Into(F,E,D+4)+1;A1.setInt32LE(F,D,H),D=D+4+H-1,F[D++]=0}return D}function hX(F,A,B,D){F[D++]=aX;let J=x.encodeUTF8Into(F,A,D);D=D+J,F[D++]=0;let{buffer:X,position:Z}=B;if(B.sub_type===e.SUBTYPE_BYTE_ARRAY)Z=Z+4;if(D+=A1.setInt32LE(F,D,Z),F[D++]=B.sub_type,B.sub_type===e.SUBTYPE_BYTE_ARRAY)Z=Z-4,D+=A1.setInt32LE(F,D,Z);if(B.sub_type===e.SUBTYPE_VECTOR)JK(B);if(Z<=16)for(let Y=0;Y<Z;Y++)F[D+Y]=X[Y];else F.set(X,D);return D=D+B.position,D}function mX(F,A,B,D){F[D++]=aC;let J=x.encodeUTF8Into(F,A,D);D=D+J,F[D++]=0;let X=x.encodeUTF8Into(F,B.value,D+4)+1;return A1.setInt32LE(F,D,X),D=D+4+X-1,F[D++]=0,D}function dX(F,A,B,D,J,X,Z){F[D++]=sX;let Y=x.encodeUTF8Into(F,A,D);D=D+Y,F[D++]=0;let $=D,G={$ref:B.collection||B.namespace,$id:B.oid};if(B.db!=null)G.$db=B.db;G=Object.assign(G,B.fields);let E=y8(F,G,!1,D,J+1,X,!0,Z),H=E-$;return $+=A1.setInt32LE(F,D,H),E}function y8(F,A,B,D,J,X,Z,Y){if(Y==null){if(A==null)return F[0]=5,F[1]=0,F[2]=0,F[3]=0,F[4]=0,5;if(Array.isArray(A))throw new g("serialize does not support an array as the root input");if(typeof A!=="object")throw new g("serialize does not support non-object as the root input");else if("_bsontype"in A&&typeof A._bsontype==="string")throw new g("BSON types cannot be serialized as a document");else if(b9(A)||g9(A)||_9(A)||pX(A))throw new g("date, regexp, typedarray, and arraybuffer cannot be BSON documents");Y=new Set}Y.add(A);let $=D+4;if(Array.isArray(A))for(let E=0;E<A.length;E++){let H=`${E}`,q=A[E];if(typeof q?.toBSON==="function")q=q.toBSON();let W=typeof q;if(q===void 0)$=f9(F,H,q,$);else if(q===null)$=f9(F,H,q,$);else if(W==="string")$=IX(F,H,q,$);else if(W==="number")$=NX(F,H,q,$);else if(W==="bigint")$=PX(F,H,q,$);else if(W==="boolean")$=MX(F,H,q,$);else if(W==="object"&&q._bsontype==null)if(q instanceof Date||b9(q))$=TX(F,H,q,$);else if(q instanceof Uint8Array||_9(q))$=uX(F,H,q,$);else if(q instanceof RegExp||g9(q))$=jX(F,H,q,$);else $=xX(F,H,q,$,B,J,X,Z,Y);else if(W==="object"){if(q[h9]!==b4)throw new A4;else if(q._bsontype==="ObjectId")$=SX(F,H,q,$);else if(q._bsontype==="Decimal128")$=fX(F,H,q,$);else if(q._bsontype==="Long"||q._bsontype==="Timestamp")$=_X(F,H,q,$);else if(q._bsontype==="Double")$=bX(F,H,q,$);else if(q._bsontype==="Code")$=vX(F,H,q,$,B,J,X,Z,Y);else if(q._bsontype==="Binary")$=hX(F,H,q,$);else if(q._bsontype==="BSONSymbol")$=mX(F,H,q,$);else if(q._bsontype==="DBRef")$=dX(F,H,q,$,J,X,Y);else if(q._bsontype==="BSONRegExp")$=kX(F,H,q,$);else if(q._bsontype==="Int32")$=gX(F,H,q,$);else if(q._bsontype==="MinKey"||q._bsontype==="MaxKey")$=OX(F,H,q,$);else if(typeof q._bsontype!=="undefined")throw new g(`Unrecognized or invalid _bsontype: ${String(q._bsontype)}`)}else if(W==="function"&&X)$=yX(F,H,q,$)}else if(A instanceof Map||iX(A)){let E=A.entries(),H=!1;while(!H){let q=E.next();if(H=!!q.done,H)continue;let W=q.value[0],z=q.value[1];if(typeof z?.toBSON==="function")z=z.toBSON();let C=typeof z;if(typeof W==="string"&&!yC.has(W)){if(W.match($A)!=null)throw new g("key "+W+" must not contain null bytes");if(B){if(W[0]==="$")throw new g("key "+W+" must not start with '$'");else if(W.includes("."))throw new g("key "+W+" must not contain '.'")}}if(z===void 0){if(Z===!1)$=f9(F,W,z,$)}else if(z===null)$=f9(F,W,z,$);else if(C==="string")$=IX(F,W,z,$);else if(C==="number")$=NX(F,W,z,$);else if(C==="bigint")$=PX(F,W,z,$);else if(C==="boolean")$=MX(F,W,z,$);else if(C==="object"&&z._bsontype==null)if(z instanceof Date||b9(z))$=TX(F,W,z,$);else if(z instanceof Uint8Array||_9(z))$=uX(F,W,z,$);else if(z instanceof RegExp||g9(z))$=jX(F,W,z,$);else $=xX(F,W,z,$,B,J,X,Z,Y);else if(C==="object"){if(z[h9]!==b4)throw new A4;else if(z._bsontype==="ObjectId")$=SX(F,W,z,$);else if(z._bsontype==="Decimal128")$=fX(F,W,z,$);else if(z._bsontype==="Long"||z._bsontype==="Timestamp")$=_X(F,W,z,$);else if(z._bsontype==="Double")$=bX(F,W,z,$);else if(z._bsontype==="Code")$=vX(F,W,z,$,B,J,X,Z,Y);else if(z._bsontype==="Binary")$=hX(F,W,z,$);else if(z._bsontype==="BSONSymbol")$=mX(F,W,z,$);else if(z._bsontype==="DBRef")$=dX(F,W,z,$,J,X,Y);else if(z._bsontype==="BSONRegExp")$=kX(F,W,z,$);else if(z._bsontype==="Int32")$=gX(F,W,z,$);else if(z._bsontype==="MinKey"||z._bsontype==="MaxKey")$=OX(F,W,z,$);else if(typeof z._bsontype!=="undefined")throw new g(`Unrecognized or invalid _bsontype: ${String(z._bsontype)}`)}else if(C==="function"&&X)$=yX(F,W,z,$)}}else{if(typeof A?.toBSON==="function"){if(A=A.toBSON(),A!=null&&typeof A!=="object")throw new g("toBSON function did not return an object")}for(let E of Object.keys(A)){let H=A[E];if(typeof H?.toBSON==="function")H=H.toBSON();let q=typeof H;if(typeof E==="string"&&!yC.has(E)){if(E.match($A)!=null)throw new g("key "+E+" must not contain null bytes");if(B){if(E[0]==="$")throw new g("key "+E+" must not start with '$'");else if(E.includes("."))throw new g("key "+E+" must not contain '.'")}}if(H===void 0){if(Z===!1)$=f9(F,E,H,$)}else if(H===null)$=f9(F,E,H,$);else if(q==="string")$=IX(F,E,H,$);else if(q==="number")$=NX(F,E,H,$);else if(q==="bigint")$=PX(F,E,H,$);else if(q==="boolean")$=MX(F,E,H,$);else if(q==="object"&&H._bsontype==null)if(H instanceof Date||b9(H))$=TX(F,E,H,$);else if(H instanceof Uint8Array||_9(H))$=uX(F,E,H,$);else if(H instanceof RegExp||g9(H))$=jX(F,E,H,$);else $=xX(F,E,H,$,B,J,X,Z,Y);else if(q==="object"){if(H[h9]!==b4)throw new A4;else if(H._bsontype==="ObjectId")$=SX(F,E,H,$);else if(H._bsontype==="Decimal128")$=fX(F,E,H,$);else if(H._bsontype==="Long"||H._bsontype==="Timestamp")$=_X(F,E,H,$);else if(H._bsontype==="Double")$=bX(F,E,H,$);else if(H._bsontype==="Code")$=vX(F,E,H,$,B,J,X,Z,Y);else if(H._bsontype==="Binary")$=hX(F,E,H,$);else if(H._bsontype==="BSONSymbol")$=mX(F,E,H,$);else if(H._bsontype==="DBRef")$=dX(F,E,H,$,J,X,Y);else if(H._bsontype==="BSONRegExp")$=kX(F,E,H,$);else if(H._bsontype==="Int32")$=gX(F,E,H,$);else if(H._bsontype==="MinKey"||H._bsontype==="MaxKey")$=OX(F,E,H,$);else if(typeof H._bsontype!=="undefined")throw new g(`Unrecognized or invalid _bsontype: ${String(H._bsontype)}`)}else if(q==="function"&&X)$=yX(F,E,H,$)}}Y.delete(A),F[$++]=0;let G=$-D;return D+=A1.setInt32LE(F,D,G),$}function oc(F){return F!=null&&typeof F==="object"&&"_bsontype"in F&&typeof F._bsontype==="string"}var ec={$oid:p1,$binary:e,$uuid:e,$symbol:h4,$numberInt:V3,$numberDecimal:r0,$numberDouble:$6,$numberLong:N,$minKey:v4,$maxKey:y4,$regex:E6,$regularExpression:E6,$timestamp:G6};function GK(F,A={}){if(typeof F==="number"){let D=F<=g8&&F>=b8,J=F<=hC&&F>=mC;if(A.relaxed||A.legacy)return F;if(Number.isInteger(F)&&!Object.is(F,-0)){if(D)return new V3(F);if(J){if(A.useBigInt64)return BigInt(F);return N.fromNumber(F)}}return new $6(F)}if(F==null||typeof F!=="object")return F;if(F.$undefined)return null;let B=Object.keys(F).filter((D)=>D.startsWith("$")&&F[D]!=null);for(let D=0;D<B.length;D++){let J=ec[B[D]];if(J)return J.fromExtendedJSON(F,A)}if(F.$date!=null){let D=F.$date,J=new Date;if(A.legacy)if(typeof D==="number")J.setTime(D);else if(typeof D==="string")J.setTime(Date.parse(D));else if(typeof D==="bigint")J.setTime(Number(D));else throw new f8(`Unrecognized type for EJSON date: ${typeof D}`);else if(typeof D==="string")J.setTime(Date.parse(D));else if(N.isLong(D))J.setTime(D.toNumber());else if(typeof D==="number"&&A.relaxed)J.setTime(D);else if(typeof D==="bigint")J.setTime(Number(D));else throw new f8(`Unrecognized type for EJSON date: ${typeof D}`);return J}if(F.$code!=null){let D=Object.assign({},F);if(F.$scope)D.$scope=GK(F.$scope);return L3.fromExtendedJSON(F)}if(XK(F)||F.$dbPointer){let D=F.$ref?F:F.$dbPointer;if(D instanceof o6)return D;let J=Object.keys(D).filter((Z)=>Z.startsWith("$")),X=!0;if(J.forEach((Z)=>{if(["$ref","$id","$db"].indexOf(Z)===-1)X=!1}),X)return o6.fromExtendedJSON(D)}return F}function Fl(F,A){return F.map((B,D)=>{A.seenObjects.push({propertyName:`index ${D}`,obj:null});try{return Q3(B,A)}finally{A.seenObjects.pop()}})}function vC(F){let A=F.toISOString();return F.getUTCMilliseconds()!==0?A:A.slice(0,-5)+"Z"}function Q3(F,A){if(F instanceof Map||iX(F)){let B=Object.create(null);for(let[D,J]of F){if(typeof D!=="string")throw new g("Can only serialize maps with string keys");B[D]=J}return Q3(B,A)}if((typeof F==="object"||typeof F==="function")&&F!==null){let B=A.seenObjects.findIndex((D)=>D.obj===F);if(B!==-1){let D=A.seenObjects.map((E)=>E.propertyName),J=D.slice(0,B).map((E)=>`${E} -> `).join(""),X=D[B],Z=" -> "+D.slice(B+1,D.length-1).map((E)=>`${E} -> `).join(""),Y=D[D.length-1],$=" ".repeat(J.length+X.length/2),G="-".repeat(Z.length+(X.length+Y.length)/2-1);throw new g(`Converting circular structure to EJSON:
24
+ ${J}${X}${Z}${Y}
25
+ ${$}\\${G}/`)}A.seenObjects[A.seenObjects.length-1].obj=F}if(Array.isArray(F))return Fl(F,A);if(F===void 0)return null;if(F instanceof Date||b9(F)){let B=F.getTime(),D=B>-1&&B<253402318800000;if(A.legacy)return A.relaxed&&D?{$date:F.getTime()}:{$date:vC(F)};return A.relaxed&&D?{$date:vC(F)}:{$date:{$numberLong:F.getTime().toString()}}}if(typeof F==="number"&&(!A.relaxed||!isFinite(F))){if(Number.isInteger(F)&&!Object.is(F,-0)){if(F>=b8&&F<=g8)return{$numberInt:F.toString()};if(F>=mC&&F<=hC)return{$numberLong:F.toString()}}return{$numberDouble:Object.is(F,-0)?"-0.0":F.toString()}}if(typeof F==="bigint"){if(!A.relaxed)return{$numberLong:BigInt.asIntN(64,F).toString()};return Number(BigInt.asIntN(64,F))}if(F instanceof RegExp||g9(F)){let B=F.flags;if(B===void 0){let J=F.toString().match(/[gimuy]*$/);if(J)B=J[0]}return new E6(F.source,B).toExtendedJSON(A)}if(F!=null&&typeof F==="object")return Bl(F,A);return F}var Al={Binary:(F)=>new e(F.value(),F.sub_type),Code:(F)=>new L3(F.code,F.scope),DBRef:(F)=>new o6(F.collection||F.namespace,F.oid,F.db,F.fields),Decimal128:(F)=>new r0(F.bytes),Double:(F)=>new $6(F.value),Int32:(F)=>new V3(F.value),Long:(F)=>N.fromBits(F.low!=null?F.low:F.low_,F.low!=null?F.high:F.high_,F.low!=null?F.unsigned:F.unsigned_),MaxKey:()=>new y4,MinKey:()=>new v4,ObjectId:(F)=>new p1(F),BSONRegExp:(F)=>new E6(F.pattern,F.options),BSONSymbol:(F)=>new h4(F.value),Timestamp:(F)=>G6.fromBits(F.low,F.high)};function Bl(F,A){if(F==null||typeof F!=="object")throw new g("not an object instance");let B=F._bsontype;if(typeof B==="undefined"){let D={};for(let J of Object.keys(F)){A.seenObjects.push({propertyName:J,obj:null});try{let X=Q3(F[J],A);if(J==="__proto__")Object.defineProperty(D,J,{value:X,writable:!0,enumerable:!0,configurable:!0});else D[J]=X}finally{A.seenObjects.pop()}}return D}else if(F!=null&&typeof F==="object"&&typeof F._bsontype==="string"&&F[h9]!==b4)throw new A4;else if(oc(F)){let D=F;if(typeof D.toExtendedJSON!=="function"){let J=Al[F._bsontype];if(!J)throw new g("Unrecognized or invalid _bsontype: "+F._bsontype);D=J(D)}if(B==="Code"&&D.scope)D=new L3(D.code,Q3(D.scope,A));else if(B==="DBRef"&&D.oid)D=new o6(Q3(D.collection,A),Q3(D.oid,A),Q3(D.db,A),Q3(D.fields,A));return D.toExtendedJSON(A)}else throw new g("_bsontype must be a string, but was: "+typeof B)}function EK(F,A){let B={useBigInt64:A?.useBigInt64??!1,relaxed:A?.relaxed??!0,legacy:A?.legacy??!1};return JSON.parse(F,(D,J)=>{if(D.indexOf("\x00")!==-1)throw new g(`BSON Document field names cannot contain null bytes, found: ${JSON.stringify(D)}`);return GK(J,B)})}function HK(F,A,B,D){if(B!=null&&typeof B==="object")D=B,B=0;if(A!=null&&typeof A==="object"&&!Array.isArray(A))D=A,A=void 0,B=0;let J=Object.assign({relaxed:!0,legacy:!1},D,{seenObjects:[{propertyName:"(root)",obj:null}]}),X=Q3(F,J);return JSON.stringify(X,A,B)}function Dl(F,A){return A=A||{},JSON.parse(HK(F,A))}function Jl(F,A){return A=A||{},EK(JSON.stringify(F),A)}var m4=Object.create(null);m4.parse=EK;m4.stringify=HK;m4.serialize=Dl;m4.deserialize=Jl;Object.freeze(m4);function cX(F,A){try{return A1.getNonnegativeInt32LE(F,A)}catch(B){throw new x6("BSON size cannot be negative",A,{cause:B})}}function lX(F,A){let B=A;for(;F[B]!==0;B++);if(B===F.length-1)throw new x6("Null terminator not found",A);return B}function Xl(F,A=0){if(A??=0,F.length<5)throw new x6(`Input must be at least 5 bytes, got ${F.length} bytes`,A);let B=cX(F,A);if(B>F.length-A)throw new x6(`Parsed documentSize (${B} bytes) does not match input length (${F.length} bytes)`,A);if(F[A+B-1]!==0)throw new x6("BSON documents must end in 0x00",A+B);let D=[],J=A+4;while(J<=B+A){let X=F[J];if(J+=1,X===0){if(J-A!==B)throw new x6("Invalid 0x00 type byte",J);break}let Z=J,Y=lX(F,J)-Z;J+=Y+1;let $;if(X===1||X===18||X===9||X===17)$=8;else if(X===16)$=4;else if(X===7)$=12;else if(X===19)$=16;else if(X===8)$=1;else if(X===10||X===6||X===127||X===255)$=0;else if(X===11)$=lX(F,lX(F,J)+1)+1-J;else if(X===3||X===4||X===15)$=cX(F,J);else if(X===2||X===5||X===12||X===13||X===14){if($=cX(F,J)+4,X===5)$+=1;if(X===12)$+=12}else throw new x6(`Invalid 0x${X.toString(16).padStart(2,"0")} type byte`,J);if($>B)throw new x6("value reports length larger than document",J);D.push([X,Z,Y,J,$]),J+=$}return D}var m9=Object.create(null);m9.parseToElements=Xl;m9.ByteUtils=x;m9.NumberUtils=A1;Object.freeze(m9);var qK=17825792,F4=x.allocate(qK);function WK(F){if(F4.length<F)F4=x.allocate(F)}function zK(F,A={}){let B=typeof A.checkKeys==="boolean"?A.checkKeys:!1,D=typeof A.serializeFunctions==="boolean"?A.serializeFunctions:!1,J=typeof A.ignoreUndefined==="boolean"?A.ignoreUndefined:!0,X=typeof A.minInternalBufferSize==="number"?A.minInternalBufferSize:qK;if(F4.length<X)F4=x.allocate(X);let Z=y8(F4,F,B,0,0,D,J,null),Y=x.allocateUnsafe(Z);return Y.set(F4.subarray(0,Z),0),Y}function CK(F,A,B={}){let D=typeof B.checkKeys==="boolean"?B.checkKeys:!1,J=typeof B.serializeFunctions==="boolean"?B.serializeFunctions:!1,X=typeof B.ignoreUndefined==="boolean"?B.ignoreUndefined:!0,Z=typeof B.index==="number"?B.index:0,Y=y8(F4,F,D,0,0,J,X,null);return A.set(F4.subarray(0,Y),Z),Z+Y-1}function KK(F,A={}){return $K(x.toLocalBufferType(F),A)}function UK(F,A={}){A=A||{};let B=typeof A.serializeFunctions==="boolean"?A.serializeFunctions:!1,D=typeof A.ignoreUndefined==="boolean"?A.ignoreUndefined:!0;return XA(F,B,D)}function QK(F,A,B,D,J,X){let Z=Object.assign({allowObjectSmallerThanBufferSize:!0,index:0},X),Y=x.toLocalBufferType(F),$=A;for(let G=0;G<B;G++){let E=A1.getInt32LE(Y,$);Z.index=$,D[J+G]=$K(Y,Z),$=$+E}return $}var Zl=Object.freeze({__proto__:null,BSONError:g,BSONOffsetError:x6,BSONRegExp:E6,BSONRuntimeError:f8,BSONSymbol:h4,BSONType:AK,BSONValue:C2,BSONVersionError:A4,Binary:e,Code:L3,DBRef:o6,Decimal128:r0,Double:$6,EJSON:m4,Int32:V3,Long:N,MaxKey:y4,MinKey:v4,ObjectId:p1,Timestamp:G6,UUID:_0,calculateObjectSize:UK,deserialize:KK,deserializeStream:QK,onDemand:m9,serialize:zK,serializeWithBufferAndIndex:CK,setInternalBufferSize:WK});Yl.BSON=Zl;Yl.BSONError=g;Yl.BSONOffsetError=x6;Yl.BSONRegExp=E6;Yl.BSONRuntimeError=f8;Yl.BSONSymbol=h4;Yl.BSONType=AK;Yl.BSONValue=C2;Yl.BSONVersionError=A4;Yl.Binary=e;Yl.Code=L3;Yl.DBRef=o6;Yl.Decimal128=r0;Yl.Double=$6;Yl.EJSON=m4;Yl.Int32=V3;Yl.Long=N;Yl.MaxKey=y4;Yl.MinKey=v4;Yl.ObjectId=p1;Yl.Timestamp=G6;Yl.UUID=_0;Yl.calculateObjectSize=UK;Yl.deserialize=KK;Yl.deserializeStream=QK;Yl.onDemand=m9;Yl.serialize=zK;Yl.serializeWithBufferAndIndex=CK;Yl.setInternalBufferSize=WK});var I1=K((J0)=>{Object.defineProperty(J0,"__esModule",{value:!0});J0.toUTF8=J0.getBigInt64LE=J0.getFloat64LE=J0.getInt32LE=J0.UUID=J0.Timestamp=J0.serialize=J0.ObjectId=J0.MinKey=J0.MaxKey=J0.Long=J0.Int32=J0.EJSON=J0.Double=J0.deserialize=J0.Decimal128=J0.DBRef=J0.Code=J0.calculateObjectSize=J0.BSONType=J0.BSONSymbol=J0.BSONRegExp=J0.BSONError=J0.BSON=J0.Binary=void 0;J0.parseToElementsToArray=bl;J0.pluckBSONSerializeOptions=yl;J0.resolveBSONOptions=vl;J0.parseUtf8ValidationOption=hl;var v8=H6(),C0=H6();Object.defineProperty(J0,"Binary",{enumerable:!0,get:function(){return C0.Binary}});Object.defineProperty(J0,"BSON",{enumerable:!0,get:function(){return C0.BSON}});Object.defineProperty(J0,"BSONError",{enumerable:!0,get:function(){return C0.BSONError}});Object.defineProperty(J0,"BSONRegExp",{enumerable:!0,get:function(){return C0.BSONRegExp}});Object.defineProperty(J0,"BSONSymbol",{enumerable:!0,get:function(){return C0.BSONSymbol}});Object.defineProperty(J0,"BSONType",{enumerable:!0,get:function(){return C0.BSONType}});Object.defineProperty(J0,"calculateObjectSize",{enumerable:!0,get:function(){return C0.calculateObjectSize}});Object.defineProperty(J0,"Code",{enumerable:!0,get:function(){return C0.Code}});Object.defineProperty(J0,"DBRef",{enumerable:!0,get:function(){return C0.DBRef}});Object.defineProperty(J0,"Decimal128",{enumerable:!0,get:function(){return C0.Decimal128}});Object.defineProperty(J0,"deserialize",{enumerable:!0,get:function(){return C0.deserialize}});Object.defineProperty(J0,"Double",{enumerable:!0,get:function(){return C0.Double}});Object.defineProperty(J0,"EJSON",{enumerable:!0,get:function(){return C0.EJSON}});Object.defineProperty(J0,"Int32",{enumerable:!0,get:function(){return C0.Int32}});Object.defineProperty(J0,"Long",{enumerable:!0,get:function(){return C0.Long}});Object.defineProperty(J0,"MaxKey",{enumerable:!0,get:function(){return C0.MaxKey}});Object.defineProperty(J0,"MinKey",{enumerable:!0,get:function(){return C0.MinKey}});Object.defineProperty(J0,"ObjectId",{enumerable:!0,get:function(){return C0.ObjectId}});Object.defineProperty(J0,"serialize",{enumerable:!0,get:function(){return C0.serialize}});Object.defineProperty(J0,"Timestamp",{enumerable:!0,get:function(){return C0.Timestamp}});Object.defineProperty(J0,"UUID",{enumerable:!0,get:function(){return C0.UUID}});function bl(F,A){let B=v8.BSON.onDemand.parseToElements(F,A);return Array.isArray(B)?B:[...B]}J0.getInt32LE=v8.BSON.onDemand.NumberUtils.getInt32LE;J0.getFloat64LE=v8.BSON.onDemand.NumberUtils.getFloat64LE;J0.getBigInt64LE=v8.BSON.onDemand.NumberUtils.getBigInt64LE;J0.toUTF8=v8.BSON.onDemand.ByteUtils.toUTF8;function yl(F){let{fieldsAsRaw:A,useBigInt64:B,promoteValues:D,promoteBuffers:J,promoteLongs:X,serializeFunctions:Z,ignoreUndefined:Y,bsonRegExp:$,raw:G,enableUtf8Validation:E}=F;return{fieldsAsRaw:A,useBigInt64:B,promoteValues:D,promoteBuffers:J,promoteLongs:X,serializeFunctions:Z,ignoreUndefined:Y,bsonRegExp:$,raw:G,enableUtf8Validation:E}}function vl(F,A){let B=A?.bsonOptions;return{raw:F?.raw??B?.raw??!1,useBigInt64:F?.useBigInt64??B?.useBigInt64??!1,promoteLongs:F?.promoteLongs??B?.promoteLongs??!0,promoteValues:F?.promoteValues??B?.promoteValues??!0,promoteBuffers:F?.promoteBuffers??B?.promoteBuffers??!1,ignoreUndefined:F?.ignoreUndefined??B?.ignoreUndefined??!1,bsonRegExp:F?.bsonRegExp??B?.bsonRegExp??!1,serializeFunctions:F?.serializeFunctions??B?.serializeFunctions??!1,fieldsAsRaw:F?.fieldsAsRaw??B?.fieldsAsRaw??{},enableUtf8Validation:F?.enableUtf8Validation??B?.enableUtf8Validation??!0}}function hl(F){if(F?.enableUtf8Validation===!1)return{utf8:!1};return{utf8:{writeErrors:!1}}}});var l=K((eK)=>{Object.defineProperty(eK,"__esModule",{value:!0});eK.MongoWriteConcernError=eK.MongoServerSelectionError=eK.MongoSystemError=eK.MongoMissingDependencyError=eK.MongoMissingCredentialsError=eK.MongoCompatibilityError=eK.MongoInvalidArgumentError=eK.MongoParseError=eK.MongoNetworkTimeoutError=eK.MongoNetworkError=eK.MongoTopologyClosedError=eK.MongoCursorExhaustedError=eK.MongoServerClosedError=eK.MongoCursorInUseError=eK.MongoOperationTimeoutError=eK.MongoUnexpectedServerResponseError=eK.MongoGridFSChunkError=eK.MongoGridFSStreamError=eK.MongoTailableCursorError=eK.MongoChangeStreamError=eK.MongoClientBulkWriteExecutionError=eK.MongoClientBulkWriteCursorError=eK.MongoClientBulkWriteError=eK.MongoGCPError=eK.MongoAzureError=eK.MongoOIDCError=eK.MongoAWSError=eK.MongoKerberosError=eK.MongoExpiredSessionError=eK.MongoTransactionError=eK.MongoNotConnectedError=eK.MongoDecompressionError=eK.MongoBatchReExecutionError=eK.MongoStalePrimaryError=eK.MongoRuntimeError=eK.MongoAPIError=eK.MongoDriverError=eK.MongoServerError=eK.MongoError=eK.MongoErrorLabel=eK.GET_MORE_RESUMABLE_CODES=eK.MONGODB_ERROR_CODES=eK.NODE_IS_RECOVERING_ERROR_MESSAGE=eK.LEGACY_NOT_PRIMARY_OR_SECONDARY_ERROR_MESSAGE=eK.LEGACY_NOT_WRITABLE_PRIMARY_ERROR_MESSAGE=void 0;eK.isNetworkErrorBeforeHandshake=al;eK.needsRetryableWriteLabel=rl;eK.isRetryableWriteError=tK;eK.isRetryableReadError=tl;eK.isNodeShuttingDownError=Bp;eK.isSDAMUnrecoverableError=Dp;eK.isNetworkTimeoutError=Jp;eK.isResumableError=Xp;var h8=Symbol("errorLabels");eK.LEGACY_NOT_WRITABLE_PRIMARY_ERROR_MESSAGE=new RegExp("not master","i");eK.LEGACY_NOT_PRIMARY_OR_SECONDARY_ERROR_MESSAGE=new RegExp("not master or secondary","i");eK.NODE_IS_RECOVERING_ERROR_MESSAGE=new RegExp("node is recovering","i");eK.MONGODB_ERROR_CODES=Object.freeze({HostUnreachable:6,HostNotFound:7,AuthenticationFailed:18,NetworkTimeout:89,ShutdownInProgress:91,PrimarySteppedDown:189,ExceededTimeLimit:262,SocketException:9001,NotWritablePrimary:10107,InterruptedAtShutdown:11600,InterruptedDueToReplStateChange:11602,NotPrimaryNoSecondaryOk:13435,NotPrimaryOrSecondary:13436,StaleShardVersion:63,StaleEpoch:150,StaleConfig:13388,RetryChangeStream:234,FailedToSatisfyReadPreference:133,CursorNotFound:43,LegacyNotPrimary:10058,WriteConcernFailed:64,NamespaceNotFound:26,IllegalOperation:20,MaxTimeMSExpired:50,UnknownReplWriteConcern:79,UnsatisfiableWriteConcern:100,Reauthenticate:391,ReadConcernMajorityNotAvailableYet:134});eK.GET_MORE_RESUMABLE_CODES=new Set([eK.MONGODB_ERROR_CODES.HostUnreachable,eK.MONGODB_ERROR_CODES.HostNotFound,eK.MONGODB_ERROR_CODES.NetworkTimeout,eK.MONGODB_ERROR_CODES.ShutdownInProgress,eK.MONGODB_ERROR_CODES.PrimarySteppedDown,eK.MONGODB_ERROR_CODES.ExceededTimeLimit,eK.MONGODB_ERROR_CODES.SocketException,eK.MONGODB_ERROR_CODES.NotWritablePrimary,eK.MONGODB_ERROR_CODES.InterruptedAtShutdown,eK.MONGODB_ERROR_CODES.InterruptedDueToReplStateChange,eK.MONGODB_ERROR_CODES.NotPrimaryNoSecondaryOk,eK.MONGODB_ERROR_CODES.NotPrimaryOrSecondary,eK.MONGODB_ERROR_CODES.StaleShardVersion,eK.MONGODB_ERROR_CODES.StaleEpoch,eK.MONGODB_ERROR_CODES.StaleConfig,eK.MONGODB_ERROR_CODES.RetryChangeStream,eK.MONGODB_ERROR_CODES.FailedToSatisfyReadPreference,eK.MONGODB_ERROR_CODES.CursorNotFound]);eK.MongoErrorLabel=Object.freeze({RetryableWriteError:"RetryableWriteError",TransientTransactionError:"TransientTransactionError",UnknownTransactionCommitResult:"UnknownTransactionCommitResult",ResumableChangeStreamError:"ResumableChangeStreamError",HandshakeError:"HandshakeError",ResetPool:"ResetPool",PoolRequstedRetry:"PoolRequstedRetry",InterruptInUseConnections:"InterruptInUseConnections",NoWritesPerformed:"NoWritesPerformed"});function sl(F){return F!=null&&typeof F==="object"&&"errors"in F&&Array.isArray(F.errors)}class e6 extends Error{constructor(F,A){super(F,A);this[h8]=new Set}static buildErrorMessage(F){if(typeof F==="string")return F;if(sl(F)&&F.message.length===0)return F.errors.length===0?"AggregateError has an empty errors array. Please check the `cause` property for more information.":F.errors.map(({message:A})=>A).join(", ");return F!=null&&typeof F==="object"&&"message"in F&&typeof F.message==="string"?F.message:"empty error message"}get name(){return"MongoError"}get errmsg(){return this.message}hasErrorLabel(F){return this[h8].has(F)}addErrorLabel(F){this[h8].add(F)}get errorLabels(){return Array.from(this[h8])}}eK.MongoError=e6;class GA extends e6{constructor(F){super(F.message||F.errmsg||F.$err||"n/a");if(F.errorLabels)this[h8]=new Set(F.errorLabels);this.errorResponse=F;for(let A in F)if(A!=="errorLabels"&&A!=="errmsg"&&A!=="message"&&A!=="errorResponse")this[A]=F[A]}get name(){return"MongoServerError"}}eK.MongoServerError=GA;class d9 extends e6{constructor(F,A){super(F,A)}get name(){return"MongoDriverError"}}eK.MongoDriverError=d9;class K2 extends d9{constructor(F,A){super(F,A)}get name(){return"MongoAPIError"}}eK.MongoAPIError=K2;class n2 extends d9{constructor(F,A){super(F,A)}get name(){return"MongoRuntimeError"}}eK.MongoRuntimeError=n2;class VK extends n2{constructor(F,A,B,D){super(`primary marked stale due to electionId/setVersion mismatch: server setVersion: ${F.setVersion}, server electionId: ${F.electionId}, topology setVersion: ${A}, topology electionId: ${B}`,D)}get name(){return"MongoStalePrimaryError"}}eK.MongoStalePrimaryError=VK;class RK extends K2{constructor(F="This batch has already been executed, create new batch to execute"){super(F)}get name(){return"MongoBatchReExecutionError"}}eK.MongoBatchReExecutionError=RK;class wK extends n2{constructor(F){super(F)}get name(){return"MongoDecompressionError"}}eK.MongoDecompressionError=wK;class IK extends K2{constructor(F){super(F)}get name(){return"MongoNotConnectedError"}}eK.MongoNotConnectedError=IK;class NK extends K2{constructor(F){super(F)}get name(){return"MongoTransactionError"}}eK.MongoTransactionError=NK;class PK extends K2{constructor(F="Cannot use a session that has ended"){super(F)}get name(){return"MongoExpiredSessionError"}}eK.MongoExpiredSessionError=PK;class MK extends n2{constructor(F){super(F)}get name(){return"MongoKerberosError"}}eK.MongoKerberosError=MK;class TK extends n2{constructor(F,A){super(F,A)}get name(){return"MongoAWSError"}}eK.MongoAWSError=TK;class EA extends n2{constructor(F){super(F)}get name(){return"MongoOIDCError"}}eK.MongoOIDCError=EA;class jK extends EA{constructor(F){super(F)}get name(){return"MongoAzureError"}}eK.MongoAzureError=jK;class kK extends EA{constructor(F){super(F)}get name(){return"MongoGCPError"}}eK.MongoGCPError=kK;class OK extends GA{constructor(F){super(F);this.writeConcernErrors=[],this.writeErrors=new Map}get name(){return"MongoClientBulkWriteError"}}eK.MongoClientBulkWriteError=OK;class SK extends n2{constructor(F){super(F)}get name(){return"MongoClientBulkWriteCursorError"}}eK.MongoClientBulkWriteCursorError=SK;class uK extends n2{constructor(F){super(F)}get name(){return"MongoClientBulkWriteExecutionError"}}eK.MongoClientBulkWriteExecutionError=uK;class xK extends n2{constructor(F){super(F)}get name(){return"MongoChangeStreamError"}}eK.MongoChangeStreamError=xK;class fK extends K2{constructor(F="Tailable cursor does not support this operation"){super(F)}get name(){return"MongoTailableCursorError"}}eK.MongoTailableCursorError=fK;class _K extends n2{constructor(F){super(F)}get name(){return"MongoGridFSStreamError"}}eK.MongoGridFSStreamError=_K;class gK extends n2{constructor(F){super(F)}get name(){return"MongoGridFSChunkError"}}eK.MongoGridFSChunkError=gK;class bK extends n2{constructor(F,A){super(F,A)}get name(){return"MongoUnexpectedServerResponseError"}}eK.MongoUnexpectedServerResponseError=bK;class yK extends d9{get name(){return"MongoOperationTimeoutError"}}eK.MongoOperationTimeoutError=yK;class vK extends K2{constructor(F="Cursor is already initialized"){super(F)}get name(){return"MongoCursorInUseError"}}eK.MongoCursorInUseError=vK;class hK extends K2{constructor(F="Server is closed"){super(F)}get name(){return"MongoServerClosedError"}}eK.MongoServerClosedError=hK;class mK extends K2{constructor(F){super(F||"Cursor is exhausted")}get name(){return"MongoCursorExhaustedError"}}eK.MongoCursorExhaustedError=mK;class dK extends K2{constructor(F="Topology is closed"){super(F)}get name(){return"MongoTopologyClosedError"}}eK.MongoTopologyClosedError=dK;var cK=Symbol("beforeHandshake");function al(F){return F[cK]===!0}class d4 extends e6{constructor(F,A){super(F,{cause:A?.cause});if(A&&typeof A.beforeHandshake==="boolean")this[cK]=A.beforeHandshake}get name(){return"MongoNetworkError"}}eK.MongoNetworkError=d4;class lK extends d4{constructor(F,A){super(F,A)}get name(){return"MongoNetworkTimeoutError"}}eK.MongoNetworkTimeoutError=lK;class AZ extends d9{constructor(F){super(F)}get name(){return"MongoParseError"}}eK.MongoParseError=AZ;class pK extends K2{constructor(F,A){super(F,A)}get name(){return"MongoInvalidArgumentError"}}eK.MongoInvalidArgumentError=pK;class iK extends K2{constructor(F){super(F)}get name(){return"MongoCompatibilityError"}}eK.MongoCompatibilityError=iK;class nK extends K2{constructor(F){super(F)}get name(){return"MongoMissingCredentialsError"}}eK.MongoMissingCredentialsError=nK;class sK extends K2{constructor(F,A){super(F,A);this.dependencyName=A.dependencyName}get name(){return"MongoMissingDependencyError"}}eK.MongoMissingDependencyError=sK;class BZ extends e6{constructor(F,A){if(A&&A.error)super(e6.buildErrorMessage(A.error.message||A.error),{cause:A.error});else super(F);if(A)this.reason=A;this.code=A.error?.code}get name(){return"MongoSystemError"}}eK.MongoSystemError=BZ;class aK extends BZ{constructor(F,A){super(F,A)}get name(){return"MongoServerSelectionError"}}eK.MongoServerSelectionError=aK;class DZ extends GA{constructor(F){super({...F.writeConcernError,...F});this.errInfo=F.writeConcernError.errInfo,this.result=F}get name(){return"MongoWriteConcernError"}}eK.MongoWriteConcernError=DZ;var rK=new Set([eK.MONGODB_ERROR_CODES.HostUnreachable,eK.MONGODB_ERROR_CODES.HostNotFound,eK.MONGODB_ERROR_CODES.NetworkTimeout,eK.MONGODB_ERROR_CODES.ShutdownInProgress,eK.MONGODB_ERROR_CODES.PrimarySteppedDown,eK.MONGODB_ERROR_CODES.SocketException,eK.MONGODB_ERROR_CODES.NotWritablePrimary,eK.MONGODB_ERROR_CODES.InterruptedAtShutdown,eK.MONGODB_ERROR_CODES.InterruptedDueToReplStateChange,eK.MONGODB_ERROR_CODES.NotPrimaryNoSecondaryOk,eK.MONGODB_ERROR_CODES.NotPrimaryOrSecondary,eK.MONGODB_ERROR_CODES.ExceededTimeLimit,eK.MONGODB_ERROR_CODES.ReadConcernMajorityNotAvailableYet]),FZ=rK;function rl(F,A,B){if(F instanceof d4)return!0;if(F instanceof e6){if((A>=9||tK(F))&&!F.hasErrorLabel(eK.MongoErrorLabel.HandshakeError))return!1}if(F instanceof DZ){if(B==="Mongos"&&A<9)return FZ.has(F.result.code??0);let X=F.result.writeConcernError.code??Number(F.code);return FZ.has(Number.isNaN(X)?0:X)}if(F instanceof e6)return FZ.has(Number(F.code));if(eK.LEGACY_NOT_WRITABLE_PRIMARY_ERROR_MESSAGE.test(F.message))return!0;if(eK.NODE_IS_RECOVERING_ERROR_MESSAGE.test(F.message))return!0;return!1}function tK(F){return F.hasErrorLabel(eK.MongoErrorLabel.RetryableWriteError)||F.hasErrorLabel(eK.MongoErrorLabel.PoolRequstedRetry)}function tl(F){if(typeof F.code==="number"?rK.has(F.code):!1)return!0;if(F instanceof d4)return!0;if(eK.LEGACY_NOT_WRITABLE_PRIMARY_ERROR_MESSAGE.test(F.message))return!0;if(eK.NODE_IS_RECOVERING_ERROR_MESSAGE.test(F.message))return!0;return!1}var ol=new Set([eK.MONGODB_ERROR_CODES.ShutdownInProgress,eK.MONGODB_ERROR_CODES.PrimarySteppedDown,eK.MONGODB_ERROR_CODES.InterruptedAtShutdown,eK.MONGODB_ERROR_CODES.InterruptedDueToReplStateChange,eK.MONGODB_ERROR_CODES.NotPrimaryOrSecondary]),el=new Set([eK.MONGODB_ERROR_CODES.NotWritablePrimary,eK.MONGODB_ERROR_CODES.NotPrimaryNoSecondaryOk,eK.MONGODB_ERROR_CODES.LegacyNotPrimary]),Fp=new Set([eK.MONGODB_ERROR_CODES.InterruptedAtShutdown,eK.MONGODB_ERROR_CODES.ShutdownInProgress]);function oK(F){if(typeof F.code==="number")return ol.has(F.code);return eK.LEGACY_NOT_PRIMARY_OR_SECONDARY_ERROR_MESSAGE.test(F.message)||eK.NODE_IS_RECOVERING_ERROR_MESSAGE.test(F.message)}function Ap(F){if(typeof F.code==="number")return el.has(F.code);if(oK(F))return!1;return eK.LEGACY_NOT_WRITABLE_PRIMARY_ERROR_MESSAGE.test(F.message)}function Bp(F){return!!(typeof F.code==="number"&&Fp.has(F.code))}function Dp(F){if(F instanceof AZ||F==null)return!0;return oK(F)||Ap(F)}function Jp(F){return!!(F instanceof d4&&F.message.match(/timed out/))}function Xp(F,A){if(F==null||!(F instanceof e6))return!1;if(F instanceof d4)return!0;if(A!=null&&A>=9){if(F.code===eK.MONGODB_ERROR_CODES.CursorNotFound)return!0;return F.hasErrorLabel(eK.MongoErrorLabel.ResumableChangeStreamError)}if(typeof F.code==="number")return eK.GET_MORE_RESUMABLE_CODES.has(F.code);return!1}});var k0=K((DU)=>{Object.defineProperty(DU,"__esModule",{value:!0});DU.ReadPreference=DU.ReadPreferenceMode=void 0;var c4=l();DU.ReadPreferenceMode=Object.freeze({primary:"primary",primaryPreferred:"primaryPreferred",secondary:"secondary",secondaryPreferred:"secondaryPreferred",nearest:"nearest"});class U1{constructor(F,A,B){if(!U1.isValid(F))throw new c4.MongoInvalidArgumentError(`Invalid read preference mode ${JSON.stringify(F)}`);if(B==null&&typeof A==="object"&&!Array.isArray(A))B=A,A=void 0;else if(A&&!Array.isArray(A))throw new c4.MongoInvalidArgumentError("ReadPreference tags must be an array");if(this.mode=F,this.tags=A,this.hedge=B?.hedge,this.maxStalenessSeconds=void 0,this.minWireVersion=void 0,B=B??{},B.maxStalenessSeconds!=null){if(B.maxStalenessSeconds<=0)throw new c4.MongoInvalidArgumentError("maxStalenessSeconds must be a positive integer");this.maxStalenessSeconds=B.maxStalenessSeconds,this.minWireVersion=5}if(this.mode===U1.PRIMARY){if(this.tags&&Array.isArray(this.tags)&&this.tags.length>0)throw new c4.MongoInvalidArgumentError("Primary read preference cannot be combined with tags");if(this.maxStalenessSeconds)throw new c4.MongoInvalidArgumentError("Primary read preference cannot be combined with maxStalenessSeconds");if(this.hedge)throw new c4.MongoInvalidArgumentError("Primary read preference cannot be combined with hedge")}}get preference(){return this.mode}static fromString(F){return new U1(F)}static fromOptions(F){if(!F)return;let A=F.readPreference??F.session?.transaction.options.readPreference,B=F.readPreferenceTags;if(A==null)return;if(typeof A==="string")return new U1(A,B,{maxStalenessSeconds:F.maxStalenessSeconds,hedge:F.hedge});else if(!(A instanceof U1)&&typeof A==="object"){let D=A.mode||A.preference;if(D&&typeof D==="string")return new U1(D,A.tags??B,{maxStalenessSeconds:A.maxStalenessSeconds,hedge:F.hedge})}if(B)A.tags=B;return A}static translate(F){if(F.readPreference==null)return F;let A=F.readPreference;if(typeof A==="string")F.readPreference=new U1(A);else if(A&&!(A instanceof U1)&&typeof A==="object"){let B=A.mode||A.preference;if(B&&typeof B==="string")F.readPreference=new U1(B,A.tags,{maxStalenessSeconds:A.maxStalenessSeconds})}else if(!(A instanceof U1))throw new c4.MongoInvalidArgumentError(`Invalid read preference: ${A}`);return F}static isValid(F){return new Set([U1.PRIMARY,U1.PRIMARY_PREFERRED,U1.SECONDARY,U1.SECONDARY_PREFERRED,U1.NEAREST,null]).has(F)}isValid(F){return U1.isValid(typeof F==="string"?F:this.mode)}secondaryOk(){return new Set([U1.PRIMARY_PREFERRED,U1.SECONDARY,U1.SECONDARY_PREFERRED,U1.NEAREST]).has(this.mode)}equals(F){return F.mode===this.mode}toJSON(){let F={mode:this.mode};if(Array.isArray(this.tags))F.tags=this.tags;if(this.maxStalenessSeconds)F.maxStalenessSeconds=this.maxStalenessSeconds;if(this.hedge)F.hedge=this.hedge;return F}}DU.ReadPreference=U1;U1.PRIMARY=DU.ReadPreferenceMode.primary;U1.PRIMARY_PREFERRED=DU.ReadPreferenceMode.primaryPreferred;U1.SECONDARY=DU.ReadPreferenceMode.secondary;U1.SECONDARY_PREFERRED=DU.ReadPreferenceMode.secondaryPreferred;U1.NEAREST=DU.ReadPreferenceMode.nearest;U1.primary=new U1(DU.ReadPreferenceMode.primary);U1.primaryPreferred=new U1(DU.ReadPreferenceMode.primaryPreferred);U1.secondary=new U1(DU.ReadPreferenceMode.secondary);U1.secondaryPreferred=new U1(DU.ReadPreferenceMode.secondaryPreferred);U1.nearest=new U1(DU.ReadPreferenceMode.nearest)});var s2=K((XU)=>{Object.defineProperty(XU,"__esModule",{value:!0});XU.ServerType=XU.TopologyType=XU.STATE_CONNECTED=XU.STATE_CONNECTING=XU.STATE_CLOSED=XU.STATE_CLOSING=void 0;XU._advanceClusterTime=op;XU.STATE_CLOSING="closing";XU.STATE_CLOSED="closed";XU.STATE_CONNECTING="connecting";XU.STATE_CONNECTED="connected";XU.TopologyType=Object.freeze({Single:"Single",ReplicaSetNoPrimary:"ReplicaSetNoPrimary",ReplicaSetWithPrimary:"ReplicaSetWithPrimary",Sharded:"Sharded",Unknown:"Unknown",LoadBalanced:"LoadBalanced"});XU.ServerType=Object.freeze({Standalone:"Standalone",Mongos:"Mongos",PossiblePrimary:"PossiblePrimary",RSPrimary:"RSPrimary",RSSecondary:"RSSecondary",RSArbiter:"RSArbiter",RSOther:"RSOther",RSGhost:"RSGhost",Unknown:"Unknown",LoadBalancer:"LoadBalancer"});function op(F,A){if(F.clusterTime==null)F.clusterTime=A;else if(A.clusterTime.greaterThan(F.clusterTime.clusterTime))F.clusterTime=A}});var c8=K((GU)=>{Object.defineProperty(GU,"__esModule",{value:!0});GU.MIN_SECONDARY_WRITE_WIRE_VERSION=void 0;GU.writableServerSelector=Zi;GU.sameServerSelector=Yi;GU.secondaryWritableServerSelector=$i;GU.readPreferenceServerSelector=JZ;var CA=l(),d8=k0(),a2=s2(),Xi=1e4,YU=90;GU.MIN_SECONDARY_WRITE_WIRE_VERSION=13;function Zi(){return function F(A,B){return WA(A,B.filter((D)=>D.isWritable))}}function Yi(F){return function A(B,D){if(!F)return[];return D.filter((J)=>{return J.address===F.address&&J.type!==a2.ServerType.Unknown})}}function $i(F,A){if(!A||!F||F&&F<GU.MIN_SECONDARY_WRITE_WIRE_VERSION)return JZ(d8.ReadPreference.primary);return JZ(A)}function Gi(F,A,B){if(F.maxStalenessSeconds==null||F.maxStalenessSeconds<0)return B;let D=F.maxStalenessSeconds,J=(A.heartbeatFrequencyMS+Xi)/1000;if(D<J)throw new CA.MongoInvalidArgumentError(`Option "maxStalenessSeconds" must be at least ${J} seconds`);if(D<YU)throw new CA.MongoInvalidArgumentError(`Option "maxStalenessSeconds" must be at least ${YU} seconds`);if(A.type===a2.TopologyType.ReplicaSetWithPrimary){let X=Array.from(A.servers.values()).filter(zA)[0];return B.reduce((Z,Y)=>{let G=(Y.lastUpdateTime-Y.lastWriteDate-(X.lastUpdateTime-X.lastWriteDate)+A.heartbeatFrequencyMS)/1000,E=F.maxStalenessSeconds??0;if(G<=E)Z.push(Y);return Z},[])}if(A.type===a2.TopologyType.ReplicaSetNoPrimary){if(B.length===0)return B;let X=B.reduce((Z,Y)=>Y.lastWriteDate>Z.lastWriteDate?Y:Z);return B.reduce((Z,Y)=>{let G=(X.lastWriteDate-Y.lastWriteDate+A.heartbeatFrequencyMS)/1000,E=F.maxStalenessSeconds??0;if(G<=E)Z.push(Y);return Z},[])}return B}function Ei(F,A){let B=Object.keys(F),D=Object.keys(A);for(let J=0;J<B.length;++J){let X=B[J];if(D.indexOf(X)===-1||A[X]!==F[X])return!1}return!0}function Hi(F,A){if(F.tags==null||Array.isArray(F.tags)&&F.tags.length===0)return A;for(let B=0;B<F.tags.length;++B){let D=F.tags[B],J=A.reduce((X,Z)=>{if(Ei(D,Z.tags))X.push(Z);return X},[]);if(J.length)return J}return[]}function WA(F,A){let B=A.reduce((J,X)=>Math.min(X.roundTripTime,J),1/0),D=B+F.localThresholdMS;return A.reduce((J,X)=>{if(X.roundTripTime<=D&&X.roundTripTime>=B)J.push(X);return J},[])}function zA(F){return F.type===a2.ServerType.RSPrimary}function qi(F){return F.type===a2.ServerType.RSSecondary}function Wi(F){return F.type===a2.ServerType.RSSecondary||F.type===a2.ServerType.RSPrimary}function $U(F){return F.type!==a2.ServerType.Unknown}function zi(F){return F.type===a2.ServerType.LoadBalancer}function JZ(F){if(!F.isValid())throw new CA.MongoInvalidArgumentError("Invalid read preference specified");return function A(B,D,J=[]){let X=B.commonWireVersion;if(X&&F.minWireVersion&&F.minWireVersion>X)throw new CA.MongoCompatibilityError(`Minimum wire version '${F.minWireVersion}' required, but found '${X}'`);if(B.type===a2.TopologyType.LoadBalanced)return D.filter(zi);if(B.type===a2.TopologyType.Unknown)return[];if(B.type===a2.TopologyType.Single)return WA(B,D.filter($U));if(B.type===a2.TopologyType.Sharded){let G=D.filter((H)=>{return!J.includes(H)}),E=G.length>0?G:J;return WA(B,E.filter($U))}let Z=F.mode;if(Z===d8.ReadPreference.PRIMARY)return D.filter(zA);if(Z===d8.ReadPreference.PRIMARY_PREFERRED){let G=D.filter(zA);if(G.length)return G}let Y=Z===d8.ReadPreference.NEAREST?Wi:qi,$=WA(B,Hi(F,Gi(F,B,D.filter(Y))));if(Z===d8.ReadPreference.SECONDARY_PREFERRED&&$.length===0)return D.filter(zA);return $}}});var l4=K((EU)=>{Object.defineProperty(EU,"__esModule",{value:!0});EU.OP_MSG=EU.OP_COMPRESSED=EU.OP_DELETE=EU.OP_QUERY=EU.OP_INSERT=EU.OP_UPDATE=EU.OP_REPLY=EU.MIN_SUPPORTED_QE_SERVER_VERSION=EU.MIN_SUPPORTED_QE_WIRE_VERSION=EU.MAX_SUPPORTED_WIRE_VERSION=EU.MIN_SUPPORTED_WIRE_VERSION=EU.MAX_SUPPORTED_SERVER_VERSION=EU.MIN_SUPPORTED_SERVER_VERSION=void 0;EU.MIN_SUPPORTED_SERVER_VERSION="4.0";EU.MAX_SUPPORTED_SERVER_VERSION="8.0";EU.MIN_SUPPORTED_WIRE_VERSION=7;EU.MAX_SUPPORTED_WIRE_VERSION=25;EU.MIN_SUPPORTED_QE_WIRE_VERSION=21;EU.MIN_SUPPORTED_QE_SERVER_VERSION="7.0";EU.OP_REPLY=1;EU.OP_UPDATE=2001;EU.OP_INSERT=2002;EU.OP_QUERY=2004;EU.OP_DELETE=2006;EU.OP_COMPRESSED=2012;EU.OP_MSG=2013});var K0=K((qU)=>{Object.defineProperty(qU,"__esModule",{value:!0});qU.END=qU.CHANGE=qU.INIT=qU.MORE=qU.RESPONSE=qU.SERVER_HEARTBEAT_FAILED=qU.SERVER_HEARTBEAT_SUCCEEDED=qU.SERVER_HEARTBEAT_STARTED=qU.COMMAND_FAILED=qU.COMMAND_SUCCEEDED=qU.COMMAND_STARTED=qU.CLUSTER_TIME_RECEIVED=qU.CONNECTION_CHECKED_IN=qU.CONNECTION_CHECKED_OUT=qU.CONNECTION_CHECK_OUT_FAILED=qU.CONNECTION_CHECK_OUT_STARTED=qU.CONNECTION_CLOSED=qU.CONNECTION_READY=qU.CONNECTION_CREATED=qU.CONNECTION_POOL_READY=qU.CONNECTION_POOL_CLEARED=qU.CONNECTION_POOL_CLOSED=qU.CONNECTION_POOL_CREATED=qU.WAITING_FOR_SUITABLE_SERVER=qU.SERVER_SELECTION_SUCCEEDED=qU.SERVER_SELECTION_FAILED=qU.SERVER_SELECTION_STARTED=qU.TOPOLOGY_DESCRIPTION_CHANGED=qU.TOPOLOGY_CLOSED=qU.TOPOLOGY_OPENING=qU.SERVER_DESCRIPTION_CHANGED=qU.SERVER_CLOSED=qU.SERVER_OPENING=qU.DESCRIPTION_RECEIVED=qU.UNPINNED=qU.PINNED=qU.MESSAGE=qU.ENDED=qU.CLOSED=qU.CONNECT=qU.OPEN=qU.CLOSE=qU.TIMEOUT=qU.ERROR=qU.SYSTEM_JS_COLLECTION=qU.SYSTEM_COMMAND_COLLECTION=qU.SYSTEM_USER_COLLECTION=qU.SYSTEM_PROFILE_COLLECTION=qU.SYSTEM_INDEX_COLLECTION=qU.SYSTEM_NAMESPACE_COLLECTION=void 0;qU.kDecoratedKeys=qU.kDecorateResult=qU.LEGACY_HELLO_COMMAND_CAMEL_CASE=qU.LEGACY_HELLO_COMMAND=qU.MONGO_CLIENT_EVENTS=qU.LOCAL_SERVER_EVENTS=qU.SERVER_RELAY_EVENTS=qU.APM_EVENTS=qU.TOPOLOGY_EVENTS=qU.CMAP_EVENTS=qU.HEARTBEAT_EVENTS=qU.RESUME_TOKEN_CHANGED=void 0;qU.SYSTEM_NAMESPACE_COLLECTION="system.namespaces";qU.SYSTEM_INDEX_COLLECTION="system.indexes";qU.SYSTEM_PROFILE_COLLECTION="system.profile";qU.SYSTEM_USER_COLLECTION="system.users";qU.SYSTEM_COMMAND_COLLECTION="$cmd";qU.SYSTEM_JS_COLLECTION="system.js";qU.ERROR="error";qU.TIMEOUT="timeout";qU.CLOSE="close";qU.OPEN="open";qU.CONNECT="connect";qU.CLOSED="closed";qU.ENDED="ended";qU.MESSAGE="message";qU.PINNED="pinned";qU.UNPINNED="unpinned";qU.DESCRIPTION_RECEIVED="descriptionReceived";qU.SERVER_OPENING="serverOpening";qU.SERVER_CLOSED="serverClosed";qU.SERVER_DESCRIPTION_CHANGED="serverDescriptionChanged";qU.TOPOLOGY_OPENING="topologyOpening";qU.TOPOLOGY_CLOSED="topologyClosed";qU.TOPOLOGY_DESCRIPTION_CHANGED="topologyDescriptionChanged";qU.SERVER_SELECTION_STARTED="serverSelectionStarted";qU.SERVER_SELECTION_FAILED="serverSelectionFailed";qU.SERVER_SELECTION_SUCCEEDED="serverSelectionSucceeded";qU.WAITING_FOR_SUITABLE_SERVER="waitingForSuitableServer";qU.CONNECTION_POOL_CREATED="connectionPoolCreated";qU.CONNECTION_POOL_CLOSED="connectionPoolClosed";qU.CONNECTION_POOL_CLEARED="connectionPoolCleared";qU.CONNECTION_POOL_READY="connectionPoolReady";qU.CONNECTION_CREATED="connectionCreated";qU.CONNECTION_READY="connectionReady";qU.CONNECTION_CLOSED="connectionClosed";qU.CONNECTION_CHECK_OUT_STARTED="connectionCheckOutStarted";qU.CONNECTION_CHECK_OUT_FAILED="connectionCheckOutFailed";qU.CONNECTION_CHECKED_OUT="connectionCheckedOut";qU.CONNECTION_CHECKED_IN="connectionCheckedIn";qU.CLUSTER_TIME_RECEIVED="clusterTimeReceived";qU.COMMAND_STARTED="commandStarted";qU.COMMAND_SUCCEEDED="commandSucceeded";qU.COMMAND_FAILED="commandFailed";qU.SERVER_HEARTBEAT_STARTED="serverHeartbeatStarted";qU.SERVER_HEARTBEAT_SUCCEEDED="serverHeartbeatSucceeded";qU.SERVER_HEARTBEAT_FAILED="serverHeartbeatFailed";qU.RESPONSE="response";qU.MORE="more";qU.INIT="init";qU.CHANGE="change";qU.END="end";qU.RESUME_TOKEN_CHANGED="resumeTokenChanged";qU.HEARTBEAT_EVENTS=Object.freeze([qU.SERVER_HEARTBEAT_STARTED,qU.SERVER_HEARTBEAT_SUCCEEDED,qU.SERVER_HEARTBEAT_FAILED]);qU.CMAP_EVENTS=Object.freeze([qU.CONNECTION_POOL_CREATED,qU.CONNECTION_POOL_READY,qU.CONNECTION_POOL_CLEARED,qU.CONNECTION_POOL_CLOSED,qU.CONNECTION_CREATED,qU.CONNECTION_READY,qU.CONNECTION_CLOSED,qU.CONNECTION_CHECK_OUT_STARTED,qU.CONNECTION_CHECK_OUT_FAILED,qU.CONNECTION_CHECKED_OUT,qU.CONNECTION_CHECKED_IN]);qU.TOPOLOGY_EVENTS=Object.freeze([qU.SERVER_OPENING,qU.SERVER_CLOSED,qU.SERVER_DESCRIPTION_CHANGED,qU.TOPOLOGY_OPENING,qU.TOPOLOGY_CLOSED,qU.TOPOLOGY_DESCRIPTION_CHANGED,qU.ERROR,qU.TIMEOUT,qU.CLOSE]);qU.APM_EVENTS=Object.freeze([qU.COMMAND_STARTED,qU.COMMAND_SUCCEEDED,qU.COMMAND_FAILED]);qU.SERVER_RELAY_EVENTS=Object.freeze([qU.SERVER_HEARTBEAT_STARTED,qU.SERVER_HEARTBEAT_SUCCEEDED,qU.SERVER_HEARTBEAT_FAILED,qU.COMMAND_STARTED,qU.COMMAND_SUCCEEDED,qU.COMMAND_FAILED,...qU.CMAP_EVENTS]);qU.LOCAL_SERVER_EVENTS=Object.freeze([qU.CONNECT,qU.DESCRIPTION_RECEIVED,qU.CLOSED,qU.ENDED]);qU.MONGO_CLIENT_EVENTS=Object.freeze([...qU.CMAP_EVENTS,...qU.APM_EVENTS,...qU.TOPOLOGY_EVENTS,...qU.HEARTBEAT_EVENTS]);qU.LEGACY_HELLO_COMMAND="ismaster";qU.LEGACY_HELLO_COMMAND_CAMEL_CASE="isMaster";qU.kDecorateResult=Symbol.for("@@mdb.decorateDecryptionResult");qU.kDecoratedKeys=Symbol.for("@@mdb.decryptedKeys")});var q6=K((dU)=>{Object.defineProperty(dU,"__esModule",{value:!0});dU.ReadConcern=dU.ReadConcernLevel=void 0;dU.ReadConcernLevel=Object.freeze({local:"local",majority:"majority",linearizable:"linearizable",available:"available",snapshot:"snapshot"});class l9{constructor(F){this.level=dU.ReadConcernLevel[F]??F}static fromOptions(F){if(F==null)return;if(F.readConcern){let{readConcern:A}=F;if(A instanceof l9)return A;else if(typeof A==="string")return new l9(A);else if("level"in A&&A.level)return new l9(A.level)}if(F.level)return new l9(F.level);return}static get MAJORITY(){return dU.ReadConcernLevel.majority}static get AVAILABLE(){return dU.ReadConcernLevel.available}static get LINEARIZABLE(){return dU.ReadConcernLevel.linearizable}static get SNAPSHOT(){return dU.ReadConcernLevel.snapshot}toJSON(){return{level:this.level}}}dU.ReadConcern=l9});var iU=K((lU)=>{Object.defineProperty(lU,"__esModule",{value:!0});lU.OnDemandDocument=void 0;var C1=I1();class KA{constructor(F,A=0,B=!1,D){this.bson=F,this.offset=A,this.isArray=B,this.cache=Object.create(null),this.indexFound=Object.create(null),this.elements=D??C1.parseToElementsToArray(this.bson,A)}isElementName(F,A){let B=A[2],D=A[1];if(F.length!==B)return!1;let J=D+B;for(let X=D,Z=0;Z<F.length&&X<J;Z++,X++)if(this.bson[X]!==F.charCodeAt(Z))return!1;return!0}getElement(F){let A=this.cache[F];if(A===!1)return null;if(A!=null)return A;if(typeof F==="number")if(this.isArray)if(F<this.elements.length){let D={element:this.elements[F],value:void 0};return this.cache[F]=D,this.indexFound[F]=!0,D}else return null;else return null;for(let B=0;B<this.elements.length;B++){let D=this.elements[B];if(!(B in this.indexFound)&&this.isElementName(F,D)){let J={element:D,value:void 0};return this.cache[F]=J,this.indexFound[B]=!0,J}}return this.cache[F]=!1,null}toJSValue(F,A){let B=F[0],D=F[3],J=F[4];if(A!==B)return null;switch(A){case C1.BSONType.null:case C1.BSONType.undefined:return null;case C1.BSONType.double:return C1.getFloat64LE(this.bson,D);case C1.BSONType.int:return C1.getInt32LE(this.bson,D);case C1.BSONType.long:return C1.getBigInt64LE(this.bson,D);case C1.BSONType.bool:return Boolean(this.bson[D]);case C1.BSONType.objectId:return new C1.ObjectId(this.bson.subarray(D,D+12));case C1.BSONType.timestamp:return new C1.Timestamp(C1.getBigInt64LE(this.bson,D));case C1.BSONType.string:return C1.toUTF8(this.bson,D+4,D+J-1,!1);case C1.BSONType.binData:{let X=C1.getInt32LE(this.bson,D),Z=this.bson[D+4];if(Z===2){let Y=C1.getInt32LE(this.bson,D+1+4);if(Y<0)throw new C1.BSONError("Negative binary type element size found for subtype 0x02");if(Y>X-4)throw new C1.BSONError("Binary type with subtype 0x02 contains too long binary size");if(Y<X-4)throw new C1.BSONError("Binary type with subtype 0x02 contains too short binary size");return new C1.Binary(this.bson.subarray(D+1+4+4,D+1+4+4+Y),2)}return new C1.Binary(this.bson.subarray(D+1+4,D+1+4+X),Z)}case C1.BSONType.date:return new Date(Number(C1.getBigInt64LE(this.bson,D)));case C1.BSONType.object:return new KA(this.bson,D);case C1.BSONType.array:return new KA(this.bson,D,!0);default:throw new C1.BSONError(`Unsupported BSON type: ${A}`)}}size(){return this.elements.length}has(F){let A=this.cache[F];if(A===!1)return!1;if(A!=null)return!0;return this.getElement(F)!=null}get(F,A,B){let D=this.getElement(F);if(D==null)if(B===!0)throw new C1.BSONError(`BSON element "${F}" is missing`);else return null;if(D.value==null){let J=this.toJSValue(D.element,A);if(J==null)if(B===!0)throw new C1.BSONError(`BSON element "${F}" is missing`);else return null;D.value=J}return D.value}getNumber(F,A){let B=this.get(F,C1.BSONType.bool),D=B==null?null:B?1:0,J=this.get(F,C1.BSONType.long),X=J==null?null:Number(J),Z=D??X??this.get(F,C1.BSONType.int)??this.get(F,C1.BSONType.double);if(A===!0&&Z==null)throw new C1.BSONError(`BSON element "${F}" is missing`);return Z}toObject(F){return C1.deserialize(this.bson,{...F,index:this.offset,allowObjectSmallerThanBufferSize:!0})}toBytes(){let F=C1.getInt32LE(this.bson,this.offset);return this.bson.subarray(this.offset,this.offset+F)}}lU.OnDemandDocument=KA});var _6=K((tU)=>{Object.defineProperty(tU,"__esModule",{value:!0});tU.ClientBulkWriteCursorResponse=tU.ExplainedCursorResponse=tU.CursorResponse=tU.MongoDBResponse=void 0;tU.isErrorResponse=sU;var V1=I1(),p4=l(),nU=a(),Dn=iU();function sU(F,A){for(let B=0;B<A.length;B++){let D=A[B];if(D[2]===2){let J=D[1];if(F[J]===111&&F[J+1]===107){let X=D[3],Z=D[4];for(let Y=X;Y<X+Z;Y++)if(F[Y]!==0)return!1;return!0}}}return!0}class i4 extends Dn.OnDemandDocument{get(F,A,B){try{return super.get(F,A,B)}catch(D){throw new p4.MongoUnexpectedServerResponseError(D.message,{cause:D})}}static is(F){return F instanceof i4}static make(F){let A=V1.parseToElementsToArray(F,0);return sU(F,A)?new i4(F,0,!1,A):new this(F,0,!1,A)}get isMaxTimeExpiredError(){if(this.ok===0&&this.code===p4.MONGODB_ERROR_CODES.MaxTimeMSExpired)return!0;if(this.ok===0)return!1;if(this.get("writeConcernError",V1.BSONType.object)?.getNumber("code")===p4.MONGODB_ERROR_CODES.MaxTimeMSExpired)return!0;let B=this.get("writeErrors",V1.BSONType.array);if(B?.size()){for(let D=0;D<B.size();D++)if(B.get(D,V1.BSONType.object)?.getNumber("code")===p4.MONGODB_ERROR_CODES.MaxTimeMSExpired)return!0}return!1}get recoveryToken(){return this.get("recoveryToken",V1.BSONType.object)?.toObject({promoteValues:!1,promoteLongs:!1,promoteBuffers:!1,validation:{utf8:!0}})??null}get atClusterTime(){return this.get("cursor",V1.BSONType.object)?.get("atClusterTime",V1.BSONType.timestamp)??this.get("atClusterTime",V1.BSONType.timestamp)}get operationTime(){return this.get("operationTime",V1.BSONType.timestamp)}get ok(){return this.getNumber("ok")?1:0}get $err(){return this.get("$err",V1.BSONType.string)}get errmsg(){return this.get("errmsg",V1.BSONType.string)}get code(){return this.getNumber("code")}get $clusterTime(){if(!("clusterTime"in this)){let F=this.get("$clusterTime",V1.BSONType.object);if(F==null)return this.clusterTime=null,null;let A=F.get("clusterTime",V1.BSONType.timestamp,!0),B=F.get("signature",V1.BSONType.object)?.toObject();this.clusterTime={clusterTime:A,signature:B}}return this.clusterTime??null}toObject(F){let A={...V1.pluckBSONSerializeOptions(F??{}),validation:V1.parseUtf8ValidationOption(F)};return super.toObject(A)}}tU.MongoDBResponse=i4;i4.empty=new i4(new Uint8Array([13,0,0,0,16,111,107,0,1,0,0,0,0]));class n4 extends i4{constructor(){super(...arguments);this._batch=null,this.iterated=0,this._encryptedBatch=null}static is(F){return F instanceof n4||F===n4.emptyGetMore}get cursor(){return this.get("cursor",V1.BSONType.object,!0)}get id(){try{return V1.Long.fromBigInt(this.cursor.get("id",V1.BSONType.long,!0))}catch(F){throw new p4.MongoUnexpectedServerResponseError(F.message,{cause:F})}}get ns(){let F=this.cursor.get("ns",V1.BSONType.string);if(F!=null)return nU.ns(F);return null}get length(){return Math.max(this.batchSize-this.iterated,0)}get encryptedBatch(){if(this.encryptedResponse==null)return null;if(this._encryptedBatch!=null)return this._encryptedBatch;let F=this.encryptedResponse?.get("cursor",V1.BSONType.object);if(F?.has("firstBatch"))this._encryptedBatch=F.get("firstBatch",V1.BSONType.array,!0);else if(F?.has("nextBatch"))this._encryptedBatch=F.get("nextBatch",V1.BSONType.array,!0);else throw new p4.MongoUnexpectedServerResponseError("Cursor document did not contain a batch");return this._encryptedBatch}get batch(){if(this._batch!=null)return this._batch;let F=this.cursor;if(F.has("firstBatch"))this._batch=F.get("firstBatch",V1.BSONType.array,!0);else if(F.has("nextBatch"))this._batch=F.get("nextBatch",V1.BSONType.array,!0);else throw new p4.MongoUnexpectedServerResponseError("Cursor document did not contain a batch");return this._batch}get batchSize(){return this.batch?.size()}get postBatchResumeToken(){return this.cursor.get("postBatchResumeToken",V1.BSONType.object)?.toObject({promoteValues:!1,promoteLongs:!1,promoteBuffers:!1,validation:{utf8:!0}})??null}shift(F){if(this.iterated>=this.batchSize)return null;let A=this.batch.get(this.iterated,V1.BSONType.object,!0)??null,B=this.encryptedBatch?.get(this.iterated,V1.BSONType.object,!0)??null;if(this.iterated+=1,F?.raw)return A.toBytes();else{let D=A.toObject(F);if(B)nU.decorateDecryptionResult(D,B.toObject(F),!0);return D}}clear(){this.iterated=this.batchSize}}tU.CursorResponse=n4;n4.emptyGetMore={id:new V1.Long(0),length:0,shift:()=>null};class aU extends n4{constructor(){super(...arguments);this.isExplain=!0,this._length=1}get id(){return V1.Long.fromBigInt(0n)}get batchSize(){return 0}get ns(){return null}get length(){return this._length}shift(F){if(this._length===0)return null;return this._length-=1,this.toObject(F)}}tU.ExplainedCursorResponse=aU;class rU extends n4{get insertedCount(){return this.get("nInserted",V1.BSONType.int,!0)}get upsertedCount(){return this.get("nUpserted",V1.BSONType.int,!0)}get matchedCount(){return this.get("nMatched",V1.BSONType.int,!0)}get modifiedCount(){return this.get("nModified",V1.BSONType.int,!0)}get deletedCount(){return this.get("nDeleted",V1.BSONType.int,!0)}get writeConcernError(){return this.get("writeConcernError",V1.BSONType.object,!1)}}tU.ClientBulkWriteCursorResponse=rU});var t0=K((FQ)=>{Object.defineProperty(FQ,"__esModule",{value:!0});FQ.WriteConcern=FQ.WRITE_CONCERN_KEYS=void 0;FQ.throwIfWriteConcernError=Gn;var eU=_6(),$n=l();FQ.WRITE_CONCERN_KEYS=["w","wtimeout","j","journal","fsync"];class l8{constructor(F,A,B,D){if(F!=null)if(!Number.isNaN(Number(F)))this.w=Number(F);else this.w=F;if(A!=null)this.wtimeoutMS=this.wtimeout=A;if(B!=null)this.journal=this.j=B;if(D!=null)this.journal=this.j=D?!0:!1}static apply(F,A){let B={};if(A.w!=null)B.w=A.w;if(A.wtimeoutMS!=null)B.wtimeout=A.wtimeoutMS;if(A.journal!=null)B.j=A.j;return F.writeConcern=B,F}static fromOptions(F,A){if(F==null)return;A=A??{};let B;if(typeof F==="string"||typeof F==="number")B={w:F};else if(F instanceof l8)B=F;else B=F.writeConcern;let D=A instanceof l8?A:A.writeConcern,{w:J=void 0,wtimeout:X=void 0,j:Z=void 0,fsync:Y=void 0,journal:$=void 0,wtimeoutMS:G=void 0}={...D,...B};if(J!=null||X!=null||G!=null||Z!=null||$!=null||Y!=null)return new l8(J,X??G,Z??$,Y);return}}FQ.WriteConcern=l8;function Gn(F){if(typeof F==="object"&&F!=null){let A=eU.MongoDBResponse.is(F)&&F.has("writeConcernError")?F.toObject():!eU.MongoDBResponse.is(F)&&("writeConcernError"in F)?F:null;if(A!=null)throw new $n.MongoWriteConcernError(A)}}});var a=K((KQ)=>{Object.defineProperty(KQ,"__esModule",{value:!0});KQ.randomBytes=KQ.COSMOS_DB_MSG=KQ.DOCUMENT_DB_MSG=KQ.COSMOS_DB_CHECK=KQ.DOCUMENT_DB_CHECK=KQ.MONGODB_WARNING_CODE=KQ.DEFAULT_PK_FACTORY=KQ.HostAddress=KQ.BufferPool=KQ.List=KQ.MongoDBCollectionNamespace=KQ.MongoDBNamespace=KQ.ByteUtils=void 0;KQ.isUint8Array=Vn;KQ.hostMatchesWildcards=Rn;KQ.normalizeHintField=wn;KQ.isObject=zZ;KQ.mergeOptions=Nn;KQ.filterOptions=Pn;KQ.applyRetryableWrites=Mn;KQ.isPromiseLike=Tn;KQ.decorateWithCollation=jn;KQ.decorateWithReadConcern=kn;KQ.getTopology=ZQ;KQ.ns=On;KQ.makeCounter=Sn;KQ.uuidV4=un;KQ.maxWireVersion=xn;KQ.arrayStrictEqual=fn;KQ.errorStrictEqual=_n;KQ.makeStateMachine=gn;KQ.now=YQ;KQ.calculateDurationInMs=bn;KQ.hasAtomicOperators=$Q;KQ.resolveTimeoutOptions=yn;KQ.resolveOptions=vn;KQ.isSuperset=GQ;KQ.isHello=hn;KQ.setDifference=mn;KQ.isRecord=EQ;KQ.deepCopy=CZ;KQ.emitWarning=qQ;KQ.emitWarningOnce=cn;KQ.enumToString=ln;KQ.supportsRetryableWrites=pn;KQ.shuffle=nn;KQ.commandSupportsReadConcern=sn;KQ.compareObjectId=an;KQ.parseInteger=WQ;KQ.parseUnsignedInteger=rn;KQ.checkParentDomainMatch=tn;KQ.get=on;KQ.request=en;KQ.isHostMatch=Fs;KQ.promiseWithResolvers=zQ;KQ.squashError=As;KQ.once=Bs;KQ.maybeAddIdToDocuments=Ds;KQ.fileIsAccessible=Js;KQ.csotMin=Xs;KQ.noop=Zs;KQ.decorateDecryptionResult=CQ;var JQ=import.meta.require("crypto"),qn=import.meta.require("fs"),XQ=import.meta.require("http"),WZ=import.meta.require("timers"),Wn=import.meta.require("url"),zn=import.meta.require("url"),Cn=import.meta.require("util"),KZ=I1(),Kn=l4(),UA=K0(),U2=l(),Un=q6(),Qn=k0(),Ln=s2(),BQ=t0();KQ.ByteUtils={toLocalBufferType(F){return Buffer.isBuffer(F)?F:Buffer.from(F.buffer,F.byteOffset,F.byteLength)},equals(F,A){return KQ.ByteUtils.toLocalBufferType(F).equals(A)},compare(F,A){return KQ.ByteUtils.toLocalBufferType(F).compare(A)},toBase64(F){return KQ.ByteUtils.toLocalBufferType(F).toString("base64")}};function Vn(F){return F!=null&&typeof F==="object"&&Symbol.toStringTag in F&&F[Symbol.toStringTag]==="Uint8Array"}function Rn(F,A){for(let B of A)if(F===B||B.startsWith("*.")&&F?.endsWith(B.substring(2,B.length))||B.startsWith("*/")&&F?.endsWith(B.substring(2,B.length)))return!0;return!1}function wn(F){let A=void 0;if(typeof F==="string")A=F;else if(Array.isArray(F))A={},F.forEach((B)=>{A[B]=1});else if(F!=null&&typeof F==="object"){A={};for(let B in F)A[B]=F[B]}return A}var In=(F)=>Object.prototype.toString.call(F);function zZ(F){return In(F)==="[object Object]"}function Nn(F,A){return{...F,...A}}function Pn(F,A){let B={};for(let D in F)if(A.includes(D))B[D]=F[D];return B}function Mn(F,A){if(A&&A.s.options?.retryWrites)F.retryWrites=!0;return F}function Tn(F){return F!=null&&typeof F==="object"&&"then"in F&&typeof F.then==="function"}function jn(F,A,B){let D=ZQ(A).capabilities;if(B.collation&&typeof B.collation==="object")if(D&&D.commandsTakeCollation)F.collation=B.collation;else throw new U2.MongoCompatibilityError("Current topology does not support collation")}function kn(F,A,B){if(B&&B.session&&B.session.inTransaction())return;let D=Object.assign({},F.readConcern||{});if(A.s.readConcern)Object.assign(D,A.s.readConcern);if(Object.keys(D).length>0)Object.assign(F,{readConcern:D})}function ZQ(F){if("topology"in F&&F.topology)return F.topology;else if("client"in F&&F.client.topology)return F.client.topology;throw new U2.MongoNotConnectedError("MongoClient must be connected to perform this operation")}function On(F){return n8.fromString(F)}class n8{constructor(F,A){this.db=F,this.collection=A,this.collection=A===""?void 0:A}toString(){return this.collection?`${this.db}.${this.collection}`:this.db}withCollection(F){return new UZ(this.db,F)}static fromString(F){if(typeof F!=="string"||F==="")throw new U2.MongoRuntimeError(`Cannot parse namespace from "${F}"`);let[A,...B]=F.split("."),D=B.join(".");return new n8(A,D===""?void 0:D)}}KQ.MongoDBNamespace=n8;class UZ extends n8{constructor(F,A){super(F,A);this.collection=A}static fromString(F){return super.fromString(F)}}KQ.MongoDBCollectionNamespace=UZ;function*Sn(F=0){let A=F;while(!0){let B=A;A+=1,yield B}}function un(){let F=JQ.randomBytes(16);return F[6]=F[6]&15|64,F[8]=F[8]&63|128,F}function xn(F){if(F){if(F.loadBalanced||F.serverApi?.version)return Kn.MAX_SUPPORTED_WIRE_VERSION;if(F.hello)return F.hello.maxWireVersion;if("lastHello"in F&&typeof F.lastHello==="function"){let A=F.lastHello();if(A)return A.maxWireVersion}if(F.description&&"maxWireVersion"in F.description&&F.description.maxWireVersion!=null)return F.description.maxWireVersion}return 0}function fn(F,A){if(!Array.isArray(F)||!Array.isArray(A))return!1;return F.length===A.length&&F.every((B,D)=>B===A[D])}function _n(F,A){if(F===A)return!0;if(!F||!A)return F===A;if(F==null&&A!=null||F!=null&&A==null)return!1;if(F.constructor.name!==A.constructor.name)return!1;if(F.message!==A.message)return!1;return!0}function gn(F){return function A(B,D){let J=F[B.s.state];if(J&&J.indexOf(D)<0)throw new U2.MongoRuntimeError(`illegal state transition from [${B.s.state}] => [${D}], allowed: [${J}]`);B.emit("stateChanged",B.s.state,D),B.s.state=D}}function YQ(){let F=process.hrtime();return Math.floor(F[0]*1000+F[1]/1e6)}function bn(F){if(typeof F!=="number")return-1;let A=YQ()-F;return A<0?0:A}function $Q(F){if(Array.isArray(F)){for(let B of F)if($Q(B))return!0;return!1}let A=Object.keys(F);return A.length>0&&A[0][0]==="$"}function yn(F,A){let{socketTimeoutMS:B,serverSelectionTimeoutMS:D,waitQueueTimeoutMS:J,timeoutMS:X}=F.s.options;return{socketTimeoutMS:B,serverSelectionTimeoutMS:D,waitQueueTimeoutMS:J,timeoutMS:X,...A}}function vn(F,A){let B=Object.assign({},A,KZ.resolveBSONOptions(A,F)),D=A?.timeoutMS??F?.timeoutMS,J=A?.session;if(!J?.inTransaction()){let Y=Un.ReadConcern.fromOptions(A)??F?.readConcern;if(Y)B.readConcern=Y;let $=BQ.WriteConcern.fromOptions(A)??F?.writeConcern;if($){if(D!=null)$=BQ.WriteConcern.fromOptions({...$,wtimeout:void 0,wtimeoutMS:void 0});B.writeConcern=$}}B.timeoutMS=D;let X=Qn.ReadPreference.fromOptions(A)??F?.readPreference;if(X)B.readPreference=X;if(J?.explicit&&J?.timeoutContext!=null&&A?.timeoutMS!=null)throw new U2.MongoInvalidArgumentError("An operation cannot be given a timeoutMS setting when inside a withTransaction call that has a timeoutMS setting");return B}function GQ(F,A){F=Array.isArray(F)?new Set(F):F,A=Array.isArray(A)?new Set(A):A;for(let B of A)if(!F.has(B))return!1;return!0}function hn(F){return F[UA.LEGACY_HELLO_COMMAND]||F.hello?!0:!1}function mn(F,A){let B=new Set(F);for(let D of A)B.delete(D);return B}var dn=(F,A)=>Object.prototype.hasOwnProperty.call(F,A);function EQ(F,A=void 0){if(!zZ(F))return!1;let B=F.constructor;if(B&&B.prototype){if(!zZ(B.prototype))return!1;if(!dn(B.prototype,"isPrototypeOf"))return!1}if(A){let D=Object.keys(F);return GQ(D,A)}return!0}function CZ(F){if(F==null)return F;else if(Array.isArray(F))return F.map((B)=>CZ(B));else if(EQ(F)){let B={};for(let D in F)B[D]=CZ(F[D]);return B}let A=F.constructor;if(A)switch(A.name.toLowerCase()){case"date":return new A(Number(F));case"map":return new Map(F);case"set":return new Set(F);case"buffer":return Buffer.from(F)}return F}class QZ{get length(){return this.count}get[Symbol.toStringTag](){return"List"}constructor(){this.count=0,this.head={next:null,prev:null,value:null},this.head.next=this.head,this.head.prev=this.head}toArray(){return Array.from(this)}toString(){return`head <=> ${this.toArray().join(" <=> ")} <=> head`}*[Symbol.iterator](){for(let F of this.nodes())yield F.value}*nodes(){let F=this.head.next;while(F!==this.head){let{next:A}=F;yield F,F=A}}push(F){this.count+=1;let A={next:this.head,prev:this.head.prev,value:F};this.head.prev.next=A,this.head.prev=A}pushMany(F){for(let A of F)this.push(A)}unshift(F){this.count+=1;let A={next:this.head.next,prev:this.head,value:F};this.head.next.prev=A,this.head.next=A}remove(F){if(F===this.head||this.length===0)return null;this.count-=1;let{prev:A,next:B}=F;return A.next=B,B.prev=A,F.value}shift(){return this.remove(this.head.next)}pop(){return this.remove(this.head.prev)}prune(F){for(let A of this.nodes())if(F(A.value))this.remove(A)}clear(){this.count=0,this.head.next=this.head,this.head.prev=this.head}first(){return this.head.next.value}last(){return this.head.prev.value}}KQ.List=QZ;class HQ{constructor(){this.buffers=new QZ,this.totalByteLength=0}get length(){return this.totalByteLength}append(F){this.buffers.push(F),this.totalByteLength+=F.length}getInt32(){if(this.totalByteLength<4)return null;let F=this.buffers.first();if(F!=null&&F.byteLength>=4)return F.readInt32LE(0);let A=this.read(4),B=A.readInt32LE(0);return this.totalByteLength+=4,this.buffers.unshift(A),B}read(F){if(typeof F!=="number"||F<0)throw new U2.MongoInvalidArgumentError('Argument "size" must be a non-negative number');if(F>this.totalByteLength)return Buffer.alloc(0);let A=Buffer.allocUnsafe(F);for(let B=0;B<F;){let D=this.buffers.shift();if(D==null)break;let J=F-B,X=Math.min(J,D.byteLength),Z=D.subarray(0,X);if(A.set(Z,B),B+=X,this.totalByteLength-=X,X<D.byteLength)this.buffers.unshift(D.subarray(X))}return A}}KQ.BufferPool=HQ;class i8{constructor(F){this.host=void 0,this.port=void 0,this.socketPath=void 0,this.isIPv6=!1;let A=F.split(" ").join("%20");if(A.endsWith(".sock")){this.socketPath=decodeURIComponent(A);return}let B=`iLoveJS://${A}`,D;try{D=new zn.URL(B)}catch(Y){let $=new U2.MongoRuntimeError(`Unable to parse ${A} with URL`);throw $.cause=Y,$}let{hostname:J,port:X}=D,Z=decodeURIComponent(J).toLowerCase();if(Z.startsWith("[")&&Z.endsWith("]"))this.isIPv6=!0,Z=Z.substring(1,J.length-1);if(this.host=Z.toLowerCase(),typeof X==="number")this.port=X;else if(typeof X==="string"&&X!=="")this.port=Number.parseInt(X,10);else this.port=27017;if(this.port===0)throw new U2.MongoParseError("Invalid port (zero) with hostname");Object.freeze(this)}[Symbol.for("nodejs.util.inspect.custom")](){return this.inspect()}inspect(){return`new HostAddress('${this.toString()}')`}toString(){if(typeof this.host==="string"){if(this.isIPv6)return`[${this.host}]:${this.port}`;return`${this.host}:${this.port}`}return`${this.socketPath}`}static fromString(F){return new i8(F)}static fromHostPort(F,A){if(F.includes(":"))F=`[${F}]`;return i8.fromString(`${F}:${A}`)}static fromSrvRecord({name:F,port:A}){return i8.fromHostPort(F,A)}toHostPort(){if(this.socketPath)return{host:this.socketPath,port:0};let F=this.host??"",A=this.port??0;return{host:F,port:A}}}KQ.HostAddress=i8;KQ.DEFAULT_PK_FACTORY={createPk(){return new KZ.ObjectId}};KQ.MONGODB_WARNING_CODE="MONGODB DRIVER";function qQ(F){return process.emitWarning(F,{code:KQ.MONGODB_WARNING_CODE})}var DQ=new Set;function cn(F){if(!DQ.has(F))return DQ.add(F),qQ(F)}function ln(F){return Object.values(F).join(", ")}function pn(F){if(!F)return!1;if(F.loadBalanced)return!0;if(F.description.logicalSessionTimeoutMinutes!=null){if(F.description.type!==Ln.ServerType.Standalone)return!0}return!1}function nn(F,A=0){let B=Array.from(F);if(A>B.length)throw new U2.MongoRuntimeError("Limit must be less than the number of items");let D=B.length,J=A%B.length===0?1:B.length-A;while(D>J){let X=Math.floor(Math.random()*D);D-=1;let Z=B[D];B[D]=B[X],B[X]=Z}return A%B.length===0?B:B.slice(J)}function sn(F){if(F.aggregate||F.count||F.distinct||F.find||F.geoNear)return!0;return!1}function an(F,A){if(F==null&&A==null)return 0;if(F==null)return-1;if(A==null)return 1;return KQ.ByteUtils.compare(F.id,A.id)}function WQ(F){if(typeof F==="number")return Math.trunc(F);let A=Number.parseInt(String(F),10);return Number.isNaN(A)?null:A}function rn(F){let A=WQ(F);return A!=null&&A>=0?A:null}function tn(F,A){let B=F.endsWith(".")?F.slice(0,F.length-1):F,D=A.endsWith(".")?A.slice(0,A.length-1):A,J=/^.*?\./,X=D.split(".").length<3,Z=`.${B.replace(J,"")}`,Y=X?D:`.${D.replace(J,"")}`;if(!Y.startsWith("."))Y="."+Y;if(X&&B.split(".").length<=D.split(".").length)throw new U2.MongoAPIError("Server record does not have at least one more domain level than parent URI");if(!Z.endsWith(Y))throw new U2.MongoAPIError("Server record does not share hostname with parent URI")}function on(F,A={}){return new Promise((B,D)=>{let J,X=XQ.get(F,A,(Z)=>{Z.setEncoding("utf8");let Y="";Z.on("data",($)=>Y+=$),Z.on("end",()=>{WZ.clearTimeout(J),B({status:Z.statusCode,body:Y})})}).on("error",(Z)=>{WZ.clearTimeout(J),D(Z)}).end();J=WZ.setTimeout(()=>{X.destroy(new U2.MongoNetworkTimeoutError("request timed out after 10 seconds"))},1e4)})}async function en(F,A={}){return await new Promise((B,D)=>{let J={method:"GET",timeout:1e4,json:!0,...Wn.parse(F),...A},X=XQ.request(J,(Z)=>{Z.setEncoding("utf8");let Y="";Z.on("data",($)=>{Y+=$}),Z.once("end",()=>{if(A.json===!1){B(Y);return}try{let $=JSON.parse(Y);B($)}catch{D(new U2.MongoRuntimeError(`Invalid JSON response: "${Y}"`))}})});X.once("timeout",()=>X.destroy(new U2.MongoNetworkTimeoutError(`Network request to ${F} timed out after ${A.timeout} ms`))),X.once("error",(Z)=>D(Z)),X.end()})}KQ.DOCUMENT_DB_CHECK=/(\.docdb\.amazonaws\.com$)|(\.docdb-elastic\.amazonaws\.com$)/;KQ.COSMOS_DB_CHECK=/\.cosmos\.azure\.com$/;KQ.DOCUMENT_DB_MSG="You appear to be connected to a DocumentDB cluster. For more information regarding feature compatibility and support please visit https://www.mongodb.com/supportability/documentdb";KQ.COSMOS_DB_MSG="You appear to be connected to a CosmosDB cluster. For more information regarding feature compatibility and support please visit https://www.mongodb.com/supportability/cosmosdb";function Fs(F,A){return A&&F.test(A.toLowerCase())?!0:!1}function zQ(){let F,A;return{promise:new Promise(function D(J,X){F=J,A=X}),resolve:F,reject:A}}function As(F){return}KQ.randomBytes=Cn.promisify(JQ.randomBytes);async function Bs(F,A){let{promise:B,resolve:D,reject:J}=zQ(),X=(Y)=>D(Y),Z=(Y)=>J(Y);F.once(A,X).once("error",Z);try{let Y=await B;return F.off("error",Z),Y}catch(Y){throw F.off(A,X),Y}}function Ds(F,A,B){if((typeof B.forceServerObjectId==="boolean"?B.forceServerObjectId:F.s.db.options?.forceServerObjectId)===!0)return A;let J=(X)=>{if(X._id==null)X._id=F.s.pkFactory.createPk();return X};return Array.isArray(A)?A.map(J):J(A)}async function Js(F,A){try{return await qn.promises.access(F,A),!0}catch{return!1}}function Xs(F,A){if(F===0)return A;if(A===0)return F;return Math.min(F,A)}function Zs(){return}function CQ(F,A,B=!0){if(B){if(Buffer.isBuffer(A))A=KZ.deserialize(A);if(Buffer.isBuffer(F))throw new U2.MongoRuntimeError("Expected result of decryption to be deserialized BSON object")}if(!F||typeof F!=="object")return;for(let D of Object.keys(F)){let J=A[D];if(J&&J._bsontype==="Binary"&&J.sub_type===6){if(!F[UA.kDecoratedKeys])Object.defineProperty(F,UA.kDecoratedKeys,{value:[],configurable:!0,enumerable:!1,writable:!1});F[UA.kDecoratedKeys].push(D);continue}CQ(F[D],J,!1)}}});var o0=K((RQ)=>{Object.defineProperty(RQ,"__esModule",{value:!0});RQ.LegacyTimeoutContext=RQ.CSOTTimeoutContext=RQ.TimeoutContext=RQ.Timeout=RQ.TimeoutError=void 0;var LQ=import.meta.require("timers"),s4=l(),VQ=a();class QA extends Error{get name(){return"TimeoutError"}constructor(F,A){super(F,A);this.duration=A.duration}static is(F){return F!=null&&typeof F==="object"&&"name"in F&&F.name==="TimeoutError"}}RQ.TimeoutError=QA;class r2 extends Promise{get remainingTime(){if(this.timedOut)return 0;if(this.duration===0)return 1/0;return this.start+this.duration-Math.trunc(performance.now())}get timeElapsed(){return Math.trunc(performance.now())-this.start}constructor(F=()=>null,A){let B=A?.duration??0,D=!!A?.unref,J=A?.rejection;if(B<0)throw new s4.MongoInvalidArgumentError("Cannot create a Timeout with a negative duration");let X;super((Z,Y)=>{X=Y,F(VQ.noop,Y)});if(this.ended=null,this.timedOut=!1,this.cleared=!1,this.duration=B,this.start=Math.trunc(performance.now()),J==null&&this.duration>0){if(this.id=LQ.setTimeout(()=>{this.ended=Math.trunc(performance.now()),this.timedOut=!0,X(new QA(`Expired after ${B}ms`,{duration:B}))},this.duration),typeof this.id.unref==="function"&&D)this.id.unref()}else if(J!=null)this.ended=Math.trunc(performance.now()),this.timedOut=!0,X(J)}clear(){LQ.clearTimeout(this.id),this.id=void 0,this.timedOut=!1,this.cleared=!0}throwIfExpired(){if(this.timedOut)throw new QA("Timed out",{duration:this.duration})}static expires(F,A){return new r2(void 0,{duration:F,unref:A})}static reject(F){return new r2(void 0,{duration:0,unref:!0,rejection:F})}}RQ.Timeout=r2;function Wa(F){return F!=null&&typeof F==="object"&&"serverSelectionTimeoutMS"in F&&typeof F.serverSelectionTimeoutMS==="number"&&"waitQueueTimeoutMS"in F&&typeof F.waitQueueTimeoutMS==="number"}function za(F){return F!=null&&typeof F==="object"&&"serverSelectionTimeoutMS"in F&&typeof F.serverSelectionTimeoutMS==="number"&&"timeoutMS"in F&&typeof F.timeoutMS==="number"}class LA{static create(F){if(F.session?.timeoutContext!=null)return F.session?.timeoutContext;if(za(F))return new s8(F);else if(Wa(F))return new VA(F);else throw new s4.MongoRuntimeError("Unrecognized options")}}RQ.TimeoutContext=LA;class s8 extends LA{constructor(F){super();this.minRoundTripTime=0,this.start=Math.trunc(performance.now()),this.timeoutMS=F.timeoutMS,this.serverSelectionTimeoutMS=F.serverSelectionTimeoutMS,this.socketTimeoutMS=F.socketTimeoutMS,this.clearServerSelectionTimeout=!1}get maxTimeMS(){return this.remainingTimeMS-this.minRoundTripTime}get remainingTimeMS(){let F=Math.trunc(performance.now())-this.start;return this.timeoutMS<=0?1/0:this.timeoutMS-F}csotEnabled(){return!0}get serverSelectionTimeout(){if(typeof this._serverSelectionTimeout!=="object"||this._serverSelectionTimeout?.cleared){let{remainingTimeMS:F,serverSelectionTimeoutMS:A}=this;if(F<=0)return r2.reject(new s4.MongoOperationTimeoutError(`Timed out in server selection after ${this.timeoutMS}ms`));if(A!==0&&VQ.csotMin(F,A)===A)this._serverSelectionTimeout=r2.expires(A);else if(F>0&&Number.isFinite(F))this._serverSelectionTimeout=r2.expires(F);else this._serverSelectionTimeout=null}return this._serverSelectionTimeout}get connectionCheckoutTimeout(){if(typeof this._connectionCheckoutTimeout!=="object"||this._connectionCheckoutTimeout?.cleared)if(typeof this._serverSelectionTimeout==="object")this._connectionCheckoutTimeout=this._serverSelectionTimeout;else throw new s4.MongoRuntimeError("Unreachable. If you are seeing this error, please file a ticket on the NODE driver project on Jira");return this._connectionCheckoutTimeout}get timeoutForSocketWrite(){let{remainingTimeMS:F}=this;if(!Number.isFinite(F))return null;if(F>0)return r2.expires(F);return r2.reject(new s4.MongoOperationTimeoutError("Timed out before socket write"))}get timeoutForSocketRead(){let{remainingTimeMS:F}=this;if(!Number.isFinite(F))return null;if(F>0)return r2.expires(F);return r2.reject(new s4.MongoOperationTimeoutError("Timed out before socket read"))}refresh(){this.start=Math.trunc(performance.now()),this.minRoundTripTime=0,this._serverSelectionTimeout?.clear(),this._connectionCheckoutTimeout?.clear()}clear(){this._serverSelectionTimeout?.clear(),this._connectionCheckoutTimeout?.clear()}getRemainingTimeMSOrThrow(F){let{remainingTimeMS:A}=this;if(A<=0)throw new s4.MongoOperationTimeoutError(F??`Expired after ${this.timeoutMS}ms`);return A}clone(){let F=new s8({timeoutMS:this.timeoutMS,serverSelectionTimeoutMS:this.serverSelectionTimeoutMS});return F.start=this.start,F}refreshed(){return new s8(this)}addMaxTimeMSToCommand(F,A){if(A.omitMaxTimeMS)return;let B=this.remainingTimeMS-this.minRoundTripTime;if(B>0&&Number.isFinite(B))F.maxTimeMS=B}getSocketTimeoutMS(){return 0}}RQ.CSOTTimeoutContext=s8;class VA extends LA{constructor(F){super();this.options=F,this.clearServerSelectionTimeout=!0}csotEnabled(){return!1}get serverSelectionTimeout(){if(this.options.serverSelectionTimeoutMS!=null&&this.options.serverSelectionTimeoutMS>0)return r2.expires(this.options.serverSelectionTimeoutMS);return null}get connectionCheckoutTimeout(){if(this.options.waitQueueTimeoutMS!=null&&this.options.waitQueueTimeoutMS>0)return r2.expires(this.options.waitQueueTimeoutMS);return null}get timeoutForSocketWrite(){return null}get timeoutForSocketRead(){return null}refresh(){return}clear(){return}get maxTimeMS(){return null}refreshed(){return new VA(this.options)}addMaxTimeMSToCommand(F,A){}getSocketTimeoutMS(){return this.options.socketTimeoutMS}}RQ.LegacyTimeoutContext=VA});var O1=K((NQ)=>{Object.defineProperty(NQ,"__esModule",{value:!0});NQ.AbstractOperation=NQ.Aspect=void 0;NQ.defineAspects=Va;var La=I1(),LZ=k0();NQ.Aspect={READ_OPERATION:Symbol("READ_OPERATION"),WRITE_OPERATION:Symbol("WRITE_OPERATION"),RETRYABLE:Symbol("RETRYABLE"),EXPLAINABLE:Symbol("EXPLAINABLE"),SKIP_COLLATION:Symbol("SKIP_COLLATION"),CURSOR_CREATING:Symbol("CURSOR_CREATING"),MUST_SELECT_SAME_SERVER:Symbol("MUST_SELECT_SAME_SERVER"),COMMAND_BATCHING:Symbol("COMMAND_BATCHING")};var VZ=Symbol("session");class IQ{constructor(F={}){this.readPreference=this.hasAspect(NQ.Aspect.WRITE_OPERATION)?LZ.ReadPreference.primary:LZ.ReadPreference.fromOptions(F)??LZ.ReadPreference.primary,this.bsonOptions=La.resolveBSONOptions(F),this[VZ]=F.session!=null?F.session:void 0,this.options=F,this.bypassPinningCheck=!!F.bypassPinningCheck,this.trySecondaryWrite=!1}hasAspect(F){let A=this.constructor;if(A.aspects==null)return!1;return A.aspects.has(F)}get session(){return this[VZ]}clearSession(){this[VZ]=void 0}resetBatch(){return!0}get canRetryRead(){return this.hasAspect(NQ.Aspect.RETRYABLE)&&this.hasAspect(NQ.Aspect.READ_OPERATION)}get canRetryWrite(){return this.hasAspect(NQ.Aspect.RETRYABLE)&&this.hasAspect(NQ.Aspect.WRITE_OPERATION)}}NQ.AbstractOperation=IQ;function Va(F,A){if(!Array.isArray(A)&&!(A instanceof Set))A=[A];return A=new Set(A),Object.defineProperty(F,"aspects",{value:A,writable:!1}),A}});var F2=K((OQ)=>{Object.defineProperty(OQ,"__esModule",{value:!0});OQ.executeOperation=Na;var e0=l(),MQ=k0(),TQ=c8(),wa=o0(),jQ=a(),R3=O1(),Ia=e0.MONGODB_ERROR_CODES.IllegalOperation,kQ="This MongoDB deployment does not support retryable writes. Please add retryWrites=false to your connection string.";async function Na(F,A,B){if(!(A instanceof R3.AbstractOperation))throw new e0.MongoRuntimeError("This method requires a valid operation instance");let D=await Pa(F),J=A.session,X;if(J==null)X=Symbol(),J=F.startSession({owner:X,explicit:!1});else if(J.hasEnded)throw new e0.MongoExpiredSessionError("Use of expired sessions is not permitted");else if(J.snapshotEnabled&&!D.capabilities.supportsSnapshotReads)throw new e0.MongoCompatibilityError("Snapshot reads require MongoDB 5.0 or later");else if(J.client!==F)throw new e0.MongoInvalidArgumentError("ClientSession must be from the same MongoClient");let Z=A.readPreference??MQ.ReadPreference.primary,Y=!!J?.inTransaction(),$=A.hasAspect(R3.Aspect.READ_OPERATION);if(Y&&!Z.equals(MQ.ReadPreference.primary)&&($||A.commandName==="runCommand"))throw new e0.MongoTransactionError(`Read preference in a transaction must be primary, not: ${Z.mode}`);if(J?.isPinned&&J.transaction.isCommitted&&!A.bypassPinningCheck)J.unpin();B??=wa.TimeoutContext.create({session:J,serverSelectionTimeoutMS:F.s.options.serverSelectionTimeoutMS,waitQueueTimeoutMS:F.s.options.waitQueueTimeoutMS,timeoutMS:A.options.timeoutMS});try{return await Ma(A,{topology:D,timeoutContext:B,session:J,readPreference:Z})}finally{if(J?.owner!=null&&J.owner===X)await J.endSession()}}async function Pa(F){if(F.topology==null){if(F.s.hasBeenClosed)throw new e0.MongoNotConnectedError("Client must be connected before running operations");F.s.options[Symbol.for("@@mdb.skipPingOnConnect")]=!0;try{if(await F.connect(),F.topology==null)throw new e0.MongoRuntimeError("client.connect did not create a topology but also did not throw");return F.topology}finally{delete F.s.options[Symbol.for("@@mdb.skipPingOnConnect")]}}return F.topology}async function Ma(F,{topology:A,timeoutContext:B,session:D,readPreference:J}){let X;if(F.hasAspect(R3.Aspect.MUST_SELECT_SAME_SERVER))X=TQ.sameServerSelector(F.server?.description);else if(F.trySecondaryWrite)X=TQ.secondaryWritableServerSelector(A.commonWireVersion,J);else X=J;let Z=await A.selectServer(X,{session:D,operationName:F.commandName,timeoutContext:B}),Y=F.hasAspect(R3.Aspect.READ_OPERATION),$=F.hasAspect(R3.Aspect.WRITE_OPERATION),G=D?.inTransaction()??!1,E=A.s.options.retryReads&&!G&&F.canRetryRead,H=A.s.options.retryWrites&&!G&&jQ.supportsRetryableWrites(Z)&&F.canRetryWrite,q=F.hasAspect(R3.Aspect.RETRYABLE)&&D!=null&&(Y&&E||$&&H);if($&&H&&D!=null)F.options.willRetryWrite=!0,D.incrementTransactionNumber();let W=q?B.csotEnabled()?1/0:2:1,z,C;for(let U=0;U<W;U++){if(z){if($&&z.code===Ia)throw new e0.MongoServerError({message:kQ,errmsg:kQ,originalError:z});if(F.hasAspect(R3.Aspect.COMMAND_BATCHING)&&!F.canRetryWrite)throw z;if($&&!e0.isRetryableWriteError(z))throw z;if(Y&&!e0.isRetryableReadError(z))throw z;if(z instanceof e0.MongoNetworkError&&F.hasAspect(R3.Aspect.CURSOR_CREATING)&&D!=null&&D.isPinned&&!D.inTransaction())D.unpin({force:!0,forceClear:!0});if(Z=await A.selectServer(X,{session:D,operationName:F.commandName,previousServer:C}),$&&!jQ.supportsRetryableWrites(Z))throw new e0.MongoUnexpectedServerResponseError("Selected server does not support retryable writes")}try{if(U>0&&F.hasAspect(R3.Aspect.COMMAND_BATCHING))F.resetBatch();return await F.execute(Z,D,B)}catch(Q){if(!(Q instanceof e0.MongoError))throw Q;if(z!=null&&Q.hasErrorLabel(e0.MongoErrorLabel.NoWritesPerformed))throw z;C=Z.description,z=Q,B.clear()}}throw z??new e0.MongoRuntimeError("Tried to propagate retryability error, but no error was found.")}});var r4=K((_Q)=>{Object.defineProperty(_Q,"__esModule",{value:!0});_Q.MongoLogger=_Q.MongoLoggableComponent=_Q.SEVERITY_LEVEL_MAP=_Q.DEFAULT_MAX_DOCUMENT_LENGTH=_Q.SeverityLevel=void 0;_Q.parseSeverityFromString=IZ;_Q.createStdioLogger=a4;_Q.stringifyWithMaxLen=D4;_Q.defaultLogTransform=xQ;var SQ=import.meta.require("util"),ja=I1(),i1=K0(),n9=a();_Q.SeverityLevel=Object.freeze({EMERGENCY:"emergency",ALERT:"alert",CRITICAL:"critical",ERROR:"error",WARNING:"warn",NOTICE:"notice",INFORMATIONAL:"info",DEBUG:"debug",TRACE:"trace",OFF:"off"});_Q.DEFAULT_MAX_DOCUMENT_LENGTH=1000;class uQ extends Map{constructor(F){let A=[];for(let[B,D]of F)A.push([D,B]);A.push(...F);super(A)}getNumericSeverityLevel(F){return this.get(F)}getSeverityLevelName(F){return this.get(F)}}_Q.SEVERITY_LEVEL_MAP=new uQ([[_Q.SeverityLevel.OFF,-1/0],[_Q.SeverityLevel.EMERGENCY,0],[_Q.SeverityLevel.ALERT,1],[_Q.SeverityLevel.CRITICAL,2],[_Q.SeverityLevel.ERROR,3],[_Q.SeverityLevel.WARNING,4],[_Q.SeverityLevel.NOTICE,5],[_Q.SeverityLevel.INFORMATIONAL,6],[_Q.SeverityLevel.DEBUG,7],[_Q.SeverityLevel.TRACE,8]]);_Q.MongoLoggableComponent=Object.freeze({COMMAND:"command",TOPOLOGY:"topology",SERVER_SELECTION:"serverSelection",CONNECTION:"connection",CLIENT:"client"});function IZ(F){let A=Object.values(_Q.SeverityLevel),B=F?.toLowerCase();if(B!=null&&A.includes(B))return B;return null}function a4(F){return{write:SQ.promisify((A,B)=>{let D=SQ.inspect(A,{compact:!0,breakLength:1/0});F.write(`${D}
26
+ `,"utf-8",B);return})}}function ka({MONGODB_LOG_PATH:F},{mongodbLogPath:A}){if(typeof A==="string"&&/^stderr$/i.test(A))return{mongodbLogPath:a4(process.stderr),mongodbLogPathIsStdErr:!0};if(typeof A==="string"&&/^stdout$/i.test(A))return{mongodbLogPath:a4(process.stdout),mongodbLogPathIsStdErr:!1};if(typeof A==="object"&&typeof A?.write==="function")return{mongodbLogPath:A,mongodbLogPathIsStdErr:!1};if(F&&/^stderr$/i.test(F))return{mongodbLogPath:a4(process.stderr),mongodbLogPathIsStdErr:!0};if(F&&/^stdout$/i.test(F))return{mongodbLogPath:a4(process.stdout),mongodbLogPathIsStdErr:!1};return{mongodbLogPath:a4(process.stderr),mongodbLogPathIsStdErr:!0}}function i9(F,A,B){return IZ(F)??IZ(A)??B}function Oa(F,A){let B=_Q.SEVERITY_LEVEL_MAP.getNumericSeverityLevel(F),D=_Q.SEVERITY_LEVEL_MAP.getNumericSeverityLevel(A);return B<D?-1:B>D?1:0}function D4(F,A,B={}){let D="";if(typeof F==="string")D=F;else if(typeof F==="function")D=F.name;else try{D=ja.EJSON.stringify(F,B)}catch(J){D=`Extended JSON serialization failed with: ${J.message}`}if(A!==0&&D.length>A&&D.charCodeAt(A-1)!==D.codePointAt(A-1)){if(A--,A===0)return""}return A!==0&&D.length>A?`${D.slice(0,A)}...`:D}function Sa(F){let A=F;return A.toLog!==void 0&&typeof A.toLog==="function"}function RA(F,A,B=_Q.DEFAULT_MAX_DOCUMENT_LENGTH){let{selector:D,operation:J,topologyDescription:X,message:Z}=A;return F.selector=D4(D,B),F.operation=J,F.topologyDescription=D4(X,B),F.message=Z,F}function RZ(F,A){F.commandName=A.commandName,F.requestId=A.requestId,F.driverConnectionId=A.connectionId;let{host:B,port:D}=n9.HostAddress.fromString(A.address).toHostPort();if(F.serverHost=B,F.serverPort=D,A?.serviceId)F.serviceId=A.serviceId.toHexString();return F.databaseName=A.databaseName,F.serverConnectionId=A.serverConnectionId,F}function t2(F,A){let{host:B,port:D}=n9.HostAddress.fromString(A.address).toHostPort();return F.serverHost=B,F.serverPort=D,F}function B4(F,A){return F.topologyId=A.topologyId,F}function wZ(F,A){let{awaited:B,connectionId:D}=A;F.awaited=B,F.driverConnectionId=A.connectionId;let{host:J,port:X}=n9.HostAddress.fromString(D).toHostPort();return F.serverHost=J,F.serverPort=X,F}function xQ(F,A=_Q.DEFAULT_MAX_DOCUMENT_LENGTH){let B=Object.create(null);switch(F.name){case i1.SERVER_SELECTION_STARTED:return B=RA(B,F,A),B;case i1.SERVER_SELECTION_FAILED:return B=RA(B,F,A),B.failure=F.failure?.message,B;case i1.SERVER_SELECTION_SUCCEEDED:return B=RA(B,F,A),B.serverHost=F.serverHost,B.serverPort=F.serverPort,B;case i1.WAITING_FOR_SUITABLE_SERVER:return B=RA(B,F,A),B.remainingTimeMS=F.remainingTimeMS,B;case i1.COMMAND_STARTED:return B=RZ(B,F),B.message="Command started",B.command=D4(F.command,A,{relaxed:!0}),B.databaseName=F.databaseName,B;case i1.COMMAND_SUCCEEDED:return B=RZ(B,F),B.message="Command succeeded",B.durationMS=F.duration,B.reply=D4(F.reply,A,{relaxed:!0}),B;case i1.COMMAND_FAILED:return B=RZ(B,F),B.message="Command failed",B.durationMS=F.duration,B.failure=F.failure?.message??"(redacted)",B;case i1.CONNECTION_POOL_CREATED:if(B=t2(B,F),B.message="Connection pool created",F.options){let{maxIdleTimeMS:D,minPoolSize:J,maxPoolSize:X,maxConnecting:Z,waitQueueTimeoutMS:Y}=F.options;B={...B,maxIdleTimeMS:D,minPoolSize:J,maxPoolSize:X,maxConnecting:Z,waitQueueTimeoutMS:Y}}return B;case i1.CONNECTION_POOL_READY:return B=t2(B,F),B.message="Connection pool ready",B;case i1.CONNECTION_POOL_CLEARED:if(B=t2(B,F),B.message="Connection pool cleared",F.serviceId?._bsontype==="ObjectId")B.serviceId=F.serviceId?.toHexString();return B;case i1.CONNECTION_POOL_CLOSED:return B=t2(B,F),B.message="Connection pool closed",B;case i1.CONNECTION_CREATED:return B=t2(B,F),B.message="Connection created",B.driverConnectionId=F.connectionId,B;case i1.CONNECTION_READY:return B=t2(B,F),B.message="Connection ready",B.driverConnectionId=F.connectionId,B.durationMS=F.durationMS,B;case i1.CONNECTION_CLOSED:switch(B=t2(B,F),B.message="Connection closed",B.driverConnectionId=F.connectionId,F.reason){case"stale":B.reason="Connection became stale because the pool was cleared";break;case"idle":B.reason="Connection has been available but unused for longer than the configured max idle time";break;case"error":if(B.reason="An error occurred while using the connection",F.error)B.error=F.error;break;case"poolClosed":B.reason="Connection pool was closed";break;default:B.reason=`Unknown close reason: ${F.reason}`}return B;case i1.CONNECTION_CHECK_OUT_STARTED:return B=t2(B,F),B.message="Connection checkout started",B;case i1.CONNECTION_CHECK_OUT_FAILED:switch(B=t2(B,F),B.message="Connection checkout failed",F.reason){case"poolClosed":B.reason="Connection pool was closed";break;case"timeout":B.reason="Wait queue timeout elapsed without a connection becoming available";break;case"connectionError":if(B.reason="An error occurred while trying to establish a new connection",F.error)B.error=F.error;break;default:B.reason=`Unknown close reason: ${F.reason}`}return B.durationMS=F.durationMS,B;case i1.CONNECTION_CHECKED_OUT:return B=t2(B,F),B.message="Connection checked out",B.driverConnectionId=F.connectionId,B.durationMS=F.durationMS,B;case i1.CONNECTION_CHECKED_IN:return B=t2(B,F),B.message="Connection checked in",B.driverConnectionId=F.connectionId,B;case i1.SERVER_OPENING:return B=B4(B,F),B=t2(B,F),B.message="Starting server monitoring",B;case i1.SERVER_CLOSED:return B=B4(B,F),B=t2(B,F),B.message="Stopped server monitoring",B;case i1.SERVER_HEARTBEAT_STARTED:return B=B4(B,F),B=wZ(B,F),B.message="Server heartbeat started",B;case i1.SERVER_HEARTBEAT_SUCCEEDED:return B=B4(B,F),B=wZ(B,F),B.message="Server heartbeat succeeded",B.durationMS=F.duration,B.serverConnectionId=F.serverConnectionId,B.reply=D4(F.reply,A,{relaxed:!0}),B;case i1.SERVER_HEARTBEAT_FAILED:return B=B4(B,F),B=wZ(B,F),B.message="Server heartbeat failed",B.durationMS=F.duration,B.failure=F.failure?.message,B;case i1.TOPOLOGY_OPENING:return B=B4(B,F),B.message="Starting topology monitoring",B;case i1.TOPOLOGY_CLOSED:return B=B4(B,F),B.message="Stopped topology monitoring",B;case i1.TOPOLOGY_DESCRIPTION_CHANGED:return B=B4(B,F),B.message="Topology description changed",B.previousDescription=B.reply=D4(F.previousDescription,A),B.newDescription=B.reply=D4(F.newDescription,A),B;default:for(let[D,J]of Object.entries(F))if(J!=null)B[D]=J}return B}class fQ{constructor(F){this.pendingLog=null,this.error=this.log.bind(this,"error"),this.warn=this.log.bind(this,"warn"),this.info=this.log.bind(this,"info"),this.debug=this.log.bind(this,"debug"),this.trace=this.log.bind(this,"trace"),this.componentSeverities=F.componentSeverities,this.maxDocumentLength=F.maxDocumentLength,this.logDestination=F.logDestination,this.logDestinationIsStdErr=F.logDestinationIsStdErr,this.severities=this.createLoggingSeverities()}createLoggingSeverities(){let F=Object();for(let A of Object.values(_Q.MongoLoggableComponent)){F[A]={};for(let B of Object.values(_Q.SeverityLevel))F[A][B]=Oa(B,this.componentSeverities[A])<=0}return F}turnOffSeverities(){for(let F of Object.values(_Q.MongoLoggableComponent)){this.componentSeverities[F]=_Q.SeverityLevel.OFF;for(let A of Object.values(_Q.SeverityLevel))this.severities[F][A]=!1}}logWriteFailureHandler(F){if(this.logDestinationIsStdErr){this.turnOffSeverities(),this.clearPendingLog();return}this.logDestination=a4(process.stderr),this.logDestinationIsStdErr=!0,this.clearPendingLog(),this.error(_Q.MongoLoggableComponent.CLIENT,{toLog:function(){return{message:"User input for mongodbLogPath is now invalid. Logging is halted.",error:F.message}}}),this.turnOffSeverities(),this.clearPendingLog()}clearPendingLog(){this.pendingLog=null}willLog(F,A){if(A===_Q.SeverityLevel.OFF)return!1;return this.severities[F][A]}log(F,A,B){if(!this.willLog(A,F))return;let D={t:new Date,c:A,s:F};if(typeof B==="string")D.message=B;else if(typeof B==="object")if(Sa(B))D={...D,...B.toLog()};else D={...D,...xQ(B,this.maxDocumentLength)};if(n9.isPromiseLike(this.pendingLog)){this.pendingLog=this.pendingLog.then(()=>this.logDestination.write(D)).then(this.clearPendingLog.bind(this),this.logWriteFailureHandler.bind(this));return}try{let J=this.logDestination.write(D);if(n9.isPromiseLike(J))this.pendingLog=J.then(this.clearPendingLog.bind(this),this.logWriteFailureHandler.bind(this))}catch(J){this.logWriteFailureHandler(J)}}static resolveOptions(F,A){let B=ka(F,A),D={...F,...A,mongodbLogPath:B.mongodbLogPath,mongodbLogPathIsStdErr:B.mongodbLogPathIsStdErr},J=i9(D.mongodbLogComponentSeverities?.default,D.MONGODB_LOG_ALL,_Q.SeverityLevel.OFF);return{componentSeverities:{command:i9(D.mongodbLogComponentSeverities?.command,D.MONGODB_LOG_COMMAND,J),topology:i9(D.mongodbLogComponentSeverities?.topology,D.MONGODB_LOG_TOPOLOGY,J),serverSelection:i9(D.mongodbLogComponentSeverities?.serverSelection,D.MONGODB_LOG_SERVER_SELECTION,J),connection:i9(D.mongodbLogComponentSeverities?.connection,D.MONGODB_LOG_CONNECTION,J),client:i9(D.mongodbLogComponentSeverities?.client,D.MONGODB_LOG_CLIENT,J),default:J},maxDocumentLength:D.mongodbLogMaxDocumentLength??n9.parseUnsignedInteger(D.MONGODB_LOG_MAX_DOCUMENT_LENGTH)??1000,logDestination:D.mongodbLogPath,logDestinationIsStdErr:D.mongodbLogPathIsStdErr}}}_Q.MongoLogger=fQ});var o2=K((yQ)=>{Object.defineProperty(yQ,"__esModule",{value:!0});yQ.CancellationToken=yQ.TypedEventEmitter=void 0;var ga=import.meta.require("events"),ba=r4();class MZ extends ga.EventEmitter{emitAndLog(F,...A){if(this.emit(F,...A),this.component)this.mongoLogger?.debug(this.component,A[0])}emitAndLogHeartbeat(F,A,B,...D){if(this.emit(F,...D),this.component){let J={topologyId:A,serverConnectionId:B??null,...D[0]};this.mongoLogger?.debug(this.component,J)}}emitAndLogCommand(F,A,B,D,...J){if(F)this.emit(A,...J);if(D){let X={databaseName:B,...J[0]};this.mongoLogger?.debug(ba.MongoLoggableComponent.COMMAND,X)}}}yQ.TypedEventEmitter=MZ;class bQ extends MZ{}yQ.CancellationToken=bQ});var kZ=K((hQ)=>{Object.defineProperty(hQ,"__esModule",{value:!0});hQ.GetMoreOperation=void 0;var va=_6(),TZ=l(),ha=a(),IA=O1();class jZ extends IA.AbstractOperation{constructor(F,A,B,D){super(D);this.options=D,this.ns=F,this.cursorId=A,this.server=B}get commandName(){return"getMore"}async execute(F,A,B){if(F!==this.server)throw new TZ.MongoRuntimeError("Getmore must run on the same server operation began on");if(this.cursorId==null||this.cursorId.isZero())throw new TZ.MongoRuntimeError("Unable to iterate cursor with no id");let D=this.ns.collection;if(D==null)throw new TZ.MongoRuntimeError("A collection name must be determined before getMore");let J={getMore:this.cursorId,collection:D};if(typeof this.options.batchSize==="number")J.batchSize=Math.abs(this.options.batchSize);if(typeof this.options.maxAwaitTimeMS==="number")J.maxTimeMS=this.options.maxAwaitTimeMS;if(this.options.comment!==void 0&&ha.maxWireVersion(F)>=9)J.comment=this.options.comment;let X={returnFieldSelector:null,documentsReturnedIn:"nextBatch",timeoutContext:B,...this.options};return await F.command(this.ns,J,X,va.CursorResponse)}}hQ.GetMoreOperation=jZ;IA.defineAspects(jZ,[IA.Aspect.READ_OPERATION,IA.Aspect.MUST_SELECT_SAME_SERVER])});var pQ=K((cQ)=>{Object.defineProperty(cQ,"__esModule",{value:!0});cQ.KillCursorsOperation=void 0;var dQ=l(),ma=a(),OZ=O1();class SZ extends OZ.AbstractOperation{constructor(F,A,B,D){super(D);this.ns=A,this.cursorId=F,this.server=B}get commandName(){return"killCursors"}async execute(F,A,B){if(F!==this.server)throw new dQ.MongoRuntimeError("Killcursor must run on the same server operation began on");let D=this.ns.collection;if(D==null)throw new dQ.MongoRuntimeError("A collection name must be determined before killCursors");let J={killCursors:D,cursors:[this.cursorId]};try{await F.command(this.ns,J,{session:A,timeoutContext:B})}catch(X){ma.squashError(X)}}}cQ.KillCursorsOperation=SZ;OZ.defineAspects(SZ,[OZ.Aspect.MUST_SELECT_SAME_SERVER])});var _Z=K((iQ)=>{Object.defineProperty(iQ,"__esModule",{value:!0});iQ.DeleteManyOperation=iQ.DeleteOneOperation=iQ.DeleteOperation=void 0;iQ.makeDeleteStatement=fZ;var a8=l(),da=$0(),W6=O1();class r8 extends da.CommandOperation{constructor(F,A,B){super(void 0,B);this.options=B,this.ns=F,this.statements=A}get commandName(){return"delete"}get canRetryWrite(){if(super.canRetryWrite===!1)return!1;return this.statements.every((F)=>F.limit!=null?F.limit>0:!0)}async execute(F,A,B){let D=this.options??{},J=typeof D.ordered==="boolean"?D.ordered:!0,X={delete:this.ns.collection,deletes:this.statements,ordered:J};if(D.let)X.let=D.let;if(D.comment!==void 0)X.comment=D.comment;if(this.writeConcern&&this.writeConcern.w===0){if(this.statements.find(($)=>$.hint))throw new a8.MongoCompatibilityError("hint is not supported with unacknowledged writes")}return await super.executeCommand(F,A,X,B)}}iQ.DeleteOperation=r8;class uZ extends r8{constructor(F,A,B){super(F.s.namespace,[fZ(A,{...B,limit:1})],B)}async execute(F,A,B){let D=await super.execute(F,A,B);if(this.explain)return D;if(D.code)throw new a8.MongoServerError(D);if(D.writeErrors)throw new a8.MongoServerError(D.writeErrors[0]);return{acknowledged:this.writeConcern?.w!==0,deletedCount:D.n}}}iQ.DeleteOneOperation=uZ;class xZ extends r8{constructor(F,A,B){super(F.s.namespace,[fZ(A,B)],B)}async execute(F,A,B){let D=await super.execute(F,A,B);if(this.explain)return D;if(D.code)throw new a8.MongoServerError(D);if(D.writeErrors)throw new a8.MongoServerError(D.writeErrors[0]);return{acknowledged:this.writeConcern?.w!==0,deletedCount:D.n}}}iQ.DeleteManyOperation=xZ;function fZ(F,A){let B={q:F,limit:typeof A.limit==="number"?A.limit:0};if(A.collation)B.collation=A.collation;if(A.hint)B.hint=A.hint;return B}W6.defineAspects(r8,[W6.Aspect.RETRYABLE,W6.Aspect.WRITE_OPERATION]);W6.defineAspects(uZ,[W6.Aspect.RETRYABLE,W6.Aspect.WRITE_OPERATION,W6.Aspect.EXPLAINABLE,W6.Aspect.SKIP_COLLATION]);W6.defineAspects(xZ,[W6.Aspect.WRITE_OPERATION,W6.Aspect.EXPLAINABLE,W6.Aspect.SKIP_COLLATION])});var yZ=K((sQ)=>{Object.defineProperty(sQ,"__esModule",{value:!0});sQ.BulkWriteOperation=void 0;var gZ=O1();class bZ extends gZ.AbstractOperation{constructor(F,A,B){super(B);this.options=B,this.collection=F,this.operations=A}get commandName(){return"bulkWrite"}async execute(F,A,B){let D=this.collection,J=this.operations,X={...this.options,...this.bsonOptions,readPreference:this.readPreference,timeoutContext:B},Z=X.ordered===!1?D.initializeUnorderedBulkOp(X):D.initializeOrderedBulkOp(X);for(let Y=0;Y<J.length;Y++)Z.raw(J[Y]);return await Z.execute({...X,session:A})}}sQ.BulkWriteOperation=bZ;gZ.defineAspects(bZ,[gZ.Aspect.WRITE_OPERATION])});var mZ=K((rQ)=>{Object.defineProperty(rQ,"__esModule",{value:!0});rQ.InsertManyOperation=rQ.InsertOneOperation=rQ.InsertOperation=void 0;var NA=l(),ia=a(),na=t0(),sa=yZ(),aa=$0(),w3=O1();class PA extends aa.CommandOperation{constructor(F,A,B){super(void 0,B);this.options={...B,checkKeys:B.checkKeys??!1},this.ns=F,this.documents=A}get commandName(){return"insert"}async execute(F,A,B){let D=this.options??{},J=typeof D.ordered==="boolean"?D.ordered:!0,X={insert:this.ns.collection,documents:this.documents,ordered:J};if(typeof D.bypassDocumentValidation==="boolean")X.bypassDocumentValidation=D.bypassDocumentValidation;if(D.comment!==void 0)X.comment=D.comment;return await super.executeCommand(F,A,X,B)}}rQ.InsertOperation=PA;class vZ extends PA{constructor(F,A,B){super(F.s.namespace,ia.maybeAddIdToDocuments(F,[A],B),B)}async execute(F,A,B){let D=await super.execute(F,A,B);if(D.code)throw new NA.MongoServerError(D);if(D.writeErrors)throw new NA.MongoServerError(D.writeErrors[0]);return{acknowledged:this.writeConcern?.w!==0,insertedId:this.documents[0]._id}}}rQ.InsertOneOperation=vZ;class hZ extends w3.AbstractOperation{constructor(F,A,B){super(B);if(!Array.isArray(A))throw new NA.MongoInvalidArgumentError('Argument "docs" must be an array of documents');this.options=B,this.collection=F,this.docs=A}get commandName(){return"insert"}async execute(F,A,B){let D=this.collection,J={...this.options,...this.bsonOptions,readPreference:this.readPreference},X=na.WriteConcern.fromOptions(J),Z=new sa.BulkWriteOperation(D,this.docs.map((Y)=>({insertOne:{document:Y}})),J);try{let Y=await Z.execute(F,A,B);return{acknowledged:X?.w!==0,insertedCount:Y.insertedCount,insertedIds:Y.insertedIds}}catch(Y){if(Y&&Y.message==="Operation must be an object with an operation key")throw new NA.MongoInvalidArgumentError("Collection.insertMany() cannot be called with an array that has null/undefined values");throw Y}}}rQ.InsertManyOperation=hZ;w3.defineAspects(PA,[w3.Aspect.RETRYABLE,w3.Aspect.WRITE_OPERATION]);w3.defineAspects(vZ,[w3.Aspect.RETRYABLE,w3.Aspect.WRITE_OPERATION]);w3.defineAspects(hZ,[w3.Aspect.WRITE_OPERATION])});var iZ=K((oQ)=>{Object.defineProperty(oQ,"__esModule",{value:!0});oQ.ReplaceOneOperation=oQ.UpdateManyOperation=oQ.UpdateOneOperation=oQ.UpdateOperation=void 0;oQ.makeUpdateStatement=MA;var z6=l(),dZ=a(),oa=$0(),b0=O1();class s9 extends oa.CommandOperation{constructor(F,A,B){super(void 0,B);this.options=B,this.ns=F,this.statements=A}get commandName(){return"update"}get canRetryWrite(){if(super.canRetryWrite===!1)return!1;return this.statements.every((F)=>F.multi==null||F.multi===!1)}async execute(F,A,B){let D=this.options??{},J=typeof D.ordered==="boolean"?D.ordered:!0,X={update:this.ns.collection,updates:this.statements,ordered:J};if(typeof D.bypassDocumentValidation==="boolean")X.bypassDocumentValidation=D.bypassDocumentValidation;if(D.let)X.let=D.let;if(D.comment!==void 0)X.comment=D.comment;if(this.writeConcern&&this.writeConcern.w===0){if(this.statements.find(($)=>$.hint))throw new z6.MongoCompatibilityError("hint is not supported with unacknowledged writes")}return await super.executeCommand(F,A,X,B)}}oQ.UpdateOperation=s9;class cZ extends s9{constructor(F,A,B,D){super(F.s.namespace,[MA(A,B,{...D,multi:!1})],D);if(!dZ.hasAtomicOperators(B))throw new z6.MongoInvalidArgumentError("Update document requires atomic operators")}async execute(F,A,B){let D=await super.execute(F,A,B);if(this.explain!=null)return D;if(D.code)throw new z6.MongoServerError(D);if(D.writeErrors)throw new z6.MongoServerError(D.writeErrors[0]);return{acknowledged:this.writeConcern?.w!==0,modifiedCount:D.nModified??D.n,upsertedId:Array.isArray(D.upserted)&&D.upserted.length>0?D.upserted[0]._id:null,upsertedCount:Array.isArray(D.upserted)&&D.upserted.length?D.upserted.length:0,matchedCount:Array.isArray(D.upserted)&&D.upserted.length>0?0:D.n}}}oQ.UpdateOneOperation=cZ;class lZ extends s9{constructor(F,A,B,D){super(F.s.namespace,[MA(A,B,{...D,multi:!0})],D);if(!dZ.hasAtomicOperators(B))throw new z6.MongoInvalidArgumentError("Update document requires atomic operators")}async execute(F,A,B){let D=await super.execute(F,A,B);if(this.explain!=null)return D;if(D.code)throw new z6.MongoServerError(D);if(D.writeErrors)throw new z6.MongoServerError(D.writeErrors[0]);return{acknowledged:this.writeConcern?.w!==0,modifiedCount:D.nModified??D.n,upsertedId:Array.isArray(D.upserted)&&D.upserted.length>0?D.upserted[0]._id:null,upsertedCount:Array.isArray(D.upserted)&&D.upserted.length?D.upserted.length:0,matchedCount:Array.isArray(D.upserted)&&D.upserted.length>0?0:D.n}}}oQ.UpdateManyOperation=lZ;class pZ extends s9{constructor(F,A,B,D){super(F.s.namespace,[MA(A,B,{...D,multi:!1})],D);if(dZ.hasAtomicOperators(B))throw new z6.MongoInvalidArgumentError("Replacement document must not contain atomic operators")}async execute(F,A,B){let D=await super.execute(F,A,B);if(this.explain!=null)return D;if(D.code)throw new z6.MongoServerError(D);if(D.writeErrors)throw new z6.MongoServerError(D.writeErrors[0]);return{acknowledged:this.writeConcern?.w!==0,modifiedCount:D.nModified??D.n,upsertedId:Array.isArray(D.upserted)&&D.upserted.length>0?D.upserted[0]._id:null,upsertedCount:Array.isArray(D.upserted)&&D.upserted.length?D.upserted.length:0,matchedCount:Array.isArray(D.upserted)&&D.upserted.length>0?0:D.n}}}oQ.ReplaceOneOperation=pZ;function MA(F,A,B){if(F==null||typeof F!=="object")throw new z6.MongoInvalidArgumentError("Selector must be a valid JavaScript object");if(A==null||typeof A!=="object")throw new z6.MongoInvalidArgumentError("Document must be a valid JavaScript object");let D={q:F,u:A};if(typeof B.upsert==="boolean")D.upsert=B.upsert;if(B.multi)D.multi=B.multi;if(B.hint)D.hint=B.hint;if(B.arrayFilters)D.arrayFilters=B.arrayFilters;if(B.collation)D.collation=B.collation;return D}b0.defineAspects(s9,[b0.Aspect.RETRYABLE,b0.Aspect.WRITE_OPERATION,b0.Aspect.SKIP_COLLATION]);b0.defineAspects(cZ,[b0.Aspect.RETRYABLE,b0.Aspect.WRITE_OPERATION,b0.Aspect.EXPLAINABLE,b0.Aspect.SKIP_COLLATION]);b0.defineAspects(lZ,[b0.Aspect.WRITE_OPERATION,b0.Aspect.EXPLAINABLE,b0.Aspect.SKIP_COLLATION]);b0.defineAspects(pZ,[b0.Aspect.RETRYABLE,b0.Aspect.WRITE_OPERATION,b0.Aspect.SKIP_COLLATION])});var A5=K((ZL)=>{Object.defineProperty(ZL,"__esModule",{value:!0});ZL.BulkOperationBase=ZL.BulkWriteShimOperation=ZL.FindOperators=ZL.MongoBulkWriteError=ZL.WriteError=ZL.WriteConcernError=ZL.BulkWriteResult=ZL.Batch=ZL.BatchType=void 0;ZL.mergeBatchResults=nZ;var AL=I1(),T0=l(),e8=_Z(),BL=F2(),Dr=mZ(),Jr=O1(),t4=iZ(),F3=a(),FL=t0(),t8=Symbol("serverError");ZL.BatchType=Object.freeze({INSERT:1,UPDATE:2,DELETE:3});class DL{constructor(F,A){this.originalZeroIndex=A,this.currentIndex=0,this.originalIndexes=[],this.batchType=F,this.operations=[],this.size=0,this.sizeBytes=0}}ZL.Batch=DL;class I3{static generateIdMap(F){let A={};for(let B of F)A[B.index]=B._id;return A}constructor(F,A){this.result=F,this.insertedCount=this.result.nInserted??0,this.matchedCount=this.result.nMatched??0,this.modifiedCount=this.result.nModified??0,this.deletedCount=this.result.nRemoved??0,this.upsertedCount=this.result.upserted.length??0,this.upsertedIds=I3.generateIdMap(this.result.upserted),this.insertedIds=I3.generateIdMap(this.getSuccessfullyInsertedIds(F,A)),Object.defineProperty(this,"result",{value:this.result,enumerable:!1})}get ok(){return this.result.ok}getSuccessfullyInsertedIds(F,A){if(F.writeErrors.length===0)return F.insertedIds;if(A)return F.insertedIds.slice(0,F.writeErrors[0].index);return F.insertedIds.filter(({index:B})=>!F.writeErrors.some((D)=>B===D.index))}getUpsertedIdAt(F){return this.result.upserted[F]}getRawResponse(){return this.result}hasWriteErrors(){return this.result.writeErrors.length>0}getWriteErrorCount(){return this.result.writeErrors.length}getWriteErrorAt(F){return F<this.result.writeErrors.length?this.result.writeErrors[F]:void 0}getWriteErrors(){return this.result.writeErrors}getWriteConcernError(){if(this.result.writeConcernErrors.length===0)return;else if(this.result.writeConcernErrors.length===1)return this.result.writeConcernErrors[0];else{let F="";for(let A=0;A<this.result.writeConcernErrors.length;A++){let B=this.result.writeConcernErrors[A];if(F=F+B.errmsg,A===0)F=F+" and "}return new F5({errmsg:F,code:T0.MONGODB_ERROR_CODES.WriteConcernFailed})}}toString(){return`BulkWriteResult(${AL.EJSON.stringify(this.result)})`}isOk(){return this.result.ok===1}}ZL.BulkWriteResult=I3;class F5{constructor(F){this[t8]=F}get code(){return this[t8].code}get errmsg(){return this[t8].errmsg}get errInfo(){return this[t8].errInfo}toJSON(){return this[t8]}toString(){return`WriteConcernError(${this.errmsg})`}}ZL.WriteConcernError=F5;class TA{constructor(F){this.err=F}get code(){return this.err.code}get index(){return this.err.index}get errmsg(){return this.err.errmsg}get errInfo(){return this.err.errInfo}getOperation(){return this.err.op}toJSON(){return{code:this.err.code,index:this.err.index,errmsg:this.err.errmsg,op:this.err.op}}toString(){return`WriteError(${JSON.stringify(this.toJSON())})`}}ZL.WriteError=TA;function nZ(F,A,B,D){if(B)D=B;else if(D&&D.result)D=D.result;if(D==null)return;if(D.ok===0&&A.ok===1){A.ok=0;let X={index:0,code:D.code||0,errmsg:D.message,errInfo:D.errInfo,op:F.operations[0]};A.writeErrors.push(new TA(X));return}else if(D.ok===0&&A.ok===0)return;if(XL(F)&&D.n)A.nInserted=A.nInserted+D.n;if(aZ(F)&&D.n)A.nRemoved=A.nRemoved+D.n;let J=0;if(Array.isArray(D.upserted)){J=D.upserted.length;for(let X=0;X<D.upserted.length;X++)A.upserted.push({index:D.upserted[X].index+F.originalZeroIndex,_id:D.upserted[X]._id})}else if(D.upserted)J=1,A.upserted.push({index:F.originalZeroIndex,_id:D.upserted});if(sZ(F)&&D.n){let X=D.nModified;if(A.nUpserted=A.nUpserted+J,A.nMatched=A.nMatched+(D.n-J),typeof X==="number")A.nModified=A.nModified+X;else A.nModified=0}if(Array.isArray(D.writeErrors))for(let X=0;X<D.writeErrors.length;X++){let Z={index:F.originalIndexes[D.writeErrors[X].index],code:D.writeErrors[X].code,errmsg:D.writeErrors[X].errmsg,errInfo:D.writeErrors[X].errInfo,op:F.operations[D.writeErrors[X].index]};A.writeErrors.push(new TA(Z))}if(D.writeConcernError)A.writeConcernErrors.push(new F5(D.writeConcernError))}async function Xr(F,A){if(F.s.batches.length===0)return new I3(F.s.bulkResult,F.isOrdered);for(let D of F.s.batches){let J=F3.resolveOptions(F,{...A,ordered:F.isOrdered});if(J.bypassDocumentValidation!==!0)delete J.bypassDocumentValidation;if(F.s.bypassDocumentValidation===!0)J.bypassDocumentValidation=!0;if(F.s.checkKeys===!1)J.checkKeys=!1;if(J.retryWrites){if(sZ(D))J.retryWrites=J.retryWrites&&!D.operations.some((G)=>G.multi);if(aZ(D))J.retryWrites=J.retryWrites&&!D.operations.some((G)=>G.limit===0)}let X=XL(D)?new Dr.InsertOperation(F.s.namespace,D.operations,J):sZ(D)?new t4.UpdateOperation(F.s.namespace,D.operations,J):aZ(D)?new e8.DeleteOperation(F.s.namespace,D.operations,J):null;if(X==null)throw new T0.MongoRuntimeError(`Unknown batchType: ${D.batchType}`);let Z=null,Y;try{Y=await BL.executeOperation(F.s.collection.client,X,J.timeoutContext)}catch(G){Z=G}if(Z!=null)if(Z instanceof T0.MongoWriteConcernError){nZ(D,F.s.bulkResult,Z,Y);let G=new I3(F.s.bulkResult,F.isOrdered);throw new a9({message:Z.result.writeConcernError.errmsg,code:Z.result.writeConcernError.code},G)}else throw new a9(Z,new I3(F.s.bulkResult,F.isOrdered));nZ(D,F.s.bulkResult,Z,Y);let $=new I3(F.s.bulkResult,F.isOrdered);F.handleWriteError($)}F.s.batches.length=0;let B=new I3(F.s.bulkResult,F.isOrdered);return F.handleWriteError(B),B}class a9 extends T0.MongoServerError{constructor(F,A){super(F);if(this.writeErrors=[],F instanceof F5)this.err=F;else if(!(F instanceof Error))this.message=F.message,this.code=F.code,this.writeErrors=F.writeErrors??[];this.result=A,Object.assign(this,F)}get name(){return"MongoBulkWriteError"}get insertedCount(){return this.result.insertedCount}get matchedCount(){return this.result.matchedCount}get modifiedCount(){return this.result.modifiedCount}get deletedCount(){return this.result.deletedCount}get upsertedCount(){return this.result.upsertedCount}get insertedIds(){return this.result.insertedIds}get upsertedIds(){return this.result.upsertedIds}}ZL.MongoBulkWriteError=a9;class rZ{constructor(F){this.bulkOperation=F}update(F){let A=o8(this.bulkOperation);return this.bulkOperation.addToOperationsList(ZL.BatchType.UPDATE,t4.makeUpdateStatement(A.selector,F,{...A,multi:!0}))}updateOne(F){if(!F3.hasAtomicOperators(F))throw new T0.MongoInvalidArgumentError("Update document requires atomic operators");let A=o8(this.bulkOperation);return this.bulkOperation.addToOperationsList(ZL.BatchType.UPDATE,t4.makeUpdateStatement(A.selector,F,{...A,multi:!1}))}replaceOne(F){if(F3.hasAtomicOperators(F))throw new T0.MongoInvalidArgumentError("Replacement document must not use atomic operators");let A=o8(this.bulkOperation);return this.bulkOperation.addToOperationsList(ZL.BatchType.UPDATE,t4.makeUpdateStatement(A.selector,F,{...A,multi:!1}))}deleteOne(){let F=o8(this.bulkOperation);return this.bulkOperation.addToOperationsList(ZL.BatchType.DELETE,e8.makeDeleteStatement(F.selector,{...F,limit:1}))}delete(){let F=o8(this.bulkOperation);return this.bulkOperation.addToOperationsList(ZL.BatchType.DELETE,e8.makeDeleteStatement(F.selector,{...F,limit:0}))}upsert(){if(!this.bulkOperation.s.currentOp)this.bulkOperation.s.currentOp={};return this.bulkOperation.s.currentOp.upsert=!0,this}collation(F){if(!this.bulkOperation.s.currentOp)this.bulkOperation.s.currentOp={};return this.bulkOperation.s.currentOp.collation=F,this}arrayFilters(F){if(!this.bulkOperation.s.currentOp)this.bulkOperation.s.currentOp={};return this.bulkOperation.s.currentOp.arrayFilters=F,this}hint(F){if(!this.bulkOperation.s.currentOp)this.bulkOperation.s.currentOp={};return this.bulkOperation.s.currentOp.hint=F,this}}ZL.FindOperators=rZ;class tZ extends Jr.AbstractOperation{constructor(F,A){super(A);this.bulkOperation=F}get commandName(){return"bulkWrite"}async execute(F,A,B){if(this.options.session==null)this.options.session=A;return await Xr(this.bulkOperation,{...this.options,timeoutContext:B})}}ZL.BulkWriteShimOperation=tZ;class JL{constructor(F,A,B){this.collection=F,this.isOrdered=B;let D=F3.getTopology(F);A=A==null?{}:A;let J=F.s.namespace,X=!1,Z=void 0,Y=D.lastHello(),$=!!(D.s.options&&D.s.options.autoEncrypter),G=Y&&Y.maxBsonObjectSize?Y.maxBsonObjectSize:16777216,E=$?2097152:G,H=Y&&Y.maxWriteBatchSize?Y.maxWriteBatchSize:1000,q=(H-1).toString(10).length+2,W=Object.assign({},A);W=F3.applyRetryableWrites(W,F.s.db);let z={ok:1,writeErrors:[],writeConcernErrors:[],insertedIds:[],nInserted:0,nUpserted:0,nMatched:0,nModified:0,nRemoved:0,upserted:[]};if(this.s={bulkResult:z,currentBatch:void 0,currentIndex:0,currentBatchSize:0,currentBatchSizeBytes:0,currentInsertBatch:void 0,currentUpdateBatch:void 0,currentRemoveBatch:void 0,batches:[],writeConcern:FL.WriteConcern.fromOptions(A),maxBsonObjectSize:G,maxBatchSizeBytes:E,maxWriteBatchSize:H,maxKeySize:q,namespace:J,topology:D,options:W,bsonOptions:AL.resolveBSONOptions(A),currentOp:Z,executed:X,collection:F,err:void 0,checkKeys:typeof A.checkKeys==="boolean"?A.checkKeys:!1},A.bypassDocumentValidation===!0)this.s.bypassDocumentValidation=!0}insert(F){return F3.maybeAddIdToDocuments(this.collection,F,{forceServerObjectId:this.shouldForceServerObjectId()}),this.addToOperationsList(ZL.BatchType.INSERT,F)}find(F){if(!F)throw new T0.MongoInvalidArgumentError("Bulk find operation must specify a selector");return this.s.currentOp={selector:F},new rZ(this)}raw(F){if(F==null||typeof F!=="object")throw new T0.MongoInvalidArgumentError("Operation must be an object with an operation key");if("insertOne"in F){let A=this.shouldForceServerObjectId(),B=F.insertOne&&F.insertOne.document==null?F.insertOne:F.insertOne.document;return F3.maybeAddIdToDocuments(this.collection,B,{forceServerObjectId:A}),this.addToOperationsList(ZL.BatchType.INSERT,B)}if("replaceOne"in F||"updateOne"in F||"updateMany"in F){if("replaceOne"in F){if("q"in F.replaceOne)throw new T0.MongoInvalidArgumentError("Raw operations are not allowed");let A=t4.makeUpdateStatement(F.replaceOne.filter,F.replaceOne.replacement,{...F.replaceOne,multi:!1});if(F3.hasAtomicOperators(A.u))throw new T0.MongoInvalidArgumentError("Replacement document must not use atomic operators");return this.addToOperationsList(ZL.BatchType.UPDATE,A)}if("updateOne"in F){if("q"in F.updateOne)throw new T0.MongoInvalidArgumentError("Raw operations are not allowed");let A=t4.makeUpdateStatement(F.updateOne.filter,F.updateOne.update,{...F.updateOne,multi:!1});if(!F3.hasAtomicOperators(A.u))throw new T0.MongoInvalidArgumentError("Update document requires atomic operators");return this.addToOperationsList(ZL.BatchType.UPDATE,A)}if("updateMany"in F){if("q"in F.updateMany)throw new T0.MongoInvalidArgumentError("Raw operations are not allowed");let A=t4.makeUpdateStatement(F.updateMany.filter,F.updateMany.update,{...F.updateMany,multi:!0});if(!F3.hasAtomicOperators(A.u))throw new T0.MongoInvalidArgumentError("Update document requires atomic operators");return this.addToOperationsList(ZL.BatchType.UPDATE,A)}}if("deleteOne"in F){if("q"in F.deleteOne)throw new T0.MongoInvalidArgumentError("Raw operations are not allowed");return this.addToOperationsList(ZL.BatchType.DELETE,e8.makeDeleteStatement(F.deleteOne.filter,{...F.deleteOne,limit:1}))}if("deleteMany"in F){if("q"in F.deleteMany)throw new T0.MongoInvalidArgumentError("Raw operations are not allowed");return this.addToOperationsList(ZL.BatchType.DELETE,e8.makeDeleteStatement(F.deleteMany.filter,{...F.deleteMany,limit:0}))}throw new T0.MongoInvalidArgumentError("bulkWrite only supports insertOne, updateOne, updateMany, deleteOne, deleteMany")}get length(){return this.s.currentIndex}get bsonOptions(){return this.s.bsonOptions}get writeConcern(){return this.s.writeConcern}get batches(){let F=[...this.s.batches];if(this.isOrdered){if(this.s.currentBatch)F.push(this.s.currentBatch)}else{if(this.s.currentInsertBatch)F.push(this.s.currentInsertBatch);if(this.s.currentUpdateBatch)F.push(this.s.currentUpdateBatch);if(this.s.currentRemoveBatch)F.push(this.s.currentRemoveBatch)}return F}async execute(F={}){if(this.s.executed)throw new T0.MongoBatchReExecutionError;let A=FL.WriteConcern.fromOptions(F);if(A)this.s.writeConcern=A;if(this.isOrdered){if(this.s.currentBatch)this.s.batches.push(this.s.currentBatch)}else{if(this.s.currentInsertBatch)this.s.batches.push(this.s.currentInsertBatch);if(this.s.currentUpdateBatch)this.s.batches.push(this.s.currentUpdateBatch);if(this.s.currentRemoveBatch)this.s.batches.push(this.s.currentRemoveBatch)}if(this.s.batches.length===0)throw new T0.MongoInvalidArgumentError("Invalid BulkOperation, Batch cannot be empty");this.s.executed=!0;let B={...this.s.options,...F},D=new tZ(this,B);return await BL.executeOperation(this.s.collection.client,D,B.timeoutContext)}handleWriteError(F){if(this.s.bulkResult.writeErrors.length>0){let B=this.s.bulkResult.writeErrors[0].errmsg?this.s.bulkResult.writeErrors[0].errmsg:"write operation failed";throw new a9({message:B,code:this.s.bulkResult.writeErrors[0].code,writeErrors:this.s.bulkResult.writeErrors},F)}let A=F.getWriteConcernError();if(A)throw new a9(A,F)}shouldForceServerObjectId(){return this.s.options.forceServerObjectId===!0||this.s.collection.s.db.options?.forceServerObjectId===!0}}ZL.BulkOperationBase=JL;function XL(F){return F.batchType===ZL.BatchType.INSERT}function sZ(F){return F.batchType===ZL.BatchType.UPDATE}function aZ(F){return F.batchType===ZL.BatchType.DELETE}function o8(F){let{currentOp:A}=F.s;if(F.s.currentOp=void 0,!A)A={};return A}});var oZ=K((EL)=>{Object.defineProperty(EL,"__esModule",{value:!0});EL.OrderedBulkOperation=void 0;var zr=I1(),$L=l(),jA=A5();class GL extends jA.BulkOperationBase{constructor(F,A){super(F,A,!0)}addToOperationsList(F,A){let B=zr.calculateObjectSize(A,{checkKeys:!1,ignoreUndefined:!1});if(B>=this.s.maxBsonObjectSize)throw new $L.MongoInvalidArgumentError(`Document is larger than the maximum size ${this.s.maxBsonObjectSize}`);if(this.s.currentBatch==null)this.s.currentBatch=new jA.Batch(F,this.s.currentIndex);let D=this.s.maxKeySize;if(this.s.currentBatchSize+1>=this.s.maxWriteBatchSize||this.s.currentBatchSize>0&&this.s.currentBatchSizeBytes+D+B>=this.s.maxBatchSizeBytes||this.s.currentBatch.batchType!==F)this.s.batches.push(this.s.currentBatch),this.s.currentBatch=new jA.Batch(F,this.s.currentIndex),this.s.currentBatchSize=0,this.s.currentBatchSizeBytes=0;if(F===jA.BatchType.INSERT)this.s.bulkResult.insertedIds.push({index:this.s.currentIndex,_id:A._id});if(Array.isArray(A))throw new $L.MongoInvalidArgumentError("Operation passed in cannot be an Array");return this.s.currentBatch.originalIndexes.push(this.s.currentIndex),this.s.currentBatch.operations.push(A),this.s.currentBatchSize+=1,this.s.currentBatchSizeBytes+=D+B,this.s.currentIndex+=1,this}}EL.OrderedBulkOperation=GL});var eZ=K((zL)=>{Object.defineProperty(zL,"__esModule",{value:!0});zL.UnorderedBulkOperation=void 0;var Cr=I1(),qL=l(),N3=A5();class WL extends N3.BulkOperationBase{constructor(F,A){super(F,A,!1)}handleWriteError(F){if(this.s.batches.length)return;return super.handleWriteError(F)}addToOperationsList(F,A){let B=Cr.calculateObjectSize(A,{checkKeys:!1,ignoreUndefined:!1});if(B>=this.s.maxBsonObjectSize)throw new qL.MongoInvalidArgumentError(`Document is larger than the maximum size ${this.s.maxBsonObjectSize}`);if(this.s.currentBatch=void 0,F===N3.BatchType.INSERT)this.s.currentBatch=this.s.currentInsertBatch;else if(F===N3.BatchType.UPDATE)this.s.currentBatch=this.s.currentUpdateBatch;else if(F===N3.BatchType.DELETE)this.s.currentBatch=this.s.currentRemoveBatch;let D=this.s.maxKeySize;if(this.s.currentBatch==null)this.s.currentBatch=new N3.Batch(F,this.s.currentIndex);if(this.s.currentBatch.size+1>=this.s.maxWriteBatchSize||this.s.currentBatch.size>0&&this.s.currentBatch.sizeBytes+D+B>=this.s.maxBatchSizeBytes||this.s.currentBatch.batchType!==F)this.s.batches.push(this.s.currentBatch),this.s.currentBatch=new N3.Batch(F,this.s.currentIndex);if(Array.isArray(A))throw new qL.MongoInvalidArgumentError("Operation passed in cannot be an Array");if(this.s.currentBatch.operations.push(A),this.s.currentBatch.originalIndexes.push(this.s.currentIndex),this.s.currentIndex=this.s.currentIndex+1,F===N3.BatchType.INSERT)this.s.currentInsertBatch=this.s.currentBatch,this.s.bulkResult.insertedIds.push({index:this.s.bulkResult.insertedIds.length,_id:A._id});else if(F===N3.BatchType.UPDATE)this.s.currentUpdateBatch=this.s.currentBatch;else if(F===N3.BatchType.DELETE)this.s.currentRemoveBatch=this.s.currentBatch;return this.s.currentBatch.size+=1,this.s.currentBatch.sizeBytes+=D+B,this}}zL.UnorderedBulkOperation=WL});var AY=K((QL)=>{Object.defineProperty(QL,"__esModule",{value:!0});QL.AggregateOperation=QL.DB_AGGREGATE_COLLECTION=void 0;var KL=_6(),UL=l(),Kr=a(),Ur=t0(),Qr=$0(),B5=O1();QL.DB_AGGREGATE_COLLECTION=1;var Lr=8;class FY extends Qr.CommandOperation{constructor(F,A,B){super(void 0,{...B,dbName:F.db});if(this.options={...B},this.target=F.collection||QL.DB_AGGREGATE_COLLECTION,this.pipeline=A,this.hasWriteStage=!1,typeof B?.out==="string")this.pipeline=this.pipeline.concat({$out:B.out}),this.hasWriteStage=!0;else if(A.length>0){let D=A[A.length-1];if(D.$out||D.$merge)this.hasWriteStage=!0}if(this.hasWriteStage)this.trySecondaryWrite=!0;else delete this.options.writeConcern;if(this.explain&&this.writeConcern)throw new UL.MongoInvalidArgumentError('Option "explain" cannot be used on an aggregate call with writeConcern');if(B?.cursor!=null&&typeof B.cursor!=="object")throw new UL.MongoInvalidArgumentError("Cursor options must be an object")}get commandName(){return"aggregate"}get canRetryRead(){return!this.hasWriteStage}addToPipeline(F){this.pipeline.push(F)}async execute(F,A,B){let D=this.options,J=Kr.maxWireVersion(F),X={aggregate:this.target,pipeline:this.pipeline};if(this.hasWriteStage&&J<Lr)this.readConcern=void 0;if(this.hasWriteStage&&this.writeConcern)Ur.WriteConcern.apply(X,this.writeConcern);if(D.bypassDocumentValidation===!0)X.bypassDocumentValidation=D.bypassDocumentValidation;if(typeof D.allowDiskUse==="boolean")X.allowDiskUse=D.allowDiskUse;if(D.hint)X.hint=D.hint;if(D.let)X.let=D.let;if(D.comment!==void 0)X.comment=D.comment;if(X.cursor=D.cursor||{},D.batchSize&&!this.hasWriteStage)X.cursor.batchSize=D.batchSize;return await super.executeCommand(F,A,X,B,this.explain?KL.ExplainedCursorResponse:KL.CursorResponse)}}QL.AggregateOperation=FY;B5.defineAspects(FY,[B5.Aspect.READ_OPERATION,B5.Aspect.RETRYABLE,B5.Aspect.EXPLAINABLE,B5.Aspect.CURSOR_CREATING])});var D5=K((NL)=>{Object.defineProperty(NL,"__esModule",{value:!0});NL.AggregationCursor=void 0;var BY=l(),DY=o4(),RL=AY(),wL=F2(),Vr=a(),IL=B2();class JY extends DY.ExplainableCursor{constructor(F,A,B=[],D={}){super(F,A,D);this.pipeline=B,this.aggregateOptions=D;let J=this.pipeline[this.pipeline.length-1];if(this.cursorOptions.timeoutMS!=null&&this.cursorOptions.timeoutMode===IL.CursorTimeoutMode.ITERATION&&(J?.$merge!=null||J?.$out!=null))throw new BY.MongoAPIError("Cannot use $out or $merge stage with ITERATION timeoutMode")}clone(){let F=Vr.mergeOptions({},this.aggregateOptions);return delete F.session,new JY(this.client,this.namespace,this.pipeline,{...F})}map(F){return super.map(F)}async _initialize(F){let A={...this.aggregateOptions,...this.cursorOptions,session:F};if(A.explain)try{DY.validateExplainTimeoutOptions(A,DY.Explain.fromOptions(A))}catch{throw new BY.MongoAPIError("timeoutMS cannot be used with explain when explain is specified in aggregateOptions")}let B=new RL.AggregateOperation(this.namespace,this.pipeline,A),D=await wL.executeOperation(this.client,B,this.timeoutContext);return{server:B.server,session:F,response:D}}async explain(F,A){let{explain:B,timeout:D}=this.resolveExplainTimeoutOptions(F,A);return(await wL.executeOperation(this.client,new RL.AggregateOperation(this.namespace,this.pipeline,{...this.aggregateOptions,...this.cursorOptions,...D,explain:B??!0}))).shift(this.deserializationOptions)}addStage(F){if(this.throwIfInitialized(),this.cursorOptions.timeoutMS!=null&&this.cursorOptions.timeoutMode===IL.CursorTimeoutMode.ITERATION&&(F.$out!=null||F.$merge!=null))throw new BY.MongoAPIError("Cannot use $out or $merge stage with ITERATION timeoutMode");return this.pipeline.push(F),this}group(F){return this.addStage({$group:F})}limit(F){return this.addStage({$limit:F})}match(F){return this.addStage({$match:F})}out(F){return this.addStage({$out:F})}project(F){return this.addStage({$project:F})}lookup(F){return this.addStage({$lookup:F})}redact(F){return this.addStage({$redact:F})}skip(F){return this.addStage({$skip:F})}sort(F){return this.addStage({$sort:F})}unwind(F){return this.addStage({$unwind:F})}geoNear(F){return this.addStage({$geoNear:F})}}NL.AggregationCursor=JY});var YY=K((ML)=>{Object.defineProperty(ML,"__esModule",{value:!0});ML.CountOperation=void 0;var Rr=$0(),XY=O1();class ZY extends Rr.CommandOperation{constructor(F,A,B){super({s:{namespace:F}},B);this.options=B,this.collectionName=F.collection,this.query=A}get commandName(){return"count"}async execute(F,A,B){let D=this.options,J={count:this.collectionName,query:this.query};if(typeof D.limit==="number")J.limit=D.limit;if(typeof D.skip==="number")J.skip=D.skip;if(D.hint!=null)J.hint=D.hint;if(typeof D.maxTimeMS==="number")J.maxTimeMS=D.maxTimeMS;let X=await super.executeCommand(F,A,J,B);return X?X.n:0}}ML.CountOperation=ZY;XY.defineAspects(ZY,[XY.Aspect.READ_OPERATION,XY.Aspect.RETRYABLE])});var kA=K((kL)=>{Object.defineProperty(kL,"__esModule",{value:!0});kL.formatSort=Sr;var jL=l();function r9(F=1){let A=`${F}`.toLowerCase();if(wr(F))return F;switch(A){case"ascending":case"asc":case"1":return 1;case"descending":case"desc":case"-1":return-1;default:throw new jL.MongoInvalidArgumentError(`Invalid sort direction: ${JSON.stringify(F)}`)}}function wr(F){return typeof F==="object"&&F!=null&&"$meta"in F&&typeof F.$meta==="string"}function Ir(F){if(Array.isArray(F)&&F.length===2)try{return r9(F[1]),!0}catch{return!1}return!1}function Nr(F){return Array.isArray(F)&&Array.isArray(F[0])}function Pr(F){return F instanceof Map&&F.size>0}function Mr(F){return new Map([[`${F[0]}`,r9([F[1]])]])}function Tr(F){let A=F.map(([B,D])=>[`${B}`,r9(D)]);return new Map(A)}function jr(F){let A=F.map((B)=>[`${B}`,1]);return new Map(A)}function kr(F){let A=Object.entries(F).map(([B,D])=>[`${B}`,r9(D)]);return new Map(A)}function Or(F){let A=Array.from(F).map(([B,D])=>[`${B}`,r9(D)]);return new Map(A)}function Sr(F,A){if(F==null)return;if(typeof F==="string")return new Map([[F,r9(A)]]);if(typeof F!=="object")throw new jL.MongoInvalidArgumentError(`Invalid sort format: ${JSON.stringify(F)} Sort must be a valid object`);if(!Array.isArray(F))return Pr(F)?Or(F):Object.keys(F).length?kr(F):void 0;if(!F.length)return;if(Nr(F))return Tr(F);if(Ir(F))return Mr(F);return jr(F)}});var fL=K((uL)=>{Object.defineProperty(uL,"__esModule",{value:!0});uL.FindOperation=void 0;var OL=_6(),xr=l(),SL=o4(),fr=q6(),_r=kA(),gr=a(),br=$0(),J5=O1();class $Y extends br.CommandOperation{constructor(F,A={},B={}){super(void 0,B);if(this.options={...B},delete this.options.writeConcern,this.ns=F,typeof A!=="object"||Array.isArray(A))throw new xr.MongoInvalidArgumentError("Query filter must be a plain object or ObjectId");this.filter=A!=null&&A._bsontype==="ObjectId"?{_id:A}:A}get commandName(){return"find"}async execute(F,A,B){this.server=F;let D=this.options,J=yr(this.ns,this.filter,D);if(this.explain)SL.validateExplainTimeoutOptions(this.options,this.explain),J=SL.decorateWithExplain(J,this.explain);return await F.command(this.ns,J,{...this.options,...this.bsonOptions,documentsReturnedIn:"firstBatch",session:A,timeoutContext:B},this.explain?OL.ExplainedCursorResponse:OL.CursorResponse)}}uL.FindOperation=$Y;function yr(F,A,B){let D={find:F.collection,filter:A};if(B.sort)D.sort=_r.formatSort(B.sort);if(B.projection){let X=B.projection;if(X&&Array.isArray(X))X=X.length?X.reduce((Z,Y)=>{return Z[Y]=1,Z},{}):{_id:1};D.projection=X}if(B.hint)D.hint=gr.normalizeHintField(B.hint);if(typeof B.skip==="number")D.skip=B.skip;if(typeof B.limit==="number")if(B.limit<0)D.limit=-B.limit,D.singleBatch=!0;else D.limit=B.limit;if(typeof B.batchSize==="number")if(B.batchSize<0){if(B.limit&&B.limit!==0&&Math.abs(B.batchSize)<Math.abs(B.limit))D.limit=-B.batchSize;D.singleBatch=!0}else D.batchSize=B.batchSize;if(typeof B.singleBatch==="boolean")D.singleBatch=B.singleBatch;if(B.comment!==void 0)D.comment=B.comment;if(typeof B.maxTimeMS==="number")D.maxTimeMS=B.maxTimeMS;let J=fr.ReadConcern.fromOptions(B);if(J)D.readConcern=J.toJSON();if(B.max)D.max=B.max;if(B.min)D.min=B.min;if(typeof B.returnKey==="boolean")D.returnKey=B.returnKey;if(typeof B.showRecordId==="boolean")D.showRecordId=B.showRecordId;if(typeof B.tailable==="boolean")D.tailable=B.tailable;if(typeof B.oplogReplay==="boolean")D.oplogReplay=B.oplogReplay;if(typeof B.timeout==="boolean")D.noCursorTimeout=!B.timeout;else if(typeof B.noCursorTimeout==="boolean")D.noCursorTimeout=B.noCursorTimeout;if(typeof B.awaitData==="boolean")D.awaitData=B.awaitData;if(typeof B.allowPartialResults==="boolean")D.allowPartialResults=B.allowPartialResults;if(B.collation)D.collation=B.collation;if(typeof B.allowDiskUse==="boolean")D.allowDiskUse=B.allowDiskUse;if(B.let)D.let=B.let;return D}J5.defineAspects($Y,[J5.Aspect.READ_OPERATION,J5.Aspect.RETRYABLE,J5.Aspect.EXPLAINABLE,J5.Aspect.CURSOR_CREATING])});var zY=K((gL)=>{Object.defineProperty(gL,"__esModule",{value:!0});gL.FindCursor=gL.FLAGS=void 0;var vr=_6(),C6=l(),GY=o4(),hr=YY(),EY=F2(),_L=fL(),HY=kA(),qY=a();gL.FLAGS=["tailable","oplogReplay","noCursorTimeout","awaitData","exhaust","partial"];class WY extends GY.ExplainableCursor{constructor(F,A,B={},D={}){super(F,A,D);if(this.numReturned=0,this.cursorFilter=B,this.findOptions=D,D.sort!=null)this.findOptions.sort=HY.formatSort(D.sort)}clone(){let F=qY.mergeOptions({},this.findOptions);return delete F.session,new WY(this.client,this.namespace,this.cursorFilter,{...F})}map(F){return super.map(F)}async _initialize(F){let A={...this.findOptions,...this.cursorOptions,session:F};if(A.explain)try{GY.validateExplainTimeoutOptions(A,GY.Explain.fromOptions(A))}catch{throw new C6.MongoAPIError("timeoutMS cannot be used with explain when explain is specified in findOptions")}let B=new _L.FindOperation(this.namespace,this.cursorFilter,A),D=await EY.executeOperation(this.client,B,this.timeoutContext);return this.numReturned=D.batchSize,{server:B.server,session:F,response:D}}async getMore(F){let A=this.numReturned;if(A){let D=this.findOptions.limit;if(F=D&&D>0&&A+F>D?D-A:F,F<=0){try{await this.close()}catch(J){qY.squashError(J)}return vr.CursorResponse.emptyGetMore}}let B=await super.getMore(F);return this.numReturned=this.numReturned+B.batchSize,B}async count(F){if(qY.emitWarningOnce("cursor.count is deprecated and will be removed in the next major version, please use `collection.estimatedDocumentCount` or `collection.countDocuments` instead "),typeof F==="boolean")throw new C6.MongoInvalidArgumentError("Invalid first parameter to count");return await EY.executeOperation(this.client,new hr.CountOperation(this.namespace,this.cursorFilter,{...this.findOptions,...this.cursorOptions,...F}))}async explain(F,A){let{explain:B,timeout:D}=this.resolveExplainTimeoutOptions(F,A);return(await EY.executeOperation(this.client,new _L.FindOperation(this.namespace,this.cursorFilter,{...this.findOptions,...this.cursorOptions,...D,explain:B??!0}))).shift(this.deserializationOptions)}filter(F){return this.throwIfInitialized(),this.cursorFilter=F,this}hint(F){return this.throwIfInitialized(),this.findOptions.hint=F,this}min(F){return this.throwIfInitialized(),this.findOptions.min=F,this}max(F){return this.throwIfInitialized(),this.findOptions.max=F,this}returnKey(F){return this.throwIfInitialized(),this.findOptions.returnKey=F,this}showRecordId(F){return this.throwIfInitialized(),this.findOptions.showRecordId=F,this}addQueryModifier(F,A){if(this.throwIfInitialized(),F[0]!=="$")throw new C6.MongoInvalidArgumentError(`${F} is not a valid query modifier`);switch(F.substr(1)){case"comment":this.findOptions.comment=A;break;case"explain":this.findOptions.explain=A;break;case"hint":this.findOptions.hint=A;break;case"max":this.findOptions.max=A;break;case"maxTimeMS":this.findOptions.maxTimeMS=A;break;case"min":this.findOptions.min=A;break;case"orderby":this.findOptions.sort=HY.formatSort(A);break;case"query":this.cursorFilter=A;break;case"returnKey":this.findOptions.returnKey=A;break;case"showDiskLoc":this.findOptions.showRecordId=A;break;default:throw new C6.MongoInvalidArgumentError(`Invalid query modifier: ${F}`)}return this}comment(F){return this.throwIfInitialized(),this.findOptions.comment=F,this}maxAwaitTimeMS(F){if(this.throwIfInitialized(),typeof F!=="number")throw new C6.MongoInvalidArgumentError("Argument for maxAwaitTimeMS must be a number");return this.findOptions.maxAwaitTimeMS=F,this}maxTimeMS(F){if(this.throwIfInitialized(),typeof F!=="number")throw new C6.MongoInvalidArgumentError("Argument for maxTimeMS must be a number");return this.findOptions.maxTimeMS=F,this}project(F){return this.throwIfInitialized(),this.findOptions.projection=F,this}sort(F,A){if(this.throwIfInitialized(),this.findOptions.tailable)throw new C6.MongoTailableCursorError("Tailable cursor does not support sorting");return this.findOptions.sort=HY.formatSort(F,A),this}allowDiskUse(F=!0){if(this.throwIfInitialized(),!this.findOptions.sort)throw new C6.MongoInvalidArgumentError('Option "allowDiskUse" requires a sort specification');if(!F)return this.findOptions.allowDiskUse=!1,this;return this.findOptions.allowDiskUse=!0,this}collation(F){return this.throwIfInitialized(),this.findOptions.collation=F,this}limit(F){if(this.throwIfInitialized(),this.findOptions.tailable)throw new C6.MongoTailableCursorError("Tailable cursor does not support limit");if(typeof F!=="number")throw new C6.MongoInvalidArgumentError('Operation "limit" requires an integer');return this.findOptions.limit=F,this}skip(F){if(this.throwIfInitialized(),this.findOptions.tailable)throw new C6.MongoTailableCursorError("Tailable cursor does not support skip");if(typeof F!=="number")throw new C6.MongoInvalidArgumentError('Operation "skip" requires an integer');return this.findOptions.skip=F,this}}gL.FindCursor=WY});var Z5=K((yL)=>{Object.defineProperty(yL,"__esModule",{value:!0});yL.ListIndexesOperation=yL.DropIndexOperation=yL.CreateIndexesOperation=void 0;var dr=_6(),cr=l(),CY=a(),KY=$0(),J4=O1(),lr=new Set(["background","unique","name","partialFilterExpression","sparse","hidden","expireAfterSeconds","storageEngine","collation","version","weights","default_language","language_override","textIndexVersion","2dsphereIndexVersion","bits","min","max","bucketSize","wildcardProjection"]);function pr(F){return typeof F==="number"||F==="2d"||F==="2dsphere"||F==="text"||F==="geoHaystack"}function ir(F){return Array.isArray(F)&&F.length===2&&pr(F[1])}function nr(F){let A=new Map,B=!Array.isArray(F)||ir(F)?[F]:F;for(let D of B)if(typeof D==="string")A.set(D,1);else if(Array.isArray(D))A.set(D[0],D[1]??1);else if(D instanceof Map)for(let[J,X]of D)A.set(J,X);else if(CY.isObject(D))for(let[J,X]of Object.entries(D))A.set(J,X);return A}function sr(F){let A=Object.entries(F).filter(([B])=>lr.has(B));return Object.fromEntries(A.map(([B,D])=>B==="version"?["v",D]:[B,D]))}class X5 extends KY.CommandOperation{constructor(F,A,B,D){super(F,D);this.options=D??{},this.collectionName=A,this.indexes=B.map((J)=>{let X=J.key instanceof Map?J.key:new Map(Object.entries(J.key)),Z=J.name??Array.from(X).flat().join("_");return{...sr(J),name:Z,key:X}})}static fromIndexDescriptionArray(F,A,B,D){return new X5(F,A,B,D)}static fromIndexSpecification(F,A,B,D={}){let J=nr(B),X={...D,key:J};return new X5(F,A,[X],D)}get commandName(){return"createIndexes"}async execute(F,A,B){let D=this.options,J=this.indexes,X=CY.maxWireVersion(F),Z={createIndexes:this.collectionName,indexes:J};if(D.commitQuorum!=null){if(X<9)throw new cr.MongoCompatibilityError("Option `commitQuorum` for `createIndexes` not supported on servers < 4.4");Z.commitQuorum=D.commitQuorum}return this.options.collation=void 0,await super.executeCommand(F,A,Z,B),J.map(($)=>$.name||"")}}yL.CreateIndexesOperation=X5;class UY extends KY.CommandOperation{constructor(F,A,B){super(F,B);this.options=B??{},this.collection=F,this.indexName=A}get commandName(){return"dropIndexes"}async execute(F,A,B){let D={dropIndexes:this.collection.collectionName,index:this.indexName};return await super.executeCommand(F,A,D,B)}}yL.DropIndexOperation=UY;class QY extends KY.CommandOperation{constructor(F,A){super(F,A);this.options={...A},delete this.options.writeConcern,this.collectionNamespace=F.s.namespace}get commandName(){return"listIndexes"}async execute(F,A,B){let D=CY.maxWireVersion(F),J=this.options.batchSize?{batchSize:this.options.batchSize}:{},X={listIndexes:this.collectionNamespace.collection,cursor:J};if(D>=9&&this.options.comment!==void 0)X.comment=this.options.comment;return await super.executeCommand(F,A,X,B,dr.CursorResponse)}}yL.ListIndexesOperation=QY;J4.defineAspects(QY,[J4.Aspect.READ_OPERATION,J4.Aspect.RETRYABLE,J4.Aspect.CURSOR_CREATING]);J4.defineAspects(X5,[J4.Aspect.WRITE_OPERATION]);J4.defineAspects(UY,[J4.Aspect.WRITE_OPERATION])});var VY=K((hL)=>{Object.defineProperty(hL,"__esModule",{value:!0});hL.ListIndexesCursor=void 0;var tr=F2(),or=Z5(),er=B2();class LY extends er.AbstractCursor{constructor(F,A){super(F.client,F.s.namespace,A);this.parent=F,this.options=A}clone(){return new LY(this.parent,{...this.options,...this.cursorOptions})}async _initialize(F){let A=new or.ListIndexesOperation(this.parent,{...this.cursorOptions,...this.options,session:F}),B=await tr.executeOperation(this.parent.client,A,this.timeoutContext);return{server:A.server,session:F,response:B}}}hL.ListIndexesCursor=LY});var pL=K((cL)=>{Object.defineProperty(cL,"__esModule",{value:!0});cL.ListSearchIndexesCursor=void 0;var Ft=D5();class dL extends Ft.AggregationCursor{constructor({fullNamespace:F,client:A},B,D={}){let J=B==null?[{$listSearchIndexes:{}}]:[{$listSearchIndexes:{name:B}}];super(A,F,J,D)}}cL.ListSearchIndexesCursor=dL});var aL=K((nL)=>{Object.defineProperty(nL,"__esModule",{value:!0});nL.DistinctOperation=void 0;var iL=a(),At=$0(),OA=O1();class RY extends At.CommandOperation{constructor(F,A,B,D){super(F,D);this.options=D??{},this.collection=F,this.key=A,this.query=B}get commandName(){return"distinct"}async execute(F,A,B){let D=this.collection,J=this.key,X=this.query,Z=this.options,Y={distinct:D.collectionName,key:J,query:X};if(typeof Z.maxTimeMS==="number")Y.maxTimeMS=Z.maxTimeMS;if(typeof Z.comment!=="undefined")Y.comment=Z.comment;iL.decorateWithReadConcern(Y,D,Z),iL.decorateWithCollation(Y,D,Z);let $=await super.executeCommand(F,A,Y,B);return this.explain?$:$.values}}nL.DistinctOperation=RY;OA.defineAspects(RY,[OA.Aspect.READ_OPERATION,OA.Aspect.RETRYABLE,OA.Aspect.EXPLAINABLE])});var IY=K((oL)=>{Object.defineProperty(oL,"__esModule",{value:!0});oL.DropDatabaseOperation=oL.DropCollectionOperation=void 0;var rL=l(),tL=$0(),SA=O1();class uA extends tL.CommandOperation{constructor(F,A,B={}){super(F,B);this.db=F,this.options=B,this.name=A}get commandName(){return"drop"}async execute(F,A,B){let D=this.db,J=this.options,X=this.name,Z=D.client.s.options.autoEncryption?.encryptedFieldsMap,Y=J.encryptedFields??Z?.[`${D.databaseName}.${X}`];if(!Y&&Z)Y=(await D.listCollections({name:X},{nameOnly:!1}).toArray())?.[0]?.options?.encryptedFields;if(Y){let $=Y.escCollection||`enxcol_.${X}.esc`,G=Y.ecocCollection||`enxcol_.${X}.ecoc`;for(let E of[$,G]){let H=new uA(D,E);try{await H.executeWithoutEncryptedFieldsCheck(F,A,B)}catch(q){if(!(q instanceof rL.MongoServerError)||q.code!==rL.MONGODB_ERROR_CODES.NamespaceNotFound)throw q}}}return await this.executeWithoutEncryptedFieldsCheck(F,A,B)}async executeWithoutEncryptedFieldsCheck(F,A,B){return await super.executeCommand(F,A,{drop:this.name},B),!0}}oL.DropCollectionOperation=uA;class wY extends tL.CommandOperation{constructor(F,A){super(F,A);this.options=A}get commandName(){return"dropDatabase"}async execute(F,A,B){return await super.executeCommand(F,A,{dropDatabase:1},B),!0}}oL.DropDatabaseOperation=wY;SA.defineAspects(uA,[SA.Aspect.WRITE_OPERATION]);SA.defineAspects(wY,[SA.Aspect.WRITE_OPERATION])});var BV=K((FV)=>{Object.defineProperty(FV,"__esModule",{value:!0});FV.EstimatedDocumentCountOperation=void 0;var Dt=$0(),xA=O1();class NY extends Dt.CommandOperation{constructor(F,A={}){super(F,A);this.options=A,this.collectionName=F.collectionName}get commandName(){return"count"}async execute(F,A,B){let D={count:this.collectionName};if(typeof this.options.maxTimeMS==="number")D.maxTimeMS=this.options.maxTimeMS;if(this.options.comment!==void 0)D.comment=this.options.comment;return(await super.executeCommand(F,A,D,B))?.n||0}}FV.EstimatedDocumentCountOperation=NY;xA.defineAspects(NY,[xA.Aspect.READ_OPERATION,xA.Aspect.RETRYABLE,xA.Aspect.CURSOR_CREATING])});var PY=K((YV)=>{Object.defineProperty(YV,"__esModule",{value:!0});YV.FindOneAndUpdateOperation=YV.FindOneAndReplaceOperation=YV.FindOneAndDeleteOperation=YV.FindAndModifyOperation=YV.ReturnDocument=void 0;var X4=l(),Jt=k0(),Xt=kA(),_A=a(),Zt=$0(),fA=O1();YV.ReturnDocument=Object.freeze({BEFORE:"before",AFTER:"after"});function DV(F,A){if(F.new=A.returnDocument===YV.ReturnDocument.AFTER,F.upsert=A.upsert===!0,A.bypassDocumentValidation===!0)F.bypassDocumentValidation=A.bypassDocumentValidation;return F}class t9 extends Zt.CommandOperation{constructor(F,A,B){super(F,B);this.options=B??{},this.cmdBase={remove:!1,new:!1,upsert:!1},B.includeResultMetadata??=!1;let D=Xt.formatSort(B.sort);if(D)this.cmdBase.sort=D;if(B.projection)this.cmdBase.fields=B.projection;if(B.maxTimeMS)this.cmdBase.maxTimeMS=B.maxTimeMS;if(B.writeConcern)this.cmdBase.writeConcern=B.writeConcern;if(B.let)this.cmdBase.let=B.let;if(B.comment!==void 0)this.cmdBase.comment=B.comment;this.readPreference=Jt.ReadPreference.primary,this.collection=F,this.query=A}get commandName(){return"findAndModify"}async execute(F,A,B){let D=this.collection,J=this.query,X={...this.options,...this.bsonOptions},Z={findAndModify:D.collectionName,query:J,...this.cmdBase};if(_A.decorateWithCollation(Z,D,X),X.hint){if(this.writeConcern?.w===0||_A.maxWireVersion(F)<8)throw new X4.MongoCompatibilityError("The current topology does not support a hint on findAndModify commands");Z.hint=X.hint}let Y=await super.executeCommand(F,A,Z,B);return X.includeResultMetadata?Y:Y.value??null}}YV.FindAndModifyOperation=t9;class JV extends t9{constructor(F,A,B){if(A==null||typeof A!=="object")throw new X4.MongoInvalidArgumentError('Argument "filter" must be an object');super(F,A,B);this.cmdBase.remove=!0}}YV.FindOneAndDeleteOperation=JV;class XV extends t9{constructor(F,A,B,D){if(A==null||typeof A!=="object")throw new X4.MongoInvalidArgumentError('Argument "filter" must be an object');if(B==null||typeof B!=="object")throw new X4.MongoInvalidArgumentError('Argument "replacement" must be an object');if(_A.hasAtomicOperators(B))throw new X4.MongoInvalidArgumentError("Replacement document must not contain atomic operators");super(F,A,D);this.cmdBase.update=B,DV(this.cmdBase,D)}}YV.FindOneAndReplaceOperation=XV;class ZV extends t9{constructor(F,A,B,D){if(A==null||typeof A!=="object")throw new X4.MongoInvalidArgumentError('Argument "filter" must be an object');if(B==null||typeof B!=="object")throw new X4.MongoInvalidArgumentError('Argument "update" must be an object');if(!_A.hasAtomicOperators(B))throw new X4.MongoInvalidArgumentError("Update document requires atomic operators");super(F,A,D);if(this.cmdBase.update=B,DV(this.cmdBase,D),D.arrayFilters)this.cmdBase.arrayFilters=D.arrayFilters}}YV.FindOneAndUpdateOperation=ZV;fA.defineAspects(t9,[fA.Aspect.WRITE_OPERATION,fA.Aspect.RETRYABLE,fA.Aspect.EXPLAINABLE])});var WV=K((HV)=>{Object.defineProperty(HV,"__esModule",{value:!0});HV.IsCappedOperation=void 0;var Et=l(),Ht=O1();class EV extends Ht.AbstractOperation{constructor(F,A){super(A);this.options=A,this.collection=F}get commandName(){return"listCollections"}async execute(F,A){let B=this.collection,[D]=await B.s.db.listCollections({name:B.collectionName},{...this.options,nameOnly:!1,readPreference:this.readPreference,session:A}).toArray();if(D==null||D.options==null)throw new Et.MongoAPIError(`collection ${B.namespace} not found`);return!!D.options?.capped}}HV.IsCappedOperation=EV});var UV=K((CV)=>{Object.defineProperty(CV,"__esModule",{value:!0});CV.OptionsOperation=void 0;var qt=l(),Wt=O1();class zV extends Wt.AbstractOperation{constructor(F,A){super(A);this.options=A,this.collection=F}get commandName(){return"listCollections"}async execute(F,A){let B=this.collection,[D]=await B.s.db.listCollections({name:B.collectionName},{...this.options,nameOnly:!1,readPreference:this.readPreference,session:A}).toArray();if(D==null||D.options==null)throw new qt.MongoAPIError(`collection ${B.namespace} not found`);return D.options}}CV.OptionsOperation=zV});var TY=K((LV)=>{Object.defineProperty(LV,"__esModule",{value:!0});LV.RenameOperation=void 0;var zt=e4(),Ct=a(),Kt=$0(),QV=O1();class MY extends Kt.CommandOperation{constructor(F,A,B){super(F,B);this.collection=F,this.newName=A,this.options=B,this.ns=new Ct.MongoDBNamespace("admin","$cmd")}get commandName(){return"renameCollection"}async execute(F,A,B){let D=this.collection.namespace,J=this.collection.s.namespace.withCollection(this.newName).toString(),X=typeof this.options.dropTarget==="boolean"?this.options.dropTarget:!1,Z={renameCollection:D,to:J,dropTarget:X};return await super.executeCommand(F,A,Z,B),new zt.Collection(this.collection.s.db,this.newName,this.collection.s.options)}}LV.RenameOperation=MY;QV.defineAspects(MY,[QV.Aspect.WRITE_OPERATION])});var NV=K((wV)=>{Object.defineProperty(wV,"__esModule",{value:!0});wV.CreateSearchIndexesOperation=void 0;var Ut=O1();class RV extends Ut.AbstractOperation{constructor(F,A){super();this.collection=F,this.descriptions=A}get commandName(){return"createSearchIndexes"}async execute(F,A,B){let D=this.collection.fullNamespace,J={createSearchIndexes:D.collection,indexes:this.descriptions};return((await F.command(D,J,{session:A,timeoutContext:B}))?.indexesCreated??[]).map(({name:Y})=>Y)}}wV.CreateSearchIndexesOperation=RV});var kV=K((TV)=>{Object.defineProperty(TV,"__esModule",{value:!0});TV.DropSearchIndexOperation=void 0;var PV=l(),Qt=O1();class MV extends Qt.AbstractOperation{constructor(F,A){super();this.collection=F,this.name=A}get commandName(){return"dropSearchIndex"}async execute(F,A,B){let D=this.collection.fullNamespace,J={dropSearchIndex:D.collection};if(typeof this.name==="string")J.name=this.name;try{await F.command(D,J,{session:A,timeoutContext:B})}catch(X){if(!(X instanceof PV.MongoServerError&&X.code===PV.MONGODB_ERROR_CODES.NamespaceNotFound))throw X}}}TV.DropSearchIndexOperation=MV});var xV=K((SV)=>{Object.defineProperty(SV,"__esModule",{value:!0});SV.UpdateSearchIndexOperation=void 0;var Lt=O1();class OV extends Lt.AbstractOperation{constructor(F,A,B){super();this.collection=F,this.name=A,this.definition=B}get commandName(){return"updateSearchIndex"}async execute(F,A,B){let D=this.collection.fullNamespace,J={updateSearchIndex:D.collection,name:this.name,definition:this.definition};await F.command(D,J,{session:A,timeoutContext:B});return}}SV.UpdateSearchIndexOperation=OV});var e4=K((bV)=>{Object.defineProperty(bV,"__esModule",{value:!0});bV.Collection=void 0;var Vt=I1(),Rt=oZ(),wt=eZ(),It=F9(),Nt=D5(),Pt=zY(),Mt=VY(),Tt=pL(),jY=l(),jt=yZ(),kt=YY(),fV=_Z(),Ot=aL(),St=IY(),ut=BV(),o1=F2(),kY=PY(),gA=Z5(),_V=mZ(),xt=WV(),ft=UV(),_t=TY(),gt=NV(),bt=kV(),yt=xV(),OY=iZ(),vt=q6(),SY=k0(),u1=a(),ht=t0();class gV{constructor(F,A,B){this.s={db:F,options:B,namespace:new u1.MongoDBCollectionNamespace(F.databaseName,A),pkFactory:F.options?.pkFactory??u1.DEFAULT_PK_FACTORY,readPreference:SY.ReadPreference.fromOptions(B),bsonOptions:Vt.resolveBSONOptions(B,F),readConcern:vt.ReadConcern.fromOptions(B),writeConcern:ht.WriteConcern.fromOptions(B)},this.client=F.client}get dbName(){return this.s.namespace.db}get collectionName(){return this.s.namespace.collection}get namespace(){return this.fullNamespace.toString()}get fullNamespace(){return this.s.namespace}get readConcern(){if(this.s.readConcern==null)return this.s.db.readConcern;return this.s.readConcern}get readPreference(){if(this.s.readPreference==null)return this.s.db.readPreference;return this.s.readPreference}get bsonOptions(){return this.s.bsonOptions}get writeConcern(){if(this.s.writeConcern==null)return this.s.db.writeConcern;return this.s.writeConcern}get hint(){return this.s.collectionHint}set hint(F){this.s.collectionHint=u1.normalizeHintField(F)}get timeoutMS(){return this.s.options.timeoutMS}async insertOne(F,A){return await o1.executeOperation(this.client,new _V.InsertOneOperation(this,F,u1.resolveOptions(this,A)))}async insertMany(F,A){return await o1.executeOperation(this.client,new _V.InsertManyOperation(this,F,u1.resolveOptions(this,A??{ordered:!0})))}async bulkWrite(F,A){if(!Array.isArray(F))throw new jY.MongoInvalidArgumentError('Argument "operations" must be an array of documents');return await o1.executeOperation(this.client,new jt.BulkWriteOperation(this,F,u1.resolveOptions(this,A??{ordered:!0})))}async updateOne(F,A,B){return await o1.executeOperation(this.client,new OY.UpdateOneOperation(this,F,A,u1.resolveOptions(this,B)))}async replaceOne(F,A,B){return await o1.executeOperation(this.client,new OY.ReplaceOneOperation(this,F,A,u1.resolveOptions(this,B)))}async updateMany(F,A,B){return await o1.executeOperation(this.client,new OY.UpdateManyOperation(this,F,A,u1.resolveOptions(this,B)))}async deleteOne(F={},A={}){return await o1.executeOperation(this.client,new fV.DeleteOneOperation(this,F,u1.resolveOptions(this,A)))}async deleteMany(F={},A={}){return await o1.executeOperation(this.client,new fV.DeleteManyOperation(this,F,u1.resolveOptions(this,A)))}async rename(F,A){return await o1.executeOperation(this.client,new _t.RenameOperation(this,F,u1.resolveOptions(void 0,{...A,readPreference:SY.ReadPreference.PRIMARY})))}async drop(F){return await o1.executeOperation(this.client,new St.DropCollectionOperation(this.s.db,this.collectionName,F))}async findOne(F={},A={}){let B=this.find(F,A).limit(-1).batchSize(1),D=await B.next();return await B.close(),D}find(F={},A={}){return new Pt.FindCursor(this.client,this.s.namespace,F,u1.resolveOptions(this,A))}async options(F){return await o1.executeOperation(this.client,new ft.OptionsOperation(this,u1.resolveOptions(this,F)))}async isCapped(F){return await o1.executeOperation(this.client,new xt.IsCappedOperation(this,u1.resolveOptions(this,F)))}async createIndex(F,A){return(await o1.executeOperation(this.client,gA.CreateIndexesOperation.fromIndexSpecification(this,this.collectionName,F,u1.resolveOptions(this,A))))[0]}async createIndexes(F,A){return await o1.executeOperation(this.client,gA.CreateIndexesOperation.fromIndexDescriptionArray(this,this.collectionName,F,u1.resolveOptions(this,{...A,maxTimeMS:void 0})))}async dropIndex(F,A){return await o1.executeOperation(this.client,new gA.DropIndexOperation(this,F,{...u1.resolveOptions(this,A),readPreference:SY.ReadPreference.primary}))}async dropIndexes(F){try{return await o1.executeOperation(this.client,new gA.DropIndexOperation(this,"*",u1.resolveOptions(this,F))),!0}catch(A){if(A instanceof jY.MongoOperationTimeoutError)throw A;return!1}}listIndexes(F){return new Mt.ListIndexesCursor(this,u1.resolveOptions(this,F))}async indexExists(F,A){let B=Array.isArray(F)?F:[F],D=new Set(await this.listIndexes(A).map(({name:J})=>J).toArray());return B.every((J)=>D.has(J))}async indexInformation(F){return await this.indexes({...F,full:F?.full??!1})}async estimatedDocumentCount(F){return await o1.executeOperation(this.client,new ut.EstimatedDocumentCountOperation(this,u1.resolveOptions(this,F)))}async countDocuments(F={},A={}){let B=[];if(B.push({$match:F}),typeof A.skip==="number")B.push({$skip:A.skip});if(typeof A.limit==="number")B.push({$limit:A.limit});B.push({$group:{_id:1,n:{$sum:1}}});let D=this.aggregate(B,A),J=await D.next();return await D.close(),J?.n??0}async distinct(F,A={},B={}){return await o1.executeOperation(this.client,new Ot.DistinctOperation(this,F,A,u1.resolveOptions(this,B)))}async indexes(F){let A=await this.listIndexes(F).toArray();if(F?.full??!0)return A;return Object.fromEntries(A.map(({name:J,key:X})=>[J,Object.entries(X)]))}async findOneAndDelete(F,A){return await o1.executeOperation(this.client,new kY.FindOneAndDeleteOperation(this,F,u1.resolveOptions(this,A)))}async findOneAndReplace(F,A,B){return await o1.executeOperation(this.client,new kY.FindOneAndReplaceOperation(this,F,A,u1.resolveOptions(this,B)))}async findOneAndUpdate(F,A,B){return await o1.executeOperation(this.client,new kY.FindOneAndUpdateOperation(this,F,A,u1.resolveOptions(this,B)))}aggregate(F=[],A){if(!Array.isArray(F))throw new jY.MongoInvalidArgumentError('Argument "pipeline" must be an array of aggregation stages');return new Nt.AggregationCursor(this.client,this.s.namespace,F,u1.resolveOptions(this,A))}watch(F=[],A={}){if(!Array.isArray(F))A=F,F=[];return new It.ChangeStream(this,F,u1.resolveOptions(this,A))}initializeUnorderedBulkOp(F){return new wt.UnorderedBulkOperation(this,u1.resolveOptions(this,F))}initializeOrderedBulkOp(F){return new Rt.OrderedBulkOperation(this,u1.resolveOptions(this,F))}async count(F={},A={}){return await o1.executeOperation(this.client,new kt.CountOperation(this.fullNamespace,F,u1.resolveOptions(this,A)))}listSearchIndexes(F,A){A=typeof F==="object"?F:A==null?{}:A;let B=F==null?null:typeof F==="object"?null:F;return new Tt.ListSearchIndexesCursor(this,B,A)}async createSearchIndex(F){let[A]=await this.createSearchIndexes([F]);return A}async createSearchIndexes(F){return await o1.executeOperation(this.client,new gt.CreateSearchIndexesOperation(this,F))}async dropSearchIndex(F){return await o1.executeOperation(this.client,new bt.DropSearchIndexOperation(this,F))}async updateSearchIndex(F,A){return await o1.executeOperation(this.client,new yt.UpdateSearchIndexOperation(this,F,A))}}bV.Collection=gV});var _Y=K((hV)=>{Object.defineProperty(hV,"__esModule",{value:!0});hV.ChangeStreamCursor=void 0;var uY=F9(),vV=K0(),mt=AY(),dt=F2(),xY=a(),ct=B2();class fY extends ct.AbstractCursor{constructor(F,A,B=[],D={}){super(F,A,{...D,tailable:!0,awaitData:!0});if(this.pipeline=B,this.changeStreamCursorOptions=D,this._resumeToken=null,this.startAtOperationTime=D.startAtOperationTime??null,D.startAfter)this.resumeToken=D.startAfter;else if(D.resumeAfter)this.resumeToken=D.resumeAfter}set resumeToken(F){this._resumeToken=F,this.emit(uY.ChangeStream.RESUME_TOKEN_CHANGED,F)}get resumeToken(){return this._resumeToken}get resumeOptions(){let F={...this.changeStreamCursorOptions};for(let A of["resumeAfter","startAfter","startAtOperationTime"])delete F[A];if(this.resumeToken!=null)if(this.changeStreamCursorOptions.startAfter&&!this.hasReceived)F.startAfter=this.resumeToken;else F.resumeAfter=this.resumeToken;else if(this.startAtOperationTime!=null&&xY.maxWireVersion(this.server)>=7)F.startAtOperationTime=this.startAtOperationTime;return F}cacheResumeToken(F){if(this.bufferedCount()===0&&this.postBatchResumeToken)this.resumeToken=this.postBatchResumeToken;else this.resumeToken=F;this.hasReceived=!0}_processBatch(F){let{postBatchResumeToken:A}=F;if(A){if(this.postBatchResumeToken=A,F.batchSize===0)this.resumeToken=A}}clone(){return new fY(this.client,this.namespace,this.pipeline,{...this.cursorOptions})}async _initialize(F){let A=new mt.AggregateOperation(this.namespace,this.pipeline,{...this.cursorOptions,...this.changeStreamCursorOptions,session:F}),B=await dt.executeOperation(F.client,A,this.timeoutContext),D=A.server;if(this.maxWireVersion=xY.maxWireVersion(D),this.startAtOperationTime==null&&this.changeStreamCursorOptions.resumeAfter==null&&this.changeStreamCursorOptions.startAfter==null&&this.maxWireVersion>=7)this.startAtOperationTime=B.operationTime;return this._processBatch(B),this.emit(vV.INIT,B),this.emit(vV.RESPONSE),{server:D,session:F,response:B}}async getMore(F){let A=await super.getMore(F);return this.maxWireVersion=xY.maxWireVersion(this.server),this._processBatch(A),this.emit(uY.ChangeStream.MORE,A),this.emit(uY.ChangeStream.RESPONSE),A}}hV.ChangeStreamCursor=fY});var lV=K((dV)=>{Object.defineProperty(dV,"__esModule",{value:!0});dV.ListCollectionsOperation=void 0;var lt=_6(),pt=a(),it=$0(),bA=O1();class gY extends it.CommandOperation{constructor(F,A,B){super(F,B);if(this.options={...B},delete this.options.writeConcern,this.db=F,this.filter=A,this.nameOnly=!!this.options.nameOnly,this.authorizedCollections=!!this.options.authorizedCollections,typeof this.options.batchSize==="number")this.batchSize=this.options.batchSize}get commandName(){return"listCollections"}async execute(F,A,B){return await super.executeCommand(F,A,this.generateCommand(pt.maxWireVersion(F)),B,lt.CursorResponse)}generateCommand(F){let A={listCollections:1,filter:this.filter,cursor:this.batchSize?{batchSize:this.batchSize}:{},nameOnly:this.nameOnly,authorizedCollections:this.authorizedCollections};if(F>=9&&this.options.comment!==void 0)A.comment=this.options.comment;return A}}dV.ListCollectionsOperation=gY;bA.defineAspects(gY,[bA.Aspect.READ_OPERATION,bA.Aspect.RETRYABLE,bA.Aspect.CURSOR_CREATING])});var yY=K((pV)=>{Object.defineProperty(pV,"__esModule",{value:!0});pV.ListCollectionsCursor=void 0;var nt=F2(),st=lV(),at=B2();class bY extends at.AbstractCursor{constructor(F,A,B){super(F.client,F.s.namespace,B);this.parent=F,this.filter=A,this.options=B}clone(){return new bY(this.parent,this.filter,{...this.options,...this.cursorOptions})}async _initialize(F){let A=new st.ListCollectionsOperation(this.parent,this.filter,{...this.cursorOptions,...this.options,session:F}),B=await nt.executeOperation(this.parent.client,A,this.timeoutContext);return{server:A.server,session:F,response:B}}}pV.ListCollectionsCursor=bY});var o9=K((rV)=>{Object.defineProperty(rV,"__esModule",{value:!0});rV.RunAdminCommandOperation=rV.RunCommandOperation=void 0;var rt=a(),nV=O1();class sV extends nV.AbstractOperation{constructor(F,A,B){super(B);this.command=A,this.options=B,this.ns=F.s.namespace.withCollection("$cmd")}get commandName(){return"runCommand"}async execute(F,A,B){return this.server=F,await F.command(this.ns,this.command,{...this.options,readPreference:this.readPreference,session:A,timeoutContext:B},this.options.responseType)}}rV.RunCommandOperation=sV;class aV extends nV.AbstractOperation{constructor(F,A){super(A);this.command=F,this.options=A,this.ns=new rt.MongoDBNamespace("admin","$cmd")}get commandName(){return"runCommand"}async execute(F,A,B){return this.server=F,await F.command(this.ns,this.command,{...this.options,readPreference:this.readPreference,session:A,timeoutContext:B})}}rV.RunAdminCommandOperation=aV});var BR=K((FR)=>{Object.defineProperty(FR,"__esModule",{value:!0});FR.RunCommandCursor=void 0;var ot=_6(),Y5=l(),oV=F2(),et=kZ(),Fo=o9(),Ao=a(),Bo=B2();class eV extends Bo.AbstractCursor{setComment(F){return this.getMoreOptions.comment=F,this}setMaxTimeMS(F){return this.getMoreOptions.maxAwaitTimeMS=F,this}setBatchSize(F){return this.getMoreOptions.batchSize=F,this}clone(){throw new Y5.MongoAPIError("Clone not supported, create a new cursor with db.runCursorCommand")}withReadConcern(F){throw new Y5.MongoAPIError("RunCommandCursor does not support readConcern it must be attached to the command being run")}addCursorFlag(F,A){throw new Y5.MongoAPIError("RunCommandCursor does not support cursor flags, they must be attached to the command being run")}maxTimeMS(F){throw new Y5.MongoAPIError("maxTimeMS must be configured on the command document directly, to configure getMore.maxTimeMS use cursor.setMaxTimeMS()")}batchSize(F){throw new Y5.MongoAPIError("batchSize must be configured on the command document directly, to configure getMore.batchSize use cursor.setBatchSize()")}constructor(F,A,B={}){super(F.client,Ao.ns(F.namespace),B);this.getMoreOptions={},this.db=F,this.command=Object.freeze({...A})}async _initialize(F){let A=new Fo.RunCommandOperation(this.db,this.command,{...this.cursorOptions,session:F,readPreference:this.cursorOptions.readPreference,responseType:ot.CursorResponse}),B=await oV.executeOperation(this.client,A,this.timeoutContext);return{server:A.server,session:F,response:B}}async getMore(F){let A=new et.GetMoreOperation(this.namespace,this.id,this.server,{...this.cursorOptions,session:this.session,...this.getMoreOptions});return await oV.executeOperation(this.client,A,this.timeoutContext)}}FR.RunCommandCursor=eV});var ZR=K((JR)=>{Object.defineProperty(JR,"__esModule",{value:!0});JR.CollectionsOperation=void 0;var Do=e4(),Jo=O1();class DR extends Jo.AbstractOperation{constructor(F,A){super(A);this.options=A,this.db=F}get commandName(){return"listCollections"}async execute(F,A){let B=await this.db.listCollections({},{...this.options,nameOnly:!0,readPreference:this.readPreference,session:A}).toArray(),D=[];for(let{name:J}of B)if(!J.includes("$"))D.push(new Do.Collection(this.db,J,this.db.s.options));return D}}JR.CollectionsOperation=DR});var HR=K((GR)=>{Object.defineProperty(GR,"__esModule",{value:!0});GR.CreateCollectionOperation=void 0;var YR=l4(),Xo=e4(),Zo=l(),Yo=$0(),$o=Z5(),$R=O1(),Go=new Set(["w","wtimeout","timeoutMS","j","fsync","autoIndexId","pkFactory","raw","readPreference","session","readConcern","writeConcern","raw","fieldsAsRaw","useBigInt64","promoteLongs","promoteValues","promoteBuffers","bsonRegExp","serializeFunctions","ignoreUndefined","enableUtf8Validation"]),Eo="Driver support of Queryable Encryption is incompatible with server. Upgrade server to use Queryable Encryption.";class yA extends Yo.CommandOperation{constructor(F,A,B={}){super(F,B);this.options=B,this.db=F,this.name=A}get commandName(){return"create"}async execute(F,A,B){let D=this.db,J=this.name,X=this.options,Z=X.encryptedFields??D.client.s.options.autoEncryption?.encryptedFieldsMap?.[`${D.databaseName}.${J}`];if(Z){if(!F.loadBalanced&&F.description.maxWireVersion<YR.MIN_SUPPORTED_QE_WIRE_VERSION)throw new Zo.MongoCompatibilityError(`${Eo} The minimum server version required is ${YR.MIN_SUPPORTED_QE_SERVER_VERSION}`);let $=Z.escCollection??`enxcol_.${J}.esc`,G=Z.ecocCollection??`enxcol_.${J}.ecoc`;for(let E of[$,G])await new yA(D,E,{clusteredIndex:{key:{_id:1},unique:!0}}).executeWithoutEncryptedFieldsCheck(F,A,B);if(!X.encryptedFields)this.options={...this.options,encryptedFields:Z}}let Y=await this.executeWithoutEncryptedFieldsCheck(F,A,B);if(Z)await $o.CreateIndexesOperation.fromIndexSpecification(D,J,{__safeContent__:1},{}).execute(F,A,B);return Y}async executeWithoutEncryptedFieldsCheck(F,A,B){let D=this.db,J=this.name,X=this.options,Z={create:J};for(let Y in X)if(X[Y]!=null&&typeof X[Y]!=="function"&&!Go.has(Y))Z[Y]=X[Y];return await super.executeCommand(F,A,Z,B),new Xo.Collection(D,J,X)}}GR.CreateCollectionOperation=yA;$R.defineAspects(yA,[$R.Aspect.WRITE_OPERATION])});var KR=K((zR)=>{Object.defineProperty(zR,"__esModule",{value:!0});zR.ProfilingLevelOperation=void 0;var qR=l(),Ho=$0();class WR extends Ho.CommandOperation{constructor(F,A){super(F,A);this.options=A}get commandName(){return"profile"}async execute(F,A,B){let D=await super.executeCommand(F,A,{profile:-1},B);if(D.ok===1){let J=D.was;if(J===0)return"off";if(J===1)return"slow_only";if(J===2)return"all";throw new qR.MongoUnexpectedServerResponseError(`Illegal profiling level value ${J}`)}else throw new qR.MongoUnexpectedServerResponseError("Error with profile command")}}zR.ProfilingLevelOperation=WR});var hY=K((QR)=>{Object.defineProperty(QR,"__esModule",{value:!0});QR.RemoveUserOperation=void 0;var qo=$0(),UR=O1();class vY extends qo.CommandOperation{constructor(F,A,B){super(F,B);this.options=B,this.username=A}get commandName(){return"dropUser"}async execute(F,A,B){return await super.executeCommand(F,A,{dropUser:this.username},B),!0}}QR.RemoveUserOperation=vY;UR.defineAspects(vY,[UR.Aspect.WRITE_OPERATION])});var mY=K((RR)=>{Object.defineProperty(RR,"__esModule",{value:!0});RR.SetProfilingLevelOperation=RR.ProfilingLevel=void 0;var Wo=l(),zo=a(),Co=$0(),Ko=new Set(["off","slow_only","all"]);RR.ProfilingLevel=Object.freeze({off:"off",slowOnly:"slow_only",all:"all"});class VR extends Co.CommandOperation{constructor(F,A,B){super(F,B);switch(this.options=B,A){case RR.ProfilingLevel.off:this.profile=0;break;case RR.ProfilingLevel.slowOnly:this.profile=1;break;case RR.ProfilingLevel.all:this.profile=2;break;default:this.profile=0;break}this.level=A}get commandName(){return"profile"}async execute(F,A,B){let D=this.level;if(!Ko.has(D))throw new Wo.MongoInvalidArgumentError(`Profiling level must be one of "${zo.enumToString(RR.ProfilingLevel)}"`);return await super.executeCommand(F,A,{profile:this.profile},B),D}}RR.SetProfilingLevelOperation=VR});var MR=K((NR)=>{Object.defineProperty(NR,"__esModule",{value:!0});NR.DbStatsOperation=void 0;var Uo=$0(),IR=O1();class dY extends Uo.CommandOperation{constructor(F,A){super(F,A);this.options=A}get commandName(){return"dbStats"}async execute(F,A,B){let D={dbStats:!0};if(this.options.scale!=null)D.scale=this.options.scale;return await super.executeCommand(F,A,D,B)}}NR.DbStatsOperation=dY;IR.defineAspects(dY,[IR.Aspect.READ_OPERATION])});var vA=K((SR)=>{Object.defineProperty(SR,"__esModule",{value:!0});SR.Db=void 0;var Qo=cY(),TR=I1(),Lo=F9(),Vo=e4(),e9=K0(),Ro=D5(),wo=yY(),Io=BR(),jR=l(),No=ZR(),Po=HR(),kR=IY(),g6=F2(),Mo=Z5(),To=KR(),jo=hY(),ko=TY(),Oo=o9(),So=mY(),uo=MR(),xo=q6(),OR=k0(),O0=a(),fo=t0(),_o=["writeConcern","readPreference","readPreferenceTags","native_parser","forceServerObjectId","pkFactory","serializeFunctions","raw","authSource","ignoreUndefined","readConcern","retryMiliSeconds","numberOfRetries","useBigInt64","promoteBuffers","promoteLongs","bsonRegExp","enableUtf8Validation","promoteValues","compression","retryWrites","timeoutMS"];class Z4{constructor(F,A,B){if(B=B??{},B=O0.filterOptions(B,_o),typeof A==="string"&&A.includes("."))throw new jR.MongoInvalidArgumentError("Database names cannot contain the character '.'");this.s={options:B,readPreference:OR.ReadPreference.fromOptions(B),bsonOptions:TR.resolveBSONOptions(B,F),pkFactory:B?.pkFactory??O0.DEFAULT_PK_FACTORY,readConcern:xo.ReadConcern.fromOptions(B),writeConcern:fo.WriteConcern.fromOptions(B),namespace:new O0.MongoDBNamespace(A)},this.client=F}get databaseName(){return this.s.namespace.db}get options(){return this.s.options}get secondaryOk(){return this.s.readPreference?.preference!=="primary"||!1}get readConcern(){return this.s.readConcern}get readPreference(){if(this.s.readPreference==null)return this.client.readPreference;return this.s.readPreference}get bsonOptions(){return this.s.bsonOptions}get writeConcern(){return this.s.writeConcern}get namespace(){return this.s.namespace.toString()}get timeoutMS(){return this.s.options?.timeoutMS}async createCollection(F,A){return await g6.executeOperation(this.client,new Po.CreateCollectionOperation(this,F,O0.resolveOptions(this,A)))}async command(F,A){return await g6.executeOperation(this.client,new Oo.RunCommandOperation(this,F,O0.resolveOptions(void 0,{...TR.resolveBSONOptions(A),timeoutMS:A?.timeoutMS??this.timeoutMS,session:A?.session,readPreference:A?.readPreference})))}aggregate(F=[],A){return new Ro.AggregationCursor(this.client,this.s.namespace,F,O0.resolveOptions(this,A))}admin(){return new Qo.Admin(this)}collection(F,A={}){if(typeof A==="function")throw new jR.MongoInvalidArgumentError("The callback form of this helper has been removed.");return new Vo.Collection(this,F,O0.resolveOptions(this,A))}async stats(F){return await g6.executeOperation(this.client,new uo.DbStatsOperation(this,O0.resolveOptions(this,F)))}listCollections(F={},A={}){return new wo.ListCollectionsCursor(this,F,O0.resolveOptions(this,A))}async renameCollection(F,A,B){return await g6.executeOperation(this.client,new ko.RenameOperation(this.collection(F),A,O0.resolveOptions(void 0,{...B,new_collection:!0,readPreference:OR.ReadPreference.primary})))}async dropCollection(F,A){return await g6.executeOperation(this.client,new kR.DropCollectionOperation(this,F,O0.resolveOptions(this,A)))}async dropDatabase(F){return await g6.executeOperation(this.client,new kR.DropDatabaseOperation(this,O0.resolveOptions(this,F)))}async collections(F){return await g6.executeOperation(this.client,new No.CollectionsOperation(this,O0.resolveOptions(this,F)))}async createIndex(F,A,B){return(await g6.executeOperation(this.client,Mo.CreateIndexesOperation.fromIndexSpecification(this,F,A,B)))[0]}async removeUser(F,A){return await g6.executeOperation(this.client,new jo.RemoveUserOperation(this,F,O0.resolveOptions(this,A)))}async setProfilingLevel(F,A){return await g6.executeOperation(this.client,new So.SetProfilingLevelOperation(this,F,O0.resolveOptions(this,A)))}async profilingLevel(F){return await g6.executeOperation(this.client,new To.ProfilingLevelOperation(this,O0.resolveOptions(this,F)))}async indexInformation(F,A){return await this.collection(F).indexInformation(O0.resolveOptions(this,A))}watch(F=[],A={}){if(!Array.isArray(F))A=F,F=[];return new Lo.ChangeStream(this,F,O0.resolveOptions(this,A))}runCursorCommand(F,A){return new Io.RunCommandCursor(this,F,A)}}SR.Db=Z4;Z4.SYSTEM_NAMESPACE_COLLECTION=e9.SYSTEM_NAMESPACE_COLLECTION;Z4.SYSTEM_INDEX_COLLECTION=e9.SYSTEM_INDEX_COLLECTION;Z4.SYSTEM_PROFILE_COLLECTION=e9.SYSTEM_PROFILE_COLLECTION;Z4.SYSTEM_USER_COLLECTION=e9.SYSTEM_USER_COLLECTION;Z4.SYSTEM_COMMAND_COLLECTION=e9.SYSTEM_COMMAND_COLLECTION;Z4.SYSTEM_JS_COLLECTION=e9.SYSTEM_JS_COLLECTION});var F9=K((xR)=>{Object.defineProperty(xR,"__esModule",{value:!0});xR.ChangeStream=void 0;var go=e4(),b6=K0(),bo=B2(),yo=_Y(),vo=vA(),S0=l(),ho=Y4(),mo=o2(),co=B7(),lo=o0(),A3=a(),F7=Symbol("cursorStream"),A7=Symbol("closed"),G5=Symbol("mode"),po=["resumeAfter","startAfter","startAtOperationTime","fullDocument","fullDocumentBeforeChange","showExpandedEvents"],A9={COLLECTION:Symbol("Collection"),DATABASE:Symbol("Database"),CLUSTER:Symbol("Cluster")},io=[b6.RESUME_TOKEN_CHANGED,b6.END,b6.CLOSE],no="A change stream document has been received that lacks a resume token (_id).",hA="ChangeStream is closed";class D2 extends mo.TypedEventEmitter{async asyncDispose(){await this.close()}constructor(F,A=[],B={}){super();this.pipeline=A,this.options={...B};let D;if(delete this.options.writeConcern,F instanceof go.Collection)this.type=A9.COLLECTION,D=F.s.db.client.options.serverSelectionTimeoutMS;else if(F instanceof vo.Db)this.type=A9.DATABASE,D=F.client.options.serverSelectionTimeoutMS;else if(F instanceof ho.MongoClient)this.type=A9.CLUSTER,D=F.options.serverSelectionTimeoutMS;else throw new S0.MongoChangeStreamError("Parent provided to ChangeStream constructor must be an instance of Collection, Db, or MongoClient");if(this.contextOwner=Symbol(),this.parent=F,this.namespace=F.s.namespace,!this.options.readPreference&&F.readPreference)this.options.readPreference=F.readPreference;if(this.cursor=this._createChangeStreamCursor(B),this[A7]=!1,this[G5]=!1,this.on("newListener",(J)=>{if(J==="change"&&this.cursor&&this.listenerCount("change")===0)this._streamEvents(this.cursor)}),this.on("removeListener",(J)=>{if(J==="change"&&this.listenerCount("change")===0&&this.cursor)this[F7]?.removeAllListeners("data")}),this.options.timeoutMS!=null)this.timeoutContext=new lo.CSOTTimeoutContext({timeoutMS:this.options.timeoutMS,serverSelectionTimeoutMS:D})}get cursorStream(){return this[F7]}get resumeToken(){return this.cursor?.resumeToken}async hasNext(){this._setIsIterator(),this.timeoutContext?.refresh();try{while(!0)try{return await this.cursor.hasNext()}catch(F){try{await this._processErrorIteratorMode(F,this.cursor.id!=null)}catch(A){if(A instanceof S0.MongoOperationTimeoutError&&this.cursor.id==null)throw A;try{await this.close()}catch(B){A3.squashError(B)}throw A}}}finally{this.timeoutContext?.clear()}}async next(){this._setIsIterator(),this.timeoutContext?.refresh();try{while(!0)try{let F=await this.cursor.next();return this._processChange(F??null)}catch(F){try{await this._processErrorIteratorMode(F,this.cursor.id!=null)}catch(A){if(A instanceof S0.MongoOperationTimeoutError&&this.cursor.id==null)throw A;try{await this.close()}catch(B){A3.squashError(B)}throw A}}}finally{this.timeoutContext?.clear()}}async tryNext(){this._setIsIterator(),this.timeoutContext?.refresh();try{while(!0)try{return await this.cursor.tryNext()??null}catch(F){try{await this._processErrorIteratorMode(F,this.cursor.id!=null)}catch(A){if(A instanceof S0.MongoOperationTimeoutError&&this.cursor.id==null)throw A;try{await this.close()}catch(B){A3.squashError(B)}throw A}}}finally{this.timeoutContext?.clear()}}async*[Symbol.asyncIterator](){if(this.closed)return;try{while(!0)yield await this.next()}finally{try{await this.close()}catch(F){A3.squashError(F)}}}get closed(){return this[A7]||this.cursor.closed}async close(){this.timeoutContext?.clear(),this.timeoutContext=void 0,this[A7]=!0;let F=this.cursor;try{await F.close()}finally{this._endStream()}}stream(F){if(this.closed)throw new S0.MongoChangeStreamError(hA);return this.streamOptions=F,this.cursor.stream(F)}_setIsEmitter(){if(this[G5]==="iterator")throw new S0.MongoAPIError("ChangeStream cannot be used as an EventEmitter after being used as an iterator");this[G5]="emitter"}_setIsIterator(){if(this[G5]==="emitter")throw new S0.MongoAPIError("ChangeStream cannot be used as an iterator after being used as an EventEmitter");this[G5]="iterator"}_createChangeStreamCursor(F){let A=A3.filterOptions(F,po);if(this.type===A9.CLUSTER)A.allChangesForCluster=!0;let B=[{$changeStream:A},...this.pipeline],D=this.type===A9.CLUSTER?this.parent:this.type===A9.DATABASE?this.parent.client:this.type===A9.COLLECTION?this.parent.client:null;if(D==null)throw new S0.MongoRuntimeError(`Changestream type should only be one of cluster, database, collection. Found ${this.type.toString()}`);let J=new yo.ChangeStreamCursor(D,this.namespace,B,{...F,timeoutContext:this.timeoutContext?new bo.CursorTimeoutContext(this.timeoutContext,this.contextOwner):void 0});for(let X of io)J.on(X,(Z)=>this.emit(X,Z));if(this.listenerCount(D2.CHANGE)>0)this._streamEvents(J);return J}_closeEmitterModeWithError(F){this.emit(D2.ERROR,F),this.close().then(void 0,A3.squashError)}_streamEvents(F){this._setIsEmitter();let A=this[F7]??F.stream();this[F7]=A,A.on("data",(B)=>{try{let D=this._processChange(B);this.emit(D2.CHANGE,D)}catch(D){this.emit(D2.ERROR,D)}this.timeoutContext?.refresh()}),A.on("error",(B)=>this._processErrorStreamMode(B,this.cursor.id!=null))}_endStream(){let F=this[F7];if(F)["data","close","end","error"].forEach((A)=>F.removeAllListeners(A)),F.destroy();this[F7]=void 0}_processChange(F){if(this[A7])throw new S0.MongoAPIError(hA);if(F==null)throw new S0.MongoRuntimeError(hA);if(F&&!F._id)throw new S0.MongoChangeStreamError(no);return this.cursor.cacheResumeToken(F._id),this.options.startAtOperationTime=void 0,F}_processErrorStreamMode(F,A){if(this[A7])return;if(A&&(S0.isResumableError(F,this.cursor.maxWireVersion)||F instanceof S0.MongoOperationTimeoutError))this._endStream(),this.cursor.close().then(()=>this._resume(F),(B)=>{return A3.squashError(B),this._resume(F)}).then(()=>{if(F instanceof S0.MongoOperationTimeoutError)this.emit(D2.ERROR,F)},()=>this._closeEmitterModeWithError(F));else this._closeEmitterModeWithError(F)}async _processErrorIteratorMode(F,A){if(this[A7])throw new S0.MongoAPIError(hA);if(A&&(S0.isResumableError(F,this.cursor.maxWireVersion)||F instanceof S0.MongoOperationTimeoutError)){try{await this.cursor.close()}catch(B){A3.squashError(B)}if(await this._resume(F),F instanceof S0.MongoOperationTimeoutError)throw F}else{try{await this.close()}catch(B){A3.squashError(B)}throw F}}async _resume(F){this.timeoutContext?.refresh();let A=A3.getTopology(this.parent);try{await A.selectServer(this.cursor.readPreference,{operationName:"reconnect topology in change stream",timeoutContext:this.timeoutContext}),this.cursor=this._createChangeStreamCursor(this.cursor.resumeOptions)}catch{throw await this.close(),F}}}xR.ChangeStream=D2;D2.RESPONSE=b6.RESPONSE;D2.MORE=b6.MORE;D2.INIT=b6.INIT;D2.CLOSE=b6.CLOSE;D2.CHANGE=b6.CHANGE;D2.END=b6.END;D2.ERROR=b6.ERROR;D2.RESUME_TOKEN_CHANGED=b6.RESUME_TOKEN_CHANGED;co.configureResourceManagement(D2.prototype)});var y6=K((_R)=>{Object.defineProperty(_R,"__esModule",{value:!0});_R.aws4=void 0;_R.getKerberos=so;_R.getZstdLibrary=ao;_R.getAwsCredentialProvider=ro;_R.getGcpMetadata=to;_R.getSnappy=oo;_R.getSocks=eo;_R.getMongoDBClientEncryption=Ae;var $4=l();function E5(F){return new Proxy(F?{kModuleError:F}:{},{get:(B,D)=>{if(D==="kModuleError")return F;throw F},set:()=>{throw F}})}function so(){let F;try{F=(()=>{throw new Error("Cannot require module "+"kerberos");})()}catch(A){F=E5(new $4.MongoMissingDependencyError("Optional module `kerberos` not found. Please install it to enable kerberos authentication",{cause:A,dependencyName:"kerberos"}))}return F}function ao(){let F;try{F=(()=>{throw new Error("Cannot require module "+"@mongodb-js/zstd");})()}catch(A){F=E5(new $4.MongoMissingDependencyError("Optional module `@mongodb-js/zstd` not found. Please install it to enable zstd compression",{cause:A,dependencyName:"zstd"}))}return F}function ro(){try{return (()=>{throw new Error("Cannot require module "+"@aws-sdk/credential-providers");})()}catch(F){return E5(new $4.MongoMissingDependencyError("Optional module `@aws-sdk/credential-providers` not found. Please install it to enable getting aws credentials via the official sdk.",{cause:F,dependencyName:"@aws-sdk/credential-providers"}))}}function to(){try{return (()=>{throw new Error("Cannot require module "+"gcp-metadata");})()}catch(F){return E5(new $4.MongoMissingDependencyError("Optional module `gcp-metadata` not found. Please install it to enable getting gcp credentials via the official sdk.",{cause:F,dependencyName:"gcp-metadata"}))}}function oo(){try{return (()=>{throw new Error("Cannot require module "+"snappy");})()}catch(F){return{kModuleError:new $4.MongoMissingDependencyError("Optional module `snappy` not found. Please install it to enable snappy compression",{cause:F,dependencyName:"snappy"})}}}function eo(){try{return (()=>{throw new Error("Cannot require module "+"socks");})()}catch(F){return{kModuleError:new $4.MongoMissingDependencyError("Optional module `socks` not found. Please install it to connections over a SOCKS5 proxy",{cause:F,dependencyName:"socks"})}}}_R.aws4=Fe();function Fe(){let F;try{F=(()=>{throw new Error("Cannot require module "+"aws4");})()}catch(A){F=E5(new $4.MongoMissingDependencyError("Optional module `aws4` not found. Please install it to enable AWS authentication",{cause:A,dependencyName:"aws4"}))}return F}function Ae(){let F=null;try{F=(()=>{throw new Error("Cannot require module "+"mongodb-client-encryption");})()}catch(A){return{kModuleError:new $4.MongoMissingDependencyError("Optional module `mongodb-client-encryption` not found. Please install it to use auto encryption or ClientEncryption.",{cause:A,dependencyName:"mongodb-client-encryption"})}}return F}});var G4=K((vR)=>{Object.defineProperty(vR,"__esModule",{value:!0});vR.AuthProvider=vR.AuthContext=void 0;var Ge=l();class bR{constructor(F,A,B){this.reauthenticating=!1,this.connection=F,this.credentials=A,this.options=B}}vR.AuthContext=bR;class yR{async prepare(F,A){return F}async reauth(F){if(F.reauthenticating)throw new Ge.MongoRuntimeError("Reauthentication already in progress.");try{F.reauthenticating=!0,await this.auth(F)}finally{F.reauthenticating=!1}}}vR.AuthProvider=yR});var dA=K((pR)=>{Object.defineProperty(pR,"__esModule",{value:!0});pR.GSSAPI=pR.GSSAPICanonicalizationValue=void 0;pR.performGSSAPICanonicalizeHostName=lR;pR.resolveCname=iY;var pY=import.meta.require("dns"),He=y6(),mR=l(),qe=a(),We=G4();pR.GSSAPICanonicalizationValue=Object.freeze({on:!0,off:!1,none:"none",forward:"forward",forwardAndReverse:"forwardAndReverse"});async function lY(F,A){return await F.command(qe.ns("$external.$cmd"),A)}var H5;class dR extends We.AuthProvider{async auth(F){let{connection:A,credentials:B}=F;if(B==null)throw new mR.MongoMissingCredentialsError("Credentials required for GSSAPI authentication");let{username:D}=B,J=await ze(F),X=await J.step(""),Z=await lY(A,Ce(X)),Y=await cR(J,10,Z.payload),$=await lY(A,Ke(Y,Z.conversationId)),G=await Ue(J,D,$.payload);await lY(A,{saslContinue:1,conversationId:$.conversationId,payload:G})}}pR.GSSAPI=dR;async function ze(F){let{hostAddress:A}=F.options,{credentials:B}=F;if(!A||typeof A.host!=="string"||!B)throw new mR.MongoInvalidArgumentError("Connection must have host and port and credentials defined.");if(Qe(),"kModuleError"in H5)throw H5.kModuleError;let{initializeClient:D}=H5,{username:J,password:X}=B,Z=B.mechanismProperties,Y=Z.SERVICE_NAME??"mongodb",$=await lR(A.host,Z),G={};if(X!=null)Object.assign(G,{user:J,password:X});let E=Z.SERVICE_HOST??$,H=`${Y}${process.platform==="win32"?"/":"@"}${E}`;if("SERVICE_REALM"in Z)H=`${H}@${Z.SERVICE_REALM}`;return await D(H,G)}function Ce(F){return{saslStart:1,mechanism:"GSSAPI",payload:F,autoAuthorize:1}}function Ke(F,A){return{saslContinue:1,conversationId:A,payload:F}}async function cR(F,A,B){try{return await F.step(B)||""}catch(D){if(A===0)throw D;return await cR(F,A-1,B)}}async function Ue(F,A,B){let D=await F.unwrap(B);return await F.wrap(D||"",{user:A})}async function lR(F,A){let B=A.CANONICALIZE_HOST_NAME;if(!B||B===pR.GSSAPICanonicalizationValue.none)return F;if(B===pR.GSSAPICanonicalizationValue.on||B===pR.GSSAPICanonicalizationValue.forwardAndReverse){let{address:D}=await pY.promises.lookup(F);try{let J=await pY.promises.resolvePtr(D);return J.length>0?J[0]:F}catch{return await iY(F)}}else return await iY(F)}async function iY(F){try{let A=await pY.promises.resolveCname(F);return A.length>0?A[0]:F}catch{return F}}function Qe(){if(!H5)H5=He.getKerberos()}});var B3=K((nR)=>{Object.defineProperty(nR,"__esModule",{value:!0});nR.AUTH_MECHS_AUTH_SRC_EXTERNAL=nR.AuthMechanism=void 0;nR.AuthMechanism=Object.freeze({MONGODB_AWS:"MONGODB-AWS",MONGODB_CR:"MONGODB-CR",MONGODB_DEFAULT:"DEFAULT",MONGODB_GSSAPI:"GSSAPI",MONGODB_PLAIN:"PLAIN",MONGODB_SCRAM_SHA1:"SCRAM-SHA-1",MONGODB_SCRAM_SHA256:"SCRAM-SHA-256",MONGODB_X509:"MONGODB-X509",MONGODB_OIDC:"MONGODB-OIDC"});nR.AUTH_MECHS_AUTH_SRC_EXTERNAL=new Set([nR.AuthMechanism.MONGODB_GSSAPI,nR.AuthMechanism.MONGODB_AWS,nR.AuthMechanism.MONGODB_OIDC,nR.AuthMechanism.MONGODB_X509])});var lA=K((tR)=>{Object.defineProperty(tR,"__esModule",{value:!0});tR.MongoCredentials=tR.DEFAULT_ALLOWED_HOSTS=void 0;var K6=l(),Re=dA(),Q2=B3();function we(F){if(F){if(Array.isArray(F.saslSupportedMechs))return F.saslSupportedMechs.includes(Q2.AuthMechanism.MONGODB_SCRAM_SHA256)?Q2.AuthMechanism.MONGODB_SCRAM_SHA256:Q2.AuthMechanism.MONGODB_SCRAM_SHA1}return Q2.AuthMechanism.MONGODB_SCRAM_SHA256}var aR=["test","azure","gcp","k8s"],rR="Auth mechanism property ALLOWED_HOSTS must be an array of strings.";tR.DEFAULT_ALLOWED_HOSTS=["*.mongodb.net","*.mongodb-qa.net","*.mongodb-dev.net","*.mongodbgov.net","localhost","127.0.0.1","::1"];var Ie="TOKEN_RESOURCE must be set in the auth mechanism properties when ENVIRONMENT is azure or gcp.";class cA{constructor(F){if(this.username=F.username??"",this.password=F.password,this.source=F.source,!this.source&&F.db)this.source=F.db;if(this.mechanism=F.mechanism||Q2.AuthMechanism.MONGODB_DEFAULT,this.mechanismProperties=F.mechanismProperties||{},this.mechanism.match(/MONGODB-AWS/i)){if(!this.username&&process.env.AWS_ACCESS_KEY_ID)this.username=process.env.AWS_ACCESS_KEY_ID;if(!this.password&&process.env.AWS_SECRET_ACCESS_KEY)this.password=process.env.AWS_SECRET_ACCESS_KEY;if(this.mechanismProperties.AWS_SESSION_TOKEN==null&&process.env.AWS_SESSION_TOKEN!=null)this.mechanismProperties={...this.mechanismProperties,AWS_SESSION_TOKEN:process.env.AWS_SESSION_TOKEN}}if(this.mechanism===Q2.AuthMechanism.MONGODB_OIDC&&!this.mechanismProperties.ALLOWED_HOSTS)this.mechanismProperties={...this.mechanismProperties,ALLOWED_HOSTS:tR.DEFAULT_ALLOWED_HOSTS};Object.freeze(this.mechanismProperties),Object.freeze(this)}equals(F){return this.mechanism===F.mechanism&&this.username===F.username&&this.password===F.password&&this.source===F.source}resolveAuthMechanism(F){if(this.mechanism.match(/DEFAULT/i))return new cA({username:this.username,password:this.password,source:this.source,mechanism:we(F),mechanismProperties:this.mechanismProperties});return this}validate(){if((this.mechanism===Q2.AuthMechanism.MONGODB_GSSAPI||this.mechanism===Q2.AuthMechanism.MONGODB_PLAIN||this.mechanism===Q2.AuthMechanism.MONGODB_SCRAM_SHA1||this.mechanism===Q2.AuthMechanism.MONGODB_SCRAM_SHA256)&&!this.username)throw new K6.MongoMissingCredentialsError(`Username required for mechanism '${this.mechanism}'`);if(this.mechanism===Q2.AuthMechanism.MONGODB_OIDC){if(this.username&&this.mechanismProperties.ENVIRONMENT&&this.mechanismProperties.ENVIRONMENT!=="azure")throw new K6.MongoInvalidArgumentError(`username and ENVIRONMENT '${this.mechanismProperties.ENVIRONMENT}' may not be used together for mechanism '${this.mechanism}'.`);if(this.username&&this.password)throw new K6.MongoInvalidArgumentError(`No password is allowed in ENVIRONMENT '${this.mechanismProperties.ENVIRONMENT}' for '${this.mechanism}'.`);if((this.mechanismProperties.ENVIRONMENT==="azure"||this.mechanismProperties.ENVIRONMENT==="gcp")&&!this.mechanismProperties.TOKEN_RESOURCE)throw new K6.MongoInvalidArgumentError(Ie);if(this.mechanismProperties.ENVIRONMENT&&!aR.includes(this.mechanismProperties.ENVIRONMENT))throw new K6.MongoInvalidArgumentError(`Currently only a ENVIRONMENT in ${aR.join(",")} is supported for mechanism '${this.mechanism}'.`);if(!this.mechanismProperties.ENVIRONMENT&&!this.mechanismProperties.OIDC_CALLBACK&&!this.mechanismProperties.OIDC_HUMAN_CALLBACK)throw new K6.MongoInvalidArgumentError(`Either a ENVIRONMENT, OIDC_CALLBACK, or OIDC_HUMAN_CALLBACK must be specified for mechanism '${this.mechanism}'.`);if(this.mechanismProperties.ALLOWED_HOSTS){let A=this.mechanismProperties.ALLOWED_HOSTS;if(!Array.isArray(A))throw new K6.MongoInvalidArgumentError(rR);for(let B of A)if(typeof B!=="string")throw new K6.MongoInvalidArgumentError(rR)}}if(Q2.AUTH_MECHS_AUTH_SRC_EXTERNAL.has(this.mechanism)){if(this.source!=null&&this.source!=="$external")throw new K6.MongoAPIError(`Invalid source '${this.source}' for mechanism '${this.mechanism}' specified.`)}if(this.mechanism===Q2.AuthMechanism.MONGODB_PLAIN&&this.source==null)throw new K6.MongoAPIError("PLAIN Authentication Mechanism needs an auth source");if(this.mechanism===Q2.AuthMechanism.MONGODB_X509&&this.password!=null){if(this.password===""){Reflect.set(this,"password",void 0);return}throw new K6.MongoAPIError("Password not allowed for mechanism MONGODB-X509")}let F=this.mechanismProperties.CANONICALIZE_HOST_NAME??!1;if(!Object.values(Re.GSSAPICanonicalizationValue).includes(F))throw new K6.MongoAPIError(`Invalid CANONICALIZE_HOST_NAME value: ${F}`)}static merge(F,A){return new cA({username:A.username??F?.username??"",password:A.password??F?.password??"",mechanism:A.mechanism??F?.mechanism??Q2.AuthMechanism.MONGODB_DEFAULT,mechanismProperties:A.mechanismProperties??F?.mechanismProperties??{},source:A.source??A.db??F?.source??"admin"})}}tR.MongoCredentials=cA});var iA=K((Dw)=>{function y1(F,A,B){if(B.globals)F=B.globals[F.name];return new F(`${B.context?B.context:"Value"} ${A}.`)}function X7(F,A){if(typeof F==="bigint")throw y1(TypeError,"is a BigInt which cannot be converted to a number",A);if(!A.globals)return Number(F);return A.globals.Number(F)}function Aw(F){if(F>0&&F%1===0.5&&(F&1)===0||F<0&&F%1===-0.5&&(F&1)===1)return W5(Math.floor(F));return W5(Math.round(F))}function pA(F){return W5(Math.trunc(F))}function Fw(F){return F<0?-1:1}function Ne(F,A){let B=F%A;if(Fw(A)!==Fw(B))return B+A;return B}function W5(F){return F===0?0:F}function Z7(F,{unsigned:A}){let B,D;if(A)B=0,D=2**F-1;else B=-(2**(F-1)),D=2**(F-1)-1;let J=2**F,X=2**(F-1);return(Z,Y={})=>{let $=X7(Z,Y);if($=W5($),Y.enforceRange){if(!Number.isFinite($))throw y1(TypeError,"is not a finite number",Y);if($=pA($),$<B||$>D)throw y1(TypeError,`is outside the accepted range of ${B} to ${D}, inclusive`,Y);return $}if(!Number.isNaN($)&&Y.clamp)return $=Math.min(Math.max($,B),D),$=Aw($),$;if(!Number.isFinite($)||$===0)return 0;if($=pA($),$>=B&&$<=D)return $;if($=Ne($,J),!A&&$>=X)return $-J;return $}}function Bw(F,{unsigned:A}){let B=Number.MAX_SAFE_INTEGER,D=A?0:Number.MIN_SAFE_INTEGER,J=A?BigInt.asUintN:BigInt.asIntN;return(X,Z={})=>{let Y=X7(X,Z);if(Y=W5(Y),Z.enforceRange){if(!Number.isFinite(Y))throw y1(TypeError,"is not a finite number",Z);if(Y=pA(Y),Y<D||Y>B)throw y1(TypeError,`is outside the accepted range of ${D} to ${B}, inclusive`,Z);return Y}if(!Number.isNaN(Y)&&Z.clamp)return Y=Math.min(Math.max(Y,D),B),Y=Aw(Y),Y;if(!Number.isFinite(Y)||Y===0)return 0;let $=BigInt(pA(Y));return $=J(F,$),Number($)}}Dw.any=(F)=>{return F};Dw.undefined=()=>{return};Dw.boolean=(F)=>{return Boolean(F)};Dw.byte=Z7(8,{unsigned:!1});Dw.octet=Z7(8,{unsigned:!0});Dw.short=Z7(16,{unsigned:!1});Dw["unsigned short"]=Z7(16,{unsigned:!0});Dw.long=Z7(32,{unsigned:!1});Dw["unsigned long"]=Z7(32,{unsigned:!0});Dw["long long"]=Bw(64,{unsigned:!1});Dw["unsigned long long"]=Bw(64,{unsigned:!0});Dw.double=(F,A={})=>{let B=X7(F,A);if(!Number.isFinite(B))throw y1(TypeError,"is not a finite floating-point value",A);return B};Dw["unrestricted double"]=(F,A={})=>{return X7(F,A)};Dw.float=(F,A={})=>{let B=X7(F,A);if(!Number.isFinite(B))throw y1(TypeError,"is not a finite floating-point value",A);if(Object.is(B,-0))return B;let D=Math.fround(B);if(!Number.isFinite(D))throw y1(TypeError,"is outside the range of a single-precision floating-point value",A);return D};Dw["unrestricted float"]=(F,A={})=>{let B=X7(F,A);if(isNaN(B))return B;if(Object.is(B,-0))return B;return Math.fround(B)};Dw.DOMString=(F,A={})=>{if(A.treatNullAsEmptyString&&F===null)return"";if(typeof F==="symbol")throw y1(TypeError,"is a symbol, which cannot be converted to a string",A);return(A.globals?A.globals.String:String)(F)};Dw.ByteString=(F,A={})=>{let B=Dw.DOMString(F,A),D;for(let J=0;(D=B.codePointAt(J))!==void 0;++J)if(D>255)throw y1(TypeError,"is not a valid ByteString",A);return B};Dw.USVString=(F,A={})=>{let B=Dw.DOMString(F,A),D=B.length,J=[];for(let X=0;X<D;++X){let Z=B.charCodeAt(X);if(Z<55296||Z>57343)J.push(String.fromCodePoint(Z));else if(56320<=Z&&Z<=57343)J.push(String.fromCodePoint(65533));else if(X===D-1)J.push(String.fromCodePoint(65533));else{let Y=B.charCodeAt(X+1);if(56320<=Y&&Y<=57343){let $=Z&1023,G=Y&1023;J.push(String.fromCodePoint(65536+1024*$+G)),++X}else J.push(String.fromCodePoint(65533))}}return J.join("")};Dw.object=(F,A={})=>{if(F===null||typeof F!=="object"&&typeof F!=="function")throw y1(TypeError,"is not an object",A);return F};var Pe=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get,Me=typeof SharedArrayBuffer==="function"?Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype,"byteLength").get:null;function nY(F){try{return Pe.call(F),!0}catch{return!1}}function D7(F){try{return Me.call(F),!0}catch{return!1}}function J7(F){try{return new Uint8Array(F),!1}catch{return!0}}Dw.ArrayBuffer=(F,A={})=>{if(!nY(F)){if(A.allowShared&&!D7(F))throw y1(TypeError,"is not an ArrayBuffer or SharedArrayBuffer",A);throw y1(TypeError,"is not an ArrayBuffer",A)}if(J7(F))throw y1(TypeError,"is a detached ArrayBuffer",A);return F};var Te=Object.getOwnPropertyDescriptor(DataView.prototype,"byteLength").get;Dw.DataView=(F,A={})=>{try{Te.call(F)}catch(B){throw y1(TypeError,"is not a DataView",A)}if(!A.allowShared&&D7(F.buffer))throw y1(TypeError,"is backed by a SharedArrayBuffer, which is not allowed",A);if(J7(F.buffer))throw y1(TypeError,"is backed by a detached ArrayBuffer",A);return F};var je=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array).prototype,Symbol.toStringTag).get;[Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Uint8ClampedArray,Float32Array,Float64Array].forEach((F)=>{let{name:A}=F,B=/^[AEIOU]/u.test(A)?"an":"a";Dw[A]=(D,J={})=>{if(!ArrayBuffer.isView(D)||je.call(D)!==A)throw y1(TypeError,`is not ${B} ${A} object`,J);if(!J.allowShared&&D7(D.buffer))throw y1(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",J);if(J7(D.buffer))throw y1(TypeError,"is a view on a detached ArrayBuffer",J);return D}});Dw.ArrayBufferView=(F,A={})=>{if(!ArrayBuffer.isView(F))throw y1(TypeError,"is not a view on an ArrayBuffer or SharedArrayBuffer",A);if(!A.allowShared&&D7(F.buffer))throw y1(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",A);if(J7(F.buffer))throw y1(TypeError,"is a view on a detached ArrayBuffer",A);return F};Dw.BufferSource=(F,A={})=>{if(ArrayBuffer.isView(F)){if(!A.allowShared&&D7(F.buffer))throw y1(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",A);if(J7(F.buffer))throw y1(TypeError,"is a view on a detached ArrayBuffer",A);return F}if(!A.allowShared&&!nY(F))throw y1(TypeError,"is not an ArrayBuffer or a view on one",A);if(A.allowShared&&!D7(F)&&!nY(F))throw y1(TypeError,"is not an ArrayBuffer, SharedArrayBuffer, or a view on one",A);if(J7(F))throw y1(TypeError,"is a detached ArrayBuffer",A);return F};Dw.DOMTimeStamp=Dw["unsigned long long"]});var sA=K((Hw,qw)=>{function te(F){return typeof F==="object"&&F!==null||typeof F==="function"}var Xw=Function.prototype.call.bind(Object.prototype.hasOwnProperty);function oe(F,A){for(let B of Reflect.ownKeys(A)){let D=Reflect.getOwnPropertyDescriptor(A,B);if(D&&!Reflect.defineProperty(F,B,D))throw new TypeError(`Cannot redefine property: ${String(B)}`)}}function ee(F,A){let B=$w(F);return Object.defineProperties(Object.create(B["%Object.prototype%"]),Object.getOwnPropertyDescriptors(A))}var Zw=Symbol("wrapper"),Yw=Symbol("impl"),Y7=Symbol("SameObject caches"),nA=Symbol.for("[webidl2js] constructor registry"),F11=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);function $w(F){if(Xw(F,nA))return F[nA];let A=Object.create(null);A["%Object.prototype%"]=F.Object.prototype,A["%IteratorPrototype%"]=Object.getPrototypeOf(Object.getPrototypeOf(new F.Array()[Symbol.iterator]()));try{A["%AsyncIteratorPrototype%"]=Object.getPrototypeOf(Object.getPrototypeOf(F.eval("(async function* () {})").prototype))}catch{A["%AsyncIteratorPrototype%"]=F11}return F[nA]=A,A}function A11(F,A,B){if(!F[Y7])F[Y7]=Object.create(null);if(A in F[Y7])return F[Y7][A];return F[Y7][A]=B(),F[Y7][A]}function Gw(F){return F?F[Zw]:null}function Ew(F){return F?F[Yw]:null}function B11(F){let A=Gw(F);return A?A:F}function D11(F){let A=Ew(F);return A?A:F}var J11=Symbol("internal");function X11(F){if(typeof F!=="string")return!1;let A=F>>>0;if(A===4294967295)return!1;let B=`${A}`;if(F!==B)return!1;return!0}var Z11=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get;function Y11(F){try{return Z11.call(F),!0}catch(A){return!1}}function $11([F,A],B){let D;switch(B){case"key":D=F;break;case"value":D=A;break;case"key+value":D=[F,A];break}return{value:D,done:!1}}var G11=Symbol("supports property index"),E11=Symbol("supported property indices"),H11=Symbol("supports property name"),q11=Symbol("supported property names"),W11=Symbol("indexed property get"),z11=Symbol("indexed property set new"),C11=Symbol("indexed property set existing"),K11=Symbol("named property get"),U11=Symbol("named property set new"),Q11=Symbol("named property set existing"),L11=Symbol("named property delete"),V11=Symbol("async iterator get the next iteration result"),R11=Symbol("async iterator return steps"),w11=Symbol("async iterator initialization steps"),I11=Symbol("async iterator end of iteration");qw.exports=Hw={isObject:te,hasOwn:Xw,define:oe,newObjectInRealm:ee,wrapperSymbol:Zw,implSymbol:Yw,getSameObject:A11,ctorRegistrySymbol:nA,initCtorRegistry:$w,wrapperForImpl:Gw,implForWrapper:Ew,tryWrapperForImpl:B11,tryImplForWrapper:D11,iterInternalSymbol:J11,isArrayBuffer:Y11,isArrayIndexPropName:X11,supportsPropertyIndex:G11,supportedPropertyIndices:E11,supportsPropertyName:H11,supportedPropertyNames:q11,indexedGet:W11,indexedSetNew:z11,indexedSetExisting:C11,namedGet:K11,namedSetNew:U11,namedSetExisting:Q11,namedDelete:L11,asyncIteratorNext:V11,asyncIteratorReturn:R11,asyncIteratorInit:w11,asyncIteratorEOI:I11,iteratorResult:$11}});var Vw=K((RQ1,Lw)=>{var N11=/^xn--/,P11=/[^\0-\x7F]/,M11=/[\x2E\u3002\uFF0E\uFF61]/g,T11={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D3=Math.floor,aY=String.fromCharCode;function E4(F){throw new RangeError(T11[F])}function j11(F,A){let B=[],D=F.length;while(D--)B[D]=A(F[D]);return B}function zw(F,A){let B=F.split("@"),D="";if(B.length>1)D=B[0]+"@",F=B[1];F=F.replace(M11,".");let J=F.split("."),X=j11(J,A).join(".");return D+X}function Cw(F){let A=[],B=0,D=F.length;while(B<D){let J=F.charCodeAt(B++);if(J>=55296&&J<=56319&&B<D){let X=F.charCodeAt(B++);if((X&64512)==56320)A.push(((J&1023)<<10)+(X&1023)+65536);else A.push(J),B--}else A.push(J)}return A}var k11=(F)=>String.fromCodePoint(...F),O11=function(F){if(F>=48&&F<58)return 26+(F-48);if(F>=65&&F<91)return F-65;if(F>=97&&F<123)return F-97;return 36},Ww=function(F,A){return F+22+75*(F<26)-((A!=0)<<5)},Kw=function(F,A,B){let D=0;F=B?D3(F/700):F>>1,F+=D3(F/A);for(;F>455;D+=36)F=D3(F/35);return D3(D+36*F/(F+38))},Uw=function(F){let A=[],B=F.length,D=0,J=128,X=72,Z=F.lastIndexOf("-");if(Z<0)Z=0;for(let Y=0;Y<Z;++Y){if(F.charCodeAt(Y)>=128)E4("not-basic");A.push(F.charCodeAt(Y))}for(let Y=Z>0?Z+1:0;Y<B;){let $=D;for(let E=1,H=36;;H+=36){if(Y>=B)E4("invalid-input");let q=O11(F.charCodeAt(Y++));if(q>=36)E4("invalid-input");if(q>D3((2147483647-D)/E))E4("overflow");D+=q*E;let W=H<=X?1:H>=X+26?26:H-X;if(q<W)break;let z=36-W;if(E>D3(2147483647/z))E4("overflow");E*=z}let G=A.length+1;if(X=Kw(D-$,G,$==0),D3(D/G)>2147483647-J)E4("overflow");J+=D3(D/G),D%=G,A.splice(D++,0,J)}return String.fromCodePoint(...A)},Qw=function(F){let A=[];F=Cw(F);let B=F.length,D=128,J=0,X=72;for(let $ of F)if($<128)A.push(aY($));let Z=A.length,Y=Z;if(Z)A.push("-");while(Y<B){let $=2147483647;for(let E of F)if(E>=D&&E<$)$=E;let G=Y+1;if($-D>D3((2147483647-J)/G))E4("overflow");J+=($-D)*G,D=$;for(let E of F){if(E<D&&++J>2147483647)E4("overflow");if(E===D){let H=J;for(let q=36;;q+=36){let W=q<=X?1:q>=X+26?26:q-X;if(H<W)break;let z=H-W,C=36-W;A.push(aY(Ww(W+z%C,0))),H=D3(z/C)}A.push(aY(Ww(H,0))),X=Kw(J,G,Y===Z),J=0,++Y}}++J,++D}return A.join("")},S11=function(F){return zw(F,function(A){return N11.test(A)?Uw(A.slice(4).toLowerCase()):A})},u11=function(F){return zw(F,function(A){return P11.test(A)?"xn--"+Qw(A):A})},x11={version:"2.3.1",ucs2:{decode:Cw,encode:k11},decode:Uw,encode:Qw,toASCII:u11,toUnicode:S11};Lw.exports=x11});var ww=K((wQ1,Rw)=>{var f11=/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10EAB}\u{10EAC}\u{10EFD}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11000}-\u{11002}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11082}\u{110B0}-\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{11134}\u{11145}\u{11146}\u{11173}\u{11180}-\u{11182}\u{111B3}-\u{111C0}\u{111C9}-\u{111CC}\u{111CE}\u{111CF}\u{1122C}-\u{11237}\u{1123E}\u{11241}\u{112DF}-\u{112EA}\u{11300}-\u{11303}\u{1133B}\u{1133C}\u{1133E}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11357}\u{11362}\u{11363}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11435}-\u{11446}\u{1145E}\u{114B0}-\u{114C3}\u{115AF}-\u{115B5}\u{115B8}-\u{115C0}\u{115DC}\u{115DD}\u{11630}-\u{11640}\u{116AB}-\u{116B7}\u{1171D}-\u{1172B}\u{1182C}-\u{1183A}\u{11930}-\u{11935}\u{11937}\u{11938}\u{1193B}-\u{1193E}\u{11940}\u{11942}\u{11943}\u{119D1}-\u{119D7}\u{119DA}-\u{119E0}\u{119E4}\u{11A01}-\u{11A0A}\u{11A33}-\u{11A39}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A5B}\u{11A8A}-\u{11A99}\u{11C2F}-\u{11C36}\u{11C38}-\u{11C3F}\u{11C92}-\u{11CA7}\u{11CA9}-\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D8A}-\u{11D8E}\u{11D90}\u{11D91}\u{11D93}-\u{11D97}\u{11EF3}-\u{11EF6}\u{11F00}\u{11F01}\u{11F03}\u{11F34}-\u{11F3A}\u{11F3E}-\u{11F42}\u{13440}\u{13447}-\u{13455}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F51}-\u{16F87}\u{16F8F}-\u{16F92}\u{16FE4}\u{16FF0}\u{16FF1}\u{1BC9D}\u{1BC9E}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D165}-\u{1D169}\u{1D16D}-\u{1D172}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{E0100}-\u{E01EF}]/u,_11=/[\u094D\u09CD\u0A4D\u0ACD\u0B4D\u0BCD\u0C4D\u0CCD\u0D3B\u0D3C\u0D4D\u0DCA\u0E3A\u0EBA\u0F84\u1039\u103A\u1714\u1734\u17D2\u1A60\u1B44\u1BAA\u1BAB\u1BF2\u1BF3\u2D7F\uA806\uA8C4\uA953\uA9C0\uAAF6\uABED\u{10A3F}\u{11046}\u{1107F}\u{110B9}\u{11133}\u{11134}\u{111C0}\u{11235}\u{112EA}\u{1134D}\u{11442}\u{114C2}\u{115BF}\u{1163F}\u{116B6}\u{1172B}\u{11839}\u{119E0}\u{11A34}\u{11A47}\u{11A99}\u{11C3F}\u{11D44}\u{11D45}\u{11D97}]/u,g11=/[\u0620\u0626\u0628\u062A-\u062E\u0633-\u063F\u0641-\u0647\u0649\u064A\u066E\u066F\u0678-\u0687\u069A-\u06BF\u06C1\u06C2\u06CC\u06CE\u06D0\u06D1\u06FA-\u06FC\u06FF\u0712-\u0714\u071A-\u071D\u071F-\u0727\u0729\u072B\u072D\u072E\u074E-\u0758\u075C-\u076A\u076D-\u0770\u0772\u0775-\u0777\u077A-\u077F\u07CA-\u07EA\u0841-\u0845\u0848\u084A-\u0853\u0855\u0860\u0862-\u0865\u0868\u08A0-\u08A9\u08AF\u08B0\u08B3\u08B4\u08B6-\u08B8\u08BA-\u08BD\u1807\u1820-\u1878\u1887-\u18A8\u18AA\uA840-\uA872\u{10AC0}-\u{10AC4}\u{10ACD}\u{10AD3}-\u{10ADC}\u{10ADE}-\u{10AE0}\u{10AEB}-\u{10AEE}\u{10B80}\u{10B82}\u{10B86}-\u{10B88}\u{10B8A}\u{10B8B}\u{10B8D}\u{10B90}\u{10BAD}\u{10BAE}\u{10D00}-\u{10D21}\u{10D23}\u{10F30}-\u{10F32}\u{10F34}-\u{10F44}\u{10F51}-\u{10F53}\u{1E900}-\u{1E943}][\xAD\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u061C\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u070F\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200B\u200E\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFEFF\uFFF9-\uFFFB\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10F46}-\u{10F50}\u{11001}\u{11038}-\u{11046}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}-\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C3F}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{13430}-\u{13438}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{1BC9D}\u{1BC9E}\u{1BCA0}-\u{1BCA3}\u{1D167}-\u{1D169}\u{1D173}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E130}-\u{1E136}\u{1E2EC}-\u{1E2EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94B}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}]*\u200C[\xAD\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u061C\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u070F\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200B\u200E\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFEFF\uFFF9-\uFFFB\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10F46}-\u{10F50}\u{11001}\u{11038}-\u{11046}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}-\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C3F}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{13430}-\u{13438}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{1BC9D}\u{1BC9E}\u{1BCA0}-\u{1BCA3}\u{1D167}-\u{1D169}\u{1D173}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E130}-\u{1E136}\u{1E2EC}-\u{1E2EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94B}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}]*[\u0620\u0622-\u063F\u0641-\u064A\u066E\u066F\u0671-\u0673\u0675-\u06D3\u06D5\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u077F\u07CA-\u07EA\u0840-\u0855\u0860\u0862-\u0865\u0867-\u086A\u08A0-\u08AC\u08AE-\u08B4\u08B6-\u08BD\u1807\u1820-\u1878\u1887-\u18A8\u18AA\uA840-\uA871\u{10AC0}-\u{10AC5}\u{10AC7}\u{10AC9}\u{10ACA}\u{10ACE}-\u{10AD6}\u{10AD8}-\u{10AE1}\u{10AE4}\u{10AEB}-\u{10AEF}\u{10B80}-\u{10B91}\u{10BA9}-\u{10BAE}\u{10D01}-\u{10D23}\u{10F30}-\u{10F44}\u{10F51}-\u{10F54}\u{1E900}-\u{1E943}]/u,b11=/[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05EA\u05EF-\u05F4\u0600-\u0605\u0608\u060B\u060D\u061B-\u064A\u0660-\u0669\u066B-\u066F\u0671-\u06D5\u06DD\u06E5\u06E6\u06EE\u06EF\u06FA-\u070D\u070F\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u083E\u0840-\u0858\u085E\u0860-\u086A\u0870-\u088E\u0890\u0891\u08A0-\u08C9\u08E2\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE70-\uFE74\uFE76-\uFEFC\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE4}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EAD}\u{10EB0}\u{10EB1}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F59}\u{10F70}-\u{10F81}\u{10F86}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}]/u,y11=/[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02BB-\u02C1\u02D0\u02D1\u02E0-\u02E4\u02EE\u0370-\u0373\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0482\u048A-\u052F\u0531-\u0556\u0559-\u0589\u0903-\u0939\u093B\u093D-\u0940\u0949-\u094C\u094E-\u0950\u0958-\u0961\u0964-\u0980\u0982\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C0\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09FA\u09FC\u09FD\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A40\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A76\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC0\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0\u0AE1\u0AE6-\u0AF0\u0AF9\u0B02\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0BE6-\u0BF2\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C41-\u0C44\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C77\u0C7F\u0C80\u0C82-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D02-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D4F\u0D54-\u0D61\u0D66-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E4F-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F17\u0F1A-\u0F34\u0F36\u0F38\u0F3E-\u0F47\u0F49-\u0F6C\u0F7F\u0F85\u0F88-\u0F8C\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u1000-\u102C\u1031\u1038\u103B\u103C\u103F-\u1057\u105A-\u105D\u1061-\u1070\u1075-\u1081\u1083\u1084\u1087-\u108C\u108E-\u109C\u109E-\u10C5\u10C7\u10CD\u10D0-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1360-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u167F\u1681-\u169A\u16A0-\u16F8\u1700-\u1711\u1715\u171F-\u1731\u1734-\u1736\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17B6\u17BE-\u17C5\u17C7\u17C8\u17D4-\u17DA\u17DC\u17E0-\u17E9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A19\u1A1A\u1A1E-\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1A80-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD\u1B04-\u1B33\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B4C\u1B50-\u1B6A\u1B74-\u1B7E\u1B82-\u1BA1\u1BA6\u1BA7\u1BAA\u1BAE-\u1BE5\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1BFC-\u1C2B\u1C34\u1C35\u1C3B-\u1C49\u1C4D-\u1C88\u1C90-\u1CBA\u1CBD-\u1CC7\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5-\u1CF7\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200E\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u214F\u2160-\u2188\u2336-\u237A\u2395\u249C-\u24E9\u26AC\u2800-\u28FF\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D70\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u302E\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\u31BF\u31F0-\u321C\u3220-\u324F\u3260-\u327B\u327F-\u32B0\u32C0-\u32CB\u32D0-\u3376\u337B-\u33DD\u33E0-\u33FE\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA60C\uA610-\uA62B\uA640-\uA66E\uA680-\uA69D\uA6A0-\uA6EF\uA6F2-\uA6F7\uA722-\uA787\uA789-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA824\uA827\uA830-\uA837\uA840-\uA873\uA880-\uA8C3\uA8CE-\uA8D9\uA8F2-\uA8FE\uA900-\uA925\uA92E-\uA946\uA952\uA953\uA95F-\uA97C\uA983-\uA9B2\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9CD\uA9CF-\uA9D9\uA9DE-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA2F\uAA30\uAA33\uAA34\uAA40-\uAA42\uAA44-\uAA4B\uAA4D\uAA50-\uAA59\uAA5C-\uAA7B\uAA7D-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAAEB\uAAEE-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB69\uAB70-\uABE4\uABE6\uABE7\uABE9-\uABEC\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uD800-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10100}\u{10102}\u{10107}-\u{10133}\u{10137}-\u{1013F}\u{1018D}\u{1018E}\u{101D0}-\u{101FC}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{1039F}-\u{103C3}\u{103C8}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{1056F}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{11000}\u{11002}-\u{11037}\u{11047}-\u{1104D}\u{11066}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11082}-\u{110B2}\u{110B7}\u{110B8}\u{110BB}-\u{110C1}\u{110CD}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{1112C}\u{11136}-\u{11147}\u{11150}-\u{11172}\u{11174}-\u{11176}\u{11182}-\u{111B5}\u{111BF}-\u{111C8}\u{111CD}\u{111CE}\u{111D0}-\u{111DF}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122E}\u{11232}\u{11233}\u{11235}\u{11238}-\u{1123D}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A9}\u{112B0}-\u{112DE}\u{112E0}-\u{112E2}\u{112F0}-\u{112F9}\u{11302}\u{11303}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}-\u{1133F}\u{11341}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11350}\u{11357}\u{1135D}-\u{11363}\u{11400}-\u{11437}\u{11440}\u{11441}\u{11445}\u{11447}-\u{1145B}\u{1145D}\u{1145F}-\u{11461}\u{11480}-\u{114B2}\u{114B9}\u{114BB}-\u{114BE}\u{114C1}\u{114C4}-\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115B1}\u{115B8}-\u{115BB}\u{115BE}\u{115C1}-\u{115DB}\u{11600}-\u{11632}\u{1163B}\u{1163C}\u{1163E}\u{11641}-\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116AC}\u{116AE}\u{116AF}\u{116B6}\u{116B8}\u{116B9}\u{116C0}-\u{116C9}\u{11700}-\u{1171A}\u{11720}\u{11721}\u{11726}\u{11730}-\u{11746}\u{11800}-\u{1182E}\u{11838}\u{1183B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{11935}\u{11937}\u{11938}\u{1193D}\u{1193F}-\u{11942}\u{11944}-\u{11946}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D3}\u{119DC}-\u{119DF}\u{119E1}-\u{119E4}\u{11A00}\u{11A07}\u{11A08}\u{11A0B}-\u{11A32}\u{11A39}\u{11A3A}\u{11A3F}-\u{11A46}\u{11A50}\u{11A57}\u{11A58}\u{11A5C}-\u{11A89}\u{11A97}\u{11A9A}-\u{11AA2}\u{11AB0}-\u{11AF8}\u{11B00}-\u{11B09}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2F}\u{11C3E}-\u{11C45}\u{11C50}-\u{11C6C}\u{11C70}-\u{11C8F}\u{11CA9}\u{11CB1}\u{11CB4}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D8E}\u{11D93}\u{11D94}\u{11D96}\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF2}\u{11EF5}-\u{11EF8}\u{11F02}-\u{11F10}\u{11F12}-\u{11F35}\u{11F3E}\u{11F3F}\u{11F41}\u{11F43}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{11FFF}-\u{12399}\u{12400}-\u{1246E}\u{12470}-\u{12474}\u{12480}-\u{12543}\u{12F90}-\u{12FF2}\u{13000}-\u{1343F}\u{13441}-\u{13446}\u{14400}-\u{14646}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A6E}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16AF5}\u{16B00}-\u{16B2F}\u{16B37}-\u{16B45}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16E40}-\u{16E9A}\u{16F00}-\u{16F4A}\u{16F50}-\u{16F87}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF0}\u{16FF1}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18D00}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1BC9C}\u{1BC9F}\u{1CF50}-\u{1CFC3}\u{1D000}-\u{1D0F5}\u{1D100}-\u{1D126}\u{1D129}-\u{1D166}\u{1D16A}-\u{1D172}\u{1D183}\u{1D184}\u{1D18C}-\u{1D1A9}\u{1D1AE}-\u{1D1E8}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6DA}\u{1D6DC}-\u{1D714}\u{1D716}-\u{1D74E}\u{1D750}-\u{1D788}\u{1D78A}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D800}-\u{1D9FF}\u{1DA37}-\u{1DA3A}\u{1DA6D}-\u{1DA74}\u{1DA76}-\u{1DA83}\u{1DA85}-\u{1DA8B}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E14F}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1F110}-\u{1F12E}\u{1F130}-\u{1F169}\u{1F170}-\u{1F1AC}\u{1F1E6}-\u{1F202}\u{1F210}-\u{1F23B}\u{1F240}-\u{1F248}\u{1F250}\u{1F251}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}]/u,v11=/[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05EA\u05EF-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u070D\u070F\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u083E\u0840-\u0858\u085E\u0860-\u086A\u0870-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE70-\uFE74\uFE76-\uFEFC\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE4}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10E80}-\u{10EA9}\u{10EAD}\u{10EB0}\u{10EB1}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F59}\u{10F70}-\u{10F81}\u{10F86}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}]/u,h11=/^[\0-\x08\x0E-\x1B!-@\[-`\{-\x84\x86-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02B9\u02BA\u02C2-\u02CF\u02D2-\u02DF\u02E5-\u02ED\u02EF-\u036F\u0374\u0375\u037E\u0384\u0385\u0387\u03F6\u0483-\u0489\u058A\u058D-\u058F\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\u0600-\u070D\u070F-\u074A\u074D-\u07B1\u07C0-\u07FA\u07FD-\u082D\u0830-\u083E\u0840-\u085B\u085E\u0860-\u086A\u0870-\u088E\u0890\u0891\u0898-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09F2\u09F3\u09FB\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AF1\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0BF3-\u0BFA\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C78-\u0C7E\u0C81\u0CBC\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E3F\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39-\u0F3D\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1390-\u1399\u1400\u169B\u169C\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DB\u17DD\u17F0-\u17F9\u1800-\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1940\u1944\u1945\u19DE-\u19FF\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u200B-\u200D\u200F-\u2027\u202F-\u205E\u2060-\u2064\u206A-\u2070\u2074-\u207E\u2080-\u208E\u20A0-\u20C0\u20D0-\u20F0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u2150-\u215F\u2189-\u218B\u2190-\u2335\u237B-\u2394\u2396-\u2426\u2440-\u244A\u2460-\u249B\u24EA-\u26AB\u26AD-\u27FF\u2900-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF9-\u2CFF\u2D7F\u2DE0-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u3004\u3008-\u3020\u302A-\u302D\u3030\u3036\u3037\u303D-\u303F\u3099-\u309C\u30A0\u30FB\u31C0-\u31E3\u321D\u321E\u3250-\u325F\u327C-\u327E\u32B1-\u32BF\u32CC-\u32CF\u3377-\u337A\u33DE\u33DF\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA60D-\uA60F\uA66F-\uA67F\uA69E\uA69F\uA6F0\uA6F1\uA700-\uA721\uA788\uA802\uA806\uA80B\uA825\uA826\uA828-\uA82C\uA838\uA839\uA874-\uA877\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uAB6A\uAB6B\uABE5\uABE8\uABED\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD8F\uFD92-\uFDC7\uFDCF\uFDF0-\uFE19\uFE20-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFE70-\uFE74\uFE76-\uFEFC\uFEFF\uFF01-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFF9-\uFFFD\u{10101}\u{10140}-\u{1018C}\u{10190}-\u{1019C}\u{101A0}\u{101FD}\u{102E0}-\u{102FB}\u{10376}-\u{1037A}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{1091F}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A38}-\u{10A3A}\u{10A3F}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE6}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B39}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D27}\u{10D30}-\u{10D39}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EAB}-\u{10EAD}\u{10EB0}\u{10EB1}\u{10EFD}-\u{10F27}\u{10F30}-\u{10F59}\u{10F70}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{11001}\u{11038}-\u{11046}\u{11052}-\u{11065}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{11660}-\u{1166C}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}-\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A06}\u{11A09}\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11FD5}-\u{11FF1}\u{13440}\u{13447}-\u{13455}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE2}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1BCA0}-\u{1BCA3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D173}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D1E9}\u{1D1EA}\u{1D200}-\u{1D245}\u{1D300}-\u{1D356}\u{1D6DB}\u{1D715}\u{1D74F}\u{1D789}\u{1D7C3}\u{1D7CE}-\u{1D7FF}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E2FF}\u{1E4EC}-\u{1E4EF}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8D6}\u{1E900}-\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1EEF0}\u{1EEF1}\u{1F000}-\u{1F02B}\u{1F030}-\u{1F093}\u{1F0A0}-\u{1F0AE}\u{1F0B1}-\u{1F0BF}\u{1F0C1}-\u{1F0CF}\u{1F0D1}-\u{1F0F5}\u{1F100}-\u{1F10F}\u{1F12F}\u{1F16A}-\u{1F16F}\u{1F1AD}\u{1F260}-\u{1F265}\u{1F300}-\u{1F6D7}\u{1F6DC}-\u{1F6EC}\u{1F6F0}-\u{1F6FC}\u{1F700}-\u{1F776}\u{1F77B}-\u{1F7D9}\u{1F7E0}-\u{1F7EB}\u{1F7F0}\u{1F800}-\u{1F80B}\u{1F810}-\u{1F847}\u{1F850}-\u{1F859}\u{1F860}-\u{1F887}\u{1F890}-\u{1F8AD}\u{1F8B0}\u{1F8B1}\u{1F900}-\u{1FA53}\u{1FA60}-\u{1FA6D}\u{1FA70}-\u{1FA7C}\u{1FA80}-\u{1FA88}\u{1FA90}-\u{1FABD}\u{1FABF}-\u{1FAC5}\u{1FACE}-\u{1FADB}\u{1FAE0}-\u{1FAE8}\u{1FAF0}-\u{1FAF8}\u{1FB00}-\u{1FB92}\u{1FB94}-\u{1FBCA}\u{1FBF0}-\u{1FBF9}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}]*$/u,m11=/[0-9\xB2\xB3\xB9\u05BE\u05C0\u05C3\u05C6\u05D0-\u05EA\u05EF-\u05F4\u0600-\u0605\u0608\u060B\u060D\u061B-\u064A\u0660-\u0669\u066B-\u066F\u0671-\u06D5\u06DD\u06E5\u06E6\u06EE-\u070D\u070F\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u083E\u0840-\u0858\u085E\u0860-\u086A\u0870-\u088E\u0890\u0891\u08A0-\u08C9\u08E2\u200F\u2070\u2074-\u2079\u2080-\u2089\u2488-\u249B\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\u{102E1}-\u{102FB}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE4}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EAD}\u{10EB0}\u{10EB1}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F59}\u{10F70}-\u{10F81}\u{10F86}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{1D7CE}-\u{1D7FF}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1F100}-\u{1F10A}\u{1FBF0}-\u{1FBF9}][\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10EAB}\u{10EAC}\u{10EFD}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}-\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A06}\u{11A09}\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{13440}\u{13447}-\u{13455}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{E0100}-\u{E01EF}]*$/u,d11=/[0-9\xB2\xB3\xB9\u06F0-\u06F9\u2070\u2074-\u2079\u2080-\u2089\u2488-\u249B\uFF10-\uFF19\u{102E1}-\u{102FB}\u{1D7CE}-\u{1D7FF}\u{1F100}-\u{1F10A}\u{1FBF0}-\u{1FBF9}]/u,c11=/[\u0600-\u0605\u0660-\u0669\u066B\u066C\u06DD\u0890\u0891\u08E2\u{10D30}-\u{10D39}\u{10E60}-\u{10E7E}]/u,l11=/^[\0-\x08\x0E-\x1B!-\x84\x86-\u0377\u037A-\u037F\u0384-\u038A\u038C\u038E-\u03A1\u03A3-\u052F\u0531-\u0556\u0559-\u058A\u058D-\u058F\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0606\u0607\u0609\u060A\u060C\u060E-\u061A\u064B-\u065F\u066A\u0670\u06D6-\u06DC\u06DE-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07F6-\u07F9\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A76\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B77\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C77-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4F\u0D54-\u0D63\u0D66-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4\u0E01-\u0E3A\u0E3F-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FDA\u1000-\u10C5\u10C7\u10CD\u10D0-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u13A0-\u13F5\u13F8-\u13FD\u1400-\u167F\u1681-\u169C\u16A0-\u16F8\u1700-\u1715\u171F-\u1736\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u1800-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1940\u1944-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u19DE-\u1A1B\u1A1E-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD\u1AB0-\u1ACE\u1B00-\u1B4C\u1B50-\u1B7E\u1B80-\u1BF3\u1BFC-\u1C37\u1C3B-\u1C49\u1C4D-\u1C88\u1C90-\u1CBA\u1CBD-\u1CC7\u1CD0-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u200B-\u200E\u2010-\u2027\u202F-\u205E\u2060-\u2064\u206A-\u2071\u2074-\u208E\u2090-\u209C\u20A0-\u20C0\u20D0-\u20F0\u2100-\u218B\u2190-\u2426\u2440-\u244A\u2460-\u2B73\u2B76-\u2B95\u2B97-\u2CF3\u2CF9-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D70\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303F\u3041-\u3096\u3099-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\u31E3\u31F0-\u321E\u3220-\uA48C\uA490-\uA4C6\uA4D0-\uA62B\uA640-\uA6F7\uA700-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA82C\uA830-\uA839\uA840-\uA877\uA880-\uA8C5\uA8CE-\uA8D9\uA8E0-\uA953\uA95F-\uA97C\uA980-\uA9CD\uA9CF-\uA9D9\uA9DE-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA5C-\uAAC2\uAADB-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB6B\uAB70-\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uD800-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1E\uFB29\uFD3E-\uFD4F\uFDCF\uFDFD-\uFE19\uFE20-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFF9-\uFFFD\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10100}-\u{10102}\u{10107}-\u{10133}\u{10137}-\u{1018E}\u{10190}-\u{1019C}\u{101A0}\u{101D0}-\u{101FD}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E0}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{1037A}\u{10380}-\u{1039D}\u{1039F}-\u{103C3}\u{103C8}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{1056F}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{1091F}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10B39}-\u{10B3F}\u{10D24}-\u{10D27}\u{10EAB}\u{10EAC}\u{10EFD}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11000}-\u{1104D}\u{11052}-\u{11075}\u{1107F}-\u{110C2}\u{110CD}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11100}-\u{11134}\u{11136}-\u{11147}\u{11150}-\u{11176}\u{11180}-\u{111DF}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{11241}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A9}\u{112B0}-\u{112EA}\u{112F0}-\u{112F9}\u{11300}-\u{11303}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133B}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11350}\u{11357}\u{1135D}-\u{11363}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11400}-\u{1145B}\u{1145D}-\u{11461}\u{11480}-\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115B5}\u{115B8}-\u{115DD}\u{11600}-\u{11644}\u{11650}-\u{11659}\u{11660}-\u{1166C}\u{11680}-\u{116B9}\u{116C0}-\u{116C9}\u{11700}-\u{1171A}\u{1171D}-\u{1172B}\u{11730}-\u{11746}\u{11800}-\u{1183B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{11935}\u{11937}\u{11938}\u{1193B}-\u{11946}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D7}\u{119DA}-\u{119E4}\u{11A00}-\u{11A47}\u{11A50}-\u{11AA2}\u{11AB0}-\u{11AF8}\u{11B00}-\u{11B09}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C36}\u{11C38}-\u{11C45}\u{11C50}-\u{11C6C}\u{11C70}-\u{11C8F}\u{11C92}-\u{11CA7}\u{11CA9}-\u{11CB6}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D47}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D8E}\u{11D90}\u{11D91}\u{11D93}-\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF8}\u{11F00}-\u{11F10}\u{11F12}-\u{11F3A}\u{11F3E}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FF1}\u{11FFF}-\u{12399}\u{12400}-\u{1246E}\u{12470}-\u{12474}\u{12480}-\u{12543}\u{12F90}-\u{12FF2}\u{13000}-\u{13455}\u{14400}-\u{14646}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A6E}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16AF0}-\u{16AF5}\u{16B00}-\u{16B45}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16E40}-\u{16E9A}\u{16F00}-\u{16F4A}\u{16F4F}-\u{16F87}\u{16F8F}-\u{16F9F}\u{16FE0}-\u{16FE4}\u{16FF0}\u{16FF1}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18D00}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1BC9C}-\u{1BCA3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1CF50}-\u{1CFC3}\u{1D000}-\u{1D0F5}\u{1D100}-\u{1D126}\u{1D129}-\u{1D1EA}\u{1D200}-\u{1D245}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D300}-\u{1D356}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D7CB}\u{1D7CE}-\u{1DA8B}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E030}-\u{1E06D}\u{1E08F}\u{1E100}-\u{1E12C}\u{1E130}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E14F}\u{1E290}-\u{1E2AE}\u{1E2C0}-\u{1E2F9}\u{1E2FF}\u{1E4D0}-\u{1E4F9}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{1EEF0}\u{1EEF1}\u{1F000}-\u{1F02B}\u{1F030}-\u{1F093}\u{1F0A0}-\u{1F0AE}\u{1F0B1}-\u{1F0BF}\u{1F0C1}-\u{1F0CF}\u{1F0D1}-\u{1F0F5}\u{1F100}-\u{1F1AD}\u{1F1E6}-\u{1F202}\u{1F210}-\u{1F23B}\u{1F240}-\u{1F248}\u{1F250}\u{1F251}\u{1F260}-\u{1F265}\u{1F300}-\u{1F6D7}\u{1F6DC}-\u{1F6EC}\u{1F6F0}-\u{1F6FC}\u{1F700}-\u{1F776}\u{1F77B}-\u{1F7D9}\u{1F7E0}-\u{1F7EB}\u{1F7F0}\u{1F800}-\u{1F80B}\u{1F810}-\u{1F847}\u{1F850}-\u{1F859}\u{1F860}-\u{1F887}\u{1F890}-\u{1F8AD}\u{1F8B0}\u{1F8B1}\u{1F900}-\u{1FA53}\u{1FA60}-\u{1FA6D}\u{1FA70}-\u{1FA7C}\u{1FA80}-\u{1FA88}\u{1FA90}-\u{1FABD}\u{1FABF}-\u{1FAC5}\u{1FACE}-\u{1FADB}\u{1FAE0}-\u{1FAE8}\u{1FAF0}-\u{1FAF8}\u{1FB00}-\u{1FB92}\u{1FB94}-\u{1FBCA}\u{1FBF0}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}]*$/u,p11=/[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02BB-\u02C1\u02D0\u02D1\u02E0-\u02E4\u02EE\u0370-\u0373\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0482\u048A-\u052F\u0531-\u0556\u0559-\u0589\u06F0-\u06F9\u0903-\u0939\u093B\u093D-\u0940\u0949-\u094C\u094E-\u0950\u0958-\u0961\u0964-\u0980\u0982\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C0\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09FA\u09FC\u09FD\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A40\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A76\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC0\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0\u0AE1\u0AE6-\u0AF0\u0AF9\u0B02\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0BE6-\u0BF2\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C41-\u0C44\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C77\u0C7F\u0C80\u0C82-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D02-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D4F\u0D54-\u0D61\u0D66-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E4F-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F17\u0F1A-\u0F34\u0F36\u0F38\u0F3E-\u0F47\u0F49-\u0F6C\u0F7F\u0F85\u0F88-\u0F8C\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u1000-\u102C\u1031\u1038\u103B\u103C\u103F-\u1057\u105A-\u105D\u1061-\u1070\u1075-\u1081\u1083\u1084\u1087-\u108C\u108E-\u109C\u109E-\u10C5\u10C7\u10CD\u10D0-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1360-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u167F\u1681-\u169A\u16A0-\u16F8\u1700-\u1711\u1715\u171F-\u1731\u1734-\u1736\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17B6\u17BE-\u17C5\u17C7\u17C8\u17D4-\u17DA\u17DC\u17E0-\u17E9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A19\u1A1A\u1A1E-\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1A80-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD\u1B04-\u1B33\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B4C\u1B50-\u1B6A\u1B74-\u1B7E\u1B82-\u1BA1\u1BA6\u1BA7\u1BAA\u1BAE-\u1BE5\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1BFC-\u1C2B\u1C34\u1C35\u1C3B-\u1C49\u1C4D-\u1C88\u1C90-\u1CBA\u1CBD-\u1CC7\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5-\u1CF7\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200E\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u214F\u2160-\u2188\u2336-\u237A\u2395\u2488-\u24E9\u26AC\u2800-\u28FF\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D70\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u302E\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\u31BF\u31F0-\u321C\u3220-\u324F\u3260-\u327B\u327F-\u32B0\u32C0-\u32CB\u32D0-\u3376\u337B-\u33DD\u33E0-\u33FE\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA60C\uA610-\uA62B\uA640-\uA66E\uA680-\uA69D\uA6A0-\uA6EF\uA6F2-\uA6F7\uA722-\uA787\uA789-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA824\uA827\uA830-\uA837\uA840-\uA873\uA880-\uA8C3\uA8CE-\uA8D9\uA8F2-\uA8FE\uA900-\uA925\uA92E-\uA946\uA952\uA953\uA95F-\uA97C\uA983-\uA9B2\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9CD\uA9CF-\uA9D9\uA9DE-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA2F\uAA30\uAA33\uAA34\uAA40-\uAA42\uAA44-\uAA4B\uAA4D\uAA50-\uAA59\uAA5C-\uAA7B\uAA7D-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAAEB\uAAEE-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB69\uAB70-\uABE4\uABE6\uABE7\uABE9-\uABEC\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uD800-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10100}\u{10102}\u{10107}-\u{10133}\u{10137}-\u{1013F}\u{1018D}\u{1018E}\u{101D0}-\u{101FC}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E1}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{1039F}-\u{103C3}\u{103C8}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{1056F}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{11000}\u{11002}-\u{11037}\u{11047}-\u{1104D}\u{11066}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11082}-\u{110B2}\u{110B7}\u{110B8}\u{110BB}-\u{110C1}\u{110CD}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{1112C}\u{11136}-\u{11147}\u{11150}-\u{11172}\u{11174}-\u{11176}\u{11182}-\u{111B5}\u{111BF}-\u{111C8}\u{111CD}\u{111CE}\u{111D0}-\u{111DF}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122E}\u{11232}\u{11233}\u{11235}\u{11238}-\u{1123D}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A9}\u{112B0}-\u{112DE}\u{112E0}-\u{112E2}\u{112F0}-\u{112F9}\u{11302}\u{11303}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}-\u{1133F}\u{11341}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11350}\u{11357}\u{1135D}-\u{11363}\u{11400}-\u{11437}\u{11440}\u{11441}\u{11445}\u{11447}-\u{1145B}\u{1145D}\u{1145F}-\u{11461}\u{11480}-\u{114B2}\u{114B9}\u{114BB}-\u{114BE}\u{114C1}\u{114C4}-\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115B1}\u{115B8}-\u{115BB}\u{115BE}\u{115C1}-\u{115DB}\u{11600}-\u{11632}\u{1163B}\u{1163C}\u{1163E}\u{11641}-\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116AC}\u{116AE}\u{116AF}\u{116B6}\u{116B8}\u{116B9}\u{116C0}-\u{116C9}\u{11700}-\u{1171A}\u{11720}\u{11721}\u{11726}\u{11730}-\u{11746}\u{11800}-\u{1182E}\u{11838}\u{1183B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{11935}\u{11937}\u{11938}\u{1193D}\u{1193F}-\u{11942}\u{11944}-\u{11946}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D3}\u{119DC}-\u{119DF}\u{119E1}-\u{119E4}\u{11A00}\u{11A07}\u{11A08}\u{11A0B}-\u{11A32}\u{11A39}\u{11A3A}\u{11A3F}-\u{11A46}\u{11A50}\u{11A57}\u{11A58}\u{11A5C}-\u{11A89}\u{11A97}\u{11A9A}-\u{11AA2}\u{11AB0}-\u{11AF8}\u{11B00}-\u{11B09}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2F}\u{11C3E}-\u{11C45}\u{11C50}-\u{11C6C}\u{11C70}-\u{11C8F}\u{11CA9}\u{11CB1}\u{11CB4}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D8E}\u{11D93}\u{11D94}\u{11D96}\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF2}\u{11EF5}-\u{11EF8}\u{11F02}-\u{11F10}\u{11F12}-\u{11F35}\u{11F3E}\u{11F3F}\u{11F41}\u{11F43}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{11FFF}-\u{12399}\u{12400}-\u{1246E}\u{12470}-\u{12474}\u{12480}-\u{12543}\u{12F90}-\u{12FF2}\u{13000}-\u{1343F}\u{13441}-\u{13446}\u{14400}-\u{14646}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A6E}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16AF5}\u{16B00}-\u{16B2F}\u{16B37}-\u{16B45}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16E40}-\u{16E9A}\u{16F00}-\u{16F4A}\u{16F50}-\u{16F87}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF0}\u{16FF1}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18D00}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1BC9C}\u{1BC9F}\u{1CF50}-\u{1CFC3}\u{1D000}-\u{1D0F5}\u{1D100}-\u{1D126}\u{1D129}-\u{1D166}\u{1D16A}-\u{1D172}\u{1D183}\u{1D184}\u{1D18C}-\u{1D1A9}\u{1D1AE}-\u{1D1E8}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6DA}\u{1D6DC}-\u{1D714}\u{1D716}-\u{1D74E}\u{1D750}-\u{1D788}\u{1D78A}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D7CE}-\u{1D9FF}\u{1DA37}-\u{1DA3A}\u{1DA6D}-\u{1DA74}\u{1DA76}-\u{1DA83}\u{1DA85}-\u{1DA8B}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E14F}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1F100}-\u{1F10A}\u{1F110}-\u{1F12E}\u{1F130}-\u{1F169}\u{1F170}-\u{1F1AC}\u{1F1E6}-\u{1F202}\u{1F210}-\u{1F23B}\u{1F240}-\u{1F248}\u{1F250}\u{1F251}\u{1FBF0}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}][\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10EAB}\u{10EAC}\u{10EFD}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}-\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A06}\u{11A09}\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{13440}\u{13447}-\u{13455}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{E0100}-\u{E01EF}]*$/u;Rw.exports={combiningMarks:f11,combiningClassVirama:_11,validZWNJ:g11,bidiDomain:b11,bidiS1LTR:y11,bidiS1RTL:v11,bidiS2:h11,bidiS3:m11,bidiS4EN:d11,bidiS4AN:c11,bidiS5:l11,bidiS6:p11}});var Iw=K((IQ1,i11)=>{i11.exports=[[[0,44],4],[[45,46],2],[47,4],[[48,57],2],[[58,64],4],[65,1,"a"],[66,1,"b"],[67,1,"c"],[68,1,"d"],[69,1,"e"],[70,1,"f"],[71,1,"g"],[72,1,"h"],[73,1,"i"],[74,1,"j"],[75,1,"k"],[76,1,"l"],[77,1,"m"],[78,1,"n"],[79,1,"o"],[80,1,"p"],[81,1,"q"],[82,1,"r"],[83,1,"s"],[84,1,"t"],[85,1,"u"],[86,1,"v"],[87,1,"w"],[88,1,"x"],[89,1,"y"],[90,1,"z"],[[91,96],4],[[97,122],2],[[123,127],4],[[128,159],3],[160,5," "],[[161,167],2],[168,5," \u0308"],[169,2],[170,1,"a"],[[171,172],2],[173,7],[174,2],[175,5," \u0304"],[[176,177],2],[178,1,"2"],[179,1,"3"],[180,5," \u0301"],[181,1,"\u03BC"],[182,2],[183,2],[184,5," \u0327"],[185,1,"1"],[186,1,"o"],[187,2],[188,1,"1\u20444"],[189,1,"1\u20442"],[190,1,"3\u20444"],[191,2],[192,1,"\xE0"],[193,1,"\xE1"],[194,1,"\xE2"],[195,1,"\xE3"],[196,1,"\xE4"],[197,1,"\xE5"],[198,1,"\xE6"],[199,1,"\xE7"],[200,1,"\xE8"],[201,1,"\xE9"],[202,1,"\xEA"],[203,1,"\xEB"],[204,1,"\xEC"],[205,1,"\xED"],[206,1,"\xEE"],[207,1,"\xEF"],[208,1,"\xF0"],[209,1,"\xF1"],[210,1,"\xF2"],[211,1,"\xF3"],[212,1,"\xF4"],[213,1,"\xF5"],[214,1,"\xF6"],[215,2],[216,1,"\xF8"],[217,1,"\xF9"],[218,1,"\xFA"],[219,1,"\xFB"],[220,1,"\xFC"],[221,1,"\xFD"],[222,1,"\xFE"],[223,6,"ss"],[[224,246],2],[247,2],[[248,255],2],[256,1,"\u0101"],[257,2],[258,1,"\u0103"],[259,2],[260,1,"\u0105"],[261,2],[262,1,"\u0107"],[263,2],[264,1,"\u0109"],[265,2],[266,1,"\u010B"],[267,2],[268,1,"\u010D"],[269,2],[270,1,"\u010F"],[271,2],[272,1,"\u0111"],[273,2],[274,1,"\u0113"],[275,2],[276,1,"\u0115"],[277,2],[278,1,"\u0117"],[279,2],[280,1,"\u0119"],[281,2],[282,1,"\u011B"],[283,2],[284,1,"\u011D"],[285,2],[286,1,"\u011F"],[287,2],[288,1,"\u0121"],[289,2],[290,1,"\u0123"],[291,2],[292,1,"\u0125"],[293,2],[294,1,"\u0127"],[295,2],[296,1,"\u0129"],[297,2],[298,1,"\u012B"],[299,2],[300,1,"\u012D"],[301,2],[302,1,"\u012F"],[303,2],[304,1,"i\u0307"],[305,2],[[306,307],1,"ij"],[308,1,"\u0135"],[309,2],[310,1,"\u0137"],[[311,312],2],[313,1,"\u013A"],[314,2],[315,1,"\u013C"],[316,2],[317,1,"\u013E"],[318,2],[[319,320],1,"l\xB7"],[321,1,"\u0142"],[322,2],[323,1,"\u0144"],[324,2],[325,1,"\u0146"],[326,2],[327,1,"\u0148"],[328,2],[329,1,"\u02BCn"],[330,1,"\u014B"],[331,2],[332,1,"\u014D"],[333,2],[334,1,"\u014F"],[335,2],[336,1,"\u0151"],[337,2],[338,1,"\u0153"],[339,2],[340,1,"\u0155"],[341,2],[342,1,"\u0157"],[343,2],[344,1,"\u0159"],[345,2],[346,1,"\u015B"],[347,2],[348,1,"\u015D"],[349,2],[350,1,"\u015F"],[351,2],[352,1,"\u0161"],[353,2],[354,1,"\u0163"],[355,2],[356,1,"\u0165"],[357,2],[358,1,"\u0167"],[359,2],[360,1,"\u0169"],[361,2],[362,1,"\u016B"],[363,2],[364,1,"\u016D"],[365,2],[366,1,"\u016F"],[367,2],[368,1,"\u0171"],[369,2],[370,1,"\u0173"],[371,2],[372,1,"\u0175"],[373,2],[374,1,"\u0177"],[375,2],[376,1,"\xFF"],[377,1,"\u017A"],[378,2],[379,1,"\u017C"],[380,2],[381,1,"\u017E"],[382,2],[383,1,"s"],[384,2],[385,1,"\u0253"],[386,1,"\u0183"],[387,2],[388,1,"\u0185"],[389,2],[390,1,"\u0254"],[391,1,"\u0188"],[392,2],[393,1,"\u0256"],[394,1,"\u0257"],[395,1,"\u018C"],[[396,397],2],[398,1,"\u01DD"],[399,1,"\u0259"],[400,1,"\u025B"],[401,1,"\u0192"],[402,2],[403,1,"\u0260"],[404,1,"\u0263"],[405,2],[406,1,"\u0269"],[407,1,"\u0268"],[408,1,"\u0199"],[[409,411],2],[412,1,"\u026F"],[413,1,"\u0272"],[414,2],[415,1,"\u0275"],[416,1,"\u01A1"],[417,2],[418,1,"\u01A3"],[419,2],[420,1,"\u01A5"],[421,2],[422,1,"\u0280"],[423,1,"\u01A8"],[424,2],[425,1,"\u0283"],[[426,427],2],[428,1,"\u01AD"],[429,2],[430,1,"\u0288"],[431,1,"\u01B0"],[432,2],[433,1,"\u028A"],[434,1,"\u028B"],[435,1,"\u01B4"],[436,2],[437,1,"\u01B6"],[438,2],[439,1,"\u0292"],[440,1,"\u01B9"],[[441,443],2],[444,1,"\u01BD"],[[445,451],2],[[452,454],1,"d\u017E"],[[455,457],1,"lj"],[[458,460],1,"nj"],[461,1,"\u01CE"],[462,2],[463,1,"\u01D0"],[464,2],[465,1,"\u01D2"],[466,2],[467,1,"\u01D4"],[468,2],[469,1,"\u01D6"],[470,2],[471,1,"\u01D8"],[472,2],[473,1,"\u01DA"],[474,2],[475,1,"\u01DC"],[[476,477],2],[478,1,"\u01DF"],[479,2],[480,1,"\u01E1"],[481,2],[482,1,"\u01E3"],[483,2],[484,1,"\u01E5"],[485,2],[486,1,"\u01E7"],[487,2],[488,1,"\u01E9"],[489,2],[490,1,"\u01EB"],[491,2],[492,1,"\u01ED"],[493,2],[494,1,"\u01EF"],[[495,496],2],[[497,499],1,"dz"],[500,1,"\u01F5"],[501,2],[502,1,"\u0195"],[503,1,"\u01BF"],[504,1,"\u01F9"],[505,2],[506,1,"\u01FB"],[507,2],[508,1,"\u01FD"],[509,2],[510,1,"\u01FF"],[511,2],[512,1,"\u0201"],[513,2],[514,1,"\u0203"],[515,2],[516,1,"\u0205"],[517,2],[518,1,"\u0207"],[519,2],[520,1,"\u0209"],[521,2],[522,1,"\u020B"],[523,2],[524,1,"\u020D"],[525,2],[526,1,"\u020F"],[527,2],[528,1,"\u0211"],[529,2],[530,1,"\u0213"],[531,2],[532,1,"\u0215"],[533,2],[534,1,"\u0217"],[535,2],[536,1,"\u0219"],[537,2],[538,1,"\u021B"],[539,2],[540,1,"\u021D"],[541,2],[542,1,"\u021F"],[543,2],[544,1,"\u019E"],[545,2],[546,1,"\u0223"],[547,2],[548,1,"\u0225"],[549,2],[550,1,"\u0227"],[551,2],[552,1,"\u0229"],[553,2],[554,1,"\u022B"],[555,2],[556,1,"\u022D"],[557,2],[558,1,"\u022F"],[559,2],[560,1,"\u0231"],[561,2],[562,1,"\u0233"],[563,2],[[564,566],2],[[567,569],2],[570,1,"\u2C65"],[571,1,"\u023C"],[572,2],[573,1,"\u019A"],[574,1,"\u2C66"],[[575,576],2],[577,1,"\u0242"],[578,2],[579,1,"\u0180"],[580,1,"\u0289"],[581,1,"\u028C"],[582,1,"\u0247"],[583,2],[584,1,"\u0249"],[585,2],[586,1,"\u024B"],[587,2],[588,1,"\u024D"],[589,2],[590,1,"\u024F"],[591,2],[[592,680],2],[[681,685],2],[[686,687],2],[688,1,"h"],[689,1,"\u0266"],[690,1,"j"],[691,1,"r"],[692,1,"\u0279"],[693,1,"\u027B"],[694,1,"\u0281"],[695,1,"w"],[696,1,"y"],[[697,705],2],[[706,709],2],[[710,721],2],[[722,727],2],[728,5," \u0306"],[729,5," \u0307"],[730,5," \u030A"],[731,5," \u0328"],[732,5," \u0303"],[733,5," \u030B"],[734,2],[735,2],[736,1,"\u0263"],[737,1,"l"],[738,1,"s"],[739,1,"x"],[740,1,"\u0295"],[[741,745],2],[[746,747],2],[748,2],[749,2],[750,2],[[751,767],2],[[768,831],2],[832,1,"\u0300"],[833,1,"\u0301"],[834,2],[835,1,"\u0313"],[836,1,"\u0308\u0301"],[837,1,"\u03B9"],[[838,846],2],[847,7],[[848,855],2],[[856,860],2],[[861,863],2],[[864,865],2],[866,2],[[867,879],2],[880,1,"\u0371"],[881,2],[882,1,"\u0373"],[883,2],[884,1,"\u02B9"],[885,2],[886,1,"\u0377"],[887,2],[[888,889],3],[890,5," \u03B9"],[[891,893],2],[894,5,";"],[895,1,"\u03F3"],[[896,899],3],[900,5," \u0301"],[901,5," \u0308\u0301"],[902,1,"\u03AC"],[903,1,"\xB7"],[904,1,"\u03AD"],[905,1,"\u03AE"],[906,1,"\u03AF"],[907,3],[908,1,"\u03CC"],[909,3],[910,1,"\u03CD"],[911,1,"\u03CE"],[912,2],[913,1,"\u03B1"],[914,1,"\u03B2"],[915,1,"\u03B3"],[916,1,"\u03B4"],[917,1,"\u03B5"],[918,1,"\u03B6"],[919,1,"\u03B7"],[920,1,"\u03B8"],[921,1,"\u03B9"],[922,1,"\u03BA"],[923,1,"\u03BB"],[924,1,"\u03BC"],[925,1,"\u03BD"],[926,1,"\u03BE"],[927,1,"\u03BF"],[928,1,"\u03C0"],[929,1,"\u03C1"],[930,3],[931,1,"\u03C3"],[932,1,"\u03C4"],[933,1,"\u03C5"],[934,1,"\u03C6"],[935,1,"\u03C7"],[936,1,"\u03C8"],[937,1,"\u03C9"],[938,1,"\u03CA"],[939,1,"\u03CB"],[[940,961],2],[962,6,"\u03C3"],[[963,974],2],[975,1,"\u03D7"],[976,1,"\u03B2"],[977,1,"\u03B8"],[978,1,"\u03C5"],[979,1,"\u03CD"],[980,1,"\u03CB"],[981,1,"\u03C6"],[982,1,"\u03C0"],[983,2],[984,1,"\u03D9"],[985,2],[986,1,"\u03DB"],[987,2],[988,1,"\u03DD"],[989,2],[990,1,"\u03DF"],[991,2],[992,1,"\u03E1"],[993,2],[994,1,"\u03E3"],[995,2],[996,1,"\u03E5"],[997,2],[998,1,"\u03E7"],[999,2],[1000,1,"\u03E9"],[1001,2],[1002,1,"\u03EB"],[1003,2],[1004,1,"\u03ED"],[1005,2],[1006,1,"\u03EF"],[1007,2],[1008,1,"\u03BA"],[1009,1,"\u03C1"],[1010,1,"\u03C3"],[1011,2],[1012,1,"\u03B8"],[1013,1,"\u03B5"],[1014,2],[1015,1,"\u03F8"],[1016,2],[1017,1,"\u03C3"],[1018,1,"\u03FB"],[1019,2],[1020,2],[1021,1,"\u037B"],[1022,1,"\u037C"],[1023,1,"\u037D"],[1024,1,"\u0450"],[1025,1,"\u0451"],[1026,1,"\u0452"],[1027,1,"\u0453"],[1028,1,"\u0454"],[1029,1,"\u0455"],[1030,1,"\u0456"],[1031,1,"\u0457"],[1032,1,"\u0458"],[1033,1,"\u0459"],[1034,1,"\u045A"],[1035,1,"\u045B"],[1036,1,"\u045C"],[1037,1,"\u045D"],[1038,1,"\u045E"],[1039,1,"\u045F"],[1040,1,"\u0430"],[1041,1,"\u0431"],[1042,1,"\u0432"],[1043,1,"\u0433"],[1044,1,"\u0434"],[1045,1,"\u0435"],[1046,1,"\u0436"],[1047,1,"\u0437"],[1048,1,"\u0438"],[1049,1,"\u0439"],[1050,1,"\u043A"],[1051,1,"\u043B"],[1052,1,"\u043C"],[1053,1,"\u043D"],[1054,1,"\u043E"],[1055,1,"\u043F"],[1056,1,"\u0440"],[1057,1,"\u0441"],[1058,1,"\u0442"],[1059,1,"\u0443"],[1060,1,"\u0444"],[1061,1,"\u0445"],[1062,1,"\u0446"],[1063,1,"\u0447"],[1064,1,"\u0448"],[1065,1,"\u0449"],[1066,1,"\u044A"],[1067,1,"\u044B"],[1068,1,"\u044C"],[1069,1,"\u044D"],[1070,1,"\u044E"],[1071,1,"\u044F"],[[1072,1103],2],[1104,2],[[1105,1116],2],[1117,2],[[1118,1119],2],[1120,1,"\u0461"],[1121,2],[1122,1,"\u0463"],[1123,2],[1124,1,"\u0465"],[1125,2],[1126,1,"\u0467"],[1127,2],[1128,1,"\u0469"],[1129,2],[1130,1,"\u046B"],[1131,2],[1132,1,"\u046D"],[1133,2],[1134,1,"\u046F"],[1135,2],[1136,1,"\u0471"],[1137,2],[1138,1,"\u0473"],[1139,2],[1140,1,"\u0475"],[1141,2],[1142,1,"\u0477"],[1143,2],[1144,1,"\u0479"],[1145,2],[1146,1,"\u047B"],[1147,2],[1148,1,"\u047D"],[1149,2],[1150,1,"\u047F"],[1151,2],[1152,1,"\u0481"],[1153,2],[1154,2],[[1155,1158],2],[1159,2],[[1160,1161],2],[1162,1,"\u048B"],[1163,2],[1164,1,"\u048D"],[1165,2],[1166,1,"\u048F"],[1167,2],[1168,1,"\u0491"],[1169,2],[1170,1,"\u0493"],[1171,2],[1172,1,"\u0495"],[1173,2],[1174,1,"\u0497"],[1175,2],[1176,1,"\u0499"],[1177,2],[1178,1,"\u049B"],[1179,2],[1180,1,"\u049D"],[1181,2],[1182,1,"\u049F"],[1183,2],[1184,1,"\u04A1"],[1185,2],[1186,1,"\u04A3"],[1187,2],[1188,1,"\u04A5"],[1189,2],[1190,1,"\u04A7"],[1191,2],[1192,1,"\u04A9"],[1193,2],[1194,1,"\u04AB"],[1195,2],[1196,1,"\u04AD"],[1197,2],[1198,1,"\u04AF"],[1199,2],[1200,1,"\u04B1"],[1201,2],[1202,1,"\u04B3"],[1203,2],[1204,1,"\u04B5"],[1205,2],[1206,1,"\u04B7"],[1207,2],[1208,1,"\u04B9"],[1209,2],[1210,1,"\u04BB"],[1211,2],[1212,1,"\u04BD"],[1213,2],[1214,1,"\u04BF"],[1215,2],[1216,3],[1217,1,"\u04C2"],[1218,2],[1219,1,"\u04C4"],[1220,2],[1221,1,"\u04C6"],[1222,2],[1223,1,"\u04C8"],[1224,2],[1225,1,"\u04CA"],[1226,2],[1227,1,"\u04CC"],[1228,2],[1229,1,"\u04CE"],[1230,2],[1231,2],[1232,1,"\u04D1"],[1233,2],[1234,1,"\u04D3"],[1235,2],[1236,1,"\u04D5"],[1237,2],[1238,1,"\u04D7"],[1239,2],[1240,1,"\u04D9"],[1241,2],[1242,1,"\u04DB"],[1243,2],[1244,1,"\u04DD"],[1245,2],[1246,1,"\u04DF"],[1247,2],[1248,1,"\u04E1"],[1249,2],[1250,1,"\u04E3"],[1251,2],[1252,1,"\u04E5"],[1253,2],[1254,1,"\u04E7"],[1255,2],[1256,1,"\u04E9"],[1257,2],[1258,1,"\u04EB"],[1259,2],[1260,1,"\u04ED"],[1261,2],[1262,1,"\u04EF"],[1263,2],[1264,1,"\u04F1"],[1265,2],[1266,1,"\u04F3"],[1267,2],[1268,1,"\u04F5"],[1269,2],[1270,1,"\u04F7"],[1271,2],[1272,1,"\u04F9"],[1273,2],[1274,1,"\u04FB"],[1275,2],[1276,1,"\u04FD"],[1277,2],[1278,1,"\u04FF"],[1279,2],[1280,1,"\u0501"],[1281,2],[1282,1,"\u0503"],[1283,2],[1284,1,"\u0505"],[1285,2],[1286,1,"\u0507"],[1287,2],[1288,1,"\u0509"],[1289,2],[1290,1,"\u050B"],[1291,2],[1292,1,"\u050D"],[1293,2],[1294,1,"\u050F"],[1295,2],[1296,1,"\u0511"],[1297,2],[1298,1,"\u0513"],[1299,2],[1300,1,"\u0515"],[1301,2],[1302,1,"\u0517"],[1303,2],[1304,1,"\u0519"],[1305,2],[1306,1,"\u051B"],[1307,2],[1308,1,"\u051D"],[1309,2],[1310,1,"\u051F"],[1311,2],[1312,1,"\u0521"],[1313,2],[1314,1,"\u0523"],[1315,2],[1316,1,"\u0525"],[1317,2],[1318,1,"\u0527"],[1319,2],[1320,1,"\u0529"],[1321,2],[1322,1,"\u052B"],[1323,2],[1324,1,"\u052D"],[1325,2],[1326,1,"\u052F"],[1327,2],[1328,3],[1329,1,"\u0561"],[1330,1,"\u0562"],[1331,1,"\u0563"],[1332,1,"\u0564"],[1333,1,"\u0565"],[1334,1,"\u0566"],[1335,1,"\u0567"],[1336,1,"\u0568"],[1337,1,"\u0569"],[1338,1,"\u056A"],[1339,1,"\u056B"],[1340,1,"\u056C"],[1341,1,"\u056D"],[1342,1,"\u056E"],[1343,1,"\u056F"],[1344,1,"\u0570"],[1345,1,"\u0571"],[1346,1,"\u0572"],[1347,1,"\u0573"],[1348,1,"\u0574"],[1349,1,"\u0575"],[1350,1,"\u0576"],[1351,1,"\u0577"],[1352,1,"\u0578"],[1353,1,"\u0579"],[1354,1,"\u057A"],[1355,1,"\u057B"],[1356,1,"\u057C"],[1357,1,"\u057D"],[1358,1,"\u057E"],[1359,1,"\u057F"],[1360,1,"\u0580"],[1361,1,"\u0581"],[1362,1,"\u0582"],[1363,1,"\u0583"],[1364,1,"\u0584"],[1365,1,"\u0585"],[1366,1,"\u0586"],[[1367,1368],3],[1369,2],[[1370,1375],2],[1376,2],[[1377,1414],2],[1415,1,"\u0565\u0582"],[1416,2],[1417,2],[1418,2],[[1419,1420],3],[[1421,1422],2],[1423,2],[1424,3],[[1425,1441],2],[1442,2],[[1443,1455],2],[[1456,1465],2],[1466,2],[[1467,1469],2],[1470,2],[1471,2],[1472,2],[[1473,1474],2],[1475,2],[1476,2],[1477,2],[1478,2],[1479,2],[[1480,1487],3],[[1488,1514],2],[[1515,1518],3],[1519,2],[[1520,1524],2],[[1525,1535],3],[[1536,1539],3],[1540,3],[1541,3],[[1542,1546],2],[1547,2],[1548,2],[[1549,1551],2],[[1552,1557],2],[[1558,1562],2],[1563,2],[1564,3],[1565,2],[1566,2],[1567,2],[1568,2],[[1569,1594],2],[[1595,1599],2],[1600,2],[[1601,1618],2],[[1619,1621],2],[[1622,1624],2],[[1625,1630],2],[1631,2],[[1632,1641],2],[[1642,1645],2],[[1646,1647],2],[[1648,1652],2],[1653,1,"\u0627\u0674"],[1654,1,"\u0648\u0674"],[1655,1,"\u06C7\u0674"],[1656,1,"\u064A\u0674"],[[1657,1719],2],[[1720,1721],2],[[1722,1726],2],[1727,2],[[1728,1742],2],[1743,2],[[1744,1747],2],[1748,2],[[1749,1756],2],[1757,3],[1758,2],[[1759,1768],2],[1769,2],[[1770,1773],2],[[1774,1775],2],[[1776,1785],2],[[1786,1790],2],[1791,2],[[1792,1805],2],[1806,3],[1807,3],[[1808,1836],2],[[1837,1839],2],[[1840,1866],2],[[1867,1868],3],[[1869,1871],2],[[1872,1901],2],[[1902,1919],2],[[1920,1968],2],[1969,2],[[1970,1983],3],[[1984,2037],2],[[2038,2042],2],[[2043,2044],3],[2045,2],[[2046,2047],2],[[2048,2093],2],[[2094,2095],3],[[2096,2110],2],[2111,3],[[2112,2139],2],[[2140,2141],3],[2142,2],[2143,3],[[2144,2154],2],[[2155,2159],3],[[2160,2183],2],[2184,2],[[2185,2190],2],[2191,3],[[2192,2193],3],[[2194,2199],3],[[2200,2207],2],[2208,2],[2209,2],[[2210,2220],2],[[2221,2226],2],[[2227,2228],2],[2229,2],[[2230,2237],2],[[2238,2247],2],[[2248,2258],2],[2259,2],[[2260,2273],2],[2274,3],[2275,2],[[2276,2302],2],[2303,2],[2304,2],[[2305,2307],2],[2308,2],[[2309,2361],2],[[2362,2363],2],[[2364,2381],2],[2382,2],[2383,2],[[2384,2388],2],[2389,2],[[2390,2391],2],[2392,1,"\u0915\u093C"],[2393,1,"\u0916\u093C"],[2394,1,"\u0917\u093C"],[2395,1,"\u091C\u093C"],[2396,1,"\u0921\u093C"],[2397,1,"\u0922\u093C"],[2398,1,"\u092B\u093C"],[2399,1,"\u092F\u093C"],[[2400,2403],2],[[2404,2405],2],[[2406,2415],2],[2416,2],[[2417,2418],2],[[2419,2423],2],[2424,2],[[2425,2426],2],[[2427,2428],2],[2429,2],[[2430,2431],2],[2432,2],[[2433,2435],2],[2436,3],[[2437,2444],2],[[2445,2446],3],[[2447,2448],2],[[2449,2450],3],[[2451,2472],2],[2473,3],[[2474,2480],2],[2481,3],[2482,2],[[2483,2485],3],[[2486,2489],2],[[2490,2491],3],[2492,2],[2493,2],[[2494,2500],2],[[2501,2502],3],[[2503,2504],2],[[2505,2506],3],[[2507,2509],2],[2510,2],[[2511,2518],3],[2519,2],[[2520,2523],3],[2524,1,"\u09A1\u09BC"],[2525,1,"\u09A2\u09BC"],[2526,3],[2527,1,"\u09AF\u09BC"],[[2528,2531],2],[[2532,2533],3],[[2534,2545],2],[[2546,2554],2],[2555,2],[2556,2],[2557,2],[2558,2],[[2559,2560],3],[2561,2],[2562,2],[2563,2],[2564,3],[[2565,2570],2],[[2571,2574],3],[[2575,2576],2],[[2577,2578],3],[[2579,2600],2],[2601,3],[[2602,2608],2],[2609,3],[2610,2],[2611,1,"\u0A32\u0A3C"],[2612,3],[2613,2],[2614,1,"\u0A38\u0A3C"],[2615,3],[[2616,2617],2],[[2618,2619],3],[2620,2],[2621,3],[[2622,2626],2],[[2627,2630],3],[[2631,2632],2],[[2633,2634],3],[[2635,2637],2],[[2638,2640],3],[2641,2],[[2642,2648],3],[2649,1,"\u0A16\u0A3C"],[2650,1,"\u0A17\u0A3C"],[2651,1,"\u0A1C\u0A3C"],[2652,2],[2653,3],[2654,1,"\u0A2B\u0A3C"],[[2655,2661],3],[[2662,2676],2],[2677,2],[2678,2],[[2679,2688],3],[[2689,2691],2],[2692,3],[[2693,2699],2],[2700,2],[2701,2],[2702,3],[[2703,2705],2],[2706,3],[[2707,2728],2],[2729,3],[[2730,2736],2],[2737,3],[[2738,2739],2],[2740,3],[[2741,2745],2],[[2746,2747],3],[[2748,2757],2],[2758,3],[[2759,2761],2],[2762,3],[[2763,2765],2],[[2766,2767],3],[2768,2],[[2769,2783],3],[2784,2],[[2785,2787],2],[[2788,2789],3],[[2790,2799],2],[2800,2],[2801,2],[[2802,2808],3],[2809,2],[[2810,2815],2],[2816,3],[[2817,2819],2],[2820,3],[[2821,2828],2],[[2829,2830],3],[[2831,2832],2],[[2833,2834],3],[[2835,2856],2],[2857,3],[[2858,2864],2],[2865,3],[[2866,2867],2],[2868,3],[2869,2],[[2870,2873],2],[[2874,2875],3],[[2876,2883],2],[2884,2],[[2885,2886],3],[[2887,2888],2],[[2889,2890],3],[[2891,2893],2],[[2894,2900],3],[2901,2],[[2902,2903],2],[[2904,2907],3],[2908,1,"\u0B21\u0B3C"],[2909,1,"\u0B22\u0B3C"],[2910,3],[[2911,2913],2],[[2914,2915],2],[[2916,2917],3],[[2918,2927],2],[2928,2],[2929,2],[[2930,2935],2],[[2936,2945],3],[[2946,2947],2],[2948,3],[[2949,2954],2],[[2955,2957],3],[[2958,2960],2],[2961,3],[[2962,2965],2],[[2966,2968],3],[[2969,2970],2],[2971,3],[2972,2],[2973,3],[[2974,2975],2],[[2976,2978],3],[[2979,2980],2],[[2981,2983],3],[[2984,2986],2],[[2987,2989],3],[[2990,2997],2],[2998,2],[[2999,3001],2],[[3002,3005],3],[[3006,3010],2],[[3011,3013],3],[[3014,3016],2],[3017,3],[[3018,3021],2],[[3022,3023],3],[3024,2],[[3025,3030],3],[3031,2],[[3032,3045],3],[3046,2],[[3047,3055],2],[[3056,3058],2],[[3059,3066],2],[[3067,3071],3],[3072,2],[[3073,3075],2],[3076,2],[[3077,3084],2],[3085,3],[[3086,3088],2],[3089,3],[[3090,3112],2],[3113,3],[[3114,3123],2],[3124,2],[[3125,3129],2],[[3130,3131],3],[3132,2],[3133,2],[[3134,3140],2],[3141,3],[[3142,3144],2],[3145,3],[[3146,3149],2],[[3150,3156],3],[[3157,3158],2],[3159,3],[[3160,3161],2],[3162,2],[[3163,3164],3],[3165,2],[[3166,3167],3],[[3168,3169],2],[[3170,3171],2],[[3172,3173],3],[[3174,3183],2],[[3184,3190],3],[3191,2],[[3192,3199],2],[3200,2],[3201,2],[[3202,3203],2],[3204,2],[[3205,3212],2],[3213,3],[[3214,3216],2],[3217,3],[[3218,3240],2],[3241,3],[[3242,3251],2],[3252,3],[[3253,3257],2],[[3258,3259],3],[[3260,3261],2],[[3262,3268],2],[3269,3],[[3270,3272],2],[3273,3],[[3274,3277],2],[[3278,3284],3],[[3285,3286],2],[[3287,3292],3],[3293,2],[3294,2],[3295,3],[[3296,3297],2],[[3298,3299],2],[[3300,3301],3],[[3302,3311],2],[3312,3],[[3313,3314],2],[3315,2],[[3316,3327],3],[3328,2],[3329,2],[[3330,3331],2],[3332,2],[[3333,3340],2],[3341,3],[[3342,3344],2],[3345,3],[[3346,3368],2],[3369,2],[[3370,3385],2],[3386,2],[[3387,3388],2],[3389,2],[[3390,3395],2],[3396,2],[3397,3],[[3398,3400],2],[3401,3],[[3402,3405],2],[3406,2],[3407,2],[[3408,3411],3],[[3412,3414],2],[3415,2],[[3416,3422],2],[3423,2],[[3424,3425],2],[[3426,3427],2],[[3428,3429],3],[[3430,3439],2],[[3440,3445],2],[[3446,3448],2],[3449,2],[[3450,3455],2],[3456,3],[3457,2],[[3458,3459],2],[3460,3],[[3461,3478],2],[[3479,3481],3],[[3482,3505],2],[3506,3],[[3507,3515],2],[3516,3],[3517,2],[[3518,3519],3],[[3520,3526],2],[[3527,3529],3],[3530,2],[[3531,3534],3],[[3535,3540],2],[3541,3],[3542,2],[3543,3],[[3544,3551],2],[[3552,3557],3],[[3558,3567],2],[[3568,3569],3],[[3570,3571],2],[3572,2],[[3573,3584],3],[[3585,3634],2],[3635,1,"\u0E4D\u0E32"],[[3636,3642],2],[[3643,3646],3],[3647,2],[[3648,3662],2],[3663,2],[[3664,3673],2],[[3674,3675],2],[[3676,3712],3],[[3713,3714],2],[3715,3],[3716,2],[3717,3],[3718,2],[[3719,3720],2],[3721,2],[3722,2],[3723,3],[3724,2],[3725,2],[[3726,3731],2],[[3732,3735],2],[3736,2],[[3737,3743],2],[3744,2],[[3745,3747],2],[3748,3],[3749,2],[3750,3],[3751,2],[[3752,3753],2],[[3754,3755],2],[3756,2],[[3757,3762],2],[3763,1,"\u0ECD\u0EB2"],[[3764,3769],2],[3770,2],[[3771,3773],2],[[3774,3775],3],[[3776,3780],2],[3781,3],[3782,2],[3783,3],[[3784,3789],2],[3790,2],[3791,3],[[3792,3801],2],[[3802,3803],3],[3804,1,"\u0EAB\u0E99"],[3805,1,"\u0EAB\u0EA1"],[[3806,3807],2],[[3808,3839],3],[3840,2],[[3841,3850],2],[3851,2],[3852,1,"\u0F0B"],[[3853,3863],2],[[3864,3865],2],[[3866,3871],2],[[3872,3881],2],[[3882,3892],2],[3893,2],[3894,2],[3895,2],[3896,2],[3897,2],[[3898,3901],2],[[3902,3906],2],[3907,1,"\u0F42\u0FB7"],[[3908,3911],2],[3912,3],[[3913,3916],2],[3917,1,"\u0F4C\u0FB7"],[[3918,3921],2],[3922,1,"\u0F51\u0FB7"],[[3923,3926],2],[3927,1,"\u0F56\u0FB7"],[[3928,3931],2],[3932,1,"\u0F5B\u0FB7"],[[3933,3944],2],[3945,1,"\u0F40\u0FB5"],[3946,2],[[3947,3948],2],[[3949,3952],3],[[3953,3954],2],[3955,1,"\u0F71\u0F72"],[3956,2],[3957,1,"\u0F71\u0F74"],[3958,1,"\u0FB2\u0F80"],[3959,1,"\u0FB2\u0F71\u0F80"],[3960,1,"\u0FB3\u0F80"],[3961,1,"\u0FB3\u0F71\u0F80"],[[3962,3968],2],[3969,1,"\u0F71\u0F80"],[[3970,3972],2],[3973,2],[[3974,3979],2],[[3980,3983],2],[[3984,3986],2],[3987,1,"\u0F92\u0FB7"],[[3988,3989],2],[3990,2],[3991,2],[3992,3],[[3993,3996],2],[3997,1,"\u0F9C\u0FB7"],[[3998,4001],2],[4002,1,"\u0FA1\u0FB7"],[[4003,4006],2],[4007,1,"\u0FA6\u0FB7"],[[4008,4011],2],[4012,1,"\u0FAB\u0FB7"],[4013,2],[[4014,4016],2],[[4017,4023],2],[4024,2],[4025,1,"\u0F90\u0FB5"],[[4026,4028],2],[4029,3],[[4030,4037],2],[4038,2],[[4039,4044],2],[4045,3],[4046,2],[4047,2],[[4048,4049],2],[[4050,4052],2],[[4053,4056],2],[[4057,4058],2],[[4059,4095],3],[[4096,4129],2],[4130,2],[[4131,4135],2],[4136,2],[[4137,4138],2],[4139,2],[[4140,4146],2],[[4147,4149],2],[[4150,4153],2],[[4154,4159],2],[[4160,4169],2],[[4170,4175],2],[[4176,4185],2],[[4186,4249],2],[[4250,4253],2],[[4254,4255],2],[[4256,4293],3],[4294,3],[4295,1,"\u2D27"],[[4296,4300],3],[4301,1,"\u2D2D"],[[4302,4303],3],[[4304,4342],2],[[4343,4344],2],[[4345,4346],2],[4347,2],[4348,1,"\u10DC"],[[4349,4351],2],[[4352,4441],2],[[4442,4446],2],[[4447,4448],3],[[4449,4514],2],[[4515,4519],2],[[4520,4601],2],[[4602,4607],2],[[4608,4614],2],[4615,2],[[4616,4678],2],[4679,2],[4680,2],[4681,3],[[4682,4685],2],[[4686,4687],3],[[4688,4694],2],[4695,3],[4696,2],[4697,3],[[4698,4701],2],[[4702,4703],3],[[4704,4742],2],[4743,2],[4744,2],[4745,3],[[4746,4749],2],[[4750,4751],3],[[4752,4782],2],[4783,2],[4784,2],[4785,3],[[4786,4789],2],[[4790,4791],3],[[4792,4798],2],[4799,3],[4800,2],[4801,3],[[4802,4805],2],[[4806,4807],3],[[4808,4814],2],[4815,2],[[4816,4822],2],[4823,3],[[4824,4846],2],[4847,2],[[4848,4878],2],[4879,2],[4880,2],[4881,3],[[4882,4885],2],[[4886,4887],3],[[4888,4894],2],[4895,2],[[4896,4934],2],[4935,2],[[4936,4954],2],[[4955,4956],3],[[4957,4958],2],[4959,2],[4960,2],[[4961,4988],2],[[4989,4991],3],[[4992,5007],2],[[5008,5017],2],[[5018,5023],3],[[5024,5108],2],[5109,2],[[5110,5111],3],[5112,1,"\u13F0"],[5113,1,"\u13F1"],[5114,1,"\u13F2"],[5115,1,"\u13F3"],[5116,1,"\u13F4"],[5117,1,"\u13F5"],[[5118,5119],3],[5120,2],[[5121,5740],2],[[5741,5742],2],[[5743,5750],2],[[5751,5759],2],[5760,3],[[5761,5786],2],[[5787,5788],2],[[5789,5791],3],[[5792,5866],2],[[5867,5872],2],[[5873,5880],2],[[5881,5887],3],[[5888,5900],2],[5901,2],[[5902,5908],2],[5909,2],[[5910,5918],3],[5919,2],[[5920,5940],2],[[5941,5942],2],[[5943,5951],3],[[5952,5971],2],[[5972,5983],3],[[5984,5996],2],[5997,3],[[5998,6000],2],[6001,3],[[6002,6003],2],[[6004,6015],3],[[6016,6067],2],[[6068,6069],3],[[6070,6099],2],[[6100,6102],2],[6103,2],[[6104,6107],2],[6108,2],[6109,2],[[6110,6111],3],[[6112,6121],2],[[6122,6127],3],[[6128,6137],2],[[6138,6143],3],[[6144,6149],2],[6150,3],[[6151,6154],2],[[6155,6157],7],[6158,3],[6159,7],[[6160,6169],2],[[6170,6175],3],[[6176,6263],2],[6264,2],[[6265,6271],3],[[6272,6313],2],[6314,2],[[6315,6319],3],[[6320,6389],2],[[6390,6399],3],[[6400,6428],2],[[6429,6430],2],[6431,3],[[6432,6443],2],[[6444,6447],3],[[6448,6459],2],[[6460,6463],3],[6464,2],[[6465,6467],3],[[6468,6469],2],[[6470,6509],2],[[6510,6511],3],[[6512,6516],2],[[6517,6527],3],[[6528,6569],2],[[6570,6571],2],[[6572,6575],3],[[6576,6601],2],[[6602,6607],3],[[6608,6617],2],[6618,2],[[6619,6621],3],[[6622,6623],2],[[6624,6655],2],[[6656,6683],2],[[6684,6685],3],[[6686,6687],2],[[6688,6750],2],[6751,3],[[6752,6780],2],[[6781,6782],3],[[6783,6793],2],[[6794,6799],3],[[6800,6809],2],[[6810,6815],3],[[6816,6822],2],[6823,2],[[6824,6829],2],[[6830,6831],3],[[6832,6845],2],[6846,2],[[6847,6848],2],[[6849,6862],2],[[6863,6911],3],[[6912,6987],2],[6988,2],[[6989,6991],3],[[6992,7001],2],[[7002,7018],2],[[7019,7027],2],[[7028,7036],2],[[7037,7038],2],[7039,3],[[7040,7082],2],[[7083,7085],2],[[7086,7097],2],[[7098,7103],2],[[7104,7155],2],[[7156,7163],3],[[7164,7167],2],[[7168,7223],2],[[7224,7226],3],[[7227,7231],2],[[7232,7241],2],[[7242,7244],3],[[7245,7293],2],[[7294,7295],2],[7296,1,"\u0432"],[7297,1,"\u0434"],[7298,1,"\u043E"],[7299,1,"\u0441"],[[7300,7301],1,"\u0442"],[7302,1,"\u044A"],[7303,1,"\u0463"],[7304,1,"\uA64B"],[[7305,7311],3],[7312,1,"\u10D0"],[7313,1,"\u10D1"],[7314,1,"\u10D2"],[7315,1,"\u10D3"],[7316,1,"\u10D4"],[7317,1,"\u10D5"],[7318,1,"\u10D6"],[7319,1,"\u10D7"],[7320,1,"\u10D8"],[7321,1,"\u10D9"],[7322,1,"\u10DA"],[7323,1,"\u10DB"],[7324,1,"\u10DC"],[7325,1,"\u10DD"],[7326,1,"\u10DE"],[7327,1,"\u10DF"],[7328,1,"\u10E0"],[7329,1,"\u10E1"],[7330,1,"\u10E2"],[7331,1,"\u10E3"],[7332,1,"\u10E4"],[7333,1,"\u10E5"],[7334,1,"\u10E6"],[7335,1,"\u10E7"],[7336,1,"\u10E8"],[7337,1,"\u10E9"],[7338,1,"\u10EA"],[7339,1,"\u10EB"],[7340,1,"\u10EC"],[7341,1,"\u10ED"],[7342,1,"\u10EE"],[7343,1,"\u10EF"],[7344,1,"\u10F0"],[7345,1,"\u10F1"],[7346,1,"\u10F2"],[7347,1,"\u10F3"],[7348,1,"\u10F4"],[7349,1,"\u10F5"],[7350,1,"\u10F6"],[7351,1,"\u10F7"],[7352,1,"\u10F8"],[7353,1,"\u10F9"],[7354,1,"\u10FA"],[[7355,7356],3],[7357,1,"\u10FD"],[7358,1,"\u10FE"],[7359,1,"\u10FF"],[[7360,7367],2],[[7368,7375],3],[[7376,7378],2],[7379,2],[[7380,7410],2],[[7411,7414],2],[7415,2],[[7416,7417],2],[7418,2],[[7419,7423],3],[[7424,7467],2],[7468,1,"a"],[7469,1,"\xE6"],[7470,1,"b"],[7471,2],[7472,1,"d"],[7473,1,"e"],[7474,1,"\u01DD"],[7475,1,"g"],[7476,1,"h"],[7477,1,"i"],[7478,1,"j"],[7479,1,"k"],[7480,1,"l"],[7481,1,"m"],[7482,1,"n"],[7483,2],[7484,1,"o"],[7485,1,"\u0223"],[7486,1,"p"],[7487,1,"r"],[7488,1,"t"],[7489,1,"u"],[7490,1,"w"],[7491,1,"a"],[7492,1,"\u0250"],[7493,1,"\u0251"],[7494,1,"\u1D02"],[7495,1,"b"],[7496,1,"d"],[7497,1,"e"],[7498,1,"\u0259"],[7499,1,"\u025B"],[7500,1,"\u025C"],[7501,1,"g"],[7502,2],[7503,1,"k"],[7504,1,"m"],[7505,1,"\u014B"],[7506,1,"o"],[7507,1,"\u0254"],[7508,1,"\u1D16"],[7509,1,"\u1D17"],[7510,1,"p"],[7511,1,"t"],[7512,1,"u"],[7513,1,"\u1D1D"],[7514,1,"\u026F"],[7515,1,"v"],[7516,1,"\u1D25"],[7517,1,"\u03B2"],[7518,1,"\u03B3"],[7519,1,"\u03B4"],[7520,1,"\u03C6"],[7521,1,"\u03C7"],[7522,1,"i"],[7523,1,"r"],[7524,1,"u"],[7525,1,"v"],[7526,1,"\u03B2"],[7527,1,"\u03B3"],[7528,1,"\u03C1"],[7529,1,"\u03C6"],[7530,1,"\u03C7"],[7531,2],[[7532,7543],2],[7544,1,"\u043D"],[[7545,7578],2],[7579,1,"\u0252"],[7580,1,"c"],[7581,1,"\u0255"],[7582,1,"\xF0"],[7583,1,"\u025C"],[7584,1,"f"],[7585,1,"\u025F"],[7586,1,"\u0261"],[7587,1,"\u0265"],[7588,1,"\u0268"],[7589,1,"\u0269"],[7590,1,"\u026A"],[7591,1,"\u1D7B"],[7592,1,"\u029D"],[7593,1,"\u026D"],[7594,1,"\u1D85"],[7595,1,"\u029F"],[7596,1,"\u0271"],[7597,1,"\u0270"],[7598,1,"\u0272"],[7599,1,"\u0273"],[7600,1,"\u0274"],[7601,1,"\u0275"],[7602,1,"\u0278"],[7603,1,"\u0282"],[7604,1,"\u0283"],[7605,1,"\u01AB"],[7606,1,"\u0289"],[7607,1,"\u028A"],[7608,1,"\u1D1C"],[7609,1,"\u028B"],[7610,1,"\u028C"],[7611,1,"z"],[7612,1,"\u0290"],[7613,1,"\u0291"],[7614,1,"\u0292"],[7615,1,"\u03B8"],[[7616,7619],2],[[7620,7626],2],[[7627,7654],2],[[7655,7669],2],[[7670,7673],2],[7674,2],[7675,2],[7676,2],[7677,2],[[7678,7679],2],[7680,1,"\u1E01"],[7681,2],[7682,1,"\u1E03"],[7683,2],[7684,1,"\u1E05"],[7685,2],[7686,1,"\u1E07"],[7687,2],[7688,1,"\u1E09"],[7689,2],[7690,1,"\u1E0B"],[7691,2],[7692,1,"\u1E0D"],[7693,2],[7694,1,"\u1E0F"],[7695,2],[7696,1,"\u1E11"],[7697,2],[7698,1,"\u1E13"],[7699,2],[7700,1,"\u1E15"],[7701,2],[7702,1,"\u1E17"],[7703,2],[7704,1,"\u1E19"],[7705,2],[7706,1,"\u1E1B"],[7707,2],[7708,1,"\u1E1D"],[7709,2],[7710,1,"\u1E1F"],[7711,2],[7712,1,"\u1E21"],[7713,2],[7714,1,"\u1E23"],[7715,2],[7716,1,"\u1E25"],[7717,2],[7718,1,"\u1E27"],[7719,2],[7720,1,"\u1E29"],[7721,2],[7722,1,"\u1E2B"],[7723,2],[7724,1,"\u1E2D"],[7725,2],[7726,1,"\u1E2F"],[7727,2],[7728,1,"\u1E31"],[7729,2],[7730,1,"\u1E33"],[7731,2],[7732,1,"\u1E35"],[7733,2],[7734,1,"\u1E37"],[7735,2],[7736,1,"\u1E39"],[7737,2],[7738,1,"\u1E3B"],[7739,2],[7740,1,"\u1E3D"],[7741,2],[7742,1,"\u1E3F"],[7743,2],[7744,1,"\u1E41"],[7745,2],[7746,1,"\u1E43"],[7747,2],[7748,1,"\u1E45"],[7749,2],[7750,1,"\u1E47"],[7751,2],[7752,1,"\u1E49"],[7753,2],[7754,1,"\u1E4B"],[7755,2],[7756,1,"\u1E4D"],[7757,2],[7758,1,"\u1E4F"],[7759,2],[7760,1,"\u1E51"],[7761,2],[7762,1,"\u1E53"],[7763,2],[7764,1,"\u1E55"],[7765,2],[7766,1,"\u1E57"],[7767,2],[7768,1,"\u1E59"],[7769,2],[7770,1,"\u1E5B"],[7771,2],[7772,1,"\u1E5D"],[7773,2],[7774,1,"\u1E5F"],[7775,2],[7776,1,"\u1E61"],[7777,2],[7778,1,"\u1E63"],[7779,2],[7780,1,"\u1E65"],[7781,2],[7782,1,"\u1E67"],[7783,2],[7784,1,"\u1E69"],[7785,2],[7786,1,"\u1E6B"],[7787,2],[7788,1,"\u1E6D"],[7789,2],[7790,1,"\u1E6F"],[7791,2],[7792,1,"\u1E71"],[7793,2],[7794,1,"\u1E73"],[7795,2],[7796,1,"\u1E75"],[7797,2],[7798,1,"\u1E77"],[7799,2],[7800,1,"\u1E79"],[7801,2],[7802,1,"\u1E7B"],[7803,2],[7804,1,"\u1E7D"],[7805,2],[7806,1,"\u1E7F"],[7807,2],[7808,1,"\u1E81"],[7809,2],[7810,1,"\u1E83"],[7811,2],[7812,1,"\u1E85"],[7813,2],[7814,1,"\u1E87"],[7815,2],[7816,1,"\u1E89"],[7817,2],[7818,1,"\u1E8B"],[7819,2],[7820,1,"\u1E8D"],[7821,2],[7822,1,"\u1E8F"],[7823,2],[7824,1,"\u1E91"],[7825,2],[7826,1,"\u1E93"],[7827,2],[7828,1,"\u1E95"],[[7829,7833],2],[7834,1,"a\u02BE"],[7835,1,"\u1E61"],[[7836,7837],2],[7838,1,"ss"],[7839,2],[7840,1,"\u1EA1"],[7841,2],[7842,1,"\u1EA3"],[7843,2],[7844,1,"\u1EA5"],[7845,2],[7846,1,"\u1EA7"],[7847,2],[7848,1,"\u1EA9"],[7849,2],[7850,1,"\u1EAB"],[7851,2],[7852,1,"\u1EAD"],[7853,2],[7854,1,"\u1EAF"],[7855,2],[7856,1,"\u1EB1"],[7857,2],[7858,1,"\u1EB3"],[7859,2],[7860,1,"\u1EB5"],[7861,2],[7862,1,"\u1EB7"],[7863,2],[7864,1,"\u1EB9"],[7865,2],[7866,1,"\u1EBB"],[7867,2],[7868,1,"\u1EBD"],[7869,2],[7870,1,"\u1EBF"],[7871,2],[7872,1,"\u1EC1"],[7873,2],[7874,1,"\u1EC3"],[7875,2],[7876,1,"\u1EC5"],[7877,2],[7878,1,"\u1EC7"],[7879,2],[7880,1,"\u1EC9"],[7881,2],[7882,1,"\u1ECB"],[7883,2],[7884,1,"\u1ECD"],[7885,2],[7886,1,"\u1ECF"],[7887,2],[7888,1,"\u1ED1"],[7889,2],[7890,1,"\u1ED3"],[7891,2],[7892,1,"\u1ED5"],[7893,2],[7894,1,"\u1ED7"],[7895,2],[7896,1,"\u1ED9"],[7897,2],[7898,1,"\u1EDB"],[7899,2],[7900,1,"\u1EDD"],[7901,2],[7902,1,"\u1EDF"],[7903,2],[7904,1,"\u1EE1"],[7905,2],[7906,1,"\u1EE3"],[7907,2],[7908,1,"\u1EE5"],[7909,2],[7910,1,"\u1EE7"],[7911,2],[7912,1,"\u1EE9"],[7913,2],[7914,1,"\u1EEB"],[7915,2],[7916,1,"\u1EED"],[7917,2],[7918,1,"\u1EEF"],[7919,2],[7920,1,"\u1EF1"],[7921,2],[7922,1,"\u1EF3"],[7923,2],[7924,1,"\u1EF5"],[7925,2],[7926,1,"\u1EF7"],[7927,2],[7928,1,"\u1EF9"],[7929,2],[7930,1,"\u1EFB"],[7931,2],[7932,1,"\u1EFD"],[7933,2],[7934,1,"\u1EFF"],[7935,2],[[7936,7943],2],[7944,1,"\u1F00"],[7945,1,"\u1F01"],[7946,1,"\u1F02"],[7947,1,"\u1F03"],[7948,1,"\u1F04"],[7949,1,"\u1F05"],[7950,1,"\u1F06"],[7951,1,"\u1F07"],[[7952,7957],2],[[7958,7959],3],[7960,1,"\u1F10"],[7961,1,"\u1F11"],[7962,1,"\u1F12"],[7963,1,"\u1F13"],[7964,1,"\u1F14"],[7965,1,"\u1F15"],[[7966,7967],3],[[7968,7975],2],[7976,1,"\u1F20"],[7977,1,"\u1F21"],[7978,1,"\u1F22"],[7979,1,"\u1F23"],[7980,1,"\u1F24"],[7981,1,"\u1F25"],[7982,1,"\u1F26"],[7983,1,"\u1F27"],[[7984,7991],2],[7992,1,"\u1F30"],[7993,1,"\u1F31"],[7994,1,"\u1F32"],[7995,1,"\u1F33"],[7996,1,"\u1F34"],[7997,1,"\u1F35"],[7998,1,"\u1F36"],[7999,1,"\u1F37"],[[8000,8005],2],[[8006,8007],3],[8008,1,"\u1F40"],[8009,1,"\u1F41"],[8010,1,"\u1F42"],[8011,1,"\u1F43"],[8012,1,"\u1F44"],[8013,1,"\u1F45"],[[8014,8015],3],[[8016,8023],2],[8024,3],[8025,1,"\u1F51"],[8026,3],[8027,1,"\u1F53"],[8028,3],[8029,1,"\u1F55"],[8030,3],[8031,1,"\u1F57"],[[8032,8039],2],[8040,1,"\u1F60"],[8041,1,"\u1F61"],[8042,1,"\u1F62"],[8043,1,"\u1F63"],[8044,1,"\u1F64"],[8045,1,"\u1F65"],[8046,1,"\u1F66"],[8047,1,"\u1F67"],[8048,2],[8049,1,"\u03AC"],[8050,2],[8051,1,"\u03AD"],[8052,2],[8053,1,"\u03AE"],[8054,2],[8055,1,"\u03AF"],[8056,2],[8057,1,"\u03CC"],[8058,2],[8059,1,"\u03CD"],[8060,2],[8061,1,"\u03CE"],[[8062,8063],3],[8064,1,"\u1F00\u03B9"],[8065,1,"\u1F01\u03B9"],[8066,1,"\u1F02\u03B9"],[8067,1,"\u1F03\u03B9"],[8068,1,"\u1F04\u03B9"],[8069,1,"\u1F05\u03B9"],[8070,1,"\u1F06\u03B9"],[8071,1,"\u1F07\u03B9"],[8072,1,"\u1F00\u03B9"],[8073,1,"\u1F01\u03B9"],[8074,1,"\u1F02\u03B9"],[8075,1,"\u1F03\u03B9"],[8076,1,"\u1F04\u03B9"],[8077,1,"\u1F05\u03B9"],[8078,1,"\u1F06\u03B9"],[8079,1,"\u1F07\u03B9"],[8080,1,"\u1F20\u03B9"],[8081,1,"\u1F21\u03B9"],[8082,1,"\u1F22\u03B9"],[8083,1,"\u1F23\u03B9"],[8084,1,"\u1F24\u03B9"],[8085,1,"\u1F25\u03B9"],[8086,1,"\u1F26\u03B9"],[8087,1,"\u1F27\u03B9"],[8088,1,"\u1F20\u03B9"],[8089,1,"\u1F21\u03B9"],[8090,1,"\u1F22\u03B9"],[8091,1,"\u1F23\u03B9"],[8092,1,"\u1F24\u03B9"],[8093,1,"\u1F25\u03B9"],[8094,1,"\u1F26\u03B9"],[8095,1,"\u1F27\u03B9"],[8096,1,"\u1F60\u03B9"],[8097,1,"\u1F61\u03B9"],[8098,1,"\u1F62\u03B9"],[8099,1,"\u1F63\u03B9"],[8100,1,"\u1F64\u03B9"],[8101,1,"\u1F65\u03B9"],[8102,1,"\u1F66\u03B9"],[8103,1,"\u1F67\u03B9"],[8104,1,"\u1F60\u03B9"],[8105,1,"\u1F61\u03B9"],[8106,1,"\u1F62\u03B9"],[8107,1,"\u1F63\u03B9"],[8108,1,"\u1F64\u03B9"],[8109,1,"\u1F65\u03B9"],[8110,1,"\u1F66\u03B9"],[8111,1,"\u1F67\u03B9"],[[8112,8113],2],[8114,1,"\u1F70\u03B9"],[8115,1,"\u03B1\u03B9"],[8116,1,"\u03AC\u03B9"],[8117,3],[8118,2],[8119,1,"\u1FB6\u03B9"],[8120,1,"\u1FB0"],[8121,1,"\u1FB1"],[8122,1,"\u1F70"],[8123,1,"\u03AC"],[8124,1,"\u03B1\u03B9"],[8125,5," \u0313"],[8126,1,"\u03B9"],[8127,5," \u0313"],[8128,5," \u0342"],[8129,5," \u0308\u0342"],[8130,1,"\u1F74\u03B9"],[8131,1,"\u03B7\u03B9"],[8132,1,"\u03AE\u03B9"],[8133,3],[8134,2],[8135,1,"\u1FC6\u03B9"],[8136,1,"\u1F72"],[8137,1,"\u03AD"],[8138,1,"\u1F74"],[8139,1,"\u03AE"],[8140,1,"\u03B7\u03B9"],[8141,5," \u0313\u0300"],[8142,5," \u0313\u0301"],[8143,5," \u0313\u0342"],[[8144,8146],2],[8147,1,"\u0390"],[[8148,8149],3],[[8150,8151],2],[8152,1,"\u1FD0"],[8153,1,"\u1FD1"],[8154,1,"\u1F76"],[8155,1,"\u03AF"],[8156,3],[8157,5," \u0314\u0300"],[8158,5," \u0314\u0301"],[8159,5," \u0314\u0342"],[[8160,8162],2],[8163,1,"\u03B0"],[[8164,8167],2],[8168,1,"\u1FE0"],[8169,1,"\u1FE1"],[8170,1,"\u1F7A"],[8171,1,"\u03CD"],[8172,1,"\u1FE5"],[8173,5," \u0308\u0300"],[8174,5," \u0308\u0301"],[8175,5,"`"],[[8176,8177],3],[8178,1,"\u1F7C\u03B9"],[8179,1,"\u03C9\u03B9"],[8180,1,"\u03CE\u03B9"],[8181,3],[8182,2],[8183,1,"\u1FF6\u03B9"],[8184,1,"\u1F78"],[8185,1,"\u03CC"],[8186,1,"\u1F7C"],[8187,1,"\u03CE"],[8188,1,"\u03C9\u03B9"],[8189,5," \u0301"],[8190,5," \u0314"],[8191,3],[[8192,8202],5," "],[8203,7],[[8204,8205],6,""],[[8206,8207],3],[8208,2],[8209,1,"\u2010"],[[8210,8214],2],[8215,5," \u0333"],[[8216,8227],2],[[8228,8230],3],[8231,2],[[8232,8238],3],[8239,5," "],[[8240,8242],2],[8243,1,"\u2032\u2032"],[8244,1,"\u2032\u2032\u2032"],[8245,2],[8246,1,"\u2035\u2035"],[8247,1,"\u2035\u2035\u2035"],[[8248,8251],2],[8252,5,"!!"],[8253,2],[8254,5," \u0305"],[[8255,8262],2],[8263,5,"??"],[8264,5,"?!"],[8265,5,"!?"],[[8266,8269],2],[[8270,8274],2],[[8275,8276],2],[[8277,8278],2],[8279,1,"\u2032\u2032\u2032\u2032"],[[8280,8286],2],[8287,5," "],[8288,7],[[8289,8291],3],[8292,7],[8293,3],[[8294,8297],3],[[8298,8303],3],[8304,1,"0"],[8305,1,"i"],[[8306,8307],3],[8308,1,"4"],[8309,1,"5"],[8310,1,"6"],[8311,1,"7"],[8312,1,"8"],[8313,1,"9"],[8314,5,"+"],[8315,1,"\u2212"],[8316,5,"="],[8317,5,"("],[8318,5,")"],[8319,1,"n"],[8320,1,"0"],[8321,1,"1"],[8322,1,"2"],[8323,1,"3"],[8324,1,"4"],[8325,1,"5"],[8326,1,"6"],[8327,1,"7"],[8328,1,"8"],[8329,1,"9"],[8330,5,"+"],[8331,1,"\u2212"],[8332,5,"="],[8333,5,"("],[8334,5,")"],[8335,3],[8336,1,"a"],[8337,1,"e"],[8338,1,"o"],[8339,1,"x"],[8340,1,"\u0259"],[8341,1,"h"],[8342,1,"k"],[8343,1,"l"],[8344,1,"m"],[8345,1,"n"],[8346,1,"p"],[8347,1,"s"],[8348,1,"t"],[[8349,8351],3],[[8352,8359],2],[8360,1,"rs"],[[8361,8362],2],[8363,2],[8364,2],[[8365,8367],2],[[8368,8369],2],[[8370,8373],2],[[8374,8376],2],[8377,2],[8378,2],[[8379,8381],2],[8382,2],[8383,2],[8384,2],[[8385,8399],3],[[8400,8417],2],[[8418,8419],2],[[8420,8426],2],[8427,2],[[8428,8431],2],[8432,2],[[8433,8447],3],[8448,5,"a/c"],[8449,5,"a/s"],[8450,1,"c"],[8451,1,"\xB0c"],[8452,2],[8453,5,"c/o"],[8454,5,"c/u"],[8455,1,"\u025B"],[8456,2],[8457,1,"\xB0f"],[8458,1,"g"],[[8459,8462],1,"h"],[8463,1,"\u0127"],[[8464,8465],1,"i"],[[8466,8467],1,"l"],[8468,2],[8469,1,"n"],[8470,1,"no"],[[8471,8472],2],[8473,1,"p"],[8474,1,"q"],[[8475,8477],1,"r"],[[8478,8479],2],[8480,1,"sm"],[8481,1,"tel"],[8482,1,"tm"],[8483,2],[8484,1,"z"],[8485,2],[8486,1,"\u03C9"],[8487,2],[8488,1,"z"],[8489,2],[8490,1,"k"],[8491,1,"\xE5"],[8492,1,"b"],[8493,1,"c"],[8494,2],[[8495,8496],1,"e"],[8497,1,"f"],[8498,3],[8499,1,"m"],[8500,1,"o"],[8501,1,"\u05D0"],[8502,1,"\u05D1"],[8503,1,"\u05D2"],[8504,1,"\u05D3"],[8505,1,"i"],[8506,2],[8507,1,"fax"],[8508,1,"\u03C0"],[[8509,8510],1,"\u03B3"],[8511,1,"\u03C0"],[8512,1,"\u2211"],[[8513,8516],2],[[8517,8518],1,"d"],[8519,1,"e"],[8520,1,"i"],[8521,1,"j"],[[8522,8523],2],[8524,2],[8525,2],[8526,2],[8527,2],[8528,1,"1\u20447"],[8529,1,"1\u20449"],[8530,1,"1\u204410"],[8531,1,"1\u20443"],[8532,1,"2\u20443"],[8533,1,"1\u20445"],[8534,1,"2\u20445"],[8535,1,"3\u20445"],[8536,1,"4\u20445"],[8537,1,"1\u20446"],[8538,1,"5\u20446"],[8539,1,"1\u20448"],[8540,1,"3\u20448"],[8541,1,"5\u20448"],[8542,1,"7\u20448"],[8543,1,"1\u2044"],[8544,1,"i"],[8545,1,"ii"],[8546,1,"iii"],[8547,1,"iv"],[8548,1,"v"],[8549,1,"vi"],[8550,1,"vii"],[8551,1,"viii"],[8552,1,"ix"],[8553,1,"x"],[8554,1,"xi"],[8555,1,"xii"],[8556,1,"l"],[8557,1,"c"],[8558,1,"d"],[8559,1,"m"],[8560,1,"i"],[8561,1,"ii"],[8562,1,"iii"],[8563,1,"iv"],[8564,1,"v"],[8565,1,"vi"],[8566,1,"vii"],[8567,1,"viii"],[8568,1,"ix"],[8569,1,"x"],[8570,1,"xi"],[8571,1,"xii"],[8572,1,"l"],[8573,1,"c"],[8574,1,"d"],[8575,1,"m"],[[8576,8578],2],[8579,3],[8580,2],[[8581,8584],2],[8585,1,"0\u20443"],[[8586,8587],2],[[8588,8591],3],[[8592,8682],2],[[8683,8691],2],[[8692,8703],2],[[8704,8747],2],[8748,1,"\u222B\u222B"],[8749,1,"\u222B\u222B\u222B"],[8750,2],[8751,1,"\u222E\u222E"],[8752,1,"\u222E\u222E\u222E"],[[8753,8799],2],[8800,4],[[8801,8813],2],[[8814,8815],4],[[8816,8945],2],[[8946,8959],2],[8960,2],[8961,2],[[8962,9000],2],[9001,1,"\u3008"],[9002,1,"\u3009"],[[9003,9082],2],[9083,2],[9084,2],[[9085,9114],2],[[9115,9166],2],[[9167,9168],2],[[9169,9179],2],[[9180,9191],2],[9192,2],[[9193,9203],2],[[9204,9210],2],[[9211,9214],2],[9215,2],[[9216,9252],2],[[9253,9254],2],[[9255,9279],3],[[9280,9290],2],[[9291,9311],3],[9312,1,"1"],[9313,1,"2"],[9314,1,"3"],[9315,1,"4"],[9316,1,"5"],[9317,1,"6"],[9318,1,"7"],[9319,1,"8"],[9320,1,"9"],[9321,1,"10"],[9322,1,"11"],[9323,1,"12"],[9324,1,"13"],[9325,1,"14"],[9326,1,"15"],[9327,1,"16"],[9328,1,"17"],[9329,1,"18"],[9330,1,"19"],[9331,1,"20"],[9332,5,"(1)"],[9333,5,"(2)"],[9334,5,"(3)"],[9335,5,"(4)"],[9336,5,"(5)"],[9337,5,"(6)"],[9338,5,"(7)"],[9339,5,"(8)"],[9340,5,"(9)"],[9341,5,"(10)"],[9342,5,"(11)"],[9343,5,"(12)"],[9344,5,"(13)"],[9345,5,"(14)"],[9346,5,"(15)"],[9347,5,"(16)"],[9348,5,"(17)"],[9349,5,"(18)"],[9350,5,"(19)"],[9351,5,"(20)"],[[9352,9371],3],[9372,5,"(a)"],[9373,5,"(b)"],[9374,5,"(c)"],[9375,5,"(d)"],[9376,5,"(e)"],[9377,5,"(f)"],[9378,5,"(g)"],[9379,5,"(h)"],[9380,5,"(i)"],[9381,5,"(j)"],[9382,5,"(k)"],[9383,5,"(l)"],[9384,5,"(m)"],[9385,5,"(n)"],[9386,5,"(o)"],[9387,5,"(p)"],[9388,5,"(q)"],[9389,5,"(r)"],[9390,5,"(s)"],[9391,5,"(t)"],[9392,5,"(u)"],[9393,5,"(v)"],[9394,5,"(w)"],[9395,5,"(x)"],[9396,5,"(y)"],[9397,5,"(z)"],[9398,1,"a"],[9399,1,"b"],[9400,1,"c"],[9401,1,"d"],[9402,1,"e"],[9403,1,"f"],[9404,1,"g"],[9405,1,"h"],[9406,1,"i"],[9407,1,"j"],[9408,1,"k"],[9409,1,"l"],[9410,1,"m"],[9411,1,"n"],[9412,1,"o"],[9413,1,"p"],[9414,1,"q"],[9415,1,"r"],[9416,1,"s"],[9417,1,"t"],[9418,1,"u"],[9419,1,"v"],[9420,1,"w"],[9421,1,"x"],[9422,1,"y"],[9423,1,"z"],[9424,1,"a"],[9425,1,"b"],[9426,1,"c"],[9427,1,"d"],[9428,1,"e"],[9429,1,"f"],[9430,1,"g"],[9431,1,"h"],[9432,1,"i"],[9433,1,"j"],[9434,1,"k"],[9435,1,"l"],[9436,1,"m"],[9437,1,"n"],[9438,1,"o"],[9439,1,"p"],[9440,1,"q"],[9441,1,"r"],[9442,1,"s"],[9443,1,"t"],[9444,1,"u"],[9445,1,"v"],[9446,1,"w"],[9447,1,"x"],[9448,1,"y"],[9449,1,"z"],[9450,1,"0"],[[9451,9470],2],[9471,2],[[9472,9621],2],[[9622,9631],2],[[9632,9711],2],[[9712,9719],2],[[9720,9727],2],[[9728,9747],2],[[9748,9749],2],[[9750,9751],2],[9752,2],[9753,2],[[9754,9839],2],[[9840,9841],2],[[9842,9853],2],[[9854,9855],2],[[9856,9865],2],[[9866,9873],2],[[9874,9884],2],[9885,2],[[9886,9887],2],[[9888,9889],2],[[9890,9905],2],[9906,2],[[9907,9916],2],[[9917,9919],2],[[9920,9923],2],[[9924,9933],2],[9934,2],[[9935,9953],2],[9954,2],[9955,2],[[9956,9959],2],[[9960,9983],2],[9984,2],[[9985,9988],2],[9989,2],[[9990,9993],2],[[9994,9995],2],[[9996,10023],2],[10024,2],[[10025,10059],2],[10060,2],[10061,2],[10062,2],[[10063,10066],2],[[10067,10069],2],[10070,2],[10071,2],[[10072,10078],2],[[10079,10080],2],[[10081,10087],2],[[10088,10101],2],[[10102,10132],2],[[10133,10135],2],[[10136,10159],2],[10160,2],[[10161,10174],2],[10175,2],[[10176,10182],2],[[10183,10186],2],[10187,2],[10188,2],[10189,2],[[10190,10191],2],[[10192,10219],2],[[10220,10223],2],[[10224,10239],2],[[10240,10495],2],[[10496,10763],2],[10764,1,"\u222B\u222B\u222B\u222B"],[[10765,10867],2],[10868,5,"::="],[10869,5,"=="],[10870,5,"==="],[[10871,10971],2],[10972,1,"\u2ADD\u0338"],[[10973,11007],2],[[11008,11021],2],[[11022,11027],2],[[11028,11034],2],[[11035,11039],2],[[11040,11043],2],[[11044,11084],2],[[11085,11087],2],[[11088,11092],2],[[11093,11097],2],[[11098,11123],2],[[11124,11125],3],[[11126,11157],2],[11158,3],[11159,2],[[11160,11193],2],[[11194,11196],2],[[11197,11208],2],[11209,2],[[11210,11217],2],[11218,2],[[11219,11243],2],[[11244,11247],2],[[11248,11262],2],[11263,2],[11264,1,"\u2C30"],[11265,1,"\u2C31"],[11266,1,"\u2C32"],[11267,1,"\u2C33"],[11268,1,"\u2C34"],[11269,1,"\u2C35"],[11270,1,"\u2C36"],[11271,1,"\u2C37"],[11272,1,"\u2C38"],[11273,1,"\u2C39"],[11274,1,"\u2C3A"],[11275,1,"\u2C3B"],[11276,1,"\u2C3C"],[11277,1,"\u2C3D"],[11278,1,"\u2C3E"],[11279,1,"\u2C3F"],[11280,1,"\u2C40"],[11281,1,"\u2C41"],[11282,1,"\u2C42"],[11283,1,"\u2C43"],[11284,1,"\u2C44"],[11285,1,"\u2C45"],[11286,1,"\u2C46"],[11287,1,"\u2C47"],[11288,1,"\u2C48"],[11289,1,"\u2C49"],[11290,1,"\u2C4A"],[11291,1,"\u2C4B"],[11292,1,"\u2C4C"],[11293,1,"\u2C4D"],[11294,1,"\u2C4E"],[11295,1,"\u2C4F"],[11296,1,"\u2C50"],[11297,1,"\u2C51"],[11298,1,"\u2C52"],[11299,1,"\u2C53"],[11300,1,"\u2C54"],[11301,1,"\u2C55"],[11302,1,"\u2C56"],[11303,1,"\u2C57"],[11304,1,"\u2C58"],[11305,1,"\u2C59"],[11306,1,"\u2C5A"],[11307,1,"\u2C5B"],[11308,1,"\u2C5C"],[11309,1,"\u2C5D"],[11310,1,"\u2C5E"],[11311,1,"\u2C5F"],[[11312,11358],2],[11359,2],[11360,1,"\u2C61"],[11361,2],[11362,1,"\u026B"],[11363,1,"\u1D7D"],[11364,1,"\u027D"],[[11365,11366],2],[11367,1,"\u2C68"],[11368,2],[11369,1,"\u2C6A"],[11370,2],[11371,1,"\u2C6C"],[11372,2],[11373,1,"\u0251"],[11374,1,"\u0271"],[11375,1,"\u0250"],[11376,1,"\u0252"],[11377,2],[11378,1,"\u2C73"],[11379,2],[11380,2],[11381,1,"\u2C76"],[[11382,11383],2],[[11384,11387],2],[11388,1,"j"],[11389,1,"v"],[11390,1,"\u023F"],[11391,1,"\u0240"],[11392,1,"\u2C81"],[11393,2],[11394,1,"\u2C83"],[11395,2],[11396,1,"\u2C85"],[11397,2],[11398,1,"\u2C87"],[11399,2],[11400,1,"\u2C89"],[11401,2],[11402,1,"\u2C8B"],[11403,2],[11404,1,"\u2C8D"],[11405,2],[11406,1,"\u2C8F"],[11407,2],[11408,1,"\u2C91"],[11409,2],[11410,1,"\u2C93"],[11411,2],[11412,1,"\u2C95"],[11413,2],[11414,1,"\u2C97"],[11415,2],[11416,1,"\u2C99"],[11417,2],[11418,1,"\u2C9B"],[11419,2],[11420,1,"\u2C9D"],[11421,2],[11422,1,"\u2C9F"],[11423,2],[11424,1,"\u2CA1"],[11425,2],[11426,1,"\u2CA3"],[11427,2],[11428,1,"\u2CA5"],[11429,2],[11430,1,"\u2CA7"],[11431,2],[11432,1,"\u2CA9"],[11433,2],[11434,1,"\u2CAB"],[11435,2],[11436,1,"\u2CAD"],[11437,2],[11438,1,"\u2CAF"],[11439,2],[11440,1,"\u2CB1"],[11441,2],[11442,1,"\u2CB3"],[11443,2],[11444,1,"\u2CB5"],[11445,2],[11446,1,"\u2CB7"],[11447,2],[11448,1,"\u2CB9"],[11449,2],[11450,1,"\u2CBB"],[11451,2],[11452,1,"\u2CBD"],[11453,2],[11454,1,"\u2CBF"],[11455,2],[11456,1,"\u2CC1"],[11457,2],[11458,1,"\u2CC3"],[11459,2],[11460,1,"\u2CC5"],[11461,2],[11462,1,"\u2CC7"],[11463,2],[11464,1,"\u2CC9"],[11465,2],[11466,1,"\u2CCB"],[11467,2],[11468,1,"\u2CCD"],[11469,2],[11470,1,"\u2CCF"],[11471,2],[11472,1,"\u2CD1"],[11473,2],[11474,1,"\u2CD3"],[11475,2],[11476,1,"\u2CD5"],[11477,2],[11478,1,"\u2CD7"],[11479,2],[11480,1,"\u2CD9"],[11481,2],[11482,1,"\u2CDB"],[11483,2],[11484,1,"\u2CDD"],[11485,2],[11486,1,"\u2CDF"],[11487,2],[11488,1,"\u2CE1"],[11489,2],[11490,1,"\u2CE3"],[[11491,11492],2],[[11493,11498],2],[11499,1,"\u2CEC"],[11500,2],[11501,1,"\u2CEE"],[[11502,11505],2],[11506,1,"\u2CF3"],[11507,2],[[11508,11512],3],[[11513,11519],2],[[11520,11557],2],[11558,3],[11559,2],[[11560,11564],3],[11565,2],[[11566,11567],3],[[11568,11621],2],[[11622,11623],2],[[11624,11630],3],[11631,1,"\u2D61"],[11632,2],[[11633,11646],3],[11647,2],[[11648,11670],2],[[11671,11679],3],[[11680,11686],2],[11687,3],[[11688,11694],2],[11695,3],[[11696,11702],2],[11703,3],[[11704,11710],2],[11711,3],[[11712,11718],2],[11719,3],[[11720,11726],2],[11727,3],[[11728,11734],2],[11735,3],[[11736,11742],2],[11743,3],[[11744,11775],2],[[11776,11799],2],[[11800,11803],2],[[11804,11805],2],[[11806,11822],2],[11823,2],[11824,2],[11825,2],[[11826,11835],2],[[11836,11842],2],[[11843,11844],2],[[11845,11849],2],[[11850,11854],2],[11855,2],[[11856,11858],2],[[11859,11869],2],[[11870,11903],3],[[11904,11929],2],[11930,3],[[11931,11934],2],[11935,1,"\u6BCD"],[[11936,12018],2],[12019,1,"\u9F9F"],[[12020,12031],3],[12032,1,"\u4E00"],[12033,1,"\u4E28"],[12034,1,"\u4E36"],[12035,1,"\u4E3F"],[12036,1,"\u4E59"],[12037,1,"\u4E85"],[12038,1,"\u4E8C"],[12039,1,"\u4EA0"],[12040,1,"\u4EBA"],[12041,1,"\u513F"],[12042,1,"\u5165"],[12043,1,"\u516B"],[12044,1,"\u5182"],[12045,1,"\u5196"],[12046,1,"\u51AB"],[12047,1,"\u51E0"],[12048,1,"\u51F5"],[12049,1,"\u5200"],[12050,1,"\u529B"],[12051,1,"\u52F9"],[12052,1,"\u5315"],[12053,1,"\u531A"],[12054,1,"\u5338"],[12055,1,"\u5341"],[12056,1,"\u535C"],[12057,1,"\u5369"],[12058,1,"\u5382"],[12059,1,"\u53B6"],[12060,1,"\u53C8"],[12061,1,"\u53E3"],[12062,1,"\u56D7"],[12063,1,"\u571F"],[12064,1,"\u58EB"],[12065,1,"\u5902"],[12066,1,"\u590A"],[12067,1,"\u5915"],[12068,1,"\u5927"],[12069,1,"\u5973"],[12070,1,"\u5B50"],[12071,1,"\u5B80"],[12072,1,"\u5BF8"],[12073,1,"\u5C0F"],[12074,1,"\u5C22"],[12075,1,"\u5C38"],[12076,1,"\u5C6E"],[12077,1,"\u5C71"],[12078,1,"\u5DDB"],[12079,1,"\u5DE5"],[12080,1,"\u5DF1"],[12081,1,"\u5DFE"],[12082,1,"\u5E72"],[12083,1,"\u5E7A"],[12084,1,"\u5E7F"],[12085,1,"\u5EF4"],[12086,1,"\u5EFE"],[12087,1,"\u5F0B"],[12088,1,"\u5F13"],[12089,1,"\u5F50"],[12090,1,"\u5F61"],[12091,1,"\u5F73"],[12092,1,"\u5FC3"],[12093,1,"\u6208"],[12094,1,"\u6236"],[12095,1,"\u624B"],[12096,1,"\u652F"],[12097,1,"\u6534"],[12098,1,"\u6587"],[12099,1,"\u6597"],[12100,1,"\u65A4"],[12101,1,"\u65B9"],[12102,1,"\u65E0"],[12103,1,"\u65E5"],[12104,1,"\u66F0"],[12105,1,"\u6708"],[12106,1,"\u6728"],[12107,1,"\u6B20"],[12108,1,"\u6B62"],[12109,1,"\u6B79"],[12110,1,"\u6BB3"],[12111,1,"\u6BCB"],[12112,1,"\u6BD4"],[12113,1,"\u6BDB"],[12114,1,"\u6C0F"],[12115,1,"\u6C14"],[12116,1,"\u6C34"],[12117,1,"\u706B"],[12118,1,"\u722A"],[12119,1,"\u7236"],[12120,1,"\u723B"],[12121,1,"\u723F"],[12122,1,"\u7247"],[12123,1,"\u7259"],[12124,1,"\u725B"],[12125,1,"\u72AC"],[12126,1,"\u7384"],[12127,1,"\u7389"],[12128,1,"\u74DC"],[12129,1,"\u74E6"],[12130,1,"\u7518"],[12131,1,"\u751F"],[12132,1,"\u7528"],[12133,1,"\u7530"],[12134,1,"\u758B"],[12135,1,"\u7592"],[12136,1,"\u7676"],[12137,1,"\u767D"],[12138,1,"\u76AE"],[12139,1,"\u76BF"],[12140,1,"\u76EE"],[12141,1,"\u77DB"],[12142,1,"\u77E2"],[12143,1,"\u77F3"],[12144,1,"\u793A"],[12145,1,"\u79B8"],[12146,1,"\u79BE"],[12147,1,"\u7A74"],[12148,1,"\u7ACB"],[12149,1,"\u7AF9"],[12150,1,"\u7C73"],[12151,1,"\u7CF8"],[12152,1,"\u7F36"],[12153,1,"\u7F51"],[12154,1,"\u7F8A"],[12155,1,"\u7FBD"],[12156,1,"\u8001"],[12157,1,"\u800C"],[12158,1,"\u8012"],[12159,1,"\u8033"],[12160,1,"\u807F"],[12161,1,"\u8089"],[12162,1,"\u81E3"],[12163,1,"\u81EA"],[12164,1,"\u81F3"],[12165,1,"\u81FC"],[12166,1,"\u820C"],[12167,1,"\u821B"],[12168,1,"\u821F"],[12169,1,"\u826E"],[12170,1,"\u8272"],[12171,1,"\u8278"],[12172,1,"\u864D"],[12173,1,"\u866B"],[12174,1,"\u8840"],[12175,1,"\u884C"],[12176,1,"\u8863"],[12177,1,"\u897E"],[12178,1,"\u898B"],[12179,1,"\u89D2"],[12180,1,"\u8A00"],[12181,1,"\u8C37"],[12182,1,"\u8C46"],[12183,1,"\u8C55"],[12184,1,"\u8C78"],[12185,1,"\u8C9D"],[12186,1,"\u8D64"],[12187,1,"\u8D70"],[12188,1,"\u8DB3"],[12189,1,"\u8EAB"],[12190,1,"\u8ECA"],[12191,1,"\u8F9B"],[12192,1,"\u8FB0"],[12193,1,"\u8FB5"],[12194,1,"\u9091"],[12195,1,"\u9149"],[12196,1,"\u91C6"],[12197,1,"\u91CC"],[12198,1,"\u91D1"],[12199,1,"\u9577"],[12200,1,"\u9580"],[12201,1,"\u961C"],[12202,1,"\u96B6"],[12203,1,"\u96B9"],[12204,1,"\u96E8"],[12205,1,"\u9751"],[12206,1,"\u975E"],[12207,1,"\u9762"],[12208,1,"\u9769"],[12209,1,"\u97CB"],[12210,1,"\u97ED"],[12211,1,"\u97F3"],[12212,1,"\u9801"],[12213,1,"\u98A8"],[12214,1,"\u98DB"],[12215,1,"\u98DF"],[12216,1,"\u9996"],[12217,1,"\u9999"],[12218,1,"\u99AC"],[12219,1,"\u9AA8"],[12220,1,"\u9AD8"],[12221,1,"\u9ADF"],[12222,1,"\u9B25"],[12223,1,"\u9B2F"],[12224,1,"\u9B32"],[12225,1,"\u9B3C"],[12226,1,"\u9B5A"],[12227,1,"\u9CE5"],[12228,1,"\u9E75"],[12229,1,"\u9E7F"],[12230,1,"\u9EA5"],[12231,1,"\u9EBB"],[12232,1,"\u9EC3"],[12233,1,"\u9ECD"],[12234,1,"\u9ED1"],[12235,1,"\u9EF9"],[12236,1,"\u9EFD"],[12237,1,"\u9F0E"],[12238,1,"\u9F13"],[12239,1,"\u9F20"],[12240,1,"\u9F3B"],[12241,1,"\u9F4A"],[12242,1,"\u9F52"],[12243,1,"\u9F8D"],[12244,1,"\u9F9C"],[12245,1,"\u9FA0"],[[12246,12271],3],[[12272,12283],3],[[12284,12287],3],[12288,5," "],[12289,2],[12290,1,"."],[[12291,12292],2],[[12293,12295],2],[[12296,12329],2],[[12330,12333],2],[[12334,12341],2],[12342,1,"\u3012"],[12343,2],[12344,1,"\u5341"],[12345,1,"\u5344"],[12346,1,"\u5345"],[12347,2],[12348,2],[12349,2],[12350,2],[12351,2],[12352,3],[[12353,12436],2],[[12437,12438],2],[[12439,12440],3],[[12441,12442],2],[12443,5," \u3099"],[12444,5," \u309A"],[[12445,12446],2],[12447,1,"\u3088\u308A"],[12448,2],[[12449,12542],2],[12543,1,"\u30B3\u30C8"],[[12544,12548],3],[[12549,12588],2],[12589,2],[12590,2],[12591,2],[12592,3],[12593,1,"\u1100"],[12594,1,"\u1101"],[12595,1,"\u11AA"],[12596,1,"\u1102"],[12597,1,"\u11AC"],[12598,1,"\u11AD"],[12599,1,"\u1103"],[12600,1,"\u1104"],[12601,1,"\u1105"],[12602,1,"\u11B0"],[12603,1,"\u11B1"],[12604,1,"\u11B2"],[12605,1,"\u11B3"],[12606,1,"\u11B4"],[12607,1,"\u11B5"],[12608,1,"\u111A"],[12609,1,"\u1106"],[12610,1,"\u1107"],[12611,1,"\u1108"],[12612,1,"\u1121"],[12613,1,"\u1109"],[12614,1,"\u110A"],[12615,1,"\u110B"],[12616,1,"\u110C"],[12617,1,"\u110D"],[12618,1,"\u110E"],[12619,1,"\u110F"],[12620,1,"\u1110"],[12621,1,"\u1111"],[12622,1,"\u1112"],[12623,1,"\u1161"],[12624,1,"\u1162"],[12625,1,"\u1163"],[12626,1,"\u1164"],[12627,1,"\u1165"],[12628,1,"\u1166"],[12629,1,"\u1167"],[12630,1,"\u1168"],[12631,1,"\u1169"],[12632,1,"\u116A"],[12633,1,"\u116B"],[12634,1,"\u116C"],[12635,1,"\u116D"],[12636,1,"\u116E"],[12637,1,"\u116F"],[12638,1,"\u1170"],[12639,1,"\u1171"],[12640,1,"\u1172"],[12641,1,"\u1173"],[12642,1,"\u1174"],[12643,1,"\u1175"],[12644,3],[12645,1,"\u1114"],[12646,1,"\u1115"],[12647,1,"\u11C7"],[12648,1,"\u11C8"],[12649,1,"\u11CC"],[12650,1,"\u11CE"],[12651,1,"\u11D3"],[12652,1,"\u11D7"],[12653,1,"\u11D9"],[12654,1,"\u111C"],[12655,1,"\u11DD"],[12656,1,"\u11DF"],[12657,1,"\u111D"],[12658,1,"\u111E"],[12659,1,"\u1120"],[12660,1,"\u1122"],[12661,1,"\u1123"],[12662,1,"\u1127"],[12663,1,"\u1129"],[12664,1,"\u112B"],[12665,1,"\u112C"],[12666,1,"\u112D"],[12667,1,"\u112E"],[12668,1,"\u112F"],[12669,1,"\u1132"],[12670,1,"\u1136"],[12671,1,"\u1140"],[12672,1,"\u1147"],[12673,1,"\u114C"],[12674,1,"\u11F1"],[12675,1,"\u11F2"],[12676,1,"\u1157"],[12677,1,"\u1158"],[12678,1,"\u1159"],[12679,1,"\u1184"],[12680,1,"\u1185"],[12681,1,"\u1188"],[12682,1,"\u1191"],[12683,1,"\u1192"],[12684,1,"\u1194"],[12685,1,"\u119E"],[12686,1,"\u11A1"],[12687,3],[[12688,12689],2],[12690,1,"\u4E00"],[12691,1,"\u4E8C"],[12692,1,"\u4E09"],[12693,1,"\u56DB"],[12694,1,"\u4E0A"],[12695,1,"\u4E2D"],[12696,1,"\u4E0B"],[12697,1,"\u7532"],[12698,1,"\u4E59"],[12699,1,"\u4E19"],[12700,1,"\u4E01"],[12701,1,"\u5929"],[12702,1,"\u5730"],[12703,1,"\u4EBA"],[[12704,12727],2],[[12728,12730],2],[[12731,12735],2],[[12736,12751],2],[[12752,12771],2],[[12772,12783],3],[[12784,12799],2],[12800,5,"(\u1100)"],[12801,5,"(\u1102)"],[12802,5,"(\u1103)"],[12803,5,"(\u1105)"],[12804,5,"(\u1106)"],[12805,5,"(\u1107)"],[12806,5,"(\u1109)"],[12807,5,"(\u110B)"],[12808,5,"(\u110C)"],[12809,5,"(\u110E)"],[12810,5,"(\u110F)"],[12811,5,"(\u1110)"],[12812,5,"(\u1111)"],[12813,5,"(\u1112)"],[12814,5,"(\uAC00)"],[12815,5,"(\uB098)"],[12816,5,"(\uB2E4)"],[12817,5,"(\uB77C)"],[12818,5,"(\uB9C8)"],[12819,5,"(\uBC14)"],[12820,5,"(\uC0AC)"],[12821,5,"(\uC544)"],[12822,5,"(\uC790)"],[12823,5,"(\uCC28)"],[12824,5,"(\uCE74)"],[12825,5,"(\uD0C0)"],[12826,5,"(\uD30C)"],[12827,5,"(\uD558)"],[12828,5,"(\uC8FC)"],[12829,5,"(\uC624\uC804)"],[12830,5,"(\uC624\uD6C4)"],[12831,3],[12832,5,"(\u4E00)"],[12833,5,"(\u4E8C)"],[12834,5,"(\u4E09)"],[12835,5,"(\u56DB)"],[12836,5,"(\u4E94)"],[12837,5,"(\u516D)"],[12838,5,"(\u4E03)"],[12839,5,"(\u516B)"],[12840,5,"(\u4E5D)"],[12841,5,"(\u5341)"],[12842,5,"(\u6708)"],[12843,5,"(\u706B)"],[12844,5,"(\u6C34)"],[12845,5,"(\u6728)"],[12846,5,"(\u91D1)"],[12847,5,"(\u571F)"],[12848,5,"(\u65E5)"],[12849,5,"(\u682A)"],[12850,5,"(\u6709)"],[12851,5,"(\u793E)"],[12852,5,"(\u540D)"],[12853,5,"(\u7279)"],[12854,5,"(\u8CA1)"],[12855,5,"(\u795D)"],[12856,5,"(\u52B4)"],[12857,5,"(\u4EE3)"],[12858,5,"(\u547C)"],[12859,5,"(\u5B66)"],[12860,5,"(\u76E3)"],[12861,5,"(\u4F01)"],[12862,5,"(\u8CC7)"],[12863,5,"(\u5354)"],[12864,5,"(\u796D)"],[12865,5,"(\u4F11)"],[12866,5,"(\u81EA)"],[12867,5,"(\u81F3)"],[12868,1,"\u554F"],[12869,1,"\u5E7C"],[12870,1,"\u6587"],[12871,1,"\u7B8F"],[[12872,12879],2],[12880,1,"pte"],[12881,1,"21"],[12882,1,"22"],[12883,1,"23"],[12884,1,"24"],[12885,1,"25"],[12886,1,"26"],[12887,1,"27"],[12888,1,"28"],[12889,1,"29"],[12890,1,"30"],[12891,1,"31"],[12892,1,"32"],[12893,1,"33"],[12894,1,"34"],[12895,1,"35"],[12896,1,"\u1100"],[12897,1,"\u1102"],[12898,1,"\u1103"],[12899,1,"\u1105"],[12900,1,"\u1106"],[12901,1,"\u1107"],[12902,1,"\u1109"],[12903,1,"\u110B"],[12904,1,"\u110C"],[12905,1,"\u110E"],[12906,1,"\u110F"],[12907,1,"\u1110"],[12908,1,"\u1111"],[12909,1,"\u1112"],[12910,1,"\uAC00"],[12911,1,"\uB098"],[12912,1,"\uB2E4"],[12913,1,"\uB77C"],[12914,1,"\uB9C8"],[12915,1,"\uBC14"],[12916,1,"\uC0AC"],[12917,1,"\uC544"],[12918,1,"\uC790"],[12919,1,"\uCC28"],[12920,1,"\uCE74"],[12921,1,"\uD0C0"],[12922,1,"\uD30C"],[12923,1,"\uD558"],[12924,1,"\uCC38\uACE0"],[12925,1,"\uC8FC\uC758"],[12926,1,"\uC6B0"],[12927,2],[12928,1,"\u4E00"],[12929,1,"\u4E8C"],[12930,1,"\u4E09"],[12931,1,"\u56DB"],[12932,1,"\u4E94"],[12933,1,"\u516D"],[12934,1,"\u4E03"],[12935,1,"\u516B"],[12936,1,"\u4E5D"],[12937,1,"\u5341"],[12938,1,"\u6708"],[12939,1,"\u706B"],[12940,1,"\u6C34"],[12941,1,"\u6728"],[12942,1,"\u91D1"],[12943,1,"\u571F"],[12944,1,"\u65E5"],[12945,1,"\u682A"],[12946,1,"\u6709"],[12947,1,"\u793E"],[12948,1,"\u540D"],[12949,1,"\u7279"],[12950,1,"\u8CA1"],[12951,1,"\u795D"],[12952,1,"\u52B4"],[12953,1,"\u79D8"],[12954,1,"\u7537"],[12955,1,"\u5973"],[12956,1,"\u9069"],[12957,1,"\u512A"],[12958,1,"\u5370"],[12959,1,"\u6CE8"],[12960,1,"\u9805"],[12961,1,"\u4F11"],[12962,1,"\u5199"],[12963,1,"\u6B63"],[12964,1,"\u4E0A"],[12965,1,"\u4E2D"],[12966,1,"\u4E0B"],[12967,1,"\u5DE6"],[12968,1,"\u53F3"],[12969,1,"\u533B"],[12970,1,"\u5B97"],[12971,1,"\u5B66"],[12972,1,"\u76E3"],[12973,1,"\u4F01"],[12974,1,"\u8CC7"],[12975,1,"\u5354"],[12976,1,"\u591C"],[12977,1,"36"],[12978,1,"37"],[12979,1,"38"],[12980,1,"39"],[12981,1,"40"],[12982,1,"41"],[12983,1,"42"],[12984,1,"43"],[12985,1,"44"],[12986,1,"45"],[12987,1,"46"],[12988,1,"47"],[12989,1,"48"],[12990,1,"49"],[12991,1,"50"],[12992,1,"1\u6708"],[12993,1,"2\u6708"],[12994,1,"3\u6708"],[12995,1,"4\u6708"],[12996,1,"5\u6708"],[12997,1,"6\u6708"],[12998,1,"7\u6708"],[12999,1,"8\u6708"],[13000,1,"9\u6708"],[13001,1,"10\u6708"],[13002,1,"11\u6708"],[13003,1,"12\u6708"],[13004,1,"hg"],[13005,1,"erg"],[13006,1,"ev"],[13007,1,"ltd"],[13008,1,"\u30A2"],[13009,1,"\u30A4"],[13010,1,"\u30A6"],[13011,1,"\u30A8"],[13012,1,"\u30AA"],[13013,1,"\u30AB"],[13014,1,"\u30AD"],[13015,1,"\u30AF"],[13016,1,"\u30B1"],[13017,1,"\u30B3"],[13018,1,"\u30B5"],[13019,1,"\u30B7"],[13020,1,"\u30B9"],[13021,1,"\u30BB"],[13022,1,"\u30BD"],[13023,1,"\u30BF"],[13024,1,"\u30C1"],[13025,1,"\u30C4"],[13026,1,"\u30C6"],[13027,1,"\u30C8"],[13028,1,"\u30CA"],[13029,1,"\u30CB"],[13030,1,"\u30CC"],[13031,1,"\u30CD"],[13032,1,"\u30CE"],[13033,1,"\u30CF"],[13034,1,"\u30D2"],[13035,1,"\u30D5"],[13036,1,"\u30D8"],[13037,1,"\u30DB"],[13038,1,"\u30DE"],[13039,1,"\u30DF"],[13040,1,"\u30E0"],[13041,1,"\u30E1"],[13042,1,"\u30E2"],[13043,1,"\u30E4"],[13044,1,"\u30E6"],[13045,1,"\u30E8"],[13046,1,"\u30E9"],[13047,1,"\u30EA"],[13048,1,"\u30EB"],[13049,1,"\u30EC"],[13050,1,"\u30ED"],[13051,1,"\u30EF"],[13052,1,"\u30F0"],[13053,1,"\u30F1"],[13054,1,"\u30F2"],[13055,1,"\u4EE4\u548C"],[13056,1,"\u30A2\u30D1\u30FC\u30C8"],[13057,1,"\u30A2\u30EB\u30D5\u30A1"],[13058,1,"\u30A2\u30F3\u30DA\u30A2"],[13059,1,"\u30A2\u30FC\u30EB"],[13060,1,"\u30A4\u30CB\u30F3\u30B0"],[13061,1,"\u30A4\u30F3\u30C1"],[13062,1,"\u30A6\u30A9\u30F3"],[13063,1,"\u30A8\u30B9\u30AF\u30FC\u30C9"],[13064,1,"\u30A8\u30FC\u30AB\u30FC"],[13065,1,"\u30AA\u30F3\u30B9"],[13066,1,"\u30AA\u30FC\u30E0"],[13067,1,"\u30AB\u30A4\u30EA"],[13068,1,"\u30AB\u30E9\u30C3\u30C8"],[13069,1,"\u30AB\u30ED\u30EA\u30FC"],[13070,1,"\u30AC\u30ED\u30F3"],[13071,1,"\u30AC\u30F3\u30DE"],[13072,1,"\u30AE\u30AC"],[13073,1,"\u30AE\u30CB\u30FC"],[13074,1,"\u30AD\u30E5\u30EA\u30FC"],[13075,1,"\u30AE\u30EB\u30C0\u30FC"],[13076,1,"\u30AD\u30ED"],[13077,1,"\u30AD\u30ED\u30B0\u30E9\u30E0"],[13078,1,"\u30AD\u30ED\u30E1\u30FC\u30C8\u30EB"],[13079,1,"\u30AD\u30ED\u30EF\u30C3\u30C8"],[13080,1,"\u30B0\u30E9\u30E0"],[13081,1,"\u30B0\u30E9\u30E0\u30C8\u30F3"],[13082,1,"\u30AF\u30EB\u30BC\u30A4\u30ED"],[13083,1,"\u30AF\u30ED\u30FC\u30CD"],[13084,1,"\u30B1\u30FC\u30B9"],[13085,1,"\u30B3\u30EB\u30CA"],[13086,1,"\u30B3\u30FC\u30DD"],[13087,1,"\u30B5\u30A4\u30AF\u30EB"],[13088,1,"\u30B5\u30F3\u30C1\u30FC\u30E0"],[13089,1,"\u30B7\u30EA\u30F3\u30B0"],[13090,1,"\u30BB\u30F3\u30C1"],[13091,1,"\u30BB\u30F3\u30C8"],[13092,1,"\u30C0\u30FC\u30B9"],[13093,1,"\u30C7\u30B7"],[13094,1,"\u30C9\u30EB"],[13095,1,"\u30C8\u30F3"],[13096,1,"\u30CA\u30CE"],[13097,1,"\u30CE\u30C3\u30C8"],[13098,1,"\u30CF\u30A4\u30C4"],[13099,1,"\u30D1\u30FC\u30BB\u30F3\u30C8"],[13100,1,"\u30D1\u30FC\u30C4"],[13101,1,"\u30D0\u30FC\u30EC\u30EB"],[13102,1,"\u30D4\u30A2\u30B9\u30C8\u30EB"],[13103,1,"\u30D4\u30AF\u30EB"],[13104,1,"\u30D4\u30B3"],[13105,1,"\u30D3\u30EB"],[13106,1,"\u30D5\u30A1\u30E9\u30C3\u30C9"],[13107,1,"\u30D5\u30A3\u30FC\u30C8"],[13108,1,"\u30D6\u30C3\u30B7\u30A7\u30EB"],[13109,1,"\u30D5\u30E9\u30F3"],[13110,1,"\u30D8\u30AF\u30BF\u30FC\u30EB"],[13111,1,"\u30DA\u30BD"],[13112,1,"\u30DA\u30CB\u30D2"],[13113,1,"\u30D8\u30EB\u30C4"],[13114,1,"\u30DA\u30F3\u30B9"],[13115,1,"\u30DA\u30FC\u30B8"],[13116,1,"\u30D9\u30FC\u30BF"],[13117,1,"\u30DD\u30A4\u30F3\u30C8"],[13118,1,"\u30DC\u30EB\u30C8"],[13119,1,"\u30DB\u30F3"],[13120,1,"\u30DD\u30F3\u30C9"],[13121,1,"\u30DB\u30FC\u30EB"],[13122,1,"\u30DB\u30FC\u30F3"],[13123,1,"\u30DE\u30A4\u30AF\u30ED"],[13124,1,"\u30DE\u30A4\u30EB"],[13125,1,"\u30DE\u30C3\u30CF"],[13126,1,"\u30DE\u30EB\u30AF"],[13127,1,"\u30DE\u30F3\u30B7\u30E7\u30F3"],[13128,1,"\u30DF\u30AF\u30ED\u30F3"],[13129,1,"\u30DF\u30EA"],[13130,1,"\u30DF\u30EA\u30D0\u30FC\u30EB"],[13131,1,"\u30E1\u30AC"],[13132,1,"\u30E1\u30AC\u30C8\u30F3"],[13133,1,"\u30E1\u30FC\u30C8\u30EB"],[13134,1,"\u30E4\u30FC\u30C9"],[13135,1,"\u30E4\u30FC\u30EB"],[13136,1,"\u30E6\u30A2\u30F3"],[13137,1,"\u30EA\u30C3\u30C8\u30EB"],[13138,1,"\u30EA\u30E9"],[13139,1,"\u30EB\u30D4\u30FC"],[13140,1,"\u30EB\u30FC\u30D6\u30EB"],[13141,1,"\u30EC\u30E0"],[13142,1,"\u30EC\u30F3\u30C8\u30B2\u30F3"],[13143,1,"\u30EF\u30C3\u30C8"],[13144,1,"0\u70B9"],[13145,1,"1\u70B9"],[13146,1,"2\u70B9"],[13147,1,"3\u70B9"],[13148,1,"4\u70B9"],[13149,1,"5\u70B9"],[13150,1,"6\u70B9"],[13151,1,"7\u70B9"],[13152,1,"8\u70B9"],[13153,1,"9\u70B9"],[13154,1,"10\u70B9"],[13155,1,"11\u70B9"],[13156,1,"12\u70B9"],[13157,1,"13\u70B9"],[13158,1,"14\u70B9"],[13159,1,"15\u70B9"],[13160,1,"16\u70B9"],[13161,1,"17\u70B9"],[13162,1,"18\u70B9"],[13163,1,"19\u70B9"],[13164,1,"20\u70B9"],[13165,1,"21\u70B9"],[13166,1,"22\u70B9"],[13167,1,"23\u70B9"],[13168,1,"24\u70B9"],[13169,1,"hpa"],[13170,1,"da"],[13171,1,"au"],[13172,1,"bar"],[13173,1,"ov"],[13174,1,"pc"],[13175,1,"dm"],[13176,1,"dm2"],[13177,1,"dm3"],[13178,1,"iu"],[13179,1,"\u5E73\u6210"],[13180,1,"\u662D\u548C"],[13181,1,"\u5927\u6B63"],[13182,1,"\u660E\u6CBB"],[13183,1,"\u682A\u5F0F\u4F1A\u793E"],[13184,1,"pa"],[13185,1,"na"],[13186,1,"\u03BCa"],[13187,1,"ma"],[13188,1,"ka"],[13189,1,"kb"],[13190,1,"mb"],[13191,1,"gb"],[13192,1,"cal"],[13193,1,"kcal"],[13194,1,"pf"],[13195,1,"nf"],[13196,1,"\u03BCf"],[13197,1,"\u03BCg"],[13198,1,"mg"],[13199,1,"kg"],[13200,1,"hz"],[13201,1,"khz"],[13202,1,"mhz"],[13203,1,"ghz"],[13204,1,"thz"],[13205,1,"\u03BCl"],[13206,1,"ml"],[13207,1,"dl"],[13208,1,"kl"],[13209,1,"fm"],[13210,1,"nm"],[13211,1,"\u03BCm"],[13212,1,"mm"],[13213,1,"cm"],[13214,1,"km"],[13215,1,"mm2"],[13216,1,"cm2"],[13217,1,"m2"],[13218,1,"km2"],[13219,1,"mm3"],[13220,1,"cm3"],[13221,1,"m3"],[13222,1,"km3"],[13223,1,"m\u2215s"],[13224,1,"m\u2215s2"],[13225,1,"pa"],[13226,1,"kpa"],[13227,1,"mpa"],[13228,1,"gpa"],[13229,1,"rad"],[13230,1,"rad\u2215s"],[13231,1,"rad\u2215s2"],[13232,1,"ps"],[13233,1,"ns"],[13234,1,"\u03BCs"],[13235,1,"ms"],[13236,1,"pv"],[13237,1,"nv"],[13238,1,"\u03BCv"],[13239,1,"mv"],[13240,1,"kv"],[13241,1,"mv"],[13242,1,"pw"],[13243,1,"nw"],[13244,1,"\u03BCw"],[13245,1,"mw"],[13246,1,"kw"],[13247,1,"mw"],[13248,1,"k\u03C9"],[13249,1,"m\u03C9"],[13250,3],[13251,1,"bq"],[13252,1,"cc"],[13253,1,"cd"],[13254,1,"c\u2215kg"],[13255,3],[13256,1,"db"],[13257,1,"gy"],[13258,1,"ha"],[13259,1,"hp"],[13260,1,"in"],[13261,1,"kk"],[13262,1,"km"],[13263,1,"kt"],[13264,1,"lm"],[13265,1,"ln"],[13266,1,"log"],[13267,1,"lx"],[13268,1,"mb"],[13269,1,"mil"],[13270,1,"mol"],[13271,1,"ph"],[13272,3],[13273,1,"ppm"],[13274,1,"pr"],[13275,1,"sr"],[13276,1,"sv"],[13277,1,"wb"],[13278,1,"v\u2215m"],[13279,1,"a\u2215m"],[13280,1,"1\u65E5"],[13281,1,"2\u65E5"],[13282,1,"3\u65E5"],[13283,1,"4\u65E5"],[13284,1,"5\u65E5"],[13285,1,"6\u65E5"],[13286,1,"7\u65E5"],[13287,1,"8\u65E5"],[13288,1,"9\u65E5"],[13289,1,"10\u65E5"],[13290,1,"11\u65E5"],[13291,1,"12\u65E5"],[13292,1,"13\u65E5"],[13293,1,"14\u65E5"],[13294,1,"15\u65E5"],[13295,1,"16\u65E5"],[13296,1,"17\u65E5"],[13297,1,"18\u65E5"],[13298,1,"19\u65E5"],[13299,1,"20\u65E5"],[13300,1,"21\u65E5"],[13301,1,"22\u65E5"],[13302,1,"23\u65E5"],[13303,1,"24\u65E5"],[13304,1,"25\u65E5"],[13305,1,"26\u65E5"],[13306,1,"27\u65E5"],[13307,1,"28\u65E5"],[13308,1,"29\u65E5"],[13309,1,"30\u65E5"],[13310,1,"31\u65E5"],[13311,1,"gal"],[[13312,19893],2],[[19894,19903],2],[[19904,19967],2],[[19968,40869],2],[[40870,40891],2],[[40892,40899],2],[[40900,40907],2],[40908,2],[[40909,40917],2],[[40918,40938],2],[[40939,40943],2],[[40944,40956],2],[[40957,40959],2],[[40960,42124],2],[[42125,42127],3],[[42128,42145],2],[[42146,42147],2],[[42148,42163],2],[42164,2],[[42165,42176],2],[42177,2],[[42178,42180],2],[42181,2],[42182,2],[[42183,42191],3],[[42192,42237],2],[[42238,42239],2],[[42240,42508],2],[[42509,42511],2],[[42512,42539],2],[[42540,42559],3],[42560,1,"\uA641"],[42561,2],[42562,1,"\uA643"],[42563,2],[42564,1,"\uA645"],[42565,2],[42566,1,"\uA647"],[42567,2],[42568,1,"\uA649"],[42569,2],[42570,1,"\uA64B"],[42571,2],[42572,1,"\uA64D"],[42573,2],[42574,1,"\uA64F"],[42575,2],[42576,1,"\uA651"],[42577,2],[42578,1,"\uA653"],[42579,2],[42580,1,"\uA655"],[42581,2],[42582,1,"\uA657"],[42583,2],[42584,1,"\uA659"],[42585,2],[42586,1,"\uA65B"],[42587,2],[42588,1,"\uA65D"],[42589,2],[42590,1,"\uA65F"],[42591,2],[42592,1,"\uA661"],[42593,2],[42594,1,"\uA663"],[42595,2],[42596,1,"\uA665"],[42597,2],[42598,1,"\uA667"],[42599,2],[42600,1,"\uA669"],[42601,2],[42602,1,"\uA66B"],[42603,2],[42604,1,"\uA66D"],[[42605,42607],2],[[42608,42611],2],[[42612,42619],2],[[42620,42621],2],[42622,2],[42623,2],[42624,1,"\uA681"],[42625,2],[42626,1,"\uA683"],[42627,2],[42628,1,"\uA685"],[42629,2],[42630,1,"\uA687"],[42631,2],[42632,1,"\uA689"],[42633,2],[42634,1,"\uA68B"],[42635,2],[42636,1,"\uA68D"],[42637,2],[42638,1,"\uA68F"],[42639,2],[42640,1,"\uA691"],[42641,2],[42642,1,"\uA693"],[42643,2],[42644,1,"\uA695"],[42645,2],[42646,1,"\uA697"],[42647,2],[42648,1,"\uA699"],[42649,2],[42650,1,"\uA69B"],[42651,2],[42652,1,"\u044A"],[42653,1,"\u044C"],[42654,2],[42655,2],[[42656,42725],2],[[42726,42735],2],[[42736,42737],2],[[42738,42743],2],[[42744,42751],3],[[42752,42774],2],[[42775,42778],2],[[42779,42783],2],[[42784,42785],2],[42786,1,"\uA723"],[42787,2],[42788,1,"\uA725"],[42789,2],[42790,1,"\uA727"],[42791,2],[42792,1,"\uA729"],[42793,2],[42794,1,"\uA72B"],[42795,2],[42796,1,"\uA72D"],[42797,2],[42798,1,"\uA72F"],[[42799,42801],2],[42802,1,"\uA733"],[42803,2],[42804,1,"\uA735"],[42805,2],[42806,1,"\uA737"],[42807,2],[42808,1,"\uA739"],[42809,2],[42810,1,"\uA73B"],[42811,2],[42812,1,"\uA73D"],[42813,2],[42814,1,"\uA73F"],[42815,2],[42816,1,"\uA741"],[42817,2],[42818,1,"\uA743"],[42819,2],[42820,1,"\uA745"],[42821,2],[42822,1,"\uA747"],[42823,2],[42824,1,"\uA749"],[42825,2],[42826,1,"\uA74B"],[42827,2],[42828,1,"\uA74D"],[42829,2],[42830,1,"\uA74F"],[42831,2],[42832,1,"\uA751"],[42833,2],[42834,1,"\uA753"],[42835,2],[42836,1,"\uA755"],[42837,2],[42838,1,"\uA757"],[42839,2],[42840,1,"\uA759"],[42841,2],[42842,1,"\uA75B"],[42843,2],[42844,1,"\uA75D"],[42845,2],[42846,1,"\uA75F"],[42847,2],[42848,1,"\uA761"],[42849,2],[42850,1,"\uA763"],[42851,2],[42852,1,"\uA765"],[42853,2],[42854,1,"\uA767"],[42855,2],[42856,1,"\uA769"],[42857,2],[42858,1,"\uA76B"],[42859,2],[42860,1,"\uA76D"],[42861,2],[42862,1,"\uA76F"],[42863,2],[42864,1,"\uA76F"],[[42865,42872],2],[42873,1,"\uA77A"],[42874,2],[42875,1,"\uA77C"],[42876,2],[42877,1,"\u1D79"],[42878,1,"\uA77F"],[42879,2],[42880,1,"\uA781"],[42881,2],[42882,1,"\uA783"],[42883,2],[42884,1,"\uA785"],[42885,2],[42886,1,"\uA787"],[[42887,42888],2],[[42889,42890],2],[42891,1,"\uA78C"],[42892,2],[42893,1,"\u0265"],[42894,2],[42895,2],[42896,1,"\uA791"],[42897,2],[42898,1,"\uA793"],[42899,2],[[42900,42901],2],[42902,1,"\uA797"],[42903,2],[42904,1,"\uA799"],[42905,2],[42906,1,"\uA79B"],[42907,2],[42908,1,"\uA79D"],[42909,2],[42910,1,"\uA79F"],[42911,2],[42912,1,"\uA7A1"],[42913,2],[42914,1,"\uA7A3"],[42915,2],[42916,1,"\uA7A5"],[42917,2],[42918,1,"\uA7A7"],[42919,2],[42920,1,"\uA7A9"],[42921,2],[42922,1,"\u0266"],[42923,1,"\u025C"],[42924,1,"\u0261"],[42925,1,"\u026C"],[42926,1,"\u026A"],[42927,2],[42928,1,"\u029E"],[42929,1,"\u0287"],[42930,1,"\u029D"],[42931,1,"\uAB53"],[42932,1,"\uA7B5"],[42933,2],[42934,1,"\uA7B7"],[42935,2],[42936,1,"\uA7B9"],[42937,2],[42938,1,"\uA7BB"],[42939,2],[42940,1,"\uA7BD"],[42941,2],[42942,1,"\uA7BF"],[42943,2],[42944,1,"\uA7C1"],[42945,2],[42946,1,"\uA7C3"],[42947,2],[42948,1,"\uA794"],[42949,1,"\u0282"],[42950,1,"\u1D8E"],[42951,1,"\uA7C8"],[42952,2],[42953,1,"\uA7CA"],[42954,2],[[42955,42959],3],[42960,1,"\uA7D1"],[42961,2],[42962,3],[42963,2],[42964,3],[42965,2],[42966,1,"\uA7D7"],[42967,2],[42968,1,"\uA7D9"],[42969,2],[[42970,42993],3],[42994,1,"c"],[42995,1,"f"],[42996,1,"q"],[42997,1,"\uA7F6"],[42998,2],[42999,2],[43000,1,"\u0127"],[43001,1,"\u0153"],[43002,2],[[43003,43007],2],[[43008,43047],2],[[43048,43051],2],[43052,2],[[43053,43055],3],[[43056,43065],2],[[43066,43071],3],[[43072,43123],2],[[43124,43127],2],[[43128,43135],3],[[43136,43204],2],[43205,2],[[43206,43213],3],[[43214,43215],2],[[43216,43225],2],[[43226,43231],3],[[43232,43255],2],[[43256,43258],2],[43259,2],[43260,2],[43261,2],[[43262,43263],2],[[43264,43309],2],[[43310,43311],2],[[43312,43347],2],[[43348,43358],3],[43359,2],[[43360,43388],2],[[43389,43391],3],[[43392,43456],2],[[43457,43469],2],[43470,3],[[43471,43481],2],[[43482,43485],3],[[43486,43487],2],[[43488,43518],2],[43519,3],[[43520,43574],2],[[43575,43583],3],[[43584,43597],2],[[43598,43599],3],[[43600,43609],2],[[43610,43611],3],[[43612,43615],2],[[43616,43638],2],[[43639,43641],2],[[43642,43643],2],[[43644,43647],2],[[43648,43714],2],[[43715,43738],3],[[43739,43741],2],[[43742,43743],2],[[43744,43759],2],[[43760,43761],2],[[43762,43766],2],[[43767,43776],3],[[43777,43782],2],[[43783,43784],3],[[43785,43790],2],[[43791,43792],3],[[43793,43798],2],[[43799,43807],3],[[43808,43814],2],[43815,3],[[43816,43822],2],[43823,3],[[43824,43866],2],[43867,2],[43868,1,"\uA727"],[43869,1,"\uAB37"],[43870,1,"\u026B"],[43871,1,"\uAB52"],[[43872,43875],2],[[43876,43877],2],[[43878,43879],2],[43880,2],[43881,1,"\u028D"],[[43882,43883],2],[[43884,43887],3],[43888,1,"\u13A0"],[43889,1,"\u13A1"],[43890,1,"\u13A2"],[43891,1,"\u13A3"],[43892,1,"\u13A4"],[43893,1,"\u13A5"],[43894,1,"\u13A6"],[43895,1,"\u13A7"],[43896,1,"\u13A8"],[43897,1,"\u13A9"],[43898,1,"\u13AA"],[43899,1,"\u13AB"],[43900,1,"\u13AC"],[43901,1,"\u13AD"],[43902,1,"\u13AE"],[43903,1,"\u13AF"],[43904,1,"\u13B0"],[43905,1,"\u13B1"],[43906,1,"\u13B2"],[43907,1,"\u13B3"],[43908,1,"\u13B4"],[43909,1,"\u13B5"],[43910,1,"\u13B6"],[43911,1,"\u13B7"],[43912,1,"\u13B8"],[43913,1,"\u13B9"],[43914,1,"\u13BA"],[43915,1,"\u13BB"],[43916,1,"\u13BC"],[43917,1,"\u13BD"],[43918,1,"\u13BE"],[43919,1,"\u13BF"],[43920,1,"\u13C0"],[43921,1,"\u13C1"],[43922,1,"\u13C2"],[43923,1,"\u13C3"],[43924,1,"\u13C4"],[43925,1,"\u13C5"],[43926,1,"\u13C6"],[43927,1,"\u13C7"],[43928,1,"\u13C8"],[43929,1,"\u13C9"],[43930,1,"\u13CA"],[43931,1,"\u13CB"],[43932,1,"\u13CC"],[43933,1,"\u13CD"],[43934,1,"\u13CE"],[43935,1,"\u13CF"],[43936,1,"\u13D0"],[43937,1,"\u13D1"],[43938,1,"\u13D2"],[43939,1,"\u13D3"],[43940,1,"\u13D4"],[43941,1,"\u13D5"],[43942,1,"\u13D6"],[43943,1,"\u13D7"],[43944,1,"\u13D8"],[43945,1,"\u13D9"],[43946,1,"\u13DA"],[43947,1,"\u13DB"],[43948,1,"\u13DC"],[43949,1,"\u13DD"],[43950,1,"\u13DE"],[43951,1,"\u13DF"],[43952,1,"\u13E0"],[43953,1,"\u13E1"],[43954,1,"\u13E2"],[43955,1,"\u13E3"],[43956,1,"\u13E4"],[43957,1,"\u13E5"],[43958,1,"\u13E6"],[43959,1,"\u13E7"],[43960,1,"\u13E8"],[43961,1,"\u13E9"],[43962,1,"\u13EA"],[43963,1,"\u13EB"],[43964,1,"\u13EC"],[43965,1,"\u13ED"],[43966,1,"\u13EE"],[43967,1,"\u13EF"],[[43968,44010],2],[44011,2],[[44012,44013],2],[[44014,44015],3],[[44016,44025],2],[[44026,44031],3],[[44032,55203],2],[[55204,55215],3],[[55216,55238],2],[[55239,55242],3],[[55243,55291],2],[[55292,55295],3],[[55296,57343],3],[[57344,63743],3],[63744,1,"\u8C48"],[63745,1,"\u66F4"],[63746,1,"\u8ECA"],[63747,1,"\u8CC8"],[63748,1,"\u6ED1"],[63749,1,"\u4E32"],[63750,1,"\u53E5"],[[63751,63752],1,"\u9F9C"],[63753,1,"\u5951"],[63754,1,"\u91D1"],[63755,1,"\u5587"],[63756,1,"\u5948"],[63757,1,"\u61F6"],[63758,1,"\u7669"],[63759,1,"\u7F85"],[63760,1,"\u863F"],[63761,1,"\u87BA"],[63762,1,"\u88F8"],[63763,1,"\u908F"],[63764,1,"\u6A02"],[63765,1,"\u6D1B"],[63766,1,"\u70D9"],[63767,1,"\u73DE"],[63768,1,"\u843D"],[63769,1,"\u916A"],[63770,1,"\u99F1"],[63771,1,"\u4E82"],[63772,1,"\u5375"],[63773,1,"\u6B04"],[63774,1,"\u721B"],[63775,1,"\u862D"],[63776,1,"\u9E1E"],[63777,1,"\u5D50"],[63778,1,"\u6FEB"],[63779,1,"\u85CD"],[63780,1,"\u8964"],[63781,1,"\u62C9"],[63782,1,"\u81D8"],[63783,1,"\u881F"],[63784,1,"\u5ECA"],[63785,1,"\u6717"],[63786,1,"\u6D6A"],[63787,1,"\u72FC"],[63788,1,"\u90CE"],[63789,1,"\u4F86"],[63790,1,"\u51B7"],[63791,1,"\u52DE"],[63792,1,"\u64C4"],[63793,1,"\u6AD3"],[63794,1,"\u7210"],[63795,1,"\u76E7"],[63796,1,"\u8001"],[63797,1,"\u8606"],[63798,1,"\u865C"],[63799,1,"\u8DEF"],[63800,1,"\u9732"],[63801,1,"\u9B6F"],[63802,1,"\u9DFA"],[63803,1,"\u788C"],[63804,1,"\u797F"],[63805,1,"\u7DA0"],[63806,1,"\u83C9"],[63807,1,"\u9304"],[63808,1,"\u9E7F"],[63809,1,"\u8AD6"],[63810,1,"\u58DF"],[63811,1,"\u5F04"],[63812,1,"\u7C60"],[63813,1,"\u807E"],[63814,1,"\u7262"],[63815,1,"\u78CA"],[63816,1,"\u8CC2"],[63817,1,"\u96F7"],[63818,1,"\u58D8"],[63819,1,"\u5C62"],[63820,1,"\u6A13"],[63821,1,"\u6DDA"],[63822,1,"\u6F0F"],[63823,1,"\u7D2F"],[63824,1,"\u7E37"],[63825,1,"\u964B"],[63826,1,"\u52D2"],[63827,1,"\u808B"],[63828,1,"\u51DC"],[63829,1,"\u51CC"],[63830,1,"\u7A1C"],[63831,1,"\u7DBE"],[63832,1,"\u83F1"],[63833,1,"\u9675"],[63834,1,"\u8B80"],[63835,1,"\u62CF"],[63836,1,"\u6A02"],[63837,1,"\u8AFE"],[63838,1,"\u4E39"],[63839,1,"\u5BE7"],[63840,1,"\u6012"],[63841,1,"\u7387"],[63842,1,"\u7570"],[63843,1,"\u5317"],[63844,1,"\u78FB"],[63845,1,"\u4FBF"],[63846,1,"\u5FA9"],[63847,1,"\u4E0D"],[63848,1,"\u6CCC"],[63849,1,"\u6578"],[63850,1,"\u7D22"],[63851,1,"\u53C3"],[63852,1,"\u585E"],[63853,1,"\u7701"],[63854,1,"\u8449"],[63855,1,"\u8AAA"],[63856,1,"\u6BBA"],[63857,1,"\u8FB0"],[63858,1,"\u6C88"],[63859,1,"\u62FE"],[63860,1,"\u82E5"],[63861,1,"\u63A0"],[63862,1,"\u7565"],[63863,1,"\u4EAE"],[63864,1,"\u5169"],[63865,1,"\u51C9"],[63866,1,"\u6881"],[63867,1,"\u7CE7"],[63868,1,"\u826F"],[63869,1,"\u8AD2"],[63870,1,"\u91CF"],[63871,1,"\u52F5"],[63872,1,"\u5442"],[63873,1,"\u5973"],[63874,1,"\u5EEC"],[63875,1,"\u65C5"],[63876,1,"\u6FFE"],[63877,1,"\u792A"],[63878,1,"\u95AD"],[63879,1,"\u9A6A"],[63880,1,"\u9E97"],[63881,1,"\u9ECE"],[63882,1,"\u529B"],[63883,1,"\u66C6"],[63884,1,"\u6B77"],[63885,1,"\u8F62"],[63886,1,"\u5E74"],[63887,1,"\u6190"],[63888,1,"\u6200"],[63889,1,"\u649A"],[63890,1,"\u6F23"],[63891,1,"\u7149"],[63892,1,"\u7489"],[63893,1,"\u79CA"],[63894,1,"\u7DF4"],[63895,1,"\u806F"],[63896,1,"\u8F26"],[63897,1,"\u84EE"],[63898,1,"\u9023"],[63899,1,"\u934A"],[63900,1,"\u5217"],[63901,1,"\u52A3"],[63902,1,"\u54BD"],[63903,1,"\u70C8"],[63904,1,"\u88C2"],[63905,1,"\u8AAA"],[63906,1,"\u5EC9"],[63907,1,"\u5FF5"],[63908,1,"\u637B"],[63909,1,"\u6BAE"],[63910,1,"\u7C3E"],[63911,1,"\u7375"],[63912,1,"\u4EE4"],[63913,1,"\u56F9"],[63914,1,"\u5BE7"],[63915,1,"\u5DBA"],[63916,1,"\u601C"],[63917,1,"\u73B2"],[63918,1,"\u7469"],[63919,1,"\u7F9A"],[63920,1,"\u8046"],[63921,1,"\u9234"],[63922,1,"\u96F6"],[63923,1,"\u9748"],[63924,1,"\u9818"],[63925,1,"\u4F8B"],[63926,1,"\u79AE"],[63927,1,"\u91B4"],[63928,1,"\u96B8"],[63929,1,"\u60E1"],[63930,1,"\u4E86"],[63931,1,"\u50DA"],[63932,1,"\u5BEE"],[63933,1,"\u5C3F"],[63934,1,"\u6599"],[63935,1,"\u6A02"],[63936,1,"\u71CE"],[63937,1,"\u7642"],[63938,1,"\u84FC"],[63939,1,"\u907C"],[63940,1,"\u9F8D"],[63941,1,"\u6688"],[63942,1,"\u962E"],[63943,1,"\u5289"],[63944,1,"\u677B"],[63945,1,"\u67F3"],[63946,1,"\u6D41"],[63947,1,"\u6E9C"],[63948,1,"\u7409"],[63949,1,"\u7559"],[63950,1,"\u786B"],[63951,1,"\u7D10"],[63952,1,"\u985E"],[63953,1,"\u516D"],[63954,1,"\u622E"],[63955,1,"\u9678"],[63956,1,"\u502B"],[63957,1,"\u5D19"],[63958,1,"\u6DEA"],[63959,1,"\u8F2A"],[63960,1,"\u5F8B"],[63961,1,"\u6144"],[63962,1,"\u6817"],[63963,1,"\u7387"],[63964,1,"\u9686"],[63965,1,"\u5229"],[63966,1,"\u540F"],[63967,1,"\u5C65"],[63968,1,"\u6613"],[63969,1,"\u674E"],[63970,1,"\u68A8"],[63971,1,"\u6CE5"],[63972,1,"\u7406"],[63973,1,"\u75E2"],[63974,1,"\u7F79"],[63975,1,"\u88CF"],[63976,1,"\u88E1"],[63977,1,"\u91CC"],[63978,1,"\u96E2"],[63979,1,"\u533F"],[63980,1,"\u6EBA"],[63981,1,"\u541D"],[63982,1,"\u71D0"],[63983,1,"\u7498"],[63984,1,"\u85FA"],[63985,1,"\u96A3"],[63986,1,"\u9C57"],[63987,1,"\u9E9F"],[63988,1,"\u6797"],[63989,1,"\u6DCB"],[63990,1,"\u81E8"],[63991,1,"\u7ACB"],[63992,1,"\u7B20"],[63993,1,"\u7C92"],[63994,1,"\u72C0"],[63995,1,"\u7099"],[63996,1,"\u8B58"],[63997,1,"\u4EC0"],[63998,1,"\u8336"],[63999,1,"\u523A"],[64000,1,"\u5207"],[64001,1,"\u5EA6"],[64002,1,"\u62D3"],[64003,1,"\u7CD6"],[64004,1,"\u5B85"],[64005,1,"\u6D1E"],[64006,1,"\u66B4"],[64007,1,"\u8F3B"],[64008,1,"\u884C"],[64009,1,"\u964D"],[64010,1,"\u898B"],[64011,1,"\u5ED3"],[64012,1,"\u5140"],[64013,1,"\u55C0"],[[64014,64015],2],[64016,1,"\u585A"],[64017,2],[64018,1,"\u6674"],[[64019,64020],2],[64021,1,"\u51DE"],[64022,1,"\u732A"],[64023,1,"\u76CA"],[64024,1,"\u793C"],[64025,1,"\u795E"],[64026,1,"\u7965"],[64027,1,"\u798F"],[64028,1,"\u9756"],[64029,1,"\u7CBE"],[64030,1,"\u7FBD"],[64031,2],[64032,1,"\u8612"],[64033,2],[64034,1,"\u8AF8"],[[64035,64036],2],[64037,1,"\u9038"],[64038,1,"\u90FD"],[[64039,64041],2],[64042,1,"\u98EF"],[64043,1,"\u98FC"],[64044,1,"\u9928"],[64045,1,"\u9DB4"],[64046,1,"\u90DE"],[64047,1,"\u96B7"],[64048,1,"\u4FAE"],[64049,1,"\u50E7"],[64050,1,"\u514D"],[64051,1,"\u52C9"],[64052,1,"\u52E4"],[64053,1,"\u5351"],[64054,1,"\u559D"],[64055,1,"\u5606"],[64056,1,"\u5668"],[64057,1,"\u5840"],[64058,1,"\u58A8"],[64059,1,"\u5C64"],[64060,1,"\u5C6E"],[64061,1,"\u6094"],[64062,1,"\u6168"],[64063,1,"\u618E"],[64064,1,"\u61F2"],[64065,1,"\u654F"],[64066,1,"\u65E2"],[64067,1,"\u6691"],[64068,1,"\u6885"],[64069,1,"\u6D77"],[64070,1,"\u6E1A"],[64071,1,"\u6F22"],[64072,1,"\u716E"],[64073,1,"\u722B"],[64074,1,"\u7422"],[64075,1,"\u7891"],[64076,1,"\u793E"],[64077,1,"\u7949"],[64078,1,"\u7948"],[64079,1,"\u7950"],[64080,1,"\u7956"],[64081,1,"\u795D"],[64082,1,"\u798D"],[64083,1,"\u798E"],[64084,1,"\u7A40"],[64085,1,"\u7A81"],[64086,1,"\u7BC0"],[64087,1,"\u7DF4"],[64088,1,"\u7E09"],[64089,1,"\u7E41"],[64090,1,"\u7F72"],[64091,1,"\u8005"],[64092,1,"\u81ED"],[[64093,64094],1,"\u8279"],[64095,1,"\u8457"],[64096,1,"\u8910"],[64097,1,"\u8996"],[64098,1,"\u8B01"],[64099,1,"\u8B39"],[64100,1,"\u8CD3"],[64101,1,"\u8D08"],[64102,1,"\u8FB6"],[64103,1,"\u9038"],[64104,1,"\u96E3"],[64105,1,"\u97FF"],[64106,1,"\u983B"],[64107,1,"\u6075"],[64108,1,"\uD850\uDEEE"],[64109,1,"\u8218"],[[64110,64111],3],[64112,1,"\u4E26"],[64113,1,"\u51B5"],[64114,1,"\u5168"],[64115,1,"\u4F80"],[64116,1,"\u5145"],[64117,1,"\u5180"],[64118,1,"\u52C7"],[64119,1,"\u52FA"],[64120,1,"\u559D"],[64121,1,"\u5555"],[64122,1,"\u5599"],[64123,1,"\u55E2"],[64124,1,"\u585A"],[64125,1,"\u58B3"],[64126,1,"\u5944"],[64127,1,"\u5954"],[64128,1,"\u5A62"],[64129,1,"\u5B28"],[64130,1,"\u5ED2"],[64131,1,"\u5ED9"],[64132,1,"\u5F69"],[64133,1,"\u5FAD"],[64134,1,"\u60D8"],[64135,1,"\u614E"],[64136,1,"\u6108"],[64137,1,"\u618E"],[64138,1,"\u6160"],[64139,1,"\u61F2"],[64140,1,"\u6234"],[64141,1,"\u63C4"],[64142,1,"\u641C"],[64143,1,"\u6452"],[64144,1,"\u6556"],[64145,1,"\u6674"],[64146,1,"\u6717"],[64147,1,"\u671B"],[64148,1,"\u6756"],[64149,1,"\u6B79"],[64150,1,"\u6BBA"],[64151,1,"\u6D41"],[64152,1,"\u6EDB"],[64153,1,"\u6ECB"],[64154,1,"\u6F22"],[64155,1,"\u701E"],[64156,1,"\u716E"],[64157,1,"\u77A7"],[64158,1,"\u7235"],[64159,1,"\u72AF"],[64160,1,"\u732A"],[64161,1,"\u7471"],[64162,1,"\u7506"],[64163,1,"\u753B"],[64164,1,"\u761D"],[64165,1,"\u761F"],[64166,1,"\u76CA"],[64167,1,"\u76DB"],[64168,1,"\u76F4"],[64169,1,"\u774A"],[64170,1,"\u7740"],[64171,1,"\u78CC"],[64172,1,"\u7AB1"],[64173,1,"\u7BC0"],[64174,1,"\u7C7B"],[64175,1,"\u7D5B"],[64176,1,"\u7DF4"],[64177,1,"\u7F3E"],[64178,1,"\u8005"],[64179,1,"\u8352"],[64180,1,"\u83EF"],[64181,1,"\u8779"],[64182,1,"\u8941"],[64183,1,"\u8986"],[64184,1,"\u8996"],[64185,1,"\u8ABF"],[64186,1,"\u8AF8"],[64187,1,"\u8ACB"],[64188,1,"\u8B01"],[64189,1,"\u8AFE"],[64190,1,"\u8AED"],[64191,1,"\u8B39"],[64192,1,"\u8B8A"],[64193,1,"\u8D08"],[64194,1,"\u8F38"],[64195,1,"\u9072"],[64196,1,"\u9199"],[64197,1,"\u9276"],[64198,1,"\u967C"],[64199,1,"\u96E3"],[64200,1,"\u9756"],[64201,1,"\u97DB"],[64202,1,"\u97FF"],[64203,1,"\u980B"],[64204,1,"\u983B"],[64205,1,"\u9B12"],[64206,1,"\u9F9C"],[64207,1,"\uD84A\uDC4A"],[64208,1,"\uD84A\uDC44"],[64209,1,"\uD84C\uDFD5"],[64210,1,"\u3B9D"],[64211,1,"\u4018"],[64212,1,"\u4039"],[64213,1,"\uD854\uDE49"],[64214,1,"\uD857\uDCD0"],[64215,1,"\uD85F\uDED3"],[64216,1,"\u9F43"],[64217,1,"\u9F8E"],[[64218,64255],3],[64256,1,"ff"],[64257,1,"fi"],[64258,1,"fl"],[64259,1,"ffi"],[64260,1,"ffl"],[[64261,64262],1,"st"],[[64263,64274],3],[64275,1,"\u0574\u0576"],[64276,1,"\u0574\u0565"],[64277,1,"\u0574\u056B"],[64278,1,"\u057E\u0576"],[64279,1,"\u0574\u056D"],[[64280,64284],3],[64285,1,"\u05D9\u05B4"],[64286,2],[64287,1,"\u05F2\u05B7"],[64288,1,"\u05E2"],[64289,1,"\u05D0"],[64290,1,"\u05D3"],[64291,1,"\u05D4"],[64292,1,"\u05DB"],[64293,1,"\u05DC"],[64294,1,"\u05DD"],[64295,1,"\u05E8"],[64296,1,"\u05EA"],[64297,5,"+"],[64298,1,"\u05E9\u05C1"],[64299,1,"\u05E9\u05C2"],[64300,1,"\u05E9\u05BC\u05C1"],[64301,1,"\u05E9\u05BC\u05C2"],[64302,1,"\u05D0\u05B7"],[64303,1,"\u05D0\u05B8"],[64304,1,"\u05D0\u05BC"],[64305,1,"\u05D1\u05BC"],[64306,1,"\u05D2\u05BC"],[64307,1,"\u05D3\u05BC"],[64308,1,"\u05D4\u05BC"],[64309,1,"\u05D5\u05BC"],[64310,1,"\u05D6\u05BC"],[64311,3],[64312,1,"\u05D8\u05BC"],[64313,1,"\u05D9\u05BC"],[64314,1,"\u05DA\u05BC"],[64315,1,"\u05DB\u05BC"],[64316,1,"\u05DC\u05BC"],[64317,3],[64318,1,"\u05DE\u05BC"],[64319,3],[64320,1,"\u05E0\u05BC"],[64321,1,"\u05E1\u05BC"],[64322,3],[64323,1,"\u05E3\u05BC"],[64324,1,"\u05E4\u05BC"],[64325,3],[64326,1,"\u05E6\u05BC"],[64327,1,"\u05E7\u05BC"],[64328,1,"\u05E8\u05BC"],[64329,1,"\u05E9\u05BC"],[64330,1,"\u05EA\u05BC"],[64331,1,"\u05D5\u05B9"],[64332,1,"\u05D1\u05BF"],[64333,1,"\u05DB\u05BF"],[64334,1,"\u05E4\u05BF"],[64335,1,"\u05D0\u05DC"],[[64336,64337],1,"\u0671"],[[64338,64341],1,"\u067B"],[[64342,64345],1,"\u067E"],[[64346,64349],1,"\u0680"],[[64350,64353],1,"\u067A"],[[64354,64357],1,"\u067F"],[[64358,64361],1,"\u0679"],[[64362,64365],1,"\u06A4"],[[64366,64369],1,"\u06A6"],[[64370,64373],1,"\u0684"],[[64374,64377],1,"\u0683"],[[64378,64381],1,"\u0686"],[[64382,64385],1,"\u0687"],[[64386,64387],1,"\u068D"],[[64388,64389],1,"\u068C"],[[64390,64391],1,"\u068E"],[[64392,64393],1,"\u0688"],[[64394,64395],1,"\u0698"],[[64396,64397],1,"\u0691"],[[64398,64401],1,"\u06A9"],[[64402,64405],1,"\u06AF"],[[64406,64409],1,"\u06B3"],[[64410,64413],1,"\u06B1"],[[64414,64415],1,"\u06BA"],[[64416,64419],1,"\u06BB"],[[64420,64421],1,"\u06C0"],[[64422,64425],1,"\u06C1"],[[64426,64429],1,"\u06BE"],[[64430,64431],1,"\u06D2"],[[64432,64433],1,"\u06D3"],[[64434,64449],2],[64450,2],[[64451,64466],3],[[64467,64470],1,"\u06AD"],[[64471,64472],1,"\u06C7"],[[64473,64474],1,"\u06C6"],[[64475,64476],1,"\u06C8"],[64477,1,"\u06C7\u0674"],[[64478,64479],1,"\u06CB"],[[64480,64481],1,"\u06C5"],[[64482,64483],1,"\u06C9"],[[64484,64487],1,"\u06D0"],[[64488,64489],1,"\u0649"],[[64490,64491],1,"\u0626\u0627"],[[64492,64493],1,"\u0626\u06D5"],[[64494,64495],1,"\u0626\u0648"],[[64496,64497],1,"\u0626\u06C7"],[[64498,64499],1,"\u0626\u06C6"],[[64500,64501],1,"\u0626\u06C8"],[[64502,64504],1,"\u0626\u06D0"],[[64505,64507],1,"\u0626\u0649"],[[64508,64511],1,"\u06CC"],[64512,1,"\u0626\u062C"],[64513,1,"\u0626\u062D"],[64514,1,"\u0626\u0645"],[64515,1,"\u0626\u0649"],[64516,1,"\u0626\u064A"],[64517,1,"\u0628\u062C"],[64518,1,"\u0628\u062D"],[64519,1,"\u0628\u062E"],[64520,1,"\u0628\u0645"],[64521,1,"\u0628\u0649"],[64522,1,"\u0628\u064A"],[64523,1,"\u062A\u062C"],[64524,1,"\u062A\u062D"],[64525,1,"\u062A\u062E"],[64526,1,"\u062A\u0645"],[64527,1,"\u062A\u0649"],[64528,1,"\u062A\u064A"],[64529,1,"\u062B\u062C"],[64530,1,"\u062B\u0645"],[64531,1,"\u062B\u0649"],[64532,1,"\u062B\u064A"],[64533,1,"\u062C\u062D"],[64534,1,"\u062C\u0645"],[64535,1,"\u062D\u062C"],[64536,1,"\u062D\u0645"],[64537,1,"\u062E\u062C"],[64538,1,"\u062E\u062D"],[64539,1,"\u062E\u0645"],[64540,1,"\u0633\u062C"],[64541,1,"\u0633\u062D"],[64542,1,"\u0633\u062E"],[64543,1,"\u0633\u0645"],[64544,1,"\u0635\u062D"],[64545,1,"\u0635\u0645"],[64546,1,"\u0636\u062C"],[64547,1,"\u0636\u062D"],[64548,1,"\u0636\u062E"],[64549,1,"\u0636\u0645"],[64550,1,"\u0637\u062D"],[64551,1,"\u0637\u0645"],[64552,1,"\u0638\u0645"],[64553,1,"\u0639\u062C"],[64554,1,"\u0639\u0645"],[64555,1,"\u063A\u062C"],[64556,1,"\u063A\u0645"],[64557,1,"\u0641\u062C"],[64558,1,"\u0641\u062D"],[64559,1,"\u0641\u062E"],[64560,1,"\u0641\u0645"],[64561,1,"\u0641\u0649"],[64562,1,"\u0641\u064A"],[64563,1,"\u0642\u062D"],[64564,1,"\u0642\u0645"],[64565,1,"\u0642\u0649"],[64566,1,"\u0642\u064A"],[64567,1,"\u0643\u0627"],[64568,1,"\u0643\u062C"],[64569,1,"\u0643\u062D"],[64570,1,"\u0643\u062E"],[64571,1,"\u0643\u0644"],[64572,1,"\u0643\u0645"],[64573,1,"\u0643\u0649"],[64574,1,"\u0643\u064A"],[64575,1,"\u0644\u062C"],[64576,1,"\u0644\u062D"],[64577,1,"\u0644\u062E"],[64578,1,"\u0644\u0645"],[64579,1,"\u0644\u0649"],[64580,1,"\u0644\u064A"],[64581,1,"\u0645\u062C"],[64582,1,"\u0645\u062D"],[64583,1,"\u0645\u062E"],[64584,1,"\u0645\u0645"],[64585,1,"\u0645\u0649"],[64586,1,"\u0645\u064A"],[64587,1,"\u0646\u062C"],[64588,1,"\u0646\u062D"],[64589,1,"\u0646\u062E"],[64590,1,"\u0646\u0645"],[64591,1,"\u0646\u0649"],[64592,1,"\u0646\u064A"],[64593,1,"\u0647\u062C"],[64594,1,"\u0647\u0645"],[64595,1,"\u0647\u0649"],[64596,1,"\u0647\u064A"],[64597,1,"\u064A\u062C"],[64598,1,"\u064A\u062D"],[64599,1,"\u064A\u062E"],[64600,1,"\u064A\u0645"],[64601,1,"\u064A\u0649"],[64602,1,"\u064A\u064A"],[64603,1,"\u0630\u0670"],[64604,1,"\u0631\u0670"],[64605,1,"\u0649\u0670"],[64606,5," \u064C\u0651"],[64607,5," \u064D\u0651"],[64608,5," \u064E\u0651"],[64609,5," \u064F\u0651"],[64610,5," \u0650\u0651"],[64611,5," \u0651\u0670"],[64612,1,"\u0626\u0631"],[64613,1,"\u0626\u0632"],[64614,1,"\u0626\u0645"],[64615,1,"\u0626\u0646"],[64616,1,"\u0626\u0649"],[64617,1,"\u0626\u064A"],[64618,1,"\u0628\u0631"],[64619,1,"\u0628\u0632"],[64620,1,"\u0628\u0645"],[64621,1,"\u0628\u0646"],[64622,1,"\u0628\u0649"],[64623,1,"\u0628\u064A"],[64624,1,"\u062A\u0631"],[64625,1,"\u062A\u0632"],[64626,1,"\u062A\u0645"],[64627,1,"\u062A\u0646"],[64628,1,"\u062A\u0649"],[64629,1,"\u062A\u064A"],[64630,1,"\u062B\u0631"],[64631,1,"\u062B\u0632"],[64632,1,"\u062B\u0645"],[64633,1,"\u062B\u0646"],[64634,1,"\u062B\u0649"],[64635,1,"\u062B\u064A"],[64636,1,"\u0641\u0649"],[64637,1,"\u0641\u064A"],[64638,1,"\u0642\u0649"],[64639,1,"\u0642\u064A"],[64640,1,"\u0643\u0627"],[64641,1,"\u0643\u0644"],[64642,1,"\u0643\u0645"],[64643,1,"\u0643\u0649"],[64644,1,"\u0643\u064A"],[64645,1,"\u0644\u0645"],[64646,1,"\u0644\u0649"],[64647,1,"\u0644\u064A"],[64648,1,"\u0645\u0627"],[64649,1,"\u0645\u0645"],[64650,1,"\u0646\u0631"],[64651,1,"\u0646\u0632"],[64652,1,"\u0646\u0645"],[64653,1,"\u0646\u0646"],[64654,1,"\u0646\u0649"],[64655,1,"\u0646\u064A"],[64656,1,"\u0649\u0670"],[64657,1,"\u064A\u0631"],[64658,1,"\u064A\u0632"],[64659,1,"\u064A\u0645"],[64660,1,"\u064A\u0646"],[64661,1,"\u064A\u0649"],[64662,1,"\u064A\u064A"],[64663,1,"\u0626\u062C"],[64664,1,"\u0626\u062D"],[64665,1,"\u0626\u062E"],[64666,1,"\u0626\u0645"],[64667,1,"\u0626\u0647"],[64668,1,"\u0628\u062C"],[64669,1,"\u0628\u062D"],[64670,1,"\u0628\u062E"],[64671,1,"\u0628\u0645"],[64672,1,"\u0628\u0647"],[64673,1,"\u062A\u062C"],[64674,1,"\u062A\u062D"],[64675,1,"\u062A\u062E"],[64676,1,"\u062A\u0645"],[64677,1,"\u062A\u0647"],[64678,1,"\u062B\u0645"],[64679,1,"\u062C\u062D"],[64680,1,"\u062C\u0645"],[64681,1,"\u062D\u062C"],[64682,1,"\u062D\u0645"],[64683,1,"\u062E\u062C"],[64684,1,"\u062E\u0645"],[64685,1,"\u0633\u062C"],[64686,1,"\u0633\u062D"],[64687,1,"\u0633\u062E"],[64688,1,"\u0633\u0645"],[64689,1,"\u0635\u062D"],[64690,1,"\u0635\u062E"],[64691,1,"\u0635\u0645"],[64692,1,"\u0636\u062C"],[64693,1,"\u0636\u062D"],[64694,1,"\u0636\u062E"],[64695,1,"\u0636\u0645"],[64696,1,"\u0637\u062D"],[64697,1,"\u0638\u0645"],[64698,1,"\u0639\u062C"],[64699,1,"\u0639\u0645"],[64700,1,"\u063A\u062C"],[64701,1,"\u063A\u0645"],[64702,1,"\u0641\u062C"],[64703,1,"\u0641\u062D"],[64704,1,"\u0641\u062E"],[64705,1,"\u0641\u0645"],[64706,1,"\u0642\u062D"],[64707,1,"\u0642\u0645"],[64708,1,"\u0643\u062C"],[64709,1,"\u0643\u062D"],[64710,1,"\u0643\u062E"],[64711,1,"\u0643\u0644"],[64712,1,"\u0643\u0645"],[64713,1,"\u0644\u062C"],[64714,1,"\u0644\u062D"],[64715,1,"\u0644\u062E"],[64716,1,"\u0644\u0645"],[64717,1,"\u0644\u0647"],[64718,1,"\u0645\u062C"],[64719,1,"\u0645\u062D"],[64720,1,"\u0645\u062E"],[64721,1,"\u0645\u0645"],[64722,1,"\u0646\u062C"],[64723,1,"\u0646\u062D"],[64724,1,"\u0646\u062E"],[64725,1,"\u0646\u0645"],[64726,1,"\u0646\u0647"],[64727,1,"\u0647\u062C"],[64728,1,"\u0647\u0645"],[64729,1,"\u0647\u0670"],[64730,1,"\u064A\u062C"],[64731,1,"\u064A\u062D"],[64732,1,"\u064A\u062E"],[64733,1,"\u064A\u0645"],[64734,1,"\u064A\u0647"],[64735,1,"\u0626\u0645"],[64736,1,"\u0626\u0647"],[64737,1,"\u0628\u0645"],[64738,1,"\u0628\u0647"],[64739,1,"\u062A\u0645"],[64740,1,"\u062A\u0647"],[64741,1,"\u062B\u0645"],[64742,1,"\u062B\u0647"],[64743,1,"\u0633\u0645"],[64744,1,"\u0633\u0647"],[64745,1,"\u0634\u0645"],[64746,1,"\u0634\u0647"],[64747,1,"\u0643\u0644"],[64748,1,"\u0643\u0645"],[64749,1,"\u0644\u0645"],[64750,1,"\u0646\u0645"],[64751,1,"\u0646\u0647"],[64752,1,"\u064A\u0645"],[64753,1,"\u064A\u0647"],[64754,1,"\u0640\u064E\u0651"],[64755,1,"\u0640\u064F\u0651"],[64756,1,"\u0640\u0650\u0651"],[64757,1,"\u0637\u0649"],[64758,1,"\u0637\u064A"],[64759,1,"\u0639\u0649"],[64760,1,"\u0639\u064A"],[64761,1,"\u063A\u0649"],[64762,1,"\u063A\u064A"],[64763,1,"\u0633\u0649"],[64764,1,"\u0633\u064A"],[64765,1,"\u0634\u0649"],[64766,1,"\u0634\u064A"],[64767,1,"\u062D\u0649"],[64768,1,"\u062D\u064A"],[64769,1,"\u062C\u0649"],[64770,1,"\u062C\u064A"],[64771,1,"\u062E\u0649"],[64772,1,"\u062E\u064A"],[64773,1,"\u0635\u0649"],[64774,1,"\u0635\u064A"],[64775,1,"\u0636\u0649"],[64776,1,"\u0636\u064A"],[64777,1,"\u0634\u062C"],[64778,1,"\u0634\u062D"],[64779,1,"\u0634\u062E"],[64780,1,"\u0634\u0645"],[64781,1,"\u0634\u0631"],[64782,1,"\u0633\u0631"],[64783,1,"\u0635\u0631"],[64784,1,"\u0636\u0631"],[64785,1,"\u0637\u0649"],[64786,1,"\u0637\u064A"],[64787,1,"\u0639\u0649"],[64788,1,"\u0639\u064A"],[64789,1,"\u063A\u0649"],[64790,1,"\u063A\u064A"],[64791,1,"\u0633\u0649"],[64792,1,"\u0633\u064A"],[64793,1,"\u0634\u0649"],[64794,1,"\u0634\u064A"],[64795,1,"\u062D\u0649"],[64796,1,"\u062D\u064A"],[64797,1,"\u062C\u0649"],[64798,1,"\u062C\u064A"],[64799,1,"\u062E\u0649"],[64800,1,"\u062E\u064A"],[64801,1,"\u0635\u0649"],[64802,1,"\u0635\u064A"],[64803,1,"\u0636\u0649"],[64804,1,"\u0636\u064A"],[64805,1,"\u0634\u062C"],[64806,1,"\u0634\u062D"],[64807,1,"\u0634\u062E"],[64808,1,"\u0634\u0645"],[64809,1,"\u0634\u0631"],[64810,1,"\u0633\u0631"],[64811,1,"\u0635\u0631"],[64812,1,"\u0636\u0631"],[64813,1,"\u0634\u062C"],[64814,1,"\u0634\u062D"],[64815,1,"\u0634\u062E"],[64816,1,"\u0634\u0645"],[64817,1,"\u0633\u0647"],[64818,1,"\u0634\u0647"],[64819,1,"\u0637\u0645"],[64820,1,"\u0633\u062C"],[64821,1,"\u0633\u062D"],[64822,1,"\u0633\u062E"],[64823,1,"\u0634\u062C"],[64824,1,"\u0634\u062D"],[64825,1,"\u0634\u062E"],[64826,1,"\u0637\u0645"],[64827,1,"\u0638\u0645"],[[64828,64829],1,"\u0627\u064B"],[[64830,64831],2],[[64832,64847],2],[64848,1,"\u062A\u062C\u0645"],[[64849,64850],1,"\u062A\u062D\u062C"],[64851,1,"\u062A\u062D\u0645"],[64852,1,"\u062A\u062E\u0645"],[64853,1,"\u062A\u0645\u062C"],[64854,1,"\u062A\u0645\u062D"],[64855,1,"\u062A\u0645\u062E"],[[64856,64857],1,"\u062C\u0645\u062D"],[64858,1,"\u062D\u0645\u064A"],[64859,1,"\u062D\u0645\u0649"],[64860,1,"\u0633\u062D\u062C"],[64861,1,"\u0633\u062C\u062D"],[64862,1,"\u0633\u062C\u0649"],[[64863,64864],1,"\u0633\u0645\u062D"],[64865,1,"\u0633\u0645\u062C"],[[64866,64867],1,"\u0633\u0645\u0645"],[[64868,64869],1,"\u0635\u062D\u062D"],[64870,1,"\u0635\u0645\u0645"],[[64871,64872],1,"\u0634\u062D\u0645"],[64873,1,"\u0634\u062C\u064A"],[[64874,64875],1,"\u0634\u0645\u062E"],[[64876,64877],1,"\u0634\u0645\u0645"],[64878,1,"\u0636\u062D\u0649"],[[64879,64880],1,"\u0636\u062E\u0645"],[[64881,64882],1,"\u0637\u0645\u062D"],[64883,1,"\u0637\u0645\u0645"],[64884,1,"\u0637\u0645\u064A"],[64885,1,"\u0639\u062C\u0645"],[[64886,64887],1,"\u0639\u0645\u0645"],[64888,1,"\u0639\u0645\u0649"],[64889,1,"\u063A\u0645\u0645"],[64890,1,"\u063A\u0645\u064A"],[64891,1,"\u063A\u0645\u0649"],[[64892,64893],1,"\u0641\u062E\u0645"],[64894,1,"\u0642\u0645\u062D"],[64895,1,"\u0642\u0645\u0645"],[64896,1,"\u0644\u062D\u0645"],[64897,1,"\u0644\u062D\u064A"],[64898,1,"\u0644\u062D\u0649"],[[64899,64900],1,"\u0644\u062C\u062C"],[[64901,64902],1,"\u0644\u062E\u0645"],[[64903,64904],1,"\u0644\u0645\u062D"],[64905,1,"\u0645\u062D\u062C"],[64906,1,"\u0645\u062D\u0645"],[64907,1,"\u0645\u062D\u064A"],[64908,1,"\u0645\u062C\u062D"],[64909,1,"\u0645\u062C\u0645"],[64910,1,"\u0645\u062E\u062C"],[64911,1,"\u0645\u062E\u0645"],[[64912,64913],3],[64914,1,"\u0645\u062C\u062E"],[64915,1,"\u0647\u0645\u062C"],[64916,1,"\u0647\u0645\u0645"],[64917,1,"\u0646\u062D\u0645"],[64918,1,"\u0646\u062D\u0649"],[[64919,64920],1,"\u0646\u062C\u0645"],[64921,1,"\u0646\u062C\u0649"],[64922,1,"\u0646\u0645\u064A"],[64923,1,"\u0646\u0645\u0649"],[[64924,64925],1,"\u064A\u0645\u0645"],[64926,1,"\u0628\u062E\u064A"],[64927,1,"\u062A\u062C\u064A"],[64928,1,"\u062A\u062C\u0649"],[64929,1,"\u062A\u062E\u064A"],[64930,1,"\u062A\u062E\u0649"],[64931,1,"\u062A\u0645\u064A"],[64932,1,"\u062A\u0645\u0649"],[64933,1,"\u062C\u0645\u064A"],[64934,1,"\u062C\u062D\u0649"],[64935,1,"\u062C\u0645\u0649"],[64936,1,"\u0633\u062E\u0649"],[64937,1,"\u0635\u062D\u064A"],[64938,1,"\u0634\u062D\u064A"],[64939,1,"\u0636\u062D\u064A"],[64940,1,"\u0644\u062C\u064A"],[64941,1,"\u0644\u0645\u064A"],[64942,1,"\u064A\u062D\u064A"],[64943,1,"\u064A\u062C\u064A"],[64944,1,"\u064A\u0645\u064A"],[64945,1,"\u0645\u0645\u064A"],[64946,1,"\u0642\u0645\u064A"],[64947,1,"\u0646\u062D\u064A"],[64948,1,"\u0642\u0645\u062D"],[64949,1,"\u0644\u062D\u0645"],[64950,1,"\u0639\u0645\u064A"],[64951,1,"\u0643\u0645\u064A"],[64952,1,"\u0646\u062C\u062D"],[64953,1,"\u0645\u062E\u064A"],[64954,1,"\u0644\u062C\u0645"],[64955,1,"\u0643\u0645\u0645"],[64956,1,"\u0644\u062C\u0645"],[64957,1,"\u0646\u062C\u062D"],[64958,1,"\u062C\u062D\u064A"],[64959,1,"\u062D\u062C\u064A"],[64960,1,"\u0645\u062C\u064A"],[64961,1,"\u0641\u0645\u064A"],[64962,1,"\u0628\u062D\u064A"],[64963,1,"\u0643\u0645\u0645"],[64964,1,"\u0639\u062C\u0645"],[64965,1,"\u0635\u0645\u0645"],[64966,1,"\u0633\u062E\u064A"],[64967,1,"\u0646\u062C\u064A"],[[64968,64974],3],[64975,2],[[64976,65007],3],[65008,1,"\u0635\u0644\u06D2"],[65009,1,"\u0642\u0644\u06D2"],[65010,1,"\u0627\u0644\u0644\u0647"],[65011,1,"\u0627\u0643\u0628\u0631"],[65012,1,"\u0645\u062D\u0645\u062F"],[65013,1,"\u0635\u0644\u0639\u0645"],[65014,1,"\u0631\u0633\u0648\u0644"],[65015,1,"\u0639\u0644\u064A\u0647"],[65016,1,"\u0648\u0633\u0644\u0645"],[65017,1,"\u0635\u0644\u0649"],[65018,5,"\u0635\u0644\u0649 \u0627\u0644\u0644\u0647 \u0639\u0644\u064A\u0647 \u0648\u0633\u0644\u0645"],[65019,5,"\u062C\u0644 \u062C\u0644\u0627\u0644\u0647"],[65020,1,"\u0631\u06CC\u0627\u0644"],[65021,2],[[65022,65023],2],[[65024,65039],7],[65040,5,","],[65041,1,"\u3001"],[65042,3],[65043,5,":"],[65044,5,";"],[65045,5,"!"],[65046,5,"?"],[65047,1,"\u3016"],[65048,1,"\u3017"],[65049,3],[[65050,65055],3],[[65056,65059],2],[[65060,65062],2],[[65063,65069],2],[[65070,65071],2],[65072,3],[65073,1,"\u2014"],[65074,1,"\u2013"],[[65075,65076],5,"_"],[65077,5,"("],[65078,5,")"],[65079,5,"{"],[65080,5,"}"],[65081,1,"\u3014"],[65082,1,"\u3015"],[65083,1,"\u3010"],[65084,1,"\u3011"],[65085,1,"\u300A"],[65086,1,"\u300B"],[65087,1,"\u3008"],[65088,1,"\u3009"],[65089,1,"\u300C"],[65090,1,"\u300D"],[65091,1,"\u300E"],[65092,1,"\u300F"],[[65093,65094],2],[65095,5,"["],[65096,5,"]"],[[65097,65100],5," \u0305"],[[65101,65103],5,"_"],[65104,5,","],[65105,1,"\u3001"],[65106,3],[65107,3],[65108,5,";"],[65109,5,":"],[65110,5,"?"],[65111,5,"!"],[65112,1,"\u2014"],[65113,5,"("],[65114,5,")"],[65115,5,"{"],[65116,5,"}"],[65117,1,"\u3014"],[65118,1,"\u3015"],[65119,5,"#"],[65120,5,"&"],[65121,5,"*"],[65122,5,"+"],[65123,1,"-"],[65124,5,"<"],[65125,5,">"],[65126,5,"="],[65127,3],[65128,5,"\\"],[65129,5,"$"],[65130,5,"%"],[65131,5,"@"],[[65132,65135],3],[65136,5," \u064B"],[65137,1,"\u0640\u064B"],[65138,5," \u064C"],[65139,2],[65140,5," \u064D"],[65141,3],[65142,5," \u064E"],[65143,1,"\u0640\u064E"],[65144,5," \u064F"],[65145,1,"\u0640\u064F"],[65146,5," \u0650"],[65147,1,"\u0640\u0650"],[65148,5," \u0651"],[65149,1,"\u0640\u0651"],[65150,5," \u0652"],[65151,1,"\u0640\u0652"],[65152,1,"\u0621"],[[65153,65154],1,"\u0622"],[[65155,65156],1,"\u0623"],[[65157,65158],1,"\u0624"],[[65159,65160],1,"\u0625"],[[65161,65164],1,"\u0626"],[[65165,65166],1,"\u0627"],[[65167,65170],1,"\u0628"],[[65171,65172],1,"\u0629"],[[65173,65176],1,"\u062A"],[[65177,65180],1,"\u062B"],[[65181,65184],1,"\u062C"],[[65185,65188],1,"\u062D"],[[65189,65192],1,"\u062E"],[[65193,65194],1,"\u062F"],[[65195,65196],1,"\u0630"],[[65197,65198],1,"\u0631"],[[65199,65200],1,"\u0632"],[[65201,65204],1,"\u0633"],[[65205,65208],1,"\u0634"],[[65209,65212],1,"\u0635"],[[65213,65216],1,"\u0636"],[[65217,65220],1,"\u0637"],[[65221,65224],1,"\u0638"],[[65225,65228],1,"\u0639"],[[65229,65232],1,"\u063A"],[[65233,65236],1,"\u0641"],[[65237,65240],1,"\u0642"],[[65241,65244],1,"\u0643"],[[65245,65248],1,"\u0644"],[[65249,65252],1,"\u0645"],[[65253,65256],1,"\u0646"],[[65257,65260],1,"\u0647"],[[65261,65262],1,"\u0648"],[[65263,65264],1,"\u0649"],[[65265,65268],1,"\u064A"],[[65269,65270],1,"\u0644\u0622"],[[65271,65272],1,"\u0644\u0623"],[[65273,65274],1,"\u0644\u0625"],[[65275,65276],1,"\u0644\u0627"],[[65277,65278],3],[65279,7],[65280,3],[65281,5,"!"],[65282,5,'"'],[65283,5,"#"],[65284,5,"$"],[65285,5,"%"],[65286,5,"&"],[65287,5,"'"],[65288,5,"("],[65289,5,")"],[65290,5,"*"],[65291,5,"+"],[65292,5,","],[65293,1,"-"],[65294,1,"."],[65295,5,"/"],[65296,1,"0"],[65297,1,"1"],[65298,1,"2"],[65299,1,"3"],[65300,1,"4"],[65301,1,"5"],[65302,1,"6"],[65303,1,"7"],[65304,1,"8"],[65305,1,"9"],[65306,5,":"],[65307,5,";"],[65308,5,"<"],[65309,5,"="],[65310,5,">"],[65311,5,"?"],[65312,5,"@"],[65313,1,"a"],[65314,1,"b"],[65315,1,"c"],[65316,1,"d"],[65317,1,"e"],[65318,1,"f"],[65319,1,"g"],[65320,1,"h"],[65321,1,"i"],[65322,1,"j"],[65323,1,"k"],[65324,1,"l"],[65325,1,"m"],[65326,1,"n"],[65327,1,"o"],[65328,1,"p"],[65329,1,"q"],[65330,1,"r"],[65331,1,"s"],[65332,1,"t"],[65333,1,"u"],[65334,1,"v"],[65335,1,"w"],[65336,1,"x"],[65337,1,"y"],[65338,1,"z"],[65339,5,"["],[65340,5,"\\"],[65341,5,"]"],[65342,5,"^"],[65343,5,"_"],[65344,5,"`"],[65345,1,"a"],[65346,1,"b"],[65347,1,"c"],[65348,1,"d"],[65349,1,"e"],[65350,1,"f"],[65351,1,"g"],[65352,1,"h"],[65353,1,"i"],[65354,1,"j"],[65355,1,"k"],[65356,1,"l"],[65357,1,"m"],[65358,1,"n"],[65359,1,"o"],[65360,1,"p"],[65361,1,"q"],[65362,1,"r"],[65363,1,"s"],[65364,1,"t"],[65365,1,"u"],[65366,1,"v"],[65367,1,"w"],[65368,1,"x"],[65369,1,"y"],[65370,1,"z"],[65371,5,"{"],[65372,5,"|"],[65373,5,"}"],[65374,5,"~"],[65375,1,"\u2985"],[65376,1,"\u2986"],[65377,1,"."],[65378,1,"\u300C"],[65379,1,"\u300D"],[65380,1,"\u3001"],[65381,1,"\u30FB"],[65382,1,"\u30F2"],[65383,1,"\u30A1"],[65384,1,"\u30A3"],[65385,1,"\u30A5"],[65386,1,"\u30A7"],[65387,1,"\u30A9"],[65388,1,"\u30E3"],[65389,1,"\u30E5"],[65390,1,"\u30E7"],[65391,1,"\u30C3"],[65392,1,"\u30FC"],[65393,1,"\u30A2"],[65394,1,"\u30A4"],[65395,1,"\u30A6"],[65396,1,"\u30A8"],[65397,1,"\u30AA"],[65398,1,"\u30AB"],[65399,1,"\u30AD"],[65400,1,"\u30AF"],[65401,1,"\u30B1"],[65402,1,"\u30B3"],[65403,1,"\u30B5"],[65404,1,"\u30B7"],[65405,1,"\u30B9"],[65406,1,"\u30BB"],[65407,1,"\u30BD"],[65408,1,"\u30BF"],[65409,1,"\u30C1"],[65410,1,"\u30C4"],[65411,1,"\u30C6"],[65412,1,"\u30C8"],[65413,1,"\u30CA"],[65414,1,"\u30CB"],[65415,1,"\u30CC"],[65416,1,"\u30CD"],[65417,1,"\u30CE"],[65418,1,"\u30CF"],[65419,1,"\u30D2"],[65420,1,"\u30D5"],[65421,1,"\u30D8"],[65422,1,"\u30DB"],[65423,1,"\u30DE"],[65424,1,"\u30DF"],[65425,1,"\u30E0"],[65426,1,"\u30E1"],[65427,1,"\u30E2"],[65428,1,"\u30E4"],[65429,1,"\u30E6"],[65430,1,"\u30E8"],[65431,1,"\u30E9"],[65432,1,"\u30EA"],[65433,1,"\u30EB"],[65434,1,"\u30EC"],[65435,1,"\u30ED"],[65436,1,"\u30EF"],[65437,1,"\u30F3"],[65438,1,"\u3099"],[65439,1,"\u309A"],[65440,3],[65441,1,"\u1100"],[65442,1,"\u1101"],[65443,1,"\u11AA"],[65444,1,"\u1102"],[65445,1,"\u11AC"],[65446,1,"\u11AD"],[65447,1,"\u1103"],[65448,1,"\u1104"],[65449,1,"\u1105"],[65450,1,"\u11B0"],[65451,1,"\u11B1"],[65452,1,"\u11B2"],[65453,1,"\u11B3"],[65454,1,"\u11B4"],[65455,1,"\u11B5"],[65456,1,"\u111A"],[65457,1,"\u1106"],[65458,1,"\u1107"],[65459,1,"\u1108"],[65460,1,"\u1121"],[65461,1,"\u1109"],[65462,1,"\u110A"],[65463,1,"\u110B"],[65464,1,"\u110C"],[65465,1,"\u110D"],[65466,1,"\u110E"],[65467,1,"\u110F"],[65468,1,"\u1110"],[65469,1,"\u1111"],[65470,1,"\u1112"],[[65471,65473],3],[65474,1,"\u1161"],[65475,1,"\u1162"],[65476,1,"\u1163"],[65477,1,"\u1164"],[65478,1,"\u1165"],[65479,1,"\u1166"],[[65480,65481],3],[65482,1,"\u1167"],[65483,1,"\u1168"],[65484,1,"\u1169"],[65485,1,"\u116A"],[65486,1,"\u116B"],[65487,1,"\u116C"],[[65488,65489],3],[65490,1,"\u116D"],[65491,1,"\u116E"],[65492,1,"\u116F"],[65493,1,"\u1170"],[65494,1,"\u1171"],[65495,1,"\u1172"],[[65496,65497],3],[65498,1,"\u1173"],[65499,1,"\u1174"],[65500,1,"\u1175"],[[65501,65503],3],[65504,1,"\xA2"],[65505,1,"\xA3"],[65506,1,"\xAC"],[65507,5," \u0304"],[65508,1,"\xA6"],[65509,1,"\xA5"],[65510,1,"\u20A9"],[65511,3],[65512,1,"\u2502"],[65513,1,"\u2190"],[65514,1,"\u2191"],[65515,1,"\u2192"],[65516,1,"\u2193"],[65517,1,"\u25A0"],[65518,1,"\u25CB"],[[65519,65528],3],[[65529,65531],3],[65532,3],[65533,3],[[65534,65535],3],[[65536,65547],2],[65548,3],[[65549,65574],2],[65575,3],[[65576,65594],2],[65595,3],[[65596,65597],2],[65598,3],[[65599,65613],2],[[65614,65615],3],[[65616,65629],2],[[65630,65663],3],[[65664,65786],2],[[65787,65791],3],[[65792,65794],2],[[65795,65798],3],[[65799,65843],2],[[65844,65846],3],[[65847,65855],2],[[65856,65930],2],[[65931,65932],2],[[65933,65934],2],[65935,3],[[65936,65947],2],[65948,2],[[65949,65951],3],[65952,2],[[65953,65999],3],[[66000,66044],2],[66045,2],[[66046,66175],3],[[66176,66204],2],[[66205,66207],3],[[66208,66256],2],[[66257,66271],3],[66272,2],[[66273,66299],2],[[66300,66303],3],[[66304,66334],2],[66335,2],[[66336,66339],2],[[66340,66348],3],[[66349,66351],2],[[66352,66368],2],[66369,2],[[66370,66377],2],[66378,2],[[66379,66383],3],[[66384,66426],2],[[66427,66431],3],[[66432,66461],2],[66462,3],[66463,2],[[66464,66499],2],[[66500,66503],3],[[66504,66511],2],[[66512,66517],2],[[66518,66559],3],[66560,1,"\uD801\uDC28"],[66561,1,"\uD801\uDC29"],[66562,1,"\uD801\uDC2A"],[66563,1,"\uD801\uDC2B"],[66564,1,"\uD801\uDC2C"],[66565,1,"\uD801\uDC2D"],[66566,1,"\uD801\uDC2E"],[66567,1,"\uD801\uDC2F"],[66568,1,"\uD801\uDC30"],[66569,1,"\uD801\uDC31"],[66570,1,"\uD801\uDC32"],[66571,1,"\uD801\uDC33"],[66572,1,"\uD801\uDC34"],[66573,1,"\uD801\uDC35"],[66574,1,"\uD801\uDC36"],[66575,1,"\uD801\uDC37"],[66576,1,"\uD801\uDC38"],[66577,1,"\uD801\uDC39"],[66578,1,"\uD801\uDC3A"],[66579,1,"\uD801\uDC3B"],[66580,1,"\uD801\uDC3C"],[66581,1,"\uD801\uDC3D"],[66582,1,"\uD801\uDC3E"],[66583,1,"\uD801\uDC3F"],[66584,1,"\uD801\uDC40"],[66585,1,"\uD801\uDC41"],[66586,1,"\uD801\uDC42"],[66587,1,"\uD801\uDC43"],[66588,1,"\uD801\uDC44"],[66589,1,"\uD801\uDC45"],[66590,1,"\uD801\uDC46"],[66591,1,"\uD801\uDC47"],[66592,1,"\uD801\uDC48"],[66593,1,"\uD801\uDC49"],[66594,1,"\uD801\uDC4A"],[66595,1,"\uD801\uDC4B"],[66596,1,"\uD801\uDC4C"],[66597,1,"\uD801\uDC4D"],[66598,1,"\uD801\uDC4E"],[66599,1,"\uD801\uDC4F"],[[66600,66637],2],[[66638,66717],2],[[66718,66719],3],[[66720,66729],2],[[66730,66735],3],[66736,1,"\uD801\uDCD8"],[66737,1,"\uD801\uDCD9"],[66738,1,"\uD801\uDCDA"],[66739,1,"\uD801\uDCDB"],[66740,1,"\uD801\uDCDC"],[66741,1,"\uD801\uDCDD"],[66742,1,"\uD801\uDCDE"],[66743,1,"\uD801\uDCDF"],[66744,1,"\uD801\uDCE0"],[66745,1,"\uD801\uDCE1"],[66746,1,"\uD801\uDCE2"],[66747,1,"\uD801\uDCE3"],[66748,1,"\uD801\uDCE4"],[66749,1,"\uD801\uDCE5"],[66750,1,"\uD801\uDCE6"],[66751,1,"\uD801\uDCE7"],[66752,1,"\uD801\uDCE8"],[66753,1,"\uD801\uDCE9"],[66754,1,"\uD801\uDCEA"],[66755,1,"\uD801\uDCEB"],[66756,1,"\uD801\uDCEC"],[66757,1,"\uD801\uDCED"],[66758,1,"\uD801\uDCEE"],[66759,1,"\uD801\uDCEF"],[66760,1,"\uD801\uDCF0"],[66761,1,"\uD801\uDCF1"],[66762,1,"\uD801\uDCF2"],[66763,1,"\uD801\uDCF3"],[66764,1,"\uD801\uDCF4"],[66765,1,"\uD801\uDCF5"],[66766,1,"\uD801\uDCF6"],[66767,1,"\uD801\uDCF7"],[66768,1,"\uD801\uDCF8"],[66769,1,"\uD801\uDCF9"],[66770,1,"\uD801\uDCFA"],[66771,1,"\uD801\uDCFB"],[[66772,66775],3],[[66776,66811],2],[[66812,66815],3],[[66816,66855],2],[[66856,66863],3],[[66864,66915],2],[[66916,66926],3],[66927,2],[66928,1,"\uD801\uDD97"],[66929,1,"\uD801\uDD98"],[66930,1,"\uD801\uDD99"],[66931,1,"\uD801\uDD9A"],[66932,1,"\uD801\uDD9B"],[66933,1,"\uD801\uDD9C"],[66934,1,"\uD801\uDD9D"],[66935,1,"\uD801\uDD9E"],[66936,1,"\uD801\uDD9F"],[66937,1,"\uD801\uDDA0"],[66938,1,"\uD801\uDDA1"],[66939,3],[66940,1,"\uD801\uDDA3"],[66941,1,"\uD801\uDDA4"],[66942,1,"\uD801\uDDA5"],[66943,1,"\uD801\uDDA6"],[66944,1,"\uD801\uDDA7"],[66945,1,"\uD801\uDDA8"],[66946,1,"\uD801\uDDA9"],[66947,1,"\uD801\uDDAA"],[66948,1,"\uD801\uDDAB"],[66949,1,"\uD801\uDDAC"],[66950,1,"\uD801\uDDAD"],[66951,1,"\uD801\uDDAE"],[66952,1,"\uD801\uDDAF"],[66953,1,"\uD801\uDDB0"],[66954,1,"\uD801\uDDB1"],[66955,3],[66956,1,"\uD801\uDDB3"],[66957,1,"\uD801\uDDB4"],[66958,1,"\uD801\uDDB5"],[66959,1,"\uD801\uDDB6"],[66960,1,"\uD801\uDDB7"],[66961,1,"\uD801\uDDB8"],[66962,1,"\uD801\uDDB9"],[66963,3],[66964,1,"\uD801\uDDBB"],[66965,1,"\uD801\uDDBC"],[66966,3],[[66967,66977],2],[66978,3],[[66979,66993],2],[66994,3],[[66995,67001],2],[67002,3],[[67003,67004],2],[[67005,67071],3],[[67072,67382],2],[[67383,67391],3],[[67392,67413],2],[[67414,67423],3],[[67424,67431],2],[[67432,67455],3],[67456,2],[67457,1,"\u02D0"],[67458,1,"\u02D1"],[67459,1,"\xE6"],[67460,1,"\u0299"],[67461,1,"\u0253"],[67462,3],[67463,1,"\u02A3"],[67464,1,"\uAB66"],[67465,1,"\u02A5"],[67466,1,"\u02A4"],[67467,1,"\u0256"],[67468,1,"\u0257"],[67469,1,"\u1D91"],[67470,1,"\u0258"],[67471,1,"\u025E"],[67472,1,"\u02A9"],[67473,1,"\u0264"],[67474,1,"\u0262"],[67475,1,"\u0260"],[67476,1,"\u029B"],[67477,1,"\u0127"],[67478,1,"\u029C"],[67479,1,"\u0267"],[67480,1,"\u0284"],[67481,1,"\u02AA"],[67482,1,"\u02AB"],[67483,1,"\u026C"],[67484,1,"\uD837\uDF04"],[67485,1,"\uA78E"],[67486,1,"\u026E"],[67487,1,"\uD837\uDF05"],[67488,1,"\u028E"],[67489,1,"\uD837\uDF06"],[67490,1,"\xF8"],[67491,1,"\u0276"],[67492,1,"\u0277"],[67493,1,"q"],[67494,1,"\u027A"],[67495,1,"\uD837\uDF08"],[67496,1,"\u027D"],[67497,1,"\u027E"],[67498,1,"\u0280"],[67499,1,"\u02A8"],[67500,1,"\u02A6"],[67501,1,"\uAB67"],[67502,1,"\u02A7"],[67503,1,"\u0288"],[67504,1,"\u2C71"],[67505,3],[67506,1,"\u028F"],[67507,1,"\u02A1"],[67508,1,"\u02A2"],[67509,1,"\u0298"],[67510,1,"\u01C0"],[67511,1,"\u01C1"],[67512,1,"\u01C2"],[67513,1,"\uD837\uDF0A"],[67514,1,"\uD837\uDF1E"],[[67515,67583],3],[[67584,67589],2],[[67590,67591],3],[67592,2],[67593,3],[[67594,67637],2],[67638,3],[[67639,67640],2],[[67641,67643],3],[67644,2],[[67645,67646],3],[67647,2],[[67648,67669],2],[67670,3],[[67671,67679],2],[[67680,67702],2],[[67703,67711],2],[[67712,67742],2],[[67743,67750],3],[[67751,67759],2],[[67760,67807],3],[[67808,67826],2],[67827,3],[[67828,67829],2],[[67830,67834],3],[[67835,67839],2],[[67840,67861],2],[[67862,67865],2],[[67866,67867],2],[[67868,67870],3],[67871,2],[[67872,67897],2],[[67898,67902],3],[67903,2],[[67904,67967],3],[[67968,68023],2],[[68024,68027],3],[[68028,68029],2],[[68030,68031],2],[[68032,68047],2],[[68048,68049],3],[[68050,68095],2],[[68096,68099],2],[68100,3],[[68101,68102],2],[[68103,68107],3],[[68108,68115],2],[68116,3],[[68117,68119],2],[68120,3],[[68121,68147],2],[[68148,68149],2],[[68150,68151],3],[[68152,68154],2],[[68155,68158],3],[68159,2],[[68160,68167],2],[68168,2],[[68169,68175],3],[[68176,68184],2],[[68185,68191],3],[[68192,68220],2],[[68221,68223],2],[[68224,68252],2],[[68253,68255],2],[[68256,68287],3],[[68288,68295],2],[68296,2],[[68297,68326],2],[[68327,68330],3],[[68331,68342],2],[[68343,68351],3],[[68352,68405],2],[[68406,68408],3],[[68409,68415],2],[[68416,68437],2],[[68438,68439],3],[[68440,68447],2],[[68448,68466],2],[[68467,68471],3],[[68472,68479],2],[[68480,68497],2],[[68498,68504],3],[[68505,68508],2],[[68509,68520],3],[[68521,68527],2],[[68528,68607],3],[[68608,68680],2],[[68681,68735],3],[68736,1,"\uD803\uDCC0"],[68737,1,"\uD803\uDCC1"],[68738,1,"\uD803\uDCC2"],[68739,1,"\uD803\uDCC3"],[68740,1,"\uD803\uDCC4"],[68741,1,"\uD803\uDCC5"],[68742,1,"\uD803\uDCC6"],[68743,1,"\uD803\uDCC7"],[68744,1,"\uD803\uDCC8"],[68745,1,"\uD803\uDCC9"],[68746,1,"\uD803\uDCCA"],[68747,1,"\uD803\uDCCB"],[68748,1,"\uD803\uDCCC"],[68749,1,"\uD803\uDCCD"],[68750,1,"\uD803\uDCCE"],[68751,1,"\uD803\uDCCF"],[68752,1,"\uD803\uDCD0"],[68753,1,"\uD803\uDCD1"],[68754,1,"\uD803\uDCD2"],[68755,1,"\uD803\uDCD3"],[68756,1,"\uD803\uDCD4"],[68757,1,"\uD803\uDCD5"],[68758,1,"\uD803\uDCD6"],[68759,1,"\uD803\uDCD7"],[68760,1,"\uD803\uDCD8"],[68761,1,"\uD803\uDCD9"],[68762,1,"\uD803\uDCDA"],[68763,1,"\uD803\uDCDB"],[68764,1,"\uD803\uDCDC"],[68765,1,"\uD803\uDCDD"],[68766,1,"\uD803\uDCDE"],[68767,1,"\uD803\uDCDF"],[68768,1,"\uD803\uDCE0"],[68769,1,"\uD803\uDCE1"],[68770,1,"\uD803\uDCE2"],[68771,1,"\uD803\uDCE3"],[68772,1,"\uD803\uDCE4"],[68773,1,"\uD803\uDCE5"],[68774,1,"\uD803\uDCE6"],[68775,1,"\uD803\uDCE7"],[68776,1,"\uD803\uDCE8"],[68777,1,"\uD803\uDCE9"],[68778,1,"\uD803\uDCEA"],[68779,1,"\uD803\uDCEB"],[68780,1,"\uD803\uDCEC"],[68781,1,"\uD803\uDCED"],[68782,1,"\uD803\uDCEE"],[68783,1,"\uD803\uDCEF"],[68784,1,"\uD803\uDCF0"],[68785,1,"\uD803\uDCF1"],[68786,1,"\uD803\uDCF2"],[[68787,68799],3],[[68800,68850],2],[[68851,68857],3],[[68858,68863],2],[[68864,68903],2],[[68904,68911],3],[[68912,68921],2],[[68922,69215],3],[[69216,69246],2],[69247,3],[[69248,69289],2],[69290,3],[[69291,69292],2],[69293,2],[[69294,69295],3],[[69296,69297],2],[[69298,69372],3],[[69373,69375],2],[[69376,69404],2],[[69405,69414],2],[69415,2],[[69416,69423],3],[[69424,69456],2],[[69457,69465],2],[[69466,69487],3],[[69488,69509],2],[[69510,69513],2],[[69514,69551],3],[[69552,69572],2],[[69573,69579],2],[[69580,69599],3],[[69600,69622],2],[[69623,69631],3],[[69632,69702],2],[[69703,69709],2],[[69710,69713],3],[[69714,69733],2],[[69734,69743],2],[[69744,69749],2],[[69750,69758],3],[69759,2],[[69760,69818],2],[[69819,69820],2],[69821,3],[[69822,69825],2],[69826,2],[[69827,69836],3],[69837,3],[[69838,69839],3],[[69840,69864],2],[[69865,69871],3],[[69872,69881],2],[[69882,69887],3],[[69888,69940],2],[69941,3],[[69942,69951],2],[[69952,69955],2],[[69956,69958],2],[69959,2],[[69960,69967],3],[[69968,70003],2],[[70004,70005],2],[70006,2],[[70007,70015],3],[[70016,70084],2],[[70085,70088],2],[[70089,70092],2],[70093,2],[[70094,70095],2],[[70096,70105],2],[70106,2],[70107,2],[70108,2],[[70109,70111],2],[70112,3],[[70113,70132],2],[[70133,70143],3],[[70144,70161],2],[70162,3],[[70163,70199],2],[[70200,70205],2],[70206,2],[[70207,70209],2],[[70210,70271],3],[[70272,70278],2],[70279,3],[70280,2],[70281,3],[[70282,70285],2],[70286,3],[[70287,70301],2],[70302,3],[[70303,70312],2],[70313,2],[[70314,70319],3],[[70320,70378],2],[[70379,70383],3],[[70384,70393],2],[[70394,70399],3],[70400,2],[[70401,70403],2],[70404,3],[[70405,70412],2],[[70413,70414],3],[[70415,70416],2],[[70417,70418],3],[[70419,70440],2],[70441,3],[[70442,70448],2],[70449,3],[[70450,70451],2],[70452,3],[[70453,70457],2],[70458,3],[70459,2],[[70460,70468],2],[[70469,70470],3],[[70471,70472],2],[[70473,70474],3],[[70475,70477],2],[[70478,70479],3],[70480,2],[[70481,70486],3],[70487,2],[[70488,70492],3],[[70493,70499],2],[[70500,70501],3],[[70502,70508],2],[[70509,70511],3],[[70512,70516],2],[[70517,70655],3],[[70656,70730],2],[[70731,70735],2],[[70736,70745],2],[70746,2],[70747,2],[70748,3],[70749,2],[70750,2],[70751,2],[[70752,70753],2],[[70754,70783],3],[[70784,70853],2],[70854,2],[70855,2],[[70856,70863],3],[[70864,70873],2],[[70874,71039],3],[[71040,71093],2],[[71094,71095],3],[[71096,71104],2],[[71105,71113],2],[[71114,71127],2],[[71128,71133],2],[[71134,71167],3],[[71168,71232],2],[[71233,71235],2],[71236,2],[[71237,71247],3],[[71248,71257],2],[[71258,71263],3],[[71264,71276],2],[[71277,71295],3],[[71296,71351],2],[71352,2],[71353,2],[[71354,71359],3],[[71360,71369],2],[[71370,71423],3],[[71424,71449],2],[71450,2],[[71451,71452],3],[[71453,71467],2],[[71468,71471],3],[[71472,71481],2],[[71482,71487],2],[[71488,71494],2],[[71495,71679],3],[[71680,71738],2],[71739,2],[[71740,71839],3],[71840,1,"\uD806\uDCC0"],[71841,1,"\uD806\uDCC1"],[71842,1,"\uD806\uDCC2"],[71843,1,"\uD806\uDCC3"],[71844,1,"\uD806\uDCC4"],[71845,1,"\uD806\uDCC5"],[71846,1,"\uD806\uDCC6"],[71847,1,"\uD806\uDCC7"],[71848,1,"\uD806\uDCC8"],[71849,1,"\uD806\uDCC9"],[71850,1,"\uD806\uDCCA"],[71851,1,"\uD806\uDCCB"],[71852,1,"\uD806\uDCCC"],[71853,1,"\uD806\uDCCD"],[71854,1,"\uD806\uDCCE"],[71855,1,"\uD806\uDCCF"],[71856,1,"\uD806\uDCD0"],[71857,1,"\uD806\uDCD1"],[71858,1,"\uD806\uDCD2"],[71859,1,"\uD806\uDCD3"],[71860,1,"\uD806\uDCD4"],[71861,1,"\uD806\uDCD5"],[71862,1,"\uD806\uDCD6"],[71863,1,"\uD806\uDCD7"],[71864,1,"\uD806\uDCD8"],[71865,1,"\uD806\uDCD9"],[71866,1,"\uD806\uDCDA"],[71867,1,"\uD806\uDCDB"],[71868,1,"\uD806\uDCDC"],[71869,1,"\uD806\uDCDD"],[71870,1,"\uD806\uDCDE"],[71871,1,"\uD806\uDCDF"],[[71872,71913],2],[[71914,71922],2],[[71923,71934],3],[71935,2],[[71936,71942],2],[[71943,71944],3],[71945,2],[[71946,71947],3],[[71948,71955],2],[71956,3],[[71957,71958],2],[71959,3],[[71960,71989],2],[71990,3],[[71991,71992],2],[[71993,71994],3],[[71995,72003],2],[[72004,72006],2],[[72007,72015],3],[[72016,72025],2],[[72026,72095],3],[[72096,72103],2],[[72104,72105],3],[[72106,72151],2],[[72152,72153],3],[[72154,72161],2],[72162,2],[[72163,72164],2],[[72165,72191],3],[[72192,72254],2],[[72255,72262],2],[72263,2],[[72264,72271],3],[[72272,72323],2],[[72324,72325],2],[[72326,72345],2],[[72346,72348],2],[72349,2],[[72350,72354],2],[[72355,72367],3],[[72368,72383],2],[[72384,72440],2],[[72441,72447],3],[[72448,72457],2],[[72458,72703],3],[[72704,72712],2],[72713,3],[[72714,72758],2],[72759,3],[[72760,72768],2],[[72769,72773],2],[[72774,72783],3],[[72784,72793],2],[[72794,72812],2],[[72813,72815],3],[[72816,72817],2],[[72818,72847],2],[[72848,72849],3],[[72850,72871],2],[72872,3],[[72873,72886],2],[[72887,72959],3],[[72960,72966],2],[72967,3],[[72968,72969],2],[72970,3],[[72971,73014],2],[[73015,73017],3],[73018,2],[73019,3],[[73020,73021],2],[73022,3],[[73023,73031],2],[[73032,73039],3],[[73040,73049],2],[[73050,73055],3],[[73056,73061],2],[73062,3],[[73063,73064],2],[73065,3],[[73066,73102],2],[73103,3],[[73104,73105],2],[73106,3],[[73107,73112],2],[[73113,73119],3],[[73120,73129],2],[[73130,73439],3],[[73440,73462],2],[[73463,73464],2],[[73465,73471],3],[[73472,73488],2],[73489,3],[[73490,73530],2],[[73531,73533],3],[[73534,73538],2],[[73539,73551],2],[[73552,73561],2],[[73562,73647],3],[73648,2],[[73649,73663],3],[[73664,73713],2],[[73714,73726],3],[73727,2],[[73728,74606],2],[[74607,74648],2],[74649,2],[[74650,74751],3],[[74752,74850],2],[[74851,74862],2],[74863,3],[[74864,74867],2],[74868,2],[[74869,74879],3],[[74880,75075],2],[[75076,77711],3],[[77712,77808],2],[[77809,77810],2],[[77811,77823],3],[[77824,78894],2],[78895,2],[[78896,78904],3],[[78905,78911],3],[[78912,78933],2],[[78934,82943],3],[[82944,83526],2],[[83527,92159],3],[[92160,92728],2],[[92729,92735],3],[[92736,92766],2],[92767,3],[[92768,92777],2],[[92778,92781],3],[[92782,92783],2],[[92784,92862],2],[92863,3],[[92864,92873],2],[[92874,92879],3],[[92880,92909],2],[[92910,92911],3],[[92912,92916],2],[92917,2],[[92918,92927],3],[[92928,92982],2],[[92983,92991],2],[[92992,92995],2],[[92996,92997],2],[[92998,93007],3],[[93008,93017],2],[93018,3],[[93019,93025],2],[93026,3],[[93027,93047],2],[[93048,93052],3],[[93053,93071],2],[[93072,93759],3],[93760,1,"\uD81B\uDE60"],[93761,1,"\uD81B\uDE61"],[93762,1,"\uD81B\uDE62"],[93763,1,"\uD81B\uDE63"],[93764,1,"\uD81B\uDE64"],[93765,1,"\uD81B\uDE65"],[93766,1,"\uD81B\uDE66"],[93767,1,"\uD81B\uDE67"],[93768,1,"\uD81B\uDE68"],[93769,1,"\uD81B\uDE69"],[93770,1,"\uD81B\uDE6A"],[93771,1,"\uD81B\uDE6B"],[93772,1,"\uD81B\uDE6C"],[93773,1,"\uD81B\uDE6D"],[93774,1,"\uD81B\uDE6E"],[93775,1,"\uD81B\uDE6F"],[93776,1,"\uD81B\uDE70"],[93777,1,"\uD81B\uDE71"],[93778,1,"\uD81B\uDE72"],[93779,1,"\uD81B\uDE73"],[93780,1,"\uD81B\uDE74"],[93781,1,"\uD81B\uDE75"],[93782,1,"\uD81B\uDE76"],[93783,1,"\uD81B\uDE77"],[93784,1,"\uD81B\uDE78"],[93785,1,"\uD81B\uDE79"],[93786,1,"\uD81B\uDE7A"],[93787,1,"\uD81B\uDE7B"],[93788,1,"\uD81B\uDE7C"],[93789,1,"\uD81B\uDE7D"],[93790,1,"\uD81B\uDE7E"],[93791,1,"\uD81B\uDE7F"],[[93792,93823],2],[[93824,93850],2],[[93851,93951],3],[[93952,94020],2],[[94021,94026],2],[[94027,94030],3],[94031,2],[[94032,94078],2],[[94079,94087],2],[[94088,94094],3],[[94095,94111],2],[[94112,94175],3],[94176,2],[94177,2],[94178,2],[94179,2],[94180,2],[[94181,94191],3],[[94192,94193],2],[[94194,94207],3],[[94208,100332],2],[[100333,100337],2],[[100338,100343],2],[[100344,100351],3],[[100352,101106],2],[[101107,101589],2],[[101590,101631],3],[[101632,101640],2],[[101641,110575],3],[[110576,110579],2],[110580,3],[[110581,110587],2],[110588,3],[[110589,110590],2],[110591,3],[[110592,110593],2],[[110594,110878],2],[[110879,110882],2],[[110883,110897],3],[110898,2],[[110899,110927],3],[[110928,110930],2],[[110931,110932],3],[110933,2],[[110934,110947],3],[[110948,110951],2],[[110952,110959],3],[[110960,111355],2],[[111356,113663],3],[[113664,113770],2],[[113771,113775],3],[[113776,113788],2],[[113789,113791],3],[[113792,113800],2],[[113801,113807],3],[[113808,113817],2],[[113818,113819],3],[113820,2],[[113821,113822],2],[113823,2],[[113824,113827],7],[[113828,118527],3],[[118528,118573],2],[[118574,118575],3],[[118576,118598],2],[[118599,118607],3],[[118608,118723],2],[[118724,118783],3],[[118784,119029],2],[[119030,119039],3],[[119040,119078],2],[[119079,119080],3],[119081,2],[[119082,119133],2],[119134,1,"\uD834\uDD57\uD834\uDD65"],[119135,1,"\uD834\uDD58\uD834\uDD65"],[119136,1,"\uD834\uDD58\uD834\uDD65\uD834\uDD6E"],[119137,1,"\uD834\uDD58\uD834\uDD65\uD834\uDD6F"],[119138,1,"\uD834\uDD58\uD834\uDD65\uD834\uDD70"],[119139,1,"\uD834\uDD58\uD834\uDD65\uD834\uDD71"],[119140,1,"\uD834\uDD58\uD834\uDD65\uD834\uDD72"],[[119141,119154],2],[[119155,119162],3],[[119163,119226],2],[119227,1,"\uD834\uDDB9\uD834\uDD65"],[119228,1,"\uD834\uDDBA\uD834\uDD65"],[119229,1,"\uD834\uDDB9\uD834\uDD65\uD834\uDD6E"],[119230,1,"\uD834\uDDBA\uD834\uDD65\uD834\uDD6E"],[119231,1,"\uD834\uDDB9\uD834\uDD65\uD834\uDD6F"],[119232,1,"\uD834\uDDBA\uD834\uDD65\uD834\uDD6F"],[[119233,119261],2],[[119262,119272],2],[[119273,119274],2],[[119275,119295],3],[[119296,119365],2],[[119366,119487],3],[[119488,119507],2],[[119508,119519],3],[[119520,119539],2],[[119540,119551],3],[[119552,119638],2],[[119639,119647],3],[[119648,119665],2],[[119666,119672],2],[[119673,119807],3],[119808,1,"a"],[119809,1,"b"],[119810,1,"c"],[119811,1,"d"],[119812,1,"e"],[119813,1,"f"],[119814,1,"g"],[119815,1,"h"],[119816,1,"i"],[119817,1,"j"],[119818,1,"k"],[119819,1,"l"],[119820,1,"m"],[119821,1,"n"],[119822,1,"o"],[119823,1,"p"],[119824,1,"q"],[119825,1,"r"],[119826,1,"s"],[119827,1,"t"],[119828,1,"u"],[119829,1,"v"],[119830,1,"w"],[119831,1,"x"],[119832,1,"y"],[119833,1,"z"],[119834,1,"a"],[119835,1,"b"],[119836,1,"c"],[119837,1,"d"],[119838,1,"e"],[119839,1,"f"],[119840,1,"g"],[119841,1,"h"],[119842,1,"i"],[119843,1,"j"],[119844,1,"k"],[119845,1,"l"],[119846,1,"m"],[119847,1,"n"],[119848,1,"o"],[119849,1,"p"],[119850,1,"q"],[119851,1,"r"],[119852,1,"s"],[119853,1,"t"],[119854,1,"u"],[119855,1,"v"],[119856,1,"w"],[119857,1,"x"],[119858,1,"y"],[119859,1,"z"],[119860,1,"a"],[119861,1,"b"],[119862,1,"c"],[119863,1,"d"],[119864,1,"e"],[119865,1,"f"],[119866,1,"g"],[119867,1,"h"],[119868,1,"i"],[119869,1,"j"],[119870,1,"k"],[119871,1,"l"],[119872,1,"m"],[119873,1,"n"],[119874,1,"o"],[119875,1,"p"],[119876,1,"q"],[119877,1,"r"],[119878,1,"s"],[119879,1,"t"],[119880,1,"u"],[119881,1,"v"],[119882,1,"w"],[119883,1,"x"],[119884,1,"y"],[119885,1,"z"],[119886,1,"a"],[119887,1,"b"],[119888,1,"c"],[119889,1,"d"],[119890,1,"e"],[119891,1,"f"],[119892,1,"g"],[119893,3],[119894,1,"i"],[119895,1,"j"],[119896,1,"k"],[119897,1,"l"],[119898,1,"m"],[119899,1,"n"],[119900,1,"o"],[119901,1,"p"],[119902,1,"q"],[119903,1,"r"],[119904,1,"s"],[119905,1,"t"],[119906,1,"u"],[119907,1,"v"],[119908,1,"w"],[119909,1,"x"],[119910,1,"y"],[119911,1,"z"],[119912,1,"a"],[119913,1,"b"],[119914,1,"c"],[119915,1,"d"],[119916,1,"e"],[119917,1,"f"],[119918,1,"g"],[119919,1,"h"],[119920,1,"i"],[119921,1,"j"],[119922,1,"k"],[119923,1,"l"],[119924,1,"m"],[119925,1,"n"],[119926,1,"o"],[119927,1,"p"],[119928,1,"q"],[119929,1,"r"],[119930,1,"s"],[119931,1,"t"],[119932,1,"u"],[119933,1,"v"],[119934,1,"w"],[119935,1,"x"],[119936,1,"y"],[119937,1,"z"],[119938,1,"a"],[119939,1,"b"],[119940,1,"c"],[119941,1,"d"],[119942,1,"e"],[119943,1,"f"],[119944,1,"g"],[119945,1,"h"],[119946,1,"i"],[119947,1,"j"],[119948,1,"k"],[119949,1,"l"],[119950,1,"m"],[119951,1,"n"],[119952,1,"o"],[119953,1,"p"],[119954,1,"q"],[119955,1,"r"],[119956,1,"s"],[119957,1,"t"],[119958,1,"u"],[119959,1,"v"],[119960,1,"w"],[119961,1,"x"],[119962,1,"y"],[119963,1,"z"],[119964,1,"a"],[119965,3],[119966,1,"c"],[119967,1,"d"],[[119968,119969],3],[119970,1,"g"],[[119971,119972],3],[119973,1,"j"],[119974,1,"k"],[[119975,119976],3],[119977,1,"n"],[119978,1,"o"],[119979,1,"p"],[119980,1,"q"],[119981,3],[119982,1,"s"],[119983,1,"t"],[119984,1,"u"],[119985,1,"v"],[119986,1,"w"],[119987,1,"x"],[119988,1,"y"],[119989,1,"z"],[119990,1,"a"],[119991,1,"b"],[119992,1,"c"],[119993,1,"d"],[119994,3],[119995,1,"f"],[119996,3],[119997,1,"h"],[119998,1,"i"],[119999,1,"j"],[120000,1,"k"],[120001,1,"l"],[120002,1,"m"],[120003,1,"n"],[120004,3],[120005,1,"p"],[120006,1,"q"],[120007,1,"r"],[120008,1,"s"],[120009,1,"t"],[120010,1,"u"],[120011,1,"v"],[120012,1,"w"],[120013,1,"x"],[120014,1,"y"],[120015,1,"z"],[120016,1,"a"],[120017,1,"b"],[120018,1,"c"],[120019,1,"d"],[120020,1,"e"],[120021,1,"f"],[120022,1,"g"],[120023,1,"h"],[120024,1,"i"],[120025,1,"j"],[120026,1,"k"],[120027,1,"l"],[120028,1,"m"],[120029,1,"n"],[120030,1,"o"],[120031,1,"p"],[120032,1,"q"],[120033,1,"r"],[120034,1,"s"],[120035,1,"t"],[120036,1,"u"],[120037,1,"v"],[120038,1,"w"],[120039,1,"x"],[120040,1,"y"],[120041,1,"z"],[120042,1,"a"],[120043,1,"b"],[120044,1,"c"],[120045,1,"d"],[120046,1,"e"],[120047,1,"f"],[120048,1,"g"],[120049,1,"h"],[120050,1,"i"],[120051,1,"j"],[120052,1,"k"],[120053,1,"l"],[120054,1,"m"],[120055,1,"n"],[120056,1,"o"],[120057,1,"p"],[120058,1,"q"],[120059,1,"r"],[120060,1,"s"],[120061,1,"t"],[120062,1,"u"],[120063,1,"v"],[120064,1,"w"],[120065,1,"x"],[120066,1,"y"],[120067,1,"z"],[120068,1,"a"],[120069,1,"b"],[120070,3],[120071,1,"d"],[120072,1,"e"],[120073,1,"f"],[120074,1,"g"],[[120075,120076],3],[120077,1,"j"],[120078,1,"k"],[120079,1,"l"],[120080,1,"m"],[120081,1,"n"],[120082,1,"o"],[120083,1,"p"],[120084,1,"q"],[120085,3],[120086,1,"s"],[120087,1,"t"],[120088,1,"u"],[120089,1,"v"],[120090,1,"w"],[120091,1,"x"],[120092,1,"y"],[120093,3],[120094,1,"a"],[120095,1,"b"],[120096,1,"c"],[120097,1,"d"],[120098,1,"e"],[120099,1,"f"],[120100,1,"g"],[120101,1,"h"],[120102,1,"i"],[120103,1,"j"],[120104,1,"k"],[120105,1,"l"],[120106,1,"m"],[120107,1,"n"],[120108,1,"o"],[120109,1,"p"],[120110,1,"q"],[120111,1,"r"],[120112,1,"s"],[120113,1,"t"],[120114,1,"u"],[120115,1,"v"],[120116,1,"w"],[120117,1,"x"],[120118,1,"y"],[120119,1,"z"],[120120,1,"a"],[120121,1,"b"],[120122,3],[120123,1,"d"],[120124,1,"e"],[120125,1,"f"],[120126,1,"g"],[120127,3],[120128,1,"i"],[120129,1,"j"],[120130,1,"k"],[120131,1,"l"],[120132,1,"m"],[120133,3],[120134,1,"o"],[[120135,120137],3],[120138,1,"s"],[120139,1,"t"],[120140,1,"u"],[120141,1,"v"],[120142,1,"w"],[120143,1,"x"],[120144,1,"y"],[120145,3],[120146,1,"a"],[120147,1,"b"],[120148,1,"c"],[120149,1,"d"],[120150,1,"e"],[120151,1,"f"],[120152,1,"g"],[120153,1,"h"],[120154,1,"i"],[120155,1,"j"],[120156,1,"k"],[120157,1,"l"],[120158,1,"m"],[120159,1,"n"],[120160,1,"o"],[120161,1,"p"],[120162,1,"q"],[120163,1,"r"],[120164,1,"s"],[120165,1,"t"],[120166,1,"u"],[120167,1,"v"],[120168,1,"w"],[120169,1,"x"],[120170,1,"y"],[120171,1,"z"],[120172,1,"a"],[120173,1,"b"],[120174,1,"c"],[120175,1,"d"],[120176,1,"e"],[120177,1,"f"],[120178,1,"g"],[120179,1,"h"],[120180,1,"i"],[120181,1,"j"],[120182,1,"k"],[120183,1,"l"],[120184,1,"m"],[120185,1,"n"],[120186,1,"o"],[120187,1,"p"],[120188,1,"q"],[120189,1,"r"],[120190,1,"s"],[120191,1,"t"],[120192,1,"u"],[120193,1,"v"],[120194,1,"w"],[120195,1,"x"],[120196,1,"y"],[120197,1,"z"],[120198,1,"a"],[120199,1,"b"],[120200,1,"c"],[120201,1,"d"],[120202,1,"e"],[120203,1,"f"],[120204,1,"g"],[120205,1,"h"],[120206,1,"i"],[120207,1,"j"],[120208,1,"k"],[120209,1,"l"],[120210,1,"m"],[120211,1,"n"],[120212,1,"o"],[120213,1,"p"],[120214,1,"q"],[120215,1,"r"],[120216,1,"s"],[120217,1,"t"],[120218,1,"u"],[120219,1,"v"],[120220,1,"w"],[120221,1,"x"],[120222,1,"y"],[120223,1,"z"],[120224,1,"a"],[120225,1,"b"],[120226,1,"c"],[120227,1,"d"],[120228,1,"e"],[120229,1,"f"],[120230,1,"g"],[120231,1,"h"],[120232,1,"i"],[120233,1,"j"],[120234,1,"k"],[120235,1,"l"],[120236,1,"m"],[120237,1,"n"],[120238,1,"o"],[120239,1,"p"],[120240,1,"q"],[120241,1,"r"],[120242,1,"s"],[120243,1,"t"],[120244,1,"u"],[120245,1,"v"],[120246,1,"w"],[120247,1,"x"],[120248,1,"y"],[120249,1,"z"],[120250,1,"a"],[120251,1,"b"],[120252,1,"c"],[120253,1,"d"],[120254,1,"e"],[120255,1,"f"],[120256,1,"g"],[120257,1,"h"],[120258,1,"i"],[120259,1,"j"],[120260,1,"k"],[120261,1,"l"],[120262,1,"m"],[120263,1,"n"],[120264,1,"o"],[120265,1,"p"],[120266,1,"q"],[120267,1,"r"],[120268,1,"s"],[120269,1,"t"],[120270,1,"u"],[120271,1,"v"],[120272,1,"w"],[120273,1,"x"],[120274,1,"y"],[120275,1,"z"],[120276,1,"a"],[120277,1,"b"],[120278,1,"c"],[120279,1,"d"],[120280,1,"e"],[120281,1,"f"],[120282,1,"g"],[120283,1,"h"],[120284,1,"i"],[120285,1,"j"],[120286,1,"k"],[120287,1,"l"],[120288,1,"m"],[120289,1,"n"],[120290,1,"o"],[120291,1,"p"],[120292,1,"q"],[120293,1,"r"],[120294,1,"s"],[120295,1,"t"],[120296,1,"u"],[120297,1,"v"],[120298,1,"w"],[120299,1,"x"],[120300,1,"y"],[120301,1,"z"],[120302,1,"a"],[120303,1,"b"],[120304,1,"c"],[120305,1,"d"],[120306,1,"e"],[120307,1,"f"],[120308,1,"g"],[120309,1,"h"],[120310,1,"i"],[120311,1,"j"],[120312,1,"k"],[120313,1,"l"],[120314,1,"m"],[120315,1,"n"],[120316,1,"o"],[120317,1,"p"],[120318,1,"q"],[120319,1,"r"],[120320,1,"s"],[120321,1,"t"],[120322,1,"u"],[120323,1,"v"],[120324,1,"w"],[120325,1,"x"],[120326,1,"y"],[120327,1,"z"],[120328,1,"a"],[120329,1,"b"],[120330,1,"c"],[120331,1,"d"],[120332,1,"e"],[120333,1,"f"],[120334,1,"g"],[120335,1,"h"],[120336,1,"i"],[120337,1,"j"],[120338,1,"k"],[120339,1,"l"],[120340,1,"m"],[120341,1,"n"],[120342,1,"o"],[120343,1,"p"],[120344,1,"q"],[120345,1,"r"],[120346,1,"s"],[120347,1,"t"],[120348,1,"u"],[120349,1,"v"],[120350,1,"w"],[120351,1,"x"],[120352,1,"y"],[120353,1,"z"],[120354,1,"a"],[120355,1,"b"],[120356,1,"c"],[120357,1,"d"],[120358,1,"e"],[120359,1,"f"],[120360,1,"g"],[120361,1,"h"],[120362,1,"i"],[120363,1,"j"],[120364,1,"k"],[120365,1,"l"],[120366,1,"m"],[120367,1,"n"],[120368,1,"o"],[120369,1,"p"],[120370,1,"q"],[120371,1,"r"],[120372,1,"s"],[120373,1,"t"],[120374,1,"u"],[120375,1,"v"],[120376,1,"w"],[120377,1,"x"],[120378,1,"y"],[120379,1,"z"],[120380,1,"a"],[120381,1,"b"],[120382,1,"c"],[120383,1,"d"],[120384,1,"e"],[120385,1,"f"],[120386,1,"g"],[120387,1,"h"],[120388,1,"i"],[120389,1,"j"],[120390,1,"k"],[120391,1,"l"],[120392,1,"m"],[120393,1,"n"],[120394,1,"o"],[120395,1,"p"],[120396,1,"q"],[120397,1,"r"],[120398,1,"s"],[120399,1,"t"],[120400,1,"u"],[120401,1,"v"],[120402,1,"w"],[120403,1,"x"],[120404,1,"y"],[120405,1,"z"],[120406,1,"a"],[120407,1,"b"],[120408,1,"c"],[120409,1,"d"],[120410,1,"e"],[120411,1,"f"],[120412,1,"g"],[120413,1,"h"],[120414,1,"i"],[120415,1,"j"],[120416,1,"k"],[120417,1,"l"],[120418,1,"m"],[120419,1,"n"],[120420,1,"o"],[120421,1,"p"],[120422,1,"q"],[120423,1,"r"],[120424,1,"s"],[120425,1,"t"],[120426,1,"u"],[120427,1,"v"],[120428,1,"w"],[120429,1,"x"],[120430,1,"y"],[120431,1,"z"],[120432,1,"a"],[120433,1,"b"],[120434,1,"c"],[120435,1,"d"],[120436,1,"e"],[120437,1,"f"],[120438,1,"g"],[120439,1,"h"],[120440,1,"i"],[120441,1,"j"],[120442,1,"k"],[120443,1,"l"],[120444,1,"m"],[120445,1,"n"],[120446,1,"o"],[120447,1,"p"],[120448,1,"q"],[120449,1,"r"],[120450,1,"s"],[120451,1,"t"],[120452,1,"u"],[120453,1,"v"],[120454,1,"w"],[120455,1,"x"],[120456,1,"y"],[120457,1,"z"],[120458,1,"a"],[120459,1,"b"],[120460,1,"c"],[120461,1,"d"],[120462,1,"e"],[120463,1,"f"],[120464,1,"g"],[120465,1,"h"],[120466,1,"i"],[120467,1,"j"],[120468,1,"k"],[120469,1,"l"],[120470,1,"m"],[120471,1,"n"],[120472,1,"o"],[120473,1,"p"],[120474,1,"q"],[120475,1,"r"],[120476,1,"s"],[120477,1,"t"],[120478,1,"u"],[120479,1,"v"],[120480,1,"w"],[120481,1,"x"],[120482,1,"y"],[120483,1,"z"],[120484,1,"\u0131"],[120485,1,"\u0237"],[[120486,120487],3],[120488,1,"\u03B1"],[120489,1,"\u03B2"],[120490,1,"\u03B3"],[120491,1,"\u03B4"],[120492,1,"\u03B5"],[120493,1,"\u03B6"],[120494,1,"\u03B7"],[120495,1,"\u03B8"],[120496,1,"\u03B9"],[120497,1,"\u03BA"],[120498,1,"\u03BB"],[120499,1,"\u03BC"],[120500,1,"\u03BD"],[120501,1,"\u03BE"],[120502,1,"\u03BF"],[120503,1,"\u03C0"],[120504,1,"\u03C1"],[120505,1,"\u03B8"],[120506,1,"\u03C3"],[120507,1,"\u03C4"],[120508,1,"\u03C5"],[120509,1,"\u03C6"],[120510,1,"\u03C7"],[120511,1,"\u03C8"],[120512,1,"\u03C9"],[120513,1,"\u2207"],[120514,1,"\u03B1"],[120515,1,"\u03B2"],[120516,1,"\u03B3"],[120517,1,"\u03B4"],[120518,1,"\u03B5"],[120519,1,"\u03B6"],[120520,1,"\u03B7"],[120521,1,"\u03B8"],[120522,1,"\u03B9"],[120523,1,"\u03BA"],[120524,1,"\u03BB"],[120525,1,"\u03BC"],[120526,1,"\u03BD"],[120527,1,"\u03BE"],[120528,1,"\u03BF"],[120529,1,"\u03C0"],[120530,1,"\u03C1"],[[120531,120532],1,"\u03C3"],[120533,1,"\u03C4"],[120534,1,"\u03C5"],[120535,1,"\u03C6"],[120536,1,"\u03C7"],[120537,1,"\u03C8"],[120538,1,"\u03C9"],[120539,1,"\u2202"],[120540,1,"\u03B5"],[120541,1,"\u03B8"],[120542,1,"\u03BA"],[120543,1,"\u03C6"],[120544,1,"\u03C1"],[120545,1,"\u03C0"],[120546,1,"\u03B1"],[120547,1,"\u03B2"],[120548,1,"\u03B3"],[120549,1,"\u03B4"],[120550,1,"\u03B5"],[120551,1,"\u03B6"],[120552,1,"\u03B7"],[120553,1,"\u03B8"],[120554,1,"\u03B9"],[120555,1,"\u03BA"],[120556,1,"\u03BB"],[120557,1,"\u03BC"],[120558,1,"\u03BD"],[120559,1,"\u03BE"],[120560,1,"\u03BF"],[120561,1,"\u03C0"],[120562,1,"\u03C1"],[120563,1,"\u03B8"],[120564,1,"\u03C3"],[120565,1,"\u03C4"],[120566,1,"\u03C5"],[120567,1,"\u03C6"],[120568,1,"\u03C7"],[120569,1,"\u03C8"],[120570,1,"\u03C9"],[120571,1,"\u2207"],[120572,1,"\u03B1"],[120573,1,"\u03B2"],[120574,1,"\u03B3"],[120575,1,"\u03B4"],[120576,1,"\u03B5"],[120577,1,"\u03B6"],[120578,1,"\u03B7"],[120579,1,"\u03B8"],[120580,1,"\u03B9"],[120581,1,"\u03BA"],[120582,1,"\u03BB"],[120583,1,"\u03BC"],[120584,1,"\u03BD"],[120585,1,"\u03BE"],[120586,1,"\u03BF"],[120587,1,"\u03C0"],[120588,1,"\u03C1"],[[120589,120590],1,"\u03C3"],[120591,1,"\u03C4"],[120592,1,"\u03C5"],[120593,1,"\u03C6"],[120594,1,"\u03C7"],[120595,1,"\u03C8"],[120596,1,"\u03C9"],[120597,1,"\u2202"],[120598,1,"\u03B5"],[120599,1,"\u03B8"],[120600,1,"\u03BA"],[120601,1,"\u03C6"],[120602,1,"\u03C1"],[120603,1,"\u03C0"],[120604,1,"\u03B1"],[120605,1,"\u03B2"],[120606,1,"\u03B3"],[120607,1,"\u03B4"],[120608,1,"\u03B5"],[120609,1,"\u03B6"],[120610,1,"\u03B7"],[120611,1,"\u03B8"],[120612,1,"\u03B9"],[120613,1,"\u03BA"],[120614,1,"\u03BB"],[120615,1,"\u03BC"],[120616,1,"\u03BD"],[120617,1,"\u03BE"],[120618,1,"\u03BF"],[120619,1,"\u03C0"],[120620,1,"\u03C1"],[120621,1,"\u03B8"],[120622,1,"\u03C3"],[120623,1,"\u03C4"],[120624,1,"\u03C5"],[120625,1,"\u03C6"],[120626,1,"\u03C7"],[120627,1,"\u03C8"],[120628,1,"\u03C9"],[120629,1,"\u2207"],[120630,1,"\u03B1"],[120631,1,"\u03B2"],[120632,1,"\u03B3"],[120633,1,"\u03B4"],[120634,1,"\u03B5"],[120635,1,"\u03B6"],[120636,1,"\u03B7"],[120637,1,"\u03B8"],[120638,1,"\u03B9"],[120639,1,"\u03BA"],[120640,1,"\u03BB"],[120641,1,"\u03BC"],[120642,1,"\u03BD"],[120643,1,"\u03BE"],[120644,1,"\u03BF"],[120645,1,"\u03C0"],[120646,1,"\u03C1"],[[120647,120648],1,"\u03C3"],[120649,1,"\u03C4"],[120650,1,"\u03C5"],[120651,1,"\u03C6"],[120652,1,"\u03C7"],[120653,1,"\u03C8"],[120654,1,"\u03C9"],[120655,1,"\u2202"],[120656,1,"\u03B5"],[120657,1,"\u03B8"],[120658,1,"\u03BA"],[120659,1,"\u03C6"],[120660,1,"\u03C1"],[120661,1,"\u03C0"],[120662,1,"\u03B1"],[120663,1,"\u03B2"],[120664,1,"\u03B3"],[120665,1,"\u03B4"],[120666,1,"\u03B5"],[120667,1,"\u03B6"],[120668,1,"\u03B7"],[120669,1,"\u03B8"],[120670,1,"\u03B9"],[120671,1,"\u03BA"],[120672,1,"\u03BB"],[120673,1,"\u03BC"],[120674,1,"\u03BD"],[120675,1,"\u03BE"],[120676,1,"\u03BF"],[120677,1,"\u03C0"],[120678,1,"\u03C1"],[120679,1,"\u03B8"],[120680,1,"\u03C3"],[120681,1,"\u03C4"],[120682,1,"\u03C5"],[120683,1,"\u03C6"],[120684,1,"\u03C7"],[120685,1,"\u03C8"],[120686,1,"\u03C9"],[120687,1,"\u2207"],[120688,1,"\u03B1"],[120689,1,"\u03B2"],[120690,1,"\u03B3"],[120691,1,"\u03B4"],[120692,1,"\u03B5"],[120693,1,"\u03B6"],[120694,1,"\u03B7"],[120695,1,"\u03B8"],[120696,1,"\u03B9"],[120697,1,"\u03BA"],[120698,1,"\u03BB"],[120699,1,"\u03BC"],[120700,1,"\u03BD"],[120701,1,"\u03BE"],[120702,1,"\u03BF"],[120703,1,"\u03C0"],[120704,1,"\u03C1"],[[120705,120706],1,"\u03C3"],[120707,1,"\u03C4"],[120708,1,"\u03C5"],[120709,1,"\u03C6"],[120710,1,"\u03C7"],[120711,1,"\u03C8"],[120712,1,"\u03C9"],[120713,1,"\u2202"],[120714,1,"\u03B5"],[120715,1,"\u03B8"],[120716,1,"\u03BA"],[120717,1,"\u03C6"],[120718,1,"\u03C1"],[120719,1,"\u03C0"],[120720,1,"\u03B1"],[120721,1,"\u03B2"],[120722,1,"\u03B3"],[120723,1,"\u03B4"],[120724,1,"\u03B5"],[120725,1,"\u03B6"],[120726,1,"\u03B7"],[120727,1,"\u03B8"],[120728,1,"\u03B9"],[120729,1,"\u03BA"],[120730,1,"\u03BB"],[120731,1,"\u03BC"],[120732,1,"\u03BD"],[120733,1,"\u03BE"],[120734,1,"\u03BF"],[120735,1,"\u03C0"],[120736,1,"\u03C1"],[120737,1,"\u03B8"],[120738,1,"\u03C3"],[120739,1,"\u03C4"],[120740,1,"\u03C5"],[120741,1,"\u03C6"],[120742,1,"\u03C7"],[120743,1,"\u03C8"],[120744,1,"\u03C9"],[120745,1,"\u2207"],[120746,1,"\u03B1"],[120747,1,"\u03B2"],[120748,1,"\u03B3"],[120749,1,"\u03B4"],[120750,1,"\u03B5"],[120751,1,"\u03B6"],[120752,1,"\u03B7"],[120753,1,"\u03B8"],[120754,1,"\u03B9"],[120755,1,"\u03BA"],[120756,1,"\u03BB"],[120757,1,"\u03BC"],[120758,1,"\u03BD"],[120759,1,"\u03BE"],[120760,1,"\u03BF"],[120761,1,"\u03C0"],[120762,1,"\u03C1"],[[120763,120764],1,"\u03C3"],[120765,1,"\u03C4"],[120766,1,"\u03C5"],[120767,1,"\u03C6"],[120768,1,"\u03C7"],[120769,1,"\u03C8"],[120770,1,"\u03C9"],[120771,1,"\u2202"],[120772,1,"\u03B5"],[120773,1,"\u03B8"],[120774,1,"\u03BA"],[120775,1,"\u03C6"],[120776,1,"\u03C1"],[120777,1,"\u03C0"],[[120778,120779],1,"\u03DD"],[[120780,120781],3],[120782,1,"0"],[120783,1,"1"],[120784,1,"2"],[120785,1,"3"],[120786,1,"4"],[120787,1,"5"],[120788,1,"6"],[120789,1,"7"],[120790,1,"8"],[120791,1,"9"],[120792,1,"0"],[120793,1,"1"],[120794,1,"2"],[120795,1,"3"],[120796,1,"4"],[120797,1,"5"],[120798,1,"6"],[120799,1,"7"],[120800,1,"8"],[120801,1,"9"],[120802,1,"0"],[120803,1,"1"],[120804,1,"2"],[120805,1,"3"],[120806,1,"4"],[120807,1,"5"],[120808,1,"6"],[120809,1,"7"],[120810,1,"8"],[120811,1,"9"],[120812,1,"0"],[120813,1,"1"],[120814,1,"2"],[120815,1,"3"],[120816,1,"4"],[120817,1,"5"],[120818,1,"6"],[120819,1,"7"],[120820,1,"8"],[120821,1,"9"],[120822,1,"0"],[120823,1,"1"],[120824,1,"2"],[120825,1,"3"],[120826,1,"4"],[120827,1,"5"],[120828,1,"6"],[120829,1,"7"],[120830,1,"8"],[120831,1,"9"],[[120832,121343],2],[[121344,121398],2],[[121399,121402],2],[[121403,121452],2],[[121453,121460],2],[121461,2],[[121462,121475],2],[121476,2],[[121477,121483],2],[[121484,121498],3],[[121499,121503],2],[121504,3],[[121505,121519],2],[[121520,122623],3],[[122624,122654],2],[[122655,122660],3],[[122661,122666],2],[[122667,122879],3],[[122880,122886],2],[122887,3],[[122888,122904],2],[[122905,122906],3],[[122907,122913],2],[122914,3],[[122915,122916],2],[122917,3],[[122918,122922],2],[[122923,122927],3],[122928,1,"\u0430"],[122929,1,"\u0431"],[122930,1,"\u0432"],[122931,1,"\u0433"],[122932,1,"\u0434"],[122933,1,"\u0435"],[122934,1,"\u0436"],[122935,1,"\u0437"],[122936,1,"\u0438"],[122937,1,"\u043A"],[122938,1,"\u043B"],[122939,1,"\u043C"],[122940,1,"\u043E"],[122941,1,"\u043F"],[122942,1,"\u0440"],[122943,1,"\u0441"],[122944,1,"\u0442"],[122945,1,"\u0443"],[122946,1,"\u0444"],[122947,1,"\u0445"],[122948,1,"\u0446"],[122949,1,"\u0447"],[122950,1,"\u0448"],[122951,1,"\u044B"],[122952,1,"\u044D"],[122953,1,"\u044E"],[122954,1,"\uA689"],[122955,1,"\u04D9"],[122956,1,"\u0456"],[122957,1,"\u0458"],[122958,1,"\u04E9"],[122959,1,"\u04AF"],[122960,1,"\u04CF"],[122961,1,"\u0430"],[122962,1,"\u0431"],[122963,1,"\u0432"],[122964,1,"\u0433"],[122965,1,"\u0434"],[122966,1,"\u0435"],[122967,1,"\u0436"],[122968,1,"\u0437"],[122969,1,"\u0438"],[122970,1,"\u043A"],[122971,1,"\u043B"],[122972,1,"\u043E"],[122973,1,"\u043F"],[122974,1,"\u0441"],[122975,1,"\u0443"],[122976,1,"\u0444"],[122977,1,"\u0445"],[122978,1,"\u0446"],[122979,1,"\u0447"],[122980,1,"\u0448"],[122981,1,"\u044A"],[122982,1,"\u044B"],[122983,1,"\u0491"],[122984,1,"\u0456"],[122985,1,"\u0455"],[122986,1,"\u045F"],[122987,1,"\u04AB"],[122988,1,"\uA651"],[122989,1,"\u04B1"],[[122990,123022],3],[123023,2],[[123024,123135],3],[[123136,123180],2],[[123181,123183],3],[[123184,123197],2],[[123198,123199],3],[[123200,123209],2],[[123210,123213],3],[123214,2],[123215,2],[[123216,123535],3],[[123536,123566],2],[[123567,123583],3],[[123584,123641],2],[[123642,123646],3],[123647,2],[[123648,124111],3],[[124112,124153],2],[[124154,124895],3],[[124896,124902],2],[124903,3],[[124904,124907],2],[124908,3],[[124909,124910],2],[124911,3],[[124912,124926],2],[124927,3],[[124928,125124],2],[[125125,125126],3],[[125127,125135],2],[[125136,125142],2],[[125143,125183],3],[125184,1,"\uD83A\uDD22"],[125185,1,"\uD83A\uDD23"],[125186,1,"\uD83A\uDD24"],[125187,1,"\uD83A\uDD25"],[125188,1,"\uD83A\uDD26"],[125189,1,"\uD83A\uDD27"],[125190,1,"\uD83A\uDD28"],[125191,1,"\uD83A\uDD29"],[125192,1,"\uD83A\uDD2A"],[125193,1,"\uD83A\uDD2B"],[125194,1,"\uD83A\uDD2C"],[125195,1,"\uD83A\uDD2D"],[125196,1,"\uD83A\uDD2E"],[125197,1,"\uD83A\uDD2F"],[125198,1,"\uD83A\uDD30"],[125199,1,"\uD83A\uDD31"],[125200,1,"\uD83A\uDD32"],[125201,1,"\uD83A\uDD33"],[125202,1,"\uD83A\uDD34"],[125203,1,"\uD83A\uDD35"],[125204,1,"\uD83A\uDD36"],[125205,1,"\uD83A\uDD37"],[125206,1,"\uD83A\uDD38"],[125207,1,"\uD83A\uDD39"],[125208,1,"\uD83A\uDD3A"],[125209,1,"\uD83A\uDD3B"],[125210,1,"\uD83A\uDD3C"],[125211,1,"\uD83A\uDD3D"],[125212,1,"\uD83A\uDD3E"],[125213,1,"\uD83A\uDD3F"],[125214,1,"\uD83A\uDD40"],[125215,1,"\uD83A\uDD41"],[125216,1,"\uD83A\uDD42"],[125217,1,"\uD83A\uDD43"],[[125218,125258],2],[125259,2],[[125260,125263],3],[[125264,125273],2],[[125274,125277],3],[[125278,125279],2],[[125280,126064],3],[[126065,126132],2],[[126133,126208],3],[[126209,126269],2],[[126270,126463],3],[126464,1,"\u0627"],[126465,1,"\u0628"],[126466,1,"\u062C"],[126467,1,"\u062F"],[126468,3],[126469,1,"\u0648"],[126470,1,"\u0632"],[126471,1,"\u062D"],[126472,1,"\u0637"],[126473,1,"\u064A"],[126474,1,"\u0643"],[126475,1,"\u0644"],[126476,1,"\u0645"],[126477,1,"\u0646"],[126478,1,"\u0633"],[126479,1,"\u0639"],[126480,1,"\u0641"],[126481,1,"\u0635"],[126482,1,"\u0642"],[126483,1,"\u0631"],[126484,1,"\u0634"],[126485,1,"\u062A"],[126486,1,"\u062B"],[126487,1,"\u062E"],[126488,1,"\u0630"],[126489,1,"\u0636"],[126490,1,"\u0638"],[126491,1,"\u063A"],[126492,1,"\u066E"],[126493,1,"\u06BA"],[126494,1,"\u06A1"],[126495,1,"\u066F"],[126496,3],[126497,1,"\u0628"],[126498,1,"\u062C"],[126499,3],[126500,1,"\u0647"],[[126501,126502],3],[126503,1,"\u062D"],[126504,3],[126505,1,"\u064A"],[126506,1,"\u0643"],[126507,1,"\u0644"],[126508,1,"\u0645"],[126509,1,"\u0646"],[126510,1,"\u0633"],[126511,1,"\u0639"],[126512,1,"\u0641"],[126513,1,"\u0635"],[126514,1,"\u0642"],[126515,3],[126516,1,"\u0634"],[126517,1,"\u062A"],[126518,1,"\u062B"],[126519,1,"\u062E"],[126520,3],[126521,1,"\u0636"],[126522,3],[126523,1,"\u063A"],[[126524,126529],3],[126530,1,"\u062C"],[[126531,126534],3],[126535,1,"\u062D"],[126536,3],[126537,1,"\u064A"],[126538,3],[126539,1,"\u0644"],[126540,3],[126541,1,"\u0646"],[126542,1,"\u0633"],[126543,1,"\u0639"],[126544,3],[126545,1,"\u0635"],[126546,1,"\u0642"],[126547,3],[126548,1,"\u0634"],[[126549,126550],3],[126551,1,"\u062E"],[126552,3],[126553,1,"\u0636"],[126554,3],[126555,1,"\u063A"],[126556,3],[126557,1,"\u06BA"],[126558,3],[126559,1,"\u066F"],[126560,3],[126561,1,"\u0628"],[126562,1,"\u062C"],[126563,3],[126564,1,"\u0647"],[[126565,126566],3],[126567,1,"\u062D"],[126568,1,"\u0637"],[126569,1,"\u064A"],[126570,1,"\u0643"],[126571,3],[126572,1,"\u0645"],[126573,1,"\u0646"],[126574,1,"\u0633"],[126575,1,"\u0639"],[126576,1,"\u0641"],[126577,1,"\u0635"],[126578,1,"\u0642"],[126579,3],[126580,1,"\u0634"],[126581,1,"\u062A"],[126582,1,"\u062B"],[126583,1,"\u062E"],[126584,3],[126585,1,"\u0636"],[126586,1,"\u0638"],[126587,1,"\u063A"],[126588,1,"\u066E"],[126589,3],[126590,1,"\u06A1"],[126591,3],[126592,1,"\u0627"],[126593,1,"\u0628"],[126594,1,"\u062C"],[126595,1,"\u062F"],[126596,1,"\u0647"],[126597,1,"\u0648"],[126598,1,"\u0632"],[126599,1,"\u062D"],[126600,1,"\u0637"],[126601,1,"\u064A"],[126602,3],[126603,1,"\u0644"],[126604,1,"\u0645"],[126605,1,"\u0646"],[126606,1,"\u0633"],[126607,1,"\u0639"],[126608,1,"\u0641"],[126609,1,"\u0635"],[126610,1,"\u0642"],[126611,1,"\u0631"],[126612,1,"\u0634"],[126613,1,"\u062A"],[126614,1,"\u062B"],[126615,1,"\u062E"],[126616,1,"\u0630"],[126617,1,"\u0636"],[126618,1,"\u0638"],[126619,1,"\u063A"],[[126620,126624],3],[126625,1,"\u0628"],[126626,1,"\u062C"],[126627,1,"\u062F"],[126628,3],[126629,1,"\u0648"],[126630,1,"\u0632"],[126631,1,"\u062D"],[126632,1,"\u0637"],[126633,1,"\u064A"],[126634,3],[126635,1,"\u0644"],[126636,1,"\u0645"],[126637,1,"\u0646"],[126638,1,"\u0633"],[126639,1,"\u0639"],[126640,1,"\u0641"],[126641,1,"\u0635"],[126642,1,"\u0642"],[126643,1,"\u0631"],[126644,1,"\u0634"],[126645,1,"\u062A"],[126646,1,"\u062B"],[126647,1,"\u062E"],[126648,1,"\u0630"],[126649,1,"\u0636"],[126650,1,"\u0638"],[126651,1,"\u063A"],[[126652,126703],3],[[126704,126705],2],[[126706,126975],3],[[126976,127019],2],[[127020,127023],3],[[127024,127123],2],[[127124,127135],3],[[127136,127150],2],[[127151,127152],3],[[127153,127166],2],[127167,2],[127168,3],[[127169,127183],2],[127184,3],[[127185,127199],2],[[127200,127221],2],[[127222,127231],3],[127232,3],[127233,5,"0,"],[127234,5,"1,"],[127235,5,"2,"],[127236,5,"3,"],[127237,5,"4,"],[127238,5,"5,"],[127239,5,"6,"],[127240,5,"7,"],[127241,5,"8,"],[127242,5,"9,"],[[127243,127244],2],[[127245,127247],2],[127248,5,"(a)"],[127249,5,"(b)"],[127250,5,"(c)"],[127251,5,"(d)"],[127252,5,"(e)"],[127253,5,"(f)"],[127254,5,"(g)"],[127255,5,"(h)"],[127256,5,"(i)"],[127257,5,"(j)"],[127258,5,"(k)"],[127259,5,"(l)"],[127260,5,"(m)"],[127261,5,"(n)"],[127262,5,"(o)"],[127263,5,"(p)"],[127264,5,"(q)"],[127265,5,"(r)"],[127266,5,"(s)"],[127267,5,"(t)"],[127268,5,"(u)"],[127269,5,"(v)"],[127270,5,"(w)"],[127271,5,"(x)"],[127272,5,"(y)"],[127273,5,"(z)"],[127274,1,"\u3014s\u3015"],[127275,1,"c"],[127276,1,"r"],[127277,1,"cd"],[127278,1,"wz"],[127279,2],[127280,1,"a"],[127281,1,"b"],[127282,1,"c"],[127283,1,"d"],[127284,1,"e"],[127285,1,"f"],[127286,1,"g"],[127287,1,"h"],[127288,1,"i"],[127289,1,"j"],[127290,1,"k"],[127291,1,"l"],[127292,1,"m"],[127293,1,"n"],[127294,1,"o"],[127295,1,"p"],[127296,1,"q"],[127297,1,"r"],[127298,1,"s"],[127299,1,"t"],[127300,1,"u"],[127301,1,"v"],[127302,1,"w"],[127303,1,"x"],[127304,1,"y"],[127305,1,"z"],[127306,1,"hv"],[127307,1,"mv"],[127308,1,"sd"],[127309,1,"ss"],[127310,1,"ppv"],[127311,1,"wc"],[[127312,127318],2],[127319,2],[[127320,127326],2],[127327,2],[[127328,127337],2],[127338,1,"mc"],[127339,1,"md"],[127340,1,"mr"],[[127341,127343],2],[[127344,127352],2],[127353,2],[127354,2],[[127355,127356],2],[[127357,127358],2],[127359,2],[[127360,127369],2],[[127370,127373],2],[[127374,127375],2],[127376,1,"dj"],[[127377,127386],2],[[127387,127404],2],[127405,2],[[127406,127461],3],[[127462,127487],2],[127488,1,"\u307B\u304B"],[127489,1,"\u30B3\u30B3"],[127490,1,"\u30B5"],[[127491,127503],3],[127504,1,"\u624B"],[127505,1,"\u5B57"],[127506,1,"\u53CC"],[127507,1,"\u30C7"],[127508,1,"\u4E8C"],[127509,1,"\u591A"],[127510,1,"\u89E3"],[127511,1,"\u5929"],[127512,1,"\u4EA4"],[127513,1,"\u6620"],[127514,1,"\u7121"],[127515,1,"\u6599"],[127516,1,"\u524D"],[127517,1,"\u5F8C"],[127518,1,"\u518D"],[127519,1,"\u65B0"],[127520,1,"\u521D"],[127521,1,"\u7D42"],[127522,1,"\u751F"],[127523,1,"\u8CA9"],[127524,1,"\u58F0"],[127525,1,"\u5439"],[127526,1,"\u6F14"],[127527,1,"\u6295"],[127528,1,"\u6355"],[127529,1,"\u4E00"],[127530,1,"\u4E09"],[127531,1,"\u904A"],[127532,1,"\u5DE6"],[127533,1,"\u4E2D"],[127534,1,"\u53F3"],[127535,1,"\u6307"],[127536,1,"\u8D70"],[127537,1,"\u6253"],[127538,1,"\u7981"],[127539,1,"\u7A7A"],[127540,1,"\u5408"],[127541,1,"\u6E80"],[127542,1,"\u6709"],[127543,1,"\u6708"],[127544,1,"\u7533"],[127545,1,"\u5272"],[127546,1,"\u55B6"],[127547,1,"\u914D"],[[127548,127551],3],[127552,1,"\u3014\u672C\u3015"],[127553,1,"\u3014\u4E09\u3015"],[127554,1,"\u3014\u4E8C\u3015"],[127555,1,"\u3014\u5B89\u3015"],[127556,1,"\u3014\u70B9\u3015"],[127557,1,"\u3014\u6253\u3015"],[127558,1,"\u3014\u76D7\u3015"],[127559,1,"\u3014\u52DD\u3015"],[127560,1,"\u3014\u6557\u3015"],[[127561,127567],3],[127568,1,"\u5F97"],[127569,1,"\u53EF"],[[127570,127583],3],[[127584,127589],2],[[127590,127743],3],[[127744,127776],2],[[127777,127788],2],[[127789,127791],2],[[127792,127797],2],[127798,2],[[127799,127868],2],[127869,2],[[127870,127871],2],[[127872,127891],2],[[127892,127903],2],[[127904,127940],2],[127941,2],[[127942,127946],2],[[127947,127950],2],[[127951,127955],2],[[127956,127967],2],[[127968,127984],2],[[127985,127991],2],[[127992,127999],2],[[128000,128062],2],[128063,2],[128064,2],[128065,2],[[128066,128247],2],[128248,2],[[128249,128252],2],[[128253,128254],2],[128255,2],[[128256,128317],2],[[128318,128319],2],[[128320,128323],2],[[128324,128330],2],[[128331,128335],2],[[128336,128359],2],[[128360,128377],2],[128378,2],[[128379,128419],2],[128420,2],[[128421,128506],2],[[128507,128511],2],[128512,2],[[128513,128528],2],[128529,2],[[128530,128532],2],[128533,2],[128534,2],[128535,2],[128536,2],[128537,2],[128538,2],[128539,2],[[128540,128542],2],[128543,2],[[128544,128549],2],[[128550,128551],2],[[128552,128555],2],[128556,2],[128557,2],[[128558,128559],2],[[128560,128563],2],[128564,2],[[128565,128576],2],[[128577,128578],2],[[128579,128580],2],[[128581,128591],2],[[128592,128639],2],[[128640,128709],2],[[128710,128719],2],[128720,2],[[128721,128722],2],[[128723,128724],2],[128725,2],[[128726,128727],2],[[128728,128731],3],[128732,2],[[128733,128735],2],[[128736,128748],2],[[128749,128751],3],[[128752,128755],2],[[128756,128758],2],[[128759,128760],2],[128761,2],[128762,2],[[128763,128764],2],[[128765,128767],3],[[128768,128883],2],[[128884,128886],2],[[128887,128890],3],[[128891,128895],2],[[128896,128980],2],[[128981,128984],2],[128985,2],[[128986,128991],3],[[128992,129003],2],[[129004,129007],3],[129008,2],[[129009,129023],3],[[129024,129035],2],[[129036,129039],3],[[129040,129095],2],[[129096,129103],3],[[129104,129113],2],[[129114,129119],3],[[129120,129159],2],[[129160,129167],3],[[129168,129197],2],[[129198,129199],3],[[129200,129201],2],[[129202,129279],3],[[129280,129291],2],[129292,2],[[129293,129295],2],[[129296,129304],2],[[129305,129310],2],[129311,2],[[129312,129319],2],[[129320,129327],2],[129328,2],[[129329,129330],2],[[129331,129342],2],[129343,2],[[129344,129355],2],[129356,2],[[129357,129359],2],[[129360,129374],2],[[129375,129387],2],[[129388,129392],2],[129393,2],[129394,2],[[129395,129398],2],[[129399,129400],2],[129401,2],[129402,2],[129403,2],[[129404,129407],2],[[129408,129412],2],[[129413,129425],2],[[129426,129431],2],[[129432,129442],2],[[129443,129444],2],[[129445,129450],2],[[129451,129453],2],[[129454,129455],2],[[129456,129465],2],[[129466,129471],2],[129472,2],[[129473,129474],2],[[129475,129482],2],[129483,2],[129484,2],[[129485,129487],2],[[129488,129510],2],[[129511,129535],2],[[129536,129619],2],[[129620,129631],3],[[129632,129645],2],[[129646,129647],3],[[129648,129651],2],[129652,2],[[129653,129655],2],[[129656,129658],2],[[129659,129660],2],[[129661,129663],3],[[129664,129666],2],[[129667,129670],2],[[129671,129672],2],[[129673,129679],3],[[129680,129685],2],[[129686,129704],2],[[129705,129708],2],[[129709,129711],2],[[129712,129718],2],[[129719,129722],2],[[129723,129725],2],[129726,3],[129727,2],[[129728,129730],2],[[129731,129733],2],[[129734,129741],3],[[129742,129743],2],[[129744,129750],2],[[129751,129753],2],[[129754,129755],2],[[129756,129759],3],[[129760,129767],2],[129768,2],[[129769,129775],3],[[129776,129782],2],[[129783,129784],2],[[129785,129791],3],[[129792,129938],2],[129939,3],[[129940,129994],2],[[129995,130031],3],[130032,1,"0"],[130033,1,"1"],[130034,1,"2"],[130035,1,"3"],[130036,1,"4"],[130037,1,"5"],[130038,1,"6"],[130039,1,"7"],[130040,1,"8"],[130041,1,"9"],[[130042,131069],3],[[131070,131071],3],[[131072,173782],2],[[173783,173789],2],[[173790,173791],2],[[173792,173823],3],[[173824,177972],2],[[177973,177976],2],[177977,2],[[177978,177983],3],[[177984,178205],2],[[178206,178207],3],[[178208,183969],2],[[183970,183983],3],[[183984,191456],2],[[191457,194559],3],[194560,1,"\u4E3D"],[194561,1,"\u4E38"],[194562,1,"\u4E41"],[194563,1,"\uD840\uDD22"],[194564,1,"\u4F60"],[194565,1,"\u4FAE"],[194566,1,"\u4FBB"],[194567,1,"\u5002"],[194568,1,"\u507A"],[194569,1,"\u5099"],[194570,1,"\u50E7"],[194571,1,"\u50CF"],[194572,1,"\u349E"],[194573,1,"\uD841\uDE3A"],[194574,1,"\u514D"],[194575,1,"\u5154"],[194576,1,"\u5164"],[194577,1,"\u5177"],[194578,1,"\uD841\uDD1C"],[194579,1,"\u34B9"],[194580,1,"\u5167"],[194581,1,"\u518D"],[194582,1,"\uD841\uDD4B"],[194583,1,"\u5197"],[194584,1,"\u51A4"],[194585,1,"\u4ECC"],[194586,1,"\u51AC"],[194587,1,"\u51B5"],[194588,1,"\uD864\uDDDF"],[194589,1,"\u51F5"],[194590,1,"\u5203"],[194591,1,"\u34DF"],[194592,1,"\u523B"],[194593,1,"\u5246"],[194594,1,"\u5272"],[194595,1,"\u5277"],[194596,1,"\u3515"],[194597,1,"\u52C7"],[194598,1,"\u52C9"],[194599,1,"\u52E4"],[194600,1,"\u52FA"],[194601,1,"\u5305"],[194602,1,"\u5306"],[194603,1,"\u5317"],[194604,1,"\u5349"],[194605,1,"\u5351"],[194606,1,"\u535A"],[194607,1,"\u5373"],[194608,1,"\u537D"],[[194609,194611],1,"\u537F"],[194612,1,"\uD842\uDE2C"],[194613,1,"\u7070"],[194614,1,"\u53CA"],[194615,1,"\u53DF"],[194616,1,"\uD842\uDF63"],[194617,1,"\u53EB"],[194618,1,"\u53F1"],[194619,1,"\u5406"],[194620,1,"\u549E"],[194621,1,"\u5438"],[194622,1,"\u5448"],[194623,1,"\u5468"],[194624,1,"\u54A2"],[194625,1,"\u54F6"],[194626,1,"\u5510"],[194627,1,"\u5553"],[194628,1,"\u5563"],[[194629,194630],1,"\u5584"],[194631,1,"\u5599"],[194632,1,"\u55AB"],[194633,1,"\u55B3"],[194634,1,"\u55C2"],[194635,1,"\u5716"],[194636,1,"\u5606"],[194637,1,"\u5717"],[194638,1,"\u5651"],[194639,1,"\u5674"],[194640,1,"\u5207"],[194641,1,"\u58EE"],[194642,1,"\u57CE"],[194643,1,"\u57F4"],[194644,1,"\u580D"],[194645,1,"\u578B"],[194646,1,"\u5832"],[194647,1,"\u5831"],[194648,1,"\u58AC"],[194649,1,"\uD845\uDCE4"],[194650,1,"\u58F2"],[194651,1,"\u58F7"],[194652,1,"\u5906"],[194653,1,"\u591A"],[194654,1,"\u5922"],[194655,1,"\u5962"],[194656,1,"\uD845\uDEA8"],[194657,1,"\uD845\uDEEA"],[194658,1,"\u59EC"],[194659,1,"\u5A1B"],[194660,1,"\u5A27"],[194661,1,"\u59D8"],[194662,1,"\u5A66"],[194663,1,"\u36EE"],[194664,3],[194665,1,"\u5B08"],[[194666,194667],1,"\u5B3E"],[194668,1,"\uD846\uDDC8"],[194669,1,"\u5BC3"],[194670,1,"\u5BD8"],[194671,1,"\u5BE7"],[194672,1,"\u5BF3"],[194673,1,"\uD846\uDF18"],[194674,1,"\u5BFF"],[194675,1,"\u5C06"],[194676,3],[194677,1,"\u5C22"],[194678,1,"\u3781"],[194679,1,"\u5C60"],[194680,1,"\u5C6E"],[194681,1,"\u5CC0"],[194682,1,"\u5C8D"],[194683,1,"\uD847\uDDE4"],[194684,1,"\u5D43"],[194685,1,"\uD847\uDDE6"],[194686,1,"\u5D6E"],[194687,1,"\u5D6B"],[194688,1,"\u5D7C"],[194689,1,"\u5DE1"],[194690,1,"\u5DE2"],[194691,1,"\u382F"],[194692,1,"\u5DFD"],[194693,1,"\u5E28"],[194694,1,"\u5E3D"],[194695,1,"\u5E69"],[194696,1,"\u3862"],[194697,1,"\uD848\uDD83"],[194698,1,"\u387C"],[194699,1,"\u5EB0"],[194700,1,"\u5EB3"],[194701,1,"\u5EB6"],[194702,1,"\u5ECA"],[194703,1,"\uD868\uDF92"],[194704,1,"\u5EFE"],[[194705,194706],1,"\uD848\uDF31"],[194707,1,"\u8201"],[[194708,194709],1,"\u5F22"],[194710,1,"\u38C7"],[194711,1,"\uD84C\uDEB8"],[194712,1,"\uD858\uDDDA"],[194713,1,"\u5F62"],[194714,1,"\u5F6B"],[194715,1,"\u38E3"],[194716,1,"\u5F9A"],[194717,1,"\u5FCD"],[194718,1,"\u5FD7"],[194719,1,"\u5FF9"],[194720,1,"\u6081"],[194721,1,"\u393A"],[194722,1,"\u391C"],[194723,1,"\u6094"],[194724,1,"\uD849\uDED4"],[194725,1,"\u60C7"],[194726,1,"\u6148"],[194727,1,"\u614C"],[194728,1,"\u614E"],[194729,1,"\u614C"],[194730,1,"\u617A"],[194731,1,"\u618E"],[194732,1,"\u61B2"],[194733,1,"\u61A4"],[194734,1,"\u61AF"],[194735,1,"\u61DE"],[194736,1,"\u61F2"],[194737,1,"\u61F6"],[194738,1,"\u6210"],[194739,1,"\u621B"],[194740,1,"\u625D"],[194741,1,"\u62B1"],[194742,1,"\u62D4"],[194743,1,"\u6350"],[194744,1,"\uD84A\uDF0C"],[194745,1,"\u633D"],[194746,1,"\u62FC"],[194747,1,"\u6368"],[194748,1,"\u6383"],[194749,1,"\u63E4"],[194750,1,"\uD84A\uDFF1"],[194751,1,"\u6422"],[194752,1,"\u63C5"],[194753,1,"\u63A9"],[194754,1,"\u3A2E"],[194755,1,"\u6469"],[194756,1,"\u647E"],[194757,1,"\u649D"],[194758,1,"\u6477"],[194759,1,"\u3A6C"],[194760,1,"\u654F"],[194761,1,"\u656C"],[194762,1,"\uD84C\uDC0A"],[194763,1,"\u65E3"],[194764,1,"\u66F8"],[194765,1,"\u6649"],[194766,1,"\u3B19"],[194767,1,"\u6691"],[194768,1,"\u3B08"],[194769,1,"\u3AE4"],[194770,1,"\u5192"],[194771,1,"\u5195"],[194772,1,"\u6700"],[194773,1,"\u669C"],[194774,1,"\u80AD"],[194775,1,"\u43D9"],[194776,1,"\u6717"],[194777,1,"\u671B"],[194778,1,"\u6721"],[194779,1,"\u675E"],[194780,1,"\u6753"],[194781,1,"\uD84C\uDFC3"],[194782,1,"\u3B49"],[194783,1,"\u67FA"],[194784,1,"\u6785"],[194785,1,"\u6852"],[194786,1,"\u6885"],[194787,1,"\uD84D\uDC6D"],[194788,1,"\u688E"],[194789,1,"\u681F"],[194790,1,"\u6914"],[194791,1,"\u3B9D"],[194792,1,"\u6942"],[194793,1,"\u69A3"],[194794,1,"\u69EA"],[194795,1,"\u6AA8"],[194796,1,"\uD84D\uDEA3"],[194797,1,"\u6ADB"],[194798,1,"\u3C18"],[194799,1,"\u6B21"],[194800,1,"\uD84E\uDCA7"],[194801,1,"\u6B54"],[194802,1,"\u3C4E"],[194803,1,"\u6B72"],[194804,1,"\u6B9F"],[194805,1,"\u6BBA"],[194806,1,"\u6BBB"],[194807,1,"\uD84E\uDE8D"],[194808,1,"\uD847\uDD0B"],[194809,1,"\uD84E\uDEFA"],[194810,1,"\u6C4E"],[194811,1,"\uD84F\uDCBC"],[194812,1,"\u6CBF"],[194813,1,"\u6CCD"],[194814,1,"\u6C67"],[194815,1,"\u6D16"],[194816,1,"\u6D3E"],[194817,1,"\u6D77"],[194818,1,"\u6D41"],[194819,1,"\u6D69"],[194820,1,"\u6D78"],[194821,1,"\u6D85"],[194822,1,"\uD84F\uDD1E"],[194823,1,"\u6D34"],[194824,1,"\u6E2F"],[194825,1,"\u6E6E"],[194826,1,"\u3D33"],[194827,1,"\u6ECB"],[194828,1,"\u6EC7"],[194829,1,"\uD84F\uDED1"],[194830,1,"\u6DF9"],[194831,1,"\u6F6E"],[194832,1,"\uD84F\uDF5E"],[194833,1,"\uD84F\uDF8E"],[194834,1,"\u6FC6"],[194835,1,"\u7039"],[194836,1,"\u701E"],[194837,1,"\u701B"],[194838,1,"\u3D96"],[194839,1,"\u704A"],[194840,1,"\u707D"],[194841,1,"\u7077"],[194842,1,"\u70AD"],[194843,1,"\uD841\uDD25"],[194844,1,"\u7145"],[194845,1,"\uD850\uDE63"],[194846,1,"\u719C"],[194847,3],[194848,1,"\u7228"],[194849,1,"\u7235"],[194850,1,"\u7250"],[194851,1,"\uD851\uDE08"],[194852,1,"\u7280"],[194853,1,"\u7295"],[194854,1,"\uD851\uDF35"],[194855,1,"\uD852\uDC14"],[194856,1,"\u737A"],[194857,1,"\u738B"],[194858,1,"\u3EAC"],[194859,1,"\u73A5"],[[194860,194861],1,"\u3EB8"],[194862,1,"\u7447"],[194863,1,"\u745C"],[194864,1,"\u7471"],[194865,1,"\u7485"],[194866,1,"\u74CA"],[194867,1,"\u3F1B"],[194868,1,"\u7524"],[194869,1,"\uD853\uDC36"],[194870,1,"\u753E"],[194871,1,"\uD853\uDC92"],[194872,1,"\u7570"],[194873,1,"\uD848\uDD9F"],[194874,1,"\u7610"],[194875,1,"\uD853\uDFA1"],[194876,1,"\uD853\uDFB8"],[194877,1,"\uD854\uDC44"],[194878,1,"\u3FFC"],[194879,1,"\u4008"],[194880,1,"\u76F4"],[194881,1,"\uD854\uDCF3"],[194882,1,"\uD854\uDCF2"],[194883,1,"\uD854\uDD19"],[194884,1,"\uD854\uDD33"],[194885,1,"\u771E"],[[194886,194887],1,"\u771F"],[194888,1,"\u774A"],[194889,1,"\u4039"],[194890,1,"\u778B"],[194891,1,"\u4046"],[194892,1,"\u4096"],[194893,1,"\uD855\uDC1D"],[194894,1,"\u784E"],[194895,1,"\u788C"],[194896,1,"\u78CC"],[194897,1,"\u40E3"],[194898,1,"\uD855\uDE26"],[194899,1,"\u7956"],[194900,1,"\uD855\uDE9A"],[194901,1,"\uD855\uDEC5"],[194902,1,"\u798F"],[194903,1,"\u79EB"],[194904,1,"\u412F"],[194905,1,"\u7A40"],[194906,1,"\u7A4A"],[194907,1,"\u7A4F"],[194908,1,"\uD856\uDD7C"],[[194909,194910],1,"\uD856\uDEA7"],[194911,3],[194912,1,"\u4202"],[194913,1,"\uD856\uDFAB"],[194914,1,"\u7BC6"],[194915,1,"\u7BC9"],[194916,1,"\u4227"],[194917,1,"\uD857\uDC80"],[194918,1,"\u7CD2"],[194919,1,"\u42A0"],[194920,1,"\u7CE8"],[194921,1,"\u7CE3"],[194922,1,"\u7D00"],[194923,1,"\uD857\uDF86"],[194924,1,"\u7D63"],[194925,1,"\u4301"],[194926,1,"\u7DC7"],[194927,1,"\u7E02"],[194928,1,"\u7E45"],[194929,1,"\u4334"],[194930,1,"\uD858\uDE28"],[194931,1,"\uD858\uDE47"],[194932,1,"\u4359"],[194933,1,"\uD858\uDED9"],[194934,1,"\u7F7A"],[194935,1,"\uD858\uDF3E"],[194936,1,"\u7F95"],[194937,1,"\u7FFA"],[194938,1,"\u8005"],[194939,1,"\uD859\uDCDA"],[194940,1,"\uD859\uDD23"],[194941,1,"\u8060"],[194942,1,"\uD859\uDDA8"],[194943,1,"\u8070"],[194944,1,"\uD84C\uDF5F"],[194945,1,"\u43D5"],[194946,1,"\u80B2"],[194947,1,"\u8103"],[194948,1,"\u440B"],[194949,1,"\u813E"],[194950,1,"\u5AB5"],[194951,1,"\uD859\uDFA7"],[194952,1,"\uD859\uDFB5"],[194953,1,"\uD84C\uDF93"],[194954,1,"\uD84C\uDF9C"],[194955,1,"\u8201"],[194956,1,"\u8204"],[194957,1,"\u8F9E"],[194958,1,"\u446B"],[194959,1,"\u8291"],[194960,1,"\u828B"],[194961,1,"\u829D"],[194962,1,"\u52B3"],[194963,1,"\u82B1"],[194964,1,"\u82B3"],[194965,1,"\u82BD"],[194966,1,"\u82E6"],[194967,1,"\uD85A\uDF3C"],[194968,1,"\u82E5"],[194969,1,"\u831D"],[194970,1,"\u8363"],[194971,1,"\u83AD"],[194972,1,"\u8323"],[194973,1,"\u83BD"],[194974,1,"\u83E7"],[194975,1,"\u8457"],[194976,1,"\u8353"],[194977,1,"\u83CA"],[194978,1,"\u83CC"],[194979,1,"\u83DC"],[194980,1,"\uD85B\uDC36"],[194981,1,"\uD85B\uDD6B"],[194982,1,"\uD85B\uDCD5"],[194983,1,"\u452B"],[194984,1,"\u84F1"],[194985,1,"\u84F3"],[194986,1,"\u8516"],[194987,1,"\uD85C\uDFCA"],[194988,1,"\u8564"],[194989,1,"\uD85B\uDF2C"],[194990,1,"\u455D"],[194991,1,"\u4561"],[194992,1,"\uD85B\uDFB1"],[194993,1,"\uD85C\uDCD2"],[194994,1,"\u456B"],[194995,1,"\u8650"],[194996,1,"\u865C"],[194997,1,"\u8667"],[194998,1,"\u8669"],[194999,1,"\u86A9"],[195000,1,"\u8688"],[195001,1,"\u870E"],[195002,1,"\u86E2"],[195003,1,"\u8779"],[195004,1,"\u8728"],[195005,1,"\u876B"],[195006,1,"\u8786"],[195007,3],[195008,1,"\u87E1"],[195009,1,"\u8801"],[195010,1,"\u45F9"],[195011,1,"\u8860"],[195012,1,"\u8863"],[195013,1,"\uD85D\uDE67"],[195014,1,"\u88D7"],[195015,1,"\u88DE"],[195016,1,"\u4635"],[195017,1,"\u88FA"],[195018,1,"\u34BB"],[195019,1,"\uD85E\uDCAE"],[195020,1,"\uD85E\uDD66"],[195021,1,"\u46BE"],[195022,1,"\u46C7"],[195023,1,"\u8AA0"],[195024,1,"\u8AED"],[195025,1,"\u8B8A"],[195026,1,"\u8C55"],[195027,1,"\uD85F\uDCA8"],[195028,1,"\u8CAB"],[195029,1,"\u8CC1"],[195030,1,"\u8D1B"],[195031,1,"\u8D77"],[195032,1,"\uD85F\uDF2F"],[195033,1,"\uD842\uDC04"],[195034,1,"\u8DCB"],[195035,1,"\u8DBC"],[195036,1,"\u8DF0"],[195037,1,"\uD842\uDCDE"],[195038,1,"\u8ED4"],[195039,1,"\u8F38"],[195040,1,"\uD861\uDDD2"],[195041,1,"\uD861\uDDED"],[195042,1,"\u9094"],[195043,1,"\u90F1"],[195044,1,"\u9111"],[195045,1,"\uD861\uDF2E"],[195046,1,"\u911B"],[195047,1,"\u9238"],[195048,1,"\u92D7"],[195049,1,"\u92D8"],[195050,1,"\u927C"],[195051,1,"\u93F9"],[195052,1,"\u9415"],[195053,1,"\uD862\uDFFA"],[195054,1,"\u958B"],[195055,1,"\u4995"],[195056,1,"\u95B7"],[195057,1,"\uD863\uDD77"],[195058,1,"\u49E6"],[195059,1,"\u96C3"],[195060,1,"\u5DB2"],[195061,1,"\u9723"],[195062,1,"\uD864\uDD45"],[195063,1,"\uD864\uDE1A"],[195064,1,"\u4A6E"],[195065,1,"\u4A76"],[195066,1,"\u97E0"],[195067,1,"\uD865\uDC0A"],[195068,1,"\u4AB2"],[195069,1,"\uD865\uDC96"],[[195070,195071],1,"\u980B"],[195072,1,"\u9829"],[195073,1,"\uD865\uDDB6"],[195074,1,"\u98E2"],[195075,1,"\u4B33"],[195076,1,"\u9929"],[195077,1,"\u99A7"],[195078,1,"\u99C2"],[195079,1,"\u99FE"],[195080,1,"\u4BCE"],[195081,1,"\uD866\uDF30"],[195082,1,"\u9B12"],[195083,1,"\u9C40"],[195084,1,"\u9CFD"],[195085,1,"\u4CCE"],[195086,1,"\u4CED"],[195087,1,"\u9D67"],[195088,1,"\uD868\uDCCE"],[195089,1,"\u4CF8"],[195090,1,"\uD868\uDD05"],[195091,1,"\uD868\uDE0E"],[195092,1,"\uD868\uDE91"],[195093,1,"\u9EBB"],[195094,1,"\u4D56"],[195095,1,"\u9EF9"],[195096,1,"\u9EFE"],[195097,1,"\u9F05"],[195098,1,"\u9F0F"],[195099,1,"\u9F16"],[195100,1,"\u9F3B"],[195101,1,"\uD869\uDE00"],[[195102,196605],3],[[196606,196607],3],[[196608,201546],2],[[201547,201551],3],[[201552,205743],2],[[205744,262141],3],[[262142,262143],3],[[262144,327677],3],[[327678,327679],3],[[327680,393213],3],[[393214,393215],3],[[393216,458749],3],[[458750,458751],3],[[458752,524285],3],[[524286,524287],3],[[524288,589821],3],[[589822,589823],3],[[589824,655357],3],[[655358,655359],3],[[655360,720893],3],[[720894,720895],3],[[720896,786429],3],[[786430,786431],3],[[786432,851965],3],[[851966,851967],3],[[851968,917501],3],[[917502,917503],3],[917504,3],[917505,3],[[917506,917535],3],[[917536,917631],3],[[917632,917759],3],[[917760,917999],7],[[918000,983037],3],[[983038,983039],3],[[983040,1048573],3],[[1048574,1048575],3],[[1048576,1114109],3],[[1114110,1114111],3]]});var Pw=K((n11,Nw)=>{n11.STATUS_MAPPING={mapped:1,valid:2,disallowed:3,disallowed_STD3_valid:4,disallowed_STD3_mapped:5,deviation:6,ignored:7}});var Ow=K((NQ1,kw)=>{var rY=Vw(),U6=ww(),Mw=Iw(),{STATUS_MAPPING:L2}=Pw();function a11(F){return/[^\x00-\x7F]/u.test(F)}function Tw(F,{useSTD3ASCIIRules:A}){let B=0,D=Mw.length-1;while(B<=D){let J=Math.floor((B+D)/2),X=Mw[J],Z=Array.isArray(X[0])?X[0][0]:X[0],Y=Array.isArray(X[0])?X[0][1]:X[0];if(Z<=F&&Y>=F){if(A&&(X[1]===L2.disallowed_STD3_valid||X[1]===L2.disallowed_STD3_mapped))return[L2.disallowed,...X.slice(2)];else if(X[1]===L2.disallowed_STD3_valid)return[L2.valid,...X.slice(2)];else if(X[1]===L2.disallowed_STD3_mapped)return[L2.mapped,...X.slice(2)];return X.slice(1)}else if(Z>F)D=J-1;else B=J+1}return null}function r11(F,{useSTD3ASCIIRules:A,processingOption:B}){let D=!1,J="";for(let X of F){let[Z,Y]=Tw(X.codePointAt(0),{useSTD3ASCIIRules:A});switch(Z){case L2.disallowed:D=!0,J+=X;break;case L2.ignored:break;case L2.mapped:J+=Y;break;case L2.deviation:if(B==="transitional")J+=Y;else J+=X;break;case L2.valid:J+=X;break}}return{string:J,error:D}}function t11(F,{checkHyphens:A,checkBidi:B,checkJoiners:D,processingOption:J,useSTD3ASCIIRules:X}){if(F.normalize("NFC")!==F)return!1;let Z=Array.from(F);if(A){if(Z[2]==="-"&&Z[3]==="-"||(F.startsWith("-")||F.endsWith("-")))return!1}if(F.includes(".")||Z.length>0&&U6.combiningMarks.test(Z[0]))return!1;for(let Y of Z){let[$]=Tw(Y.codePointAt(0),{useSTD3ASCIIRules:X});if(J==="transitional"&&$!==L2.valid||J==="nontransitional"&&$!==L2.valid&&$!==L2.deviation)return!1}if(D){let Y=0;for(let[$,G]of Z.entries())if(G==="\u200C"||G==="\u200D"){if($>0){if(U6.combiningClassVirama.test(Z[$-1]))continue;if(G==="\u200C"){let E=Z.indexOf("\u200C",$+1),H=E<0?Z.slice(Y):Z.slice(Y,E);if(U6.validZWNJ.test(H.join(""))){Y=$+1;continue}}}return!1}}if(B&&Z.length>0){let Y;if(U6.bidiS1LTR.test(Z[0]))Y=!1;else if(U6.bidiS1RTL.test(Z[0]))Y=!0;else return!1;if(Y){if(!U6.bidiS2.test(F)||!U6.bidiS3.test(F)||U6.bidiS4EN.test(F)&&U6.bidiS4AN.test(F))return!1}else if(!U6.bidiS5.test(F)||!U6.bidiS6.test(F))return!1}return!0}function o11(F){let A=F.map((B)=>{if(B.startsWith("xn--"))try{return rY.decode(B.substring(4))}catch(D){return""}return B}).join(".");return U6.bidiDomain.test(A)}function jw(F,A){let{processingOption:B}=A,{string:D,error:J}=r11(F,A);D=D.normalize("NFC");let X=D.split("."),Z=o11(X);for(let[Y,$]of X.entries()){let G=$,E=B;if(G.startsWith("xn--")){try{G=rY.decode(G.substring(4)),X[Y]=G}catch(q){J=!0;continue}E="nontransitional"}if(J)continue;if(!t11(G,{...A,processingOption:E,checkBidi:A.checkBidi&&Z}))J=!0}return{string:X.join("."),error:J}}function e11(F,{checkHyphens:A=!1,checkBidi:B=!1,checkJoiners:D=!1,useSTD3ASCIIRules:J=!1,processingOption:X="nontransitional",verifyDNSLength:Z=!1}={}){if(X!=="transitional"&&X!=="nontransitional")throw new RangeError("processingOption must be either transitional or nontransitional");let Y=jw(F,{processingOption:X,checkHyphens:A,checkBidi:B,checkJoiners:D,useSTD3ASCIIRules:J}),$=Y.string.split(".");if($=$.map((G)=>{if(a11(G))try{return`xn--${rY.encode(G)}`}catch(E){Y.error=!0}return G}),Z){let G=$.join(".").length;if(G>253||G===0)Y.error=!0;for(let E=0;E<$.length;++E)if($[E].length>63||$[E].length===0){Y.error=!0;break}}if(Y.error)return null;return $.join(".")}function F01(F,{checkHyphens:A=!1,checkBidi:B=!1,checkJoiners:D=!1,useSTD3ASCIIRules:J=!1,processingOption:X="nontransitional"}={}){let Z=jw(F,{processingOption:X,checkHyphens:A,checkBidi:B,checkJoiners:D,useSTD3ASCIIRules:J});return{domain:Z.string,error:Z.error}}kw.exports={toASCII:e11,toUnicode:F01}});var oY=K((PQ1,uw)=>{function tY(F){return F>=48&&F<=57}function Sw(F){return F>=65&&F<=90||F>=97&&F<=122}function A01(F){return Sw(F)||tY(F)}function B01(F){return tY(F)||F>=65&&F<=70||F>=97&&F<=102}uw.exports={isASCIIDigit:tY,isASCIIAlpha:Sw,isASCIIAlphanumeric:A01,isASCIIHex:B01}});var aA=K((MQ1,xw)=>{var D01=new TextEncoder,J01=new TextDecoder("utf-8",{ignoreBOM:!0});function X01(F){return D01.encode(F)}function Z01(F){return J01.decode(F)}xw.exports={utf8Encode:X01,utf8DecodeWithoutBOM:Z01}});var rA=K((TQ1,hw)=>{var{isASCIIHex:fw}=oY(),{utf8Encode:_w}=aA();function w1(F){return F.codePointAt(0)}function Y01(F){let A=F.toString(16).toUpperCase();if(A.length===1)A=`0${A}`;return`%${A}`}function gw(F){let A=new Uint8Array(F.byteLength),B=0;for(let D=0;D<F.byteLength;++D){let J=F[D];if(J!==37)A[B++]=J;else if(J===37&&(!fw(F[D+1])||!fw(F[D+2])))A[B++]=J;else{let X=parseInt(String.fromCodePoint(F[D+1],F[D+2]),16);A[B++]=X,D+=2}}return A.slice(0,B)}function $01(F){let A=_w(F);return gw(A)}function eY(F){return F<=31||F>126}var G01=new Set([w1(" "),w1('"'),w1("<"),w1(">"),w1("`")]);function E01(F){return eY(F)||G01.has(F)}var H01=new Set([w1(" "),w1('"'),w1("#"),w1("<"),w1(">")]);function F$(F){return eY(F)||H01.has(F)}function q01(F){return F$(F)||F===w1("'")}var W01=new Set([w1("?"),w1("`"),w1("{"),w1("}")]);function bw(F){return F$(F)||W01.has(F)}var z01=new Set([w1("/"),w1(":"),w1(";"),w1("="),w1("@"),w1("["),w1("\\"),w1("]"),w1("^"),w1("|")]);function yw(F){return bw(F)||z01.has(F)}var C01=new Set([w1("$"),w1("%"),w1("&"),w1("+"),w1(",")]);function K01(F){return yw(F)||C01.has(F)}var U01=new Set([w1("!"),w1("'"),w1("("),w1(")"),w1("~")]);function Q01(F){return K01(F)||U01.has(F)}function vw(F,A){let B=_w(F),D="";for(let J of B)if(!A(J))D+=String.fromCharCode(J);else D+=Y01(J);return D}function L01(F,A){return vw(String.fromCodePoint(F),A)}function V01(F,A,B=!1){let D="";for(let J of F)if(B&&J===" ")D+="+";else D+=vw(J,A);return D}hw.exports={isC0ControlPercentEncode:eY,isFragmentPercentEncode:E01,isQueryPercentEncode:F$,isSpecialQueryPercentEncode:q01,isPathPercentEncode:bw,isUserinfoPercentEncode:yw,isURLEncodedPercentEncode:Q01,percentDecodeString:$01,percentDecodeBytes:gw,utf8PercentEncodeString:V01,utf8PercentEncodeCodePoint:L01}});var Z$=K((n01,V2)=>{var R01=Ow(),v0=oY(),{utf8DecodeWithoutBOM:w01}=aA(),{percentDecodeString:I01,utf8PercentEncodeCodePoint:oA,utf8PercentEncodeString:eA,isC0ControlPercentEncode:pw,isFragmentPercentEncode:N01,isQueryPercentEncode:P01,isSpecialQueryPercentEncode:M01,isPathPercentEncode:T01,isUserinfoPercentEncode:D$}=rA();function c(F){return F.codePointAt(0)}var iw={ftp:21,file:null,http:80,https:443,ws:80,wss:443},G1=Symbol("failure");function mw(F){return[...F].length}function dw(F,A){let B=F[A];return isNaN(B)?void 0:String.fromCodePoint(B)}function cw(F){return F==="."||F.toLowerCase()==="%2e"}function j01(F){return F=F.toLowerCase(),F===".."||F==="%2e."||F===".%2e"||F==="%2e%2e"}function k01(F,A){return v0.isASCIIAlpha(F)&&(A===c(":")||A===c("|"))}function nw(F){return F.length===2&&v0.isASCIIAlpha(F.codePointAt(0))&&(F[1]===":"||F[1]==="|")}function O01(F){return F.length===2&&v0.isASCIIAlpha(F.codePointAt(0))&&F[1]===":"}function sw(F){return F.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|<|>|\?|@|\[|\\|\]|\^|\|/u)!==-1}function S01(F){return sw(F)||F.search(/[\u0000-\u001F]|%|\u007F/u)!==-1}function tA(F){return iw[F]!==void 0}function y0(F){return tA(F.scheme)}function A$(F){return!tA(F.scheme)}function aw(F){return iw[F]}function rw(F){if(F==="")return G1;let A=10;if(F.length>=2&&F.charAt(0)==="0"&&F.charAt(1).toLowerCase()==="x")F=F.substring(2),A=16;else if(F.length>=2&&F.charAt(0)==="0")F=F.substring(1),A=8;if(F==="")return 0;let B=/[^0-7]/u;if(A===10)B=/[^0-9]/u;if(A===16)B=/[^0-9A-Fa-f]/u;if(B.test(F))return G1;return parseInt(F,A)}function u01(F){let A=F.split(".");if(A[A.length-1]===""){if(A.length>1)A.pop()}if(A.length>4)return G1;let B=[];for(let X of A){let Z=rw(X);if(Z===G1)return G1;B.push(Z)}for(let X=0;X<B.length-1;++X)if(B[X]>255)return G1;if(B[B.length-1]>=256**(5-B.length))return G1;let D=B.pop(),J=0;for(let X of B)D+=X*256**(3-J),++J;return D}function x01(F){let A="",B=F;for(let D=1;D<=4;++D){if(A=String(B%256)+A,D!==4)A=`.${A}`;B=Math.floor(B/256)}return A}function f01(F){let A=[0,0,0,0,0,0,0,0],B=0,D=null,J=0;if(F=Array.from(F,(X)=>X.codePointAt(0)),F[J]===c(":")){if(F[J+1]!==c(":"))return G1;J+=2,++B,D=B}while(J<F.length){if(B===8)return G1;if(F[J]===c(":")){if(D!==null)return G1;++J,++B,D=B;continue}let X=0,Z=0;while(Z<4&&v0.isASCIIHex(F[J]))X=X*16+parseInt(dw(F,J),16),++J,++Z;if(F[J]===c(".")){if(Z===0)return G1;if(J-=Z,B>6)return G1;let Y=0;while(F[J]!==void 0){let $=null;if(Y>0)if(F[J]===c(".")&&Y<4)++J;else return G1;if(!v0.isASCIIDigit(F[J]))return G1;while(v0.isASCIIDigit(F[J])){let G=parseInt(dw(F,J));if($===null)$=G;else if($===0)return G1;else $=$*10+G;if($>255)return G1;++J}if(A[B]=A[B]*256+$,++Y,Y===2||Y===4)++B}if(Y!==4)return G1;break}else if(F[J]===c(":")){if(++J,F[J]===void 0)return G1}else if(F[J]!==void 0)return G1;A[B]=X,++B}if(D!==null){let X=B-D;B=7;while(B!==0&&X>0){let Z=A[D+X-1];A[D+X-1]=A[B],A[B]=Z,--B,--X}}else if(D===null&&B!==8)return G1;return A}function _01(F){let A="",B=y01(F),D=!1;for(let J=0;J<=7;++J){if(D&&F[J]===0)continue;else if(D)D=!1;if(B===J){A+=J===0?"::":":",D=!0;continue}if(A+=F[J].toString(16),J!==7)A+=":"}return A}function B$(F,A=!1){if(F[0]==="["){if(F[F.length-1]!=="]")return G1;return f01(F.substring(1,F.length-1))}if(A)return b01(F);let B=w01(I01(F)),D=v01(B);if(D===G1)return G1;if(S01(D))return G1;if(g01(D))return u01(D);return D}function g01(F){let A=F.split(".");if(A[A.length-1]===""){if(A.length===1)return!1;A.pop()}let B=A[A.length-1];if(rw(B)!==G1)return!0;if(/^[0-9]+$/u.test(B))return!0;return!1}function b01(F){if(sw(F))return G1;return eA(F,pw)}function y01(F){let A=null,B=1,D=null,J=0;for(let X=0;X<F.length;++X)if(F[X]!==0){if(J>B)A=D,B=J;D=null,J=0}else{if(D===null)D=X;++J}if(J>B)return D;return A}function J$(F){if(typeof F==="number")return x01(F);if(F instanceof Array)return`[${_01(F)}]`;return F}function v01(F,A=!1){let B=R01.toASCII(F,{checkBidi:!0,checkHyphens:!1,checkJoiners:!0,useSTD3ASCIIRules:A,verifyDNSLength:A});if(B===null||B==="")return G1;return B}function h01(F){return F.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/ug,"")}function m01(F){return F.replace(/\u0009|\u000A|\u000D/ug,"")}function tw(F){let{path:A}=F;if(A.length===0)return;if(F.scheme==="file"&&A.length===1&&c01(A[0]))return;A.pop()}function ow(F){return F.username!==""||F.password!==""}function d01(F){return F.host===null||F.host===""||F.scheme==="file"}function z5(F){return typeof F.path==="string"}function c01(F){return/^[A-Za-z]:$/u.test(F)}function G0(F,A,B,D,J){if(this.pointer=0,this.input=F,this.base=A||null,this.encodingOverride=B||"utf-8",this.stateOverride=J,this.url=D,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null};let Z=h01(this.input);if(Z!==this.input)this.parseError=!0;this.input=Z}let X=m01(this.input);if(X!==this.input)this.parseError=!0;this.input=X,this.state=J||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=Array.from(this.input,(Z)=>Z.codePointAt(0));for(;this.pointer<=this.input.length;++this.pointer){let Z=this.input[this.pointer],Y=isNaN(Z)?void 0:String.fromCodePoint(Z),$=this[`parse ${this.state}`](Z,Y);if(!$)break;else if($===G1){this.failure=!0;break}}}G0.prototype["parse scheme start"]=function F(A,B){if(v0.isASCIIAlpha(A))this.buffer+=B.toLowerCase(),this.state="scheme";else if(!this.stateOverride)this.state="no scheme",--this.pointer;else return this.parseError=!0,G1;return!0};G0.prototype["parse scheme"]=function F(A,B){if(v0.isASCIIAlphanumeric(A)||A===c("+")||A===c("-")||A===c("."))this.buffer+=B.toLowerCase();else if(A===c(":")){if(this.stateOverride){if(y0(this.url)&&!tA(this.buffer))return!1;if(!y0(this.url)&&tA(this.buffer))return!1;if((ow(this.url)||this.url.port!==null)&&this.buffer==="file")return!1;if(this.url.scheme==="file"&&this.url.host==="")return!1}if(this.url.scheme=this.buffer,this.stateOverride){if(this.url.port===aw(this.url.scheme))this.url.port=null;return!1}if(this.buffer="",this.url.scheme==="file"){if(this.input[this.pointer+1]!==c("/")||this.input[this.pointer+2]!==c("/"))this.parseError=!0;this.state="file"}else if(y0(this.url)&&this.base!==null&&this.base.scheme===this.url.scheme)this.state="special relative or authority";else if(y0(this.url))this.state="special authority slashes";else if(this.input[this.pointer+1]===c("/"))this.state="path or authority",++this.pointer;else this.url.path="",this.state="opaque path"}else if(!this.stateOverride)this.buffer="",this.state="no scheme",this.pointer=-1;else return this.parseError=!0,G1;return!0};G0.prototype["parse no scheme"]=function F(A){if(this.base===null||z5(this.base)&&A!==c("#"))return G1;else if(z5(this.base)&&A===c("#"))this.url.scheme=this.base.scheme,this.url.path=this.base.path,this.url.query=this.base.query,this.url.fragment="",this.state="fragment";else if(this.base.scheme==="file")this.state="file",--this.pointer;else this.state="relative",--this.pointer;return!0};G0.prototype["parse special relative or authority"]=function F(A){if(A===c("/")&&this.input[this.pointer+1]===c("/"))this.state="special authority ignore slashes",++this.pointer;else this.parseError=!0,this.state="relative",--this.pointer;return!0};G0.prototype["parse path or authority"]=function F(A){if(A===c("/"))this.state="authority";else this.state="path",--this.pointer;return!0};G0.prototype["parse relative"]=function F(A){if(this.url.scheme=this.base.scheme,A===c("/"))this.state="relative slash";else if(y0(this.url)&&A===c("\\"))this.parseError=!0,this.state="relative slash";else if(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,A===c("?"))this.url.query="",this.state="query";else if(A===c("#"))this.url.fragment="",this.state="fragment";else if(!isNaN(A))this.url.query=null,this.url.path.pop(),this.state="path",--this.pointer;return!0};G0.prototype["parse relative slash"]=function F(A){if(y0(this.url)&&(A===c("/")||A===c("\\"))){if(A===c("\\"))this.parseError=!0;this.state="special authority ignore slashes"}else if(A===c("/"))this.state="authority";else this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer;return!0};G0.prototype["parse special authority slashes"]=function F(A){if(A===c("/")&&this.input[this.pointer+1]===c("/"))this.state="special authority ignore slashes",++this.pointer;else this.parseError=!0,this.state="special authority ignore slashes",--this.pointer;return!0};G0.prototype["parse special authority ignore slashes"]=function F(A){if(A!==c("/")&&A!==c("\\"))this.state="authority",--this.pointer;else this.parseError=!0;return!0};G0.prototype["parse authority"]=function F(A,B){if(A===c("@")){if(this.parseError=!0,this.atFlag)this.buffer=`%40${this.buffer}`;this.atFlag=!0;let D=mw(this.buffer);for(let J=0;J<D;++J){let X=this.buffer.codePointAt(J);if(X===c(":")&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}let Z=oA(X,D$);if(this.passwordTokenSeenFlag)this.url.password+=Z;else this.url.username+=Z}this.buffer=""}else if(isNaN(A)||A===c("/")||A===c("?")||A===c("#")||y0(this.url)&&A===c("\\")){if(this.atFlag&&this.buffer==="")return this.parseError=!0,G1;this.pointer-=mw(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=B;return!0};G0.prototype["parse hostname"]=G0.prototype["parse host"]=function F(A,B){if(this.stateOverride&&this.url.scheme==="file")--this.pointer,this.state="file host";else if(A===c(":")&&!this.arrFlag){if(this.buffer==="")return this.parseError=!0,G1;if(this.stateOverride==="hostname")return!1;let D=B$(this.buffer,A$(this.url));if(D===G1)return G1;this.url.host=D,this.buffer="",this.state="port"}else if(isNaN(A)||A===c("/")||A===c("?")||A===c("#")||y0(this.url)&&A===c("\\")){if(--this.pointer,y0(this.url)&&this.buffer==="")return this.parseError=!0,G1;else if(this.stateOverride&&this.buffer===""&&(ow(this.url)||this.url.port!==null))return this.parseError=!0,!1;let D=B$(this.buffer,A$(this.url));if(D===G1)return G1;if(this.url.host=D,this.buffer="",this.state="path start",this.stateOverride)return!1}else{if(A===c("["))this.arrFlag=!0;else if(A===c("]"))this.arrFlag=!1;this.buffer+=B}return!0};G0.prototype["parse port"]=function F(A,B){if(v0.isASCIIDigit(A))this.buffer+=B;else if(isNaN(A)||A===c("/")||A===c("?")||A===c("#")||y0(this.url)&&A===c("\\")||this.stateOverride){if(this.buffer!==""){let D=parseInt(this.buffer);if(D>65535)return this.parseError=!0,G1;this.url.port=D===aw(this.url.scheme)?null:D,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}else return this.parseError=!0,G1;return!0};var l01=new Set([c("/"),c("\\"),c("?"),c("#")]);function ew(F,A){let B=F.length-A;return B>=2&&k01(F[A],F[A+1])&&(B===2||l01.has(F[A+2]))}G0.prototype["parse file"]=function F(A){if(this.url.scheme="file",this.url.host="",A===c("/")||A===c("\\")){if(A===c("\\"))this.parseError=!0;this.state="file slash"}else if(this.base!==null&&this.base.scheme==="file"){if(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,A===c("?"))this.url.query="",this.state="query";else if(A===c("#"))this.url.fragment="",this.state="fragment";else if(!isNaN(A)){if(this.url.query=null,!ew(this.input,this.pointer))tw(this.url);else this.parseError=!0,this.url.path=[];this.state="path",--this.pointer}}else this.state="path",--this.pointer;return!0};G0.prototype["parse file slash"]=function F(A){if(A===c("/")||A===c("\\")){if(A===c("\\"))this.parseError=!0;this.state="file host"}else{if(this.base!==null&&this.base.scheme==="file"){if(!ew(this.input,this.pointer)&&O01(this.base.path[0]))this.url.path.push(this.base.path[0]);this.url.host=this.base.host}this.state="path",--this.pointer}return!0};G0.prototype["parse file host"]=function F(A,B){if(isNaN(A)||A===c("/")||A===c("\\")||A===c("?")||A===c("#"))if(--this.pointer,!this.stateOverride&&nw(this.buffer))this.parseError=!0,this.state="path";else if(this.buffer===""){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let D=B$(this.buffer,A$(this.url));if(D===G1)return G1;if(D==="localhost")D="";if(this.url.host=D,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=B;return!0};G0.prototype["parse path start"]=function F(A){if(y0(this.url)){if(A===c("\\"))this.parseError=!0;if(this.state="path",A!==c("/")&&A!==c("\\"))--this.pointer}else if(!this.stateOverride&&A===c("?"))this.url.query="",this.state="query";else if(!this.stateOverride&&A===c("#"))this.url.fragment="",this.state="fragment";else if(A!==void 0){if(this.state="path",A!==c("/"))--this.pointer}else if(this.stateOverride&&this.url.host===null)this.url.path.push("");return!0};G0.prototype["parse path"]=function F(A){if(isNaN(A)||A===c("/")||y0(this.url)&&A===c("\\")||!this.stateOverride&&(A===c("?")||A===c("#"))){if(y0(this.url)&&A===c("\\"))this.parseError=!0;if(j01(this.buffer)){if(tw(this.url),A!==c("/")&&!(y0(this.url)&&A===c("\\")))this.url.path.push("")}else if(cw(this.buffer)&&A!==c("/")&&!(y0(this.url)&&A===c("\\")))this.url.path.push("");else if(!cw(this.buffer)){if(this.url.scheme==="file"&&this.url.path.length===0&&nw(this.buffer))this.buffer=`${this.buffer[0]}:`;this.url.path.push(this.buffer)}if(this.buffer="",A===c("?"))this.url.query="",this.state="query";if(A===c("#"))this.url.fragment="",this.state="fragment"}else{if(A===c("%")&&(!v0.isASCIIHex(this.input[this.pointer+1])||!v0.isASCIIHex(this.input[this.pointer+2])))this.parseError=!0;this.buffer+=oA(A,T01)}return!0};G0.prototype["parse opaque path"]=function F(A){if(A===c("?"))this.url.query="",this.state="query";else if(A===c("#"))this.url.fragment="",this.state="fragment";else{if(!isNaN(A)&&A!==c("%"))this.parseError=!0;if(A===c("%")&&(!v0.isASCIIHex(this.input[this.pointer+1])||!v0.isASCIIHex(this.input[this.pointer+2])))this.parseError=!0;if(!isNaN(A))this.url.path+=oA(A,pw)}return!0};G0.prototype["parse query"]=function F(A,B){if(!y0(this.url)||this.url.scheme==="ws"||this.url.scheme==="wss")this.encodingOverride="utf-8";if(!this.stateOverride&&A===c("#")||isNaN(A)){let D=y0(this.url)?M01:P01;if(this.url.query+=eA(this.buffer,D),this.buffer="",A===c("#"))this.url.fragment="",this.state="fragment"}else if(!isNaN(A)){if(A===c("%")&&(!v0.isASCIIHex(this.input[this.pointer+1])||!v0.isASCIIHex(this.input[this.pointer+2])))this.parseError=!0;this.buffer+=B}return!0};G0.prototype["parse fragment"]=function F(A){if(!isNaN(A)){if(A===c("%")&&(!v0.isASCIIHex(this.input[this.pointer+1])||!v0.isASCIIHex(this.input[this.pointer+2])))this.parseError=!0;this.url.fragment+=oA(A,N01)}return!0};function p01(F,A){let B=`${F.scheme}:`;if(F.host!==null){if(B+="//",F.username!==""||F.password!==""){if(B+=F.username,F.password!=="")B+=`:${F.password}`;B+="@"}if(B+=J$(F.host),F.port!==null)B+=`:${F.port}`}if(F.host===null&&!z5(F)&&F.path.length>1&&F.path[0]==="")B+="/.";if(B+=X$(F),F.query!==null)B+=`?${F.query}`;if(!A&&F.fragment!==null)B+=`#${F.fragment}`;return B}function i01(F){let A=`${F.scheme}://`;if(A+=J$(F.host),F.port!==null)A+=`:${F.port}`;return A}function X$(F){if(z5(F))return F.path;let A="";for(let B of F.path)A+=`/${B}`;return A}n01.serializeURL=p01;n01.serializePath=X$;n01.serializeURLOrigin=function(F){switch(F.scheme){case"blob":{let A=n01.parseURL(X$(F));if(A===null)return"null";if(A.scheme!=="http"&&A.scheme!=="https")return"null";return n01.serializeURLOrigin(A)}case"ftp":case"http":case"https":case"ws":case"wss":return i01({scheme:F.scheme,host:F.host,port:F.port});case"file":return"null";default:return"null"}};n01.basicURLParse=function(F,A){if(A===void 0)A={};let B=new G0(F,A.baseURL,A.encodingOverride,A.url,A.stateOverride);if(B.failure)return null;return B.url};n01.setTheUsername=function(F,A){F.username=eA(A,D$)};n01.setThePassword=function(F,A){F.password=eA(A,D$)};n01.serializeHost=J$;n01.cannotHaveAUsernamePasswordPort=d01;n01.hasAnOpaquePath=z5;n01.serializeInteger=function(F){return String(F)};n01.parseURL=function(F,A){if(A===void 0)A={};return n01.basicURLParse(F,{baseURL:A.baseURL,encodingOverride:A.encodingOverride})}});var Y$=K((jQ1,YI)=>{var{utf8Encode:D21,utf8DecodeWithoutBOM:AI}=aA(),{percentDecodeBytes:BI,utf8PercentEncodeString:DI,isURLEncodedPercentEncode:JI}=rA();function XI(F){return F.codePointAt(0)}function J21(F){let A=Y21(F,XI("&")),B=[];for(let D of A){if(D.length===0)continue;let J,X,Z=D.indexOf(XI("="));if(Z>=0)J=D.slice(0,Z),X=D.slice(Z+1);else J=D,X=new Uint8Array(0);J=ZI(J,43,32),X=ZI(X,43,32);let Y=AI(BI(J)),$=AI(BI(X));B.push([Y,$])}return B}function X21(F){return J21(D21(F))}function Z21(F,A=void 0){let B="utf-8";if(A!==void 0)B=A;let D="";for(let[J,X]of F.entries()){let Z=DI(X[0],JI,!0),Y=X[1];if(X.length>2&&X[2]!==void 0){if(X[2]==="hidden"&&Z==="_charset_")Y=B;else if(X[2]==="file")Y=Y.name}if(Y=DI(Y,JI,!0),J!==0)D+="&";D+=`${Z}=${Y}`}return D}function Y21(F,A){let B=[],D=0,J=F.indexOf(A);while(J>=0)B.push(F.slice(D,J)),D=J+1,J=F.indexOf(A,D);if(D!==F.length)B.push(F.slice(D));return B}function ZI(F,A,B){let D=F.indexOf(A);while(D>=0)F[D]=B,D=F.indexOf(A,D+1);return F}YI.exports={parseUrlencodedString:X21,serializeUrlencoded:Z21}});var GI=K(($21)=>{var $I=iA(),FB=sA();$21.convert=(F,A,{context:B="The provided value"}={})=>{if(typeof A!=="function")throw new F.TypeError(B+" is not a function");function D(...J){let X=FB.tryWrapperForImpl(this),Z;for(let Y=0;Y<J.length;Y++)J[Y]=FB.tryWrapperForImpl(J[Y]);return Z=Reflect.apply(A,X,J),Z=$I.any(Z,{context:B,globals:F}),Z}return D.construct=(...J)=>{for(let Z=0;Z<J.length;Z++)J[Z]=FB.tryWrapperForImpl(J[Z]);let X=Reflect.construct(A,J);return X=$I.any(X,{context:B,globals:F}),X},D[FB.wrapperSymbol]=A,D.objectReference=A,D}});var EI=K((E21)=>{var $$=Y$();E21.implementation=class F{constructor(A,B,{doNotStripQMark:D=!1}){let J=B[0];if(this._list=[],this._url=null,!D&&typeof J==="string"&&J[0]==="?")J=J.slice(1);if(Array.isArray(J))for(let X of J){if(X.length!==2)throw new TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element does not contain exactly two elements.");this._list.push([X[0],X[1]])}else if(typeof J==="object"&&Object.getPrototypeOf(J)===null)for(let X of Object.keys(J)){let Z=J[X];this._list.push([X,Z])}else this._list=$$.parseUrlencodedString(J)}_updateSteps(){if(this._url!==null){let A=$$.serializeUrlencoded(this._list);if(A==="")A=null;if(this._url._url.query=A,A===null)this._url._potentiallyStripTrailingSpacesFromAnOpaquePath()}}get size(){return this._list.length}append(A,B){this._list.push([A,B]),this._updateSteps()}delete(A,B){let D=0;while(D<this._list.length)if(this._list[D][0]===A&&(B===void 0||this._list[D][1]===B))this._list.splice(D,1);else D++;this._updateSteps()}get(A){for(let B of this._list)if(B[0]===A)return B[1];return null}getAll(A){let B=[];for(let D of this._list)if(D[0]===A)B.push(D[1]);return B}has(A,B){for(let D of this._list)if(D[0]===A&&(B===void 0||D[1]===B))return!0;return!1}set(A,B){let D=!1,J=0;while(J<this._list.length)if(this._list[J][0]===A)if(D)this._list.splice(J,1);else D=!0,this._list[J][1]=B,J++;else J++;if(!D)this._list.push([A,B]);this._updateSteps()}sort(){this._list.sort((A,B)=>{if(A[0]<B[0])return-1;if(A[0]>B[0])return 1;return 0}),this._updateSteps()}[Symbol.iterator](){return this._list[Symbol.iterator]()}toString(){return $$.serializeUrlencoded(this._list)}}});var E$=K((z21)=>{var j2=iA(),m1=sA(),q21=GI(),HI=m1.newObjectInRealm,U0=m1.implSymbol,qI=m1.ctorRegistrySymbol;z21.is=(F)=>{return m1.isObject(F)&&m1.hasOwn(F,U0)&&F[U0]instanceof H4.implementation};z21.isImpl=(F)=>{return m1.isObject(F)&&F instanceof H4.implementation};z21.convert=(F,A,{context:B="The provided value"}={})=>{if(z21.is(A))return m1.implForWrapper(A);throw new F.TypeError(`${B} is not of type 'URLSearchParams'.`)};z21.createDefaultIterator=(F,A,B)=>{let J=F[qI]["URLSearchParams Iterator"],X=Object.create(J);return Object.defineProperty(X,m1.iterInternalSymbol,{value:{target:A,kind:B,index:0},configurable:!0}),X};function WI(F,A){let B;if(A!==void 0)B=A.prototype;if(!m1.isObject(B))B=F[qI].URLSearchParams.prototype;return Object.create(B)}z21.create=(F,A,B)=>{let D=WI(F);return z21.setup(D,F,A,B)};z21.createImpl=(F,A,B)=>{let D=z21.create(F,A,B);return m1.implForWrapper(D)};z21._internalSetup=(F,A)=>{};z21.setup=(F,A,B=[],D={})=>{if(D.wrapper=F,z21._internalSetup(F,A),Object.defineProperty(F,U0,{value:new H4.implementation(A,B,D),configurable:!0}),F[U0][m1.wrapperSymbol]=F,H4.init)H4.init(F[U0]);return F};z21.new=(F,A)=>{let B=WI(F,A);if(z21._internalSetup(B,F),Object.defineProperty(B,U0,{value:Object.create(H4.implementation.prototype),configurable:!0}),B[U0][m1.wrapperSymbol]=B,H4.init)H4.init(B[U0]);return B[U0]};var W21=new Set(["Window","Worker"]);z21.install=(F,A)=>{if(!A.some((J)=>W21.has(J)))return;let B=m1.initCtorRegistry(F);class D{constructor(){let J=[];{let X=arguments[0];if(X!==void 0)if(m1.isObject(X))if(X[Symbol.iterator]!==void 0)if(!m1.isObject(X))throw new F.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence is not an iterable object.");else{let Z=[],Y=X;for(let $ of Y){if(!m1.isObject($))throw new F.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element is not an iterable object.");else{let G=[],E=$;for(let H of E)H=j2.USVString(H,{context:"Failed to construct 'URLSearchParams': parameter 1 sequence's element's element",globals:F}),G.push(H);$=G}Z.push($)}X=Z}else if(!m1.isObject(X))throw new F.TypeError("Failed to construct 'URLSearchParams': parameter 1 record is not an object.");else{let Z=Object.create(null);for(let Y of Reflect.ownKeys(X)){let $=Object.getOwnPropertyDescriptor(X,Y);if($&&$.enumerable){let G=Y;G=j2.USVString(G,{context:"Failed to construct 'URLSearchParams': parameter 1 record's key",globals:F});let E=X[Y];E=j2.USVString(E,{context:"Failed to construct 'URLSearchParams': parameter 1 record's value",globals:F}),Z[G]=E}}X=Z}else X=j2.USVString(X,{context:"Failed to construct 'URLSearchParams': parameter 1",globals:F});else X="";J.push(X)}return z21.setup(Object.create(new.target.prototype),F,J)}append(J,X){let Z=this!==null&&this!==void 0?this:F;if(!z21.is(Z))throw new F.TypeError("'append' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<2)throw new F.TypeError(`Failed to execute 'append' on 'URLSearchParams': 2 arguments required, but only ${arguments.length} present.`);let Y=[];{let $=arguments[0];$=j2.USVString($,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 1",globals:F}),Y.push($)}{let $=arguments[1];$=j2.USVString($,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 2",globals:F}),Y.push($)}return m1.tryWrapperForImpl(Z[U0].append(...Y))}delete(J){let X=this!==null&&this!==void 0?this:F;if(!z21.is(X))throw new F.TypeError("'delete' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new F.TypeError(`Failed to execute 'delete' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);let Z=[];{let Y=arguments[0];Y=j2.USVString(Y,{context:"Failed to execute 'delete' on 'URLSearchParams': parameter 1",globals:F}),Z.push(Y)}{let Y=arguments[1];if(Y!==void 0)Y=j2.USVString(Y,{context:"Failed to execute 'delete' on 'URLSearchParams': parameter 2",globals:F});Z.push(Y)}return m1.tryWrapperForImpl(X[U0].delete(...Z))}get(J){let X=this!==null&&this!==void 0?this:F;if(!z21.is(X))throw new F.TypeError("'get' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new F.TypeError(`Failed to execute 'get' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);let Z=[];{let Y=arguments[0];Y=j2.USVString(Y,{context:"Failed to execute 'get' on 'URLSearchParams': parameter 1",globals:F}),Z.push(Y)}return X[U0].get(...Z)}getAll(J){let X=this!==null&&this!==void 0?this:F;if(!z21.is(X))throw new F.TypeError("'getAll' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new F.TypeError(`Failed to execute 'getAll' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);let Z=[];{let Y=arguments[0];Y=j2.USVString(Y,{context:"Failed to execute 'getAll' on 'URLSearchParams': parameter 1",globals:F}),Z.push(Y)}return m1.tryWrapperForImpl(X[U0].getAll(...Z))}has(J){let X=this!==null&&this!==void 0?this:F;if(!z21.is(X))throw new F.TypeError("'has' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new F.TypeError(`Failed to execute 'has' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);let Z=[];{let Y=arguments[0];Y=j2.USVString(Y,{context:"Failed to execute 'has' on 'URLSearchParams': parameter 1",globals:F}),Z.push(Y)}{let Y=arguments[1];if(Y!==void 0)Y=j2.USVString(Y,{context:"Failed to execute 'has' on 'URLSearchParams': parameter 2",globals:F});Z.push(Y)}return X[U0].has(...Z)}set(J,X){let Z=this!==null&&this!==void 0?this:F;if(!z21.is(Z))throw new F.TypeError("'set' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<2)throw new F.TypeError(`Failed to execute 'set' on 'URLSearchParams': 2 arguments required, but only ${arguments.length} present.`);let Y=[];{let $=arguments[0];$=j2.USVString($,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 1",globals:F}),Y.push($)}{let $=arguments[1];$=j2.USVString($,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 2",globals:F}),Y.push($)}return m1.tryWrapperForImpl(Z[U0].set(...Y))}sort(){let J=this!==null&&this!==void 0?this:F;if(!z21.is(J))throw new F.TypeError("'sort' called on an object that is not a valid instance of URLSearchParams.");return m1.tryWrapperForImpl(J[U0].sort())}toString(){let J=this!==null&&this!==void 0?this:F;if(!z21.is(J))throw new F.TypeError("'toString' called on an object that is not a valid instance of URLSearchParams.");return J[U0].toString()}keys(){if(!z21.is(this))throw new F.TypeError("'keys' called on an object that is not a valid instance of URLSearchParams.");return z21.createDefaultIterator(F,this,"key")}values(){if(!z21.is(this))throw new F.TypeError("'values' called on an object that is not a valid instance of URLSearchParams.");return z21.createDefaultIterator(F,this,"value")}entries(){if(!z21.is(this))throw new F.TypeError("'entries' called on an object that is not a valid instance of URLSearchParams.");return z21.createDefaultIterator(F,this,"key+value")}forEach(J){if(!z21.is(this))throw new F.TypeError("'forEach' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new F.TypeError("Failed to execute 'forEach' on 'iterable': 1 argument required, but only 0 present.");J=q21.convert(F,J,{context:"Failed to execute 'forEach' on 'iterable': The callback provided as parameter 1"});let X=arguments[1],Z=Array.from(this[U0]),Y=0;while(Y<Z.length){let[$,G]=Z[Y].map(m1.tryWrapperForImpl);J.call(X,G,$,this),Z=Array.from(this[U0]),Y++}}get size(){let J=this!==null&&this!==void 0?this:F;if(!z21.is(J))throw new F.TypeError("'get size' called on an object that is not a valid instance of URLSearchParams.");return J[U0].size}}Object.defineProperties(D.prototype,{append:{enumerable:!0},delete:{enumerable:!0},get:{enumerable:!0},getAll:{enumerable:!0},has:{enumerable:!0},set:{enumerable:!0},sort:{enumerable:!0},toString:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0},forEach:{enumerable:!0},size:{enumerable:!0},[Symbol.toStringTag]:{value:"URLSearchParams",configurable:!0},[Symbol.iterator]:{value:D.prototype.entries,configurable:!0,writable:!0}}),B.URLSearchParams=D,B["URLSearchParams Iterator"]=Object.create(B["%IteratorPrototype%"],{[Symbol.toStringTag]:{configurable:!0,value:"URLSearchParams Iterator"}}),m1.define(B["URLSearchParams Iterator"],{next(){let J=this&&this[m1.iterInternalSymbol];if(!J)throw new F.TypeError("next() called on a value that is not a URLSearchParams iterator object");let{target:X,kind:Z,index:Y}=J,$=Array.from(X[U0]),G=$.length;if(Y>=G)return HI(F,{value:void 0,done:!0});let E=$[Y];return J.index=Y+1,HI(F,m1.iteratorResult(E.map(m1.tryWrapperForImpl),Z))}}),Object.defineProperty(F,"URLSearchParams",{configurable:!0,writable:!0,value:D})};var H4=EI()});var UI=K((R21)=>{var g1=Z$(),KI=Y$(),V21=E$();R21.implementation=class F{constructor(A,B){let D=B[0],J=B[1],X=null;if(J!==void 0){if(X=g1.basicURLParse(J),X===null)throw new TypeError(`Invalid base URL: ${J}`)}let Z=g1.basicURLParse(D,{baseURL:X});if(Z===null)throw new TypeError(`Invalid URL: ${D}`);let Y=Z.query!==null?Z.query:"";this._url=Z,this._query=V21.createImpl(A,[Y],{doNotStripQMark:!0}),this._query._url=this}static canParse(A,B){let D=null;if(B!==void 0){if(D=g1.basicURLParse(B),D===null)return!1}if(g1.basicURLParse(A,{baseURL:D})===null)return!1;return!0}get href(){return g1.serializeURL(this._url)}set href(A){let B=g1.basicURLParse(A);if(B===null)throw new TypeError(`Invalid URL: ${A}`);this._url=B,this._query._list.splice(0);let{query:D}=B;if(D!==null)this._query._list=KI.parseUrlencodedString(D)}get origin(){return g1.serializeURLOrigin(this._url)}get protocol(){return`${this._url.scheme}:`}set protocol(A){g1.basicURLParse(`${A}:`,{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(A){if(g1.cannotHaveAUsernamePasswordPort(this._url))return;g1.setTheUsername(this._url,A)}get password(){return this._url.password}set password(A){if(g1.cannotHaveAUsernamePasswordPort(this._url))return;g1.setThePassword(this._url,A)}get host(){let A=this._url;if(A.host===null)return"";if(A.port===null)return g1.serializeHost(A.host);return`${g1.serializeHost(A.host)}:${g1.serializeInteger(A.port)}`}set host(A){if(g1.hasAnOpaquePath(this._url))return;g1.basicURLParse(A,{url:this._url,stateOverride:"host"})}get hostname(){if(this._url.host===null)return"";return g1.serializeHost(this._url.host)}set hostname(A){if(g1.hasAnOpaquePath(this._url))return;g1.basicURLParse(A,{url:this._url,stateOverride:"hostname"})}get port(){if(this._url.port===null)return"";return g1.serializeInteger(this._url.port)}set port(A){if(g1.cannotHaveAUsernamePasswordPort(this._url))return;if(A==="")this._url.port=null;else g1.basicURLParse(A,{url:this._url,stateOverride:"port"})}get pathname(){return g1.serializePath(this._url)}set pathname(A){if(g1.hasAnOpaquePath(this._url))return;this._url.path=[],g1.basicURLParse(A,{url:this._url,stateOverride:"path start"})}get search(){if(this._url.query===null||this._url.query==="")return"";return`?${this._url.query}`}set search(A){let B=this._url;if(A===""){B.query=null,this._query._list=[],this._potentiallyStripTrailingSpacesFromAnOpaquePath();return}let D=A[0]==="?"?A.substring(1):A;B.query="",g1.basicURLParse(D,{url:B,stateOverride:"query"}),this._query._list=KI.parseUrlencodedString(D)}get searchParams(){return this._query}get hash(){if(this._url.fragment===null||this._url.fragment==="")return"";return`#${this._url.fragment}`}set hash(A){if(A===""){this._url.fragment=null,this._potentiallyStripTrailingSpacesFromAnOpaquePath();return}let B=A[0]==="#"?A.substring(1):A;this._url.fragment="",g1.basicURLParse(B,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}_potentiallyStripTrailingSpacesFromAnOpaquePath(){if(!g1.hasAnOpaquePath(this._url))return;if(this._url.fragment!==null)return;if(this._url.query!==null)return;this._url.path=this._url.path.replace(/\u0020+$/u,"")}}});var RI=K((P21)=>{var k2=iA(),e2=sA(),T1=e2.implSymbol,I21=e2.ctorRegistrySymbol;P21.is=(F)=>{return e2.isObject(F)&&e2.hasOwn(F,T1)&&F[T1]instanceof P3.implementation};P21.isImpl=(F)=>{return e2.isObject(F)&&F instanceof P3.implementation};P21.convert=(F,A,{context:B="The provided value"}={})=>{if(P21.is(A))return e2.implForWrapper(A);throw new F.TypeError(`${B} is not of type 'URL'.`)};function QI(F,A){let B;if(A!==void 0)B=A.prototype;if(!e2.isObject(B))B=F[I21].URL.prototype;return Object.create(B)}P21.create=(F,A,B)=>{let D=QI(F);return P21.setup(D,F,A,B)};P21.createImpl=(F,A,B)=>{let D=P21.create(F,A,B);return e2.implForWrapper(D)};P21._internalSetup=(F,A)=>{};P21.setup=(F,A,B=[],D={})=>{if(D.wrapper=F,P21._internalSetup(F,A),Object.defineProperty(F,T1,{value:new P3.implementation(A,B,D),configurable:!0}),F[T1][e2.wrapperSymbol]=F,P3.init)P3.init(F[T1]);return F};P21.new=(F,A)=>{let B=QI(F,A);if(P21._internalSetup(B,F),Object.defineProperty(B,T1,{value:Object.create(P3.implementation.prototype),configurable:!0}),B[T1][e2.wrapperSymbol]=B,P3.init)P3.init(B[T1]);return B[T1]};var N21=new Set(["Window","Worker"]);P21.install=(F,A)=>{if(!A.some((J)=>N21.has(J)))return;let B=e2.initCtorRegistry(F);class D{constructor(J){if(arguments.length<1)throw new F.TypeError(`Failed to construct 'URL': 1 argument required, but only ${arguments.length} present.`);let X=[];{let Z=arguments[0];Z=k2.USVString(Z,{context:"Failed to construct 'URL': parameter 1",globals:F}),X.push(Z)}{let Z=arguments[1];if(Z!==void 0)Z=k2.USVString(Z,{context:"Failed to construct 'URL': parameter 2",globals:F});X.push(Z)}return P21.setup(Object.create(new.target.prototype),F,X)}toJSON(){let J=this!==null&&this!==void 0?this:F;if(!P21.is(J))throw new F.TypeError("'toJSON' called on an object that is not a valid instance of URL.");return J[T1].toJSON()}get href(){let J=this!==null&&this!==void 0?this:F;if(!P21.is(J))throw new F.TypeError("'get href' called on an object that is not a valid instance of URL.");return J[T1].href}set href(J){let X=this!==null&&this!==void 0?this:F;if(!P21.is(X))throw new F.TypeError("'set href' called on an object that is not a valid instance of URL.");J=k2.USVString(J,{context:"Failed to set the 'href' property on 'URL': The provided value",globals:F}),X[T1].href=J}toString(){let J=this;if(!P21.is(J))throw new F.TypeError("'toString' called on an object that is not a valid instance of URL.");return J[T1].href}get origin(){let J=this!==null&&this!==void 0?this:F;if(!P21.is(J))throw new F.TypeError("'get origin' called on an object that is not a valid instance of URL.");return J[T1].origin}get protocol(){let J=this!==null&&this!==void 0?this:F;if(!P21.is(J))throw new F.TypeError("'get protocol' called on an object that is not a valid instance of URL.");return J[T1].protocol}set protocol(J){let X=this!==null&&this!==void 0?this:F;if(!P21.is(X))throw new F.TypeError("'set protocol' called on an object that is not a valid instance of URL.");J=k2.USVString(J,{context:"Failed to set the 'protocol' property on 'URL': The provided value",globals:F}),X[T1].protocol=J}get username(){let J=this!==null&&this!==void 0?this:F;if(!P21.is(J))throw new F.TypeError("'get username' called on an object that is not a valid instance of URL.");return J[T1].username}set username(J){let X=this!==null&&this!==void 0?this:F;if(!P21.is(X))throw new F.TypeError("'set username' called on an object that is not a valid instance of URL.");J=k2.USVString(J,{context:"Failed to set the 'username' property on 'URL': The provided value",globals:F}),X[T1].username=J}get password(){let J=this!==null&&this!==void 0?this:F;if(!P21.is(J))throw new F.TypeError("'get password' called on an object that is not a valid instance of URL.");return J[T1].password}set password(J){let X=this!==null&&this!==void 0?this:F;if(!P21.is(X))throw new F.TypeError("'set password' called on an object that is not a valid instance of URL.");J=k2.USVString(J,{context:"Failed to set the 'password' property on 'URL': The provided value",globals:F}),X[T1].password=J}get host(){let J=this!==null&&this!==void 0?this:F;if(!P21.is(J))throw new F.TypeError("'get host' called on an object that is not a valid instance of URL.");return J[T1].host}set host(J){let X=this!==null&&this!==void 0?this:F;if(!P21.is(X))throw new F.TypeError("'set host' called on an object that is not a valid instance of URL.");J=k2.USVString(J,{context:"Failed to set the 'host' property on 'URL': The provided value",globals:F}),X[T1].host=J}get hostname(){let J=this!==null&&this!==void 0?this:F;if(!P21.is(J))throw new F.TypeError("'get hostname' called on an object that is not a valid instance of URL.");return J[T1].hostname}set hostname(J){let X=this!==null&&this!==void 0?this:F;if(!P21.is(X))throw new F.TypeError("'set hostname' called on an object that is not a valid instance of URL.");J=k2.USVString(J,{context:"Failed to set the 'hostname' property on 'URL': The provided value",globals:F}),X[T1].hostname=J}get port(){let J=this!==null&&this!==void 0?this:F;if(!P21.is(J))throw new F.TypeError("'get port' called on an object that is not a valid instance of URL.");return J[T1].port}set port(J){let X=this!==null&&this!==void 0?this:F;if(!P21.is(X))throw new F.TypeError("'set port' called on an object that is not a valid instance of URL.");J=k2.USVString(J,{context:"Failed to set the 'port' property on 'URL': The provided value",globals:F}),X[T1].port=J}get pathname(){let J=this!==null&&this!==void 0?this:F;if(!P21.is(J))throw new F.TypeError("'get pathname' called on an object that is not a valid instance of URL.");return J[T1].pathname}set pathname(J){let X=this!==null&&this!==void 0?this:F;if(!P21.is(X))throw new F.TypeError("'set pathname' called on an object that is not a valid instance of URL.");J=k2.USVString(J,{context:"Failed to set the 'pathname' property on 'URL': The provided value",globals:F}),X[T1].pathname=J}get search(){let J=this!==null&&this!==void 0?this:F;if(!P21.is(J))throw new F.TypeError("'get search' called on an object that is not a valid instance of URL.");return J[T1].search}set search(J){let X=this!==null&&this!==void 0?this:F;if(!P21.is(X))throw new F.TypeError("'set search' called on an object that is not a valid instance of URL.");J=k2.USVString(J,{context:"Failed to set the 'search' property on 'URL': The provided value",globals:F}),X[T1].search=J}get searchParams(){let J=this!==null&&this!==void 0?this:F;if(!P21.is(J))throw new F.TypeError("'get searchParams' called on an object that is not a valid instance of URL.");return e2.getSameObject(this,"searchParams",()=>{return e2.tryWrapperForImpl(J[T1].searchParams)})}get hash(){let J=this!==null&&this!==void 0?this:F;if(!P21.is(J))throw new F.TypeError("'get hash' called on an object that is not a valid instance of URL.");return J[T1].hash}set hash(J){let X=this!==null&&this!==void 0?this:F;if(!P21.is(X))throw new F.TypeError("'set hash' called on an object that is not a valid instance of URL.");J=k2.USVString(J,{context:"Failed to set the 'hash' property on 'URL': The provided value",globals:F}),X[T1].hash=J}static canParse(J){if(arguments.length<1)throw new F.TypeError(`Failed to execute 'canParse' on 'URL': 1 argument required, but only ${arguments.length} present.`);let X=[];{let Z=arguments[0];Z=k2.USVString(Z,{context:"Failed to execute 'canParse' on 'URL': parameter 1",globals:F}),X.push(Z)}{let Z=arguments[1];if(Z!==void 0)Z=k2.USVString(Z,{context:"Failed to execute 'canParse' on 'URL': parameter 2",globals:F});X.push(Z)}return P3.implementation.canParse(...X)}}if(Object.defineProperties(D.prototype,{toJSON:{enumerable:!0},href:{enumerable:!0},toString:{enumerable:!0},origin:{enumerable:!0},protocol:{enumerable:!0},username:{enumerable:!0},password:{enumerable:!0},host:{enumerable:!0},hostname:{enumerable:!0},port:{enumerable:!0},pathname:{enumerable:!0},search:{enumerable:!0},searchParams:{enumerable:!0},hash:{enumerable:!0},[Symbol.toStringTag]:{value:"URL",configurable:!0}}),Object.defineProperties(D,{canParse:{enumerable:!0}}),B.URL=D,Object.defineProperty(F,"URL",{configurable:!0,writable:!0,value:D}),A.includes("Window"))Object.defineProperty(F,"webkitURL",{configurable:!0,writable:!0,value:D})};var P3=UI()});var wI=K((x21)=>{var S21=RI(),u21=E$();x21.URL=S21;x21.URLSearchParams=u21});var NI=K((y21)=>{var{URL:g21,URLSearchParams:b21}=wI(),v6=Z$(),II=rA(),BB={Array,Object,Promise,String,TypeError};g21.install(BB,["Window"]);b21.install(BB,["Window"]);y21.URL=BB.URL;y21.URLSearchParams=BB.URLSearchParams;y21.parseURL=v6.parseURL;y21.basicURLParse=v6.basicURLParse;y21.serializeURL=v6.serializeURL;y21.serializePath=v6.serializePath;y21.serializeHost=v6.serializeHost;y21.serializeInteger=v6.serializeInteger;y21.serializeURLOrigin=v6.serializeURLOrigin;y21.setTheUsername=v6.setTheUsername;y21.setThePassword=v6.setThePassword;y21.cannotHaveAUsernamePasswordPort=v6.cannotHaveAUsernamePasswordPort;y21.hasAnOpaquePath=v6.hasAnOpaquePath;y21.percentDecodeString=II.percentDecodeString;y21.percentDecodeBytes=II.percentDecodeBytes});var MI=K((Q6)=>{var F61=Q6&&Q6.__createBinding||(Object.create?function(F,A,B,D){if(D===void 0)D=B;var J=Object.getOwnPropertyDescriptor(A,B);if(!J||("get"in J?!A.__esModule:J.writable||J.configurable))J={enumerable:!0,get:function(){return A[B]}};Object.defineProperty(F,D,J)}:function(F,A,B,D){if(D===void 0)D=B;F[D]=A[B]}),A61=Q6&&Q6.__setModuleDefault||(Object.create?function(F,A){Object.defineProperty(F,"default",{enumerable:!0,value:A})}:function(F,A){F.default=A}),B61=Q6&&Q6.__importStar||function(F){if(F&&F.__esModule)return F;var A={};if(F!=null){for(var B in F)if(B!=="default"&&Object.prototype.hasOwnProperty.call(F,B))F61(A,F,B)}return A61(A,F),A};Object.defineProperty(Q6,"__esModule",{value:!0});Q6.redactConnectionString=Q6.redactValidConnectionString=void 0;var PI=B61(q$());function D61(F,A){var B,D;let J=F.clone(),X=(B=A===null||A===void 0?void 0:A.replacementString)!==null&&B!==void 0?B:"_credentials_",Z=(D=A===null||A===void 0?void 0:A.redactUsernames)!==null&&D!==void 0?D:!0;if((J.username||J.password)&&Z)J.username=X,J.password="";else if(J.password)J.password=X;if(J.searchParams.has("authMechanismProperties")){let Y=new PI.CommaAndColonSeparatedRecord(J.searchParams.get("authMechanismProperties"));if(Y.get("AWS_SESSION_TOKEN"))Y.set("AWS_SESSION_TOKEN",X),J.searchParams.set("authMechanismProperties",Y.toString())}if(J.searchParams.has("tlsCertificateKeyFilePassword"))J.searchParams.set("tlsCertificateKeyFilePassword",X);if(J.searchParams.has("proxyUsername")&&Z)J.searchParams.set("proxyUsername",X);if(J.searchParams.has("proxyPassword"))J.searchParams.set("proxyPassword",X);return J}Q6.redactValidConnectionString=D61;function J61(F,A){var B,D;let J=(B=A===null||A===void 0?void 0:A.replacementString)!==null&&B!==void 0?B:"<credentials>",X=(D=A===null||A===void 0?void 0:A.redactUsernames)!==null&&D!==void 0?D:!0,Z;try{Z=new PI.default(F)}catch(G){}if(Z)return A={...A,replacementString:"___credentials___"},Z.redact(A).toString().replace(/___credentials___/g,J);let Y=J,$=[(G)=>G.replace(X?/(\/\/)(.*)(@)/g:/(\/\/[^@]*:)(.*)(@)/g,`$1${Y}$3`),(G)=>G.replace(/(AWS_SESSION_TOKEN(:|%3A))([^,&]+)/gi,`$1${Y}`),(G)=>G.replace(/(tlsCertificateKeyFilePassword=)([^&]+)/gi,`$1${Y}`),(G)=>X?G.replace(/(proxyUsername=)([^&]+)/gi,`$1${Y}`):G,(G)=>G.replace(/(proxyPassword=)([^&]+)/gi,`$1${Y}`)];for(let G of $)F=G(F);return F}Q6.redactConnectionString=J61});var q$=K((z$)=>{Object.defineProperty(z$,"__esModule",{value:!0});z$.CommaAndColonSeparatedRecord=z$.ConnectionString=z$.redactConnectionString=void 0;var X61=NI(),TI=MI();Object.defineProperty(z$,"redactConnectionString",{enumerable:!0,get:function(){return TI.redactConnectionString}});var C5="__this_is_a_placeholder__";function Z61(F){return F.startsWith("mongodb://")||F.startsWith("mongodb+srv://")}var Y61=/^(?<protocol>[^/]+):\/\/(?:(?<username>[^:@]*)(?::(?<password>[^@]*))?@)?(?<hosts>(?!:)[^/?@]*)(?<rest>.*)/;class W$ extends Map{delete(F){return super.delete(this._normalizeKey(F))}get(F){return super.get(this._normalizeKey(F))}has(F){return super.has(this._normalizeKey(F))}set(F,A){return super.set(this._normalizeKey(F),A)}_normalizeKey(F){F=`${F}`;for(let A of this.keys())if(A.toLowerCase()===F.toLowerCase()){F=A;break}return F}}function $61(F){return class A extends F{append(B,D){return super.append(this._normalizeKey(B),D)}delete(B){return super.delete(this._normalizeKey(B))}get(B){return super.get(this._normalizeKey(B))}getAll(B){return super.getAll(this._normalizeKey(B))}has(B){return super.has(this._normalizeKey(B))}set(B,D){return super.set(this._normalizeKey(B),D)}keys(){return super.keys()}values(){return super.values()}entries(){return super.entries()}[Symbol.iterator](){return super[Symbol.iterator]()}_normalizeKey(B){return W$.prototype._normalizeKey.call(this,B)}}}class jI extends X61.URL{}class J3 extends Error{get name(){return"MongoParseError"}}class K5 extends jI{constructor(F,A={}){var B;let{looseValidation:D}=A;if(!D&&!Z61(F))throw new J3('Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"');let J=F.match(Y61);if(!J)throw new J3(`Invalid connection string "${F}"`);let{protocol:X,username:Z,password:Y,hosts:$,rest:G}=(B=J.groups)!==null&&B!==void 0?B:{};if(!D){if(!X||!$)throw new J3(`Protocol and host list are required in "${F}"`);try{decodeURIComponent(Z!==null&&Z!==void 0?Z:""),decodeURIComponent(Y!==null&&Y!==void 0?Y:"")}catch(q){throw new J3(q.message)}let H=/[:/?#[\]@]/gi;if(Z===null||Z===void 0?void 0:Z.match(H))throw new J3(`Username contains unescaped characters ${Z}`);if(!Z||!Y){let q=F.replace(`${X}://`,"");if(q.startsWith("@")||q.startsWith(":"))throw new J3("URI contained empty userinfo section")}if(Y===null||Y===void 0?void 0:Y.match(H))throw new J3("Password contains unescaped characters")}let E="";if(typeof Z==="string")E+=Z;if(typeof Y==="string")E+=`:${Y}`;if(E)E+="@";try{super(`${X.toLowerCase()}://${E}${C5}${G}`)}catch(H){if(D)new K5(F,{...A,looseValidation:!1});if(typeof H.message==="string")H.message=H.message.replace(C5,$);throw H}if(this._hosts=$.split(","),!D){if(this.isSRV&&this.hosts.length!==1)throw new J3("mongodb+srv URI cannot have multiple service names");if(this.isSRV&&this.hosts.some((H)=>H.includes(":")))throw new J3("mongodb+srv URI cannot have port number")}if(!this.pathname)this.pathname="/";Object.setPrototypeOf(this.searchParams,$61(this.searchParams.constructor).prototype)}get host(){return C5}set host(F){throw new Error("No single host for connection string")}get hostname(){return C5}set hostname(F){throw new Error("No single host for connection string")}get port(){return""}set port(F){throw new Error("No single host for connection string")}get href(){return this.toString()}set href(F){throw new Error("Cannot set href for connection strings")}get isSRV(){return this.protocol.includes("srv")}get hosts(){return this._hosts}set hosts(F){this._hosts=F}toString(){return super.toString().replace(C5,this.hosts.join(","))}clone(){return new K5(this.toString(),{looseValidation:!0})}redact(F){return TI.redactValidConnectionString(this,F)}typedSearchParams(){return this.searchParams}[Symbol.for("nodejs.util.inspect.custom")](){let{href:F,origin:A,protocol:B,username:D,password:J,hosts:X,pathname:Z,search:Y,searchParams:$,hash:G}=this;return{href:F,origin:A,protocol:B,username:D,password:J,hosts:X,pathname:Z,search:Y,searchParams:$,hash:G}}}z$.ConnectionString=K5;class kI extends W${constructor(F){super();for(let A of(F!==null&&F!==void 0?F:"").split(",")){if(!A)continue;let B=A.indexOf(":");if(B===-1)this.set(A,"");else this.set(A.slice(0,B),A.slice(B+1))}}toString(){return[...this].map((F)=>F.join(":")).join(",")}}z$.CommaAndColonSeparatedRecord=kI;z$.default=K5});var SI=K((vQ1,H61)=>{H61.exports={name:"mongodb",version:"6.12.0",description:"The official MongoDB driver for Node.js",main:"lib/index.js",files:["lib","src","etc/prepare.js","mongodb.d.ts","tsconfig.json"],types:"mongodb.d.ts",repository:{type:"git",url:"git@github.com:mongodb/node-mongodb-native.git"},keywords:["mongodb","driver","official"],author:{name:"The MongoDB NodeJS Team",email:"dbx-node@mongodb.com"},dependencies:{"@mongodb-js/saslprep":"^1.1.9",bson:"^6.10.1","mongodb-connection-string-url":"^3.0.0"},peerDependencies:{"@aws-sdk/credential-providers":"^3.188.0","@mongodb-js/zstd":"^1.1.0 || ^2.0.0","gcp-metadata":"^5.2.0",kerberos:"^2.0.1","mongodb-client-encryption":">=6.0.0 <7",snappy:"^7.2.2",socks:"^2.7.1"},peerDependenciesMeta:{"@aws-sdk/credential-providers":{optional:!0},"@mongodb-js/zstd":{optional:!0},kerberos:{optional:!0},snappy:{optional:!0},"mongodb-client-encryption":{optional:!0},"gcp-metadata":{optional:!0},socks:{optional:!0}},devDependencies:{"@aws-sdk/credential-providers":"^3.686.0","@iarna/toml":"^2.2.5","@istanbuljs/nyc-config-typescript":"^1.0.2","@microsoft/api-extractor":"^7.47.11","@microsoft/tsdoc-config":"^0.17.0","@mongodb-js/zstd":"^2.0.0","@types/chai":"^4.3.17","@types/chai-subset":"^1.3.5","@types/express":"^4.17.21","@types/kerberos":"^1.1.5","@types/mocha":"^10.0.9","@types/node":"^22.9.0","@types/saslprep":"^1.0.3","@types/semver":"^7.5.8","@types/sinon":"^17.0.3","@types/sinon-chai":"^3.2.12","@types/whatwg-url":"^11.0.5","@typescript-eslint/eslint-plugin":"8.4.0","@typescript-eslint/parser":"8.4.0",chai:"^4.4.1","chai-subset":"^1.6.0",chalk:"^4.1.2",eslint:"9.9.0","eslint-config-prettier":"^9.1.0","eslint-plugin-mocha":"^10.4.1","eslint-plugin-prettier":"^5.2.1","eslint-plugin-simple-import-sort":"^12.1.1","eslint-plugin-tsdoc":"^0.3.0","eslint-plugin-unused-imports":"^4.1.4",express:"^4.21.1","gcp-metadata":"^5.3.0","js-yaml":"^4.1.0",mocha:"^10.8.2","mocha-sinon":"^2.1.2","mongodb-client-encryption":"^6.1.0","mongodb-legacy":"^6.1.3",nyc:"^15.1.0",prettier:"^3.3.3",semver:"^7.6.3",sinon:"^18.0.0","sinon-chai":"^3.7.0",snappy:"^7.2.2",socks:"^2.8.1","source-map-support":"^0.5.21","ts-node":"^10.9.2",tsd:"^0.31.2",typescript:"5.5","typescript-cached-transpile":"^0.0.6","v8-heapsnapshot":"^1.3.1",yargs:"^17.7.2"},license:"Apache-2.0",engines:{node:">=16.20.1"},bugs:{url:"https://jira.mongodb.org/projects/NODE/issues/"},homepage:"https://github.com/mongodb/node-mongodb-native",scripts:{"build:evergreen":"node .evergreen/generate_evergreen_tasks.js","build:ts":"node ./node_modules/typescript/bin/tsc","build:dts":"npm run build:ts && api-extractor run && node etc/clean_definition_files.cjs && ESLINT_USE_FLAT_CONFIG=false eslint --no-ignore --fix mongodb.d.ts lib/beta.d.ts","build:docs":"./etc/docs/build.ts","build:typedoc":"typedoc","build:nightly":"node ./.github/scripts/nightly.mjs","check:bench":"node test/benchmarks/driverBench","check:coverage":"nyc npm run test:all","check:integration-coverage":"nyc npm run check:test","check:lambda":"mocha --config test/mocha_lambda.json test/integration/node-specific/examples/handler.test.js","check:lambda:aws":"mocha --config test/mocha_lambda.json test/integration/node-specific/examples/aws_handler.test.js","check:lint":"npm run build:dts && npm run check:dts && npm run check:eslint && npm run check:tsd","check:eslint":"npm run build:dts && ESLINT_USE_FLAT_CONFIG=false eslint -v && ESLINT_USE_FLAT_CONFIG=false eslint --max-warnings=0 --ext '.js,.ts' src test","check:tsd":"tsd --version && tsd","check:dependencies":"mocha test/action/dependency.test.ts","check:dts":"node ./node_modules/typescript/bin/tsc --noEmit mongodb.d.ts && tsd","check:search-indexes":"nyc mocha --config test/mocha_mongodb.json test/manual/search-index-management.prose.test.ts","check:test":"mocha --config test/mocha_mongodb.json test/integration","check:unit":"mocha test/unit","check:ts":"node ./node_modules/typescript/bin/tsc -v && node ./node_modules/typescript/bin/tsc --noEmit","check:atlas":"mocha --config test/manual/mocharc.json test/manual/atlas_connectivity.test.ts","check:resource-management":"mocha --config test/manual/mocharc.json test/manual/resource_management.test.ts","check:drivers-atlas-testing":"mocha --config test/mocha_mongodb.json test/atlas/drivers_atlas_testing.test.ts","check:adl":"mocha --config test/mocha_mongodb.json test/manual/atlas-data-lake-testing","check:aws":"nyc mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_aws.test.ts","check:oidc-auth":"mocha --config test/mocha_mongodb.json test/integration/auth/auth.spec.test.ts","check:oidc-test":"mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_oidc.prose.test.ts","check:oidc-azure":"mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_oidc_azure.prose.05.test.ts","check:oidc-gcp":"mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_oidc_gcp.prose.06.test.ts","check:oidc-k8s":"mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_oidc_k8s.prose.07.test.ts","check:ocsp":"mocha --config test/manual/mocharc.json test/manual/ocsp_support.test.js","check:kerberos":"nyc mocha --config test/manual/mocharc.json test/manual/kerberos.test.ts","check:tls":"mocha --config test/manual/mocharc.json test/manual/tls_support.test.ts","check:ldap":"nyc mocha --config test/manual/mocharc.json test/manual/ldap.test.js","check:socks5":"mocha --config test/manual/mocharc.json test/manual/socks5.test.ts","check:csfle":"mocha --config test/mocha_mongodb.json test/integration/client-side-encryption","check:snappy":"mocha test/unit/assorted/snappy.test.js","check:x509":"mocha test/manual/x509_auth.test.ts","fix:eslint":"npm run check:eslint -- --fix",prepare:"node etc/prepare.js","preview:docs":"ts-node etc/docs/preview.ts",test:"npm run check:lint && npm run test:all","test:all":"npm run check:unit && npm run check:test","update:docs":"npm run build:docs -- --yes"},tsd:{directory:"test/types",compilerOptions:{strict:!0,target:"esnext",module:"commonjs",moduleResolution:"node"}}}});var C$=K((gI)=>{Object.defineProperty(gI,"__esModule",{value:!0});gI.LimitedSizeDocument=void 0;gI.makeClientMetadata=W61;gI.addContainerMetadata=C61;gI.getFAASEnv=_I;var U5=import.meta.require("os"),Q5=import.meta.require("process"),$7=I1(),uI=l(),q61=a(),xI=SI().version;class DB{constructor(F){this.maxSize=F,this.document=new Map,this.documentSize=5}ifItFitsItSits(F,A){let B=$7.BSON.serialize(new Map().set(F,A)).byteLength-5;if(B+this.documentSize>this.maxSize)return!1;return this.documentSize+=B,this.document.set(F,A),!0}toObject(){return $7.BSON.deserialize($7.BSON.serialize(this.document),{promoteLongs:!1,promoteBuffers:!1,promoteValues:!1,useBigInt64:!1})}}gI.LimitedSizeDocument=DB;function W61(F){let A=new DB(512),{appName:B=""}=F;if(B.length>0){let E=Buffer.byteLength(B,"utf8")<=128?F.appName:Buffer.from(B,"utf8").subarray(0,128).toString("utf8");A.ifItFitsItSits("application",{name:E})}let{name:D="",version:J="",platform:X=""}=F.driverInfo,Z={name:D.length>0?`nodejs|${D}`:"nodejs",version:J.length>0?`${xI}|${J}`:xI};if(!A.ifItFitsItSits("driver",Z))throw new uI.MongoInvalidArgumentError("Unable to include driverInfo name and version, metadata cannot exceed 512 bytes");let Y=K61();if(X.length>0)Y=`${Y}|${X}`;if(!A.ifItFitsItSits("platform",Y))throw new uI.MongoInvalidArgumentError("Unable to include driverInfo platform, metadata cannot exceed 512 bytes");let $=new Map().set("name",Q5.platform).set("architecture",Q5.arch).set("version",U5.release()).set("type",U5.type());if(!A.ifItFitsItSits("os",$))for(let E of $.keys()){if($.delete(E),$.size===0)break;if(A.ifItFitsItSits("os",$))break}let G=_I();if(G!=null){if(!A.ifItFitsItSits("env",G))for(let E of G.keys()){if(G.delete(E),G.size===0)break;if(A.ifItFitsItSits("env",G))break}}return A.toObject()}var fI;async function z61(){let F={};fI??=q61.fileIsAccessible("/.dockerenv");let A=await fI,{KUBERNETES_SERVICE_HOST:B=""}=Q5.env,D=B.length>0?!0:!1;if(A)F.runtime="docker";if(D)F.orchestrator="kubernetes";return F}async function C61(F){let A=await z61();if(Object.keys(A).length===0)return F;let B=new DB(512),D={...F?.env,container:A};for(let[J,X]of Object.entries(F))if(J!=="env")B.ifItFitsItSits(J,X);else if(!B.ifItFitsItSits("env",D))B.ifItFitsItSits("env",X);if(!("env"in F))B.ifItFitsItSits("env",D);return B.toObject()}function _I(){let{AWS_EXECUTION_ENV:F="",AWS_LAMBDA_RUNTIME_API:A="",FUNCTIONS_WORKER_RUNTIME:B="",K_SERVICE:D="",FUNCTION_NAME:J="",VERCEL:X="",AWS_LAMBDA_FUNCTION_MEMORY_SIZE:Z="",AWS_REGION:Y="",FUNCTION_MEMORY_MB:$="",FUNCTION_REGION:G="",FUNCTION_TIMEOUT_SEC:E="",VERCEL_REGION:H=""}=Q5.env,q=F.startsWith("AWS_Lambda_")||A.length>0,W=B.length>0,z=D.length>0||J.length>0,C=X.length>0,U=new Map;if(C&&!(W||z)){if(H.length>0)U.set("region",H);return U.set("name","vercel"),U}if(q&&!(W||z||C)){if(Y.length>0)U.set("region",Y);if(Z.length>0&&Number.isInteger(+Z))U.set("memory_mb",new $7.Int32(Z));return U.set("name","aws.lambda"),U}if(W&&!(z||q||C))return U.set("name","azure.func"),U;if(z&&!(W||q||C)){if(G.length>0)U.set("region",G);if($.length>0&&Number.isInteger(+$))U.set("memory_mb",new $7.Int32($));if(E.length>0&&Number.isInteger(+E))U.set("timeout_sec",new $7.Int32(E));return U.set("name","gcp.func"),U}return null}function K61(){if("Deno"in globalThis)return`Deno v${typeof Deno?.version?.deno==="string"?Deno?.version?.deno:"0.0.0-unknown"}, ${U5.endianness()}`;if("Bun"in globalThis)return`Bun v${typeof Bun?.version==="string"?Bun?.version:"0.0.0-unknown"}, ${U5.endianness()}`;return`Node.js ${Q5.version}, ${U5.endianness()}`}});var V5=K((pI)=>{Object.defineProperty(pI,"__esModule",{value:!0});pI.OpCompressedRequest=pI.OpMsgResponse=pI.OpMsgRequest=pI.DocumentSequence=pI.OpReply=pI.OpQueryRequest=void 0;var H7=I1(),L5=l(),K$=R5(),G7=l4(),E7=0,V61=2,R61=4,w61=8,I61=16,N61=32,P61=64,M61=128,T61=1,j61=2,k61=4,O61=8,S61=H7.BSON.onDemand.ByteUtils.encodeUTF8Into;class Q${constructor(F,A,B){this.databaseName=F,this.query=A,this.moreToCome=!1;let D=`${F}.$cmd`;if(typeof F!=="string")throw new L5.MongoRuntimeError("Database name must be a string for a query");if(A==null)throw new L5.MongoRuntimeError("A query document must be specified for query");if(D.indexOf("\x00")!==-1)throw new L5.MongoRuntimeError("Namespace cannot contain a null character");this.ns=D,this.numberToSkip=B.numberToSkip||0,this.numberToReturn=B.numberToReturn||0,this.returnFieldSelector=B.returnFieldSelector||void 0,this.requestId=B.requestId??Q$.getRequestId(),this.pre32Limit=B.pre32Limit,this.serializeFunctions=typeof B.serializeFunctions==="boolean"?B.serializeFunctions:!1,this.ignoreUndefined=typeof B.ignoreUndefined==="boolean"?B.ignoreUndefined:!1,this.maxBsonSize=B.maxBsonSize||16777216,this.checkKeys=typeof B.checkKeys==="boolean"?B.checkKeys:!1,this.batchSize=this.numberToReturn,this.tailable=!1,this.secondaryOk=typeof B.secondaryOk==="boolean"?B.secondaryOk:!1,this.oplogReplay=!1,this.noCursorTimeout=!1,this.awaitData=!1,this.exhaust=!1,this.partial=!1}incRequestId(){this.requestId=E7++}nextRequestId(){return E7+1}static getRequestId(){return++E7}toBin(){let F=[],A=null,B=0;if(this.tailable)B|=V61;if(this.secondaryOk)B|=R61;if(this.oplogReplay)B|=w61;if(this.noCursorTimeout)B|=I61;if(this.awaitData)B|=N61;if(this.exhaust)B|=P61;if(this.partial)B|=M61;if(this.batchSize!==this.numberToReturn)this.numberToReturn=this.batchSize;let D=Buffer.alloc(20+Buffer.byteLength(this.ns)+1+4+4);F.push(D);let J=H7.serialize(this.query,{checkKeys:this.checkKeys,serializeFunctions:this.serializeFunctions,ignoreUndefined:this.ignoreUndefined});if(F.push(J),this.returnFieldSelector&&Object.keys(this.returnFieldSelector).length>0)A=H7.serialize(this.returnFieldSelector,{checkKeys:this.checkKeys,serializeFunctions:this.serializeFunctions,ignoreUndefined:this.ignoreUndefined}),F.push(A);let X=D.length+J.length+(A?A.length:0),Z=4;return D[3]=X>>24&255,D[2]=X>>16&255,D[1]=X>>8&255,D[0]=X&255,D[Z+3]=this.requestId>>24&255,D[Z+2]=this.requestId>>16&255,D[Z+1]=this.requestId>>8&255,D[Z]=this.requestId&255,Z=Z+4,D[Z+3]=0,D[Z+2]=0,D[Z+1]=0,D[Z]=0,Z=Z+4,D[Z+3]=G7.OP_QUERY>>24&255,D[Z+2]=G7.OP_QUERY>>16&255,D[Z+1]=G7.OP_QUERY>>8&255,D[Z]=G7.OP_QUERY&255,Z=Z+4,D[Z+3]=B>>24&255,D[Z+2]=B>>16&255,D[Z+1]=B>>8&255,D[Z]=B&255,Z=Z+4,Z=Z+D.write(this.ns,Z,"utf8")+1,D[Z-1]=0,D[Z+3]=this.numberToSkip>>24&255,D[Z+2]=this.numberToSkip>>16&255,D[Z+1]=this.numberToSkip>>8&255,D[Z]=this.numberToSkip&255,Z=Z+4,D[Z+3]=this.numberToReturn>>24&255,D[Z+2]=this.numberToReturn>>16&255,D[Z+1]=this.numberToReturn>>8&255,D[Z]=this.numberToReturn&255,Z=Z+4,F}}pI.OpQueryRequest=Q$;class vI{constructor(F,A,B,D){this.index=0,this.sections=[],this.moreToCome=!1,this.parsed=!1,this.raw=F,this.data=B,this.opts=D??{useBigInt64:!1,promoteLongs:!0,promoteValues:!0,promoteBuffers:!1,bsonRegExp:!1},this.length=A.length,this.requestId=A.requestId,this.responseTo=A.responseTo,this.opCode=A.opCode,this.fromCompressed=A.fromCompressed,this.useBigInt64=typeof this.opts.useBigInt64==="boolean"?this.opts.useBigInt64:!1,this.promoteLongs=typeof this.opts.promoteLongs==="boolean"?this.opts.promoteLongs:!0,this.promoteValues=typeof this.opts.promoteValues==="boolean"?this.opts.promoteValues:!0,this.promoteBuffers=typeof this.opts.promoteBuffers==="boolean"?this.opts.promoteBuffers:!1,this.bsonRegExp=typeof this.opts.bsonRegExp==="boolean"?this.opts.bsonRegExp:!1}isParsed(){return this.parsed}parse(){if(this.parsed)return this.sections[0];if(this.index=20,this.responseFlags=this.data.readInt32LE(0),this.cursorId=new H7.Long(this.data.readInt32LE(4),this.data.readInt32LE(8)),this.startingFrom=this.data.readInt32LE(12),this.numberReturned=this.data.readInt32LE(16),this.numberReturned<0||this.numberReturned>4294967295)throw new RangeError(`OP_REPLY numberReturned is an invalid array length ${this.numberReturned}`);this.cursorNotFound=(this.responseFlags&T61)!==0,this.queryFailure=(this.responseFlags&j61)!==0,this.shardConfigStale=(this.responseFlags&k61)!==0,this.awaitCapable=(this.responseFlags&O61)!==0;for(let F=0;F<this.numberReturned;F++){let A=this.data[this.index]|this.data[this.index+1]<<8|this.data[this.index+2]<<16|this.data[this.index+3]<<24,B=this.data.subarray(this.index,this.index+A);this.sections.push(B),this.index=this.index+A}return this.parsed=!0,this.sections[0]}}pI.OpReply=vI;var hI=1,mI=2,dI=65536;class L${constructor(F,A){this.field=F,this.documents=[],this.chunks=[],this.serializedDocumentsLength=0;let B=Buffer.allocUnsafe(5+this.field.length+1);if(B[0]=1,S61(B,`${this.field}\x00`,5),this.chunks.push(B),this.header=B,A)for(let D of A)this.push(D,H7.serialize(D))}push(F,A){return this.serializedDocumentsLength+=A.length,this.documents.push(F),this.chunks.push(A),this.header?.writeInt32LE(4+this.field.length+1+this.serializedDocumentsLength,1),this.serializedDocumentsLength+this.header.length}toBin(){return Buffer.concat(this.chunks)}}pI.DocumentSequence=L$;class JB{constructor(F,A,B){if(this.databaseName=F,this.command=A,this.options=B,A==null)throw new L5.MongoInvalidArgumentError("Query document must be specified for query");this.command.$db=F,this.options=B??{},this.requestId=B.requestId?B.requestId:JB.getRequestId(),this.serializeFunctions=typeof B.serializeFunctions==="boolean"?B.serializeFunctions:!1,this.ignoreUndefined=typeof B.ignoreUndefined==="boolean"?B.ignoreUndefined:!1,this.checkKeys=typeof B.checkKeys==="boolean"?B.checkKeys:!1,this.maxBsonSize=B.maxBsonSize||16777216,this.checksumPresent=!1,this.moreToCome=B.moreToCome??A.writeConcern?.w===0,this.exhaustAllowed=typeof B.exhaustAllowed==="boolean"?B.exhaustAllowed:!1}toBin(){let F=[],A=0;if(this.checksumPresent)A|=hI;if(this.moreToCome)A|=mI;if(this.exhaustAllowed)A|=dI;let B=Buffer.alloc(20);F.push(B);let D=B.length,J=this.command;return D+=this.makeSections(F,J),B.writeInt32LE(D,0),B.writeInt32LE(this.requestId,4),B.writeInt32LE(0,8),B.writeInt32LE(G7.OP_MSG,12),B.writeUInt32LE(A,16),F}makeSections(F,A){let B=this.extractDocumentSequences(A),D=Buffer.allocUnsafe(1);D[0]=0;let J=this.serializeBson(A);return F.push(D),F.push(J),F.push(B),D.length+J.length+B.length}extractDocumentSequences(F){let A=[];for(let[B,D]of Object.entries(F))if(D instanceof L$)A.push(D.toBin()),delete F[B];if(A.length>0)return Buffer.concat(A);return Buffer.alloc(0)}serializeBson(F){return H7.serialize(F,{checkKeys:this.checkKeys,serializeFunctions:this.serializeFunctions,ignoreUndefined:this.ignoreUndefined})}static getRequestId(){return E7=E7+1&2147483647,E7}}pI.OpMsgRequest=JB;class cI{constructor(F,A,B,D){this.index=0,this.sections=[],this.parsed=!1,this.raw=F,this.data=B,this.opts=D??{useBigInt64:!1,promoteLongs:!0,promoteValues:!0,promoteBuffers:!1,bsonRegExp:!1},this.length=A.length,this.requestId=A.requestId,this.responseTo=A.responseTo,this.opCode=A.opCode,this.fromCompressed=A.fromCompressed,this.responseFlags=B.readInt32LE(0),this.checksumPresent=(this.responseFlags&hI)!==0,this.moreToCome=(this.responseFlags&mI)!==0,this.exhaustAllowed=(this.responseFlags&dI)!==0,this.useBigInt64=typeof this.opts.useBigInt64==="boolean"?this.opts.useBigInt64:!1,this.promoteLongs=typeof this.opts.promoteLongs==="boolean"?this.opts.promoteLongs:!0,this.promoteValues=typeof this.opts.promoteValues==="boolean"?this.opts.promoteValues:!0,this.promoteBuffers=typeof this.opts.promoteBuffers==="boolean"?this.opts.promoteBuffers:!1,this.bsonRegExp=typeof this.opts.bsonRegExp==="boolean"?this.opts.bsonRegExp:!1}isParsed(){return this.parsed}parse(){if(this.parsed)return this.sections[0];this.index=4;while(this.index<this.data.length){let F=this.data.readUInt8(this.index++);if(F===0){let A=this.data.readUInt32LE(this.index),B=this.data.subarray(this.index,this.index+A);this.sections.push(B),this.index+=A}else if(F===1)throw new L5.MongoRuntimeError("OP_MSG Payload Type 1 detected unsupported protocol")}return this.parsed=!0,this.sections[0]}}pI.OpMsgResponse=cI;var U$=16,yI=9;class lI{constructor(F,A){this.command=F,this.options=A}static canCompress(F){let A=F instanceof JB?F.command:F.query,B=Object.keys(A)[0];return!K$.uncompressibleCommands.has(B)}async toBin(){let F=Buffer.concat(this.command.toBin()),A=F.slice(U$),B=F.readInt32LE(12),D=await K$.compress(this.options,A),J=Buffer.alloc(U$);J.writeInt32LE(U$+yI+D.length,0),J.writeInt32LE(this.command.requestId,4),J.writeInt32LE(0,8),J.writeInt32LE(G7.OP_COMPRESSED,12);let X=Buffer.alloc(yI);return X.writeInt32LE(B,0),X.writeInt32LE(A.length,4),X.writeUInt8(K$.Compressor[this.options.agreedCompressor],8),[J,X,D]}}pI.OpCompressedRequest=lI});var R5=K((oI)=>{Object.defineProperty(oI,"__esModule",{value:!0});oI.uncompressibleCommands=oI.Compressor=void 0;oI.compress=m61;oI.decompress=rI;oI.compressCommand=d61;oI.decompressResponse=c61;var nI=import.meta.require("util"),XB=import.meta.require("zlib"),b61=K0(),sI=y6(),R$=l(),q7=V5(),V$=l4();oI.Compressor=Object.freeze({none:0,snappy:1,zlib:2,zstd:3});oI.uncompressibleCommands=new Set([b61.LEGACY_HELLO_COMMAND,"saslStart","saslContinue","getnonce","authenticate","createUser","updateUser","copydbSaslStart","copydbgetnonce","copydb"]);var y61=3,v61=nI.promisify(XB.inflate.bind(XB)),h61=nI.promisify(XB.deflate.bind(XB)),W4,B9=null;function aI(){if(B9==null){let F=sI.getSnappy();if("kModuleError"in F)throw F.kModuleError;B9=F}return B9}async function m61(F,A){let B={};switch(F.agreedCompressor){case"snappy":return B9??=aI(),await B9.compress(A);case"zstd":{if(tI(),"kModuleError"in W4)throw W4.kModuleError;return await W4.compress(A,y61)}case"zlib":{if(F.zlibCompressionLevel)B.level=F.zlibCompressionLevel;return await h61(A,B)}default:throw new R$.MongoInvalidArgumentError(`Unknown compressor ${F.agreedCompressor} failed to compress`)}}async function rI(F,A){if(F!==oI.Compressor.snappy&&F!==oI.Compressor.zstd&&F!==oI.Compressor.zlib&&F!==oI.Compressor.none)throw new R$.MongoDecompressionError(`Server sent message compressed using an unsupported compressor. (Received compressor ID ${F})`);switch(F){case oI.Compressor.snappy:return B9??=aI(),await B9.uncompress(A,{asBuffer:!0});case oI.Compressor.zstd:{if(tI(),"kModuleError"in W4)throw W4.kModuleError;return await W4.decompress(A)}case oI.Compressor.zlib:return await v61(A);default:return A}}function tI(){if(!W4)W4=sI.getZstdLibrary()}var w5=16;async function d61(F,A){let D=await(A.agreedCompressor==="none"||!q7.OpCompressedRequest.canCompress(F)?F:new q7.OpCompressedRequest(F,{agreedCompressor:A.agreedCompressor??"none",zlibCompressionLevel:A.zlibCompressionLevel??0})).toBin();return Buffer.concat(D)}async function c61(F){let A={length:F.readInt32LE(0),requestId:F.readInt32LE(4),responseTo:F.readInt32LE(8),opCode:F.readInt32LE(12)};if(A.opCode!==V$.OP_COMPRESSED){let Y=A.opCode===V$.OP_MSG?q7.OpMsgResponse:q7.OpReply,$=F.subarray(w5);return new Y(F,A,$)}let B={...A,fromCompressed:!0,opCode:F.readInt32LE(w5),length:F.readInt32LE(w5+4)},D=F[w5+8],J=F.slice(w5+9),X=B.opCode===V$.OP_MSG?q7.OpMsgResponse:q7.OpReply,Z=await rI(D,J);if(Z.length!==B.length)throw new R$.MongoDecompressionError("Message body and message header must be the same length");return new X(F,B,Z)}});var I$=K((FN)=>{Object.defineProperty(FN,"__esModule",{value:!0});FN.hmacSha256Hook=FN.hmacSha512Hook=FN.aes256CtrDecryptHook=FN.aes256CtrEncryptHook=FN.aes256CbcDecryptHook=FN.aes256CbcEncryptHook=void 0;FN.makeAES256Hook=N5;FN.randomHook=s61;FN.sha256Hook=a61;FN.makeHmacHook=w$;FN.signRsaSha256Hook=r61;var I5=import.meta.require("crypto");function N5(F,A){return function(B,D,J,X){let Z;try{let Y=I5[F](A,B,D);Y.setAutoPadding(!1),Z=Y.update(J);let $=Y.final();if($.length>0)Z=Buffer.concat([Z,$])}catch(Y){return Y}return Z.copy(X),Z.length}}function s61(F,A){try{I5.randomFillSync(F,0,A)}catch(B){return B}return A}function a61(F,A){let B;try{B=I5.createHash("sha256").update(F).digest()}catch(D){return D}return B.copy(A),B.length}function w$(F){return(A,B,D)=>{let J;try{J=I5.createHmac(F,A).update(B).digest()}catch(X){return X}return J.copy(D),J.length}}function r61(F,A,B){let D;try{let J=I5.createSign("sha256WithRSAEncryption"),X=Buffer.from(`-----BEGIN PRIVATE KEY-----
27
+ ${F.toString("base64")}
28
+ -----END PRIVATE KEY-----
29
+ `);D=J.update(A).end().sign(X)}catch(J){return J}return D.copy(B),D.length}FN.aes256CbcEncryptHook=N5("createCipheriv","aes-256-cbc");FN.aes256CbcDecryptHook=N5("createDecipheriv","aes-256-cbc");FN.aes256CtrEncryptHook=N5("createCipheriv","aes-256-ctr");FN.aes256CtrDecryptHook=N5("createDecipheriv","aes-256-ctr");FN.hmacSha512Hook=w$("sha512");FN.hmacSha256Hook=w$("sha256")});var W7=K((YN)=>{Object.defineProperty(YN,"__esModule",{value:!0});YN.MongoCryptKMSRequestNetworkTimeoutError=YN.MongoCryptAzureKMSRequestError=YN.MongoCryptCreateEncryptedCollectionError=YN.MongoCryptCreateDataKeyError=YN.MongoCryptInvalidArgumentError=YN.MongoCryptError=void 0;var Y31=l();class D9 extends Y31.MongoError{constructor(F,A={}){super(F,A)}get name(){return"MongoCryptError"}}YN.MongoCryptError=D9;class BN extends D9{constructor(F){super(F)}get name(){return"MongoCryptInvalidArgumentError"}}YN.MongoCryptInvalidArgumentError=BN;class DN extends D9{constructor(F,{cause:A}){super(`Unable to complete creating data keys: ${A.message}`,{cause:A});this.encryptedFields=F}get name(){return"MongoCryptCreateDataKeyError"}}YN.MongoCryptCreateDataKeyError=DN;class JN extends D9{constructor(F,{cause:A}){super(`Unable to create collection: ${A.message}`,{cause:A});this.encryptedFields=F}get name(){return"MongoCryptCreateEncryptedCollectionError"}}YN.MongoCryptCreateEncryptedCollectionError=JN;class XN extends D9{constructor(F,A){super(F);this.body=A}get name(){return"MongoCryptAzureKMSRequestError"}}YN.MongoCryptAzureKMSRequestError=XN;class ZN extends D9{get name(){return"MongoCryptKMSRequestNetworkTimeoutError"}}YN.MongoCryptKMSRequestNetworkTimeoutError=ZN});var P$=K((qN)=>{Object.defineProperty(qN,"__esModule",{value:!0});qN.LegacyAWSTemporaryCredentialProvider=qN.AWSSDKCredentialProvider=qN.AWSTemporaryCredentialProvider=void 0;var W31=y6(),z31=l(),ZB=a(),C31="http://169.254.170.2",N$="http://169.254.169.254",GN="/latest/meta-data/iam/security-credentials";class h6{static get awsSDK(){return h6._awsSDK??=W31.getAwsCredentialProvider(),h6._awsSDK}static get isAWSSDKInstalled(){return!("kModuleError"in h6.awsSDK)}}qN.AWSTemporaryCredentialProvider=h6;class EN extends h6{get provider(){if("kModuleError"in h6.awsSDK)throw h6.awsSDK.kModuleError;if(this._provider)return this._provider;let{AWS_STS_REGIONAL_ENDPOINTS:F="",AWS_REGION:A=""}=process.env;F=F.toLowerCase(),A=A.toLowerCase();let B=A.length!==0&&F.length!==0,J=F==="regional"||F==="legacy"&&!new Set(["ap-northeast-1","ap-south-1","ap-southeast-1","ap-southeast-2","aws-global","ca-central-1","eu-central-1","eu-north-1","eu-west-1","eu-west-2","eu-west-3","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]).has(A);return this._provider=B&&J?h6.awsSDK.fromNodeProviderChain({clientConfig:{region:A}}):h6.awsSDK.fromNodeProviderChain(),this._provider}async getCredentials(){try{let F=await this.provider();return{AccessKeyId:F.accessKeyId,SecretAccessKey:F.secretAccessKey,Token:F.sessionToken,Expiration:F.expiration}}catch(F){throw new z31.MongoAWSError(F.message,{cause:F})}}}qN.AWSSDKCredentialProvider=EN;class HN extends h6{async getCredentials(){if(process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI)return await ZB.request(`${C31}${process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI}`);let F=await ZB.request(`${N$}/latest/api/token`,{method:"PUT",json:!1,headers:{"X-aws-ec2-metadata-token-ttl-seconds":30}}),A=await ZB.request(`${N$}/${GN}`,{json:!1,headers:{"X-aws-ec2-metadata-token":F}});return await ZB.request(`${N$}/${GN}/${A}`,{headers:{"X-aws-ec2-metadata-token":F}})}}qN.LegacyAWSTemporaryCredentialProvider=HN});var CN=K((zN)=>{Object.defineProperty(zN,"__esModule",{value:!0});zN.loadAWSCredentials=L31;var Q31=P$();async function L31(F){let A=new Q31.AWSSDKCredentialProvider,{SecretAccessKey:B="",AccessKeyId:D="",Token:J}=await A.getCredentials(),X={secretAccessKey:B,accessKeyId:D};return J!=null&&(X.sessionToken=J),{...F,aws:X}}});var j$=K((LN)=>{Object.defineProperty(LN,"__esModule",{value:!0});LN.tokenCache=LN.AzureCredentialCache=LN.AZURE_BASE_URL=void 0;LN.addAzureParams=KN;LN.prepareRequest=UN;LN.fetchAzureKMSToken=QN;LN.loadAzureCredentials=P31;var R31=l(),w31=a(),z7=W7(),I31=6000;LN.AZURE_BASE_URL="http://169.254.169.254/metadata/identity/oauth2/token?";class M${constructor(){this.cachedToken=null}async getToken(){if(this.cachedToken==null||this.needsRefresh(this.cachedToken))this.cachedToken=await this._getToken();return{accessToken:this.cachedToken.accessToken}}needsRefresh(F){return F.expiresOnTimestamp-Date.now()<=I31}resetCache(){this.cachedToken=null}_getToken(){return QN()}}LN.AzureCredentialCache=M$;LN.tokenCache=new M$;async function N31(F){let{status:A,body:B}=F,D=(()=>{try{return JSON.parse(B)}catch{throw new z7.MongoCryptAzureKMSRequestError("Malformed JSON body in GET request.")}})();if(A!==200)throw new z7.MongoCryptAzureKMSRequestError("Unable to complete request.",D);if(!D.access_token)throw new z7.MongoCryptAzureKMSRequestError("Malformed response body - missing field `access_token`.");if(!D.expires_in)throw new z7.MongoCryptAzureKMSRequestError("Malformed response body - missing field `expires_in`.");let J=Number(D.expires_in)*1000;if(Number.isNaN(J))throw new z7.MongoCryptAzureKMSRequestError("Malformed response body - unable to parse int from `expires_in` field.");return{accessToken:D.access_token,expiresOnTimestamp:Date.now()+J}}function KN(F,A,B){if(F.searchParams.append("api-version","2018-02-01"),F.searchParams.append("resource",A),B)F.searchParams.append("client_id",B);return F}function UN(F){let A=new URL(F.url?.toString()??LN.AZURE_BASE_URL);return KN(A,"https://vault.azure.net"),{headers:{...F.headers,"Content-Type":"application/json",Metadata:!0},url:A}}async function QN(F={}){let{headers:A,url:B}=UN(F);try{let D=await w31.get(B,{headers:A});return await N31(D)}catch(D){if(D instanceof R31.MongoNetworkTimeoutError)throw new z7.MongoCryptAzureKMSRequestError(`[Azure KMS] ${D.message}`);throw D}}async function P31(F){let A=await LN.tokenCache.getToken();return{...F,azure:A}}});var wN=K((RN)=>{Object.defineProperty(RN,"__esModule",{value:!0});RN.loadGCPCredentials=u31;var S31=y6();async function u31(F){let A=S31.getGcpMetadata();if("kModuleError"in A)return F;let{access_token:B}=await A.instance({property:"service-accounts/default/token"});return{...F,gcp:{accessToken:B}}}});var k$=K((IN)=>{Object.defineProperty(IN,"__esModule",{value:!0});IN.isEmptyCredentials=YB;IN.refreshKMSCredentials=b31;var f31=CN(),_31=j$(),g31=wN();function YB(F,A){let B=A[F];if(B==null)return!1;return typeof B==="object"&&Object.keys(B).length===0}async function b31(F){let A=F;if(YB("aws",F))A=await f31.loadAWSCredentials(A);if(YB("gcp",F))A=await g31.loadGCPCredentials(A);if(YB("azure",F))A=await _31.loadAzureCredentials(A);return A}});var O$=K((gN)=>{Object.defineProperty(gN,"__esModule",{value:!0});gN.StateMachine=void 0;var NN=import.meta.require("fs/promises"),h31=import.meta.require("net"),m31=import.meta.require("tls"),M3=I1(),PN=B2(),d31=y6(),c31=l(),MN=o0(),C7=a(),l31=GB(),z4=W7(),P5=null;function p31(){if(P5==null){let F=d31.getSocks();if("kModuleError"in F)throw F.kModuleError;P5=F}return P5}var $B=0,jN=1,kN=2,ON=3,SN=7,uN=4,xN=5,fN=6,i31=443,n31=new Map([[$B,"MONGOCRYPT_CTX_ERROR"],[jN,"MONGOCRYPT_CTX_NEED_MONGO_COLLINFO"],[kN,"MONGOCRYPT_CTX_NEED_MONGO_MARKINGS"],[ON,"MONGOCRYPT_CTX_NEED_MONGO_KEYS"],[SN,"MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS"],[uN,"MONGOCRYPT_CTX_NEED_KMS"],[xN,"MONGOCRYPT_CTX_READY"],[fN,"MONGOCRYPT_CTX_DONE"]]),s31=["tlsInsecure","tlsAllowInvalidCertificates","tlsAllowInvalidHostnames","tlsDisableOCSPEndpointCheck","tlsDisableCertificateRevocationCheck"];function TN(F){if(process.env.MONGODB_CRYPT_DEBUG)console.error(F)}var a31;class _N{constructor(F,A=M3.pluckBSONSerializeOptions(F)){this.options=F,this.bsonOptions=A}async execute(F,A,B){let{_keyVaultNamespace:D,_keyVaultClient:J,_metaDataClient:X,_mongocryptdClient:Z,_mongocryptdManager:Y}=F,$=null;while(A.state!==fN&&A.state!==$B)switch(TN(`[context#${A.id}] ${n31.get(A.state)||A.state}`),A.state){case jN:{let G=M3.deserialize(A.nextMongoOperation());if(!X)throw new z4.MongoCryptError("unreachable state machine state: entered MONGOCRYPT_CTX_NEED_MONGO_COLLINFO but metadata client is undefined");let E=await this.fetchCollectionInfo(X,A.ns,G,B);if(E)A.addMongoOperationResponse(E);A.finishMongoOperation();break}case kN:{let G=A.nextMongoOperation();if(!Z)throw new z4.MongoCryptError("unreachable state machine state: entered MONGOCRYPT_CTX_NEED_MONGO_MARKINGS but mongocryptdClient is undefined");let E=Y?await Y.withRespawn(this.markCommand.bind(this,Z,A.ns,G,B)):await this.markCommand(Z,A.ns,G,B);A.addMongoOperationResponse(E),A.finishMongoOperation();break}case ON:{let G=A.nextMongoOperation(),E=await this.fetchKeys(J,D,G,B);if(E.length===0)$=a31??=M3.serialize({v:[]});for await(let H of E)A.addMongoOperationResponse(M3.serialize(H));A.finishMongoOperation();break}case SN:{let G=await F.askForKMSCredentials();A.provideKMSProviders(M3.serialize(G));break}case uN:{await Promise.all(this.requests(A,B)),A.finishKMSRequests();break}case xN:{let G=A.finalize();if(A.state===$B){let E=A.status.message||"Finalization error";throw new z4.MongoCryptError(E)}$=G;break}default:throw new z4.MongoCryptError(`Unknown state: ${A.state}`)}if(A.state===$B||$==null){let G=A.status.message;if(!G)TN("unidentifiable error in MongoCrypt - received an error status from `libmongocrypt` but received no error message.");throw new z4.MongoCryptError(G??"unidentifiable error in MongoCrypt - received an error status from `libmongocrypt` but received no error message.")}return $}async kmsRequest(F,A){let B=F.endpoint.split(":"),D=B[1]!=null?Number.parseInt(B[1],10):i31,J=l31.autoSelectSocketOptions(this.options.socketOptions||{}),X={host:B[0],servername:B[0],port:D,...J},Z=F.message,Y=new C7.BufferPool,$=new h31.Socket,G;function E(){for(let Q of[G,$])if(Q)Q.removeAllListeners(),Q.destroy()}function H(Q){return new z4.MongoCryptError("KMS request failed",{cause:Q})}function q(){return new z4.MongoCryptError("KMS request closed")}let W=this.options.tlsOptions;if(W){let Q=F.kmsProvider,L=W[Q];if(L){let V=this.validateTlsOptions(Q,L);if(V)throw V;try{await this.setTlsOptions(L,X)}catch(w){throw H(w)}}}let{promise:z,reject:C,resolve:U}=C7.promiseWithResolvers();$.once("error",(Q)=>C(H(Q))).once("close",()=>C(q())).once("connect",()=>U());try{if(this.options.proxyOptions&&this.options.proxyOptions.proxyHost){let w={host:this.options.proxyOptions.proxyHost,port:this.options.proxyOptions.proxyPort||1080,...J};$.connect(w),await z;try{P5??=p31(),X.socket=(await P5.SocksClient.createConnection({existing_socket:$,command:"connect",destination:{host:X.host,port:X.port},proxy:{host:"iLoveJavaScript",port:0,type:5,userId:this.options.proxyOptions.proxyUsername,password:this.options.proxyOptions.proxyPassword}})).socket}catch(j){throw H(j)}}G=m31.connect(X,()=>{G.write(Z)});let{promise:Q,reject:L,resolve:V}=C7.promiseWithResolvers();G.once("error",(w)=>L(H(w))).once("close",()=>L(q())).on("data",(w)=>{Y.append(w);while(F.bytesNeeded>0&&Y.length){let j=Math.min(F.bytesNeeded,Y.length);F.addResponse(Y.read(j))}if(F.bytesNeeded<=0)V()}),await(A?.csotEnabled()?Promise.all([Q,MN.Timeout.expires(A?.remainingTimeMS)]):Q)}catch(Q){if(Q instanceof MN.TimeoutError)throw new c31.MongoOperationTimeoutError("KMS request timed out");throw Q}finally{E()}}*requests(F,A){for(let B=F.nextKMSRequest();B!=null;B=F.nextKMSRequest())yield this.kmsRequest(B,A)}validateTlsOptions(F,A){let B=Object.keys(A);for(let D of s31)if(B.includes(D))return new z4.MongoCryptError(`Insecure TLS options prohibited for ${F}: ${D}`)}async setTlsOptions(F,A){if(F.tlsCertificateKeyFile){let B=await NN.readFile(F.tlsCertificateKeyFile);A.cert=A.key=B}if(F.tlsCAFile)A.ca=await NN.readFile(F.tlsCAFile);if(F.tlsCertificateKeyFilePassword)A.passphrase=F.tlsCertificateKeyFilePassword}async fetchCollectionInfo(F,A,B,D){let{db:J}=C7.MongoDBCollectionNamespace.fromString(A),Z=await F.db(J).listCollections(B,{promoteLongs:!1,promoteValues:!1,timeoutContext:D&&new PN.CursorTimeoutContext(D,Symbol())}).toArray();return Z.length>0?M3.serialize(Z[0]):null}async markCommand(F,A,B,D){let{db:J}=C7.MongoDBCollectionNamespace.fromString(A),X={promoteLongs:!1,promoteValues:!1},Z=M3.deserialize(B,X),Y=await F.db(J).command(Z,{...X,...D?.csotEnabled()?{timeoutMS:D?.remainingTimeMS}:void 0});return M3.serialize(Y,this.bsonOptions)}fetchKeys(F,A,B,D){let{db:J,collection:X}=C7.MongoDBCollectionNamespace.fromString(A);return F.db(J).collection(X,{readConcern:{level:"majority"}}).find(M3.deserialize(B),{timeoutContext:D&&new PN.CursorTimeoutContext(D,Symbol())}).toArray()}}gN.StateMachine=_N});var GB=K((yN)=>{Object.defineProperty(yN,"__esModule",{value:!0});yN.ClientEncryption=void 0;yN.autoSelectSocketOptions=T5;var O2=I1(),r31=y6(),M5=o0(),S2=a(),t31=I$(),J9=W7(),o31=k$(),EB=O$();class HB{static getMongoCrypt(){let F=r31.getMongoDBClientEncryption();if("kModuleError"in F)throw F.kModuleError;return F.MongoCrypt}constructor(F,A){this._client=F,this._proxyOptions=A.proxyOptions??{},this._tlsOptions=A.tlsOptions??{},this._kmsProviders=A.kmsProviders||{};let{timeoutMS:B}=S2.resolveTimeoutOptions(F,A);if(this._timeoutMS=B,A.keyVaultNamespace==null)throw new J9.MongoCryptInvalidArgumentError("Missing required option `keyVaultNamespace`");let D={...A,cryptoCallbacks:t31,kmsProviders:!Buffer.isBuffer(this._kmsProviders)?O2.serialize(this._kmsProviders):this._kmsProviders};this._keyVaultNamespace=A.keyVaultNamespace,this._keyVaultClient=A.keyVaultClient||F;let J=HB.getMongoCrypt();this._mongoCrypt=new J(D)}async createDataKey(F,A={}){if(A.keyAltNames&&!Array.isArray(A.keyAltNames))throw new J9.MongoCryptInvalidArgumentError(`Option "keyAltNames" must be an array of strings, but was of type ${typeof A.keyAltNames}.`);let B=void 0;if(A.keyAltNames&&A.keyAltNames.length>0)B=A.keyAltNames.map((q,W)=>{if(typeof q!=="string")throw new J9.MongoCryptInvalidArgumentError(`Option "keyAltNames" must be an array of strings, but item at index ${W} was of type ${typeof q}`);return O2.serialize({keyAltName:q})});let D=void 0;if(A.keyMaterial)D=O2.serialize({keyMaterial:A.keyMaterial});let J=O2.serialize({provider:F,...A.masterKey}),X=this._mongoCrypt.makeDataKeyContext(J,{keyAltNames:B,keyMaterial:D}),Z=new EB.StateMachine({proxyOptions:this._proxyOptions,tlsOptions:this._tlsOptions,socketOptions:T5(this._client.s.options)}),Y=A?.timeoutContext??M5.TimeoutContext.create(S2.resolveTimeoutOptions(this._client,{timeoutMS:this._timeoutMS})),$=O2.deserialize(await Z.execute(this,X,Y)),{db:G,collection:E}=S2.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace),{insertedId:H}=await this._keyVaultClient.db(G).collection(E).insertOne($,{writeConcern:{w:"majority"},timeoutMS:Y?.csotEnabled()?Y?.getRemainingTimeMSOrThrow():void 0});return H}async rewrapManyDataKey(F,A){let B=void 0;if(A){let q=Object.assign({provider:A.provider},A.masterKey);B=O2.serialize(q)}let D=O2.serialize(F),J=this._mongoCrypt.makeRewrapManyDataKeyContext(D,B),X=new EB.StateMachine({proxyOptions:this._proxyOptions,tlsOptions:this._tlsOptions,socketOptions:T5(this._client.s.options)}),Z=M5.TimeoutContext.create(S2.resolveTimeoutOptions(this._client,{timeoutMS:this._timeoutMS})),{v:Y}=O2.deserialize(await X.execute(this,J,Z));if(Y.length===0)return{};let{db:$,collection:G}=S2.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace),E=Y.map((q)=>({updateOne:{filter:{_id:q._id},update:{$set:{masterKey:q.masterKey,keyMaterial:q.keyMaterial},$currentDate:{updateDate:!0}}}}));return{bulkWriteResult:await this._keyVaultClient.db($).collection(G).bulkWrite(E,{writeConcern:{w:"majority"},timeoutMS:Z.csotEnabled()?Z?.remainingTimeMS:void 0})}}async deleteKey(F){let{db:A,collection:B}=S2.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);return await this._keyVaultClient.db(A).collection(B).deleteOne({_id:F},{writeConcern:{w:"majority"},timeoutMS:this._timeoutMS})}getKeys(){let{db:F,collection:A}=S2.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);return this._keyVaultClient.db(F).collection(A).find({},{readConcern:{level:"majority"},timeoutMS:this._timeoutMS})}async getKey(F){let{db:A,collection:B}=S2.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);return await this._keyVaultClient.db(A).collection(B).findOne({_id:F},{readConcern:{level:"majority"},timeoutMS:this._timeoutMS})}async getKeyByAltName(F){let{db:A,collection:B}=S2.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);return await this._keyVaultClient.db(A).collection(B).findOne({keyAltNames:F},{readConcern:{level:"majority"},timeoutMS:this._timeoutMS})}async addKeyAltName(F,A){let{db:B,collection:D}=S2.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);return await this._keyVaultClient.db(B).collection(D).findOneAndUpdate({_id:F},{$addToSet:{keyAltNames:A}},{writeConcern:{w:"majority"},returnDocument:"before",timeoutMS:this._timeoutMS})}async removeKeyAltName(F,A){let{db:B,collection:D}=S2.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace),J=[{$set:{keyAltNames:{$cond:[{$eq:["$keyAltNames",[A]]},"$$REMOVE",{$filter:{input:"$keyAltNames",cond:{$ne:["$$this",A]}}}]}}}];return await this._keyVaultClient.db(B).collection(D).findOneAndUpdate({_id:F},J,{writeConcern:{w:"majority"},returnDocument:"before",timeoutMS:this._timeoutMS})}async createEncryptedCollection(F,A,B){let{provider:D,masterKey:J,createCollectionOptions:{encryptedFields:{...X},...Z}}=B,Y=this._timeoutMS!=null?M5.TimeoutContext.create(S2.resolveTimeoutOptions(this._client,{timeoutMS:this._timeoutMS})):void 0;if(Array.isArray(X.fields)){let $=X.fields.map(async(H)=>H==null||typeof H!=="object"||H.keyId!=null?H:{...H,keyId:await this.createDataKey(D,{masterKey:J,timeoutContext:Y?.csotEnabled()?Y?.clone():void 0})}),G=await Promise.allSettled($);X.fields=G.map((H,q)=>H.status==="fulfilled"?H.value:X.fields[q]);let E=G.find((H)=>H.status==="rejected");if(E!=null)throw new J9.MongoCryptCreateDataKeyError(X,{cause:E.reason})}try{return{collection:await F.createCollection(A,{...Z,encryptedFields:X,timeoutMS:Y?.csotEnabled()?Y?.getRemainingTimeMSOrThrow():void 0}),encryptedFields:X}}catch($){throw new J9.MongoCryptCreateEncryptedCollectionError(X,{cause:$})}}async encrypt(F,A){return await this._encrypt(F,!1,A)}async encryptExpression(F,A){return await this._encrypt(F,!0,A)}async decrypt(F){let A=O2.serialize({v:F}),B=this._mongoCrypt.makeExplicitDecryptionContext(A),D=new EB.StateMachine({proxyOptions:this._proxyOptions,tlsOptions:this._tlsOptions,socketOptions:T5(this._client.s.options)}),J=this._timeoutMS!=null?M5.TimeoutContext.create(S2.resolveTimeoutOptions(this._client,{timeoutMS:this._timeoutMS})):void 0,{v:X}=O2.deserialize(await D.execute(this,B,J));return X}async askForKMSCredentials(){return await o31.refreshKMSCredentials(this._kmsProviders)}static get libmongocryptVersion(){return HB.getMongoCrypt().libmongocryptVersion}async _encrypt(F,A,B){let{algorithm:D,keyId:J,keyAltName:X,contentionFactor:Z,queryType:Y,rangeOptions:$}=B,G={expressionMode:A,algorithm:D};if(J)G.keyId=J.buffer;if(X){if(J)throw new J9.MongoCryptInvalidArgumentError('"options" cannot contain both "keyId" and "keyAltName"');if(typeof X!=="string")throw new J9.MongoCryptInvalidArgumentError(`"options.keyAltName" must be of type string, but was of type ${typeof X}`);G.keyAltName=O2.serialize({keyAltName:X})}if(typeof Z==="number"||typeof Z==="bigint")G.contentionFactor=Z;if(typeof Y==="string")G.queryType=Y;if(typeof $==="object")G.rangeOptions=O2.serialize($);let E=O2.serialize({v:F}),H=new EB.StateMachine({proxyOptions:this._proxyOptions,tlsOptions:this._tlsOptions,socketOptions:T5(this._client.s.options)}),q=this._mongoCrypt.makeExplicitEncryptionContext(E,G),W=this._timeoutMS!=null?M5.TimeoutContext.create(S2.resolveTimeoutOptions(this._client,{timeoutMS:this._timeoutMS})):void 0,{v:z}=O2.deserialize(await H.execute(this,q,W));return z}}yN.ClientEncryption=HB;function T5(F){let A={autoSelectFamily:!0};if("autoSelectFamily"in F)A.autoSelectFamily=F.autoSelectFamily;if("autoSelectFamilyAttemptTimeout"in F)A.autoSelectFamilyAttemptTimeout=F.autoSelectFamilyAttemptTimeout;return A}});var dN=K((hN)=>{Object.defineProperty(hN,"__esModule",{value:!0});hN.MongocryptdManager=void 0;var F41=l();class qB{constructor(F={}){if(this.spawnPath="",this.spawnArgs=[],this.uri=typeof F.mongocryptdURI==="string"&&F.mongocryptdURI.length>0?F.mongocryptdURI:qB.DEFAULT_MONGOCRYPTD_URI,this.bypassSpawn=!!F.mongocryptdBypassSpawn,Object.hasOwn(F,"mongocryptdSpawnPath")&&F.mongocryptdSpawnPath)this.spawnPath=F.mongocryptdSpawnPath;if(Object.hasOwn(F,"mongocryptdSpawnArgs")&&Array.isArray(F.mongocryptdSpawnArgs))this.spawnArgs=this.spawnArgs.concat(F.mongocryptdSpawnArgs);if(this.spawnArgs.filter((A)=>typeof A==="string").every((A)=>A.indexOf("--idleShutdownTimeoutSecs")<0))this.spawnArgs.push("--idleShutdownTimeoutSecs","60")}async spawn(){let F=this.spawnPath||"mongocryptd",{spawn:A}=import.meta.require("child_process");this._child=A(F,this.spawnArgs,{stdio:"ignore",detached:!0}),this._child.on("error",()=>{}),this._child.unref()}async withRespawn(F){try{return await F()}catch(B){if(!(B instanceof F41.MongoNetworkTimeoutError&&!this.bypassSpawn))throw B}return await this.spawn(),await F()}}hN.MongocryptdManager=qB;qB.DEFAULT_MONGOCRYPTD_URI="mongodb://localhost:27020"});var x$=K((iN)=>{var pN;Object.defineProperty(iN,"__esModule",{value:!0});iN.AutoEncrypter=iN.AutoEncryptionLoggerLevel=void 0;var cN=import.meta.require("net"),j5=I1(),A41=K0(),B41=y6(),S$=l(),D41=Y4(),J41=a(),u$=GB(),X41=I$(),Z41=W7(),Y41=dN(),$41=k$(),lN=O$();iN.AutoEncryptionLoggerLevel=Object.freeze({FatalError:0,Error:1,Warning:2,Info:3,Trace:4});class WB{static getMongoCrypt(){let F=B41.getMongoDBClientEncryption();if("kModuleError"in F)throw F.kModuleError;return F.MongoCrypt}constructor(F,A){this[pN]=!1,this._client=F,this._bypassEncryption=A.bypassAutoEncryption===!0,this._keyVaultNamespace=A.keyVaultNamespace||"admin.datakeys",this._keyVaultClient=A.keyVaultClient||F,this._metaDataClient=A.metadataClient||F,this._proxyOptions=A.proxyOptions||{},this._tlsOptions=A.tlsOptions||{},this._kmsProviders=A.kmsProviders||{};let B={cryptoCallbacks:X41};if(A.schemaMap)B.schemaMap=Buffer.isBuffer(A.schemaMap)?A.schemaMap:j5.serialize(A.schemaMap);if(A.encryptedFieldsMap)B.encryptedFieldsMap=Buffer.isBuffer(A.encryptedFieldsMap)?A.encryptedFieldsMap:j5.serialize(A.encryptedFieldsMap);if(B.kmsProviders=!Buffer.isBuffer(this._kmsProviders)?j5.serialize(this._kmsProviders):this._kmsProviders,A.options?.logger)B.logger=A.options.logger;if(A.extraOptions&&A.extraOptions.cryptSharedLibPath)B.cryptSharedLibPath=A.extraOptions.cryptSharedLibPath;if(A.bypassQueryAnalysis)B.bypassQueryAnalysis=A.bypassQueryAnalysis;if(this._bypassMongocryptdAndCryptShared=this._bypassEncryption||!!A.bypassQueryAnalysis,A.extraOptions&&A.extraOptions.cryptSharedLibSearchPaths)B.cryptSharedLibSearchPaths=A.extraOptions.cryptSharedLibSearchPaths;else if(!this._bypassMongocryptdAndCryptShared)B.cryptSharedLibSearchPaths=["$SYSTEM"];let D=WB.getMongoCrypt();if(this._mongocrypt=new D(B),this._contextCounter=0,A.extraOptions&&A.extraOptions.cryptSharedLibRequired&&!this.cryptSharedLibVersionInfo)throw new Z41.MongoCryptInvalidArgumentError("`cryptSharedLibRequired` set but no crypt_shared library loaded");if(!this._bypassMongocryptdAndCryptShared&&!this.cryptSharedLibVersionInfo){this._mongocryptdManager=new Y41.MongocryptdManager(A.extraOptions);let J={serverSelectionTimeoutMS:1e4};if((A.extraOptions==null||typeof A.extraOptions.mongocryptdURI!=="string")&&!cN.getDefaultAutoSelectFamily)J.family=4;if(cN.getDefaultAutoSelectFamily)Object.assign(J,u$.autoSelectSocketOptions(this._client.s?.options??{}));this._mongocryptdClient=new D41.MongoClient(this._mongocryptdManager.uri,J)}}async init(){if(this._bypassMongocryptdAndCryptShared||this.cryptSharedLibVersionInfo)return;if(!this._mongocryptdManager)throw new S$.MongoRuntimeError("Reached impossible state: mongocryptdManager is undefined when neither bypassSpawn nor the shared lib are specified.");if(!this._mongocryptdClient)throw new S$.MongoRuntimeError("Reached impossible state: mongocryptdClient is undefined when neither bypassSpawn nor the shared lib are specified.");if(!this._mongocryptdManager.bypassSpawn)await this._mongocryptdManager.spawn();try{return await this._mongocryptdClient.connect()}catch(F){let{message:A}=F;if(A&&(A.match(/timed out after/)||A.match(/ENOTFOUND/)))throw new S$.MongoRuntimeError("Unable to connect to `mongocryptd`, please make sure it is running or in your PATH for auto-spawn",{cause:F});throw F}}async teardown(F){await this._mongocryptdClient?.close(F)}async encrypt(F,A,B={}){if(this._bypassEncryption)return A;let D=Buffer.isBuffer(A)?A:j5.serialize(A,B),J=this._mongocrypt.makeEncryptionContext(J41.MongoDBCollectionNamespace.fromString(F).db,D);J.id=this._contextCounter++,J.ns=F,J.document=A;let X=new lN.StateMachine({promoteValues:!1,promoteLongs:!1,proxyOptions:this._proxyOptions,tlsOptions:this._tlsOptions,socketOptions:u$.autoSelectSocketOptions(this._client.s.options)});return j5.deserialize(await X.execute(this,J,B.timeoutContext),{promoteValues:!1,promoteLongs:!1})}async decrypt(F,A={}){let B=this._mongocrypt.makeDecryptionContext(F);return B.id=this._contextCounter++,await new lN.StateMachine({...A,proxyOptions:this._proxyOptions,tlsOptions:this._tlsOptions,socketOptions:u$.autoSelectSocketOptions(this._client.s.options)}).execute(this,B,A.timeoutContext?.csotEnabled()?A.timeoutContext:void 0)}async askForKMSCredentials(){return await $41.refreshKMSCredentials(this._kmsProviders)}get cryptSharedLibVersionInfo(){return this._mongocrypt.cryptSharedLibVersionInfo}static get libmongocryptVersion(){return WB.getMongoCrypt().libmongocryptVersion}}iN.AutoEncrypter=WB;pN=A41.kDecorateResult});var oN=K((rN)=>{Object.defineProperty(rN,"__esModule",{value:!0});rN.Encrypter=void 0;var E41=import.meta.require("util"),H41=x$(),q41=K0(),W41=y6(),sN=l(),z41=Y4(),k5=Symbol("internalClient");class aN{constructor(F,A,B){if(typeof B.autoEncryption!=="object")throw new sN.MongoInvalidArgumentError('Option "autoEncryption" must be specified');if(this[k5]=null,this.bypassAutoEncryption=!!B.autoEncryption.bypassAutoEncryption,this.needsConnecting=!1,B.maxPoolSize===0&&B.autoEncryption.keyVaultClient==null)B.autoEncryption.keyVaultClient=F;else if(B.autoEncryption.keyVaultClient==null)B.autoEncryption.keyVaultClient=this.getInternalClient(F,A,B);if(this.bypassAutoEncryption)B.autoEncryption.metadataClient=void 0;else if(B.maxPoolSize===0)B.autoEncryption.metadataClient=F;else B.autoEncryption.metadataClient=this.getInternalClient(F,A,B);if(B.proxyHost)B.autoEncryption.proxyOptions={proxyHost:B.proxyHost,proxyPort:B.proxyPort,proxyUsername:B.proxyUsername,proxyPassword:B.proxyPassword};this.autoEncrypter=new H41.AutoEncrypter(F,B.autoEncryption)}getInternalClient(F,A,B){let D=this[k5];if(D==null){let J={};for(let X of[...Object.getOwnPropertyNames(B),...Object.getOwnPropertySymbols(B)]){if(["autoEncryption","minPoolSize","servers","caseTranslate","dbName"].includes(X))continue;Reflect.set(J,X,Reflect.get(B,X))}J.minPoolSize=0,D=new z41.MongoClient(A,J),this[k5]=D;for(let X of q41.MONGO_CLIENT_EVENTS)for(let Z of F.listeners(X))D.on(X,Z);F.on("newListener",(X,Z)=>{D?.on(X,Z)}),this.needsConnecting=!0}return D}async connectInternalClient(){let F=this[k5];if(this.needsConnecting&&F!=null)this.needsConnecting=!1,await F.connect()}closeCallback(F,A,B){E41.callbackify(this.close.bind(this))(F,A,B)}async close(F,A){let B;try{await this.autoEncrypter.teardown(A)}catch(J){B=J}let D=this[k5];if(D!=null&&F!==D)return await D.close(A);if(B!=null)throw B}static checkForMongoCrypt(){let F=W41.getMongoDBClientEncryption();if("kModuleError"in F)throw new sN.MongoMissingDependencyError("Auto-encryption requested, but the module is not installed. Please add `mongodb-client-encryption` as a dependency of your project",{cause:F.kModuleError,dependencyName:"mongodb-client-encryption"})}}rN.Encrypter=aN});var f$=K((eN)=>{Object.defineProperty(eN,"__esModule",{value:!0});eN.ConnectionPoolMetrics=void 0;class T3{constructor(){this.txnConnections=0,this.cursorConnections=0,this.otherConnections=0}markPinned(F){if(F===T3.TXN)this.txnConnections+=1;else if(F===T3.CURSOR)this.cursorConnections+=1;else this.otherConnections+=1}markUnpinned(F){if(F===T3.TXN)this.txnConnections-=1;else if(F===T3.CURSOR)this.cursorConnections-=1;else this.otherConnections-=1}info(F){return`Timed out while checking out a connection from connection pool: maxPoolSize: ${F}, connections in use by cursors: ${this.cursorConnections}, connections in use by transactions: ${this.txnConnections}, connections in use by other operations: ${this.otherConnections}`}reset(){this.txnConnections=0,this.cursorConnections=0,this.otherConnections=0}}eN.ConnectionPoolMetrics=T3;T3.TXN="txn";T3.CURSOR="cursor";T3.OTHER="other"});var O5=K((JP)=>{Object.defineProperty(JP,"__esModule",{value:!0});JP.ServerDescription=void 0;JP.parseServerType=BP;JP.compareTopologyVersion=DP;var K7=I1(),C41=l(),U7=a(),N0=s2(),K41=new Set([N0.ServerType.RSPrimary,N0.ServerType.Standalone,N0.ServerType.Mongos,N0.ServerType.LoadBalancer]),U41=new Set([N0.ServerType.RSPrimary,N0.ServerType.RSSecondary,N0.ServerType.Mongos,N0.ServerType.Standalone,N0.ServerType.LoadBalancer]);class AP{constructor(F,A,B={}){if(F==null||F==="")throw new C41.MongoRuntimeError("ServerDescription must be provided with a non-empty address");this.address=typeof F==="string"?U7.HostAddress.fromString(F).toString():F.toString(),this.type=BP(A,B),this.hosts=A?.hosts?.map((D)=>D.toLowerCase())??[],this.passives=A?.passives?.map((D)=>D.toLowerCase())??[],this.arbiters=A?.arbiters?.map((D)=>D.toLowerCase())??[],this.tags=A?.tags??{},this.minWireVersion=A?.minWireVersion??0,this.maxWireVersion=A?.maxWireVersion??0,this.roundTripTime=B?.roundTripTime??-1,this.minRoundTripTime=B?.minRoundTripTime??0,this.lastUpdateTime=U7.now(),this.lastWriteDate=A?.lastWrite?.lastWriteDate??0,this.error=B.error??null,this.error?.stack,this.topologyVersion=this.error?.topologyVersion??A?.topologyVersion??null,this.setName=A?.setName??null,this.setVersion=A?.setVersion??null,this.electionId=A?.electionId??null,this.logicalSessionTimeoutMinutes=A?.logicalSessionTimeoutMinutes??null,this.maxMessageSizeBytes=A?.maxMessageSizeBytes??null,this.maxWriteBatchSize=A?.maxWriteBatchSize??null,this.maxBsonObjectSize=A?.maxBsonObjectSize??null,this.primary=A?.primary??null,this.me=A?.me?.toLowerCase()??null,this.$clusterTime=A?.$clusterTime??null,this.iscryptd=Boolean(A?.iscryptd)}get hostAddress(){return U7.HostAddress.fromString(this.address)}get allHosts(){return this.hosts.concat(this.arbiters).concat(this.passives)}get isReadable(){return this.type===N0.ServerType.RSSecondary||this.isWritable}get isDataBearing(){return U41.has(this.type)}get isWritable(){return K41.has(this.type)}get host(){let F=`:${this.port}`.length;return this.address.slice(0,-F)}get port(){let F=this.address.split(":").pop();return F?Number.parseInt(F,10):27017}equals(F){let A=this.topologyVersion===F?.topologyVersion||DP(this.topologyVersion,F?.topologyVersion)===0,B=this.electionId!=null&&F?.electionId!=null?U7.compareObjectId(this.electionId,F.electionId)===0:this.electionId===F?.electionId;return F!=null&&F.iscryptd===this.iscryptd&&U7.errorStrictEqual(this.error,F.error)&&this.type===F.type&&this.minWireVersion===F.minWireVersion&&U7.arrayStrictEqual(this.hosts,F.hosts)&&Q41(this.tags,F.tags)&&this.setName===F.setName&&this.setVersion===F.setVersion&&B&&this.primary===F.primary&&this.logicalSessionTimeoutMinutes===F.logicalSessionTimeoutMinutes&&A}}JP.ServerDescription=AP;function BP(F,A){if(A?.loadBalanced)return N0.ServerType.LoadBalancer;if(!F||!F.ok)return N0.ServerType.Unknown;if(F.isreplicaset)return N0.ServerType.RSGhost;if(F.msg&&F.msg==="isdbgrid")return N0.ServerType.Mongos;if(F.setName)if(F.hidden)return N0.ServerType.RSOther;else if(F.isWritablePrimary)return N0.ServerType.RSPrimary;else if(F.secondary)return N0.ServerType.RSSecondary;else if(F.arbiterOnly)return N0.ServerType.RSArbiter;else return N0.ServerType.RSOther;return N0.ServerType.Standalone}function Q41(F,A){let B=Object.keys(F),D=Object.keys(A);return B.length===D.length&&B.every((J)=>A[J]===F[J])}function DP(F,A){if(F==null||A==null)return-1;if(!F.processId.equals(A.processId))return-1;let B=typeof F.counter==="bigint"?K7.Long.fromBigInt(F.counter):K7.Long.isLong(F.counter)?F.counter:K7.Long.fromNumber(F.counter),D=typeof A.counter==="bigint"?K7.Long.fromBigInt(A.counter):K7.Long.isLong(A.counter)?A.counter:K7.Long.fromNumber(A.counter);return B.compare(D)}});var g$=K((HP)=>{Object.defineProperty(HP,"__esModule",{value:!0});HP.TopologyDescription=void 0;var R41=I1(),CB=l4(),zB=l(),_$=a(),R1=s2(),C4=O5(),w41=CB.MIN_SUPPORTED_SERVER_VERSION,I41=CB.MAX_SUPPORTED_SERVER_VERSION,ZP=CB.MIN_SUPPORTED_WIRE_VERSION,YP=CB.MAX_SUPPORTED_WIRE_VERSION,N41=new Set([R1.ServerType.Mongos,R1.ServerType.Unknown]),$P=new Set([R1.ServerType.Mongos,R1.ServerType.Standalone]),GP=new Set([R1.ServerType.RSSecondary,R1.ServerType.RSArbiter,R1.ServerType.RSOther]);class S5{constructor(F,A=null,B=null,D=null,J=null,X=null,Z=null){Z=Z??{},this.type=F??R1.TopologyType.Unknown,this.servers=A??new Map,this.stale=!1,this.compatible=!0,this.heartbeatFrequencyMS=Z.heartbeatFrequencyMS??0,this.localThresholdMS=Z.localThresholdMS??15,this.setName=B??null,this.maxElectionId=J??null,this.maxSetVersion=D??null,this.commonWireVersion=X??0;for(let Y of this.servers.values()){if(Y.type===R1.ServerType.Unknown||Y.type===R1.ServerType.LoadBalancer)continue;if(Y.minWireVersion>YP)this.compatible=!1,this.compatibilityError=`Server at ${Y.address} requires wire version ${Y.minWireVersion}, but this version of the driver only supports up to ${YP} (MongoDB ${I41})`;if(Y.maxWireVersion<ZP){this.compatible=!1,this.compatibilityError=`Server at ${Y.address} reports wire version ${Y.maxWireVersion}, but this version of the driver requires at least ${ZP} (MongoDB ${w41}).`;break}}this.logicalSessionTimeoutMinutes=null;for(let[,Y]of this.servers)if(Y.isReadable){if(Y.logicalSessionTimeoutMinutes==null){this.logicalSessionTimeoutMinutes=null;break}if(this.logicalSessionTimeoutMinutes==null){this.logicalSessionTimeoutMinutes=Y.logicalSessionTimeoutMinutes;continue}this.logicalSessionTimeoutMinutes=Math.min(this.logicalSessionTimeoutMinutes,Y.logicalSessionTimeoutMinutes)}}updateFromSrvPollingEvent(F,A=0){let B=F.hostnames(),D=new Set(this.servers.keys()),J=new Set(B),X=new Set;for(let Y of D)if(J.delete(Y),!B.has(Y))X.add(Y);if(J.size===0&&X.size===0)return this;let Z=new Map(this.servers);for(let Y of X)Z.delete(Y);if(J.size>0){if(A===0)for(let Y of J)Z.set(Y,new C4.ServerDescription(Y));else if(Z.size<A){let Y=_$.shuffle(J,A-Z.size);for(let $ of Y)Z.set($,new C4.ServerDescription($))}}return new S5(this.type,Z,this.setName,this.maxSetVersion,this.maxElectionId,this.commonWireVersion,{heartbeatFrequencyMS:this.heartbeatFrequencyMS,localThresholdMS:this.localThresholdMS})}update(F){let A=F.address,{type:B,setName:D,maxSetVersion:J,maxElectionId:X,commonWireVersion:Z}=this,Y=F.type,$=new Map(this.servers);if(F.maxWireVersion!==0)if(Z==null)Z=F.maxWireVersion;else Z=Math.min(Z,F.maxWireVersion);if(typeof F.setName==="string"&&typeof D==="string"&&F.setName!==D)if(B===R1.TopologyType.Single)F=new C4.ServerDescription(A);else $.delete(A);if($.set(A,F),B===R1.TopologyType.Single)return new S5(R1.TopologyType.Single,$,D,J,X,Z,{heartbeatFrequencyMS:this.heartbeatFrequencyMS,localThresholdMS:this.localThresholdMS});if(B===R1.TopologyType.Unknown)if(Y===R1.ServerType.Standalone&&this.servers.size!==1)$.delete(A);else B=P41(Y);if(B===R1.TopologyType.Sharded){if(!N41.has(Y))$.delete(A)}if(B===R1.TopologyType.ReplicaSetNoPrimary){if($P.has(Y))$.delete(A);if(Y===R1.ServerType.RSPrimary){let G=EP($,F,D,J,X);B=G[0],D=G[1],J=G[2],X=G[3]}else if(GP.has(Y)){let G=T41($,F,D);B=G[0],D=G[1]}}if(B===R1.TopologyType.ReplicaSetWithPrimary)if($P.has(Y))$.delete(A),B=X9($);else if(Y===R1.ServerType.RSPrimary){let G=EP($,F,D,J,X);B=G[0],D=G[1],J=G[2],X=G[3]}else if(GP.has(Y))B=M41($,F,D);else B=X9($);return new S5(B,$,D,J,X,Z,{heartbeatFrequencyMS:this.heartbeatFrequencyMS,localThresholdMS:this.localThresholdMS})}get error(){let F=Array.from(this.servers.values()).filter((A)=>A.error);if(F.length>0)return F[0].error;return null}get hasKnownServers(){return Array.from(this.servers.values()).some((F)=>F.type!==R1.ServerType.Unknown)}get hasDataBearingServers(){return Array.from(this.servers.values()).some((F)=>F.isDataBearing)}hasServer(F){return this.servers.has(F)}toJSON(){return R41.EJSON.serialize(this)}}HP.TopologyDescription=S5;function P41(F){switch(F){case R1.ServerType.Standalone:return R1.TopologyType.Single;case R1.ServerType.Mongos:return R1.TopologyType.Sharded;case R1.ServerType.RSPrimary:return R1.TopologyType.ReplicaSetWithPrimary;case R1.ServerType.RSOther:case R1.ServerType.RSSecondary:return R1.TopologyType.ReplicaSetNoPrimary;default:return R1.TopologyType.Unknown}}function EP(F,A,B=null,D=null,J=null){if(B=B||A.setName,B!==A.setName)return F.delete(A.address),[X9(F),B,D,J];if(A.maxWireVersion>=17){let Y=_$.compareObjectId(J,A.electionId),$=Y===0,G=Y===-1,E=(D??-1)<=(A.setVersion??-1);if(G||$&&E)J=A.electionId,D=A.setVersion;else return F.set(A.address,new C4.ServerDescription(A.address,void 0,{error:new zB.MongoStalePrimaryError(A,D,J)})),[X9(F),B,D,J]}else{let Y=A.electionId?A.electionId:null;if(A.setVersion&&Y){if(D&&J){if(D>A.setVersion||_$.compareObjectId(J,Y)>0)return F.set(A.address,new C4.ServerDescription(A.address,void 0,{error:new zB.MongoStalePrimaryError(A,D,J)})),[X9(F),B,D,J]}J=A.electionId}if(A.setVersion!=null&&(D==null||A.setVersion>D))D=A.setVersion}for(let[Y,$]of F)if($.type===R1.ServerType.RSPrimary&&$.address!==A.address){F.set(Y,new C4.ServerDescription($.address,void 0,{error:new zB.MongoStalePrimaryError(A,D,J)}));break}A.allHosts.forEach((Y)=>{if(!F.has(Y))F.set(Y,new C4.ServerDescription(Y))});let X=Array.from(F.keys()),Z=A.allHosts;return X.filter((Y)=>Z.indexOf(Y)===-1).forEach((Y)=>{F.delete(Y)}),[X9(F),B,D,J]}function M41(F,A,B=null){if(B==null)throw new zB.MongoRuntimeError('Argument "setName" is required if connected to a replica set');if(B!==A.setName||A.me&&A.address!==A.me)F.delete(A.address);return X9(F)}function T41(F,A,B=null){let D=R1.TopologyType.ReplicaSetNoPrimary;if(B=B??A.setName,B!==A.setName)return F.delete(A.address),[D,B];if(A.allHosts.forEach((J)=>{if(!F.has(J))F.set(J,new C4.ServerDescription(J))}),A.me&&A.address!==A.me)F.delete(A.address);return[D,B]}function X9(F){for(let A of F.values())if(A.type===R1.ServerType.RSPrimary)return R1.TopologyType.ReplicaSetWithPrimary;return R1.TopologyType.ReplicaSetNoPrimary}});var y$=K((zP)=>{Object.defineProperty(zP,"__esModule",{value:!0});zP.getReadPreference=O41;zP.isSharded=S41;var j41=l(),b$=k0(),WP=s2(),k41=g$();function O41(F){let A=F?.readPreference??b$.ReadPreference.primary;if(typeof A==="string")A=b$.ReadPreference.fromString(A);if(!(A instanceof b$.ReadPreference))throw new j41.MongoInvalidArgumentError('Option "readPreference" must be a ReadPreference instance');return A}function S41(F){if(F==null)return!1;if(F.description&&F.description.type===WP.ServerType.Mongos)return!0;if(F.description&&F.description instanceof k41.TopologyDescription)return Array.from(F.description.servers.values()).some((B)=>B.type===WP.ServerType.Mongos);return!1}});var v$=K((UP)=>{Object.defineProperty(UP,"__esModule",{value:!0});UP.Transaction=UP.TxnState=void 0;UP.isTransactionCommand=h41;var CP=l(),f41=q6(),_41=k0(),g41=t0();UP.TxnState=Object.freeze({NO_TRANSACTION:"NO_TRANSACTION",STARTING_TRANSACTION:"STARTING_TRANSACTION",TRANSACTION_IN_PROGRESS:"TRANSACTION_IN_PROGRESS",TRANSACTION_COMMITTED:"TRANSACTION_COMMITTED",TRANSACTION_COMMITTED_EMPTY:"TRANSACTION_COMMITTED_EMPTY",TRANSACTION_ABORTED:"TRANSACTION_ABORTED"});var b41={[UP.TxnState.NO_TRANSACTION]:[UP.TxnState.NO_TRANSACTION,UP.TxnState.STARTING_TRANSACTION],[UP.TxnState.STARTING_TRANSACTION]:[UP.TxnState.TRANSACTION_IN_PROGRESS,UP.TxnState.TRANSACTION_COMMITTED,UP.TxnState.TRANSACTION_COMMITTED_EMPTY,UP.TxnState.TRANSACTION_ABORTED],[UP.TxnState.TRANSACTION_IN_PROGRESS]:[UP.TxnState.TRANSACTION_IN_PROGRESS,UP.TxnState.TRANSACTION_COMMITTED,UP.TxnState.TRANSACTION_ABORTED],[UP.TxnState.TRANSACTION_COMMITTED]:[UP.TxnState.TRANSACTION_COMMITTED,UP.TxnState.TRANSACTION_COMMITTED_EMPTY,UP.TxnState.STARTING_TRANSACTION,UP.TxnState.NO_TRANSACTION],[UP.TxnState.TRANSACTION_ABORTED]:[UP.TxnState.STARTING_TRANSACTION,UP.TxnState.NO_TRANSACTION],[UP.TxnState.TRANSACTION_COMMITTED_EMPTY]:[UP.TxnState.TRANSACTION_COMMITTED_EMPTY,UP.TxnState.NO_TRANSACTION]},y41=new Set([UP.TxnState.STARTING_TRANSACTION,UP.TxnState.TRANSACTION_IN_PROGRESS]),v41=new Set([UP.TxnState.TRANSACTION_COMMITTED,UP.TxnState.TRANSACTION_COMMITTED_EMPTY,UP.TxnState.TRANSACTION_ABORTED]);class KP{constructor(F){F=F??{},this.state=UP.TxnState.NO_TRANSACTION,this.options={};let A=g41.WriteConcern.fromOptions(F);if(A){if(A.w===0)throw new CP.MongoTransactionError("Transactions do not support unacknowledged write concern");this.options.writeConcern=A}if(F.readConcern)this.options.readConcern=f41.ReadConcern.fromOptions(F);if(F.readPreference)this.options.readPreference=_41.ReadPreference.fromOptions(F);if(F.maxCommitTimeMS)this.options.maxTimeMS=F.maxCommitTimeMS;this._pinnedServer=void 0,this._recoveryToken=void 0}get server(){return this._pinnedServer}get recoveryToken(){return this._recoveryToken}get isPinned(){return!!this.server}get isStarting(){return this.state===UP.TxnState.STARTING_TRANSACTION}get isActive(){return y41.has(this.state)}get isCommitted(){return v41.has(this.state)}transition(F){let A=b41[this.state];if(A&&A.includes(F)){if(this.state=F,this.state===UP.TxnState.NO_TRANSACTION||this.state===UP.TxnState.STARTING_TRANSACTION||this.state===UP.TxnState.TRANSACTION_ABORTED)this.unpinServer();return}throw new CP.MongoRuntimeError(`Attempted illegal state transition from [${this.state}] to [${F}]`)}pinServer(F){if(this.isActive)this._pinnedServer=F}unpinServer(){this._pinnedServer=void 0}}UP.Transaction=KP;function h41(F){return!!(F.commitTransaction||F.abortTransaction)}});var w7=K((NP)=>{var RP;Object.defineProperty(NP,"__esModule",{value:!0});NP.ServerSessionPool=NP.ServerSession=NP.ClientSession=void 0;NP.maybeClearPinnedConnection=QB;NP.applySession=s41;NP.updateSessionFromResponse=a41;var UB=I1(),LB=f$(),d41=y$(),wP=K0(),J1=l(),c41=o2(),KB=F2(),h$=o9(),l41=q6(),m$=k0(),p41=B7(),c$=s2(),d$=o0(),v1=v$(),u2=a(),Q7=t0(),i41=8,L7=Symbol("serverSession"),VB=Symbol("snapshotTime"),R7=Symbol("snapshotEnabled"),V7=Symbol("pinnedConnection"),RB=Symbol("txnNumberIncrement");class wB extends c41.TypedEventEmitter{constructor(F,A,B,D){super();if(this[RP]=!1,this.timeoutContext=null,F==null)throw new J1.MongoRuntimeError("ClientSession requires a MongoClient");if(A==null||!(A instanceof l$))throw new J1.MongoRuntimeError("ClientSession requires a ServerSessionPool");if(B=B??{},B.snapshot===!0){if(this[R7]=!0,B.causalConsistency===!0)throw new J1.MongoInvalidArgumentError('Properties "causalConsistency" and "snapshot" are mutually exclusive')}this.client=F,this.sessionPool=A,this.hasEnded=!1,this.clientOptions=D,this.timeoutMS=B.defaultTimeoutMS??F.s.options?.timeoutMS,this.explicit=!!B.explicit,this[L7]=this.explicit?this.sessionPool.acquire():null,this[RB]=0;let J=this.explicit&&B.snapshot!==!0;this.supports={causalConsistency:B.causalConsistency??J},this.clusterTime=B.initialClusterTime,this.operationTime=void 0,this.owner=B.owner,this.defaultTransactionOptions={...B.defaultTransactionOptions},this.transaction=new v1.Transaction}get id(){return this[L7]?.id}get serverSession(){let F=this[L7];if(F==null){if(this.explicit)throw new J1.MongoRuntimeError("Unexpected null serverSession for an explicit session");if(this.hasEnded)throw new J1.MongoRuntimeError("Unexpected null serverSession for an ended implicit session");F=this.sessionPool.acquire(),this[L7]=F}return F}get snapshotEnabled(){return this[R7]}get loadBalanced(){return this.client.topology?.description.type===c$.TopologyType.LoadBalanced}get pinnedConnection(){return this[V7]}pin(F){if(this[V7])throw TypeError("Cannot pin multiple connections to the same session");this[V7]=F,F.emit(wP.PINNED,this.inTransaction()?LB.ConnectionPoolMetrics.TXN:LB.ConnectionPoolMetrics.CURSOR)}unpin(F){if(this.loadBalanced)return QB(this,F);this.transaction.unpinServer()}get isPinned(){return this.loadBalanced?!!this[V7]:this.transaction.isPinned}async endSession(F){try{if(this.inTransaction())await this.abortTransaction({...F,throwTimeout:!0})}catch(A){if(A.name==="MongoOperationTimeoutError")throw A;u2.squashError(A)}finally{if(!this.hasEnded){let A=this[L7];if(A!=null)this.sessionPool.release(A),this[L7]=new NB(A);this.hasEnded=!0,this.emit("ended",this)}QB(this,{force:!0,...F})}}async asyncDispose(){await this.endSession({force:!0})}advanceOperationTime(F){if(this.operationTime==null){this.operationTime=F;return}if(F.greaterThan(this.operationTime))this.operationTime=F}advanceClusterTime(F){if(!F||typeof F!=="object")throw new J1.MongoInvalidArgumentError("input cluster time must be an object");if(!F.clusterTime||F.clusterTime._bsontype!=="Timestamp")throw new J1.MongoInvalidArgumentError('input cluster time "clusterTime" property must be a valid BSON Timestamp');if(!F.signature||F.signature.hash?._bsontype!=="Binary"||typeof F.signature.keyId!=="bigint"&&typeof F.signature.keyId!=="number"&&F.signature.keyId?._bsontype!=="Long")throw new J1.MongoInvalidArgumentError('input cluster time must have a valid "signature" property with BSON Binary hash and BSON Long keyId');c$._advanceClusterTime(this,F)}equals(F){if(!(F instanceof wB))return!1;if(this.id==null||F.id==null)return!1;return u2.ByteUtils.equals(this.id.id.buffer,F.id.id.buffer)}incrementTransactionNumber(){this[RB]+=1}inTransaction(){return this.transaction.isActive}startTransaction(F){if(this[R7])throw new J1.MongoCompatibilityError("Transactions are not supported in snapshot sessions");if(this.inTransaction())throw new J1.MongoTransactionError("Transaction already in progress");if(this.isPinned&&this.transaction.isCommitted)this.unpin();let A=u2.maxWireVersion(this.client.topology);if(d41.isSharded(this.client.topology)&&A!=null&&A<i41)throw new J1.MongoCompatibilityError("Transactions are not supported on sharded clusters in MongoDB < 4.2.");this.commitAttempted=!1,this.incrementTransactionNumber(),this.transaction=new v1.Transaction({readConcern:F?.readConcern??this.defaultTransactionOptions.readConcern??this.clientOptions?.readConcern,writeConcern:F?.writeConcern??this.defaultTransactionOptions.writeConcern??this.clientOptions?.writeConcern,readPreference:F?.readPreference??this.defaultTransactionOptions.readPreference??this.clientOptions?.readPreference,maxCommitTimeMS:F?.maxCommitTimeMS??this.defaultTransactionOptions.maxCommitTimeMS}),this.transaction.transition(v1.TxnState.STARTING_TRANSACTION)}async commitTransaction(F){if(this.transaction.state===v1.TxnState.NO_TRANSACTION)throw new J1.MongoTransactionError("No transaction started");if(this.transaction.state===v1.TxnState.STARTING_TRANSACTION||this.transaction.state===v1.TxnState.TRANSACTION_COMMITTED_EMPTY){this.transaction.transition(v1.TxnState.TRANSACTION_COMMITTED_EMPTY);return}if(this.transaction.state===v1.TxnState.TRANSACTION_ABORTED)throw new J1.MongoTransactionError("Cannot call commitTransaction after calling abortTransaction");let A={commitTransaction:1},B=typeof F?.timeoutMS==="number"?F.timeoutMS:typeof this.timeoutMS==="number"?this.timeoutMS:null,D=this.transaction.options.writeConcern??this.clientOptions?.writeConcern;if(D!=null)if(B==null&&this.timeoutContext==null)Q7.WriteConcern.apply(A,{wtimeoutMS:1e4,w:"majority",...D});else{let Z=Object.keys(D);if(Z.length>2||!Z.includes("wtimeoutMS")&&!Z.includes("wTimeoutMS"))Q7.WriteConcern.apply(A,{...D,wtimeoutMS:void 0})}if(this.transaction.state===v1.TxnState.TRANSACTION_COMMITTED||this.commitAttempted)if(B==null&&this.timeoutContext==null)Q7.WriteConcern.apply(A,{wtimeoutMS:1e4,...D,w:"majority"});else Q7.WriteConcern.apply(A,{w:"majority",...D,wtimeoutMS:void 0});if(typeof this.transaction.options.maxTimeMS==="number")A.maxTimeMS=this.transaction.options.maxTimeMS;if(this.transaction.recoveryToken)A.recoveryToken=this.transaction.recoveryToken;let J=new h$.RunAdminCommandOperation(A,{session:this,readPreference:m$.ReadPreference.primary,bypassPinningCheck:!0}),X=this.timeoutContext??(typeof B==="number"?d$.TimeoutContext.create({serverSelectionTimeoutMS:this.clientOptions.serverSelectionTimeoutMS,socketTimeoutMS:this.clientOptions.socketTimeoutMS,timeoutMS:B}):null);try{await KB.executeOperation(this.client,J,X),this.commitAttempted=void 0;return}catch(Z){if(this.commitAttempted=!0,Z instanceof J1.MongoError&&J1.isRetryableWriteError(Z)){Q7.WriteConcern.apply(A,{wtimeoutMS:1e4,...D,w:"majority"}),this.unpin({force:!0});try{await KB.executeOperation(this.client,new h$.RunAdminCommandOperation(A,{session:this,readPreference:m$.ReadPreference.primary,bypassPinningCheck:!0}),X);return}catch(Y){if(VP(Y))Y.addErrorLabel(J1.MongoErrorLabel.UnknownTransactionCommitResult);if(LP(Y))this.unpin({error:Y});throw Y}}if(VP(Z))Z.addErrorLabel(J1.MongoErrorLabel.UnknownTransactionCommitResult);if(LP(Z))this.unpin({error:Z});throw Z}finally{this.transaction.transition(v1.TxnState.TRANSACTION_COMMITTED)}}async abortTransaction(F){if(this.transaction.state===v1.TxnState.NO_TRANSACTION)throw new J1.MongoTransactionError("No transaction started");if(this.transaction.state===v1.TxnState.STARTING_TRANSACTION){this.transaction.transition(v1.TxnState.TRANSACTION_ABORTED);return}if(this.transaction.state===v1.TxnState.TRANSACTION_ABORTED)throw new J1.MongoTransactionError("Cannot call abortTransaction twice");if(this.transaction.state===v1.TxnState.TRANSACTION_COMMITTED||this.transaction.state===v1.TxnState.TRANSACTION_COMMITTED_EMPTY)throw new J1.MongoTransactionError("Cannot call abortTransaction after calling commitTransaction");let A={abortTransaction:1},B=typeof F?.timeoutMS==="number"?F.timeoutMS:this.timeoutContext?.csotEnabled()?this.timeoutContext.timeoutMS:typeof this.timeoutMS==="number"?this.timeoutMS:null,D=B!=null?d$.TimeoutContext.create({timeoutMS:B,serverSelectionTimeoutMS:this.clientOptions.serverSelectionTimeoutMS,socketTimeoutMS:this.clientOptions.socketTimeoutMS}):null,J=this.transaction.options.writeConcern??this.clientOptions?.writeConcern;if(J!=null&&B==null)Q7.WriteConcern.apply(A,{wtimeoutMS:1e4,w:"majority",...J});if(this.transaction.recoveryToken)A.recoveryToken=this.transaction.recoveryToken;let X=new h$.RunAdminCommandOperation(A,{session:this,readPreference:m$.ReadPreference.primary,bypassPinningCheck:!0});try{await KB.executeOperation(this.client,X,D),this.unpin();return}catch(Z){if(this.unpin(),Z.name==="MongoRuntimeError")throw Z;if(F?.throwTimeout&&Z.name==="MongoOperationTimeoutError")throw Z;if(Z instanceof J1.MongoError&&J1.isRetryableWriteError(Z))try{await KB.executeOperation(this.client,X,D);return}catch(Y){if(Y.name==="MongoRuntimeError")throw Y;if(F?.throwTimeout&&Y.name==="MongoOperationTimeoutError")throw Y}}finally{if(this.transaction.transition(v1.TxnState.TRANSACTION_ABORTED),this.loadBalanced)QB(this,{force:!1})}}toBSON(){throw new J1.MongoRuntimeError("ClientSession cannot be serialized to BSON.")}async withTransaction(F,A){let D=A?.timeoutMS??this.timeoutMS??null;this.timeoutContext=D!=null?d$.TimeoutContext.create({timeoutMS:D,serverSelectionTimeoutMS:this.clientOptions.serverSelectionTimeoutMS,socketTimeoutMS:this.clientOptions.socketTimeoutMS}):null;let J=this.timeoutContext?.csotEnabled()?this.timeoutContext.start:u2.now(),X=!1,Z;try{while(!X){this.startTransaction(A);try{let Y=F(this);if(!u2.isPromiseLike(Y))throw new J1.MongoInvalidArgumentError("Function provided to `withTransaction` must return a Promise");if(Z=await Y,this.transaction.state===v1.TxnState.NO_TRANSACTION||this.transaction.state===v1.TxnState.TRANSACTION_COMMITTED||this.transaction.state===v1.TxnState.TRANSACTION_ABORTED)return Z}catch(Y){if(!(Y instanceof J1.MongoError)||Y instanceof J1.MongoInvalidArgumentError)throw await this.abortTransaction(),Y;if(this.transaction.state===v1.TxnState.STARTING_TRANSACTION||this.transaction.state===v1.TxnState.TRANSACTION_IN_PROGRESS)await this.abortTransaction();if(Y.hasErrorLabel(J1.MongoErrorLabel.TransientTransactionError)&&(this.timeoutContext!=null||u2.now()-J<120000))continue;throw Y}while(!X)try{await this.commitTransaction(),X=!0}catch(Y){if(!IB(Y)&&Y.hasErrorLabel(J1.MongoErrorLabel.UnknownTransactionCommitResult)&&(this.timeoutContext!=null||u2.now()-J<120000))continue;if(Y.hasErrorLabel(J1.MongoErrorLabel.TransientTransactionError)&&(this.timeoutContext!=null||u2.now()-J<120000))break;throw Y}}return Z}finally{this.timeoutContext=null}}}NP.ClientSession=wB;RP=R7;p41.configureResourceManagement(wB.prototype);var n41=new Set(["CannotSatisfyWriteConcern","UnknownReplWriteConcern","UnsatisfiableWriteConcern"]);function LP(F){if(F instanceof J1.MongoError){if(J1.isRetryableWriteError(F)||F instanceof J1.MongoWriteConcernError||IB(F)){if(IP(F))return!0}else if(F.hasErrorLabel(J1.MongoErrorLabel.TransientTransactionError))return!0}return!1}function VP(F){let A=J1.isRetryableWriteError(F);return A||=F instanceof J1.MongoWriteConcernError,A||=IB(F),A&&=IP(F),A}function IP(F){let A=F instanceof J1.MongoServerError&&F.codeName&&n41.has(F.codeName);return IB(F)||!A&&F.code!==J1.MONGODB_ERROR_CODES.UnsatisfiableWriteConcern&&F.code!==J1.MONGODB_ERROR_CODES.UnknownReplWriteConcern}function QB(F,A){let B=F[V7],D=A?.error;if(F.inTransaction()&&D&&D instanceof J1.MongoError&&D.hasErrorLabel(J1.MongoErrorLabel.TransientTransactionError))return;let J=F.client.topology;if(B&&J!=null){let Z=Array.from(J.s.servers.values())[0];if(A?.error==null||A?.force){if(Z.pool.checkIn(B),F[V7]=void 0,B.emit(wP.UNPINNED,F.transaction.state!==v1.TxnState.NO_TRANSACTION?LB.ConnectionPoolMetrics.TXN:LB.ConnectionPoolMetrics.CURSOR),A?.forceClear)Z.pool.clear({serviceId:B.serviceId})}}}function IB(F){if(F==null||!(F instanceof J1.MongoServerError))return!1;return F.code===J1.MONGODB_ERROR_CODES.MaxTimeMSExpired||F.writeConcernError?.code===J1.MONGODB_ERROR_CODES.MaxTimeMSExpired}class NB{constructor(F){if(F!=null){let A=Buffer.allocUnsafe(16);A.set(F.id.id.buffer),this.id={id:new UB.Binary(A,F.id.id.sub_type)},this.lastUse=F.lastUse,this.txnNumber=F.txnNumber,this.isDirty=F.isDirty;return}this.id={id:new UB.Binary(u2.uuidV4(),UB.Binary.SUBTYPE_UUID)},this.lastUse=u2.now(),this.txnNumber=0,this.isDirty=!1}hasTimedOut(F){return Math.round(u2.calculateDurationInMs(this.lastUse)%86400000%3600000/60000)>F-1}}NP.ServerSession=NB;class l${constructor(F){if(F==null)throw new J1.MongoRuntimeError("ServerSessionPool requires a MongoClient");this.client=F,this.sessions=new u2.List}acquire(){let F=this.client.topology?.logicalSessionTimeoutMinutes??10,A=null;while(this.sessions.length>0){let B=this.sessions.shift();if(B!=null&&(!!this.client.topology?.loadBalanced||!B.hasTimedOut(F))){A=B;break}}if(A==null)A=new NB;return A}release(F){let A=this.client.topology?.logicalSessionTimeoutMinutes??10;if(this.client.topology?.loadBalanced&&!A)this.sessions.unshift(F);if(!A)return;if(this.sessions.prune((B)=>B.hasTimedOut(A)),!F.hasTimedOut(A)){if(F.isDirty)return;this.sessions.unshift(F)}}}NP.ServerSessionPool=l$;function s41(F,A,B){if(F.hasEnded)return new J1.MongoExpiredSessionError;let D=F.serverSession;if(D==null)return new J1.MongoRuntimeError("Unable to acquire server session");if(B.writeConcern?.w===0){if(F&&F.explicit)return new J1.MongoAPIError("Cannot have explicit session with unacknowledged writes");return}D.lastUse=u2.now(),A.lsid=D.id;let J=F.inTransaction()||v1.isTransactionCommand(A);if(!!B.willRetryWrite||J)D.txnNumber+=F[RB],F[RB]=0,A.txnNumber=UB.Long.fromNumber(D.txnNumber);if(!J){if(F.transaction.state!==v1.TxnState.NO_TRANSACTION)F.transaction.transition(v1.TxnState.NO_TRANSACTION);if(F.supports.causalConsistency&&F.operationTime&&u2.commandSupportsReadConcern(A))A.readConcern=A.readConcern||{},Object.assign(A.readConcern,{afterClusterTime:F.operationTime});else if(F[R7]){if(A.readConcern=A.readConcern||{level:l41.ReadConcernLevel.snapshot},F[VB]!=null)Object.assign(A.readConcern,{atClusterTime:F[VB]})}return}if(A.autocommit=!1,F.transaction.state===v1.TxnState.STARTING_TRANSACTION){F.transaction.transition(v1.TxnState.TRANSACTION_IN_PROGRESS),A.startTransaction=!0;let Z=F.transaction.options.readConcern||F?.clientOptions?.readConcern;if(Z)A.readConcern=Z;if(F.supports.causalConsistency&&F.operationTime)A.readConcern=A.readConcern||{},Object.assign(A.readConcern,{afterClusterTime:F.operationTime})}return}function a41(F,A){if(A.$clusterTime)c$._advanceClusterTime(F,A.$clusterTime);if(A.operationTime&&F&&F.supports.causalConsistency)F.advanceOperationTime(A.operationTime);if(A.recoveryToken&&F&&F.inTransaction())F.transaction._recoveryToken=A.recoveryToken;if(F?.[R7]&&F[VB]==null){let B=A.atClusterTime;if(B)F[VB]=B}}});var a$=K((SP)=>{Object.defineProperty(SP,"__esModule",{value:!0});SP.SENSITIVE_COMMANDS=SP.CommandFailedEvent=SP.CommandSucceededEvent=SP.CommandStartedEvent=void 0;var u5=K0(),m6=a(),PB=V5();class jP{constructor(F,A,B){this.name=u5.COMMAND_STARTED;let D=n$(A),J=p$(D),{address:X,connectionId:Z,serviceId:Y}=s$(F);if(SP.SENSITIVE_COMMANDS.has(J))this.commandObj={},this.commandObj[J]=!0;this.address=X,this.connectionId=Z,this.serviceId=Y,this.requestId=A.requestId,this.databaseName=A.databaseName,this.commandName=J,this.command=i$(J,D,D),this.serverConnectionId=B}get hasServiceId(){return!!this.serviceId}}SP.CommandStartedEvent=jP;class kP{constructor(F,A,B,D,J){this.name=u5.COMMAND_SUCCEEDED;let X=n$(A),Z=p$(X),{address:Y,connectionId:$,serviceId:G}=s$(F);this.address=Y,this.connectionId=$,this.serviceId=G,this.requestId=A.requestId,this.commandName=Z,this.duration=m6.calculateDurationInMs(D),this.reply=i$(Z,X,X91(A,B)),this.serverConnectionId=J}get hasServiceId(){return!!this.serviceId}}SP.CommandSucceededEvent=kP;class OP{constructor(F,A,B,D,J){this.name=u5.COMMAND_FAILED;let X=n$(A),Z=p$(X),{address:Y,connectionId:$,serviceId:G}=s$(F);this.address=Y,this.connectionId=$,this.serviceId=G,this.requestId=A.requestId,this.commandName=Z,this.duration=m6.calculateDurationInMs(D),this.failure=i$(Z,X,B),this.serverConnectionId=J}get hasServiceId(){return!!this.serviceId}}SP.CommandFailedEvent=OP;SP.SENSITIVE_COMMANDS=new Set(["authenticate","saslStart","saslContinue","getnonce","createUser","updateUser","copydbgetnonce","copydbsaslstart","copydb"]);var A91=new Set(["hello",u5.LEGACY_HELLO_COMMAND,u5.LEGACY_HELLO_COMMAND_CAMEL_CASE]),p$=(F)=>Object.keys(F)[0],B91=(F)=>F.ns,D91=(F)=>F.ns.split(".")[1],i$=(F,A,B)=>SP.SENSITIVE_COMMANDS.has(F)||A91.has(F)&&A.speculativeAuthenticate?{}:B,MP={$query:"filter",$orderby:"sort",$hint:"hint",$comment:"comment",$maxScan:"maxScan",$max:"max",$min:"min",$returnKey:"returnKey",$showDiskLoc:"showRecordId",$maxTimeMS:"maxTimeMS",$snapshot:"snapshot"},TP={numberToSkip:"skip",numberToReturn:"batchSize",returnFieldSelector:"projection"},J91=["tailable","oplogReplay","noCursorTimeout","awaitData","partial","exhaust"];function n$(F){if(F instanceof PB.OpMsgRequest){let D=m6.deepCopy(F.command);if(D.ops instanceof PB.DocumentSequence)D.ops=D.ops.documents;if(D.nsInfo instanceof PB.DocumentSequence)D.nsInfo=D.nsInfo.documents;return D}if(F.query?.$query){let D;if(F.ns==="admin.$cmd")D=Object.assign({},F.query.$query);else D={find:D91(F)},Object.keys(MP).forEach((J)=>{if(F.query[J]!=null)D[MP[J]]=m6.deepCopy(F.query[J])});if(Object.keys(TP).forEach((J)=>{let X=J;if(F[X]!=null)D[TP[X]]=m6.deepCopy(F[X])}),J91.forEach((J)=>{if(F[J])D[J]=F[J]}),F.pre32Limit!=null)D.limit=F.pre32Limit;if(F.query.$explain)return{explain:D};return D}let A={},B={};if(F.query){for(let D in F.query)A[D]=m6.deepCopy(F.query[D]);B.query=A}for(let D in F){if(D==="query")continue;B[D]=m6.deepCopy(F[D])}return F.query?A:B}function X91(F,A){if(!A)return A;if(F instanceof PB.OpMsgRequest)return m6.deepCopy(A.result?A.result:A);if(F.query&&F.query.$query!=null)return{ok:1,cursor:{id:m6.deepCopy(A.cursorId),ns:B91(F),firstBatch:m6.deepCopy(A.documents)}};return m6.deepCopy(A.result?A.result:A)}function s$(F){let A;if("id"in F)A=F.id;return{address:F.address,serviceId:F.serviceId,connectionId:A}}});var _P=K((xP)=>{Object.defineProperty(xP,"__esModule",{value:!0});xP.StreamDescription=void 0;var G91=I1(),E91=s2(),H91=O5(),q91=["minWireVersion","maxWireVersion","maxBsonObjectSize","maxMessageSizeBytes","maxWriteBatchSize","logicalSessionTimeoutMinutes"];class uP{constructor(F,A){this.hello=null,this.address=F,this.type=E91.ServerType.Unknown,this.minWireVersion=void 0,this.maxWireVersion=void 0,this.maxBsonObjectSize=16777216,this.maxMessageSizeBytes=48000000,this.maxWriteBatchSize=1e5,this.logicalSessionTimeoutMinutes=A?.logicalSessionTimeoutMinutes,this.loadBalanced=!!A?.loadBalanced,this.compressors=A&&A.compressors&&Array.isArray(A.compressors)?A.compressors:[],this.serverConnectionId=null}receiveResponse(F){if(F==null)return;if(this.hello=F,this.type=H91.parseServerType(F),"connectionId"in F)this.serverConnectionId=this.parseServerConnectionID(F.connectionId);else this.serverConnectionId=null;for(let A of q91){if(F[A]!=null)this[A]=F[A];if("__nodejs_mock_server__"in F)this.__nodejs_mock_server__=F.__nodejs_mock_server__}if(F.compression)this.compressor=this.compressors.filter((A)=>F.compression?.includes(A))[0]}parseServerConnectionID(F){return G91.Long.isLong(F)?F.toBigInt():BigInt(F)}}xP.StreamDescription=uP});var bP=K((gP)=>{Object.defineProperty(gP,"__esModule",{value:!0});gP.onData=W91;var r$=a();function W91(F,{timeoutContext:A}){let B=new r$.List,D=new r$.List,J=null,X=!1,Z={next(){let H=B.shift();if(H!=null)return Promise.resolve({value:H,done:!1});if(J!=null){let C=Promise.reject(J);return J=null,C}if(X)return E();let{promise:q,resolve:W,reject:z}=r$.promiseWithResolvers();return D.push({resolve:W,reject:z}),q},return(){return E()},throw(H){return G(H),Promise.resolve({value:void 0,done:!0})},[Symbol.asyncIterator](){return this}};F.on("data",$),F.on("error",G);let Y=A?.timeoutForSocketRead;return Y?.throwIfExpired(),Y?.then(void 0,G),Z;function $(H){let q=D.shift();if(q!=null)q.resolve({value:H,done:!1});else B.push(H)}function G(H){let q=D.shift();if(q!=null)q.reject(H);else J=H;E()}function E(){F.off("data",$),F.off("error",G),X=!0,Y?.clear();let H={value:void 0,done:X};for(let q of D)q.resolve(H);return Promise.resolve(H)}}});var jB=K((cP)=>{Object.defineProperty(cP,"__esModule",{value:!0});cP.CryptoConnection=cP.SizedMessageTransform=cP.Connection=void 0;cP.hasSessionSupport=I91;var C91=import.meta.require("stream"),mP=import.meta.require("timers"),K91=I1(),K4=K0(),E0=l(),yP=r4(),U91=o2(),Q91=k0(),L91=s2(),vP=w7(),hP=o0(),L6=a(),t$=a$(),TB=V5(),V91=_P(),R91=R5(),w91=bP(),x5=_6(),o$=y$();function I91(F){return F.description.logicalSessionTimeoutMinutes!=null}function N91(F,A){if(A.proxyHost)return A.hostAddress.toString();let{remoteAddress:B,remotePort:D}=F;if(typeof B==="string"&&typeof D==="number")return L6.HostAddress.fromHostPort(B,D).toString();return L6.uuidV4().toString("hex")}class h0 extends U91.TypedEventEmitter{constructor(F,A){super();this.lastHelloMS=-1,this.helloOk=!1,this.delayedTimeoutId=null,this.closed=!1,this.clusterTime=null,this.error=null,this.dataEvents=null,this.socket=F,this.id=A.id,this.address=N91(F,A),this.socketTimeoutMS=A.socketTimeoutMS??0,this.monitorCommands=A.monitorCommands,this.serverApi=A.serverApi,this.mongoLogger=A.mongoLogger,this.established=!1,this.description=new V91.StreamDescription(this.address,A),this.generation=A.generation,this.lastUseTime=L6.now(),this.messageStream=this.socket.on("error",this.onError.bind(this)).pipe(new e$({connection:this})).on("error",this.onError.bind(this)),this.socket.on("close",this.onClose.bind(this)),this.socket.on("timeout",this.onTimeout.bind(this)),this.messageStream.pause()}get hello(){return this.description.hello}set hello(F){this.description.receiveResponse(F),Object.freeze(this.description)}get serviceId(){return this.hello?.serviceId}get loadBalanced(){return this.description.loadBalanced}get idleTime(){return L6.calculateDurationInMs(this.lastUseTime)}get hasSessionSupport(){return this.description.logicalSessionTimeoutMinutes!=null}get supportsOpMsg(){return this.description!=null&&L6.maxWireVersion(this)>=6&&!this.description.__nodejs_mock_server__}get shouldEmitAndLogCommand(){return(this.monitorCommands||this.established&&!this.authContext?.reauthenticating&&this.mongoLogger?.willLog(yP.MongoLoggableComponent.COMMAND,yP.SeverityLevel.DEBUG))??!1}markAvailable(){this.lastUseTime=L6.now()}onError(F){this.cleanup(F)}onClose(){let F=`connection ${this.id} to ${this.address} closed`;this.cleanup(new E0.MongoNetworkError(F))}onTimeout(){this.delayedTimeoutId=mP.setTimeout(()=>{let F=`connection ${this.id} to ${this.address} timed out`,A=this.hello==null;this.cleanup(new E0.MongoNetworkTimeoutError(F,{beforeHandshake:A}))},1).unref()}destroy(){if(this.closed)return;this.removeAllListeners(h0.PINNED),this.removeAllListeners(h0.UNPINNED);let F=`connection ${this.id} to ${this.address} closed`;this.cleanup(new E0.MongoNetworkError(F))}cleanup(F){if(this.closed)return;this.socket.destroy(),this.error=F,this.dataEvents?.throw(F).then(void 0,L6.squashError),this.closed=!0,this.emit(h0.CLOSE)}prepareCommand(F,A,B){let D={...A},J=o$.getReadPreference(B),X=B?.session,Z=this.clusterTime;if(this.serverApi){let{version:G,strict:E,deprecationErrors:H}=this.serverApi;if(D.apiVersion=G,E!=null)D.apiStrict=E;if(H!=null)D.apiDeprecationErrors=H}if(this.hasSessionSupport&&X){if(X.clusterTime&&Z&&X.clusterTime.clusterTime.greaterThan(Z.clusterTime))Z=X.clusterTime;let G=vP.applySession(X,D,B);if(G)throw G}else if(X?.explicit)throw new E0.MongoCompatibilityError("Current topology does not support sessions");if(Z)D.$clusterTime=Z;if(this.description.type!==L91.ServerType.Standalone){if(!o$.isSharded(this)&&!this.description.loadBalanced&&this.supportsOpMsg&&B.directConnection===!0&&J?.mode==="primary")D.$readPreference=Q91.ReadPreference.primaryPreferred.toJSON();else if(o$.isSharded(this)&&!this.supportsOpMsg&&J?.mode!=="primary")D={$query:D,$readPreference:J.toJSON()};else if(J?.mode!=="primary")D.$readPreference=J.toJSON()}let Y={numberToSkip:0,numberToReturn:-1,checkKeys:!1,secondaryOk:J.secondaryOk(),...B};return B.timeoutContext?.addMaxTimeMSToCommand(D,B),this.supportsOpMsg?new TB.OpMsgRequest(F,D,Y):new TB.OpQueryRequest(F,D,Y)}async*sendWire(F,A,B){this.throwIfAborted();let D=A.socketTimeoutMS??A?.timeoutContext?.getSocketTimeoutMS()??this.socketTimeoutMS;this.socket.setTimeout(D);try{if(await this.writeCommand(F,{agreedCompressor:this.description.compressor??"none",zlibCompressionLevel:this.description.zlibCompressionLevel,timeoutContext:A.timeoutContext}),A.noResponse||F.moreToCome){yield x5.MongoDBResponse.empty;return}if(this.throwIfAborted(),A.timeoutContext?.csotEnabled()&&A.timeoutContext.minRoundTripTime!=null&&A.timeoutContext.remainingTimeMS<A.timeoutContext.minRoundTripTime)throw new E0.MongoOperationTimeoutError("Server roundtrip time is greater than the time remaining");for await(let J of this.readMany({timeoutContext:A.timeoutContext})){this.socket.setTimeout(0);let X=J.parse();yield(B??x5.MongoDBResponse).make(X),this.throwIfAborted(),this.socket.setTimeout(D)}}finally{this.socket.setTimeout(0)}}async*sendCommand(F,A,B,D){let J=this.prepareCommand(F.db,A,B),X=0;if(this.shouldEmitAndLogCommand)X=L6.now(),this.emitAndLogCommand(this.monitorCommands,h0.COMMAND_STARTED,J.databaseName,this.established,new t$.CommandStartedEvent(this,J,this.description.serverConnectionId));let Z=B.documentsReturnedIn==null||!B.raw?B:{...B,raw:!1,fieldsAsRaw:{[B.documentsReturnedIn]:!0}},Y=void 0,$=void 0;try{this.throwIfAborted();for await(Y of this.sendWire(J,B,D)){if($=void 0,B.session!=null)vP.updateSessionFromResponse(B.session,Y);if(Y.$clusterTime)this.clusterTime=Y.$clusterTime,this.emit(h0.CLUSTER_TIME_RECEIVED,Y.$clusterTime);if(Y.ok===0){if(B.timeoutContext?.csotEnabled()&&Y.isMaxTimeExpiredError)throw new E0.MongoOperationTimeoutError("Server reported a timeout error",{cause:new E0.MongoServerError($??=Y.toObject(Z))});throw new E0.MongoServerError($??=Y.toObject(Z))}if(this.shouldEmitAndLogCommand)this.emitAndLogCommand(this.monitorCommands,h0.COMMAND_SUCCEEDED,J.databaseName,this.established,new t$.CommandSucceededEvent(this,J,B.noResponse?void 0:J.moreToCome?{ok:1}:$??=Y.toObject(Z),X,this.description.serverConnectionId));if(D==null)yield $??=Y.toObject(Z);else yield Y;this.throwIfAborted()}}catch(G){if(this.shouldEmitAndLogCommand)this.emitAndLogCommand(this.monitorCommands,h0.COMMAND_FAILED,J.databaseName,this.established,new t$.CommandFailedEvent(this,J,G,X,this.description.serverConnectionId));throw G}}async command(F,A,B={},D){this.throwIfAborted();for await(let J of this.sendCommand(F,A,B,D)){if(B.timeoutContext?.csotEnabled()){if(x5.MongoDBResponse.is(J)){if(J.isMaxTimeExpiredError)throw new E0.MongoOperationTimeoutError("Server reported a timeout error",{cause:new E0.MongoServerError(J.toObject())})}else if(Array.isArray(J?.writeErrors)&&J.writeErrors.some((X)=>X?.code===E0.MONGODB_ERROR_CODES.MaxTimeMSExpired)||J?.writeConcernError?.code===E0.MONGODB_ERROR_CODES.MaxTimeMSExpired)throw new E0.MongoOperationTimeoutError("Server reported a timeout error",{cause:new E0.MongoServerError(J)})}return J}throw new E0.MongoUnexpectedServerResponseError("Unable to get response from server")}exhaustCommand(F,A,B,D){(async()=>{this.throwIfAborted();for await(let X of this.sendCommand(F,A,B))D(void 0,X),this.throwIfAborted();throw new E0.MongoUnexpectedServerResponseError("Server ended moreToCome unexpectedly")})().then(void 0,D)}throwIfAborted(){if(this.error)throw this.error}async writeCommand(F,A){let B=A.agreedCompressor==="none"||!TB.OpCompressedRequest.canCompress(F)?F:new TB.OpCompressedRequest(F,{agreedCompressor:A.agreedCompressor??"none",zlibCompressionLevel:A.zlibCompressionLevel??0}),D=Buffer.concat(await B.toBin());if(A.timeoutContext?.csotEnabled()){if(A.timeoutContext.minRoundTripTime!=null&&A.timeoutContext.remainingTimeMS<A.timeoutContext.minRoundTripTime)throw new E0.MongoOperationTimeoutError("Server roundtrip time is greater than the time remaining")}if(this.socket.write(D))return;let J=L6.once(this.socket,"drain"),X=A?.timeoutContext?.timeoutForSocketWrite;if(X)try{return await Promise.race([J,X])}catch(Z){let Y=Z;if(hP.TimeoutError.is(Z))Y=new E0.MongoOperationTimeoutError("Timed out at socket write"),this.cleanup(Y);throw Z}finally{X.clear()}return await J}async*readMany(F){try{this.dataEvents=w91.onData(this.messageStream,F),this.messageStream.resume();for await(let A of this.dataEvents){let B=await R91.decompressResponse(A);if(yield B,!B.moreToCome)return}}catch(A){let B=A;if(hP.TimeoutError.is(A)){let D=new E0.MongoOperationTimeoutError(`Timed out during socket read (${A.duration}ms)`);throw this.dataEvents=null,this.onError(D),D}throw B}finally{this.dataEvents=null,this.messageStream.pause(),this.throwIfAborted()}}}cP.Connection=h0;h0.COMMAND_STARTED=K4.COMMAND_STARTED;h0.COMMAND_SUCCEEDED=K4.COMMAND_SUCCEEDED;h0.COMMAND_FAILED=K4.COMMAND_FAILED;h0.CLUSTER_TIME_RECEIVED=K4.CLUSTER_TIME_RECEIVED;h0.CLOSE=K4.CLOSE;h0.PINNED=K4.PINNED;h0.UNPINNED=K4.UNPINNED;class e$ extends C91.Transform{constructor({connection:F}){super({writableObjectMode:!1,readableObjectMode:!0});this.bufferPool=new L6.BufferPool,this.connection=F}_transform(F,A,B){if(this.connection.delayedTimeoutId!=null)mP.clearTimeout(this.connection.delayedTimeoutId),this.connection.delayedTimeoutId=null;this.bufferPool.append(F);let D=this.bufferPool.getInt32();if(D==null)return B();if(D<0)return B(new E0.MongoParseError(`Invalid message size: ${D}, too small`));if(D>this.bufferPool.length)return B();let J=this.bufferPool.read(D);return B(null,J)}}cP.SizedMessageTransform=e$;class dP extends h0{constructor(F,A){super(F,A);this.autoEncrypter=A.autoEncrypter}async command(F,A,B,D){let{autoEncrypter:J}=this;if(!J)throw new E0.MongoMissingDependencyError("No AutoEncrypter available for encryption",{dependencyName:"n/a"});let X=L6.maxWireVersion(this);if(X===0)return await super.command(F,A,B,D);if(X<8)throw new E0.MongoCompatibilityError("Auto-encryption requires a minimum MongoDB version of 4.2");let Z=A.find||A.findAndModify?A.sort:null,Y=A.createIndexes?A.indexes.map((q)=>q.key):null,$=await J.encrypt(F.toString(),A,B);if(Z!=null&&(A.find||A.findAndModify))$.sort=Z;if(Y!=null&&A.createIndexes)for(let[q,W]of Y.entries())$.indexes[q].key=W;let G=await super.command(F,$,B,D??x5.MongoDBResponse),E=await J.decrypt(G.toBytes(),B),H=D?.make(E)??K91.deserialize(E,B);if(J[K4.kDecorateResult]){if(D==null)L6.decorateDecryptionResult(H,G.toObject(),!0);else if(H instanceof x5.CursorResponse)H.encryptedResponse=G}return H}}cP.CryptoConnection=dP});var DG=K((tP)=>{Object.defineProperty(tP,"__esModule",{value:!0});tP.LEGAL_TCP_SOCKET_OPTIONS=tP.LEGAL_TLS_SOCKET_OPTIONS=void 0;tP.connect=S91;tP.makeConnection=sP;tP.performInitialHandshake=aP;tP.prepareHandshakeDocument=rP;tP.makeSocket=OB;var iP=import.meta.require("net"),j91=import.meta.require("tls"),nP=K0(),k91=y6(),X0=l(),FG=a(),O91=G4(),kB=B3(),pP=jB(),I7=l4();async function S91(F){let A=null;try{let B=await OB(F);return A=sP(F,B),await aP(A,F),A}catch(B){throw A?.destroy(),B}}function sP(F,A){let B=F.connectionType??pP.Connection;if(F.autoEncrypter)B=pP.CryptoConnection;return new B(A,F)}function u91(F,A){let B=Number(F.maxWireVersion),D=Number(F.minWireVersion),J=!Number.isNaN(B)&&B>=I7.MIN_SUPPORTED_WIRE_VERSION,X=!Number.isNaN(D)&&D<=I7.MAX_SUPPORTED_WIRE_VERSION;if(J){if(X)return null;let Y=`Server at ${A.hostAddress} reports minimum wire version ${JSON.stringify(F.minWireVersion)}, but this version of the Node.js Driver requires at most ${I7.MAX_SUPPORTED_WIRE_VERSION} (MongoDB ${I7.MAX_SUPPORTED_SERVER_VERSION})`;return new X0.MongoCompatibilityError(Y)}let Z=`Server at ${A.hostAddress} reports maximum wire version ${JSON.stringify(F.maxWireVersion)??0}, but this version of the Node.js Driver requires at least ${I7.MIN_SUPPORTED_WIRE_VERSION} (MongoDB ${I7.MIN_SUPPORTED_SERVER_VERSION})`;return new X0.MongoCompatibilityError(Z)}async function aP(F,A){let B=A.credentials;if(B){if(B.mechanism!==kB.AuthMechanism.MONGODB_DEFAULT&&!A.authProviders.getOrCreateProvider(B.mechanism,B.mechanismProperties))throw new X0.MongoInvalidArgumentError(`AuthMechanism '${B.mechanism}' not supported`)}let D=new O91.AuthContext(F,B,A);F.authContext=D;let J=await rP(D),X={...A,raw:!1};if(typeof A.connectTimeoutMS==="number")X.socketTimeoutMS=A.connectTimeoutMS;let Z=new Date().getTime(),Y=await G(J,X);if(!("isWritablePrimary"in Y))Y.isWritablePrimary=Y[nP.LEGACY_HELLO_COMMAND];if(Y.helloOk)F.helloOk=!0;let $=u91(Y,A);if($)throw $;if(A.loadBalanced){if(!Y.serviceId)throw new X0.MongoCompatibilityError("Driver attempted to initialize in load balancing mode, but the server does not support this mode.")}if(F.hello=Y,F.lastHelloMS=new Date().getTime()-Z,!Y.arbiterOnly&&B){D.response=Y;let E=B.resolveAuthMechanism(Y),H=A.authProviders.getOrCreateProvider(E.mechanism,E.mechanismProperties);if(!H)throw new X0.MongoInvalidArgumentError(`No AuthProvider for ${E.mechanism} defined.`);try{await H.auth(D)}catch(q){if(q instanceof X0.MongoError){if(q.addErrorLabel(X0.MongoErrorLabel.HandshakeError),X0.needsRetryableWriteLabel(q,Y.maxWireVersion,F.description.type))q.addErrorLabel(X0.MongoErrorLabel.RetryableWriteError)}throw q}}F.established=!0;async function G(E,H){try{return await F.command(FG.ns("admin.$cmd"),E,H)}catch(q){if(q instanceof X0.MongoError)q.addErrorLabel(X0.MongoErrorLabel.HandshakeError);throw q}}}async function rP(F){let A=F.options,B=A.compressors?A.compressors:[],{serverApi:D}=F.connection,J=await A.extendedMetadata,X={[D?.version||A.loadBalanced===!0?"hello":nP.LEGACY_HELLO_COMMAND]:1,helloOk:!0,client:J,compression:B};if(A.loadBalanced===!0)X.loadBalanced=!0;let Z=F.credentials;if(Z){if(Z.mechanism===kB.AuthMechanism.MONGODB_DEFAULT&&Z.username){X.saslSupportedMechs=`${Z.source}.${Z.username}`;let $=F.options.authProviders.getOrCreateProvider(kB.AuthMechanism.MONGODB_SCRAM_SHA256,Z.mechanismProperties);if(!$)throw new X0.MongoInvalidArgumentError(`No AuthProvider for ${kB.AuthMechanism.MONGODB_SCRAM_SHA256} defined.`);return await $.prepare(X,F)}let Y=F.options.authProviders.getOrCreateProvider(Z.mechanism,Z.mechanismProperties);if(!Y)throw new X0.MongoInvalidArgumentError(`No AuthProvider for ${Z.mechanism} defined.`);return await Y.prepare(X,F)}return X}tP.LEGAL_TLS_SOCKET_OPTIONS=["allowPartialTrustChain","ALPNProtocols","ca","cert","checkServerIdentity","ciphers","crl","ecdhCurve","key","minDHSize","passphrase","pfx","rejectUnauthorized","secureContext","secureProtocol","servername","session"];tP.LEGAL_TCP_SOCKET_OPTIONS=["autoSelectFamily","autoSelectFamilyAttemptTimeout","family","hints","localAddress","localPort","lookup"];function AG(F){let A=F.hostAddress;if(!A)throw new X0.MongoInvalidArgumentError('Option "hostAddress" is required');let B={};for(let D of tP.LEGAL_TCP_SOCKET_OPTIONS)if(F[D]!=null)B[D]=F[D];if(typeof A.socketPath==="string")return B.path=A.socketPath,B;else if(typeof A.host==="string")return B.host=A.host,B.port=A.port,B;else throw new X0.MongoRuntimeError(`Unexpected HostAddress ${JSON.stringify(A)}`)}function x91(F){let A=AG(F);for(let B of tP.LEGAL_TLS_SOCKET_OPTIONS)if(F[B]!=null)A[B]=F[B];if(F.existingSocket)A.socket=F.existingSocket;if(A.servername==null&&A.host&&!iP.isIP(A.host))A.servername=A.host;return A}async function OB(F){let A=F.tls??!1,B=F.noDelay??!0,D=F.connectTimeoutMS??30000,J=F.existingSocket,X;if(F.proxyHost!=null)return await _91({...F,connectTimeoutMS:D});if(A){let E=j91.connect(x91(F));if(typeof E.disableRenegotiation==="function")E.disableRenegotiation();X=E}else if(J)X=J;else X=iP.createConnection(AG(F));X.setKeepAlive(!0,300000),X.setTimeout(D),X.setNoDelay(B);let Z=null,{promise:Y,resolve:$,reject:G}=FG.promiseWithResolvers();if(J)$(X);else{let E=performance.now(),H=A?"secureConnect":"connect";if(X.once(H,()=>$(X)).once("error",(q)=>G(new X0.MongoNetworkError(X0.MongoError.buildErrorMessage(q),{cause:q}))).once("timeout",()=>{G(new X0.MongoNetworkTimeoutError(`Socket '${H}' timed out after ${performance.now()-E|0}ms (connectTimeoutMS: ${D})`))}).once("close",()=>G(new X0.MongoNetworkError(`Socket closed after ${performance.now()-E|0} during connection establishment`))),F.cancellationToken!=null)Z=()=>G(new X0.MongoNetworkError(`Socket connection establishment was cancelled after ${performance.now()-E|0}`)),F.cancellationToken.once("cancel",Z)}try{return X=await Y,X}catch(E){throw X.destroy(),E}finally{if(X.setTimeout(0),X.removeAllListeners(),Z!=null)F.cancellationToken?.removeListener("cancel",Z)}}var f5=null;function f91(){if(f5==null){let F=k91.getSocks();if("kModuleError"in F)throw F.kModuleError;f5=F}return f5}async function _91(F){let A=FG.HostAddress.fromHostPort(F.proxyHost??"",F.proxyPort??1080),B=await OB({...F,hostAddress:A,tls:!1,proxyHost:void 0}),D=AG(F);if(typeof D.host!=="string"||typeof D.port!=="number")throw new X0.MongoInvalidArgumentError("Can only make Socks5 connections to TCP hosts");f5??=f91();let J;try{J=(await f5.SocksClient.createConnection({existing_socket:B,timeout:F.connectTimeoutMS,command:"connect",destination:{host:D.host,port:D.port},proxy:{host:"iLoveJavaScript",port:0,type:5,userId:F.proxyUsername||void 0,password:F.proxyPassword||void 0}})).socket}catch(X){throw new X0.MongoNetworkError(X0.MongoError.buildErrorMessage(X),{cause:X})}return await OB({...F,existingSocket:J,proxyHost:void 0})}});var SB=K(($M)=>{Object.defineProperty($M,"__esModule",{value:!0});$M.ServerHeartbeatFailedEvent=$M.ServerHeartbeatSucceededEvent=$M.ServerHeartbeatStartedEvent=$M.TopologyClosedEvent=$M.TopologyOpeningEvent=$M.TopologyDescriptionChangedEvent=$M.ServerClosedEvent=$M.ServerOpeningEvent=$M.ServerDescriptionChangedEvent=void 0;var j3=K0();class eP{constructor(F,A,B,D){this.name=j3.SERVER_DESCRIPTION_CHANGED,this.topologyId=F,this.address=A,this.previousDescription=B,this.newDescription=D}}$M.ServerDescriptionChangedEvent=eP;class FM{constructor(F,A){this.name=j3.SERVER_OPENING,this.topologyId=F,this.address=A}}$M.ServerOpeningEvent=FM;class AM{constructor(F,A){this.name=j3.SERVER_CLOSED,this.topologyId=F,this.address=A}}$M.ServerClosedEvent=AM;class BM{constructor(F,A,B){this.name=j3.TOPOLOGY_DESCRIPTION_CHANGED,this.topologyId=F,this.previousDescription=A,this.newDescription=B}}$M.TopologyDescriptionChangedEvent=BM;class DM{constructor(F){this.name=j3.TOPOLOGY_OPENING,this.topologyId=F}}$M.TopologyOpeningEvent=DM;class JM{constructor(F){this.name=j3.TOPOLOGY_CLOSED,this.topologyId=F}}$M.TopologyClosedEvent=JM;class XM{constructor(F,A){this.name=j3.SERVER_HEARTBEAT_STARTED,this.connectionId=F,this.awaited=A}}$M.ServerHeartbeatStartedEvent=XM;class ZM{constructor(F,A,B,D){this.name=j3.SERVER_HEARTBEAT_SUCCEEDED,this.connectionId=F,this.duration=A,this.reply=B??{},this.awaited=D}}$M.ServerHeartbeatSucceededEvent=ZM;class YM{constructor(F,A,B,D){this.name=j3.SERVER_HEARTBEAT_FAILED,this.connectionId=F,this.duration=A,this.failure=B,this.awaited=D}}$M.ServerHeartbeatFailedEvent=YM});var XG=K((RM)=>{Object.defineProperty(RM,"__esModule",{value:!0});RM.ConnectionPoolClearedEvent=RM.ConnectionCheckedInEvent=RM.ConnectionCheckedOutEvent=RM.ConnectionCheckOutFailedEvent=RM.ConnectionCheckOutStartedEvent=RM.ConnectionClosedEvent=RM.ConnectionReadyEvent=RM.ConnectionCreatedEvent=RM.ConnectionPoolClosedEvent=RM.ConnectionPoolReadyEvent=RM.ConnectionPoolCreatedEvent=RM.ConnectionPoolMonitoringEvent=void 0;var d6=K0(),JG=a();class F6{constructor(F){this.time=new Date,this.address=F.address}}RM.ConnectionPoolMonitoringEvent=F6;class EM extends F6{constructor(F){super(F);this.name=d6.CONNECTION_POOL_CREATED;let{maxConnecting:A,maxPoolSize:B,minPoolSize:D,maxIdleTimeMS:J,waitQueueTimeoutMS:X}=F.options;this.options={maxConnecting:A,maxPoolSize:B,minPoolSize:D,maxIdleTimeMS:J,waitQueueTimeoutMS:X}}}RM.ConnectionPoolCreatedEvent=EM;class HM extends F6{constructor(F){super(F);this.name=d6.CONNECTION_POOL_READY}}RM.ConnectionPoolReadyEvent=HM;class qM extends F6{constructor(F){super(F);this.name=d6.CONNECTION_POOL_CLOSED}}RM.ConnectionPoolClosedEvent=qM;class WM extends F6{constructor(F,A){super(F);this.name=d6.CONNECTION_CREATED,this.connectionId=A.id}}RM.ConnectionCreatedEvent=WM;class zM extends F6{constructor(F,A,B){super(F);this.name=d6.CONNECTION_READY,this.durationMS=JG.now()-B,this.connectionId=A.id}}RM.ConnectionReadyEvent=zM;class CM extends F6{constructor(F,A,B,D){super(F);this.name=d6.CONNECTION_CLOSED,this.connectionId=A.id,this.reason=B,this.serviceId=A.serviceId,this.error=D??null}}RM.ConnectionClosedEvent=CM;class KM extends F6{constructor(F){super(F);this.name=d6.CONNECTION_CHECK_OUT_STARTED}}RM.ConnectionCheckOutStartedEvent=KM;class UM extends F6{constructor(F,A,B,D){super(F);this.name=d6.CONNECTION_CHECK_OUT_FAILED,this.durationMS=JG.now()-B,this.reason=A,this.error=D}}RM.ConnectionCheckOutFailedEvent=UM;class QM extends F6{constructor(F,A,B){super(F);this.name=d6.CONNECTION_CHECKED_OUT,this.durationMS=JG.now()-B,this.connectionId=A.id}}RM.ConnectionCheckedOutEvent=QM;class LM extends F6{constructor(F,A){super(F);this.name=d6.CONNECTION_CHECKED_IN,this.connectionId=A.id}}RM.ConnectionCheckedInEvent=LM;class VM extends F6{constructor(F,A={}){super(F);this.name=d6.CONNECTION_POOL_CLEARED,this.serviceId=A.serviceId,this.interruptInUseConnections=A.interruptInUseConnections}}RM.ConnectionPoolClearedEvent=VM});var YG=K((MM)=>{Object.defineProperty(MM,"__esModule",{value:!0});MM.WaitQueueTimeoutError=MM.PoolClearedOnNetworkError=MM.PoolClearedError=MM.PoolClosedError=void 0;var uB=l();class IM extends uB.MongoDriverError{constructor(F){super("Attempted to check out a connection from closed connection pool");this.address=F.address}get name(){return"MongoPoolClosedError"}}MM.PoolClosedError=IM;class ZG extends uB.MongoNetworkError{constructor(F,A){let B=A?A:`Connection pool for ${F.address} was cleared because another operation failed with: "${F.serverError?.message}"`;super(B,F.serverError?{cause:F.serverError}:void 0);this.address=F.address,this.addErrorLabel(uB.MongoErrorLabel.PoolRequstedRetry)}get name(){return"MongoPoolClearedError"}}MM.PoolClearedError=ZG;class NM extends ZG{constructor(F){super(F,`Connection to ${F.address} interrupted due to server monitor timeout`)}get name(){return"PoolClearedOnNetworkError"}}MM.PoolClearedOnNetworkError=NM;class PM extends uB.MongoDriverError{constructor(F,A){super(F);this.address=A}get name(){return"MongoWaitQueueTimeoutError"}}MM.WaitQueueTimeoutError=PM});var uM=K((OM)=>{Object.defineProperty(OM,"__esModule",{value:!0});OM.ConnectionPool=OM.PoolState=void 0;var N7=import.meta.require("timers"),R6=K0(),X3=l(),jM=o2(),G71=o0(),P7=a(),E71=DG(),xB=jB(),m0=XG(),M7=YG(),H71=f$(),T7=Symbol("server"),k3=Symbol("connections"),j7=Symbol("pending"),U4=Symbol("checkedOut"),Z9=Symbol("minPoolSizeTimer"),k7=Symbol("generation"),kM=Symbol("serviceGenerations"),fB=Symbol("connectionCounter"),_B=Symbol("cancellationToken"),O3=Symbol("waitQueue"),gB=Symbol("cancelled"),bB=Symbol("metrics"),yB=Symbol("processingWaitQueue"),c6=Symbol("poolState");OM.PoolState=Object.freeze({paused:"paused",ready:"ready",closed:"closed"});class x1 extends jM.TypedEventEmitter{constructor(F,A){super();if(this.options=Object.freeze({connectionType:xB.Connection,...A,maxPoolSize:A.maxPoolSize??100,minPoolSize:A.minPoolSize??0,maxConnecting:A.maxConnecting??2,maxIdleTimeMS:A.maxIdleTimeMS??0,waitQueueTimeoutMS:A.waitQueueTimeoutMS??0,minPoolSizeCheckFrequencyMS:A.minPoolSizeCheckFrequencyMS??100,autoEncrypter:A.autoEncrypter}),this.options.minPoolSize>this.options.maxPoolSize)throw new X3.MongoInvalidArgumentError("Connection pool minimum size must not be greater than maximum pool size");this[c6]=OM.PoolState.paused,this[T7]=F,this[k3]=new P7.List,this[j7]=0,this[U4]=new Set,this[Z9]=void 0,this[k7]=0,this[kM]=new Map,this[fB]=P7.makeCounter(1),this[_B]=new jM.CancellationToken,this[_B].setMaxListeners(1/0),this[O3]=new P7.List,this[bB]=new H71.ConnectionPoolMetrics,this[yB]=!1,this.mongoLogger=this[T7].topology.client?.mongoLogger,this.component="connection",process.nextTick(()=>{this.emitAndLog(x1.CONNECTION_POOL_CREATED,new m0.ConnectionPoolCreatedEvent(this))})}get address(){return this.options.hostAddress.toString()}get closed(){return this[c6]===OM.PoolState.closed}get generation(){return this[k7]}get totalConnectionCount(){return this.availableConnectionCount+this.pendingConnectionCount+this.currentCheckedOutCount}get availableConnectionCount(){return this[k3].length}get pendingConnectionCount(){return this[j7]}get currentCheckedOutCount(){return this[U4].size}get waitQueueSize(){return this[O3].length}get loadBalanced(){return this.options.loadBalanced}get serviceGenerations(){return this[kM]}get serverError(){return this[T7].description.error}get checkedOutConnections(){return this[U4]}waitQueueErrorMetrics(){return this[bB].info(this.options.maxPoolSize)}ready(){if(this[c6]!==OM.PoolState.paused)return;this[c6]=OM.PoolState.ready,this.emitAndLog(x1.CONNECTION_POOL_READY,new m0.ConnectionPoolReadyEvent(this)),N7.clearTimeout(this[Z9]),this.ensureMinPoolSize()}async checkOut(F){let A=P7.now();this.emitAndLog(x1.CONNECTION_CHECK_OUT_STARTED,new m0.ConnectionCheckOutStartedEvent(this));let{promise:B,resolve:D,reject:J}=P7.promiseWithResolvers(),X=F.timeoutContext.connectionCheckoutTimeout,Z={resolve:D,reject:J,checkoutTime:A};this[O3].push(Z),process.nextTick(()=>this.processWaitQueue());try{return X?.throwIfExpired(),await(X?Promise.race([B,X]):B)}catch(Y){if(G71.TimeoutError.is(Y)){X?.clear(),Z[gB]=!0,this.emitAndLog(x1.CONNECTION_CHECK_OUT_FAILED,new m0.ConnectionCheckOutFailedEvent(this,"timeout",Z.checkoutTime));let $=new M7.WaitQueueTimeoutError(this.loadBalanced?this.waitQueueErrorMetrics():"Timed out while checking out a connection from connection pool",this.address);if(F.timeoutContext.csotEnabled())throw new X3.MongoOperationTimeoutError("Timed out during connection checkout",{cause:$});throw $}throw Y}finally{X?.clear()}}checkIn(F){if(!this[U4].has(F))return;let A=this.closed,B=this.connectionIsStale(F),D=!!(A||B||F.closed);if(!D)F.markAvailable(),this[k3].unshift(F);if(this[U4].delete(F),this.emitAndLog(x1.CONNECTION_CHECKED_IN,new m0.ConnectionCheckedInEvent(this,F)),D){let J=F.closed?"error":A?"poolClosed":"stale";this.destroyConnection(F,J)}process.nextTick(()=>this.processWaitQueue())}clear(F={}){if(this.closed)return;if(this.loadBalanced){let{serviceId:J}=F;if(!J)throw new X3.MongoRuntimeError("ConnectionPool.clear() called in load balanced mode with no serviceId.");let X=J.toHexString(),Z=this.serviceGenerations.get(X);if(Z==null)throw new X3.MongoRuntimeError("Service generations are required in load balancer mode.");else this.serviceGenerations.set(X,Z+1);this.emitAndLog(x1.CONNECTION_POOL_CLEARED,new m0.ConnectionPoolClearedEvent(this,{serviceId:J}));return}let A=F.interruptInUseConnections??!1,B=this[k7];this[k7]+=1;let D=this[c6]===OM.PoolState.paused;if(this[c6]=OM.PoolState.paused,this.clearMinPoolSizeTimer(),!D)this.emitAndLog(x1.CONNECTION_POOL_CLEARED,new m0.ConnectionPoolClearedEvent(this,{interruptInUseConnections:A}));if(A)process.nextTick(()=>this.interruptInUseConnections(B));this.processWaitQueue()}interruptInUseConnections(F){for(let A of this[U4])if(A.generation<=F)A.onError(new M7.PoolClearedOnNetworkError(this)),this.checkIn(A)}close(){if(this.closed)return;if(this[_B].emit("cancel"),typeof this[fB].return==="function")this[fB].return(void 0);this[c6]=OM.PoolState.closed,this.clearMinPoolSizeTimer(),this.processWaitQueue();for(let F of this[k3])this.emitAndLog(x1.CONNECTION_CLOSED,new m0.ConnectionClosedEvent(this,F,"poolClosed")),F.destroy();this[k3].clear(),this.emitAndLog(x1.CONNECTION_POOL_CLOSED,new m0.ConnectionPoolClosedEvent(this))}async reauthenticate(F){let A=F.authContext;if(!A)throw new X3.MongoRuntimeError("No auth context found on connection.");let B=A.credentials;if(!B)throw new X3.MongoMissingCredentialsError("Connection is missing credentials when asked to reauthenticate");let D=B.resolveAuthMechanism(F.hello),J=this[T7].topology.client.s.authProviders.getOrCreateProvider(D.mechanism,D.mechanismProperties);if(!J)throw new X3.MongoMissingCredentialsError(`Reauthenticate failed due to no auth provider for ${B.mechanism}`);await J.reauth(A);return}clearMinPoolSizeTimer(){let F=this[Z9];if(F)N7.clearTimeout(F)}destroyConnection(F,A){this.emitAndLog(x1.CONNECTION_CLOSED,new m0.ConnectionClosedEvent(this,F,A)),F.destroy()}connectionIsStale(F){let A=F.serviceId;if(this.loadBalanced&&A){let B=A.toHexString(),D=this.serviceGenerations.get(B);return F.generation!==D}return F.generation!==this[k7]}connectionIsIdle(F){return!!(this.options.maxIdleTimeMS&&F.idleTime>this.options.maxIdleTimeMS)}destroyConnectionIfPerished(F){let A=this.connectionIsStale(F),B=this.connectionIsIdle(F);if(!A&&!B&&!F.closed)return!1;let D=F.closed?"error":A?"stale":"idle";return this.destroyConnection(F,D),!0}createConnection(F){let A={...this.options,id:this[fB].next().value,generation:this[k7],cancellationToken:this[_B],mongoLogger:this.mongoLogger,authProviders:this[T7].topology.client.s.authProviders};this[j7]++;let B=P7.now();this.emitAndLog(x1.CONNECTION_CREATED,new m0.ConnectionCreatedEvent(this,{id:A.id})),E71.connect(A).then((D)=>{if(this[c6]!==OM.PoolState.ready){this[j7]--,D.destroy(),F(this.closed?new M7.PoolClosedError(this):new M7.PoolClearedError(this));return}for(let J of[...R6.APM_EVENTS,xB.Connection.CLUSTER_TIME_RECEIVED])D.on(J,(X)=>this.emit(J,X));if(this.loadBalanced){D.on(xB.Connection.PINNED,(X)=>this[bB].markPinned(X)),D.on(xB.Connection.UNPINNED,(X)=>this[bB].markUnpinned(X));let J=D.serviceId;if(J){let X,Z=J.toHexString();if(X=this.serviceGenerations.get(Z))D.generation=X;else this.serviceGenerations.set(Z,0),D.generation=0}}D.markAvailable(),this.emitAndLog(x1.CONNECTION_READY,new m0.ConnectionReadyEvent(this,D,B)),this[j7]--,F(void 0,D)},(D)=>{if(this[j7]--,this[T7].handleError(D),this.emitAndLog(x1.CONNECTION_CLOSED,new m0.ConnectionClosedEvent(this,{id:A.id,serviceId:void 0},"error",D)),D instanceof X3.MongoNetworkError||D instanceof X3.MongoServerError)D.connectionGeneration=A.generation;F(D??new X3.MongoRuntimeError("Connection creation failed without error"))})}ensureMinPoolSize(){let F=this.options.minPoolSize;if(this[c6]!==OM.PoolState.ready||F===0)return;if(this[k3].prune((A)=>this.destroyConnectionIfPerished(A)),this.totalConnectionCount<F&&this.pendingConnectionCount<this.options.maxConnecting)this.createConnection((A,B)=>{if(!A&&B)this[k3].push(B),process.nextTick(()=>this.processWaitQueue());if(this[c6]===OM.PoolState.ready)N7.clearTimeout(this[Z9]),this[Z9]=N7.setTimeout(()=>this.ensureMinPoolSize(),this.options.minPoolSizeCheckFrequencyMS)});else N7.clearTimeout(this[Z9]),this[Z9]=N7.setTimeout(()=>this.ensureMinPoolSize(),this.options.minPoolSizeCheckFrequencyMS)}processWaitQueue(){if(this[yB])return;this[yB]=!0;while(this.waitQueueSize){let B=this[O3].first();if(!B){this[O3].shift();continue}if(B[gB]){this[O3].shift();continue}if(this[c6]!==OM.PoolState.ready){let J=this.closed?"poolClosed":"connectionError",X=this.closed?new M7.PoolClosedError(this):new M7.PoolClearedError(this);this.emitAndLog(x1.CONNECTION_CHECK_OUT_FAILED,new m0.ConnectionCheckOutFailedEvent(this,J,B.checkoutTime,X)),this[O3].shift(),B.reject(X);continue}if(!this.availableConnectionCount)break;let D=this[k3].shift();if(!D)break;if(!this.destroyConnectionIfPerished(D))this[U4].add(D),this.emitAndLog(x1.CONNECTION_CHECKED_OUT,new m0.ConnectionCheckedOutEvent(this,D,B.checkoutTime)),this[O3].shift(),B.resolve(D)}let{maxPoolSize:F,maxConnecting:A}=this.options;while(this.waitQueueSize>0&&this.pendingConnectionCount<A&&(F===0||this.totalConnectionCount<F)){let B=this[O3].shift();if(!B||B[gB])continue;this.createConnection((D,J)=>{if(B[gB]){if(!D&&J)this[k3].push(J)}else if(D)this.emitAndLog(x1.CONNECTION_CHECK_OUT_FAILED,new m0.ConnectionCheckOutFailedEvent(this,"connectionError",B.checkoutTime,D)),B.reject(D);else if(J)this[U4].add(J),this.emitAndLog(x1.CONNECTION_CHECKED_OUT,new m0.ConnectionCheckedOutEvent(this,J,B.checkoutTime)),B.resolve(J);process.nextTick(()=>this.processWaitQueue())})}this[yB]=!1}}OM.ConnectionPool=x1;x1.CONNECTION_POOL_CREATED=R6.CONNECTION_POOL_CREATED;x1.CONNECTION_POOL_CLOSED=R6.CONNECTION_POOL_CLOSED;x1.CONNECTION_POOL_CLEARED=R6.CONNECTION_POOL_CLEARED;x1.CONNECTION_POOL_READY=R6.CONNECTION_POOL_READY;x1.CONNECTION_CREATED=R6.CONNECTION_CREATED;x1.CONNECTION_READY=R6.CONNECTION_READY;x1.CONNECTION_CLOSED=R6.CONNECTION_CLOSED;x1.CONNECTION_CHECK_OUT_STARTED=R6.CONNECTION_CHECK_OUT_STARTED;x1.CONNECTION_CHECK_OUT_FAILED=R6.CONNECTION_CHECK_OUT_FAILED;x1.CONNECTION_CHECKED_OUT=R6.CONNECTION_CHECKED_OUT;x1.CONNECTION_CHECKED_IN=R6.CONNECTION_CHECKED_IN});var qG=K((_M)=>{Object.defineProperty(_M,"__esModule",{value:!0});_M.Server=void 0;var q71=jB(),W71=uM(),z71=YG(),Z3=K0(),e1=l(),C71=o2(),EG=v$(),vB=a(),xM=t0(),d1=s2(),K71=WG(),HG=O5(),_5=vB.makeStateMachine({[d1.STATE_CLOSED]:[d1.STATE_CLOSED,d1.STATE_CONNECTING],[d1.STATE_CONNECTING]:[d1.STATE_CONNECTING,d1.STATE_CLOSING,d1.STATE_CONNECTED,d1.STATE_CLOSED],[d1.STATE_CONNECTED]:[d1.STATE_CONNECTED,d1.STATE_CLOSING,d1.STATE_CLOSED],[d1.STATE_CLOSING]:[d1.STATE_CLOSING,d1.STATE_CLOSED]});class x2 extends C71.TypedEventEmitter{constructor(F,A,B){super();this.serverApi=B.serverApi;let D={hostAddress:A.hostAddress,...B};this.topology=F,this.pool=new W71.ConnectionPool(this,D),this.s={description:A,options:B,state:d1.STATE_CLOSED,operationCount:0};for(let J of[...Z3.CMAP_EVENTS,...Z3.APM_EVENTS])this.pool.on(J,(X)=>this.emit(J,X));if(this.pool.on(q71.Connection.CLUSTER_TIME_RECEIVED,(J)=>{this.clusterTime=J}),this.loadBalanced){this.monitor=null;return}this.monitor=new K71.Monitor(this,this.s.options);for(let J of Z3.HEARTBEAT_EVENTS)this.monitor.on(J,(X)=>this.emit(J,X));this.monitor.on("resetServer",(J)=>$G(this,J)),this.monitor.on(x2.SERVER_HEARTBEAT_SUCCEEDED,(J)=>{if(this.emit(x2.DESCRIPTION_RECEIVED,new HG.ServerDescription(this.description.hostAddress,J.reply,{roundTripTime:this.monitor?.roundTripTime,minRoundTripTime:this.monitor?.minRoundTripTime})),this.s.state===d1.STATE_CONNECTING)_5(this,d1.STATE_CONNECTED),this.emit(x2.CONNECT,this)})}get clusterTime(){return this.topology.clusterTime}set clusterTime(F){this.topology.clusterTime=F}get description(){return this.s.description}get name(){return this.s.description.address}get autoEncrypter(){if(this.s.options&&this.s.options.autoEncrypter)return this.s.options.autoEncrypter;return}get loadBalanced(){return this.topology.description.type===d1.TopologyType.LoadBalanced}connect(){if(this.s.state!==d1.STATE_CLOSED)return;if(_5(this,d1.STATE_CONNECTING),!this.loadBalanced)this.monitor?.connect();else _5(this,d1.STATE_CONNECTED),this.emit(x2.CONNECT,this)}destroy(){if(this.s.state===d1.STATE_CLOSED)return;if(_5(this,d1.STATE_CLOSING),!this.loadBalanced)this.monitor?.close();this.pool.close(),_5(this,d1.STATE_CLOSED),this.emit("closed")}requestCheck(){if(!this.loadBalanced)this.monitor?.requestCheck()}async command(F,A,B,D){if(F.db==null||typeof F==="string")throw new e1.MongoInvalidArgumentError("Namespace must not be a string");if(this.s.state===d1.STATE_CLOSING||this.s.state===d1.STATE_CLOSED)throw new e1.MongoServerClosedError;let J=Object.assign({},B,{wireProtocolCommand:!1,directConnection:this.topology.s.options.directConnection});if(J.omitReadPreference)delete J.readPreference;if(this.description.iscryptd)J.omitMaxTimeMS=!0;let X=J.session,Z=X?.pinnedConnection;if(this.incrementOperationCount(),Z==null)try{if(Z=await this.pool.checkOut(B),this.loadBalanced&&U71(A,X))X?.pin(Z)}catch(Y){if(this.decrementOperationCount(),!(Y instanceof z71.PoolClearedError))this.handleError(Y);throw Y}try{try{let Y=await Z.command(F,A,J,D);return xM.throwIfWriteConcernError(Y),Y}catch(Y){throw this.decorateCommandError(Z,A,J,Y)}}catch(Y){if(Y instanceof e1.MongoError&&Y.code===e1.MONGODB_ERROR_CODES.Reauthenticate){await this.pool.reauthenticate(Z);try{let $=await Z.command(F,A,J,D);return xM.throwIfWriteConcernError($),$}catch($){throw this.decorateCommandError(Z,A,J,$)}}else throw Y}finally{if(this.decrementOperationCount(),X?.pinnedConnection!==Z)this.pool.checkIn(Z)}}handleError(F,A){if(!(F instanceof e1.MongoError))return;if(F.connectionGeneration&&F.connectionGeneration<this.pool.generation)return;let D=F instanceof e1.MongoNetworkError&&!(F instanceof e1.MongoNetworkTimeoutError),J=e1.isNetworkErrorBeforeHandshake(F),X=F.hasErrorLabel(e1.MongoErrorLabel.HandshakeError);if(D||J||X){if(!this.loadBalanced)F.addErrorLabel(e1.MongoErrorLabel.ResetPool),$G(this,F);else if(A)this.pool.clear({serviceId:A.serviceId})}else if(e1.isSDAMUnrecoverableError(F)){if(L71(this,F)){let Z=vB.maxWireVersion(this)<=7||e1.isNodeShuttingDownError(F);if(this.loadBalanced&&A&&Z)this.pool.clear({serviceId:A.serviceId});if(!this.loadBalanced){if(Z)F.addErrorLabel(e1.MongoErrorLabel.ResetPool);$G(this,F),process.nextTick(()=>this.requestCheck())}}}}decorateCommandError(F,A,B,D){if(typeof D!=="object"||D==null||!("name"in D))throw new e1.MongoRuntimeError("An unexpected error type: "+typeof D);if(D.name==="AbortError"&&"cause"in D&&D.cause instanceof e1.MongoError)D=D.cause;if(!(D instanceof e1.MongoError))return D;if(Q71(this.pool,F))return D;let J=B?.session;if(D instanceof e1.MongoNetworkError){if(J&&!J.hasEnded&&J.serverSession)J.serverSession.isDirty=!0;if(GG(J,A)&&!D.hasErrorLabel(e1.MongoErrorLabel.TransientTransactionError))D.addErrorLabel(e1.MongoErrorLabel.TransientTransactionError);if((fM(this.topology)||EG.isTransactionCommand(A))&&vB.supportsRetryableWrites(this)&&!GG(J,A))D.addErrorLabel(e1.MongoErrorLabel.RetryableWriteError)}else if((fM(this.topology)||EG.isTransactionCommand(A))&&e1.needsRetryableWriteLabel(D,vB.maxWireVersion(this),this.description.type)&&!GG(J,A))D.addErrorLabel(e1.MongoErrorLabel.RetryableWriteError);if(J&&J.isPinned&&D.hasErrorLabel(e1.MongoErrorLabel.TransientTransactionError))J.unpin({force:!0});return this.handleError(D,F),D}decrementOperationCount(){return this.s.operationCount-=1}incrementOperationCount(){return this.s.operationCount+=1}}_M.Server=x2;x2.SERVER_HEARTBEAT_STARTED=Z3.SERVER_HEARTBEAT_STARTED;x2.SERVER_HEARTBEAT_SUCCEEDED=Z3.SERVER_HEARTBEAT_SUCCEEDED;x2.SERVER_HEARTBEAT_FAILED=Z3.SERVER_HEARTBEAT_FAILED;x2.CONNECT=Z3.CONNECT;x2.DESCRIPTION_RECEIVED=Z3.DESCRIPTION_RECEIVED;x2.CLOSED=Z3.CLOSED;x2.ENDED=Z3.ENDED;function $G(F,A){if(F.loadBalanced)return;if(A instanceof e1.MongoNetworkError&&!(A instanceof e1.MongoNetworkTimeoutError))F.monitor?.reset();F.emit(x2.DESCRIPTION_RECEIVED,new HG.ServerDescription(F.description.hostAddress,void 0,{error:A}))}function U71(F,A){if(A)return A.inTransaction()||A.transaction.isCommitted&&"commitTransaction"in F||"aggregate"in F||"find"in F||"getMore"in F||"listCollections"in F||"listIndexes"in F||"bulkWrite"in F;return!1}function Q71(F,A){if(A.serviceId)return A.generation!==F.serviceGenerations.get(A.serviceId.toHexString());return A.generation!==F.generation}function L71(F,A){let B=A.topologyVersion,D=F.description.topologyVersion;return HG.compareTopologyVersion(D,B)<0}function GG(F,A){return F&&F.inTransaction()&&!EG.isTransactionCommand(A)}function fM(F){return F.s.options.retryWrites!==!1}});var WG=K((dM)=>{Object.defineProperty(dM,"__esModule",{value:!0});dM.RTTSampler=dM.MonitorInterval=dM.RTTPinger=dM.Monitor=dM.ServerMonitoringMode=void 0;var Q4=import.meta.require("timers"),bM=I1(),hB=DG(),V71=C$(),zG=K0(),O7=l(),R71=r4(),yM=o2(),J2=a(),d0=s2(),g5=SB(),b5=qG(),Y3=Symbol("server"),$3=Symbol("monitorId"),x7=Symbol("cancellationToken"),S7="idle",Y9="monitoring",u7=J2.makeStateMachine({[d0.STATE_CLOSING]:[d0.STATE_CLOSING,S7,d0.STATE_CLOSED],[d0.STATE_CLOSED]:[d0.STATE_CLOSED,Y9],[S7]:[S7,Y9,d0.STATE_CLOSING],[Y9]:[Y9,S7,d0.STATE_CLOSING]}),w71=new Set([d0.STATE_CLOSING,d0.STATE_CLOSED,Y9]);function y5(F){return F.s.state===d0.STATE_CLOSED||F.s.state===d0.STATE_CLOSING}dM.ServerMonitoringMode=Object.freeze({auto:"auto",poll:"poll",stream:"stream"});class mM extends yM.TypedEventEmitter{constructor(F,A){super();this.component=R71.MongoLoggableComponent.TOPOLOGY,this[Y3]=F,this.connection=null,this[x7]=new yM.CancellationToken,this[x7].setMaxListeners(1/0),this[$3]=void 0,this.s={state:d0.STATE_CLOSED},this.address=F.description.address,this.options=Object.freeze({connectTimeoutMS:A.connectTimeoutMS??1e4,heartbeatFrequencyMS:A.heartbeatFrequencyMS??1e4,minHeartbeatFrequencyMS:A.minHeartbeatFrequencyMS??500,serverMonitoringMode:A.serverMonitoringMode}),this.isRunningInFaasEnv=V71.getFAASEnv()!=null,this.mongoLogger=this[Y3].topology.client?.mongoLogger,this.rttSampler=new QG(10);let B=this[x7],D={id:"<monitor>",generation:F.pool.generation,cancellationToken:B,hostAddress:F.description.hostAddress,...A,raw:!1,useBigInt64:!1,promoteLongs:!0,promoteValues:!0,promoteBuffers:!0};if(delete D.credentials,D.autoEncrypter)delete D.autoEncrypter;this.connectOptions=Object.freeze(D)}connect(){if(this.s.state!==d0.STATE_CLOSED)return;let F=this.options.heartbeatFrequencyMS,A=this.options.minHeartbeatFrequencyMS;this[$3]=new mB(hM(this),{heartbeatFrequencyMS:F,minHeartbeatFrequencyMS:A,immediate:!0})}requestCheck(){if(w71.has(this.s.state))return;this[$3]?.wake()}reset(){let F=this[Y3].description.topologyVersion;if(y5(this)||F==null)return;u7(this,d0.STATE_CLOSING),vM(this),u7(this,S7);let A=this.options.heartbeatFrequencyMS,B=this.options.minHeartbeatFrequencyMS;this[$3]=new mB(hM(this),{heartbeatFrequencyMS:A,minHeartbeatFrequencyMS:B})}close(){if(y5(this))return;u7(this,d0.STATE_CLOSING),vM(this),this.emit("close"),u7(this,d0.STATE_CLOSED)}get roundTripTime(){return this.rttSampler.average()}get minRoundTripTime(){return this.rttSampler.min()}get latestRtt(){return this.rttSampler.last}addRttSample(F){this.rttSampler.addSample(F)}clearRttSamples(){this.rttSampler.clear()}}dM.Monitor=mM;function vM(F){F[$3]?.stop(),F[$3]=void 0,F.rttPinger?.close(),F.rttPinger=void 0,F[x7].emit("cancel"),F.connection?.destroy(),F.connection=null,F.clearRttSamples()}function CG(F,A){if(A==null)return!1;let B=F.options.serverMonitoringMode;if(B===dM.ServerMonitoringMode.poll)return!1;if(B===dM.ServerMonitoringMode.stream)return!0;if(F.isRunningInFaasEnv)return!1;return!0}function I71(F,A){let B,D,J=F[Y3].description.topologyVersion,X=CG(F,J);F.emitAndLogHeartbeat(b5.Server.SERVER_HEARTBEAT_STARTED,F[Y3].topology.s.id,void 0,new g5.ServerHeartbeatStartedEvent(F.address,X));function Z(G){F.connection?.destroy(),F.connection=null,F.emitAndLogHeartbeat(b5.Server.SERVER_HEARTBEAT_FAILED,F[Y3].topology.s.id,void 0,new g5.ServerHeartbeatFailedEvent(F.address,J2.calculateDurationInMs(B),G,D));let E=!(G instanceof O7.MongoError)?new O7.MongoError(O7.MongoError.buildErrorMessage(G),{cause:G}):G;if(E.addErrorLabel(O7.MongoErrorLabel.ResetPool),E instanceof O7.MongoNetworkTimeoutError)E.addErrorLabel(O7.MongoErrorLabel.InterruptInUseConnections);F.emit("resetServer",E),A(G)}function Y(G){if(!("isWritablePrimary"in G))G.isWritablePrimary=G[zG.LEGACY_HELLO_COMMAND];let E=X&&F.rttPinger?F.rttPinger.latestRtt??J2.calculateDurationInMs(B):J2.calculateDurationInMs(B);if(F.addRttSample(E),F.emitAndLogHeartbeat(b5.Server.SERVER_HEARTBEAT_SUCCEEDED,F[Y3].topology.s.id,G.connectionId,new g5.ServerHeartbeatSucceededEvent(F.address,E,G,X)),X)F.emitAndLogHeartbeat(b5.Server.SERVER_HEARTBEAT_STARTED,F[Y3].topology.s.id,void 0,new g5.ServerHeartbeatStartedEvent(F.address,!0)),B=J2.now();else F.rttPinger?.close(),F.rttPinger=void 0,A(void 0,G)}let{connection:$}=F;if($&&!$.closed){let{serverApi:G,helloOk:E}=$,H=F.options.connectTimeoutMS,q=F.options.heartbeatFrequencyMS,W={[G?.version||E?"hello":zG.LEGACY_HELLO_COMMAND]:1,...X&&J?{maxAwaitTimeMS:q,topologyVersion:N71(J)}:{}},z=X?{socketTimeoutMS:H?H+q:0,exhaustAllowed:!0}:{socketTimeoutMS:H};if(X&&F.rttPinger==null)F.rttPinger=new UG(F);if(B=J2.now(),X)return D=!0,$.exhaustCommand(J2.ns("admin.$cmd"),W,z,(C,U)=>{if(C)return Z(C);return Y(U)});D=!1,$.command(J2.ns("admin.$cmd"),W,z).then(Y,Z);return}(async()=>{let G=await hB.makeSocket(F.connectOptions),E=hB.makeConnection(F.connectOptions,G);B=J2.now();try{return await hB.performInitialHandshake(E,F.connectOptions),E}catch(H){throw E.destroy(),H}})().then((G)=>{if(y5(F)){G.destroy();return}let E=J2.calculateDurationInMs(B);F.addRttSample(E),F.connection=G,F.emitAndLogHeartbeat(b5.Server.SERVER_HEARTBEAT_SUCCEEDED,F[Y3].topology.s.id,G.hello?.connectionId,new g5.ServerHeartbeatSucceededEvent(F.address,E,G.hello,CG(F,G.hello?.topologyVersion))),A(void 0,G.hello)},(G)=>{F.connection=null,D=!1,Z(G)})}function hM(F){return(A)=>{if(F.s.state===Y9){process.nextTick(A);return}u7(F,Y9);function B(){if(!y5(F))u7(F,S7);A()}I71(F,(D,J)=>{if(D){if(F[Y3].description.type===d0.ServerType.Unknown)return B()}if(CG(F,J?.topologyVersion))Q4.setTimeout(()=>{if(!y5(F))F[$3]?.wake()},0);B()})}}function N71(F){return{processId:F.processId,counter:bM.Long.isLong(F.counter)?F.counter:bM.Long.fromNumber(F.counter)}}class UG{constructor(F){this.connection=void 0,this[x7]=F[x7],this.closed=!1,this.monitor=F,this.latestRtt=F.latestRtt??void 0;let A=F.options.heartbeatFrequencyMS;this[$3]=Q4.setTimeout(()=>this.measureRoundTripTime(),A)}get roundTripTime(){return this.monitor.roundTripTime}get minRoundTripTime(){return this.monitor.minRoundTripTime}close(){this.closed=!0,Q4.clearTimeout(this[$3]),this.connection?.destroy(),this.connection=void 0}measureAndReschedule(F,A){if(this.closed){A?.destroy();return}if(this.connection==null)this.connection=A;this.latestRtt=J2.calculateDurationInMs(F),this[$3]=Q4.setTimeout(()=>this.measureRoundTripTime(),this.monitor.options.heartbeatFrequencyMS)}measureRoundTripTime(){let F=J2.now();if(this.closed)return;let A=this.connection;if(A==null){hB.connect(this.monitor.connectOptions).then((D)=>{this.measureAndReschedule(F,D)},()=>{this.connection=void 0});return}let B=A.serverApi?.version||A.helloOk?"hello":zG.LEGACY_HELLO_COMMAND;A.command(J2.ns("admin.$cmd"),{[B]:1},void 0).then(()=>this.measureAndReschedule(F),()=>{this.connection?.destroy(),this.connection=void 0;return})}}dM.RTTPinger=UG;class mB{constructor(F,A={}){if(this.isExpeditedCallToFnScheduled=!1,this.stopped=!1,this.isExecutionInProgress=!1,this.hasExecutedOnce=!1,this._executeAndReschedule=()=>{if(this.stopped)return;if(this.timerId)Q4.clearTimeout(this.timerId);this.isExpeditedCallToFnScheduled=!1,this.isExecutionInProgress=!0,this.fn(()=>{this.lastExecutionEnded=J2.now(),this.isExecutionInProgress=!1,this._reschedule(this.heartbeatFrequencyMS)})},this.fn=F,this.lastExecutionEnded=-1/0,this.heartbeatFrequencyMS=A.heartbeatFrequencyMS??1000,this.minHeartbeatFrequencyMS=A.minHeartbeatFrequencyMS??500,A.immediate)this._executeAndReschedule();else this._reschedule(void 0)}wake(){let A=J2.now()-this.lastExecutionEnded;if(A<0)return this._executeAndReschedule();if(this.isExecutionInProgress)return;if(this.isExpeditedCallToFnScheduled)return;if(A<this.minHeartbeatFrequencyMS){this.isExpeditedCallToFnScheduled=!0,this._reschedule(this.minHeartbeatFrequencyMS-A);return}this._executeAndReschedule()}stop(){if(this.stopped=!0,this.timerId)Q4.clearTimeout(this.timerId),this.timerId=void 0;this.lastExecutionEnded=-1/0,this.isExpeditedCallToFnScheduled=!1}toString(){return JSON.stringify(this)}toJSON(){let F=J2.now(),A=F-this.lastExecutionEnded;return{timerId:this.timerId!=null?"set":"cleared",lastCallTime:this.lastExecutionEnded,isExpeditedCheckScheduled:this.isExpeditedCallToFnScheduled,stopped:this.stopped,heartbeatFrequencyMS:this.heartbeatFrequencyMS,minHeartbeatFrequencyMS:this.minHeartbeatFrequencyMS,currentTime:F,timeSinceLastCall:A}}_reschedule(F){if(this.stopped)return;if(this.timerId)Q4.clearTimeout(this.timerId);this.timerId=Q4.setTimeout(this._executeAndReschedule,F||this.heartbeatFrequencyMS)}}dM.MonitorInterval=mB;class QG{constructor(F=10){this.rttSamples=new Float64Array(F),this.length=0,this.writeIndex=0}addSample(F){if(this.rttSamples[this.writeIndex++]=F,this.length<this.rttSamples.length)this.length++;this.writeIndex%=this.rttSamples.length}min(){if(this.length<2)return 0;let F=this.rttSamples[0];for(let A=1;A<this.length;A++)if(this.rttSamples[A]<F)F=this.rttSamples[A];return F}average(){if(this.length===0)return 0;let F=0;for(let A=0;A<this.length;A++)F+=this.rttSamples[A];return F/this.length}get last(){if(this.length===0)return null;return this.rttSamples[this.writeIndex===0?this.length-1:this.writeIndex-1]}clear(){this.length=0,this.writeIndex=0}}dM.RTTSampler=QG});var MG=K((rM)=>{Object.defineProperty(rM,"__esModule",{value:!0});rM.FEATURE_FLAGS=rM.DEFAULT_OPTIONS=rM.OPTIONS=void 0;rM.resolveSRVRecord=f71;rM.parseOptions=g71;var lM=import.meta.require("dns"),j71=q$(),k71=import.meta.require("url"),f7=lA(),G3=B3(),pM=C$(),iM=R5(),nM=oN(),r=l(),dB=Y4(),RG=r4(),LG=q6(),L4=k0(),O71=WG(),c0=a(),S3=t0(),VG=["authSource","replicaSet","loadBalanced"],S71="loadBalanced option only supported with a single host in the URI",u71="loadBalanced option not supported with a replicaSet option",x71="loadBalanced option not supported when directConnection is provided";async function f71(F){if(typeof F.srvHost!=="string")throw new r.MongoAPIError('Option "srvHost" must not be empty');let A=F.srvHost,B=lM.promises.resolveTxt(A);B.then(void 0,c0.squashError);let D=await lM.promises.resolveSrv(`_${F.srvServiceName}._tcp.${A}`);if(D.length===0)throw new r.MongoAPIError("No addresses found at host");for(let{name:H}of D)c0.checkParentDomainMatch(H,A);let J=D.map((H)=>c0.HostAddress.fromString(`${H.name}:${H.port??27017}`));wG(J,F,!0);let X;try{X=await B}catch(H){if(H.code!=="ENODATA"&&H.code!=="ENOTFOUND")throw H;return J}if(X.length>1)throw new r.MongoParseError("Multiple text records not allowed");let Z=new k71.URLSearchParams(X[0].join(""));if([...Z.keys()].some((H)=>!VG.includes(H)))throw new r.MongoParseError(`Text record may only set any of: ${VG.join(", ")}`);if(VG.some((H)=>Z.get(H)===""))throw new r.MongoParseError("Cannot have empty URI params in DNS TXT Record");let $=Z.get("authSource")??void 0,G=Z.get("replicaSet")??void 0,E=Z.get("loadBalanced")??void 0;if(!F.userSpecifiedAuthSource&&$&&F.credentials&&!G3.AUTH_MECHS_AUTH_SRC_EXTERNAL.has(F.credentials.mechanism))F.credentials=f7.MongoCredentials.merge(F.credentials,{source:$});if(!F.userSpecifiedReplicaSet&&G)F.replicaSet=G;if(E==="true")F.loadBalanced=!0;if(F.replicaSet&&F.srvMaxHosts>0)throw new r.MongoParseError("Cannot combine replicaSet option with srvMaxHosts");return wG(J,F,!0),J}function _71(F){if(!F)return;let A=(B,D)=>{if(F.has(B)&&F.has(D))throw new r.MongoAPIError(`The '${B}' option cannot be used with the '${D}' option`)};A("tlsInsecure","tlsAllowInvalidCertificates"),A("tlsInsecure","tlsAllowInvalidHostnames"),A("tlsInsecure","tlsDisableCertificateRevocationCheck"),A("tlsInsecure","tlsDisableOCSPEndpointCheck"),A("tlsAllowInvalidCertificates","tlsDisableCertificateRevocationCheck"),A("tlsAllowInvalidCertificates","tlsDisableOCSPEndpointCheck"),A("tlsDisableCertificateRevocationCheck","tlsDisableOCSPEndpointCheck")}function u3(F,A){if(typeof A==="boolean")return A;switch(A){case"true":return!0;case"false":return!1;default:throw new r.MongoParseError(`${F} must be either "true" or "false"`)}}function NG(F,A){let B=c0.parseInteger(A);if(B!=null)return B;throw new r.MongoParseError(`Expected ${F} to be stringified int value, got: ${A}`)}function v5(F,A){let B=NG(F,A);if(B<0)throw new r.MongoParseError(`${F} can only be a positive int value, got: ${A}`);return B}function*sM(F){if(F==="")return;let A=F.split(",");for(let B of A){let[D,J]=B.split(/:(.*)/);if(J==null)throw new r.MongoParseError("Cannot have undefined values in key value pairs");yield[D,J]}}class h5 extends Map{constructor(F=[]){super(F.map(([A,B])=>[A.toLowerCase(),B]))}has(F){return super.has(F.toLowerCase())}get(F){return super.get(F.toLowerCase())}set(F,A){return super.set(F.toLowerCase(),A)}delete(F){return super.delete(F.toLowerCase())}}function g71(F,A=void 0,B={}){if(A!=null&&!(A instanceof dB.MongoClient))B=A,A=void 0;if(B.useBigInt64&&typeof B.promoteLongs==="boolean"&&!B.promoteLongs)throw new r.MongoAPIError("Must request either bigint or Long for int64 deserialization");if(B.useBigInt64&&typeof B.promoteValues==="boolean"&&!B.promoteValues)throw new r.MongoAPIError("Must request either bigint or Long for int64 deserialization");let D=new j71.default(F),{hosts:J,isSRV:X}=D,Z=Object.create(null);for(let Q of Object.getOwnPropertySymbols(B))if(rM.FEATURE_FLAGS.has(Q))Z[Q]=B[Q];Z.hosts=X?[]:J.map(c0.HostAddress.fromString);let Y=new h5;if(D.pathname!=="/"&&D.pathname!==""){let Q=decodeURIComponent(D.pathname[0]==="/"?D.pathname.slice(1):D.pathname);if(Q)Y.set("dbName",[Q])}if(D.username!==""){let Q={username:decodeURIComponent(D.username)};if(typeof D.password==="string")Q.password=decodeURIComponent(D.password);Y.set("auth",[Q])}for(let Q of D.searchParams.keys()){let L=D.searchParams.getAll(Q),V=/readPreferenceTags/i.test(Q);if(!V&&L.length>1)throw new r.MongoInvalidArgumentError(`URI option "${Q}" cannot appear more than once in the connection string`);if(!V&&L.includes(""))throw new r.MongoAPIError(`URI option "${Q}" cannot be specified with no value`);if(!Y.has(Q))Y.set(Q,L)}let $=new h5(Object.entries(B).filter(([,Q])=>Q!=null));if(Y.has("serverApi"))throw new r.MongoParseError("URI cannot contain `serverApi`, it can only be passed to the client");let G=Y.get("authMechanismProperties");if(G){for(let Q of G)if(/(^|,)ALLOWED_HOSTS:/.test(Q))throw new r.MongoParseError("Auth mechanism property ALLOWED_HOSTS is not allowed in the connection string.")}if($.has("loadBalanced"))throw new r.MongoParseError("loadBalanced is only a valid option in the URI");let E=new h5,H=new Set([...Y.keys(),...$.keys()]);for(let Q of H){let L=[],V=$.get(Q);if(V!=null)L.push(V);let w=Y.get(Q)??[];L.push(...w),E.set(Q,L)}if(E.has("tls")||E.has("ssl")){let Q=(E.get("tls")||[]).concat(E.get("ssl")||[]).map(u3.bind(null,"tls/ssl"));if(new Set(Q).size!==1)throw new r.MongoParseError("All values of tls/ssl must be the same.")}_71(E);let q=c0.setDifference(H,Array.from(Object.keys(rM.OPTIONS)).map((Q)=>Q.toLowerCase()));if(q.size!==0){let Q=q.size>1?"options":"option",L=q.size>1?"are":"is";throw new r.MongoParseError(`${Q} ${Array.from(q).join(", ")} ${L} not supported`)}for(let[Q,L]of Object.entries(rM.OPTIONS)){let V=E.get(Q);if(!V||V.length===0){if(rM.DEFAULT_OPTIONS.has(Q))aM(Z,Q,L,[rM.DEFAULT_OPTIONS.get(Q)])}else{let{deprecated:w}=L;if(w){let j=typeof w==="string"?`: ${w}`:"";c0.emitWarning(`${Q} is a deprecated option${j}`)}aM(Z,Q,L,V)}}if(Z.credentials){let Q=Z.credentials.mechanism===G3.AuthMechanism.MONGODB_GSSAPI,L=Z.credentials.mechanism===G3.AuthMechanism.MONGODB_X509,V=Z.credentials.mechanism===G3.AuthMechanism.MONGODB_AWS,w=Z.credentials.mechanism===G3.AuthMechanism.MONGODB_OIDC;if((Q||L)&&E.has("authSource")&&Z.credentials.source!=="$external")throw new r.MongoParseError(`authMechanism ${Z.credentials.mechanism} requires an authSource of '$external'`);if(!(Q||L||V||w)&&Z.dbName&&!E.has("authSource"))Z.credentials=f7.MongoCredentials.merge(Z.credentials,{source:Z.dbName});if(V&&Z.credentials.username&&!Z.credentials.password)throw new r.MongoMissingCredentialsError(`When using ${Z.credentials.mechanism} password must be set when a username is specified`);if(Z.credentials.validate(),Z.credentials.password===""&&Z.credentials.username===""&&Z.credentials.mechanism===G3.AuthMechanism.MONGODB_DEFAULT&&Object.keys(Z.credentials.mechanismProperties).length===0)delete Z.credentials}if(!Z.dbName)Z.dbName="test";if(wG(J,Z,X),A&&Z.autoEncryption)nM.Encrypter.checkForMongoCrypt(),Z.encrypter=new nM.Encrypter(A,F,B),Z.autoEncrypter=Z.encrypter.autoEncrypter;if(Z.userSpecifiedAuthSource=$.has("authSource")||Y.has("authSource"),Z.userSpecifiedReplicaSet=$.has("replicaSet")||Y.has("replicaSet"),X){if(Z.srvHost=J[0],Z.directConnection)throw new r.MongoAPIError("SRV URI does not support directConnection");if(Z.srvMaxHosts>0&&typeof Z.replicaSet==="string")throw new r.MongoParseError("Cannot use srvMaxHosts option with replicaSet");let Q=!$.has("tls")&&!Y.has("tls"),L=!$.has("ssl")&&!Y.has("ssl");if(Q&&L)Z.tls=!0}else if(Y.has("srvMaxHosts")||$.has("srvMaxHosts")||Y.has("srvServiceName")||$.has("srvServiceName"))throw new r.MongoParseError("Cannot use srvMaxHosts or srvServiceName with a non-srv connection string");if(Z.directConnection&&Z.hosts.length!==1)throw new r.MongoParseError("directConnection option requires exactly one host");if(!Z.proxyHost&&(Z.proxyPort||Z.proxyUsername||Z.proxyPassword))throw new r.MongoParseError("Must specify proxyHost if other proxy options are passed");if(Z.proxyUsername&&!Z.proxyPassword||!Z.proxyUsername&&Z.proxyPassword)throw new r.MongoParseError("Can only specify both of proxy username/password or neither");if(["proxyHost","proxyPort","proxyUsername","proxyPassword"].map((Q)=>Y.get(Q)??[]).some((Q)=>Q.length>1))throw new r.MongoParseError("Proxy options cannot be specified multiple times in the connection string");let z=Symbol.for("@@mdb.enableMongoLogger");Z[z]=Z[z]??!1;let C={},U={};if(Z[z])C={MONGODB_LOG_COMMAND:process.env.MONGODB_LOG_COMMAND,MONGODB_LOG_TOPOLOGY:process.env.MONGODB_LOG_TOPOLOGY,MONGODB_LOG_SERVER_SELECTION:process.env.MONGODB_LOG_SERVER_SELECTION,MONGODB_LOG_CONNECTION:process.env.MONGODB_LOG_CONNECTION,MONGODB_LOG_CLIENT:process.env.MONGODB_LOG_CLIENT,MONGODB_LOG_ALL:process.env.MONGODB_LOG_ALL,MONGODB_LOG_MAX_DOCUMENT_LENGTH:process.env.MONGODB_LOG_MAX_DOCUMENT_LENGTH,MONGODB_LOG_PATH:process.env.MONGODB_LOG_PATH,...Z[Symbol.for("@@mdb.internalLoggerConfig")]},U={mongodbLogPath:Z.mongodbLogPath,mongodbLogComponentSeverities:Z.mongodbLogComponentSeverities,mongodbLogMaxDocumentLength:Z.mongodbLogMaxDocumentLength};return Z.mongoLoggerOptions=RG.MongoLogger.resolveOptions(C,U),Z.metadata=pM.makeClientMetadata(Z),Z.extendedMetadata=pM.addContainerMetadata(Z.metadata).then(void 0,c0.squashError),Z}function wG(F,A,B){if(A.loadBalanced){if(F.length>1)throw new r.MongoParseError(S71);if(A.replicaSet)throw new r.MongoParseError(u71);if(A.directConnection)throw new r.MongoParseError(x71);if(B&&A.srvMaxHosts>0)throw new r.MongoParseError("Cannot limit srv hosts with loadBalanced enabled")}return}function aM(F,A,B,D){let{target:J,type:X,transform:Z}=B,Y=J??A;switch(X){case"boolean":F[Y]=u3(Y,D[0]);break;case"int":F[Y]=NG(Y,D[0]);break;case"uint":F[Y]=v5(Y,D[0]);break;case"string":if(D[0]==null)break;F[Y]=String(D[0]);break;case"record":if(!c0.isRecord(D[0]))throw new r.MongoParseError(`${Y} must be an object`);F[Y]=D[0];break;case"any":F[Y]=D[0];break;default:{if(!Z)throw new r.MongoParseError("Descriptors missing a type must define a transform");let $=Z({name:Y,options:F,values:D});F[Y]=$;break}}}rM.OPTIONS={appName:{type:"string"},auth:{target:"credentials",transform({name:F,options:A,values:[B]}){if(!c0.isRecord(B,["username","password"]))throw new r.MongoParseError(`${F} must be an object with 'username' and 'password' properties`);return f7.MongoCredentials.merge(A.credentials,{username:B.username,password:B.password})}},authMechanism:{target:"credentials",transform({options:F,values:[A]}){let B=Object.values(G3.AuthMechanism),[D]=B.filter((Z)=>Z.match(RegExp(String.raw`\b${A}\b`,"i")));if(!D)throw new r.MongoParseError(`authMechanism one of ${B}, got ${A}`);let J=F.credentials?.source;if(D===G3.AuthMechanism.MONGODB_PLAIN||G3.AUTH_MECHS_AUTH_SRC_EXTERNAL.has(D))J="$external";let X=F.credentials?.password;if(D===G3.AuthMechanism.MONGODB_X509&&X==="")X=void 0;return f7.MongoCredentials.merge(F.credentials,{mechanism:D,source:J,password:X})}},authMechanismProperties:{target:"credentials",transform({options:F,values:A}){let B=Object.create(null);for(let D of A)if(typeof D==="string")for(let[J,X]of sM(D))try{B[J]=u3(J,X)}catch{B[J]=X}else{if(!c0.isRecord(D))throw new r.MongoParseError("AuthMechanismProperties must be an object");B={...D}}return f7.MongoCredentials.merge(F.credentials,{mechanismProperties:B})}},authSource:{target:"credentials",transform({options:F,values:[A]}){let B=String(A);return f7.MongoCredentials.merge(F.credentials,{source:B})}},autoEncryption:{type:"record"},autoSelectFamily:{type:"boolean",default:!0},autoSelectFamilyAttemptTimeout:{type:"uint"},bsonRegExp:{type:"boolean"},serverApi:{target:"serverApi",transform({values:[F]}){let A=typeof F==="string"?{version:F}:F,B=A&&A.version;if(!B)throw new r.MongoParseError(`Invalid \`serverApi\` property; must specify a version from the following enum: ["${Object.values(dB.ServerApiVersion).join('", "')}"]`);if(!Object.values(dB.ServerApiVersion).some((D)=>D===B))throw new r.MongoParseError(`Invalid server API version=${B}; must be in the following enum: ["${Object.values(dB.ServerApiVersion).join('", "')}"]`);return A}},checkKeys:{type:"boolean"},compressors:{default:"none",target:"compressors",transform({values:F}){let A=new Set;for(let B of F){let D=typeof B==="string"?B.split(","):B;if(!Array.isArray(D))throw new r.MongoInvalidArgumentError("compressors must be an array or a comma-delimited list of strings");for(let J of D)if(Object.keys(iM.Compressor).includes(String(J)))A.add(String(J));else throw new r.MongoInvalidArgumentError(`${J} is not a valid compression mechanism. Must be one of: ${Object.keys(iM.Compressor)}.`)}return[...A]}},connectTimeoutMS:{default:30000,type:"uint"},dbName:{type:"string"},directConnection:{default:!1,type:"boolean"},driverInfo:{default:{},type:"record"},enableUtf8Validation:{type:"boolean",default:!0},family:{transform({name:F,values:[A]}){let B=NG(F,A);if(B===4||B===6)return B;throw new r.MongoParseError(`Option 'family' must be 4 or 6 got ${B}.`)}},fieldsAsRaw:{type:"record"},forceServerObjectId:{default:!1,type:"boolean"},fsync:{deprecated:"Please use journal instead",target:"writeConcern",transform({name:F,options:A,values:[B]}){let D=S3.WriteConcern.fromOptions({writeConcern:{...A.writeConcern,fsync:u3(F,B)}});if(!D)throw new r.MongoParseError(`Unable to make a writeConcern from fsync=${B}`);return D}},heartbeatFrequencyMS:{default:1e4,type:"uint"},ignoreUndefined:{type:"boolean"},j:{deprecated:"Please use journal instead",target:"writeConcern",transform({name:F,options:A,values:[B]}){let D=S3.WriteConcern.fromOptions({writeConcern:{...A.writeConcern,journal:u3(F,B)}});if(!D)throw new r.MongoParseError(`Unable to make a writeConcern from journal=${B}`);return D}},journal:{target:"writeConcern",transform({name:F,options:A,values:[B]}){let D=S3.WriteConcern.fromOptions({writeConcern:{...A.writeConcern,journal:u3(F,B)}});if(!D)throw new r.MongoParseError(`Unable to make a writeConcern from journal=${B}`);return D}},loadBalanced:{default:!1,type:"boolean"},localThresholdMS:{default:15,type:"uint"},maxConnecting:{default:2,transform({name:F,values:[A]}){let B=v5(F,A);if(B===0)throw new r.MongoInvalidArgumentError("maxConnecting must be > 0 if specified");return B}},maxIdleTimeMS:{default:0,type:"uint"},maxPoolSize:{default:100,type:"uint"},maxStalenessSeconds:{target:"readPreference",transform({name:F,options:A,values:[B]}){let D=v5(F,B);if(A.readPreference)return L4.ReadPreference.fromOptions({readPreference:{...A.readPreference,maxStalenessSeconds:D}});else return new L4.ReadPreference("secondary",void 0,{maxStalenessSeconds:D})}},minInternalBufferSize:{type:"uint"},minPoolSize:{default:0,type:"uint"},minHeartbeatFrequencyMS:{default:500,type:"uint"},monitorCommands:{default:!1,type:"boolean"},name:{target:"driverInfo",transform({values:[F],options:A}){return{...A.driverInfo,name:String(F)}}},noDelay:{default:!0,type:"boolean"},pkFactory:{default:c0.DEFAULT_PK_FACTORY,transform({values:[F]}){if(c0.isRecord(F,["createPk"])&&typeof F.createPk==="function")return F;throw new r.MongoParseError(`Option pkFactory must be an object with a createPk function, got ${F}`)}},promoteBuffers:{type:"boolean"},promoteLongs:{type:"boolean"},promoteValues:{type:"boolean"},useBigInt64:{type:"boolean"},proxyHost:{type:"string"},proxyPassword:{type:"string"},proxyPort:{type:"uint"},proxyUsername:{type:"string"},raw:{default:!1,type:"boolean"},readConcern:{transform({values:[F],options:A}){if(F instanceof LG.ReadConcern||c0.isRecord(F,["level"]))return LG.ReadConcern.fromOptions({...A.readConcern,...F});throw new r.MongoParseError(`ReadConcern must be an object, got ${JSON.stringify(F)}`)}},readConcernLevel:{target:"readConcern",transform({values:[F],options:A}){return LG.ReadConcern.fromOptions({...A.readConcern,level:F})}},readPreference:{default:L4.ReadPreference.primary,transform({values:[F],options:A}){if(F instanceof L4.ReadPreference)return L4.ReadPreference.fromOptions({readPreference:{...A.readPreference,...F},...F});if(c0.isRecord(F,["mode"])){let B=L4.ReadPreference.fromOptions({readPreference:{...A.readPreference,...F},...F});if(B)return B;else throw new r.MongoParseError(`Cannot make read preference from ${JSON.stringify(F)}`)}if(typeof F==="string"){let B={hedge:A.readPreference?.hedge,maxStalenessSeconds:A.readPreference?.maxStalenessSeconds};return new L4.ReadPreference(F,A.readPreference?.tags,B)}throw new r.MongoParseError(`Unknown ReadPreference value: ${F}`)}},readPreferenceTags:{target:"readPreference",transform({values:F,options:A}){let B=Array.isArray(F[0])?F[0]:F,D=[];for(let J of B){let X=Object.create(null);if(typeof J==="string")for(let[Z,Y]of sM(J))X[Z]=Y;if(c0.isRecord(J))for(let[Z,Y]of Object.entries(J))X[Z]=Y;D.push(X)}return L4.ReadPreference.fromOptions({readPreference:A.readPreference,readPreferenceTags:D})}},replicaSet:{type:"string"},retryReads:{default:!0,type:"boolean"},retryWrites:{default:!0,type:"boolean"},serializeFunctions:{type:"boolean"},serverMonitoringMode:{default:"auto",transform({values:[F]}){if(!Object.values(O71.ServerMonitoringMode).includes(F))throw new r.MongoParseError("serverMonitoringMode must be one of `auto`, `poll`, or `stream`");return F}},serverSelectionTimeoutMS:{default:30000,type:"uint"},servername:{type:"string"},socketTimeoutMS:{default:0,type:"uint"},srvMaxHosts:{type:"uint",default:0},srvServiceName:{type:"string",default:"mongodb"},ssl:{target:"tls",type:"boolean"},timeoutMS:{type:"uint"},tls:{type:"boolean"},tlsAllowInvalidCertificates:{target:"rejectUnauthorized",transform({name:F,values:[A]}){return!u3(F,A)}},tlsAllowInvalidHostnames:{target:"checkServerIdentity",transform({name:F,values:[A]}){return u3(F,A)?()=>{return}:void 0}},tlsCAFile:{type:"string"},tlsCRLFile:{type:"string"},tlsCertificateKeyFile:{type:"string"},tlsCertificateKeyFilePassword:{target:"passphrase",type:"any"},tlsInsecure:{transform({name:F,options:A,values:[B]}){let D=u3(F,B);if(D)A.checkServerIdentity=()=>{return},A.rejectUnauthorized=!1;else A.checkServerIdentity=A.tlsAllowInvalidHostnames?()=>{return}:void 0,A.rejectUnauthorized=A.tlsAllowInvalidCertificates?!1:!0;return D}},w:{target:"writeConcern",transform({values:[F],options:A}){return S3.WriteConcern.fromOptions({writeConcern:{...A.writeConcern,w:F}})}},waitQueueTimeoutMS:{default:0,type:"uint"},writeConcern:{target:"writeConcern",transform({values:[F],options:A}){if(c0.isRecord(F)||F instanceof S3.WriteConcern)return S3.WriteConcern.fromOptions({writeConcern:{...A.writeConcern,...F}});else if(F==="majority"||typeof F==="number")return S3.WriteConcern.fromOptions({writeConcern:{...A.writeConcern,w:F}});throw new r.MongoParseError(`Invalid WriteConcern cannot parse: ${JSON.stringify(F)}`)}},wtimeout:{deprecated:"Please use wtimeoutMS instead",target:"writeConcern",transform({values:[F],options:A}){let B=S3.WriteConcern.fromOptions({writeConcern:{...A.writeConcern,wtimeout:v5("wtimeout",F)}});if(B)return B;throw new r.MongoParseError("Cannot make WriteConcern from wtimeout")}},wtimeoutMS:{target:"writeConcern",transform({values:[F],options:A}){let B=S3.WriteConcern.fromOptions({writeConcern:{...A.writeConcern,wtimeoutMS:v5("wtimeoutMS",F)}});if(B)return B;throw new r.MongoParseError("Cannot make WriteConcern from wtimeout")}},zlibCompressionLevel:{default:0,type:"int"},connectionType:{type:"any"},srvPoller:{type:"any"},allowPartialTrustChain:{type:"any"},minDHSize:{type:"any"},pskCallback:{type:"any"},secureContext:{type:"any"},enableTrace:{type:"any"},requestCert:{type:"any"},rejectUnauthorized:{type:"any"},checkServerIdentity:{type:"any"},ALPNProtocols:{type:"any"},SNICallback:{type:"any"},session:{type:"any"},requestOCSP:{type:"any"},localAddress:{type:"any"},localPort:{type:"any"},hints:{type:"any"},lookup:{type:"any"},ca:{type:"any"},cert:{type:"any"},ciphers:{type:"any"},crl:{type:"any"},ecdhCurve:{type:"any"},key:{type:"any"},passphrase:{type:"any"},pfx:{type:"any"},secureProtocol:{type:"any"},index:{type:"any"},useNewUrlParser:{type:"boolean",deprecated:"useNewUrlParser has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version"},useUnifiedTopology:{type:"boolean",deprecated:"useUnifiedTopology has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version"},mongodbLogPath:{transform({values:[F]}){if(!(typeof F==="string"&&["stderr","stdout"].includes(F)||F&&typeof F==="object"&&("write"in F)&&typeof F.write==="function"))throw new r.MongoAPIError("Option 'mongodbLogPath' must be of type 'stderr' | 'stdout' | MongoDBLogWritable");return F}},mongodbLogComponentSeverities:{transform({values:[F]}){if(typeof F!=="object"||!F)throw new r.MongoAPIError("Option 'mongodbLogComponentSeverities' must be a non-null object");for(let[A,B]of Object.entries(F)){if(typeof B!=="string"||typeof A!=="string")throw new r.MongoAPIError("User input for option 'mongodbLogComponentSeverities' object cannot include a non-string key or value");if(!Object.values(RG.MongoLoggableComponent).some((D)=>D===A)&&A!=="default")throw new r.MongoAPIError(`User input for option 'mongodbLogComponentSeverities' contains invalid key: ${A}`);if(!Object.values(RG.SeverityLevel).some((D)=>D===B))throw new r.MongoAPIError(`Option 'mongodbLogComponentSeverities' does not support ${B} as a value for ${A}`)}return F}},mongodbLogMaxDocumentLength:{type:"uint"}};rM.DEFAULT_OPTIONS=new h5(Object.entries(rM.OPTIONS).filter(([,F])=>F.default!=null).map(([F,A])=>[F,A.default]));rM.FEATURE_FLAGS=new Set([Symbol.for("@@mdb.skipPingOnConnect"),Symbol.for("@@mdb.enableMongoLogger"),Symbol.for("@@mdb.internalLoggerConfig")])});var FT=K((oM)=>{Object.defineProperty(oM,"__esModule",{value:!0});oM.MongoDBAWS=void 0;var TG=I1(),jG=y6(),g7=l(),_7=a(),v71=G4(),kG=P$(),h71=lA(),m71=B3(),d71=110,OG={useBigInt64:!1,promoteLongs:!0,promoteValues:!0,promoteBuffers:!1,bsonRegExp:!1};class tM extends v71.AuthProvider{constructor(){super();this.credentialFetcher=kG.AWSTemporaryCredentialProvider.isAWSSDKInstalled?new kG.AWSSDKCredentialProvider:new kG.LegacyAWSTemporaryCredentialProvider}async auth(F){let{connection:A}=F;if(!F.credentials)throw new g7.MongoMissingCredentialsError("AuthContext must provide credentials.");if("kModuleError"in jG.aws4)throw jG.aws4.kModuleError;let{sign:B}=jG.aws4;if(_7.maxWireVersion(A)<9)throw new g7.MongoCompatibilityError("MONGODB-AWS authentication requires MongoDB version 4.4 or later");if(!F.credentials.username)F.credentials=await c71(F.credentials,this.credentialFetcher);let{credentials:D}=F,J=D.username,X=D.password,Z=D.mechanismProperties.AWS_SESSION_TOKEN,Y=J&&X&&Z?{accessKeyId:J,secretAccessKey:X,sessionToken:Z}:J&&X?{accessKeyId:J,secretAccessKey:X}:void 0,$=D.source,G=await _7.randomBytes(32),E={saslStart:1,mechanism:"MONGODB-AWS",payload:TG.serialize({r:G,p:d71},OG)},H=await A.command(_7.ns(`${$}.$cmd`),E,void 0),q=TG.deserialize(H.payload.buffer,OG),W=q.h,z=q.s.buffer;if(z.length!==64)throw new g7.MongoRuntimeError(`Invalid server nonce length ${z.length}, expected 64`);if(!_7.ByteUtils.equals(z.subarray(0,G.byteLength),G))throw new g7.MongoRuntimeError("Server nonce does not begin with client nonce");if(W.length<1||W.length>255||W.indexOf("..")!==-1)throw new g7.MongoRuntimeError(`Server returned an invalid host: "${W}"`);let C="Action=GetCallerIdentity&Version=2011-06-15",U=B({method:"POST",host:W,region:l71(q.h),service:"sts",headers:{"Content-Type":"application/x-www-form-urlencoded","Content-Length":C.length,"X-MongoDB-Server-Nonce":_7.ByteUtils.toBase64(z),"X-MongoDB-GS2-CB-Flag":"n"},path:"/",body:C},Y),Q={a:U.headers.Authorization,d:U.headers["X-Amz-Date"]};if(Z)Q.t=Z;let L={saslContinue:1,conversationId:1,payload:TG.serialize(Q,OG)};await A.command(_7.ns(`${$}.$cmd`),L,void 0)}}oM.MongoDBAWS=tM;async function c71(F,A){function B(J){if(!J.AccessKeyId||!J.SecretAccessKey)throw new g7.MongoMissingCredentialsError("Could not obtain temporary MONGODB-AWS credentials");return new h71.MongoCredentials({username:J.AccessKeyId,password:J.SecretAccessKey,source:F.source,mechanism:m71.AuthMechanism.MONGODB_AWS,mechanismProperties:{AWS_SESSION_TOKEN:J.Token}})}let D=await A.getCredentials();return B(D)}function l71(F){let A=F.split(".");if(A.length===1||A[1]==="amazonaws")return"us-east-1";return A[1]}});var SG=K((BT)=>{Object.defineProperty(BT,"__esModule",{value:!0});BT.finishCommandDocument=p71;BT.startCommandDocument=i71;var b7=I1(),AT=B3();function p71(F,A){if(A!=null)return{saslContinue:1,conversationId:A,payload:new b7.Binary(b7.BSON.serialize({jwt:F}))};return{saslStart:1,mechanism:AT.AuthMechanism.MONGODB_OIDC,payload:new b7.Binary(b7.BSON.serialize({jwt:F}))}}function i71(F){let A={};if(F.username)A.n=F.username;return{saslStart:1,autoAuthorize:1,mechanism:AT.AuthMechanism.MONGODB_OIDC,payload:new b7.Binary(b7.BSON.serialize(A))}}});var m5=K((XT)=>{Object.defineProperty(XT,"__esModule",{value:!0});XT.MachineWorkflow=void 0;var a71=import.meta.require("timers/promises"),r71=a(),DT=SG(),uG=100;class JT{constructor(F){this.cache=F,this.callback=this.withLock(this.getToken.bind(this)),this.lastExecutionTime=Date.now()-uG}async execute(F,A){let B=await this.getTokenFromCacheOrEnv(F,A),D=DT.finishCommandDocument(B);await F.command(r71.ns(A.source),D,void 0)}async reauthenticate(F,A){if(this.cache.hasAccessToken)if(F.accessToken===this.cache.getAccessToken())this.cache.removeAccessToken(),delete F.accessToken;else F.accessToken=this.cache.getAccessToken();await this.execute(F,A)}async speculativeAuth(F,A){if(!this.cache.hasAccessToken)return{};let B=await this.getTokenFromCacheOrEnv(F,A),D=DT.finishCommandDocument(B);return D.db=A.source,{speculativeAuthenticate:D}}async getTokenFromCacheOrEnv(F,A){if(this.cache.hasAccessToken)return this.cache.getAccessToken();else{let B=await this.callback(A);return this.cache.put({accessToken:B.access_token,expiresInSeconds:B.expires_in}),F.accessToken=B.access_token,B.access_token}}withLock(F){let A=Promise.resolve();return async(B)=>{return await A,A=A.catch(()=>null).then(async()=>{let D=Date.now()-this.lastExecutionTime;if(D<=uG)await a71.setTimeout(uG-D);return this.lastExecutionTime=Date.now(),await F(B)}),await A}}}XT.MachineWorkflow=JT});var HT=K((GT)=>{Object.defineProperty(GT,"__esModule",{value:!0});GT.AzureMachineWorkflow=void 0;var YT=j$(),xG=l(),t71=a(),o71=m5(),e71=Object.freeze({Metadata:"true",Accept:"application/json"}),F81="Azure endpoint did not return a value with only access_token and expires_in properties",A81="TOKEN_RESOURCE must be set in the auth mechanism properties when ENVIRONMENT is azure.";class $T extends o71.MachineWorkflow{constructor(F){super(F)}async getToken(F){let A=F?.mechanismProperties.TOKEN_RESOURCE,B=F?.username;if(!A)throw new xG.MongoAzureError(A81);let D=await B81(A,B);if(!D81(D))throw new xG.MongoAzureError(F81);return D}}GT.AzureMachineWorkflow=$T;async function B81(F,A){let B=new URL(YT.AZURE_BASE_URL);YT.addAzureParams(B,F,A);let D=await t71.get(B,{headers:e71});if(D.status!==200)throw new xG.MongoAzureError(`Status code ${D.status} returned from the Azure endpoint. Response body: ${D.body}`);let J=JSON.parse(D.body);return{access_token:J.access_token,expires_in:Number(J.expires_in)}}function D81(F){if(F==null||typeof F!=="object")return!1;return"access_token"in F&&typeof F.access_token==="string"&&"expires_in"in F&&typeof F.expires_in==="number"}});var KT=K((zT)=>{Object.defineProperty(zT,"__esModule",{value:!0});zT.GCPMachineWorkflow=void 0;var qT=l(),J81=a(),X81=m5(),Z81="http://metadata/computeMetadata/v1/instance/service-accounts/default/identity",Y81=Object.freeze({"Metadata-Flavor":"Google"}),$81="TOKEN_RESOURCE must be set in the auth mechanism properties when ENVIRONMENT is gcp.";class WT extends X81.MachineWorkflow{constructor(F){super(F)}async getToken(F){let A=F?.mechanismProperties.TOKEN_RESOURCE;if(!A)throw new qT.MongoGCPError($81);return await G81(A)}}zT.GCPMachineWorkflow=WT;async function G81(F){let A=new URL(Z81);A.searchParams.append("audience",F);let B=await J81.get(A,{headers:Y81});if(B.status!==200)throw new qT.MongoGCPError(`Status code ${B.status} returned from the GCP endpoint. Response body: ${B.body}`);return{access_token:B.body}}});var wT=K((VT)=>{Object.defineProperty(VT,"__esModule",{value:!0});VT.K8SMachineWorkflow=void 0;var E81=import.meta.require("fs/promises"),H81=m5(),q81="/var/run/secrets/kubernetes.io/serviceaccount/token",UT="AZURE_FEDERATED_TOKEN_FILE",QT="AWS_WEB_IDENTITY_TOKEN_FILE";class LT extends H81.MachineWorkflow{constructor(F){super(F)}async getToken(){let F;if(process.env[UT])F=process.env[UT];else if(process.env[QT])F=process.env[QT];else F=q81;return{access_token:await E81.readFile(F,"utf8")}}}VT.K8SMachineWorkflow=LT});var fG=K((NT)=>{Object.defineProperty(NT,"__esModule",{value:!0});NT.TokenCache=void 0;var W81=l();class lB extends W81.MongoDriverError{}class IT{get hasAccessToken(){return!!this.accessToken}get hasRefreshToken(){return!!this.refreshToken}get hasIdpInfo(){return!!this.idpInfo}getAccessToken(){if(!this.accessToken)throw new lB("Attempted to get an access token when none exists.");return this.accessToken}getRefreshToken(){if(!this.refreshToken)throw new lB("Attempted to get a refresh token when none exists.");return this.refreshToken}getIdpInfo(){if(!this.idpInfo)throw new lB("Attempted to get IDP information when none exists.");return this.idpInfo}put(F,A){if(this.accessToken=F.accessToken,this.refreshToken=F.refreshToken,this.expiresInSeconds=F.expiresInSeconds,A)this.idpInfo=A}removeAccessToken(){this.accessToken=void 0}removeRefreshToken(){this.refreshToken=void 0}}NT.TokenCache=IT});var kT=K((TT)=>{Object.defineProperty(TT,"__esModule",{value:!0});TT.TokenMachineWorkflow=void 0;var z81=import.meta.require("fs"),C81=l(),K81=m5(),U81="OIDC_TOKEN_FILE must be set in the environment.";class MT extends K81.MachineWorkflow{constructor(F){super(F)}async getToken(){let F=process.env.OIDC_TOKEN_FILE;if(!F)throw new C81.MongoAWSError(U81);return{access_token:await z81.promises.readFile(F,"utf8")}}}TT.TokenMachineWorkflow=MT});var iB=K((xT)=>{Object.defineProperty(xT,"__esModule",{value:!0});xT.MongoDBOIDC=xT.OIDC_WORKFLOWS=xT.OIDC_VERSION=void 0;var ST=l(),Q81=G4(),L81=HT(),V81=KT(),R81=wT(),pB=fG(),w81=kT(),I81="AuthContext must provide credentials.";xT.OIDC_VERSION=1;xT.OIDC_WORKFLOWS=new Map;xT.OIDC_WORKFLOWS.set("test",()=>new w81.TokenMachineWorkflow(new pB.TokenCache));xT.OIDC_WORKFLOWS.set("azure",()=>new L81.AzureMachineWorkflow(new pB.TokenCache));xT.OIDC_WORKFLOWS.set("gcp",()=>new V81.GCPMachineWorkflow(new pB.TokenCache));xT.OIDC_WORKFLOWS.set("k8s",()=>new R81.K8SMachineWorkflow(new pB.TokenCache));class uT extends Q81.AuthProvider{constructor(F){super();if(!F)throw new ST.MongoInvalidArgumentError("No workflow provided to the OIDC auth provider.");this.workflow=F}async auth(F){let{connection:A,reauthenticating:B,response:D}=F;if(D?.speculativeAuthenticate?.done)return;let J=OT(F);if(B)await this.workflow.reauthenticate(A,J);else await this.workflow.execute(A,J,D)}async prepare(F,A){let{connection:B}=A,D=OT(A),J=await this.workflow.speculativeAuth(B,D);return{...F,...J}}}xT.MongoDBOIDC=uT;function OT(F){let{credentials:A}=F;if(!A)throw new ST.MongoMissingCredentialsError(I81);return A}});var bG=K((bT)=>{Object.defineProperty(bT,"__esModule",{value:!0});bT.CallbackWorkflow=bT.AUTOMATED_TIMEOUT_MS=bT.HUMAN_TIMEOUT_MS=void 0;var P81=import.meta.require("timers/promises"),M81=l(),_T=a(),_G=SG();bT.HUMAN_TIMEOUT_MS=300000;bT.AUTOMATED_TIMEOUT_MS=60000;var T81=["accessToken","expiresInSeconds","refreshToken"],j81="User provided OIDC callbacks must return a valid object with an accessToken.",gG=100;class gT{constructor(F,A){this.cache=F,this.callback=this.withLock(A),this.lastExecutionTime=Date.now()-gG}async speculativeAuth(F,A){if(this.cache.hasAccessToken){let B=this.cache.getAccessToken();F.accessToken=B;let D=_G.finishCommandDocument(B);return D.db=A.source,{speculativeAuthenticate:D}}return{}}async reauthenticate(F,A){if(this.cache.hasAccessToken)if(F.accessToken===this.cache.getAccessToken())this.cache.removeAccessToken(),delete F.accessToken;else F.accessToken=this.cache.getAccessToken();await this.execute(F,A)}async startAuthentication(F,A,B){let D;if(B?.speculativeAuthenticate)D=B.speculativeAuthenticate;else D=await F.command(_T.ns(A.source),_G.startCommandDocument(A),void 0);return D}async finishAuthentication(F,A,B,D){await F.command(_T.ns(A.source),_G.finishCommandDocument(B,D),void 0)}async executeAndValidateCallback(F){let A=await this.callback(F);if(k81(A))throw new M81.MongoMissingCredentialsError(j81);return A}withLock(F){let A=Promise.resolve();return async(B)=>{return await A,A=A.catch(()=>null).then(async()=>{let D=Date.now()-this.lastExecutionTime;if(D<=gG)await P81.setTimeout(gG-D,{signal:B.timeoutContext});return this.lastExecutionTime=Date.now(),await F(B)}),await A}}}bT.CallbackWorkflow=gT;function k81(F){if(F==null||typeof F!=="object")return!0;if(!("accessToken"in F))return!0;return!Object.getOwnPropertyNames(F).every((A)=>T81.includes(A))}});var cT=K((mT)=>{Object.defineProperty(mT,"__esModule",{value:!0});mT.AutomatedCallbackWorkflow=void 0;var yG=l(),vT=o0(),u81=iB(),vG=bG();class hT extends vG.CallbackWorkflow{constructor(F,A){super(F,A)}async execute(F,A){if(this.cache.hasAccessToken){let D=this.cache.getAccessToken();try{return await this.finishAuthentication(F,A,D)}catch(J){if(J instanceof yG.MongoError&&J.code===yG.MONGODB_ERROR_CODES.AuthenticationFailed)return this.cache.removeAccessToken(),await this.execute(F,A);else throw J}}let B=await this.fetchAccessToken(A);this.cache.put(B),F.accessToken=B.accessToken,await this.finishAuthentication(F,A,B.accessToken)}async fetchAccessToken(F){let A=new AbortController,B={timeoutContext:A.signal,version:u81.OIDC_VERSION};if(F.username)B.username=F.username;let D=vT.Timeout.expires(vG.AUTOMATED_TIMEOUT_MS);try{return await Promise.race([this.executeAndValidateCallback(B),D])}catch(J){if(vT.TimeoutError.is(J))throw A.abort(),new yG.MongoOIDCError(`OIDC callback timed out after ${vG.AUTOMATED_TIMEOUT_MS}ms.`);throw J}finally{D.clear()}}}mT.AutomatedCallbackWorkflow=hT});var sT=K((iT)=>{Object.defineProperty(iT,"__esModule",{value:!0});iT.HumanCallbackWorkflow=void 0;var x81=I1(),c5=l(),lT=o0(),f81=iB(),hG=bG();class pT extends hG.CallbackWorkflow{constructor(F,A){super(F,A)}async execute(F,A){if(this.cache.hasAccessToken){let Z=this.cache.getAccessToken();F.accessToken=Z;try{return await this.finishAuthentication(F,A,Z)}catch(Y){if(Y instanceof c5.MongoError&&Y.code===c5.MONGODB_ERROR_CODES.AuthenticationFailed)return this.cache.removeAccessToken(),delete F.accessToken,await this.execute(F,A);else throw Y}}if(this.cache.hasRefreshToken){let Z=this.cache.getRefreshToken(),Y=await this.fetchAccessToken(this.cache.getIdpInfo(),A,Z);this.cache.put(Y),F.accessToken=Y.accessToken;try{return await this.finishAuthentication(F,A,Y.accessToken)}catch($){if($ instanceof c5.MongoError&&$.code===c5.MONGODB_ERROR_CODES.AuthenticationFailed)return this.cache.removeRefreshToken(),delete F.accessToken,await this.execute(F,A);else throw $}}let B=await this.startAuthentication(F,A),D=B.conversationId,J=x81.BSON.deserialize(B.payload.buffer),X=await this.fetchAccessToken(J,A);return this.cache.put(X,J),F.accessToken=X.accessToken,await this.finishAuthentication(F,A,X.accessToken,D)}async fetchAccessToken(F,A,B){let D=new AbortController,J={timeoutContext:D.signal,version:f81.OIDC_VERSION,idpInfo:F};if(A.username)J.username=A.username;if(B)J.refreshToken=B;let X=lT.Timeout.expires(hG.HUMAN_TIMEOUT_MS);try{return await Promise.race([this.executeAndValidateCallback(J),X])}catch(Z){if(lT.TimeoutError.is(Z))throw D.abort(),new c5.MongoOIDCError(`OIDC callback timed out after ${hG.HUMAN_TIMEOUT_MS}ms.`);throw Z}finally{X.clear()}}}iT.HumanCallbackWorkflow=pT});var oT=K((rT)=>{Object.defineProperty(rT,"__esModule",{value:!0});rT.Plain=void 0;var _81=I1(),g81=l(),b81=a(),y81=G4();class aT extends y81.AuthProvider{async auth(F){let{connection:A,credentials:B}=F;if(!B)throw new g81.MongoMissingCredentialsError("AuthContext must provide credentials.");let{username:D,password:J}=B,Z={saslStart:1,mechanism:"PLAIN",payload:new _81.Binary(Buffer.from(`\x00${D}\x00${J}`)),autoAuthorize:1};await A.command(b81.ns("$external.$cmd"),Z,void 0)}}rT.Plain=aT});var Bj=K((uL1,Aj)=>{var eT=(F)=>F.codePointAt(0),v81=(F)=>F[0],h81=(F)=>F[F.length-1];function Fj(F){let A=[],B=F.length;for(let D=0;D<B;D+=1){let J=F.charCodeAt(D);if(J>=55296&&J<=56319&&B>D+1){let X=F.charCodeAt(D+1);if(X>=56320&&X<=57343){A.push((J-55296)*1024+X-56320+65536),D+=1;continue}}A.push(J)}return A}function l5({unassigned_code_points:F,commonly_mapped_to_nothing:A,non_ASCII_space_characters:B,prohibited_characters:D,bidirectional_r_al:J,bidirectional_l:X},Z,Y={}){let $=B,G=A;if(typeof Z!=="string")throw new TypeError("Expected string.");if(Z.length===0)return"";let E=Fj(Z).map((L)=>$.get(L)?32:L).filter((L)=>!G.get(L)),H=String.fromCodePoint.apply(null,E).normalize("NFKC"),q=Fj(H);if(q.some((L)=>D.get(L)))throw new Error("Prohibited character, see https://tools.ietf.org/html/rfc4013#section-2.3");if(Y.allowUnassigned!==!0){if(q.some((V)=>F.get(V)))throw new Error("Unassigned code point, see https://tools.ietf.org/html/rfc4013#section-2.5")}let z=q.some((L)=>J.get(L)),C=q.some((L)=>X.get(L));if(z&&C)throw new Error("String must not contain RandALCat and LCat at the same time, see https://tools.ietf.org/html/rfc3454#section-6");let U=J.get(eT(v81(H))),Q=J.get(eT(h81(H)));if(z&&!(U&&Q))throw new Error("Bidirectional RandALCat character must be the first and the last character of the string, see https://tools.ietf.org/html/rfc3454#section-6");return H}l5.saslprep=l5;l5.default=l5;Aj.exports=l5});var Xj=K((xL1,Jj)=>{Jj.exports=x3;function x3(F,A){if(!(this instanceof x3))return new x3(F,A);this.length=0,this.updates=[],this.path=new Uint16Array(4),this.pages=new Array(32768),this.maxPages=this.pages.length,this.level=0,this.pageSize=F||1024,this.deduplicate=A?A.deduplicate:null,this.zeros=this.deduplicate?nB(this.deduplicate.length):null}x3.prototype.updated=function(F){while(this.deduplicate&&F.buffer[F.deduplicate]===this.deduplicate[F.deduplicate])if(F.deduplicate++,F.deduplicate===this.deduplicate.length){if(F.deduplicate=0,F.buffer.equals&&F.buffer.equals(this.deduplicate))F.buffer=this.deduplicate;break}if(F.updated||!this.updates)return;F.updated=!0,this.updates.push(F)};x3.prototype.lastUpdate=function(){if(!this.updates||!this.updates.length)return null;var F=this.updates.pop();return F.updated=!1,F};x3.prototype._array=function(F,A){if(F>=this.maxPages){if(A)return;m81(this,F)}l81(F,this.path);var B=this.pages;for(var D=this.level;D>0;D--){var J=this.path[D],X=B[J];if(!X){if(A)return;X=B[J]=new Array(32768)}B=X}return B};x3.prototype.get=function(F,A){var B=this._array(F,A),D=this.path[0],J=B&&B[D];if(!J&&!A){if(J=B[D]=new Dj(F,nB(this.pageSize)),F>=this.length)this.length=F+1}if(J&&J.buffer===this.deduplicate&&this.deduplicate&&!A)J.buffer=c81(J.buffer),J.deduplicate=0;return J};x3.prototype.set=function(F,A){var B=this._array(F,!1),D=this.path[0];if(F>=this.length)this.length=F+1;if(!A||this.zeros&&A.equals&&A.equals(this.zeros)){B[D]=void 0;return}if(this.deduplicate&&A.equals&&A.equals(this.deduplicate))A=this.deduplicate;var J=B[D],X=d81(A,this.pageSize);if(J)J.buffer=X;else B[D]=new Dj(F,X)};x3.prototype.toBuffer=function(){var F=new Array(this.length),A=nB(this.pageSize),B=0;while(B<F.length){var D=this._array(B,!0);for(var J=0;J<32768&&B<F.length;J++)F[B++]=D&&D[J]?D[J].buffer:A}return Buffer.concat(F)};function m81(F,A){while(F.maxPages<A){var B=F.pages;F.pages=new Array(32768),F.pages[0]=B,F.level++,F.maxPages*=32768}}function d81(F,A){if(F.length===A)return F;if(F.length>A)return F.slice(0,A);var B=nB(A);return F.copy(B),B}function nB(F){if(Buffer.alloc)return Buffer.alloc(F);var A=new Buffer(F);return A.fill(0),A}function c81(F){var A=Buffer.allocUnsafe?Buffer.allocUnsafe(F.length):new Buffer(F.length);return F.copy(A),A}function Dj(F,A){this.offset=F*A.length,this.buffer=A,this.updated=!1,this.deduplicate=0}function l81(F,A){F=(F-(A[0]=F&32767))/32768,F=(F-(A[1]=F&32767))/32768,A[3]=(F-(A[2]=F&32767))/32768&32767}});var Yj=K((fL1,Zj)=>{var p81=Xj();Zj.exports=V4;function V4(F){if(!(this instanceof V4))return new V4(F);if(!F)F={};if(Buffer.isBuffer(F))F={buffer:F};if(this.pageOffset=F.pageOffset||0,this.pageSize=F.pageSize||1024,this.pages=F.pages||p81(this.pageSize),this.byteLength=this.pages.length*this.pageSize,this.length=8*this.byteLength,!n81(this.pageSize))throw new Error("The page size should be a power of two");if(this._trackUpdates=!!F.trackUpdates,this._pageMask=this.pageSize-1,F.buffer){for(var A=0;A<F.buffer.length;A+=this.pageSize)this.pages.set(A/this.pageSize,F.buffer.slice(A,A+this.pageSize));this.byteLength=F.buffer.length,this.length=8*this.byteLength}}V4.prototype.get=function(F){var A=F&7,B=(F-A)/8;return!!(this.getByte(B)&128>>A)};V4.prototype.getByte=function(F){var A=F&this._pageMask,B=(F-A)/this.pageSize,D=this.pages.get(B,!0);return D?D.buffer[A+this.pageOffset]:0};V4.prototype.set=function(F,A){var B=F&7,D=(F-B)/8,J=this.getByte(D);return this.setByte(D,A?J|128>>B:J&(255^128>>B))};V4.prototype.toBuffer=function(){var F=i81(this.pages.length*this.pageSize);for(var A=0;A<this.pages.length;A++){var B=this.pages.get(A,!0),D=A*this.pageSize;if(B)B.buffer.copy(F,D,this.pageOffset,this.pageOffset+this.pageSize)}return F};V4.prototype.setByte=function(F,A){var B=F&this._pageMask,D=(F-B)/this.pageSize,J=this.pages.get(D,!1);if(B+=this.pageOffset,J.buffer[B]===A)return!1;if(J.buffer[B]=A,F>=this.byteLength)this.byteLength=F+1,this.length=this.byteLength*8;if(this._trackUpdates)this.pages.updated(J);return!0};function i81(F){if(Buffer.alloc)return Buffer.alloc(F);var A=new Buffer(F);return A.fill(0),A}function n81(F){return!(F&F-1)}});var $j=K((y7)=>{var s81=y7&&y7.__importDefault||function(F){return F&&F.__esModule?F:{default:F}};Object.defineProperty(y7,"__esModule",{value:!0});y7.createMemoryCodePoints=void 0;var a81=s81(Yj());function r81(F){let A=0;function B(){let G=F.readUInt32BE(A);A+=4;let E=F.slice(A,A+G);return A+=G,a81.default({buffer:E})}let D=B(),J=B(),X=B(),Z=B(),Y=B(),$=B();return{unassigned_code_points:D,commonly_mapped_to_nothing:J,non_ASCII_space_characters:X,prohibited_characters:Z,bidirectional_r_al:Y,bidirectional_l:$}}y7.createMemoryCodePoints=r81});var Ej=K((Gj)=>{Object.defineProperty(Gj,"__esModule",{value:!0});var t81=import.meta.require("zlib");Gj.default=t81.gunzipSync(Buffer.from("H4sIAAAAAAACA+3dTYgcaRkA4LemO9Mhxm0FITnE9Cwr4jHgwgZ22B6YywqCJ0HQg5CL4sGTuOjCtGSF4CkHEW856MlTQHD3EJnWkU0Owh5VxE3LHlYQdNxd2U6mU59UV/d09fw4M2EySSXPAzNdP1/9fX/99bzVNZEN4jisRDulVFnQmLxm1aXF9Id/2/xMxNJ4XZlg576yuYlGt9gupV6xoFf8jhu9YvulVrFlp5XSx+lfvYhORGPXvqIRWSxERKtIm8bKFd10WNfKDS5Fo9jJWrq2+M2IlW+8uHgl/+BsROfPF4v5L7148Ur68Sha6dqZpYiVVy8tvLCWXo80Sf/lS89dGX2wHGvpzoXVn75/YWH5wmqe8uika82ViJXTy83Ve2k5Urozm38wm4/ls6t5uT6yfsTSJ7J3T0VKt8c5ExEXI8aFkH729c3eT+7EC6ca8cVULZUiYacX0R5PNWNxlh9L1y90q5kyzrpyy+9WcvOV6URntqw7La9sNVstXyczWVaWYbaaTYqzOHpr7pyiNT3/YzKuT63Z/FqKZlFTiuXtFM2vVOtIq7jiyKJbWZaOWD0euz0yoV2Z7kY0xq2x0YhfzVpmM5px9nTEH7JZ0ot5u39p0ma75Z472/s/H+2yr2inYyuq7fMvJivH2rM72N/Z3lyL31F2b1ya1P0zn816k2KP6JU9UzseucdQH5YqVeH/lFajSN2udg+TLJ9rksNxlvV2lki19rXKI43TPLejFu4ov7k3nMbhyhfY3Xb37f8BAGCf0eMTOH5szf154KmnNgKcnLb+Fzi2AfXktbN7fJelwTAiO/W5uQ2KINXRYu+znqo/WTAdLadURHmy3qciazd3bra4T3w16/f7t7Ms9U5gfJu10955sx1r3vmhBAAAAAAAgId20J1iZbDowNvIjuH427Gr5l/eiC+8OplZON8sVjx/qr9y+Pj+YRItT+NqAM+kkZs3AAAAAID6yfx1FwCAI97/dCh1/ub6SA0AAAAAAAAAgNoT/wcAAAAAAACA+hP/BwAAAAAAAID6E/8HAAAAAAAAgPoT/wcAAAAAAACA+hP/BwAAAAAAAID6E/8HAAAAAAAAgPoT/wcAAAAAAACA+hP/BwAAAAAAAID6E/8HAAAAAAAAgPoT/wcAAAAAAACA+hutp5SiQpYAAAAAAAAAQO2MIpZiT804flnAE2fhwjOeAZXr76kOAAAAAAAA8FjNf4N/l0NE3U/vuVQskLpSd4/Yh2xu9xTu0tFeeNYsLI2f/VMdNxTzj6Je9E/+6pp6Nn3awW3A54goe4Bss6v+PGsjQGMAAAAAAOBp5XEgwH6e7J7rwEQHRb/XvAMAAAAAAAA8yzoDeQDwVGjIAgAAAAAAAACoPfF/AAAAAAAAAKg/8X8AAAAAAAAAqD/xfwAAAAAAAACoP/F/AAAAAAAAAKg/8X8AAAAAAAAAqD/xfwAAAAAAAACoP/F/AAAAAAAAAKg/8X8AAAAAAAAAqD/xfwAAAAAAAACoP/F/AAAAAAAAAKg/8X8AAAAAAAAAqL/GSkSkClkCAAAAAAAAALXTSAAAAAAAAABA3Y1kAQAAAAAAAADUX8RSXZ9dsHC9+M8Fg2Ex/em1lAZpEBGttcrVjZqLEa+k0XpKw9mG4zWx4ukPUMhkAQAAAAAAABzBqbSe3//rXOS9HxGdo4TqR2XkutCdBu+LaPZw/lBbO7cbHnh2C7N7AIo4evEznllqLqWUp/LnYOtpM2bnOH66wI1+9GO4sOuISwv/TOlumu56FDv3NZhc4mR9v7zYIrafr40j/Cccvj9Xns3t3mu99E7qxUv3bqS0/ouNH/08++RGemfQ+nsx/5uNXsQPGulynPvv3ZTW37zd+1ovrqaYpP/122X6Xpx779Z3zr/3YOPKW1lkaRDf31pPaf3j/msRsVGkL+d/f+/m4sJsPm1cfSsr16e8m9Ldj/KsnyIuR3nXw83Is3EhxLd/2V773ks3m/cj/THKUummdP9qKhIOImuOU0Xjwb3y+oqt735rpTetVbF9n8R4x9crRfO77TKqVOZpDclv5bfK18lMnk+q0K18UpxF/RrGXE0Zxtqx3tWSj+vxbL4XaasfKb0dRbtLW73JsfPGg177H+OmGKlfvS1msllt7JEJm9XOJqXR+Fkfo1H66uy5H1v3Xx5+uJmGLw9jro2u7Loj4PnuR6+f+e3d261+eazNhzrL7X83MohoHpS4PddV8ki1it61//pw1g7z6p1U/26Nm2llST57B5rUvuG0XqSU/rPd7jYrqWcbd+beJQ77BgPMDwn37/8BAGCf0eMTOH4cPlufv9VGgJOzqf8Fjm1APXkd7B7f5dF57GPMaWy/MTvjvNvtXj6h8W2+GXvnzXaseeeHEgAAAAAAAB7aQXeKlcGiadBoEOeLb2dtpGOL2MyOtf391a3P/zD96c3JzIP3t4oV797vrh8+vn+YRL5bBuj/AQAAAABqJvfHXQAAHkX82zfXAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACeAgkAAAAAAAAAqLuRLAAAAAAAAACA2hv9D1iu/VAYaAYA","base64"))});var Wj=K((mG,qj)=>{var Hj=mG&&mG.__importDefault||function(F){return F&&F.__esModule?F:{default:F}},e81=Hj(Bj()),F51=$j(),A51=Hj(Ej()),B51=F51.createMemoryCodePoints(A51.default);function p5(F,A){return e81.default(B51,F,A)}p5.saslprep=p5;p5.default=p5;qj.exports=p5});var Nj=K((wj)=>{Object.defineProperty(wj,"__esModule",{value:!0});wj.ScramSHA256=wj.ScramSHA1=void 0;var D51=Wj(),$9=import.meta.require("crypto"),dG=I1(),l6=l(),rB=a(),J51=G4(),zj=B3();class lG extends J51.AuthProvider{constructor(F){super();this.cryptoMethod=F||"sha1"}async prepare(F,A){let B=this.cryptoMethod,D=A.credentials;if(!D)throw new l6.MongoMissingCredentialsError("AuthContext must provide credentials.");let J=await rB.randomBytes(24);return A.nonce=J,{...F,speculativeAuthenticate:{...Qj(B,D,J),db:D.source}}}async auth(F){let{reauthenticating:A,response:B}=F;if(B?.speculativeAuthenticate&&!A)return await Lj(this.cryptoMethod,B.speculativeAuthenticate,F);return await X51(this.cryptoMethod,F)}}function Kj(F){return F.replace("=","=3D").replace(",","=2C")}function Uj(F,A){return Buffer.concat([Buffer.from("n=","utf8"),Buffer.from(F,"utf8"),Buffer.from(",r=","utf8"),Buffer.from(A.toString("base64"),"utf8")])}function Qj(F,A,B){let D=Kj(A.username);return{saslStart:1,mechanism:F==="sha1"?zj.AuthMechanism.MONGODB_SCRAM_SHA1:zj.AuthMechanism.MONGODB_SCRAM_SHA256,payload:new dG.Binary(Buffer.concat([Buffer.from("n,,","utf8"),Uj(D,B)])),autoAuthorize:1,options:{skipEmptyExchange:!0}}}async function X51(F,A){let{connection:B,credentials:D}=A;if(!D)throw new l6.MongoMissingCredentialsError("AuthContext must provide credentials.");if(!A.nonce)throw new l6.MongoInvalidArgumentError("AuthContext must contain a valid nonce property");let J=A.nonce,X=D.source,Z=Qj(F,D,J),Y=await B.command(rB.ns(`${X}.$cmd`),Z,void 0);await Lj(F,Y,A)}async function Lj(F,A,B){let{connection:D,credentials:J}=B;if(!J)throw new l6.MongoMissingCredentialsError("AuthContext must provide credentials.");if(!B.nonce)throw new l6.MongoInvalidArgumentError("Unable to continue SCRAM without valid nonce");let X=B.nonce,Z=J.source,Y=Kj(J.username),$=J.password,G=F==="sha256"?D51.saslprep($):Z51(Y,$),E=Buffer.isBuffer(A.payload)?new dG.Binary(A.payload):A.payload,H=Cj(E),q=parseInt(H.i,10);if(q&&q<4096)throw new l6.MongoRuntimeError(`Server returned an invalid iteration count ${q}`);let{s:W,r:z}=H;if(z.startsWith("nonce"))throw new l6.MongoRuntimeError(`Server returned an invalid nonce: ${z}`);let C=`c=biws,r=${z}`,U=H51(G,Buffer.from(W,"base64"),q,F),Q=sB(F,U,"Client Key"),L=sB(F,U,"Server Key"),V=$51(F,Q),w=[Uj(Y,X),E.toString("utf8"),C].join(","),j=sB(F,V,w),T=`p=${Y51(Q,j)}`,M=[C,T].join(","),f=sB(F,L,w),m={saslContinue:1,conversationId:A.conversationId,payload:new dG.Binary(Buffer.from(M))},O=await D.command(rB.ns(`${Z}.$cmd`),m,void 0),_=Cj(O.payload);if(!q51(Buffer.from(_.v,"base64"),f))throw new l6.MongoRuntimeError("Server returned an invalid signature");if(O.done!==!1)return;let k={saslContinue:1,conversationId:O.conversationId,payload:Buffer.alloc(0)};await D.command(rB.ns(`${Z}.$cmd`),k,void 0)}function Cj(F){let A=F.toString("utf8"),B={},D=A.split(",");for(let J=0;J<D.length;J++){let X=(D[J].match(/^([^=]*)=(.*)$/)??[]).slice(1);B[X[0]]=X[1]}return B}function Z51(F,A){if(typeof F!=="string")throw new l6.MongoInvalidArgumentError("Username must be a string");if(typeof A!=="string")throw new l6.MongoInvalidArgumentError("Password must be a string");if(A.length===0)throw new l6.MongoInvalidArgumentError("Password cannot be empty");let B;try{B=$9.createHash("md5")}catch(D){if($9.getFips())throw new Error("Auth mechanism SCRAM-SHA-1 is not supported in FIPS mode");throw D}return B.update(`${F}:mongo:${A}`,"utf8"),B.digest("hex")}function Y51(F,A){if(!Buffer.isBuffer(F))F=Buffer.from(F);if(!Buffer.isBuffer(A))A=Buffer.from(A);let B=Math.max(F.length,A.length),D=[];for(let J=0;J<B;J+=1)D.push(F[J]^A[J]);return Buffer.from(D).toString("base64")}function $51(F,A){return $9.createHash(F).update(A).digest()}function sB(F,A,B){return $9.createHmac(F,A).update(B).digest()}var aB={},cG=0;function G51(){aB={},cG=0}var E51={sha256:32,sha1:20};function H51(F,A,B,D){let J=[F,A.toString("base64"),B].join("_");if(aB[J]!=null)return aB[J];let X=$9.pbkdf2Sync(F,A,B,E51[D],D);if(cG>=200)G51();return aB[J]=X,cG+=1,X}function q51(F,A){if(F.length!==A.length)return!1;if(typeof $9.timingSafeEqual==="function")return $9.timingSafeEqual(F,A);let B=0;for(let D=0;D<F.length;D++)B|=F[D]^A[D];return B===0}class Vj extends lG{constructor(){super("sha1")}}wj.ScramSHA1=Vj;class Rj extends lG{constructor(){super("sha256")}}wj.ScramSHA256=Rj});var Oj=K((jj)=>{Object.defineProperty(jj,"__esModule",{value:!0});jj.X509=void 0;var Pj=l(),z51=a(),C51=G4();class Tj extends C51.AuthProvider{async prepare(F,A){let{credentials:B}=A;if(!B)throw new Pj.MongoMissingCredentialsError("AuthContext must provide credentials.");return{...F,speculativeAuthenticate:Mj(B)}}async auth(F){let{connection:A,credentials:B}=F;if(!B)throw new Pj.MongoMissingCredentialsError("AuthContext must provide credentials.");if(F.response?.speculativeAuthenticate)return;await A.command(z51.ns("$external.$cmd"),Mj(B),void 0)}}jj.X509=Tj;function Mj(F){let A={authenticate:1,mechanism:"MONGODB-X509"};if(F.username)A.user=F.username;return A}});var iG=K((_j)=>{Object.defineProperty(_j,"__esModule",{value:!0});_j.MongoClientAuthProviders=void 0;var K51=dA(),U51=FT(),xj=iB(),Q51=cT(),L51=sT(),Sj=fG(),V51=oT(),f3=B3(),uj=Nj(),R51=Oj(),pG=l(),w51=new Map([[f3.AuthMechanism.MONGODB_AWS,()=>new U51.MongoDBAWS],[f3.AuthMechanism.MONGODB_CR,()=>{throw new pG.MongoInvalidArgumentError("MONGODB-CR is no longer a supported auth mechanism in MongoDB 4.0+")}],[f3.AuthMechanism.MONGODB_GSSAPI,()=>new K51.GSSAPI],[f3.AuthMechanism.MONGODB_OIDC,(F)=>new xj.MongoDBOIDC(F)],[f3.AuthMechanism.MONGODB_PLAIN,()=>new V51.Plain],[f3.AuthMechanism.MONGODB_SCRAM_SHA1,()=>new uj.ScramSHA1],[f3.AuthMechanism.MONGODB_SCRAM_SHA256,()=>new uj.ScramSHA256],[f3.AuthMechanism.MONGODB_X509,()=>new R51.X509]]);class fj{constructor(){this.existingProviders=new Map}getOrCreateProvider(F,A){let B=this.existingProviders.get(F);if(B)return B;let D=w51.get(F);if(!D)throw new pG.MongoInvalidArgumentError(`authMechanism ${F} not supported`);let J;if(F===f3.AuthMechanism.MONGODB_OIDC)J=D(this.getWorkflow(A));else J=D();return this.existingProviders.set(F,J),J}getWorkflow(F){if(F.OIDC_HUMAN_CALLBACK)return new L51.HumanCallbackWorkflow(new Sj.TokenCache,F.OIDC_HUMAN_CALLBACK);else if(F.OIDC_CALLBACK)return new Q51.AutomatedCallbackWorkflow(new Sj.TokenCache,F.OIDC_CALLBACK);else{let A=F.ENVIRONMENT,B=xj.OIDC_WORKFLOWS.get(A)?.();if(!B)throw new pG.MongoInvalidArgumentError(`Could not load workflow for environment ${F.ENVIRONMENT}`);return B}}}_j.MongoClientAuthProviders=fj});var bj=K((tB)=>{Object.defineProperty(tB,"__esModule",{value:!0});I51(G9(),tB);function I51(F){for(let A of Object.keys(F))Object.defineProperty(tB,A,{enumerable:!0,get:function(){return F[A]}})}});var aG=K((yj)=>{Object.defineProperty(yj,"__esModule",{value:!0});yj.ClientBulkWriteOperation=void 0;var nG=bj(),N51=_6(),P51=a(),M51=$0(),v7=O1();class sG extends M51.CommandOperation{get commandName(){return"bulkWrite"}constructor(F,A){super(void 0,A);this.commandBuilder=F,this.options=A,this.ns=new P51.MongoDBNamespace("admin","$cmd")}resetBatch(){return this.commandBuilder.resetBatch()}get canRetryWrite(){return this.commandBuilder.isBatchRetryable}async execute(F,A,B){let D;if(F.description.type===nG.ServerType.LoadBalancer)if(A){let J;if(!A.pinnedConnection)J=await F.pool.checkOut({timeoutContext:B}),A.pin(J);else J=A.pinnedConnection;D=this.commandBuilder.buildBatch(J.hello?.maxMessageSizeBytes,J.hello?.maxWriteBatchSize,J.hello?.maxBsonObjectSize)}else throw new nG.MongoClientBulkWriteExecutionError("Session provided to the client bulk write operation must be present.");else{if(!F.description.maxWriteBatchSize||!F.description.maxMessageSizeBytes||!F.description.maxBsonObjectSize)throw new nG.MongoClientBulkWriteExecutionError("In order to execute a client bulk write, both maxWriteBatchSize, maxMessageSizeBytes and maxBsonObjectSize must be provided by the servers hello response.");D=this.commandBuilder.buildBatch(F.description.maxMessageSizeBytes,F.description.maxWriteBatchSize,F.description.maxBsonObjectSize)}if(!this.canRetryWrite)this.options.willRetryWrite=!1;return await super.executeCommand(F,A,D,B,N51.ClientBulkWriteCursorResponse)}}yj.ClientBulkWriteOperation=sG;v7.defineAspects(sG,[v7.Aspect.WRITE_OPERATION,v7.Aspect.SKIP_COLLATION,v7.Aspect.CURSOR_CREATING,v7.Aspect.RETRYABLE,v7.Aspect.COMMAND_BATCHING])});var cj=K((mj)=>{Object.defineProperty(mj,"__esModule",{value:!0});mj.ClientBulkWriteCursor=void 0;var T51=aG(),j51=F2(),hj=a(),k51=B2();class rG extends k51.AbstractCursor{constructor(F,A,B={}){super(F,new hj.MongoDBNamespace("admin","$cmd"),B);this.commandBuilder=A,this.clientBulkWriteOptions=B}get response(){if(this.cursorResponse)return this.cursorResponse;return null}get operations(){return this.commandBuilder.lastOperations}clone(){let F=hj.mergeOptions({},this.clientBulkWriteOptions);return delete F.session,new rG(this.client,this.commandBuilder,{...F})}async _initialize(F){let A=new T51.ClientBulkWriteOperation(this.commandBuilder,{...this.clientBulkWriteOptions,...this.cursorOptions,session:F}),B=await j51.executeOperation(this.client,A,this.timeoutContext);return this.cursorResponse=B,{server:A.server,session:F,response:B}}}mj.ClientBulkWriteCursor=rG});var Ak=K((aj)=>{Object.defineProperty(aj,"__esModule",{value:!0});aj.buildReplaceOneOperation=aj.buildUpdateManyOperation=aj.buildUpdateOneOperation=aj.buildDeleteManyOperation=aj.buildDeleteOneOperation=aj.buildInsertOneOperation=aj.ClientBulkWriteCommandBuilder=void 0;aj.buildOperation=eG;var tG=I1(),lj=V5(),i5=l(),FE=a(),pj=1000;class ij{constructor(F,A,B){this.models=F,this.options=A,this.pkFactory=B??FE.DEFAULT_PK_FACTORY,this.currentModelIndex=0,this.previousModelIndex=0,this.lastOperations=[],this.isBatchRetryable=!0}get errorsOnly(){if("verboseResults"in this.options)return!this.options.verboseResults;return!0}hasNextBatch(){return this.currentModelIndex<this.models.length}resetBatch(){return this.currentModelIndex=this.previousModelIndex,!0}buildBatch(F,A,B){this.isBatchRetryable=!0;let D=0,J=0,X=this.baseCommand(),Z=new Map;this.previousModelIndex=this.currentModelIndex;while(this.currentModelIndex<this.models.length){let Y=this.models[this.currentModelIndex],$=Y.namespace,G=Z.get($);if(Y.name==="deleteMany"||Y.name==="updateMany")this.isBatchRetryable=!1;if(G!=null){let E=eG(Y,G,this.pkFactory),H;try{H=tG.BSON.serialize(E)}catch(q){throw new i5.MongoInvalidArgumentError("Could not serialize operation to BSON",{cause:q})}if(oG("ops",H,B),D+H.length<F&&X.ops.documents.length<A)D=pj+X.ops.push(E,H),this.currentModelIndex++;else break}else{Z.set($,J);let E={ns:$},H=eG(Y,J,this.pkFactory),q,W;try{q=tG.BSON.serialize(E),W=tG.BSON.serialize(H)}catch(z){throw new i5.MongoInvalidArgumentError("Could not serialize ns info to BSON",{cause:z})}if(oG("nsInfo",q,B),oG("ops",W,B),D+q.length+W.length<F&&X.ops.documents.length<A)D=pj+X.nsInfo.push(E,q)+X.ops.push(H,W),J++,this.currentModelIndex++;else break}}return this.lastOperations=X.ops.documents,X}baseCommand(){let F={bulkWrite:1,errorsOnly:this.errorsOnly,ordered:this.options.ordered??!0,ops:new lj.DocumentSequence("ops"),nsInfo:new lj.DocumentSequence("nsInfo")};if(this.options.bypassDocumentValidation!=null)F.bypassDocumentValidation=this.options.bypassDocumentValidation;if(this.options.let)F.let=this.options.let;if(this.options.comment!==void 0)F.comment=this.options.comment;return F}}aj.ClientBulkWriteCommandBuilder=ij;function oG(F,A,B){if(A.length>B)throw new i5.MongoInvalidArgumentError(`Client bulk write operation ${F} of length ${A.length} exceeds the max bson object size of ${B}`)}var O51=(F,A,B)=>{let D={insert:A,document:F.document};return D.document._id=F.document._id??B.createPk(),D};aj.buildInsertOneOperation=O51;var S51=(F,A)=>{return nj(F,A,!1)};aj.buildDeleteOneOperation=S51;var u51=(F,A)=>{return nj(F,A,!0)};aj.buildDeleteManyOperation=u51;function nj(F,A,B){let D={delete:A,multi:B,filter:F.filter};if(F.hint)D.hint=F.hint;if(F.collation)D.collation=F.collation;return D}var x51=(F,A)=>{return sj(F,A,!1)};aj.buildUpdateOneOperation=x51;var f51=(F,A)=>{return sj(F,A,!0)};aj.buildUpdateManyOperation=f51;function _51(F){if(!FE.hasAtomicOperators(F))throw new i5.MongoAPIError("Client bulk write update models must only contain atomic modifiers (start with $) and must not be empty.")}function sj(F,A,B){_51(F.update);let D={update:A,multi:B,filter:F.filter,updateMods:F.update};if(F.hint)D.hint=F.hint;if(F.upsert)D.upsert=F.upsert;if(F.arrayFilters)D.arrayFilters=F.arrayFilters;if(F.collation)D.collation=F.collation;return D}var g51=(F,A)=>{if(FE.hasAtomicOperators(F.replacement))throw new i5.MongoAPIError("Client bulk write replace models must not contain atomic modifiers (start with $) and must not be empty.");let B={update:A,multi:!1,filter:F.filter,updateMods:F.replacement};if(F.hint)B.hint=F.hint;if(F.upsert)B.upsert=F.upsert;if(F.collation)B.collation=F.collation;return B};aj.buildReplaceOneOperation=g51;function eG(F,A,B){switch(F.name){case"insertOne":return aj.buildInsertOneOperation(F,A,B);case"deleteOne":return aj.buildDeleteOneOperation(F,A);case"deleteMany":return aj.buildDeleteManyOperation(F,A);case"updateOne":return aj.buildUpdateOneOperation(F,A);case"updateMany":return aj.buildUpdateManyOperation(F,A);case"replaceOne":return aj.buildReplaceOneOperation(F,A)}}});var Xk=K((Dk)=>{Object.defineProperty(Dk,"__esModule",{value:!0});Dk.ClientBulkWriteResultsMerger=void 0;var v51=G9(),h51=l(),m51={acknowledged:!1,insertedCount:0,upsertedCount:0,matchedCount:0,modifiedCount:0,deletedCount:0,insertResults:void 0,updateResults:void 0,deleteResults:void 0};class Bk{static unacknowledged(){return m51}constructor(F){if(this.options=F,this.currentBatchOffset=0,this.writeConcernErrors=[],this.writeErrors=new Map,this.result={acknowledged:!0,insertedCount:0,upsertedCount:0,matchedCount:0,modifiedCount:0,deletedCount:0,insertResults:void 0,updateResults:void 0,deleteResults:void 0},F.verboseResults)this.result.insertResults=new Map,this.result.updateResults=new Map,this.result.deleteResults=new Map}get bulkWriteResult(){return{acknowledged:this.result.acknowledged,insertedCount:this.result.insertedCount,upsertedCount:this.result.upsertedCount,matchedCount:this.result.matchedCount,modifiedCount:this.result.modifiedCount,deletedCount:this.result.deletedCount,insertResults:this.result.insertResults,updateResults:this.result.updateResults,deleteResults:this.result.deleteResults}}async merge(F){let A;try{for await(let B of F)if(B.ok===1){if(this.options.verboseResults)this.processDocument(F,B)}else if(this.options.ordered){let D=new h51.MongoClientBulkWriteError({message:"Mongo client ordered bulk write encountered a write error."});throw D.writeErrors.set(B.idx+this.currentBatchOffset,{code:B.code,message:B.errmsg}),D.partialResult=this.result,D}else this.writeErrors.set(B.idx+this.currentBatchOffset,{code:B.code,message:B.errmsg})}catch(B){if(B instanceof v51.MongoWriteConcernError){let D=B.result;if(A={insertedCount:D.nInserted,upsertedCount:D.nUpserted,matchedCount:D.nMatched,modifiedCount:D.nModified,deletedCount:D.nDeleted,writeConcernError:D.writeConcernError},this.options.verboseResults&&D.cursor.firstBatch){for(let J of D.cursor.firstBatch)if(J.ok===1)this.processDocument(F,J)}}else throw B}finally{if(F.response){let B=F.response;this.incrementCounts(B)}this.currentBatchOffset+=F.operations.length}if(A){let B=A.writeConcernError;this.incrementCounts(A),this.writeConcernErrors.push({code:B.code,message:B.errmsg})}return this.result}processDocument(F,A){let B=F.operations[A.idx];if("insert"in B)this.result.insertResults?.set(A.idx+this.currentBatchOffset,{insertedId:B.document._id});if("update"in B){let D={matchedCount:A.n,modifiedCount:A.nModified??0,didUpsert:A.upserted!=null};if(A.upserted)D.upsertedId=A.upserted._id;this.result.updateResults?.set(A.idx+this.currentBatchOffset,D)}if("delete"in B)this.result.deleteResults?.set(A.idx+this.currentBatchOffset,{deletedCount:A.n})}incrementCounts(F){this.result.insertedCount+=F.insertedCount,this.result.upsertedCount+=F.upsertedCount,this.result.matchedCount+=F.matchedCount,this.result.modifiedCount+=F.modifiedCount,this.result.deletedCount+=F.deletedCount}}Dk.ClientBulkWriteResultsMerger=Bk});var Hk=K((Gk)=>{Object.defineProperty(Gk,"__esModule",{value:!0});Gk.ClientBulkWriteExecutor=void 0;var Zk=B2(),d51=cj(),E9=l(),c51=o0(),l51=a(),p51=t0(),i51=F2(),n51=aG(),s51=Ak(),Yk=Xk();class $k{constructor(F,A,B){if(A.length===0)throw new E9.MongoClientBulkWriteExecutionError("No client bulk write models were provided.");if(this.client=F,this.operations=A,this.options={ordered:!0,bypassDocumentValidation:!1,verboseResults:!1,...B},!this.options.writeConcern)this.options.writeConcern=p51.WriteConcern.fromOptions(this.client.s.options);if(this.options.writeConcern?.w===0){if(this.options.verboseResults)throw new E9.MongoInvalidArgumentError("Cannot request unacknowledged write concern and verbose results");if(this.options.ordered)throw new E9.MongoInvalidArgumentError("Cannot request unacknowledged write concern and ordered writes")}}async execute(){let F=this.client.s.options.pkFactory,A=new s51.ClientBulkWriteCommandBuilder(this.operations,this.options,F),B=l51.resolveTimeoutOptions(this.client,this.options),D=c51.TimeoutContext.create(B);if(this.options.writeConcern?.w===0){while(A.hasNextBatch()){let J=new n51.ClientBulkWriteOperation(A,this.options);await i51.executeOperation(this.client,J,D)}return Yk.ClientBulkWriteResultsMerger.unacknowledged()}else{let J=new Yk.ClientBulkWriteResultsMerger(this.options);while(A.hasNextBatch()){let X=new Zk.CursorTimeoutContext(D,Symbol()),Z={...this.options,timeoutContext:X,...B.timeoutMS!=null&&{timeoutMode:Zk.CursorTimeoutMode.LIFETIME}},Y=new d51.ClientBulkWriteCursor(this.client,A,Z);try{await J.merge(Y)}catch($){if($ instanceof E9.MongoServerError&&!($ instanceof E9.MongoClientBulkWriteError)){let G=new E9.MongoClientBulkWriteError({message:"Mongo client bulk write encountered an error during execution"});throw G.cause=$,G.partialResult=J.bulkWriteResult,G}else throw $}}if(J.writeConcernErrors.length>0||J.writeErrors.size>0){let X=new E9.MongoClientBulkWriteError({message:"Mongo client bulk write encountered errors during execution."});throw X.writeConcernErrors=J.writeConcernErrors,X.writeErrors=J.writeErrors,X.partialResult=J.bulkWriteResult,X}return J.bulkWriteResult}}}Gk.ClientBulkWriteExecutor=$k});var BE=K((Kk)=>{Object.defineProperty(Kk,"__esModule",{value:!0});Kk.WaitingForSuitableServerEvent=Kk.ServerSelectionSucceededEvent=Kk.ServerSelectionFailedEvent=Kk.ServerSelectionStartedEvent=Kk.ServerSelectionEvent=void 0;var a51=a(),oB=K0();class h7{constructor(F,A,B){this.selector=F,this.operation=B,this.topologyDescription=A}}Kk.ServerSelectionEvent=h7;class qk extends h7{constructor(F,A,B){super(F,A,B);this.name=oB.SERVER_SELECTION_STARTED,this.message="Server selection started"}}Kk.ServerSelectionStartedEvent=qk;class Wk extends h7{constructor(F,A,B,D){super(F,A,D);this.name=oB.SERVER_SELECTION_FAILED,this.message="Server selection failed",this.failure=B}}Kk.ServerSelectionFailedEvent=Wk;class zk extends h7{constructor(F,A,B,D){super(F,A,D);this.name=oB.SERVER_SELECTION_SUCCEEDED,this.message="Server selection succeeded";let{host:J,port:X}=a51.HostAddress.fromString(B).toHostPort();this.serverHost=J,this.serverPort=X}}Kk.ServerSelectionSucceededEvent=zk;class Ck extends h7{constructor(F,A,B,D){super(F,A,D);this.name=oB.WAITING_FOR_SUITABLE_SERVER,this.message="Waiting for suitable server to become available",this.remainingTimeMS=B}}Kk.WaitingForSuitableServerEvent=Ck});var XE=K((Qk)=>{Object.defineProperty(Qk,"__esModule",{value:!0});Qk.SrvPoller=Qk.SrvPollingEvent=void 0;var FF1=import.meta.require("dns"),DE=import.meta.require("timers"),AF1=l(),BF1=o2(),eB=a();class JE{constructor(F){this.srvRecords=F}hostnames(){return new Set(this.srvRecords.map((F)=>eB.HostAddress.fromSrvRecord(F).toString()))}}Qk.SrvPollingEvent=JE;class FD extends BF1.TypedEventEmitter{constructor(F){super();if(!F||!F.srvHost)throw new AF1.MongoRuntimeError("Options for SrvPoller must exist and include srvHost");this.srvHost=F.srvHost,this.srvMaxHosts=F.srvMaxHosts??0,this.srvServiceName=F.srvServiceName??"mongodb",this.rescanSrvIntervalMS=60000,this.heartbeatFrequencyMS=F.heartbeatFrequencyMS??1e4,this.haMode=!1,this.generation=0,this._timeout=void 0}get srvAddress(){return`_${this.srvServiceName}._tcp.${this.srvHost}`}get intervalMS(){return this.haMode?this.heartbeatFrequencyMS:this.rescanSrvIntervalMS}start(){if(!this._timeout)this.schedule()}stop(){if(this._timeout)DE.clearTimeout(this._timeout),this.generation+=1,this._timeout=void 0}schedule(){if(this._timeout)DE.clearTimeout(this._timeout);this._timeout=DE.setTimeout(()=>{this._poll().then(void 0,eB.squashError)},this.intervalMS)}success(F){this.haMode=!1,this.schedule(),this.emit(FD.SRV_RECORD_DISCOVERY,new JE(F))}failure(){this.haMode=!0,this.schedule()}async _poll(){let F=this.generation,A;try{A=await FF1.promises.resolveSrv(this.srvAddress)}catch{this.failure();return}if(F!==this.generation)return;let B=[];for(let D of A)try{eB.checkParentDomainMatch(D.name,this.srvHost),B.push(D)}catch(J){eB.squashError(J)}if(!B.length){this.failure();return}this.success(B)}}Qk.SrvPoller=FD;FD.SRV_RECORD_DISCOVERY="srvRecordDiscovery"});var Ok=K((jk)=>{Object.defineProperty(jk,"__esModule",{value:!0});jk.ServerCapabilities=jk.Topology=void 0;var Vk=MG(),f2=K0(),E3=l(),F0=r4(),JF1=o2(),n5=k0(),ZE=o0(),w6=a(),q1=s2(),R4=SB(),Rk=qG(),$E=O5(),YE=c8(),w4=BE(),AD=XE(),wk=g$(),XF1=0,s5=w6.makeStateMachine({[q1.STATE_CLOSED]:[q1.STATE_CLOSED,q1.STATE_CONNECTING],[q1.STATE_CONNECTING]:[q1.STATE_CONNECTING,q1.STATE_CLOSING,q1.STATE_CONNECTED,q1.STATE_CLOSED],[q1.STATE_CONNECTED]:[q1.STATE_CONNECTED,q1.STATE_CLOSING,q1.STATE_CLOSED],[q1.STATE_CLOSING]:[q1.STATE_CLOSING,q1.STATE_CLOSED]}),GE=Symbol("cancelled"),_3=Symbol("waitQueue");class h1 extends JF1.TypedEventEmitter{constructor(F,A,B){super();if(this.client=F,B=B??{hosts:[w6.HostAddress.fromString("localhost:27017")],...Object.fromEntries(Vk.DEFAULT_OPTIONS.entries()),...Object.fromEntries(Vk.FEATURE_FLAGS.entries())},typeof A==="string")A=[w6.HostAddress.fromString(A)];else if(!Array.isArray(A))A=[A];let D=[];for(let $ of A)if(typeof $==="string")D.push(w6.HostAddress.fromString($));else if($ instanceof w6.HostAddress)D.push($);else throw new E3.MongoRuntimeError(`Topology cannot be constructed from ${JSON.stringify($)}`);let J=ZF1(B),X=XF1++,Z=B.srvMaxHosts==null||B.srvMaxHosts===0||B.srvMaxHosts>=D.length?D:w6.shuffle(D,B.srvMaxHosts),Y=new Map;for(let $ of Z)Y.set($.toString(),new $E.ServerDescription($));if(this[_3]=new w6.List,this.s={id:X,options:B,seedlist:D,state:q1.STATE_CLOSED,description:new wk.TopologyDescription(J,Y,B.replicaSet,void 0,void 0,void 0,B),serverSelectionTimeoutMS:B.serverSelectionTimeoutMS,heartbeatFrequencyMS:B.heartbeatFrequencyMS,minHeartbeatFrequencyMS:B.minHeartbeatFrequencyMS,servers:new Map,credentials:B?.credentials,clusterTime:void 0,detectShardedTopology:($)=>this.detectShardedTopology($),detectSrvRecords:($)=>this.detectSrvRecords($)},this.mongoLogger=F.mongoLogger,this.component="topology",B.srvHost&&!B.loadBalanced)this.s.srvPoller=B.srvPoller??new AD.SrvPoller({heartbeatFrequencyMS:this.s.heartbeatFrequencyMS,srvHost:B.srvHost,srvMaxHosts:B.srvMaxHosts,srvServiceName:B.srvServiceName}),this.on(h1.TOPOLOGY_DESCRIPTION_CHANGED,this.s.detectShardedTopology);this.connectionLock=void 0}detectShardedTopology(F){let A=F.previousDescription.type,B=F.newDescription.type,D=A!==q1.TopologyType.Sharded&&B===q1.TopologyType.Sharded,X=!!this.s.srvPoller?.listeners(AD.SrvPoller.SRV_RECORD_DISCOVERY)?.includes(this.s.detectSrvRecords);if(D&&!X)this.s.srvPoller?.on(AD.SrvPoller.SRV_RECORD_DISCOVERY,this.s.detectSrvRecords),this.s.srvPoller?.start()}detectSrvRecords(F){let A=this.s.description;if(this.s.description=this.s.description.updateFromSrvPollingEvent(F,this.s.options.srvMaxHosts),this.s.description===A)return;Ik(this),this.emitAndLog(h1.TOPOLOGY_DESCRIPTION_CHANGED,new R4.TopologyDescriptionChangedEvent(this.s.id,A,this.s.description))}get description(){return this.s.description}get loadBalanced(){return this.s.options.loadBalanced}get serverApi(){return this.s.options.serverApi}get capabilities(){return new EE(this.lastHello())}async connect(F){this.connectionLock??=this._connect(F);try{return await this.connectionLock,this}finally{this.connectionLock=void 0}}async _connect(F){if(F=F??{},this.s.state===q1.STATE_CONNECTED)return this;s5(this,q1.STATE_CONNECTING),this.emitAndLog(h1.TOPOLOGY_OPENING,new R4.TopologyOpeningEvent(this.s.id)),this.emitAndLog(h1.TOPOLOGY_DESCRIPTION_CHANGED,new R4.TopologyDescriptionChangedEvent(this.s.id,new wk.TopologyDescription(q1.TopologyType.Unknown),this.s.description));let A=Array.from(this.s.description.servers.values());if(this.s.servers=new Map(A.map((Z)=>[Z.address,Mk(this,Z)])),this.s.options.loadBalanced)for(let Z of A){let Y=new $E.ServerDescription(Z.hostAddress,void 0,{loadBalanced:this.s.options.loadBalanced});this.serverUpdateHandler(Y)}let B=this.client.s.options.serverSelectionTimeoutMS,D=F.readPreference??n5.ReadPreference.primary,J=ZE.TimeoutContext.create({timeoutMS:void 0,serverSelectionTimeoutMS:B,waitQueueTimeoutMS:this.client.s.options.waitQueueTimeoutMS}),X={operationName:"ping",...F,timeoutContext:J};try{let Z=await this.selectServer(YE.readPreferenceServerSelector(D),X);if(this.s.options[Symbol.for("@@mdb.skipPingOnConnect")]!==!0&&this.s.credentials)return await Z.command(w6.ns("admin.$cmd"),{ping:1},{timeoutContext:J}),s5(this,q1.STATE_CONNECTED),this.emit(h1.OPEN,this),this.emit(h1.CONNECT,this),this;return s5(this,q1.STATE_CONNECTED),this.emit(h1.OPEN,this),this.emit(h1.CONNECT,this),this}catch(Z){throw this.close(),Z}}close(){if(this.s.state===q1.STATE_CLOSED||this.s.state===q1.STATE_CLOSING)return;for(let F of this.s.servers.values())Pk(F,this);if(this.s.servers.clear(),s5(this,q1.STATE_CLOSING),Tk(this[_3],new E3.MongoTopologyClosedError),this.s.srvPoller)this.s.srvPoller.stop(),this.s.srvPoller.removeListener(AD.SrvPoller.SRV_RECORD_DISCOVERY,this.s.detectSrvRecords);this.removeListener(h1.TOPOLOGY_DESCRIPTION_CHANGED,this.s.detectShardedTopology),s5(this,q1.STATE_CLOSED),this.emitAndLog(h1.TOPOLOGY_CLOSED,new R4.TopologyClosedEvent(this.s.id))}async selectServer(F,A){let B;if(typeof F!=="function")if(typeof F==="string")B=YE.readPreferenceServerSelector(n5.ReadPreference.fromString(F));else{let H;if(F instanceof n5.ReadPreference)H=F;else n5.ReadPreference.translate(A),H=A.readPreference||n5.ReadPreference.primary;B=YE.readPreferenceServerSelector(H)}else B=F;if(A={serverSelectionTimeoutMS:this.s.serverSelectionTimeoutMS,...A},this.client.mongoLogger?.willLog(F0.MongoLoggableComponent.SERVER_SELECTION,F0.SeverityLevel.DEBUG))this.client.mongoLogger?.debug(F0.MongoLoggableComponent.SERVER_SELECTION,new w4.ServerSelectionStartedEvent(F,this.description,A.operationName));let D;if(A.timeoutContext)D=A.timeoutContext.serverSelectionTimeout;else D=ZE.Timeout.expires(A.serverSelectionTimeoutMS??0);let J=this.description.type===q1.TopologyType.Sharded,X=A.session,Z=X&&X.transaction;if(J&&Z&&Z.server){if(this.client.mongoLogger?.willLog(F0.MongoLoggableComponent.SERVER_SELECTION,F0.SeverityLevel.DEBUG))this.client.mongoLogger?.debug(F0.MongoLoggableComponent.SERVER_SELECTION,new w4.ServerSelectionSucceededEvent(F,this.description,Z.server.pool.address,A.operationName));if(A.timeoutContext?.clearServerSelectionTimeout)D?.clear();return Z.server}let{promise:Y,resolve:$,reject:G}=w6.promiseWithResolvers(),E={serverSelector:B,topologyDescription:this.description,mongoLogger:this.client.mongoLogger,transaction:Z,resolve:$,reject:G,startTime:w6.now(),operationName:A.operationName,waitingLogged:!1,previousServer:A.previousServer};this[_3].push(E),Nk(this);try{D?.throwIfExpired();let H=await(D?Promise.race([Y,D]):Y);if(A.timeoutContext?.csotEnabled()&&H.description.minRoundTripTime!==0)A.timeoutContext.minRoundTripTime=H.description.minRoundTripTime;return H}catch(H){if(ZE.TimeoutError.is(H)){E[GE]=!0;let q=new E3.MongoServerSelectionError(`Server selection timed out after ${D?.duration} ms`,this.description);if(this.client.mongoLogger?.willLog(F0.MongoLoggableComponent.SERVER_SELECTION,F0.SeverityLevel.DEBUG))this.client.mongoLogger?.debug(F0.MongoLoggableComponent.SERVER_SELECTION,new w4.ServerSelectionFailedEvent(F,this.description,q,A.operationName));if(A.timeoutContext?.csotEnabled())throw new E3.MongoOperationTimeoutError("Timed out during server selection",{cause:q});throw q}throw H}finally{if(A.timeoutContext?.clearServerSelectionTimeout)D?.clear()}}serverUpdateHandler(F){if(!this.s.description.hasServer(F.address))return;if(YF1(this.s.description,F))return;let A=this.s.description,B=this.s.description.servers.get(F.address);if(!B)return;let D=F.$clusterTime;if(D)q1._advanceClusterTime(this,D);let J=B&&B.equals(F);if(this.s.description=this.s.description.update(F),this.s.description.compatibilityError){this.emit(h1.ERROR,new E3.MongoCompatibilityError(this.s.description.compatibilityError));return}if(!J){let X=this.s.description.servers.get(F.address);if(X)this.emit(h1.SERVER_DESCRIPTION_CHANGED,new R4.ServerDescriptionChangedEvent(this.s.id,F.address,B,X))}if(Ik(this,F),this[_3].length>0)Nk(this);if(!J)this.emitAndLog(h1.TOPOLOGY_DESCRIPTION_CHANGED,new R4.TopologyDescriptionChangedEvent(this.s.id,A,this.s.description))}auth(F,A){if(typeof F==="function")A=F,F=void 0;if(typeof A==="function")A(void 0,!0)}get clientMetadata(){return this.s.options.metadata}isConnected(){return this.s.state===q1.STATE_CONNECTED}isDestroyed(){return this.s.state===q1.STATE_CLOSED}lastHello(){let F=Array.from(this.description.servers.values());if(F.length===0)return{};return F.filter((D)=>D.type!==q1.ServerType.Unknown)[0]||{maxWireVersion:this.description.commonWireVersion}}get commonWireVersion(){return this.description.commonWireVersion}get logicalSessionTimeoutMinutes(){return this.description.logicalSessionTimeoutMinutes}get clusterTime(){return this.s.clusterTime}set clusterTime(F){this.s.clusterTime=F}}jk.Topology=h1;h1.SERVER_OPENING=f2.SERVER_OPENING;h1.SERVER_CLOSED=f2.SERVER_CLOSED;h1.SERVER_DESCRIPTION_CHANGED=f2.SERVER_DESCRIPTION_CHANGED;h1.TOPOLOGY_OPENING=f2.TOPOLOGY_OPENING;h1.TOPOLOGY_CLOSED=f2.TOPOLOGY_CLOSED;h1.TOPOLOGY_DESCRIPTION_CHANGED=f2.TOPOLOGY_DESCRIPTION_CHANGED;h1.ERROR=f2.ERROR;h1.OPEN=f2.OPEN;h1.CONNECT=f2.CONNECT;h1.CLOSE=f2.CLOSE;h1.TIMEOUT=f2.TIMEOUT;function Pk(F,A){for(let B of f2.LOCAL_SERVER_EVENTS)F.removeAllListeners(B);F.destroy(),A.emitAndLog(h1.SERVER_CLOSED,new R4.ServerClosedEvent(A.s.id,F.description.address));for(let B of f2.SERVER_RELAY_EVENTS)F.removeAllListeners(B)}function ZF1(F){if(F?.directConnection)return q1.TopologyType.Single;if(F?.replicaSet)return q1.TopologyType.ReplicaSetNoPrimary;if(F?.loadBalanced)return q1.TopologyType.LoadBalanced;return q1.TopologyType.Unknown}function Mk(F,A){F.emitAndLog(h1.SERVER_OPENING,new R4.ServerOpeningEvent(F.s.id,A.address));let B=new Rk.Server(F,A,F.s.options);for(let D of f2.SERVER_RELAY_EVENTS)B.on(D,(J)=>F.emit(D,J));return B.on(Rk.Server.DESCRIPTION_RECEIVED,(D)=>F.serverUpdateHandler(D)),B.connect(),B}function Ik(F,A){if(A&&F.s.servers.has(A.address)){let B=F.s.servers.get(A.address);if(B){if(B.s.description=A,A.error instanceof E3.MongoError&&A.error.hasErrorLabel(E3.MongoErrorLabel.ResetPool)){let D=A.error.hasErrorLabel(E3.MongoErrorLabel.InterruptInUseConnections);B.pool.clear({interruptInUseConnections:D})}else if(A.error==null){let D=F.s.description.type;if(A.isDataBearing||A.type!==q1.ServerType.Unknown&&D===q1.TopologyType.Single)B.pool.ready()}}}for(let B of F.description.servers.values())if(!F.s.servers.has(B.address)){let D=Mk(F,B);F.s.servers.set(B.address,D)}for(let B of F.s.servers){let D=B[0];if(F.description.hasServer(D))continue;if(!F.s.servers.has(D))continue;let J=F.s.servers.get(D);if(F.s.servers.delete(D),J)Pk(J,F)}}function Tk(F,A){while(F.length){let B=F.shift();if(!B)continue;if(!B[GE]){if(B.mongoLogger?.willLog(F0.MongoLoggableComponent.SERVER_SELECTION,F0.SeverityLevel.DEBUG))B.mongoLogger?.debug(F0.MongoLoggableComponent.SERVER_SELECTION,new w4.ServerSelectionFailedEvent(B.serverSelector,B.topologyDescription,A,B.operationName));B.reject(A)}}}function Nk(F){if(F.s.state===q1.STATE_CLOSED){Tk(F[_3],new E3.MongoTopologyClosedError);return}let A=F.description.type===q1.TopologyType.Sharded,B=Array.from(F.description.servers.values()),D=F[_3].length;for(let J=0;J<D;++J){let X=F[_3].shift();if(!X)continue;if(X[GE])continue;let Z;try{let{serverSelector:G,previousServer:E}=X;Z=G?G(F.description,B,E?[E]:[]):B}catch(G){if(F.client.mongoLogger?.willLog(F0.MongoLoggableComponent.SERVER_SELECTION,F0.SeverityLevel.DEBUG))F.client.mongoLogger?.debug(F0.MongoLoggableComponent.SERVER_SELECTION,new w4.ServerSelectionFailedEvent(X.serverSelector,F.description,G,X.operationName));X.reject(G);continue}let Y;if(Z.length===0){if(!X.waitingLogged){if(F.client.mongoLogger?.willLog(F0.MongoLoggableComponent.SERVER_SELECTION,F0.SeverityLevel.INFORMATIONAL))F.client.mongoLogger?.info(F0.MongoLoggableComponent.SERVER_SELECTION,new w4.WaitingForSuitableServerEvent(X.serverSelector,F.description,F.s.serverSelectionTimeoutMS!==0?F.s.serverSelectionTimeoutMS-(w6.now()-X.startTime):-1,X.operationName));X.waitingLogged=!0}F[_3].push(X);continue}else if(Z.length===1)Y=F.s.servers.get(Z[0].address);else{let G=w6.shuffle(Z,2),E=F.s.servers.get(G[0].address),H=F.s.servers.get(G[1].address);Y=E&&H&&E.s.operationCount<H.s.operationCount?E:H}if(!Y){let G=new E3.MongoServerSelectionError("server selection returned a server description but the server was not found in the topology",F.description);if(F.client.mongoLogger?.willLog(F0.MongoLoggableComponent.SERVER_SELECTION,F0.SeverityLevel.DEBUG))F.client.mongoLogger?.debug(F0.MongoLoggableComponent.SERVER_SELECTION,new w4.ServerSelectionFailedEvent(X.serverSelector,F.description,G,X.operationName));X.reject(G);return}let $=X.transaction;if(A&&$&&$.isActive&&Y)$.pinServer(Y);if(F.client.mongoLogger?.willLog(F0.MongoLoggableComponent.SERVER_SELECTION,F0.SeverityLevel.DEBUG))F.client.mongoLogger?.debug(F0.MongoLoggableComponent.SERVER_SELECTION,new w4.ServerSelectionSucceededEvent(X.serverSelector,X.topologyDescription,Y.pool.address,X.operationName));X.resolve(Y)}if(F[_3].length>0)for(let[,J]of F.s.servers)process.nextTick(function X(){return J.requestCheck()})}function YF1(F,A){let D=F.servers.get(A.address)?.topologyVersion;return $E.compareTopologyVersion(D,A.topologyVersion)>0}class EE{constructor(F){this.minWireVersion=F.minWireVersion||0,this.maxWireVersion=F.maxWireVersion||0}get hasAggregationCursor(){return this.maxWireVersion>=1}get hasWriteCommands(){return this.maxWireVersion>=2}get hasTextSearch(){return this.minWireVersion>=0}get hasAuthCommands(){return this.maxWireVersion>=1}get hasListCollectionsCommand(){return this.maxWireVersion>=3}get hasListIndexesCommand(){return this.maxWireVersion>=3}get supportsSnapshotReads(){return this.maxWireVersion>=13}get commandsTakeWriteConcern(){return this.maxWireVersion>=5}get commandsTakeCollation(){return this.maxWireVersion>=5}}jk.ServerCapabilities=EE});var Y4=K((gk)=>{Object.defineProperty(gk,"__esModule",{value:!0});gk.MongoClient=gk.ServerApiVersion=void 0;var HE=import.meta.require("fs"),GF1=I1(),EF1=F9(),HF1=lA(),qF1=B3(),Sk=MG(),WF1=K0(),zF1=vA(),qE=l(),CF1=iG(),uk=r4(),KF1=o2(),UF1=Hk(),QF1=F2(),LF1=o9(),xk=k0(),VF1=B7(),RF1=c8(),fk=Ok(),_k=w7(),X2=a();gk.ServerApiVersion=Object.freeze({v1:"1"});var H0=Symbol("options");class WE extends KF1.TypedEventEmitter{constructor(F,A){super();this[H0]=Sk.parseOptions(F,this,A);let B=Object.values(this[H0].mongoLoggerOptions.componentSeverities).some((J)=>J!==uk.SeverityLevel.OFF);this.mongoLogger=B?new uk.MongoLogger(this[H0].mongoLoggerOptions):void 0;let D=this;this.s={url:F,bsonOptions:GF1.resolveBSONOptions(this[H0]),namespace:X2.ns("admin"),hasBeenClosed:!1,sessionPool:new _k.ServerSessionPool(this),activeSessions:new Set,authProviders:new CF1.MongoClientAuthProviders,get options(){return D[H0]},get readConcern(){return D[H0].readConcern},get writeConcern(){return D[H0].writeConcern},get readPreference(){return D[H0].readPreference},get isMongoClient(){return!0}},this.checkForNonGenuineHosts()}async asyncDispose(){await this.close()}checkForNonGenuineHosts(){let F=this[H0].hosts.filter((J)=>X2.isHostMatch(X2.DOCUMENT_DB_CHECK,J.host)),A=X2.isHostMatch(X2.DOCUMENT_DB_CHECK,this[H0].srvHost),B=this[H0].hosts.filter((J)=>X2.isHostMatch(X2.COSMOS_DB_CHECK,J.host)),D=X2.isHostMatch(X2.COSMOS_DB_CHECK,this[H0].srvHost);if(F.length!==0||A)this.mongoLogger?.info("client",X2.DOCUMENT_DB_MSG);else if(B.length!==0||D)this.mongoLogger?.info("client",X2.COSMOS_DB_MSG)}get options(){return Object.freeze({...this[H0]})}get serverApi(){return this[H0].serverApi&&Object.freeze({...this[H0].serverApi})}get monitorCommands(){return this[H0].monitorCommands}set monitorCommands(F){this[H0].monitorCommands=F}get autoEncrypter(){return this[H0].autoEncrypter}get readConcern(){return this.s.readConcern}get writeConcern(){return this.s.writeConcern}get readPreference(){return this.s.readPreference}get bsonOptions(){return this.s.bsonOptions}get timeoutMS(){return this.s.options.timeoutMS}async bulkWrite(F,A){if(this.autoEncrypter)throw new qE.MongoInvalidArgumentError("MongoClient bulkWrite does not currently support automatic encryption.");return await new UF1.ClientBulkWriteExecutor(this,F,X2.resolveOptions(this,A)).execute()}async connect(){if(this.connectionLock)return await this.connectionLock;try{this.connectionLock=this._connect(),await this.connectionLock}finally{this.connectionLock=void 0}return this}async _connect(){if(this.topology&&this.topology.isConnected())return this;let F=this[H0];if(F.tls){if(typeof F.tlsCAFile==="string")F.ca??=await HE.promises.readFile(F.tlsCAFile);if(typeof F.tlsCRLFile==="string")F.crl??=await HE.promises.readFile(F.tlsCRLFile);if(typeof F.tlsCertificateKeyFile==="string"){if(!F.key||!F.cert){let B=await HE.promises.readFile(F.tlsCertificateKeyFile);F.key??=B,F.cert??=B}}}if(typeof F.srvHost==="string"){let B=await Sk.resolveSRVRecord(F);for(let[D,J]of B.entries())F.hosts[D]=J}if(F.credentials?.mechanism===qF1.AuthMechanism.MONGODB_OIDC){let B=F.credentials?.mechanismProperties?.ALLOWED_HOSTS||HF1.DEFAULT_ALLOWED_HOSTS;if(!F.credentials?.mechanismProperties?.ENVIRONMENT){for(let J of F.hosts)if(!X2.hostMatchesWildcards(J.toHostPort().host,B))throw new qE.MongoInvalidArgumentError(`Host '${J}' is not valid for OIDC authentication with ALLOWED_HOSTS of '${B.join(",")}'`)}}this.topology=new fk.Topology(this,F.hosts,F),this.topology.once(fk.Topology.OPEN,()=>this.emit("open",this));for(let B of WF1.MONGO_CLIENT_EVENTS)this.topology.on(B,(...D)=>this.emit(B,...D));let A=async()=>{try{await this.topology?.connect(F)}catch(B){throw this.topology?.close(),B}};if(this.autoEncrypter)await this.autoEncrypter?.init(),await A(),await F.encrypter.connectInternalClient();else await A();return this}async close(F=!1){Object.defineProperty(this.s,"hasBeenClosed",{value:!0,enumerable:!0,configurable:!1,writable:!1});let A=Array.from(this.s.activeSessions,($)=>$.endSession());if(this.s.activeSessions.clear(),await Promise.all(A),this.topology==null)return;let B=RF1.readPreferenceServerSelector(xk.ReadPreference.primaryPreferred),D=this.topology.description,J=Array.from(D.servers.values());if(B(D,J).length!==0){let $=Array.from(this.s.sessionPool.sessions,({id:G})=>G);if($.length!==0)try{await QF1.executeOperation(this,new LF1.RunAdminCommandOperation({endSessions:$},{readPreference:xk.ReadPreference.primaryPreferred,noResponse:!0}))}catch(G){X2.squashError(G)}}let Z=this.topology;this.topology=void 0,Z.close();let{encrypter:Y}=this[H0];if(Y)await Y.close(this,F)}db(F,A){if(A=A??{},!F)F=this.s.options.dbName;let B=Object.assign({},this[H0],A);return new zF1.Db(this,F,B)}static async connect(F,A){return await new this(F,A).connect()}startSession(F){let A=new _k.ClientSession(this,this.s.sessionPool,{explicit:!0,...F},this[H0]);return this.s.activeSessions.add(A),A.once("ended",()=>{this.s.activeSessions.delete(A)}),A}async withSession(F,A){let B={owner:Symbol(),...typeof F==="object"?F:{}},D=typeof F==="function"?F:A;if(D==null)throw new qE.MongoInvalidArgumentError("Missing required callback parameter");let J=this.startSession(B);try{return await D(J)}finally{try{await J.endSession()}catch(X){X2.squashError(X)}}}watch(F=[],A={}){if(!Array.isArray(F))A=F,F=[];return new EF1.ChangeStream(this,F,X2.resolveOptions(this,A))}}gk.MongoClient=WE;VF1.configureResourceManagement(WE.prototype)});var B7=K((yk)=>{Object.defineProperty(yk,"__esModule",{value:!0});yk.configureResourceManagement=a5;yk.configureExplicitResourceManagement=IF1;function a5(F){Symbol.asyncDispose&&Object.defineProperty(F,Symbol.asyncDispose,{value:async function A(){await this.asyncDispose()},enumerable:!1,configurable:!0,writable:!0})}function IF1(){let{MongoClient:F}=Y4(),{ClientSession:A}=w7(),{AbstractCursor:B}=B2(),{ChangeStream:D}=F9();a5(F.prototype),a5(A.prototype),a5(B.prototype),a5(D.prototype)}});var B2=K((ck)=>{Object.defineProperty(ck,"__esModule",{value:!0});ck.CursorTimeoutContext=ck.AbstractCursor=ck.CursorTimeoutMode=ck.CURSOR_FLAGS=void 0;var dk=import.meta.require("stream"),m7=I1(),u0=l(),MF1=o2(),vk=F2(),TF1=kZ(),jF1=pQ(),hk=q6(),BD=k0(),kF1=B7(),mk=w7(),zE=o0(),H9=a();ck.CURSOR_FLAGS=["tailable","oplogReplay","noCursorTimeout","awaitData","exhaust","partial"];ck.CursorTimeoutMode=Object.freeze({ITERATION:"iteration",LIFETIME:"cursorLifetime"});class DD extends MF1.TypedEventEmitter{constructor(F,A,B={}){super();if(this.documents=null,this.hasEmittedClose=!1,!F.s.isMongoClient)throw new u0.MongoRuntimeError("Cursor must be constructed with MongoClient");if(this.cursorClient=F,this.cursorNamespace=A,this.cursorId=null,this.initialized=!1,this.isClosed=!1,this.isKilled=!1,this.cursorOptions={readPreference:B.readPreference&&B.readPreference instanceof BD.ReadPreference?B.readPreference:BD.ReadPreference.primary,...m7.pluckBSONSerializeOptions(B),timeoutMS:B?.timeoutContext?.csotEnabled()?B.timeoutContext.timeoutMS:B.timeoutMS,tailable:B.tailable,awaitData:B.awaitData},this.cursorOptions.timeoutMS!=null)if(B.timeoutMode==null)if(B.tailable){if(B.awaitData){if(B.maxAwaitTimeMS!=null&&B.maxAwaitTimeMS>=this.cursorOptions.timeoutMS)throw new u0.MongoInvalidArgumentError("Cannot specify maxAwaitTimeMS >= timeoutMS for a tailable awaitData cursor")}this.cursorOptions.timeoutMode=ck.CursorTimeoutMode.ITERATION}else this.cursorOptions.timeoutMode=ck.CursorTimeoutMode.LIFETIME;else{if(B.tailable&&B.timeoutMode===ck.CursorTimeoutMode.LIFETIME)throw new u0.MongoInvalidArgumentError("Cannot set tailable cursor's timeoutMode to LIFETIME");this.cursorOptions.timeoutMode=B.timeoutMode}else if(B.timeoutMode!=null)throw new u0.MongoInvalidArgumentError("Cannot set timeoutMode without setting timeoutMS");this.cursorOptions.omitMaxTimeMS=this.cursorOptions.timeoutMS!=null&&(this.cursorOptions.timeoutMode===ck.CursorTimeoutMode.ITERATION&&!this.cursorOptions.tailable||this.cursorOptions.tailable&&!this.cursorOptions.awaitData);let D=hk.ReadConcern.fromOptions(B);if(D)this.cursorOptions.readConcern=D;if(typeof B.batchSize==="number")this.cursorOptions.batchSize=B.batchSize;if(B.comment!==void 0)this.cursorOptions.comment=B.comment;if(typeof B.maxTimeMS==="number")this.cursorOptions.maxTimeMS=B.maxTimeMS;if(typeof B.maxAwaitTimeMS==="number")this.cursorOptions.maxAwaitTimeMS=B.maxAwaitTimeMS;if(B.session instanceof mk.ClientSession)this.cursorSession=B.session;else this.cursorSession=this.cursorClient.startSession({owner:this,explicit:!1});this.deserializationOptions={...this.cursorOptions,validation:{utf8:B?.enableUtf8Validation===!1?!1:!0}},this.timeoutContext=B.timeoutContext}get id(){return this.cursorId??void 0}get isDead(){return(this.cursorId?.isZero()??!1)||this.isClosed||this.isKilled}get client(){return this.cursorClient}get server(){return this.selectedServer}get namespace(){return this.cursorNamespace}get readPreference(){return this.cursorOptions.readPreference}get readConcern(){return this.cursorOptions.readConcern}get session(){return this.cursorSession}set session(F){this.cursorSession=F}get closed(){return this.isClosed&&(this.documents?.length??0)===0}get killed(){return this.isKilled}get loadBalanced(){return!!this.cursorClient.topology?.loadBalanced}async asyncDispose(){await this.close()}bufferedCount(){return this.documents?.length??0}readBufferedDocuments(F){let A=[],B=Math.min(F??this.documents?.length??0,this.documents?.length??0);for(let D=0;D<B;D++){let J=this.documents?.shift(this.deserializationOptions);if(J!=null)A.push(J)}return A}async*[Symbol.asyncIterator](){if(this.closed)return;try{while(!0){if(this.isKilled)return;if(this.closed)return;if(this.cursorId!=null&&this.isDead&&(this.documents?.length??0)===0)return;let F=await this.next();if(F===null)return;yield F}}finally{if(!this.isClosed)try{await this.close()}catch(F){H9.squashError(F)}}}stream(F){if(F?.transform){let A=F.transform,B=new CE(this),D=B.pipe(new dk.Transform({objectMode:!0,highWaterMark:1,transform(J,X,Z){try{let Y=A(J);Z(void 0,Y)}catch(Y){Z(Y)}}}));return B.on("error",(J)=>D.emit("error",J)),D}return new CE(this)}async hasNext(){if(this.cursorId===m7.Long.ZERO)return!1;if(this.cursorOptions.timeoutMode===ck.CursorTimeoutMode.ITERATION&&this.cursorId!=null)this.timeoutContext?.refresh();try{do{if((this.documents?.length??0)!==0)return!0;await this.fetchBatch()}while(!this.isDead||(this.documents?.length??0)!==0)}finally{if(this.cursorOptions.timeoutMode===ck.CursorTimeoutMode.ITERATION)this.timeoutContext?.clear()}return!1}async next(){if(this.cursorId===m7.Long.ZERO)throw new u0.MongoCursorExhaustedError;if(this.cursorOptions.timeoutMode===ck.CursorTimeoutMode.ITERATION&&this.cursorId!=null)this.timeoutContext?.refresh();try{do{let F=this.documents?.shift(this.deserializationOptions);if(F!=null){if(this.transform!=null)return await this.transformDocument(F);return F}await this.fetchBatch()}while(!this.isDead||(this.documents?.length??0)!==0)}finally{if(this.cursorOptions.timeoutMode===ck.CursorTimeoutMode.ITERATION)this.timeoutContext?.clear()}return null}async tryNext(){if(this.cursorId===m7.Long.ZERO)throw new u0.MongoCursorExhaustedError;if(this.cursorOptions.timeoutMode===ck.CursorTimeoutMode.ITERATION&&this.cursorId!=null)this.timeoutContext?.refresh();try{let F=this.documents?.shift(this.deserializationOptions);if(F!=null){if(this.transform!=null)return await this.transformDocument(F);return F}if(await this.fetchBatch(),F=this.documents?.shift(this.deserializationOptions),F!=null){if(this.transform!=null)return await this.transformDocument(F);return F}}finally{if(this.cursorOptions.timeoutMode===ck.CursorTimeoutMode.ITERATION)this.timeoutContext?.clear()}return null}async forEach(F){if(typeof F!=="function")throw new u0.MongoInvalidArgumentError('Argument "iterator" must be a function');for await(let A of this)if(F(A)===!1)break}async close(F){await this.cleanup(F?.timeoutMS)}async toArray(){let F=[];for await(let A of this){F.push(A);let B=this.readBufferedDocuments();if(this.transform!=null)for(let D of B)F.push(await this.transformDocument(D));else F.push(...B)}return F}addCursorFlag(F,A){if(this.throwIfInitialized(),!ck.CURSOR_FLAGS.includes(F))throw new u0.MongoInvalidArgumentError(`Flag ${F} is not one of ${ck.CURSOR_FLAGS}`);if(typeof A!=="boolean")throw new u0.MongoInvalidArgumentError(`Flag ${F} must be a boolean value`);return this.cursorOptions[F]=A,this}map(F){this.throwIfInitialized();let A=this.transform;if(A)this.transform=(B)=>{return F(A(B))};else this.transform=F;return this}withReadPreference(F){if(this.throwIfInitialized(),F instanceof BD.ReadPreference)this.cursorOptions.readPreference=F;else if(typeof F==="string")this.cursorOptions.readPreference=BD.ReadPreference.fromString(F);else throw new u0.MongoInvalidArgumentError(`Invalid read preference: ${F}`);return this}withReadConcern(F){this.throwIfInitialized();let A=hk.ReadConcern.fromOptions({readConcern:F});if(A)this.cursorOptions.readConcern=A;return this}maxTimeMS(F){if(this.throwIfInitialized(),typeof F!=="number")throw new u0.MongoInvalidArgumentError("Argument for maxTimeMS must be a number");return this.cursorOptions.maxTimeMS=F,this}batchSize(F){if(this.throwIfInitialized(),this.cursorOptions.tailable)throw new u0.MongoTailableCursorError("Tailable cursor does not support batchSize");if(typeof F!=="number")throw new u0.MongoInvalidArgumentError('Operation "batchSize" requires an integer');return this.cursorOptions.batchSize=F,this}rewind(){if(this.timeoutContext&&this.timeoutContext.owner!==this)throw new u0.MongoAPIError("Cannot rewind cursor that does not own its timeout context.");if(!this.initialized)return;this.cursorId=null,this.documents?.clear(),this.timeoutContext?.clear(),this.timeoutContext=void 0,this.isClosed=!1,this.isKilled=!1,this.initialized=!1;let F=this.cursorSession;if(F){if(F.explicit===!1){if(!F.hasEnded)F.endSession().then(void 0,H9.squashError);this.cursorSession=this.cursorClient.startSession({owner:this,explicit:!1})}}}async getMore(F){if(this.cursorId==null)throw new u0.MongoRuntimeError("Unexpected null cursor id. A cursor creating command should have set this");if(this.selectedServer==null)throw new u0.MongoRuntimeError("Unexpected null selectedServer. A cursor creating command should have set this");let A={...this.cursorOptions,session:this.cursorSession,batchSize:F},B=new TF1.GetMoreOperation(this.cursorNamespace,this.cursorId,this.selectedServer,A);return await vk.executeOperation(this.cursorClient,B,this.timeoutContext)}async cursorInit(){if(this.cursorOptions.timeoutMS!=null)this.timeoutContext??=new r5(zE.TimeoutContext.create({serverSelectionTimeoutMS:this.client.s.options.serverSelectionTimeoutMS,timeoutMS:this.cursorOptions.timeoutMS}),this);try{let F=await this._initialize(this.cursorSession);this.cursorOptions.omitMaxTimeMS=this.cursorOptions.timeoutMS!=null;let A=F.response;this.selectedServer=F.server,this.cursorId=A.id,this.cursorNamespace=A.ns??this.namespace,this.documents=A,this.initialized=!0}catch(F){throw this.initialized=!0,await this.cleanup(void 0,F),F}if(this.isDead)await this.cleanup();return}async fetchBatch(){if(this.isClosed)return;if(this.isDead){await this.cleanup();return}if(this.cursorId==null){if(await this.cursorInit(),(this.documents?.length??0)!==0||this.isDead)return}let F=this.cursorOptions.batchSize||1000;try{let A=await this.getMore(F);this.cursorId=A.id,this.documents=A}catch(A){try{await this.cleanup(void 0,A)}catch(B){H9.squashError(B)}throw A}if(this.isDead)await this.cleanup()}async cleanup(F,A){this.isClosed=!0;let B=this.cursorSession,D=()=>{if(F!=null)return this.timeoutContext?.clear(),new r5(zE.TimeoutContext.create({serverSelectionTimeoutMS:this.client.s.options.serverSelectionTimeoutMS,timeoutMS:F}),this);else return this.timeoutContext?.refreshed()};try{if(!this.isKilled&&this.cursorId&&!this.cursorId.isZero()&&this.cursorNamespace&&this.selectedServer&&!B.hasEnded){this.isKilled=!0;let J=this.cursorId;this.cursorId=m7.Long.ZERO,await vk.executeOperation(this.cursorClient,new jF1.KillCursorsOperation(J,this.cursorNamespace,this.selectedServer,{session:B}),D())}}catch(J){H9.squashError(J)}finally{if(B?.owner===this)await B.endSession({error:A});if(!B?.inTransaction())mk.maybeClearPinnedConnection(B,{error:A});this.emitClose()}}emitClose(){try{if(!this.hasEmittedClose&&((this.documents?.length??0)===0||this.isClosed))this.emit("close")}finally{this.hasEmittedClose=!0}}async transformDocument(F){if(this.transform==null)return F;try{let A=this.transform(F);if(A===null)throw new u0.MongoAPIError("Cursor returned a `null` document, but the cursor is not exhausted. Mapping documents to `null` is not supported in the cursor transform.");return A}catch(A){try{await this.close()}catch(B){H9.squashError(B)}throw A}}throwIfInitialized(){if(this.initialized)throw new u0.MongoCursorInUseError}}ck.AbstractCursor=DD;DD.CLOSE="close";class CE extends dk.Readable{constructor(F){super({objectMode:!0,autoDestroy:!1,highWaterMark:1});this._readInProgress=!1,this._cursor=F}_read(F){if(!this._readInProgress)this._readInProgress=!0,this._readNext()}_destroy(F,A){this._cursor.close().then(()=>A(F),(B)=>A(B))}_readNext(){if(this._cursor.id===m7.Long.ZERO){this.push(null);return}this._cursor.next().then((F)=>{if(F==null)this.push(null);else if(this.destroyed)this._cursor.close().then(void 0,H9.squashError);else{if(this.push(F))return this._readNext();this._readInProgress=!1}},(F)=>{if(F.message.match(/server is closed/))return this._cursor.close().then(void 0,H9.squashError),this.push(null);if(F.message.match(/operation was interrupted/))return this.push(null);return this.destroy(F)})}}kF1.configureResourceManagement(DD.prototype);class r5 extends zE.TimeoutContext{constructor(F,A){super();this.timeoutContext=F,this.owner=A}get serverSelectionTimeout(){return this.timeoutContext.serverSelectionTimeout}get connectionCheckoutTimeout(){return this.timeoutContext.connectionCheckoutTimeout}get clearServerSelectionTimeout(){return this.timeoutContext.clearServerSelectionTimeout}get timeoutForSocketWrite(){return this.timeoutContext.timeoutForSocketWrite}get timeoutForSocketRead(){return this.timeoutContext.timeoutForSocketRead}csotEnabled(){return this.timeoutContext.csotEnabled()}refresh(){if(typeof this.owner!=="symbol")return this.timeoutContext.refresh()}clear(){if(typeof this.owner!=="symbol")return this.timeoutContext.clear()}get maxTimeMS(){return this.timeoutContext.maxTimeMS}get timeoutMS(){return this.timeoutContext.csotEnabled()?this.timeoutContext.timeoutMS:null}refreshed(){return new r5(this.timeoutContext.refreshed(),this.owner)}addMaxTimeMSToCommand(F,A){this.timeoutContext.addMaxTimeMSToCommand(F,A)}getSocketTimeoutMS(){return this.timeoutContext.getSocketTimeoutMS()}}ck.CursorTimeoutContext=r5});var o4=K((ik)=>{Object.defineProperty(ik,"__esModule",{value:!0});ik.ExplainableCursor=ik.Explain=ik.ExplainVerbosity=void 0;ik.validateExplainTimeoutOptions=xF1;ik.decorateWithExplain=fF1;var SF1=B2(),uF1=l();ik.ExplainVerbosity=Object.freeze({queryPlanner:"queryPlanner",queryPlannerExtended:"queryPlannerExtended",executionStats:"executionStats",allPlansExecution:"allPlansExecution"});class JD{constructor(F,A){if(typeof F==="boolean")this.verbosity=F?ik.ExplainVerbosity.allPlansExecution:ik.ExplainVerbosity.queryPlanner;else this.verbosity=F;this.maxTimeMS=A}static fromOptions({explain:F}={}){if(F==null)return;if(typeof F==="boolean"||typeof F==="string")return new JD(F);let{verbosity:A,maxTimeMS:B}=F;return new JD(A,B)}}ik.Explain=JD;function xF1(F,A){let{maxTimeMS:B,timeoutMS:D}=F;if(D!=null&&(B!=null||A?.maxTimeMS!=null))throw new uF1.MongoAPIError("Cannot use maxTimeMS with timeoutMS for explain commands.")}function fF1(F,A){let{verbosity:B,maxTimeMS:D}=A,J={explain:F,verbosity:B};if(typeof D==="number")J.maxTimeMS=D;return J}class pk extends SF1.AbstractCursor{resolveExplainTimeoutOptions(F,A){let B,D;if(F==null&&A==null)B=void 0,D=void 0;else if(F!=null&&A==null)B=typeof F!=="object"?F:("verbosity"in F)?F:void 0,D=typeof F==="object"&&"timeoutMS"in F?F:void 0;else B=F,D=A;return{timeout:D,explain:B}}}ik.ExplainableCursor=pk});var $0=K((rk)=>{Object.defineProperty(rk,"__esModule",{value:!0});rk.CommandOperation=void 0;var yF1=l(),QE=o4(),vF1=q6(),hF1=c8(),XD=a(),sk=t0(),d7=O1();class ak extends d7.AbstractOperation{constructor(F,A){super(A);this.options=A??{};let B=A?.dbName||A?.authdb;if(B)this.ns=new XD.MongoDBNamespace(B,"$cmd");else this.ns=F?F.s.namespace.withCollection("$cmd"):new XD.MongoDBNamespace("admin","$cmd");if(this.readConcern=vF1.ReadConcern.fromOptions(A),this.writeConcern=sk.WriteConcern.fromOptions(A),this.hasAspect(d7.Aspect.EXPLAINABLE)){if(this.explain=QE.Explain.fromOptions(A),this.explain)QE.validateExplainTimeoutOptions(this.options,this.explain)}else if(A?.explain!=null)throw new yF1.MongoInvalidArgumentError('Option "explain" is not supported on this command')}get canRetryWrite(){if(this.hasAspect(d7.Aspect.EXPLAINABLE))return this.explain==null;return super.canRetryWrite}async executeCommand(F,A,B,D,J){this.server=F;let X={...this.options,...this.bsonOptions,timeoutContext:D,readPreference:this.readPreference,session:A},Z=XD.maxWireVersion(F),Y=this.session&&this.session.inTransaction();if(this.readConcern&&XD.commandSupportsReadConcern(B)&&!Y)Object.assign(B,{readConcern:this.readConcern});if(this.trySecondaryWrite&&Z<hF1.MIN_SECONDARY_WRITE_WIRE_VERSION)X.omitReadPreference=!0;if(this.writeConcern&&this.hasAspect(d7.Aspect.WRITE_OPERATION)&&!Y)sk.WriteConcern.apply(B,this.writeConcern);if(X.collation&&typeof X.collation==="object"&&!this.hasAspect(d7.Aspect.SKIP_COLLATION))Object.assign(B,{collation:X.collation});if(typeof X.maxTimeMS==="number")B.maxTimeMS=X.maxTimeMS;if(this.hasAspect(d7.Aspect.EXPLAINABLE)&&this.explain)B=QE.decorateWithExplain(B,this.explain);return await F.command(this.ns,B,X,J)}}rk.CommandOperation=ak});var AO=K((ek)=>{Object.defineProperty(ek,"__esModule",{value:!0});ek.ListDatabasesOperation=void 0;var ok=a(),mF1=$0(),LE=O1();class VE extends mF1.CommandOperation{constructor(F,A){super(F,A);this.options=A??{},this.ns=new ok.MongoDBNamespace("admin","$cmd")}get commandName(){return"listDatabases"}async execute(F,A,B){let D={listDatabases:1};if(typeof this.options.nameOnly==="boolean")D.nameOnly=this.options.nameOnly;if(this.options.filter)D.filter=this.options.filter;if(typeof this.options.authorizedDatabases==="boolean")D.authorizedDatabases=this.options.authorizedDatabases;if(ok.maxWireVersion(F)>=9&&this.options.comment!==void 0)D.comment=this.options.comment;return await super.executeCommand(F,A,D,B)}}ek.ListDatabasesOperation=VE;LE.defineAspects(VE,[LE.Aspect.READ_OPERATION,LE.Aspect.RETRYABLE])});var XO=K((DO)=>{Object.defineProperty(DO,"__esModule",{value:!0});DO.ValidateCollectionOperation=void 0;var RE=l(),dF1=$0();class BO extends dF1.CommandOperation{constructor(F,A,B){let D={validate:A},J=Object.keys(B);for(let X=0;X<J.length;X++)if(Object.prototype.hasOwnProperty.call(B,J[X])&&J[X]!=="session")D[J[X]]=B[J[X]];super(F.s.db,B);this.options=B,this.command=D,this.collectionName=A}get commandName(){return"validate"}async execute(F,A,B){let D=this.collectionName,J=await super.executeCommand(F,A,this.command,B);if(J.result!=null&&typeof J.result!=="string")throw new RE.MongoUnexpectedServerResponseError("Error with validation data");if(J.result!=null&&J.result.match(/exception|corrupt/)!=null)throw new RE.MongoUnexpectedServerResponseError(`Invalid collection ${D}`);if(J.valid!=null&&!J.valid)throw new RE.MongoUnexpectedServerResponseError(`Invalid collection ${D}`);return J}}DO.ValidateCollectionOperation=BO});var cY=K((YO)=>{Object.defineProperty(YO,"__esModule",{value:!0});YO.Admin=void 0;var cF1=I1(),ZD=F2(),lF1=AO(),pF1=hY(),iF1=o9(),nF1=XO();class ZO{constructor(F){this.s={db:F}}async command(F,A){return await ZD.executeOperation(this.s.db.client,new iF1.RunAdminCommandOperation(F,{...cF1.resolveBSONOptions(A),session:A?.session,readPreference:A?.readPreference,timeoutMS:A?.timeoutMS??this.s.db.timeoutMS}))}async buildInfo(F){return await this.command({buildinfo:1},F)}async serverInfo(F){return await this.command({buildinfo:1},F)}async serverStatus(F){return await this.command({serverStatus:1},F)}async ping(F){return await this.command({ping:1},F)}async removeUser(F,A){return await ZD.executeOperation(this.s.db.client,new pF1.RemoveUserOperation(this.s.db,F,{dbName:"admin",...A}))}async validateCollection(F,A={}){return await ZD.executeOperation(this.s.db.client,new nF1.ValidateCollectionOperation(this,F,A))}async listDatabases(F){return await ZD.executeOperation(this.s.db.client,new lF1.ListDatabasesOperation(this.s.db,{timeoutMS:this.s.db.timeoutMS,...F}))}async replSetGetStatus(F){return await this.command({replSetGetStatus:1},F)}}YO.Admin=ZO});var wE=K((EO)=>{Object.defineProperty(EO,"__esModule",{value:!0});EO.GridFSBucketReadStream=void 0;var sF1=import.meta.require("stream"),aF1=B2(),A6=l(),rF1=o0();class YD extends sF1.Readable{constructor(F,A,B,D,J){super({emitClose:!0});this.s={bytesToTrim:0,bytesToSkip:0,bytesRead:0,chunks:F,expected:0,files:A,filter:D,init:!1,expectedEnd:0,options:{start:0,end:0,...J},readPreference:B,timeoutContext:J?.timeoutMS!=null?new rF1.CSOTTimeoutContext({timeoutMS:J.timeoutMS,serverSelectionTimeoutMS:0}):void 0}}_read(){if(this.destroyed)return;eF1(this,()=>tF1(this))}start(F=0){return GO(this),this.s.options.start=F,this}end(F=0){return GO(this),this.s.options.end=F,this}async abort(){this.push(null),this.destroy();let F=this.s.timeoutContext?.getRemainingTimeMSOrThrow();await this.s.cursor?.close({timeoutMS:F})}}EO.GridFSBucketReadStream=YD;YD.FILE="file";function GO(F){if(F.s.init)throw new A6.MongoGridFSStreamError("Options cannot be changed after the stream is initialized")}function tF1(F){if(F.destroyed)return;if(!F.s.cursor)return;if(!F.s.file)return;let A=(B)=>{if(F.destroyed)return;if(!B){F.push(null),F.s.cursor?.close().then(void 0,(H)=>F.destroy(H));return}if(!F.s.file)return;let D=F.s.file.length-F.s.bytesRead,J=F.s.expected++,X=Math.min(F.s.file.chunkSize,D);if(B.n>J)return F.destroy(new A6.MongoGridFSChunkError(`ChunkIsMissing: Got unexpected n: ${B.n}, expected: ${J}`));if(B.n<J)return F.destroy(new A6.MongoGridFSChunkError(`ExtraChunk: Got unexpected n: ${B.n}, expected: ${J}`));let Z=Buffer.isBuffer(B.data)?B.data:B.data.buffer;if(Z.byteLength!==X){if(D<=0)return F.destroy(new A6.MongoGridFSChunkError(`ExtraChunk: Got unexpected n: ${B.n}, expected file length ${F.s.file.length} bytes but already read ${F.s.bytesRead} bytes`));return F.destroy(new A6.MongoGridFSChunkError(`ChunkIsWrongSize: Got unexpected length: ${Z.byteLength}, expected: ${X}`))}if(F.s.bytesRead+=Z.byteLength,Z.byteLength===0)return F.push(null);let Y=null,$=null;if(F.s.bytesToSkip!=null)Y=F.s.bytesToSkip,F.s.bytesToSkip=0;let G=J===F.s.expectedEnd-1,E=F.s.options.end-F.s.bytesToSkip;if(G&&F.s.bytesToTrim!=null)$=F.s.file.chunkSize-F.s.bytesToTrim;else if(F.s.options.end&&E<B.data.byteLength)$=E;if(Y!=null||$!=null)Z=Z.slice(Y||0,$||Z.byteLength);F.push(Z);return};F.s.cursor.next().then(A,(B)=>{if(F.destroyed)return;F.destroy(B)})}function oF1(F){let A={};if(F.s.readPreference)A.readPreference=F.s.readPreference;if(F.s.options&&F.s.options.sort)A.sort=F.s.options.sort;if(F.s.options&&F.s.options.skip)A.skip=F.s.options.skip;let B=(J)=>{if(F.destroyed)return;if(!J){let $=`FileNotFound: file ${F.s.filter._id?F.s.filter._id.toString():F.s.filter.filename} was not found`,G=new A6.MongoRuntimeError($);return G.code="ENOENT",F.destroy(G)}if(J.length<=0){F.push(null);return}if(F.destroyed){F.destroy();return}try{F.s.bytesToSkip=FA1(F,J,F.s.options)}catch(Y){return F.destroy(Y)}let X={files_id:J._id};if(F.s.options&&F.s.options.start!=null){let Y=Math.floor(F.s.options.start/J.chunkSize);if(Y>0)X.n={$gte:Y}}let Z;try{Z=F.s.timeoutContext?.getRemainingTimeMSOrThrow(`Download timed out after ${F.s.timeoutContext?.timeoutMS}ms`)}catch(Y){return F.destroy(Y)}if(F.s.cursor=F.s.chunks.find(X,{timeoutMode:F.s.options.timeoutMS!=null?aF1.CursorTimeoutMode.LIFETIME:void 0,timeoutMS:Z}).sort({n:1}),F.s.readPreference)F.s.cursor.withReadPreference(F.s.readPreference);F.s.expectedEnd=Math.ceil(J.length/J.chunkSize),F.s.file=J;try{F.s.bytesToTrim=AA1(F,J,F.s.cursor,F.s.options)}catch(Y){return F.destroy(Y)}F.emit(YD.FILE,J);return},D;try{D=F.s.timeoutContext?.getRemainingTimeMSOrThrow(`Download timed out after ${F.s.timeoutContext?.timeoutMS}ms`)}catch(J){if(!F.destroyed)F.destroy(J);return}A.timeoutMS=D,F.s.files.findOne(F.s.filter,A).then(B,(J)=>{if(F.destroyed)return;F.destroy(J)})}function eF1(F,A){if(F.s.file)return A();if(!F.s.init)oF1(F),F.s.init=!0;F.once("file",()=>{A()})}function FA1(F,A,B){if(B&&B.start!=null){if(B.start>A.length)throw new A6.MongoInvalidArgumentError(`Stream start (${B.start}) must not be more than the length of the file (${A.length})`);if(B.start<0)throw new A6.MongoInvalidArgumentError(`Stream start (${B.start}) must not be negative`);if(B.end!=null&&B.end<B.start)throw new A6.MongoInvalidArgumentError(`Stream start (${B.start}) must not be greater than stream end (${B.end})`);return F.s.bytesRead=Math.floor(B.start/A.chunkSize)*A.chunkSize,F.s.expected=Math.floor(B.start/A.chunkSize),B.start-F.s.bytesRead}throw new A6.MongoInvalidArgumentError("Start option must be defined")}function AA1(F,A,B,D){if(D&&D.end!=null){if(D.end>A.length)throw new A6.MongoInvalidArgumentError(`Stream end (${D.end}) must not be more than the length of the file (${A.length})`);if(D.start==null||D.start<0)throw new A6.MongoInvalidArgumentError(`Stream end (${D.end}) must not be negative`);let J=D.start!=null?Math.floor(D.start/A.chunkSize):0;return B.limit(Math.ceil(D.end/A.chunkSize)-J),F.s.expectedEnd=Math.ceil(D.end/A.chunkSize),Math.ceil(D.end/A.chunkSize)*A.chunkSize-D.end}throw new A6.MongoInvalidArgumentError("End option must be defined")}});var NE=K((UO)=>{Object.defineProperty(UO,"__esModule",{value:!0});UO.GridFSBucketWriteStream=void 0;var BA1=import.meta.require("stream"),WO=I1(),zO=B2(),i6=l(),DA1=o0(),qO=a(),JA1=t0();class CO extends BA1.Writable{constructor(F,A,B){super();if(this.gridFSFile=null,B=B??{},this.bucket=F,this.chunks=F.s._chunksCollection,this.filename=A,this.files=F.s._filesCollection,this.options=B,this.writeConcern=JA1.WriteConcern.fromOptions(B)||F.s.options.writeConcern,this.done=!1,this.id=B.id?B.id:new WO.ObjectId,this.chunkSizeBytes=B.chunkSizeBytes||this.bucket.s.options.chunkSizeBytes,this.bufToStore=Buffer.alloc(this.chunkSizeBytes),this.length=0,this.n=0,this.pos=0,this.state={streamEnd:!1,outstandingRequests:0,errored:!1,aborted:!1},B.timeoutMS!=null)this.timeoutContext=new DA1.CSOTTimeoutContext({timeoutMS:B.timeoutMS,serverSelectionTimeoutMS:qO.resolveTimeoutOptions(this.bucket.s.db.client,{}).serverSelectionTimeoutMS})}_construct(F){if(!this.bucket.s.calledOpenUploadStream)this.bucket.s.calledOpenUploadStream=!0,ZA1(this).then(()=>{this.bucket.s.checkedIndexes=!0,this.bucket.emit("index"),F()},(A)=>{if(A instanceof i6.MongoOperationTimeoutError)return q9(this,A,F);qO.squashError(A),F()});else return process.nextTick(F)}_write(F,A,B){$A1(this,F,A,B)}_final(F){if(this.state.streamEnd)return process.nextTick(F);this.state.streamEnd=!0,GA1(this,F)}async abort(){if(this.state.streamEnd)throw new i6.MongoAPIError("Cannot abort a stream that has already completed");if(this.state.aborted)throw new i6.MongoAPIError("Cannot call abort() on a stream twice");this.state.aborted=!0;let F=this.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${this.timeoutContext?.timeoutMS}ms`);await this.chunks.deleteMany({files_id:this.id},{timeoutMS:F})}}UO.GridFSBucketWriteStream=CO;function q9(F,A,B){if(F.state.errored){process.nextTick(B);return}F.state.errored=!0,process.nextTick(B,A)}function KO(F,A,B){return{_id:new WO.ObjectId,files_id:F,n:A,data:B}}async function XA1(F){let A={files_id:1,n:1},B;B=F.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${F.timeoutContext?.timeoutMS}ms`);let D;try{D=await F.chunks.listIndexes({timeoutMode:B!=null?zO.CursorTimeoutMode.LIFETIME:void 0,timeoutMS:B}).toArray()}catch(X){if(X instanceof i6.MongoError&&X.code===i6.MONGODB_ERROR_CODES.NamespaceNotFound)D=[];else throw X}if(!D.find((X)=>{if(Object.keys(X.key).length===2&&X.key.files_id===1&&X.key.n===1)return!0;return!1}))B=F.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${F.timeoutContext?.timeoutMS}ms`),await F.chunks.createIndex(A,{...F.writeConcern,background:!0,unique:!0,timeoutMS:B})}function IE(F,A){if(F.done)return process.nextTick(A);if(F.state.streamEnd&&F.state.outstandingRequests===0&&!F.state.errored){F.done=!0;let B=YA1(F.id,F.length,F.chunkSizeBytes,F.filename,F.options.contentType,F.options.aliases,F.options.metadata);if($D(F,A))return;let D=F.timeoutContext?.remainingTimeMS;if(D!=null&&D<=0)return q9(F,new i6.MongoOperationTimeoutError(`Upload timed out after ${F.timeoutContext?.timeoutMS}ms`),A);F.files.insertOne(B,{writeConcern:F.writeConcern,timeoutMS:D}).then(()=>{F.gridFSFile=B,A()},(J)=>{return q9(F,J,A)});return}process.nextTick(A)}async function ZA1(F){let A=F.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${F.timeoutContext?.timeoutMS}ms`);if(await F.files.findOne({},{projection:{_id:1},timeoutMS:A})!=null)return;let D={filename:1,uploadDate:1},J;A=F.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${F.timeoutContext?.timeoutMS}ms`);let X={timeoutMode:A!=null?zO.CursorTimeoutMode.LIFETIME:void 0,timeoutMS:A};try{J=await F.files.listIndexes(X).toArray()}catch(Y){if(Y instanceof i6.MongoError&&Y.code===i6.MONGODB_ERROR_CODES.NamespaceNotFound)J=[];else throw Y}if(!J.find((Y)=>{if(Object.keys(Y.key).length===2&&Y.key.filename===1&&Y.key.uploadDate===1)return!0;return!1}))A=F.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${F.timeoutContext?.timeoutMS}ms`),await F.files.createIndex(D,{background:!1,timeoutMS:A});await XA1(F)}function YA1(F,A,B,D,J,X,Z){let Y={_id:F,length:A,chunkSize:B,uploadDate:new Date,filename:D};if(J)Y.contentType=J;if(X)Y.aliases=X;if(Z)Y.metadata=Z;return Y}function $A1(F,A,B,D){if($D(F,D))return;let J=Buffer.isBuffer(A)?A:Buffer.from(A,B);if(F.length+=J.length,F.pos+J.length<F.chunkSizeBytes){J.copy(F.bufToStore,F.pos),F.pos+=J.length,process.nextTick(D);return}let X=J.length,Z=F.chunkSizeBytes-F.pos,Y=Math.min(Z,J.length),$=0;while(X>0){let G=J.length-X;J.copy(F.bufToStore,F.pos,G,G+Y),F.pos+=Y,Z-=Y;let E;if(Z===0){E=KO(F.id,F.n,Buffer.from(F.bufToStore));let H=F.timeoutContext?.remainingTimeMS;if(H!=null&&H<=0)return q9(F,new i6.MongoOperationTimeoutError(`Upload timed out after ${F.timeoutContext?.timeoutMS}ms`),D);if(++F.state.outstandingRequests,++$,$D(F,D))return;F.chunks.insertOne(E,{writeConcern:F.writeConcern,timeoutMS:H}).then(()=>{if(--F.state.outstandingRequests,--$,!$)IE(F,D)},(q)=>{return q9(F,q,D)}),Z=F.chunkSizeBytes,F.pos=0,++F.n}X-=Y,Y=Math.min(Z,X)}}function GA1(F,A){if(F.pos===0)return IE(F,A);let B=Buffer.alloc(F.pos);F.bufToStore.copy(B,0,0,F.pos);let D=KO(F.id,F.n,B);if($D(F,A))return;let J=F.timeoutContext?.remainingTimeMS;if(J!=null&&J<=0)return q9(F,new i6.MongoOperationTimeoutError(`Upload timed out after ${F.timeoutContext?.timeoutMS}ms`),A);++F.state.outstandingRequests,F.chunks.insertOne(D,{writeConcern:F.writeConcern,timeoutMS:J}).then(()=>{--F.state.outstandingRequests,IE(F,A)},(X)=>{return q9(F,X,A)})}function $D(F,A){if(F.state.aborted)return process.nextTick(A,new i6.MongoAPIError("Stream has been aborted")),!0;return!1}});var NO=K((wO)=>{Object.defineProperty(wO,"__esModule",{value:!0});wO.GridFSBucket=void 0;var PE=l(),EA1=o2(),LO=o0(),ME=a(),HA1=t0(),VO=wE(),RO=NE(),qA1={bucketName:"fs",chunkSizeBytes:261120};class TE extends EA1.TypedEventEmitter{constructor(F,A){super();this.setMaxListeners(0);let B=ME.resolveOptions(F,{...qA1,...A,writeConcern:HA1.WriteConcern.fromOptions(A)});this.s={db:F,options:B,_chunksCollection:F.collection(B.bucketName+".chunks"),_filesCollection:F.collection(B.bucketName+".files"),checkedIndexes:!1,calledOpenUploadStream:!1}}openUploadStream(F,A){return new RO.GridFSBucketWriteStream(this,F,{timeoutMS:this.s.options.timeoutMS,...A})}openUploadStreamWithId(F,A,B){return new RO.GridFSBucketWriteStream(this,A,{timeoutMS:this.s.options.timeoutMS,...B,id:F})}openDownloadStream(F,A){return new VO.GridFSBucketReadStream(this.s._chunksCollection,this.s._filesCollection,this.s.options.readPreference,{_id:F},{timeoutMS:this.s.options.timeoutMS,...A})}async delete(F,A){let{timeoutMS:B}=ME.resolveOptions(this.s.db,A),D=void 0;if(B)D=new LO.CSOTTimeoutContext({timeoutMS:B,serverSelectionTimeoutMS:this.s.db.client.s.options.serverSelectionTimeoutMS});let{deletedCount:J}=await this.s._filesCollection.deleteOne({_id:F},{timeoutMS:D?.remainingTimeMS}),X=D?.remainingTimeMS;if(X!=null&&X<=0)throw new PE.MongoOperationTimeoutError(`Timed out after ${B}ms`);if(await this.s._chunksCollection.deleteMany({files_id:F},{timeoutMS:X}),J===0)throw new PE.MongoRuntimeError(`File not found for id ${F}`)}find(F={},A={}){return this.s._filesCollection.find(F,A)}openDownloadStreamByName(F,A){let B={uploadDate:-1},D=void 0;if(A&&A.revision!=null)if(A.revision>=0)B={uploadDate:1},D=A.revision;else D=-A.revision-1;return new VO.GridFSBucketReadStream(this.s._chunksCollection,this.s._filesCollection,this.s.options.readPreference,{filename:F},{timeoutMS:this.s.options.timeoutMS,...A,sort:B,skip:D})}async rename(F,A,B){let D={_id:F},J={$set:{filename:A}},{matchedCount:X}=await this.s._filesCollection.updateOne(D,J,B);if(X===0)throw new PE.MongoRuntimeError(`File with id ${F} not found`)}async drop(F){let{timeoutMS:A}=ME.resolveOptions(this.s.db,F),B=void 0;if(A)B=new LO.CSOTTimeoutContext({timeoutMS:A,serverSelectionTimeoutMS:this.s.db.client.s.options.serverSelectionTimeoutMS});if(B){await this.s._filesCollection.drop({timeoutMS:B.remainingTimeMS});let D=B.getRemainingTimeMSOrThrow(`Timed out after ${A}ms`);await this.s._chunksCollection.drop({timeoutMS:D})}else await this.s._filesCollection.drop(),await this.s._chunksCollection.drop()}}wO.GridFSBucket=TE;TE.INDEX="index"});var G9=K((S)=>{Object.defineProperty(S,"__esModule",{value:!0});S.MongoServerError=S.MongoServerClosedError=S.MongoRuntimeError=S.MongoParseError=S.MongoOperationTimeoutError=S.MongoOIDCError=S.MongoNotConnectedError=S.MongoNetworkTimeoutError=S.MongoNetworkError=S.MongoMissingDependencyError=S.MongoMissingCredentialsError=S.MongoKerberosError=S.MongoInvalidArgumentError=S.MongoGridFSStreamError=S.MongoGridFSChunkError=S.MongoGCPError=S.MongoExpiredSessionError=S.MongoError=S.MongoDriverError=S.MongoDecompressionError=S.MongoCursorInUseError=S.MongoCursorExhaustedError=S.MongoCompatibilityError=S.MongoClientBulkWriteExecutionError=S.MongoClientBulkWriteError=S.MongoClientBulkWriteCursorError=S.MongoChangeStreamError=S.MongoBatchReExecutionError=S.MongoAzureError=S.MongoAWSError=S.MongoAPIError=S.ChangeStreamCursor=S.ClientEncryption=S.MongoBulkWriteError=S.UUID=S.Timestamp=S.ObjectId=S.MinKey=S.MaxKey=S.Long=S.Int32=S.Double=S.Decimal128=S.DBRef=S.Code=S.BSONType=S.BSONSymbol=S.BSONRegExp=S.Binary=S.BSON=void 0;S.ConnectionCheckedInEvent=S.CommandSucceededEvent=S.CommandStartedEvent=S.CommandFailedEvent=S.WriteConcern=S.ReadPreference=S.ReadConcern=S.TopologyType=S.ServerType=S.ReadPreferenceMode=S.ReadConcernLevel=S.ProfilingLevel=S.ReturnDocument=S.ServerApiVersion=S.ExplainVerbosity=S.MongoErrorLabel=S.CursorTimeoutMode=S.CURSOR_FLAGS=S.Compressor=S.AuthMechanism=S.GSSAPICanonicalizationValue=S.AutoEncryptionLoggerLevel=S.BatchType=S.UnorderedBulkOperation=S.OrderedBulkOperation=S.MongoClient=S.ListIndexesCursor=S.ListCollectionsCursor=S.GridFSBucketWriteStream=S.GridFSBucketReadStream=S.GridFSBucket=S.FindCursor=S.ExplainableCursor=S.Db=S.Collection=S.ClientSession=S.ChangeStream=S.CancellationToken=S.AggregationCursor=S.Admin=S.AbstractCursor=S.configureExplicitResourceManagement=S.MongoWriteConcernError=S.MongoUnexpectedServerResponseError=S.MongoTransactionError=S.MongoTopologyClosedError=S.MongoTailableCursorError=S.MongoSystemError=S.MongoStalePrimaryError=S.MongoServerSelectionError=void 0;S.MongoClientAuthProviders=S.MongoCryptKMSRequestNetworkTimeoutError=S.MongoCryptInvalidArgumentError=S.MongoCryptError=S.MongoCryptCreateEncryptedCollectionError=S.MongoCryptCreateDataKeyError=S.MongoCryptAzureKMSRequestError=S.SrvPollingEvent=S.WaitingForSuitableServerEvent=S.ServerSelectionSucceededEvent=S.ServerSelectionStartedEvent=S.ServerSelectionFailedEvent=S.ServerSelectionEvent=S.TopologyOpeningEvent=S.TopologyDescriptionChangedEvent=S.TopologyClosedEvent=S.ServerOpeningEvent=S.ServerHeartbeatSucceededEvent=S.ServerHeartbeatStartedEvent=S.ServerHeartbeatFailedEvent=S.ServerDescriptionChangedEvent=S.ServerClosedEvent=S.ConnectionReadyEvent=S.ConnectionPoolReadyEvent=S.ConnectionPoolMonitoringEvent=S.ConnectionPoolCreatedEvent=S.ConnectionPoolClosedEvent=S.ConnectionPoolClearedEvent=S.ConnectionCreatedEvent=S.ConnectionClosedEvent=S.ConnectionCheckOutStartedEvent=S.ConnectionCheckOutFailedEvent=S.ConnectionCheckedOutEvent=void 0;var WA1=cY();Object.defineProperty(S,"Admin",{enumerable:!0,get:function(){return WA1.Admin}});var zA1=oZ();Object.defineProperty(S,"OrderedBulkOperation",{enumerable:!0,get:function(){return zA1.OrderedBulkOperation}});var CA1=eZ();Object.defineProperty(S,"UnorderedBulkOperation",{enumerable:!0,get:function(){return CA1.UnorderedBulkOperation}});var KA1=F9();Object.defineProperty(S,"ChangeStream",{enumerable:!0,get:function(){return KA1.ChangeStream}});var UA1=e4();Object.defineProperty(S,"Collection",{enumerable:!0,get:function(){return UA1.Collection}});var QA1=B2();Object.defineProperty(S,"AbstractCursor",{enumerable:!0,get:function(){return QA1.AbstractCursor}});var LA1=D5();Object.defineProperty(S,"AggregationCursor",{enumerable:!0,get:function(){return LA1.AggregationCursor}});var VA1=zY();Object.defineProperty(S,"FindCursor",{enumerable:!0,get:function(){return VA1.FindCursor}});var RA1=yY();Object.defineProperty(S,"ListCollectionsCursor",{enumerable:!0,get:function(){return RA1.ListCollectionsCursor}});var wA1=VY();Object.defineProperty(S,"ListIndexesCursor",{enumerable:!0,get:function(){return wA1.ListIndexesCursor}});var IA1=vA();Object.defineProperty(S,"Db",{enumerable:!0,get:function(){return IA1.Db}});var NA1=o4();Object.defineProperty(S,"ExplainableCursor",{enumerable:!0,get:function(){return NA1.ExplainableCursor}});var PA1=NO();Object.defineProperty(S,"GridFSBucket",{enumerable:!0,get:function(){return PA1.GridFSBucket}});var MA1=wE();Object.defineProperty(S,"GridFSBucketReadStream",{enumerable:!0,get:function(){return MA1.GridFSBucketReadStream}});var TA1=NE();Object.defineProperty(S,"GridFSBucketWriteStream",{enumerable:!0,get:function(){return TA1.GridFSBucketWriteStream}});var jA1=Y4();Object.defineProperty(S,"MongoClient",{enumerable:!0,get:function(){return jA1.MongoClient}});var kA1=o2();Object.defineProperty(S,"CancellationToken",{enumerable:!0,get:function(){return kA1.CancellationToken}});var OA1=w7();Object.defineProperty(S,"ClientSession",{enumerable:!0,get:function(){return OA1.ClientSession}});var SA1=I1();Object.defineProperty(S,"BSON",{enumerable:!0,get:function(){return SA1.BSON}});var w2=I1();Object.defineProperty(S,"Binary",{enumerable:!0,get:function(){return w2.Binary}});Object.defineProperty(S,"BSONRegExp",{enumerable:!0,get:function(){return w2.BSONRegExp}});Object.defineProperty(S,"BSONSymbol",{enumerable:!0,get:function(){return w2.BSONSymbol}});Object.defineProperty(S,"BSONType",{enumerable:!0,get:function(){return w2.BSONType}});Object.defineProperty(S,"Code",{enumerable:!0,get:function(){return w2.Code}});Object.defineProperty(S,"DBRef",{enumerable:!0,get:function(){return w2.DBRef}});Object.defineProperty(S,"Decimal128",{enumerable:!0,get:function(){return w2.Decimal128}});Object.defineProperty(S,"Double",{enumerable:!0,get:function(){return w2.Double}});Object.defineProperty(S,"Int32",{enumerable:!0,get:function(){return w2.Int32}});Object.defineProperty(S,"Long",{enumerable:!0,get:function(){return w2.Long}});Object.defineProperty(S,"MaxKey",{enumerable:!0,get:function(){return w2.MaxKey}});Object.defineProperty(S,"MinKey",{enumerable:!0,get:function(){return w2.MinKey}});Object.defineProperty(S,"ObjectId",{enumerable:!0,get:function(){return w2.ObjectId}});Object.defineProperty(S,"Timestamp",{enumerable:!0,get:function(){return w2.Timestamp}});Object.defineProperty(S,"UUID",{enumerable:!0,get:function(){return w2.UUID}});var uA1=A5();Object.defineProperty(S,"MongoBulkWriteError",{enumerable:!0,get:function(){return uA1.MongoBulkWriteError}});var xA1=GB();Object.defineProperty(S,"ClientEncryption",{enumerable:!0,get:function(){return xA1.ClientEncryption}});var fA1=_Y();Object.defineProperty(S,"ChangeStreamCursor",{enumerable:!0,get:function(){return fA1.ChangeStreamCursor}});var K1=l();Object.defineProperty(S,"MongoAPIError",{enumerable:!0,get:function(){return K1.MongoAPIError}});Object.defineProperty(S,"MongoAWSError",{enumerable:!0,get:function(){return K1.MongoAWSError}});Object.defineProperty(S,"MongoAzureError",{enumerable:!0,get:function(){return K1.MongoAzureError}});Object.defineProperty(S,"MongoBatchReExecutionError",{enumerable:!0,get:function(){return K1.MongoBatchReExecutionError}});Object.defineProperty(S,"MongoChangeStreamError",{enumerable:!0,get:function(){return K1.MongoChangeStreamError}});Object.defineProperty(S,"MongoClientBulkWriteCursorError",{enumerable:!0,get:function(){return K1.MongoClientBulkWriteCursorError}});Object.defineProperty(S,"MongoClientBulkWriteError",{enumerable:!0,get:function(){return K1.MongoClientBulkWriteError}});Object.defineProperty(S,"MongoClientBulkWriteExecutionError",{enumerable:!0,get:function(){return K1.MongoClientBulkWriteExecutionError}});Object.defineProperty(S,"MongoCompatibilityError",{enumerable:!0,get:function(){return K1.MongoCompatibilityError}});Object.defineProperty(S,"MongoCursorExhaustedError",{enumerable:!0,get:function(){return K1.MongoCursorExhaustedError}});Object.defineProperty(S,"MongoCursorInUseError",{enumerable:!0,get:function(){return K1.MongoCursorInUseError}});Object.defineProperty(S,"MongoDecompressionError",{enumerable:!0,get:function(){return K1.MongoDecompressionError}});Object.defineProperty(S,"MongoDriverError",{enumerable:!0,get:function(){return K1.MongoDriverError}});Object.defineProperty(S,"MongoError",{enumerable:!0,get:function(){return K1.MongoError}});Object.defineProperty(S,"MongoExpiredSessionError",{enumerable:!0,get:function(){return K1.MongoExpiredSessionError}});Object.defineProperty(S,"MongoGCPError",{enumerable:!0,get:function(){return K1.MongoGCPError}});Object.defineProperty(S,"MongoGridFSChunkError",{enumerable:!0,get:function(){return K1.MongoGridFSChunkError}});Object.defineProperty(S,"MongoGridFSStreamError",{enumerable:!0,get:function(){return K1.MongoGridFSStreamError}});Object.defineProperty(S,"MongoInvalidArgumentError",{enumerable:!0,get:function(){return K1.MongoInvalidArgumentError}});Object.defineProperty(S,"MongoKerberosError",{enumerable:!0,get:function(){return K1.MongoKerberosError}});Object.defineProperty(S,"MongoMissingCredentialsError",{enumerable:!0,get:function(){return K1.MongoMissingCredentialsError}});Object.defineProperty(S,"MongoMissingDependencyError",{enumerable:!0,get:function(){return K1.MongoMissingDependencyError}});Object.defineProperty(S,"MongoNetworkError",{enumerable:!0,get:function(){return K1.MongoNetworkError}});Object.defineProperty(S,"MongoNetworkTimeoutError",{enumerable:!0,get:function(){return K1.MongoNetworkTimeoutError}});Object.defineProperty(S,"MongoNotConnectedError",{enumerable:!0,get:function(){return K1.MongoNotConnectedError}});Object.defineProperty(S,"MongoOIDCError",{enumerable:!0,get:function(){return K1.MongoOIDCError}});Object.defineProperty(S,"MongoOperationTimeoutError",{enumerable:!0,get:function(){return K1.MongoOperationTimeoutError}});Object.defineProperty(S,"MongoParseError",{enumerable:!0,get:function(){return K1.MongoParseError}});Object.defineProperty(S,"MongoRuntimeError",{enumerable:!0,get:function(){return K1.MongoRuntimeError}});Object.defineProperty(S,"MongoServerClosedError",{enumerable:!0,get:function(){return K1.MongoServerClosedError}});Object.defineProperty(S,"MongoServerError",{enumerable:!0,get:function(){return K1.MongoServerError}});Object.defineProperty(S,"MongoServerSelectionError",{enumerable:!0,get:function(){return K1.MongoServerSelectionError}});Object.defineProperty(S,"MongoStalePrimaryError",{enumerable:!0,get:function(){return K1.MongoStalePrimaryError}});Object.defineProperty(S,"MongoSystemError",{enumerable:!0,get:function(){return K1.MongoSystemError}});Object.defineProperty(S,"MongoTailableCursorError",{enumerable:!0,get:function(){return K1.MongoTailableCursorError}});Object.defineProperty(S,"MongoTopologyClosedError",{enumerable:!0,get:function(){return K1.MongoTopologyClosedError}});Object.defineProperty(S,"MongoTransactionError",{enumerable:!0,get:function(){return K1.MongoTransactionError}});Object.defineProperty(S,"MongoUnexpectedServerResponseError",{enumerable:!0,get:function(){return K1.MongoUnexpectedServerResponseError}});Object.defineProperty(S,"MongoWriteConcernError",{enumerable:!0,get:function(){return K1.MongoWriteConcernError}});var _A1=B7();Object.defineProperty(S,"configureExplicitResourceManagement",{enumerable:!0,get:function(){return _A1.configureExplicitResourceManagement}});var gA1=A5();Object.defineProperty(S,"BatchType",{enumerable:!0,get:function(){return gA1.BatchType}});var bA1=x$();Object.defineProperty(S,"AutoEncryptionLoggerLevel",{enumerable:!0,get:function(){return bA1.AutoEncryptionLoggerLevel}});var yA1=dA();Object.defineProperty(S,"GSSAPICanonicalizationValue",{enumerable:!0,get:function(){return yA1.GSSAPICanonicalizationValue}});var vA1=B3();Object.defineProperty(S,"AuthMechanism",{enumerable:!0,get:function(){return vA1.AuthMechanism}});var hA1=R5();Object.defineProperty(S,"Compressor",{enumerable:!0,get:function(){return hA1.Compressor}});var PO=B2();Object.defineProperty(S,"CURSOR_FLAGS",{enumerable:!0,get:function(){return PO.CURSOR_FLAGS}});Object.defineProperty(S,"CursorTimeoutMode",{enumerable:!0,get:function(){return PO.CursorTimeoutMode}});var mA1=l();Object.defineProperty(S,"MongoErrorLabel",{enumerable:!0,get:function(){return mA1.MongoErrorLabel}});var dA1=o4();Object.defineProperty(S,"ExplainVerbosity",{enumerable:!0,get:function(){return dA1.ExplainVerbosity}});var cA1=Y4();Object.defineProperty(S,"ServerApiVersion",{enumerable:!0,get:function(){return cA1.ServerApiVersion}});var lA1=PY();Object.defineProperty(S,"ReturnDocument",{enumerable:!0,get:function(){return lA1.ReturnDocument}});var pA1=mY();Object.defineProperty(S,"ProfilingLevel",{enumerable:!0,get:function(){return pA1.ProfilingLevel}});var iA1=q6();Object.defineProperty(S,"ReadConcernLevel",{enumerable:!0,get:function(){return iA1.ReadConcernLevel}});var nA1=k0();Object.defineProperty(S,"ReadPreferenceMode",{enumerable:!0,get:function(){return nA1.ReadPreferenceMode}});var MO=s2();Object.defineProperty(S,"ServerType",{enumerable:!0,get:function(){return MO.ServerType}});Object.defineProperty(S,"TopologyType",{enumerable:!0,get:function(){return MO.TopologyType}});var sA1=q6();Object.defineProperty(S,"ReadConcern",{enumerable:!0,get:function(){return sA1.ReadConcern}});var aA1=k0();Object.defineProperty(S,"ReadPreference",{enumerable:!0,get:function(){return aA1.ReadPreference}});var rA1=t0();Object.defineProperty(S,"WriteConcern",{enumerable:!0,get:function(){return rA1.WriteConcern}});var jE=a$();Object.defineProperty(S,"CommandFailedEvent",{enumerable:!0,get:function(){return jE.CommandFailedEvent}});Object.defineProperty(S,"CommandStartedEvent",{enumerable:!0,get:function(){return jE.CommandStartedEvent}});Object.defineProperty(S,"CommandSucceededEvent",{enumerable:!0,get:function(){return jE.CommandSucceededEvent}});var I6=XG();Object.defineProperty(S,"ConnectionCheckedInEvent",{enumerable:!0,get:function(){return I6.ConnectionCheckedInEvent}});Object.defineProperty(S,"ConnectionCheckedOutEvent",{enumerable:!0,get:function(){return I6.ConnectionCheckedOutEvent}});Object.defineProperty(S,"ConnectionCheckOutFailedEvent",{enumerable:!0,get:function(){return I6.ConnectionCheckOutFailedEvent}});Object.defineProperty(S,"ConnectionCheckOutStartedEvent",{enumerable:!0,get:function(){return I6.ConnectionCheckOutStartedEvent}});Object.defineProperty(S,"ConnectionClosedEvent",{enumerable:!0,get:function(){return I6.ConnectionClosedEvent}});Object.defineProperty(S,"ConnectionCreatedEvent",{enumerable:!0,get:function(){return I6.ConnectionCreatedEvent}});Object.defineProperty(S,"ConnectionPoolClearedEvent",{enumerable:!0,get:function(){return I6.ConnectionPoolClearedEvent}});Object.defineProperty(S,"ConnectionPoolClosedEvent",{enumerable:!0,get:function(){return I6.ConnectionPoolClosedEvent}});Object.defineProperty(S,"ConnectionPoolCreatedEvent",{enumerable:!0,get:function(){return I6.ConnectionPoolCreatedEvent}});Object.defineProperty(S,"ConnectionPoolMonitoringEvent",{enumerable:!0,get:function(){return I6.ConnectionPoolMonitoringEvent}});Object.defineProperty(S,"ConnectionPoolReadyEvent",{enumerable:!0,get:function(){return I6.ConnectionPoolReadyEvent}});Object.defineProperty(S,"ConnectionReadyEvent",{enumerable:!0,get:function(){return I6.ConnectionReadyEvent}});var g3=SB();Object.defineProperty(S,"ServerClosedEvent",{enumerable:!0,get:function(){return g3.ServerClosedEvent}});Object.defineProperty(S,"ServerDescriptionChangedEvent",{enumerable:!0,get:function(){return g3.ServerDescriptionChangedEvent}});Object.defineProperty(S,"ServerHeartbeatFailedEvent",{enumerable:!0,get:function(){return g3.ServerHeartbeatFailedEvent}});Object.defineProperty(S,"ServerHeartbeatStartedEvent",{enumerable:!0,get:function(){return g3.ServerHeartbeatStartedEvent}});Object.defineProperty(S,"ServerHeartbeatSucceededEvent",{enumerable:!0,get:function(){return g3.ServerHeartbeatSucceededEvent}});Object.defineProperty(S,"ServerOpeningEvent",{enumerable:!0,get:function(){return g3.ServerOpeningEvent}});Object.defineProperty(S,"TopologyClosedEvent",{enumerable:!0,get:function(){return g3.TopologyClosedEvent}});Object.defineProperty(S,"TopologyDescriptionChangedEvent",{enumerable:!0,get:function(){return g3.TopologyDescriptionChangedEvent}});Object.defineProperty(S,"TopologyOpeningEvent",{enumerable:!0,get:function(){return g3.TopologyOpeningEvent}});var t5=BE();Object.defineProperty(S,"ServerSelectionEvent",{enumerable:!0,get:function(){return t5.ServerSelectionEvent}});Object.defineProperty(S,"ServerSelectionFailedEvent",{enumerable:!0,get:function(){return t5.ServerSelectionFailedEvent}});Object.defineProperty(S,"ServerSelectionStartedEvent",{enumerable:!0,get:function(){return t5.ServerSelectionStartedEvent}});Object.defineProperty(S,"ServerSelectionSucceededEvent",{enumerable:!0,get:function(){return t5.ServerSelectionSucceededEvent}});Object.defineProperty(S,"WaitingForSuitableServerEvent",{enumerable:!0,get:function(){return t5.WaitingForSuitableServerEvent}});var tA1=XE();Object.defineProperty(S,"SrvPollingEvent",{enumerable:!0,get:function(){return tA1.SrvPollingEvent}});var c7=W7();Object.defineProperty(S,"MongoCryptAzureKMSRequestError",{enumerable:!0,get:function(){return c7.MongoCryptAzureKMSRequestError}});Object.defineProperty(S,"MongoCryptCreateDataKeyError",{enumerable:!0,get:function(){return c7.MongoCryptCreateDataKeyError}});Object.defineProperty(S,"MongoCryptCreateEncryptedCollectionError",{enumerable:!0,get:function(){return c7.MongoCryptCreateEncryptedCollectionError}});Object.defineProperty(S,"MongoCryptError",{enumerable:!0,get:function(){return c7.MongoCryptError}});Object.defineProperty(S,"MongoCryptInvalidArgumentError",{enumerable:!0,get:function(){return c7.MongoCryptInvalidArgumentError}});Object.defineProperty(S,"MongoCryptKMSRequestNetworkTimeoutError",{enumerable:!0,get:function(){return c7.MongoCryptKMSRequestNetworkTimeoutError}});var oA1=iG();Object.defineProperty(S,"MongoClientAuthProviders",{enumerable:!0,get:function(){return oA1.MongoClientAuthProviders}})});var t=K((BB1)=>{BB1.arrayAtomicsBackupSymbol=Symbol("mongoose#Array#atomicsBackup");BB1.arrayAtomicsSymbol=Symbol("mongoose#Array#_atomics");BB1.arrayParentSymbol=Symbol("mongoose#Array#_parent");BB1.arrayPathSymbol=Symbol("mongoose#Array#_path");BB1.arraySchemaSymbol=Symbol("mongoose#Array#_schema");BB1.documentArrayParent=Symbol("mongoose#documentArrayParent");BB1.documentIsSelected=Symbol("mongoose#Document#isSelected");BB1.documentIsModified=Symbol("mongoose#Document#isModified");BB1.documentModifiedPaths=Symbol("mongoose#Document#modifiedPaths");BB1.documentSchemaSymbol=Symbol("mongoose#Document#schema");BB1.getSymbol=Symbol("mongoose#Document#get");BB1.modelSymbol=Symbol("mongoose#Model");BB1.objectIdSymbol=Symbol("mongoose#ObjectId");BB1.populateModelSymbol=Symbol("mongoose#PopulateOptions#Model");BB1.schemaTypeSymbol=Symbol("mongoose#schemaType");BB1.sessionNewDocuments=Symbol("mongoose#ClientSession#newDocuments");BB1.scopeSymbol=Symbol("mongoose#Document#scope");BB1.validatorErrorSymbol=Symbol("mongoose#validatorError")});var b3=K((Ow1,TO)=>{var o5=H6().ObjectId,RB1=t().objectIdSymbol;Object.defineProperty(o5.prototype,"_id",{enumerable:!1,configurable:!0,get:function(){return this}});/*!
30
+ * Convenience `valueOf()` to allow comparing ObjectIds using double equals re: gh-7299
31
+ */if(!o5.prototype.hasOwnProperty("valueOf"))o5.prototype.valueOf=function F(){return this.toString()};o5.prototype[RB1]=!0;TO.exports=o5});var I2=K((Sw1,jO)=>{jO.exports=function F(A){if(A==null)return;if(typeof A.constructor!=="function")return;return A.constructor.name}});var n6=K((wB1)=>{/*!
32
+ * ignore
33
+ */wB1.internalToObjectOptions={transform:!1,virtuals:!1,getters:!1,_skipDepopulateTopLevel:!0,depopulate:!0,flattenDecimals:!1,useProjection:!1,versionKey:!0,flattenObjectIds:!1}});var GD=K((xw1,kO)=>{kO.exports=H6().Decimal128});var W9=K((fw1,OO)=>{OO.exports=new Set(["__proto__","constructor","prototype"])});var ED=K((NB1)=>{NB1.isMongooseArray=function(F){return Array.isArray(F)&&F.isMongooseArray}});var e5=K((gw1,SO)=>{var MB1=ED().isMongooseArray;SO.exports=function(F){return F!=null&&(MB1(F)||F.$__!=null||F.isMongooseBuffer||F.$isMongooseMap)}});var kE=K((bw1,uO)=>{var TB1=/^function\s*([^\s(]+)/;uO.exports=function(F){return F.name||(F.toString().trim().match(TB1)||[])[1]}});var l0=K((yw1,xO)=>{function jB1(F,A){return F!=null&&F._bsontype===A}xO.exports=jB1});var I4=K((vw1,fO)=>{fO.exports=function(F){return Buffer.isBuffer(F)||Object.prototype.toString.call(F)==="[object Object]"}});var l7=K((hw1,_O)=>{_O.exports=function F(A){if(A==null||typeof A!=="object")return!1;let B=Object.getPrototypeOf(A);return!B||B.constructor.name==="Object"}});var p7=K((kB1)=>{var gO=Symbol("mongoose#trustedSymbol");kB1.trustedSymbol=gO;kB1.trusted=function F(A){if(A==null||typeof A!=="object")return A;return A[gO]=!0,A}});var Z0=K((dw1,bO)=>{var uB1=GD(),xB1=b3(),fB1=W9(),_B1=e5(),gB1=kE(),OE=l0(),bB1=ED().isMongooseArray,yB1=I4(),vB1=l7(),hB1=t(),SE=p7().trustedSymbol,mB1=H6();function xE(F,A,B){if(F==null)return F;if(OE(F,"Double"))return new mB1.Double(F.value);if(typeof F==="number"||typeof F==="string"||typeof F==="boolean"||typeof F==="bigint")return F;if(Array.isArray(F))return dB1(bB1(F)?F.__array:F,A);if(_B1(F)){if(A){if(A.retainDocuments&&F.$__!=null){let Z=F.$clone();if(F.__index!=null)Z.__index=F.__index;if(F.__parentArray!=null)Z.__parentArray=F.__parentArray;return Z.$__parent=F.$__parent,Z}}let J=F.$isSingleNested;if(vB1(F)&&F.$__!=null&&F._doc!=null)return F._doc;let X;if(A&&A.json&&typeof F.toJSON==="function")X=F.toJSON(A);else X=F.toObject(A);if(A&&A.minimize&&!F.constructor.$__required&&J&&Object.keys(X).length===0)return;return X}let D=F.constructor;if(D)switch(gB1(D)){case"Object":return uE(F,A,B);case"Date":return new D(+F);case"RegExp":return cB1(F);default:break}if(OE(F,"ObjectId")){if(A&&A.flattenObjectIds)return F.toJSON();return new xB1(F.id)}if(OE(F,"Decimal128")){if(A&&A.flattenDecimals)return F.toJSON();return uB1.fromString(F.toString())}if(!D&&yB1(F))return uE(F,A,B);if(typeof F==="object"&&F[hB1.schemaTypeSymbol])return F.clone();if(A&&A.bson&&typeof F.toBSON==="function")return F;if(typeof F.valueOf==="function")return F.valueOf();return uE(F,A,B)}bO.exports=xE;/*!
34
+ * ignore
35
+ */function uE(F,A,B){let D=A&&A.minimize,J=A&&A.omitUndefined,X=A&&A._seen,Z={},Y;if(X&&X.has(F))return X.get(F);else if(X)X.set(F,Z);if(SE in F)Z[SE]=F[SE];let $=Object.keys(F),G=$.length;for(let E=0;E<G;++E){let H=$[E];if(fB1.has(H))continue;let q=xE(F[H],A,!1);if((D===!1||J)&&typeof q==="undefined")delete Z[H];else if(D!==!0||typeof q!=="undefined")Y||(Y=!0),Z[H]=q}return D&&!B?Y&&Z:Z}function dB1(F,A){let B=0,D=F.length,J=new Array(D);for(B=0;B<D;++B)J[B]=xE(F[B],A,!0);return J}function cB1(F){let A=new RegExp(F.source,F.flags);if(A.lastIndex!==F.lastIndex)A.lastIndex=F.lastIndex;return A}});var hO=K((cw1,vO)=>{/*!
36
+ * Module dependencies.
37
+ */var HD=wC(),fE=z1(),_E=G9().Collection,lB1=b3(),yO=I2(),pB1=n6().internalToObjectOptions,iB1=import.meta.require("stream"),gE=import.meta.require("util");function s6(F,A,B){this.collection=null,this.Promise=B.Promise||Promise,this.modelName=B.modelName,delete B.modelName,this._closed=!1,HD.apply(this,arguments)}/*!
38
+ * Inherit from abstract Collection.
39
+ */Object.setPrototypeOf(s6.prototype,HD.prototype);s6.prototype.onOpen=function(){return this.collection=this.conn.db.collection(this.name),HD.prototype.onOpen.call(this),this.collection};s6.prototype.onClose=function(F){HD.prototype.onClose.call(this,F)};s6.prototype._getCollection=function F(){if(this.collection)return this.collection;if(this.conn.db!=null)return this.collection=this.conn.db.collection(this.name),this.collection;return null};/*!
40
+ * ignore
41
+ */var FF={watch:!0,find:!0,aggregate:!0};function nB1(F){s6.prototype[F]=function(){let A=this._getCollection(),B=Array.from(arguments),D=this,J=D&&D.conn&&D.conn.base&&D.conn.base.options&&D.conn.base.options.debug,X=D&&D.conn&&D.conn.options&&D.conn.options.debug,Z=X==null?J:X,Y=arguments[arguments.length-1],$=new lB1;if(this.conn.$wasForceClosed){let H=new fE("Connection was force closed");if(B.length>0&&typeof B[B.length-1]==="function"){B[B.length-1](H);return}else throw H}let G=B,E=null;if(this._shouldBufferCommands()&&this.buffer){this.conn.emit("buffer",{_id:$,modelName:D.modelName,collectionName:D.name,method:F,args:B});let H,q=B,W=null,z=null;if(FF[F]&&typeof Y==="function")this.addQueue(F,q),H=Y;else if(FF[F])W=new this.Promise((U,Q)=>{H=function L(V,w){if(z!=null)clearTimeout(z);if(V!=null)return Q(V);U(w)},q=B.concat([H]),this.addQueue(F,q)});else if(typeof Y==="function")H=function U(){if(z!=null)clearTimeout(z);return Y.apply(this,arguments)},q=B.slice(0,B.length-1).concat([H]);else W=new Promise((U,Q)=>{H=function L(V,w){if(z!=null)clearTimeout(z);if(V!=null)return Q(V);U(w)},q=B.concat([H]),this.addQueue(F,q)});let C=this._getBufferTimeoutMS();if(z=setTimeout(()=>{if(this.removeQueue(F,q)){let Q="Operation `"+this.name+"."+F+"()` buffering timed out after "+C+"ms",L=new fE(Q);this.conn.emit("buffer-end",{_id:$,modelName:D.modelName,collectionName:D.name,method:F,error:L}),H(L)}},C),!FF[F]&&typeof Y==="function"){this.addQueue(F,q);return}return W}else if(!FF[F]&&typeof Y==="function")E=function H(q,W){if(q!=null)D.conn.emit("operation-end",{_id:$,modelName:D.modelName,collectionName:D.name,method:F,error:q});else D.conn.emit("operation-end",{_id:$,modelName:D.modelName,collectionName:D.name,method:F,result:W});return Y.apply(this,arguments)},G=B.slice(0,B.length-1).concat([E]);if(Z)if(typeof Z==="function"){let H=null;if(typeof B[B.length-1]=="function")H=B.slice(0,B.length-1);else H=B;Z.apply(D,[D.name,F].concat(H))}else if(Z instanceof iB1.Writable)this.$printToStream(D.name,F,B,Z);else{let H=Z.color==null?!0:Z.color,q=Z.shell==null?!1:Z.shell;this.$print(D.name,F,B,H,q)}this.conn.emit("operation-start",{_id:$,modelName:D.modelName,collectionName:this.name,method:F,params:G});try{if(A==null){let q="Cannot call `"+this.name+"."+F+"()` before initial connection is complete if `bufferCommands = false`. Make sure you `await mongoose.connect()` if you have `bufferCommands = false`.";throw new fE(q)}if(FF[F]&&typeof Y==="function"){let q=A[F].apply(A,G.slice(0,G.length-1));return this.conn.emit("operation-end",{_id:$,modelName:D.modelName,collectionName:this.name,method:F,result:q}),Y.call(this,null,q)}let H=A[F].apply(A,G);if(H!=null&&typeof H.then==="function")return H.then((q)=>{if(typeof Y==="function")Y(null,q);else this.conn.emit("operation-end",{_id:$,modelName:D.modelName,collectionName:this.name,method:F,result:q});return q},(q)=>{if(typeof Y==="function"){Y(q);return}else this.conn.emit("operation-end",{_id:$,modelName:D.modelName,collectionName:this.name,method:F,error:q});throw q});return H}catch(H){if(typeof Y==="function")return Y(H);else throw this.conn.emit("operation-end",{_id:$,modelName:D.modelName,collectionName:this.name,method:F,error:H}),H}}}for(let F of Object.getOwnPropertyNames(_E.prototype)){if(Object.getOwnPropertyDescriptor(_E.prototype,F).get!==void 0)continue;if(typeof _E.prototype[F]!=="function")continue;nB1(F)}s6.prototype.$print=function(F,A,B,D,J){let X=D?"\x1B[0;36mMongoose:\x1B[0m ":"Mongoose: ",Z=[F,A].join("."),Y=[];for(let G=B.length-1;G>=0;--G)if(this.$format(B[G])||Y.length)Y.unshift(this.$format(B[G],D,J));let $="("+Y.join(", ")+")";console.info(X+Z+$)};s6.prototype.$printToStream=function(F,A,B,D){let J=[F,A].join("."),X=[];for(let Y=B.length-1;Y>=0;--Y)if(this.$format(B[Y])||X.length)X.unshift(this.$format(B[Y]));let Z="("+X.join(", ")+")";D.write(J+Z,"utf8")};s6.prototype.$format=function(F,A,B){let D=typeof F;if(D==="function"||D==="undefined")return"";return bE(F,!1,A,B)};function i7(F){let A={inspect:function(){return F}};if(gE.inspect.custom)A[gE.inspect.custom]=A.inspect;return A}function sB1(F){return bE(F,!0)}function aB1(F,A){F[A]=i7('ObjectId("'+F[A].toHexString()+'")')}function rB1(F,A,B){if(B)F[A]=i7('ISODate("'+F[A].toUTCString()+'")');else F[A]=i7('new Date("'+F[A].toUTCString()+'")')}function bE(F,A,B,D){if(F&&typeof F.toBSON==="function")F=F.toBSON();if(F==null)return F;let X=Z0()(F,pB1),Z=yO(X);if(Z==="Binary")X="BinData("+X.sub_type+', "'+X.toString("base64")+'")';else if(Z==="ObjectId")X=i7('ObjectId("'+X.toHexString()+'")');else if(Z==="Date")X=i7('new Date("'+X.toUTCString()+'")');else if(Z==="Object"){let Y=Object.keys(X),$=Y.length,G;for(let E=0;E<$;++E)if(G=Y[E],X[G]){let H;if(typeof X[G].toBSON==="function")try{X[G]=X[G].toBSON()}catch(W){H=W}let q=yO(X[G]);if(q==="Binary")X[G]="BinData("+X[G].sub_type+', "'+X[G].buffer.toString("base64")+'")';else if(q==="Object")X[G]=bE(X[G],!0);else if(q==="ObjectId")aB1(X,G);else if(q==="Date")rB1(X,G,D);else if(q==="ClientSession")X[G]=i7('ClientSession("'+(X[G]&&X[G].id&&X[G].id.id&&X[G].id.id.buffer||"").toString("hex")+'")');else if(Array.isArray(X[G]))X[G]=X[G].map(sB1);else if(H!=null)throw H}}if(A)return X;return gE.inspect(X,!1,10,B).replace(/\n/g,"").replace(/\s{2,}/g," ")}s6.prototype.getIndexes=s6.prototype.indexInformation;/*!
42
+ * Module exports.
43
+ */vO.exports=s6});var yE=K((lw1,cO)=>{/*!
44
+ * Module dependencies.
45
+ */var tB1=import.meta.require("events").EventEmitter,AF=z1();/*!
46
+ * ignore
47
+ */var mO=["close","change","end","error","resumeTokenChanged"];/*!
48
+ * ignore
49
+ */class dO extends tB1{constructor(F,A,B){super();if(this.driverChangeStream=null,this.closed=!1,this.bindedEvents=!1,this.pipeline=A,this.options=B,this.errored=!1,B&&B.hydrate&&!B.model)throw new Error("Cannot create change stream with `hydrate: true` unless calling `Model.watch()`");let D=null;if(this.$driverChangeStreamPromise=new Promise((J,X)=>{try{F((Z,Y)=>{if(Z!=null)return this.errored=!0,this.emit("error",Z),X(Z);this.driverChangeStream=Y,this.emit("ready"),J()})}catch(Z){D=Z,this.errored=!0,this.emit("error",Z),X(Z)}}),D!=null)throw D}_bindEvents(){if(this.bindedEvents)return;if(this.bindedEvents=!0,this.driverChangeStream==null){this.$driverChangeStreamPromise.then(()=>{this.driverChangeStream.on("close",()=>{this.closed=!0}),mO.forEach((F)=>{this.driverChangeStream.on(F,(A)=>{if(A!=null&&A.fullDocument!=null&&this.options&&this.options.hydrate)A.fullDocument=this.options.model.hydrate(A.fullDocument);this.emit(F,A)})})},()=>{});return}this.driverChangeStream.on("close",()=>{this.closed=!0}),mO.forEach((F)=>{this.driverChangeStream.on(F,(A)=>{if(A!=null&&A.fullDocument!=null&&this.options&&this.options.hydrate)A.fullDocument=this.options.model.hydrate(A.fullDocument);this.emit(F,A)})})}hasNext(F){if(this.errored)throw new AF("Cannot call hasNext() on errored ChangeStream");return this.driverChangeStream.hasNext(F)}next(F){if(this.errored)throw new AF("Cannot call next() on errored ChangeStream");if(this.options&&this.options.hydrate){if(F!=null){let B=F;F=(D,J)=>{if(D!=null)return B(D);if(J.fullDocument!=null)J.fullDocument=this.options.model.hydrate(J.fullDocument);return B(null,J)}}let A=this.driverChangeStream.next(F);if(A&&typeof A.then==="function")A=A.then((B)=>{if(B.fullDocument!=null)B.fullDocument=this.options.model.hydrate(B.fullDocument);return B});return A}return this.driverChangeStream.next(F)}addListener(F,A){if(this.errored)throw new AF("Cannot call addListener() on errored ChangeStream");return this._bindEvents(),super.addListener(F,A)}on(F,A){if(this.errored)throw new AF("Cannot call on() on errored ChangeStream");return this._bindEvents(),super.on(F,A)}once(F,A){if(this.errored)throw new AF("Cannot call once() on errored ChangeStream");return this._bindEvents(),super.once(F,A)}_queue(F){this.once("ready",()=>F())}close(){if(this.closed=!0,this.driverChangeStream)return this.driverChangeStream.close();else return this.$driverChangeStreamPromise.then(()=>this.driverChangeStream.close(),()=>{})}}/*!
50
+ * ignore
51
+ */cO.exports=dO});var n7=K((pw1,iO)=>{function f1(){this._pres=new Map,this._posts=new Map}f1.skipWrappedFunction=function F(){if(!(this instanceof f1.skipWrappedFunction))return new f1.skipWrappedFunction(...arguments);this.args=[...arguments]};f1.overwriteResult=function F(){if(!(this instanceof f1.overwriteResult))return new f1.overwriteResult(...arguments);this.args=[...arguments]};f1.prototype.execPre=function(F,A,B,D){if(arguments.length===3)D=B,B=[];let J=this._pres.get(F)||[],X=J.length,Z=J.numAsync||0,Y=0,$=Z,G=!1,E=B,H=null;if(!X)return DF(function(){D(null)});function q(){if(Y>=X)return;let z=J[Y];if(z.isAsync){let C=[BF(W),BF(function(U){if(U){if(G)return;if(U instanceof f1.skipWrappedFunction)H=U;else return G=!0,D(U)}if(--$===0&&Y>=X)return D(H)})];qD(z.fn,A,C,C[0])}else if(z.fn.length>0){let C=[BF(W)],U=arguments.length>=2?arguments:[null].concat(E);for(let Q=1;Q<U.length;++Q){if(Q===U.length-1&&typeof U[Q]==="function")continue;C.push(U[Q])}qD(z.fn,A,C,C[0])}else{let C=null;try{C=z.fn.call(A)}catch(U){if(U!=null)return D(U)}if(WD(C))C.then(()=>W(),(U)=>W(U));else{if(++Y>=X)if($>0)return;else return DF(function(){D(H)});q()}}}q.apply(null,[null].concat(B));function W(z){if(z){if(G)return;if(z instanceof f1.skipWrappedFunction)H=z;else return G=!0,D(z)}if(++Y>=X)if($>0)return;else return D(H);q.apply(A,arguments)}};f1.prototype.execPreSync=function(F,A,B){let D=this._pres.get(F)||[],J=D.length;for(let X=0;X<J;++X)D[X].fn.apply(A,B||[])};f1.prototype.execPost=function(F,A,B,D,J){if(arguments.length<5)J=D,D=null;let X=this._posts.get(F)||[],Z=X.length,Y=0,$=null;if(D&&D.error)$=D.error;if(!Z)return DF(function(){J.apply(null,[$].concat(B))});function G(){let E=X[Y].fn,H=0,q=B.length,W=[];for(let z=0;z<q;++z)if(H+=B[z]&&B[z]._kareemIgnore?0:1,!B[z]||!B[z]._kareemIgnore)W.push(B[z]);if($)if(pO(X[Y],H)){let z=BF(function(C){if(C){if(C instanceof f1.overwriteResult){if(B=C.args,++Y>=Z)return J.call(null,$);return G()}$=C}if(++Y>=Z)return J.call(null,$);G()});qD(E,A,[$].concat(W).concat([z]),z)}else{if(++Y>=Z)return J.call(null,$);G()}else{let z=BF(function(C){if(C){if(C instanceof f1.overwriteResult){if(B=C.args,++Y>=Z)return J.apply(null,[null].concat(B));return G()}return $=C,G()}if(++Y>=Z)return J.apply(null,[null].concat(B));G()});if(pO(X[Y],H)){if(++Y>=Z)return J.apply(null,[null].concat(B));return G()}if(E.length===H+1)qD(E,A,W.concat([z]),z);else{let C,U;try{U=E.apply(A,W)}catch(Q){C=Q,$=Q}if(WD(U))return U.then((Q)=>{z(Q instanceof f1.overwriteResult?Q:null)},(Q)=>z(Q));if(U instanceof f1.overwriteResult)B=U.args;if(++Y>=Z)return J.apply(null,[C].concat(B));G()}}}G()};f1.prototype.execPostSync=function(F,A,B){let D=this._posts.get(F)||[],J=D.length;for(let X=0;X<J;++X){let Z=D[X].fn.apply(A,B||[]);if(Z instanceof f1.overwriteResult)B=Z.args}return B};f1.prototype.createWrapperSync=function(F,A){let B=this;return function D(){B.execPreSync(F,this,arguments);let J=A.apply(this,arguments);return B.execPostSync(F,this,[J])[0]}};function lO(F,A,B,D,J,X,Z){if(X.useErrorHandlers)return F.execPost(B,D,J,{error:A},function(Y){return typeof Z==="function"&&Z(Y)});else return typeof Z==="function"&&Z(A)}f1.prototype.wrap=function(F,A,B,D,J){let X=D.length>0?D[D.length-1]:null,Z=Array.from(D);typeof X==="function"&&Z.pop();let Y=this;J=J||{};let $=J.checkForPromise;this.execPre(F,B,D,function(G){if(G&&!(G instanceof f1.skipWrappedFunction)){let W=J.numCallbackParams||0,z=J.contextParameter?[B]:[];for(let C=z.length;C<W;++C)z.push(null);return lO(Y,G,F,B,z,J,X)}let E=A.length,H;if(G instanceof f1.skipWrappedFunction)return H=G.args[0],q(null,...G.args);else try{H=A.apply(B,Z.concat(q))}catch(W){return q(W)}if($){if(WD(H))return H.then((W)=>q(null,W),(W)=>q(W));if(E<Z.length+1)return q(null,H)}function q(){let W=Array.from(arguments);if(W.shift(),J.nullResultByDefault&&W.length===0)W.push(null);if(arguments[0])return lO(Y,arguments[0],F,B,W,J,X);else Y.execPost(F,B,W,function(){if(X===null)return;arguments[0]?X(arguments[0]):X.apply(B,arguments)})}})};f1.prototype.filter=function(F){let A=this.clone(),B=Array.from(A._pres.keys());for(let J of B){let X=this._pres.get(J).map((Z)=>Object.assign({},Z,{name:J})).filter(F);if(X.length===0){A._pres.delete(J);continue}X.numAsync=X.filter((Z)=>Z.isAsync).length,A._pres.set(J,X)}let D=Array.from(A._posts.keys());for(let J of D){let X=this._posts.get(J).map((Z)=>Object.assign({},Z,{name:J})).filter(F);if(X.length===0){A._posts.delete(J);continue}A._posts.set(J,X)}return A};f1.prototype.hasHooks=function(F){return this._pres.has(F)||this._posts.has(F)};f1.prototype.createWrapper=function(F,A,B,D){let J=this;if(!this.hasHooks(F))return function(){DF(()=>A.apply(this,arguments))};return function(){let X=B||this;J.wrap(F,A,X,Array.from(arguments),D)}};f1.prototype.pre=function(F,A,B,D,J){let X={};if(typeof A==="object"&&A!==null)X=A,A=X.isAsync;else if(typeof arguments[1]!=="boolean")B=A,A=!1;let Z=this._pres.get(F)||[];if(this._pres.set(F,Z),A)Z.numAsync=Z.numAsync||0,++Z.numAsync;if(typeof B!=="function")throw new Error('pre() requires a function, got "'+typeof B+'"');if(J)Z.unshift(Object.assign({},X,{fn:B,isAsync:A}));else Z.push(Object.assign({},X,{fn:B,isAsync:A}));return this};f1.prototype.post=function(F,A,B,D){let J=this._posts.get(F)||[];if(typeof A==="function")D=!!B,B=A,A={};if(typeof B!=="function")throw new Error('post() requires a function, got "'+typeof B+'"');if(D)J.unshift(Object.assign({},A,{fn:B}));else J.push(Object.assign({},A,{fn:B}));return this._posts.set(F,J),this};f1.prototype.clone=function(){let F=new f1;for(let A of this._pres.keys()){let B=this._pres.get(A).slice();B.numAsync=this._pres.get(A).numAsync,F._pres.set(A,B)}for(let A of this._posts.keys())F._posts.set(A,this._posts.get(A).slice());return F};f1.prototype.merge=function(F,A){A=arguments.length===1?!0:A;let B=A?this.clone():this;for(let D of F._pres.keys()){let J=B._pres.get(D)||[],X=F._pres.get(D).filter((Y)=>J.map(($)=>$.fn).indexOf(Y.fn)===-1),Z=J.concat(X);Z.numAsync=J.numAsync||0,Z.numAsync+=X.filter((Y)=>Y.isAsync).length,B._pres.set(D,Z)}for(let D of F._posts.keys()){let J=B._posts.get(D)||[],X=F._posts.get(D).filter((Z)=>J.indexOf(Z)===-1);B._posts.set(D,J.concat(X))}return B};function qD(F,A,B,D){let J;try{J=F.apply(A,B)}catch(X){return D(X)}if(WD(J))J.then(()=>D(),(X)=>D(X))}function WD(F){return typeof F==="object"&&F!==null&&typeof F.then==="function"}function BF(F){let A=!1,B=this;return function(){if(A)return;return A=!0,DF(()=>F.apply(B,arguments))}}var DF=typeof process==="object"&&process!==null&&process.nextTick||function F(A){setTimeout(A,0)};function pO(F,A){if(F.errorHandler)return!0;return F.fn.length===A+2}iO.exports=f1});var aO=K((nO,sO)=>{var Z2=sO.exports=nO={};Z2.DocumentNotFoundError=null;Z2.general={};Z2.general.default="Validator failed for path `{PATH}` with value `{VALUE}`";Z2.general.required="Path `{PATH}` is required.";Z2.Number={};Z2.Number.min="Path `{PATH}` ({VALUE}) is less than minimum allowed value ({MIN}).";Z2.Number.max="Path `{PATH}` ({VALUE}) is more than maximum allowed value ({MAX}).";Z2.Number.enum="`{VALUE}` is not a valid enum value for path `{PATH}`.";Z2.Date={};Z2.Date.min="Path `{PATH}` ({VALUE}) is before minimum allowed value ({MIN}).";Z2.Date.max="Path `{PATH}` ({VALUE}) is after maximum allowed value ({MAX}).";Z2.String={};Z2.String.enum="`{VALUE}` is not a valid enum value for path `{PATH}`.";Z2.String.match="Path `{PATH}` is invalid ({VALUE}).";Z2.String.minlength="Path `{PATH}` (`{VALUE}`) is shorter than the minimum allowed length ({MINLENGTH}).";Z2.String.maxlength="Path `{PATH}` (`{VALUE}`) is longer than the maximum allowed length ({MAXLENGTH})."});var zD=K((iw1,tO)=>{/*!
52
+ * Module dependencies.
53
+ */var rO=z1(),oB1=import.meta.require("util");class vE extends rO{constructor(F,A,B,D){let J,X=rO.messages;if(X.DocumentNotFoundError!=null)J=typeof X.DocumentNotFoundError==="function"?X.DocumentNotFoundError(F,A):X.DocumentNotFoundError;else J='No document found for query "'+oB1.inspect(F)+'" on model "'+A+'"';super(J);this.result=D,this.numAffected=B,this.filter=F,this.query=F}}Object.defineProperty(vE.prototype,"name",{value:"DocumentNotFoundError"});/*!
54
+ * exports
55
+ */tO.exports=vE});var Y2=K((nw1,FS)=>{/*!
56
+ * Module dependencies.
57
+ */var eB1=z1(),FD1=import.meta.require("util");class dE extends eB1{constructor(F,A,B,D,J){if(arguments.length>0){let X=oO(A),Z=eO(J),Y=hE(null,F,A,B,Z,X,D);super(Y);this.init(F,A,B,D,J)}else super(hE())}toJSON(){return{stringValue:this.stringValue,valueType:this.valueType,kind:this.kind,value:this.value,path:this.path,reason:this.reason,name:this.name,message:this.message}}init(F,A,B,D,J){/*!
58
+ * ignore
59
+ */this.stringValue=mE(A),this.messageFormat=eO(J),this.kind=F,this.value=A,this.path=B,this.reason=D,this.valueType=oO(A)}copy(F){this.messageFormat=F.messageFormat,this.stringValue=F.stringValue,this.kind=F.kind,this.value=F.value,this.path=F.path,this.reason=F.reason,this.message=F.message,this.valueType=F.valueType}setModel(F){/*!
60
+ * ignore
61
+ */this.message=hE(F,this.kind,this.value,this.path,this.messageFormat,this.valueType)}}Object.defineProperty(dE.prototype,"name",{value:"CastError"});function mE(F){let A=FD1.inspect(F);if(A=A.replace(/^'|'$/g,'"'),!A.startsWith('"'))A='"'+A+'"';return A}function oO(F){if(F==null)return""+F;let A=typeof F;if(A!=="object")return A;if(typeof F.constructor!=="function")return A;return F.constructor.name}function eO(F){let A=F&&F._castErrorMessage||null;if(typeof A==="string"||typeof A==="function")return A}/*!
62
+ * ignore
63
+ */function hE(F,A,B,D,J,X,Z){if(typeof J==="string"){let Y=mE(B),$=J.replace("{KIND}",A).replace("{VALUE}",Y).replace("{PATH}",D);if(F!=null)$=$.replace("{MODEL}",F.modelName);return $}else if(typeof J==="function")return J(B,D,F,A);else{let Y=mE(B),$=X?" (type "+X+")":"",G="Cast to "+A+" failed for value "+Y+$+' at path "'+D+'"';if(F!=null)G+=' for model "'+F.modelName+'"';if(Z!=null&&typeof Z.constructor==="function"&&Z.constructor.name!=="AssertionError"&&Z.constructor.name!=="Error")G+=' because of "'+Z.constructor.name+'"';return G}}/*!
64
+ * exports
65
+ */FS.exports=dE});var cE=K((sw1,AS)=>{/*!
66
+ * ignore
67
+ */AS.exports=function F(A){let B=Object.keys(A.errors||{}),D=B.length,J=[],X;for(let Z=0;Z<D;++Z){if(X=B[Z],A===A.errors[X])continue;J.push(X+": "+A.errors[X].message)}return J.join(", ")}});var C9=K((aw1,JS)=>{/*!
68
+ * Module requirements
69
+ */var AD1=z1(),BD1=I2(),BS=import.meta.require("util"),DS=cE();class z9 extends AD1{constructor(F){let A;if(BD1(F)==="model")A=F.constructor.modelName+" validation failed";else A="Validation failed";super(A);if(this.errors={},this._message=A,F)F.$errors=this.errors}toString(){return this.name+": "+DS(this)}inspect(){return Object.assign(new Error(this.message),this)}addError(F,A){if(A instanceof z9){let{errors:B}=A;for(let D of Object.keys(B))this.addError(`${F}.${D}`,B[D]);return}this.errors[F]=A,this.message=this._message+": "+DS(this)}}if(BS.inspect.custom)z9.prototype[BS.inspect.custom]=z9.prototype.inspect;Object.defineProperty(z9.prototype,"toJSON",{enumerable:!1,writable:!1,configurable:!0,value:function(){return Object.assign({},this,{name:this.name,message:this.message})}});Object.defineProperty(z9.prototype,"name",{value:"ValidationError"});/*!
70
+ * Module exports
71
+ */JS.exports=z9});var lE=K((rw1,YS)=>{/*!
72
+ * Module dependencies.
73
+ */var XS=z1();class JF extends XS{constructor(F,A){let B=F.message;if(!B)B=XS.messages.general.default;let D=ZS(B,F,A);super(D);F=Object.assign({},F,{message:D}),this.properties=F,this.kind=F.type,this.path=F.path,this.value=F.value,this.reason=F.reason}toString(){return this.message}toJSON(){return Object.assign({name:this.name,message:this.message},this)}}Object.defineProperty(JF.prototype,"name",{value:"ValidatorError"});Object.defineProperty(JF.prototype,"properties",{enumerable:!1,writable:!0,value:null});JF.prototype.formatMessage=ZS;function ZS(F,A,B){if(typeof F==="function")return F(A,B);let D=Object.keys(A);for(let J of D){if(J==="message")continue;F=F.replace("{"+J.toUpperCase()+"}",A[J])}return F}/*!
74
+ * exports
75
+ */YS.exports=JF});var iE=K((tw1,$S)=>{/*!
76
+ * Module dependencies.
77
+ */var DD1=z1();class pE extends DD1{constructor(F,A,B){let D=B.join(", ");super('No matching document found for id "'+F._doc._id+'" version '+A+' modifiedPaths "'+D+'"');this.version=A,this.modifiedPaths=B}}Object.defineProperty(pE.prototype,"name",{value:"VersionError"});/*!
78
+ * exports
79
+ */$S.exports=pE});var sE=K((ow1,GS)=>{/*!
80
+ * Module dependencies.
81
+ */var JD1=z1();class nE extends JD1{constructor(F){super("Can't save() the same doc multiple times in parallel. Document: "+F._doc._id)}}Object.defineProperty(nE.prototype,"name",{value:"ParallelSaveError"});/*!
82
+ * exports
83
+ */GS.exports=nE});var rE=K((ew1,ES)=>{/*!
84
+ * Module dependencies.
85
+ */var XD1=z1();class aE extends XD1{constructor(F){super("Cannot overwrite `"+F+"` model once compiled.")}}Object.defineProperty(aE.prototype,"name",{value:"OverwriteModelError"});/*!
86
+ * exports
87
+ */ES.exports=aE});var qS=K((FI1,HS)=>{/*!
88
+ * Module dependencies.
89
+ */var ZD1=z1();class tE extends ZD1{constructor(F){let A=`Schema hasn't been registered for model "`+F+`".
90
+ Use mongoose.model(name, schema)`;super(A)}}Object.defineProperty(tE.prototype,"name",{value:"MissingSchemaError"});/*!
91
+ * exports
92
+ */HS.exports=tE});var zS=K((AI1,WS)=>{var YD1=I2();WS.exports=function F(A){if(YD1(A)!=="TopologyDescription")return!1;let B=Array.from(A.servers.values());return B.length>0&&B.every((D)=>D.type==="Unknown")}});var KS=K((BI1,CS)=>{var $D1=I2();CS.exports=function F(A){if($D1(A)!=="TopologyDescription")return!1;if(A.servers.size===0)return!1;for(let B of A.servers.values())if(B.host.endsWith(".mongodb.net")===!1||B.port!==27017)return!1;return!0}});var QS=K((DI1,US)=>{var GD1=I2(),ED1="Client network socket disconnected before secure TLS connection was established";US.exports=function F(A){if(GD1(A)!=="TopologyDescription")return!1;let B=Array.from(A.servers.values());return B.length>0&&B.every((D)=>D.error&&D.error.message.indexOf(ED1)!==-1)}});var eE=K((JI1,LS)=>{/*!
93
+ * Module dependencies.
94
+ */var HD1=z1(),qD1=zS(),WD1=KS(),zD1=QS();/*!
95
+ * ignore
96
+ */var CD1="Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted. Make sure your current IP address is on your Atlas cluster's IP whitelist: https://www.mongodb.com/docs/atlas/security-whitelist/",KD1="Mongoose is connecting with SSL enabled, but the server is not accepting SSL connections. Please ensure that the MongoDB server you are connecting to is configured to accept SSL connections. Learn more: https://mongoosejs.com/docs/tutorials/ssl.html";class oE extends HD1{assimilateError(F){let A=F.reason;if(WD1(A)&&qD1(A)&&F.message.indexOf("bad auth")===-1&&F.message.indexOf("Authentication failed")===-1)this.message=CD1;else if(zD1(A))this.message=KD1;else this.message=F.message;for(let D in F)if(D!=="name")this[D]=F[D];return this}}Object.defineProperty(oE.prototype,"name",{value:"MongooseServerSelectionError"});LS.exports=oE});var AH=K((XI1,VS)=>{/*!
97
+ * Module dependencies.
98
+ */var UD1=z1();class FH extends UD1{constructor(F){let A="For your own good, using `document.save()` to update an array which was selected using an $elemMatch projection OR populated using skip, limit, query conditions, or exclusion of the _id field when the operation results in a $pop or $set of the entire array is not supported. The following path(s) would have been modified unsafely:\n "+F.join(`
99
+ `)+`
100
+ Use Model.updateOne() to update these arrays instead.`;super(A)}}Object.defineProperty(FH.prototype,"name",{value:"DivergentArrayError"});/*!
101
+ * exports
102
+ */VS.exports=FH});var N4=K((ZI1,RS)=>{/*!
103
+ * Module dependencies.
104
+ */var QD1=z1();class BH extends QD1{constructor(F,A,B){A=A||"Field `"+F+"` is not in schema and strict mode is set to throw.";super(A);this.isImmutableError=!!B,this.path=F}}Object.defineProperty(BH.prototype,"name",{value:"StrictModeError"});RS.exports=BH});var JH=K((YI1,wS)=>{/*!
105
+ * Module dependencies.
106
+ */var LD1=z1();class DH extends LD1{constructor(F,A){A=A||"Cannot populate path `"+F+"` because it is not in your schema. Set the `strictPopulate` option to false to override.";super(A);this.path=F}}Object.defineProperty(DH.prototype,"name",{value:"StrictPopulateError"});wS.exports=DH});var _2=K((IS,NS)=>{var $2=z1();/*!
107
+ * Module exports.
108
+ */NS.exports=IS=$2;$2.messages=aO();$2.Messages=$2.messages;$2.DocumentNotFoundError=zD();$2.CastError=Y2();$2.ValidationError=C9();$2.ValidatorError=lE();$2.VersionError=iE();$2.ParallelSaveError=sE();$2.OverwriteModelError=rE();$2.MissingSchemaError=qS();$2.MongooseServerSelectionError=eE();$2.DivergentArrayError=AH();$2.StrictModeError=N4();$2.StrictPopulateError=JH()});var N6=K(($I1,PS)=>{PS.exports=Object.freeze({enumerable:!0,configurable:!0,writable:!0,value:void 0})});var B6=K((GI1,MS)=>{var VD1=Z0();class G2{constructor(F){if(F==null)return this;Object.assign(this,VD1(F))}}var g2=N6();Object.defineProperty(G2.prototype,"type",g2);Object.defineProperty(G2.prototype,"validate",g2);Object.defineProperty(G2.prototype,"cast",g2);Object.defineProperty(G2.prototype,"required",g2);Object.defineProperty(G2.prototype,"default",g2);Object.defineProperty(G2.prototype,"ref",g2);Object.defineProperty(G2.prototype,"refPath",g2);Object.defineProperty(G2.prototype,"select",g2);Object.defineProperty(G2.prototype,"index",g2);Object.defineProperty(G2.prototype,"unique",g2);Object.defineProperty(G2.prototype,"immutable",g2);Object.defineProperty(G2.prototype,"sparse",g2);Object.defineProperty(G2.prototype,"text",g2);Object.defineProperty(G2.prototype,"transform",g2);MS.exports=G2});var CD=K((EI1,s7)=>{var RD1=Y2();s7.exports=function F(A,B){if(s7.exports.convertToTrue.has(A))return!0;if(s7.exports.convertToFalse.has(A))return!1;if(A==null)return A;throw new RD1("boolean",A,B)};s7.exports.convertToTrue=new Set([!0,"true",1,"1","yes"]);s7.exports.convertToFalse=new Set([!1,"false",0,"0","no"])});var KD=K((HI1,TS)=>{var wD1=CD();/*!
109
+ * ignore
110
+ */TS.exports=function(F){let A=this!=null?this.path:null;return wD1(F,A)}});var XH=K((qI1,jS)=>{/*!
111
+ * ignore
112
+ */jS.exports=function(F){if(Array.isArray(F)){if(!F.every((A)=>typeof A==="number"||typeof A==="string"))throw new Error("$type array values must be strings or numbers");return F}if(typeof F!=="number"&&typeof F!=="string")throw new Error("$type parameter must be number, string, or array of numbers and strings");return F}});var OS=K((WI1,kS)=>{var ID1=N4();/*!
113
+ * ignore
114
+ */kS.exports=function(F){if(F.$immutable)F.$immutableSetter=ND1(F.path,F.options.immutable),F.set(F.$immutableSetter);else if(F.$immutableSetter)F.setters=F.setters.filter((A)=>A!==F.$immutableSetter),delete F.$immutableSetter};function ND1(F,A){return function B(D,J,X,Z){if(this==null||this.$__==null)return D;if(this.isNew)return D;if(Z&&Z.overwriteImmutable)return D;if(!(typeof A==="function"?A.call(this,this):A))return D;let $=this.$__.priorDoc!=null?this.$__.priorDoc.$__getValue(F):this.$__getValue(F);if(this.$__.strictMode==="throw"&&D!==$)throw new ID1(F,"Path `"+F+"` is immutable and strict mode is set to throw.",!0);return $}}});var uS=K((zI1,SS)=>{SS.exports=function F(A){return typeof A==="function"&&A.constructor&&A.constructor.name==="AsyncFunction"}});var fS=K((CI1,xS)=>{xS.exports=function F(A){let B=Object.keys(A),D=!0;for(let J=0,X=B.length;J<X;++J)if(typeof A[B[J]]==="object"&&A[B[J]]!==null){D=!1;break}return D}});var gS=K((KI1,_S)=>{var a7=1000,r7=a7*60,t7=r7*60,K9=t7*24,PD1=K9*7,MD1=K9*365.25;_S.exports=function(F,A){A=A||{};var B=typeof F;if(B==="string"&&F.length>0)return TD1(F);else if(B==="number"&&isFinite(F))return A.long?kD1(F):jD1(F);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(F))};function TD1(F){if(F=String(F),F.length>100)return;var A=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(F);if(!A)return;var B=parseFloat(A[1]),D=(A[2]||"ms").toLowerCase();switch(D){case"years":case"year":case"yrs":case"yr":case"y":return B*MD1;case"weeks":case"week":case"w":return B*PD1;case"days":case"day":case"d":return B*K9;case"hours":case"hour":case"hrs":case"hr":case"h":return B*t7;case"minutes":case"minute":case"mins":case"min":case"m":return B*r7;case"seconds":case"second":case"secs":case"sec":case"s":return B*a7;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return B;default:return}}function jD1(F){var A=Math.abs(F);if(A>=K9)return Math.round(F/K9)+"d";if(A>=t7)return Math.round(F/t7)+"h";if(A>=r7)return Math.round(F/r7)+"m";if(A>=a7)return Math.round(F/a7)+"s";return F+"ms"}function kD1(F){var A=Math.abs(F);if(A>=K9)return UD(F,A,K9,"day");if(A>=t7)return UD(F,A,t7,"hour");if(A>=r7)return UD(F,A,r7,"minute");if(A>=a7)return UD(F,A,a7,"second");return F+" ms"}function UD(F,A,B,D){var J=A>=B*1.5;return Math.round(F/B)+" "+D+(J?"s":"")}});var yS=K((UI1,bS)=>{bS.exports=function F(A){let B=[],D="",J="DEFAULT";for(let X=0;X<A.length;++X){if(J==="IN_SQUARE_BRACKETS"&&!/\d/.test(A[X])&&A[X]!=="]")J="DEFAULT",D=B[B.length-1]+"["+D,B.splice(B.length-1,1);if(A[X]==="["){if(J!=="IMMEDIATELY_AFTER_SQUARE_BRACKETS")B.push(D),D="";J="IN_SQUARE_BRACKETS"}else if(A[X]==="]")if(J==="IN_SQUARE_BRACKETS")J="IMMEDIATELY_AFTER_SQUARE_BRACKETS",B.push(D),D="";else J="DEFAULT",D+=A[X];else if(A[X]==="."){if(J!=="IMMEDIATELY_AFTER_SQUARE_BRACKETS")B.push(D),D="";J="DEFAULT"}else D+=A[X]}if(J!=="IMMEDIATELY_AFTER_SQUARE_BRACKETS")B.push(D);return B}});var cS=K((OD1)=>{var XF=yS(),hS=["__proto__","constructor","prototype"];OD1.get=function(F,A,B,D){var J;if(typeof B=="function")if(B.length<2)D=B,B=void 0;else J=B,B=void 0;D||(D=dS);var X=typeof F=="string"?XF(F):F;if(!Array.isArray(X))throw new TypeError("Invalid `path`. Must be either string or array");var Z=A,Y;for(var $=0;$<X.length;++$){if(Y=X[$],typeof X[$]!=="string"&&typeof X[$]!=="number")throw new TypeError("Each segment of path to `get()` must be a string or number, got "+typeof X[$]);if(Array.isArray(Z)&&!/^\d+$/.test(Y)){var G=X.slice($);return[].concat(Z).map(function(H){return H?OD1.get(G,H,B||J,D):D(void 0)})}if(J)Z=J(Z,Y);else{var E=B&&Z[B]?Z[B]:Z;Z=E instanceof Map?E.get(Y):E[Y]}if(!Z)return D(Z)}return D(Z)};OD1.has=function(F,A){var B=typeof F==="string"?XF(F):F;if(!Array.isArray(B))throw new TypeError("Invalid `path`. Must be either string or array");var D=B.length,J=A;for(var X=0;X<D;++X){if(typeof B[X]!=="string"&&typeof B[X]!=="number")throw new TypeError("Each segment of path to `has()` must be a string or number, got "+typeof B[X]);if(J==null||typeof J!=="object"||!(B[X]in J))return!1;J=J[B[X]]}return!0};OD1.unset=function(F,A){var B=typeof F==="string"?XF(F):F;if(!Array.isArray(B))throw new TypeError("Invalid `path`. Must be either string or array");var D=B.length,J=A;for(var X=0;X<D;++X){if(J==null||typeof J!=="object"||!(B[X]in J))return!1;if(typeof B[X]!=="string"&&typeof B[X]!=="number")throw new TypeError("Each segment of path to `unset()` must be a string or number, got "+typeof B[X]);if(hS.indexOf(B[X])!==-1)return!1;if(X===D-1)return delete J[B[X]],!0;J=J instanceof Map?J.get(B[X]):J[B[X]]}return!0};OD1.set=function(F,A,B,D,J,X){var Z;if(typeof D=="function")if(D.length<2)J=D,D=void 0;else Z=D,D=void 0;J||(J=dS);var Y=typeof F=="string"?XF(F):F;if(!Array.isArray(Y))throw new TypeError("Invalid `path`. Must be either string or array");if(B==null)return;for(var $=0;$<Y.length;++$){if(typeof Y[$]!=="string"&&typeof Y[$]!=="number")throw new TypeError("Each segment of path to `set()` must be a string or number, got "+typeof Y[$]);if(hS.indexOf(Y[$])!==-1)return}var G=X||/\$/.test(F)&&X!==!1,E=B,H;for(var $=0,q=Y.length-1;$<q;++$){if(H=Y[$],H=="$")if($==q-1)break;else continue;if(Array.isArray(E)&&!/^\d+$/.test(H)){var W=Y.slice($);if(!G&&Array.isArray(A))for(var z=0;z<E.length&&z<A.length;++z)OD1.set(W,A[z],E[z],D||Z,J,G);else for(var z=0;z<E.length;++z)OD1.set(W,A,E[z],D||Z,J,G);return}if(Z)E=Z(E,H);else{var C=D&&E[D]?E[D]:E;E=C instanceof Map?C.get(H):C[H]}if(!E)return}if(H=Y[q],D&&E[D])E=E[D];if(Array.isArray(E)&&!/^\d+$/.test(H))if(!G&&Array.isArray(A))mS(E,A,H,Z,D,J);else for(var z=0;z<E.length;++z){var U=E[z];if(U)if(Z)Z(U,H,J(A));else{if(U[D])U=U[D];U[H]=J(A)}}else if(Z)Z(E,H,J(A));else if(E instanceof Map)E.set(H,J(A));else E[H]=J(A)};/*!
115
+ * Split a string path into components delimited by '.' or
116
+ * '[\d+]'
117
+ *
118
+ * #### Example:
119
+ * stringToParts('foo[0].bar.1'); // ['foo', '0', 'bar', '1']
120
+ */OD1.stringToParts=XF;/*!
121
+ * Recursively set nested arrays
122
+ */function mS(F,A,B,D,J,X){for(var Z,Y=0;Y<F.length&&Y<A.length;++Y)if(Z=F[Y],Array.isArray(Z)&&Array.isArray(A[Y]))mS(Z,A[Y],B,D,J,X);else if(Z)if(D)D(Z,B,X(A[Y]));else{if(Z[J])Z=Z[J];Z[B]=X(A[Y])}}/*!
123
+ * Returns the value passed to it.
124
+ */function dS(F){return F}});var D6=K((lS,pS)=>{pS.exports=lS=cS()});var YH=K((LI1,nS)=>{var fD1=Z0();class iS{constructor(F){if(this._docs={},this._childDocs=[],F==null)return;if(F=fD1(F),Object.assign(this,F),typeof F.subPopulate==="object")this.populate=F.subPopulate;if(F.perDocumentLimit!=null&&F.limit!=null)throw new Error("Can not use `limit` and `perDocumentLimit` at the same time. Path: `"+F.path+"`.")}}nS.exports=iS});var sS=K((_D1)=>{_D1.isMongooseDocumentArray=function(F){return Array.isArray(F)&&F.isMongooseDocumentArray}});var QD=K((RI1,aS)=>{var bD1=Z6(),o7=Symbol("mongoose#emitted");aS.exports=function F(A,B,D,J){if(typeof A==="function")try{return B(function(X){if(X!=null){if(D!=null&&D.listeners!=null&&D.listeners("error").length>0&&!X[o7])X[o7]=!0,D.emit("error",X);try{A(X)}catch(Z){return bD1(()=>{throw Z})}return}A.apply(this,arguments)})}catch(X){if(D!=null&&D.listeners!=null&&D.listeners("error").length>0&&!X[o7])X[o7]=!0,D.emit("error",X);return A(X)}return J=J||global.Promise,new J((X,Z)=>{B(function(Y,$){if(Y!=null){if(D!=null&&D.listeners!=null&&D.listeners("error").length>0&&!Y[o7])Y[o7]=!0,D.emit("error",Y);return Z(Y)}if(arguments.length>2)return X(Array.prototype.slice.call(arguments,1));X($)})})}});var LD=K((wI1,rS)=>{rS.exports=function F(A,B,D){let J=Object.keys(B.tree),X={};for(let Z of J){if(D&&(A.paths[Z]||A.nested[Z]||A.singleNestedPaths[Z]))continue;X[Z]=B.tree[Z]}A.options._isMerging=!0,A.add(X,null),delete A.options._isMerging,A.callQueue=A.callQueue.concat(B.callQueue),A.method(B.methods),A.static(B.statics);for(let[Z,Y]of Object.entries(B._userProvidedOptions))if(!(Z in A._userProvidedOptions))A.set(Z,Y);for(let Z in B.query)A.query[Z]=B.query[Z];for(let Z in B.virtuals)A.virtuals[Z]=B.virtuals[Z].clone();A._indexes=A._indexes.concat(B._indexes||[]),A.s.hooks.merge(B.s.hooks,!1)}});var eS=K((tS,oS)=>{/*!
125
+ * Module dependencies.
126
+ */var II1=X1(),P6=oS.exports=tS=function F(){};P6.ctor=function(){let F=[...arguments],A=function(){P6.apply(this,arguments),this.paths={},this.states={}};return A.prototype=new P6,A.prototype.constructor=A,A.prototype.stateNames=F,F.forEach(function(B){A.prototype[B]=function(D){this._changeState(D,B)}}),A};P6.prototype._changeState=function F(A,B){let D=this.paths[A];if(D===B)return;let J=this.states[D];if(J)delete J[A];this.paths[A]=B,this.states[B]=this.states[B]||{},this.states[B][A]=!0};/*!
127
+ * ignore
128
+ */P6.prototype.clear=function F(A){if(this.states[A]==null)return;let B=Object.keys(this.states[A]),D=B.length,J;while(D--)J=B[D],delete this.states[A][J],delete this.paths[J]};/*!
129
+ * ignore
130
+ */P6.prototype.clearPath=function F(A){let B=this.paths[A];if(!B)return;delete this.paths[A],delete this.states[B][A]};P6.prototype.getStatePaths=function F(A){if(this.states[A]!=null)return this.states[A];return{}};P6.prototype.some=function F(){let A=this,B=arguments.length?arguments:this.stateNames;return Array.prototype.some.call(B,function(D){if(A.states[D]==null)return!1;return Object.keys(A.states[D]).length})};P6.prototype._iter=function F(A){return function(){let B=[...arguments],D=B.pop();if(!B.length)B=this.stateNames;let J=this;return B.reduce(function(Z,Y){if(J.states[Y]==null)return Z;return Z.concat(Object.keys(J.states[Y]))},[])[A](function(Z,Y,$){return D(Z,Y,$)})}};P6.prototype.forEach=function F(){return this.forEach=this._iter("forEach"),this.forEach.apply(this,arguments)};P6.prototype.map=function F(){return this.map=this._iter("map"),this.map.apply(this,arguments)};P6.prototype.clone=function F(){let A=new this.constructor;A.paths={...this.paths};for(let B of this.stateNames){if(!(B in this.states))continue;A.states[B]=this.states[B]==null?this.states[B]:{...this.states[B]}}return A}});var Bu=K((Fu,Au)=>{/*!
131
+ * Dependencies
132
+ */var yD1=eS(),vD1=yD1.ctor("require","modify","init","default","ignore");Au.exports=Fu=q0;function q0(){this.activePaths=new vD1}q0.prototype.strictMode=!0;q0.prototype.fullPath=void 0;q0.prototype.selected=void 0;q0.prototype.shardval=void 0;q0.prototype.saveError=void 0;q0.prototype.validationError=void 0;q0.prototype.adhocPaths=void 0;q0.prototype.removing=void 0;q0.prototype.inserting=void 0;q0.prototype.saving=void 0;q0.prototype.version=void 0;q0.prototype._id=void 0;q0.prototype.ownerDocument=void 0;q0.prototype.populate=void 0;q0.prototype.populated=void 0;q0.prototype.primitiveAtomics=void 0;q0.prototype.wasPopulated=!1;q0.prototype.scope=void 0;q0.prototype.session=null;q0.prototype.pathsToScopes=null;q0.prototype.cachedRequired=null});var ZF=K((NI1,Xu)=>{/*!
133
+ * Module dependencies.
134
+ */var $H=H6().Binary,Du=X1();function b2(F,A,B){let D=F;if(F==null)D=0;let J,X,Z;if(Array.isArray(A))X=A[0],Z=A[1];else J=A;let Y;if(typeof D==="number"||D instanceof Number)Y=Buffer.alloc(D);else Y=Buffer.from(D,J,B);return Du.decorate(Y,b2.mixin),Y.isMongooseBuffer=!0,Y[b2.pathSymbol]=X,Y[Ju]=Z,Y._subtype=0,Y}var hD1=Symbol.for("mongoose#Buffer#_path"),Ju=Symbol.for("mongoose#Buffer#_parent");b2.pathSymbol=hD1;/*!
135
+ * Inherit from Buffer.
136
+ */b2.mixin={_subtype:void 0,_markModified:function(){let F=this[Ju];if(F)F.markModified(this[b2.pathSymbol]);return this},write:function(){let F=Buffer.prototype.write.apply(this,arguments);if(F>0)this._markModified();return F},copy:function(F){let A=Buffer.prototype.copy.apply(this,arguments);if(F&&F.isMongooseBuffer)F._markModified();return A}};/*!
137
+ * Compile other Buffer methods marking this buffer as modified.
138
+ */Du.each(["writeUInt8","writeUInt16","writeUInt32","writeInt8","writeInt16","writeInt32","writeFloat","writeDouble","fill","utf8Write","binaryWrite","asciiWrite","set","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE"],function(F){if(!Buffer.prototype[F])return;b2.mixin[F]=function(){let A=Buffer.prototype[F].apply(this,arguments);return this._markModified(),A}});b2.mixin.toObject=function(F){let A=typeof F==="number"?F:this._subtype||0;return new $H(Buffer.from(this),A)};b2.mixin.$toObject=b2.mixin.toObject;b2.mixin.toBSON=function(){return new $H(this,this._subtype||0)};b2.mixin.equals=function(F){if(!Buffer.isBuffer(F))return!1;if(this.length!==F.length)return!1;for(let A=0;A<this.length;++A)if(this[A]!==F[A])return!1;return!0};b2.mixin.subtype=function(F){if(typeof F!=="number")throw new TypeError("Invalid subtype. Expected a number");if(this._subtype!==F)this._markModified();this._subtype=F};/*!
139
+ * Module exports.
140
+ */b2.Binary=$H;Xu.exports=b2});var U9=K((mD1)=>{mD1.schemaMixedSymbol=Symbol.for("mongoose:schema_mixed");mD1.builtInMiddleware=Symbol.for("mongoose:built-in-middleware")});var Q9=K((MI1,Zu)=>{/*!
141
+ * Module dependencies.
142
+ */var VD=P0(),lD1=U9(),pD1=I4(),iD1=X1();function a6(F,A){if(A&&A.default){let B=A.default;if(Array.isArray(B)&&B.length===0)A.default=Array;else if(!A.shared&&pD1(B)&&Object.keys(B).length===0)A.default=function(){return{}}}VD.call(this,F,A,"Mixed"),this[lD1.schemaMixedSymbol]=!0}a6.schemaName="Mixed";a6.defaultOptions={};/*!
143
+ * Inherits from SchemaType.
144
+ */a6.prototype=Object.create(VD.prototype);a6.prototype.constructor=a6;a6.get=VD.get;a6.set=VD.set;a6.setters=[];a6.prototype.cast=function(F){if(F instanceof Error)return iD1.errorToPOJO(F);return F};a6.prototype.castForQuery=function(F,A){return A};/*!
145
+ * Module exports.
146
+ */Zu.exports=a6});var $u=K((TI1,Yu)=>{Yu.exports=class F{constructor(A,B,D){this.subdocSnapshot=A,this.activePaths=B,this.version=D}}});var EH=K((jI1,Gu)=>{/*!
147
+ * Module dependencies.
148
+ */var nD1=z1();class GH extends nD1{constructor(F,A){let B=Array.isArray(A)?"array":"primitive value";super("Tried to set nested object field `"+F+`\` to ${B} \``+A+"`");this.path=F}}Object.defineProperty(GH.prototype,"name",{value:"ObjectExpectedError"});Gu.exports=GH});var RD=K((kI1,Eu)=>{/*!
149
+ * Module dependencies.
150
+ */var sD1=z1();class HH extends sD1{constructor(F,A,B){super('Parameter "'+A+'" to '+B+'() must be an object, got "'+F.toString()+'" (type '+typeof F+")")}}Object.defineProperty(HH.prototype,"name",{value:"ObjectParameterError"});Eu.exports=HH});var qu=K((OI1,Hu)=>{/*!
151
+ * Module dependencies.
152
+ */var aD1=z1();class qH extends aD1{constructor(F){super("Can't validate() the same doc multiple times in parallel. Document: "+F._doc._id)}}Object.defineProperty(qH.prototype,"name",{value:"ParallelValidateError"});/*!
153
+ * exports
154
+ */Hu.exports=qH});var WH=K((SI1,Wu)=>{Wu.exports=function F(A){let B={},D=Object.keys(A);for(let J of D){if(J.indexOf(".")===-1){B[J]=1;continue}let X=J.split("."),Z=X[0];for(let Y=0;Y<X.length;++Y)if(B[Z]=1,Y+1<X.length)Z=Z+"."+X[Y+1]}return B}});var Cu=K((uI1,zu)=>{zu.exports=function F(A){if(A==null||typeof A!=="object")return!1;return A.$slice==null&&A.$elemMatch==null&&A.$meta==null&&A.$==null}});var wD=K((xI1,Ku)=>{var rD1=Cu();Ku.exports=function F(A,B,D,J,X,Z,Y){let $=Object.keys(A.$__schema.paths),G=$.length,E=Y&&Y.skipParentChangeTracking;for(let H=0;H<G;++H){let q,W="",z=$[H];if(z==="_id"&&A.$__.skipId)continue;let C=A.$__schema.paths[z],U=C.splitPath(),Q=U.length,L=!1,V=A._doc;for(let w=0;w<Q;++w){if(V==null)break;let j=U[w];if(W+=(!W.length?"":".")+j,D===!0){if(W in B)break}else if(D===!1&&B&&!L){let T=C.$isSingleNested||C.$isMongooseDocumentArray;if(W in B&&!rD1(B[W])||w===Q-1&&T&&J!=null&&J[W])L=!0;else if(J!=null&&!J[W])break}if(w===Q-1){if(V[j]!==void 0)break;if(X!=null){if(typeof C.defaultValue==="function"){if(!C.defaultValue.$runBeforeSetters&&X)break;if(C.defaultValue.$runBeforeSetters&&!X)break}else if(!X)continue}if(Z&&Z[W])break;if(B&&D!==null){if(D===!0){if(z in B)continue;try{q=C.getDefault(A,!1)}catch(T){A.invalidate(z,T);break}if(typeof q!=="undefined")V[j]=q,zH(A,z,E)}else if(L){try{q=C.getDefault(A,!1)}catch(T){A.invalidate(z,T);break}if(typeof q!=="undefined")V[j]=q,zH(A,z,E)}}else{try{q=C.getDefault(A,!1)}catch(T){A.invalidate(z,T);break}if(typeof q!=="undefined")V[j]=q,zH(A,z,E)}}else V=V[j]}}};/*!
155
+ * ignore
156
+ */function zH(F,A,B){if(F.$__.activePaths.default(A),!B&&F.$isSubdocument&&F.$isSingleNested&&F.$parent()!=null)F.$parent().$__.activePaths.default(F.$__pathRelativeToParent(A))}});var ID=K((fI1,Qu)=>{/*!
157
+ * ignore
158
+ */Qu.exports=function F(A,B,D){D=D||{};let J=D.skipDocArrays,X=0;if(!A)return X;for(let Z of Object.keys(A.$__.activePaths.getStatePaths("modify"))){if(J){let Y=A.$__schema.path(Z);if(Y&&Y.$isMongooseDocumentArray)continue}if(Z.startsWith(B+".")){if(A.$__.activePaths.clearPath(Z),++X,A.$isSubdocument)Uu(A,Z)}}return X};function Uu(F,A,B=new Set){if(B.has(F))throw new Error("Infinite subdocument loop: subdoc with _id "+F._id+" is a parent of itself");let D=F.$parent(),J=F.$__pathRelativeToParent(void 0,!1)+"."+A;if(D.$__.activePaths.clearPath(J),D.$isSubdocument)Uu(D,J,B)}});var PD=K((XJ1)=>{var tD1=Z0(),oD1=t().documentSchemaSymbol,eD1=n6().internalToObjectOptions,FJ1=X1(),e7,AJ1=t().getSymbol,ND=t().scopeSymbol,Lu=FJ1.isPOJO;/*!
159
+ * exports
160
+ */XJ1.compile=Vu;XJ1.defineKey=Ru;var BJ1=Object.freeze({minimize:!0,virtuals:!1,getters:!1,transform:!1}),DJ1=Object.freeze({noDottedPath:!0});function Vu(F,A,B,D){e7=e7||y2();let J=D.typeKey;for(let X of Object.keys(F)){let Z=F[X],$=Lu(Z)&&Object.keys(Z).length>0&&(!Z[J]||J==="type"&&Lu(Z.type)&&Z.type.type)?Z:null;Ru({prop:X,subprops:$,prototype:A,prefix:B,options:D})}}function Ru({prop:F,subprops:A,prototype:B,prefix:D,options:J}){e7=e7||y2();let X=(D?D+".":"")+F;D=D||"";let Z=D?Object.freeze({}):DJ1;if(A)Object.defineProperty(B,F,{enumerable:!0,configurable:!0,get:function(){let Y=this;if(!this.$__.getters)this.$__.getters={};if(!this.$__.getters[X]){let $=Object.create(e7.prototype,JJ1(this));if(!D)$.$__[ND]=this;$.$__.nestedPath=X,Object.defineProperty($,"schema",{enumerable:!1,configurable:!0,writable:!1,value:B.schema}),Object.defineProperty($,"$__schema",{enumerable:!1,configurable:!0,writable:!1,value:B.schema}),Object.defineProperty($,oD1,{enumerable:!1,configurable:!0,writable:!1,value:B.schema}),Object.defineProperty($,"toObject",{enumerable:!1,configurable:!0,writable:!1,value:function(){return tD1(Y.get(X,null,{virtuals:this&&this.schema&&this.schema.options&&this.schema.options.toObject&&this.schema.options.toObject.virtuals||null}))}}),Object.defineProperty($,"$__get",{enumerable:!1,configurable:!0,writable:!1,value:function(){return Y.get(X,null,{virtuals:this&&this.schema&&this.schema.options&&this.schema.options.toObject&&this.schema.options.toObject.virtuals||null})}}),Object.defineProperty($,"toJSON",{enumerable:!1,configurable:!0,writable:!1,value:function(){return Y.get(X,null,{virtuals:this&&this.schema&&this.schema.options&&this.schema.options.toJSON&&this.schema.options.toJSON.virtuals||null})}}),Object.defineProperty($,"$__isNested",{enumerable:!1,configurable:!0,writable:!1,value:!0}),Object.defineProperty($,"$isEmpty",{enumerable:!1,configurable:!0,writable:!1,value:function(){return Object.keys(this.get(X,null,BJ1)||{}).length===0}}),Object.defineProperty($,"$__parent",{enumerable:!1,configurable:!0,writable:!1,value:this}),Vu(A,$,X,J),this.$__.getters[X]=$}return this.$__.getters[X]},set:function(Y){if(Y!=null&&Y.$__isNested)Y=Y.$__get();else if(Y instanceof e7&&!Y.$__isNested)Y=Y.$toObject(eD1);(this.$__[ND]||this).$set(X,Y)}});else Object.defineProperty(B,F,{enumerable:!0,configurable:!0,get:function(){return this[AJ1].call(this.$__[ND]||this,X,null,Z)},set:function(Y){this.$set.call(this.$__[ND]||this,X,Y)}})}function JJ1(F){let A={};return Object.getOwnPropertyNames(F).forEach(function(B){if(["isNew","$__","$errors","errors","_doc","$locals","$op","__parentArray","__index","$isDocumentArrayElement"].indexOf(B)===-1)return;A[B]=Object.getOwnPropertyDescriptor(F,B),A[B].enumerable=!1}),A}});var Iu=K((gI1,wu)=>{wu.exports=function F(A){if(A==null)return null;return Object.keys(A)[0]}});var F8=K((HJ1)=>{/*!
161
+ * Module dependencies.
162
+ */var $J1=H6().Binary,Nu=l0(),Pu=e5(),GJ1=_2(),EJ1=import.meta.require("util");HJ1.flatten=Mu;HJ1.modifiedPaths=Tu;/*!
163
+ * ignore
164
+ */function Mu(F,A,B,D){let J;if(F&&Pu(F)&&!Buffer.isBuffer(F))J=Object.keys(F.toObject({transform:!1,virtuals:!1})||{});else J=Object.keys(F||{});let X=J.length,Z={};A=A?A+".":"";for(let Y=0;Y<X;++Y){let $=J[Y],G=F[$];Z[A+$]=G;let E=D&&D.path&&D.path(A+$),H=D&&D.nested&&D.nested[A+$];if(E&&E.instance==="Mixed")continue;if(ju(G)){if(B&&B.skipArrays&&Array.isArray(G))continue;let q=Mu(G,A+$,B,D);for(let W in q)Z[W]=q[W];if(Array.isArray(G))Z[A+$]=G}if(H){let q=Object.keys(D.paths);for(let W of q)if(W.startsWith(A+$+".")&&!Z.hasOwnProperty(W))Z[W]=void 0}}return Z}/*!
165
+ * ignore
166
+ */function Tu(F,A,B,D=null){if(F==null||typeof F!=="object")return;if(D==null)D={raw:{update:F,path:A},trace:new WeakSet};if(D.trace.has(F))throw new GJ1(`a circular reference in the update value, updateValue:
167
+ ${EJ1.inspect(D.raw.update,{showHidden:!1,depth:1})}
168
+ updatePath: '${D.raw.path}'`);D.trace.add(F);let J=Object.keys(F||{}),X=J.length;B=B||{},A=A?A+".":"";for(let Z=0;Z<X;++Z){let Y=J[Z],$=F[Y],G=A+Y;if(B[G]=!0,!Buffer.isBuffer($)&&Pu($))$=$.toObject({transform:!1,virtuals:!1});if(ju($))Tu($,A+Y,B,D)}return D.trace.delete(F),B}/*!
169
+ * ignore
170
+ */function ju(F){return F&&typeof F==="object"&&!(F instanceof Date)&&!Nu(F,"ObjectId")&&(!Array.isArray(F)||F.length!==0)&&!(F instanceof Buffer)&&!Nu(F,"Decimal128")&&!(F instanceof $J1)}});var W0=K((yI1,ku)=>{ku.exports=function F(A,B,D){let J,X=!1;if(typeof B==="string"){if(B.indexOf(".")===-1){let $=CH(A,B);if($==null)return D;return $}J=B.split(".")}else if(X=!0,J=B,J.length===1){let $=CH(A,J[0]);if($==null)return D;return $}let Z=B,Y=A;for(let $ of J){if(Y==null)return D;if(!X&&Y[Z]!=null)return Y[Z];if(Y=CH(Y,$),!X)Z=Z.substr($.length+1)}return Y==null?D:Y};function CH(F,A){if(F==null)return F;if(F instanceof Map)return F.get(A);return F[A]}});var KH=K((vI1,Su)=>{var Ou=l0();Su.exports=function F(A,B){if(typeof A==="string"&&typeof B==="string")return A===B;if(typeof A==="number"&&typeof B==="number")return A===B;if(Ou(A,"ObjectId")&&Ou(B,"ObjectId"))return A.toString()===B.toString();return!1}});var MD=K((hI1,uu)=>{var zJ1=KH();uu.exports=function F(A,B){if(A==null||A.discriminators==null)return null;for(let D of Object.keys(A.discriminators)){let J=A.discriminators[D];if(J.discriminatorMapping==null)continue;if(zJ1(J.discriminatorMapping.value,B))return J}return null}});var fu=K((mI1,xu)=>{var CJ1=W0(),KJ1=MD();xu.exports=function F(A,B,D){D=D||{};let J=D.typeOnly,X=Array.isArray(B)?B:B.indexOf(".")===-1?[B]:B.split("."),Z=null,Y="adhocOrUndefined",$=KJ1(A.schema,A.get(A.schema.options.discriminatorKey))||A.schema;for(let G=0;G<X.length;++G){let E=X.slice(0,G+1).join(".");if(Z=$.path(E),Z==null){Y="adhocOrUndefined";continue}if(Z.instance==="Mixed")return J?"real":Z;if(Y=$.pathType(E),(Z.$isSingleNested||Z.$isMongooseDocumentArrayElement)&&Z.schema.discriminators!=null){let H=Z.schema.discriminators,q=A.get(E+"."+CJ1(Z,"schema.options.discriminatorKey"));if(q==null||H[q]==null)continue;let W=X.slice(G+1).join(".");return F(A.get(E),W,D)}}return J?Y:Z}});var gu=K((dI1,_u)=>{var UJ1=W0();_u.exports=function F(A,B,D){let J=D!=null?Object.keys(UJ1(A.tree,D,{})):Object.keys(A.tree),X=new Set(Object.keys(B)),Z;if(X.size>1){Z=new Set;for(let Y of J)if(X.has(Y))Z.add(Y);for(let Y of X)if(!Z.has(Y))Z.add(Y);Z=Array.from(Z)}else Z=Array.from(X);return Z}});var yu=K((cI1,bu)=>{bu.exports=function F(A,B){if(B.length===1)return;let D=B[0],J=void 0;for(let X=0;X<B.length-1;++X){let Z=A.path(D);if(Z&&Z.schema)J=Z.schema.options.strict,A=Z.schema,D=Z.$isMongooseDocumentArray&&!isNaN(B[X+1])?"":B[X+1];else D+=D.length?"."+B[X+1]:B[X+1]}return J}});var TD=K((lI1,vu)=>{var QJ1=X1(),LJ1=new Set(["__index","__parentArray","_doc"]);vu.exports=function F(A,B){if(QJ1.isPOJO(A)&&A.$__!=null&&A._doc!=null){if(B){let D={};for(let J of Object.keys(A)){if(typeof J==="symbol")continue;if(J[0]==="$")continue;if(LJ1.has(J))continue;D[J]=A[J]}return{...A._doc,...D}}return A._doc}return A}});var A8=K((pI1,hu)=>{/*!
171
+ * ignore
172
+ */hu.exports=function F(A){if(A==null)return!0;if(typeof A==="object")return!("$meta"in A)&&!("$slice"in A);return!0}});var B8=K((iI1,mu)=>{var VJ1=A8(),RJ1=l7();/*!
173
+ * ignore
174
+ */mu.exports=function F(A){if(A==null)return null;let B=Object.keys(A),D=null;if(B.length===1&&B[0]==="_id")D=!A._id;else for(let J=0;J<B.length;++J){let X=B[J];if(X!=="_id"&&VJ1(A[X])){if(D=RJ1(A[X])?F(A[X])??D:!A[X],D!=null)break}}return D}});var UH=K((nI1,du)=>{var wJ1=A8();du.exports=function F(A,B){if(A==null)return!1;if(B==="_id")return A._id===0;let D=Object.keys(A),J=null;for(let X of D)if(wJ1(A[X])){J=A[B]===1?"inclusive":"exclusive";break}if(J==="inclusive")return A[B]!==1;if(J==="exclusive")return A[B]===0;return!1}});var QH=K((sI1,cu)=>{var IJ1=X1();cu.exports=function F(A,B){if(A._doc._id==null||B==null||B.length===0)return;let D=String(A._doc._id);for(let J of B){if(J.isVirtual)continue;let Z=J.path.split(".");for(let Y=0;Y<Z.length-1;++Y){let $=Z.slice(0,Y+1).join("."),G=Z.slice(Y+1).join("."),E=A.get($);if(E==null)continue;if(IJ1.isMongooseDocumentArray(E)){for(let H=0;H<E.length;++H)if(E[H])E[H].populated(G,J._docs[D]==null?void 0:J._docs[D][H],J);break}}}}});var LH=K((aI1,pu)=>{var{isPOJO:NJ1}=X1();pu.exports=lu;function lu(F){let A=Object.keys(F),B=A.length,D,J,X;while(B--){if(J=A[B],X=F[J],NJ1(X))F[J]=lu(X);if(F[J]===void 0){delete F[J];continue}D=!0}return D?F:void 0}});var VH=K((rI1,iu)=>{var PJ1=/\./g;iu.exports=function F(A){if(A.indexOf(".")===-1)return[A];let B=A.split(PJ1),D=B.length,J=new Array(D),X="";for(let Z=0;Z<D;++Z)X+=X.length!==0?"."+B[Z]:B[Z],J[Z]=X;return J}});var su=K((tI1,nu)=>{nu.exports=function F(A,B,D,J,X){let Z=Object.keys(A).reduce(($,G)=>$||G.startsWith(B+"."),!1),Y=B+"."+D.options.discriminatorKey;if(!Z&&X.length===1&&X[0]===Y)J.splice(J.indexOf(Y),1)}});var M6=K((oI1,au)=>{var MJ1=KH();au.exports=function F(A,B){if(A==null)return null;for(let D of Object.keys(A)){let J=A[D];if(J.schema&&J.schema.discriminatorMapping&&MJ1(J.schema.discriminatorMapping.value,B))return J}return null}});var jD=K((eI1,ru)=>{/*!
175
+ * ignore
176
+ */ru.exports=function F(A,B){let D=B.split("."),J="",X,Z,Y;for(let $=0;$<D.length;++$)if(J+=J.length?".":""+D[$],A[J]){Z=Object.keys(A),Y=Z.length;for(X=0;X<Y;++X)if(Z[$].indexOf(J+".")===0&&Z[$].indexOf(B)!==0)continue;return!0}return!1}});var YF=K((xJ1)=>{/*!
177
+ * Module dependencies
178
+ */var tu=YH(),TJ1=su(),ou=W0(),jJ1=M6(),kJ1=A8(),OJ1=Z0(),SJ1=jD();xJ1.preparePopulationOptionsMQ=function F(A,B){let D=A._mongooseOptions.populate,J=Object.keys(D).reduce((Y,$)=>Y.concat([D[$]]),[]);if(B.lean!=null)J.filter((Y)=>(Y&&Y.options&&Y.options.lean)==null).forEach(uJ1(B.lean));let X=A&&A.options&&A.options.session||null;if(X!=null)J.forEach((Y)=>{if(Y.options==null){Y.options={session:X};return}if(!("session"in Y.options))Y.options.session=X});let Z=A._fieldsForExec();for(let Y=0;Y<J.length;++Y)if(J[Y]instanceof tu)J[Y]=new tu({...J[Y],_queryProjection:Z,_localModel:A.model});else J[Y]._queryProjection=Z,J[Y]._localModel=A.model;return J};xJ1.createModel=function F(A,B,D,J,X){A.hooks.execPreSync("createModel",B);let Z=A.schema?A.schema.discriminatorMapping:null,Y=Z&&Z.isRoot?Z.key:null,$=B[Y];if(Y&&$&&A.discriminators){let E=A.discriminators[$]||jJ1(A.discriminators,$);if(E){let H=OJ1(J);return xJ1.applyPaths(H,E.schema),new E(void 0,H,!0)}}let G={skipId:!0,isNew:!1,willInit:!0};if(X!=null&&"defaults"in X)G.defaults=X.defaults;return new A(void 0,D,G)};/*!
179
+ * ignore
180
+ */xJ1.createModelAndInit=function F(A,B,D,J,X,Z,Y){let $=Z?{populated:Z}:void 0,G=xJ1.createModel(A,B,D,J,X);try{G.$init(B,$,Y)}catch(E){Y(E,G)}};/*!
181
+ * ignore
182
+ */xJ1.applyPaths=function F(A,B,D){let J,X,Z=new Set;if(A){X=Object.keys(A);let q=[];for(let W=0;W<X.length;++W){let z=X[W];if(X[W][0]!=="-")continue;if(delete A[z],z==="-_id")A._id=0;else q.push(z.slice(1))}X=Object.keys(A);for(let W=0;W<X.length;++W){if(X[W][0]==="+")continue;let z=A[X[W]];if(!kJ1(z))continue;if(X[W]==="_id"&&X.length>1)continue;if(X[W]===B.options.discriminatorKey&&X.length>1&&z!=null&&!z)continue;J=!z;break}for(let W of q){let z=B.path(W);if(!z||!z.selected||J!==!1)A[W]=0,J=!0;else if(z&&z.selected&&J===!1)Z.add(W)}}let Y=[],$=[],G=[];switch(E(B),J){case!0:for(let q of $)A[q]=0;break;case!1:if(B&&B.paths._id&&B.paths._id.options&&B.paths._id.options.select===!1)A._id=0;for(let q of Y){if(Z.has(q))continue;if(SJ1(A,q))continue;A[q]=A[q]||1}break;case void 0:if(A==null)break;for(let q of Object.keys(A||{}))if(q.startsWith("+"))delete A[q];for(let q of $){if(A[q]!=null)continue;A[q]=0}break}function E(q,W){if(W||(W=""),G.indexOf(q)!==-1)return[];G.push(q);let z=[];return q.eachPath(function(C,U){if(W)C=W+"."+C;if(U.$isSchemaMap||C.endsWith(".$*")){let L="+"+C,V=A&&L in A;if(U.options&&U.options.select===!1&&!V)$.push(C);return}let Q=H(C,U);if(Q==null&&!Array.isArray(U)&&U.$isMongooseArray&&!U.$isMongooseDocumentArray)Q=H(C,U.caster);if(Q!=null)z.push(Q);if(U.schema){let L=E(U.schema,C);if(J===!1)TJ1(A,C,U.schema,Y,L)}}),G.pop(),z}function H(q,W){if(A==null)return;if(typeof W.selected!=="boolean")return;if(W.selected===!1&&A[q]){if(D)A[q]=0;return}if(!J&&W.selected&&q===B.options.discriminatorKey&&A[q]!=null&&!A[q]){delete A[q];return}if(J===!1&&W.selected&&A[q]!=null&&!A[q]){delete A[q];return}let z="+"+q;if(A&&z in A){if(delete A[z],J===!1&&X.length>1&&!~X.indexOf(q)&&!D)A[q]=1;else if(J==null&&D&&W.selected===!1)A[q]=0;return}let U=q.split("."),Q="";for(let L=0;L<U.length;++L)if(Q+=Q.length?"."+U[L]:U[L],$.indexOf(Q)!==-1)return;if(!J&&(W&&W.options&&W.options.$skipDiscriminatorCheck||!1)){let L="";for(let V=0;V<U.length;++V){L+=(L.length===0?"":".")+U[V];let w=ou(A,L,!1)||ou(A,L+".$",!1);if(w&&typeof w!=="object")return}}return(W.selected?Y:$).push(q),q}};function uJ1(F){return function(A){if(A.options||(A.options={}),F!=null&&Array.isArray(F.virtuals))F=Object.assign({},F),F.virtuals=F.virtuals.filter((B)=>typeof B==="string"&&B.startsWith(A.path+".")).map((B)=>B.slice(A.path.length+1));A.options.lean=F}}});var RH=K((AN1,Fx)=>{function bJ1(F){return!!F&&(typeof F==="object"||typeof F==="function")&&typeof F.then==="function"}Fx.exports=bJ1});var Bx=K((BN1,Ax)=>{Ax.exports=function F(A,B,D){let J=B[0],X=D,Z=A;for(let Y=0;Y<B.length-1;++Y){let $=X.path(J);if($&&$.schema){let G=Z.get(J);if(X=$.schema,J=B[Y+1],Array.isArray(G)&&!isNaN(J))G=G[J],J="";if(G==null)break;Z=G}else J+=J.length?"."+B[Y+1]:B[Y+1]}return Z}});var kD=K((DN1,Jx)=>{var P4=y2(),yJ1=Z6(),vJ1=n6().internalToObjectOptions,Dx=import.meta.require("util"),hJ1=X1();Jx.exports=c1;function c1(F,A,B,D,J){if(typeof D==="object"&&D!=null&&J==null)J=D,D=void 0;if(B!=null){let X={isNew:B.isNew};if("defaults"in B.$__)X.defaults=B.$__.defaults;J=Object.assign(X,J)}if(J!=null&&J.path!=null)this.$basePath=J.path;P4.call(this,F,A,D,J),delete this.$__.priorDoc}c1.prototype=Object.create(P4.prototype);Object.defineProperty(c1.prototype,"$isSubdocument",{configurable:!1,writable:!1,value:!0});Object.defineProperty(c1.prototype,"$isSingleNested",{configurable:!1,writable:!1,value:!0});/*!
183
+ * ignore
184
+ */c1.prototype.toBSON=function(){return this.toObject(vJ1)};c1.prototype.save=async function F(A){if(A=A||{},!A.suppressWarning)hJ1.warn("mongoose: calling `save()` on a subdoc does **not** save the document to MongoDB, it only runs save middleware. Use `subdoc.save({ suppressWarning: true })` to hide this warning if you're sure this behavior is right for your app.");return new Promise((B,D)=>{this.$__save((J)=>{if(J!=null)return D(J);B(this)})})};c1.prototype.$__fullPath=function(F){if(!this.$__.fullPath)this.ownerDocument();return F?this.$__.fullPath+"."+F:this.$__.fullPath};c1.prototype.$__pathRelativeToParent=function(F){if(F==null)return this.$basePath;return[this.$basePath,F].join(".")};c1.prototype.$__save=function(F){return yJ1(()=>F(null,this))};/*!
185
+ * ignore
186
+ */c1.prototype.$isValid=function(F){let A=this.$parent(),B=this.$__pathRelativeToParent(F);if(A!=null&&B!=null)return A.$isValid(B);return P4.prototype.$isValid.call(this,F)};/*!
187
+ * ignore
188
+ */c1.prototype.markModified=function(F){P4.prototype.markModified.call(this,F);let A=this.$parent(),B=this.$__pathRelativeToParent(F);if(A==null||B==null)return;let D=this.$__pathRelativeToParent().replace(/\.$/,"");if(A.isDirectModified(D)||this.isNew)return;this.$__parent.markModified(B,this)};/*!
189
+ * ignore
190
+ */c1.prototype.isModified=function(F,A,B){let D=this.$parent();if(D!=null){if(Array.isArray(F)||typeof F==="string")F=Array.isArray(F)?F:F.split(" "),F=F.map((J)=>this.$__pathRelativeToParent(J)).filter((J)=>J!=null);else if(!F)F=this.$__pathRelativeToParent();return D.$isModified(F,A,B)}return P4.prototype.isModified.call(this,F,A,B)};c1.prototype.$markValid=function(F){P4.prototype.$markValid.call(this,F);let A=this.$parent(),B=this.$__pathRelativeToParent(F);if(A!=null&&B!=null)A.$markValid(B)};/*!
191
+ * ignore
192
+ */c1.prototype.invalidate=function(F,A,B){P4.prototype.invalidate.call(this,F,A,B);let D=this.$parent(),J=this.$__pathRelativeToParent(F);if(D!=null&&J!=null)D.invalidate(J,A,B);else if(A.kind==="cast"||A.name==="CastError"||J==null)throw A;return this.ownerDocument().$__.validationError};/*!
193
+ * ignore
194
+ */c1.prototype.$ignore=function(F){P4.prototype.$ignore.call(this,F);let A=this.$parent(),B=this.$__pathRelativeToParent(F);if(A!=null&&B!=null)A.$ignore(B)};c1.prototype.ownerDocument=function(){if(this.$__.ownerDocument)return this.$__.ownerDocument;let F=this,A=[],B=new Set([F]);while(!0){if(typeof F.$__pathRelativeToParent!=="function")break;A.unshift(F.$__pathRelativeToParent(void 0,!0));let D=F.$parent();if(D==null)break;if(F=D,B.has(F))throw new Error("Infinite subdocument loop: subdoc with _id "+F._id+" is a parent of itself");B.add(F)}return this.$__.fullPath=A.join("."),this.$__.ownerDocument=F,this.$__.ownerDocument};/*!
195
+ * ignore
196
+ */c1.prototype.$__fullPathWithIndexes=function(){let F=this,A=[],B=new Set([F]);while(!0){if(typeof F.$__pathRelativeToParent!=="function")break;A.unshift(F.$__pathRelativeToParent(void 0,!1));let D=F.$parent();if(D==null)break;if(F=D,B.has(F))throw new Error("Infinite subdocument loop: subdoc with _id "+F._id+" is a parent of itself");B.add(F)}return A.join(".")};c1.prototype.parent=function(){return this.$__parent};c1.prototype.$parent=c1.prototype.parent;c1.prototype.$__deleteOne=function(F){if(F==null)return;return F(null,this)};c1.prototype.$__removeFromParent=function(){this.$__parent.set(this.$basePath,null)};c1.prototype.deleteOne=function(F,A){if(typeof F==="function")A=F,F=null;if(mJ1(this),!F||!F.noop){this.$__removeFromParent();let B=this.ownerDocument();B.$__.removedSubdocs=B.$__.removedSubdocs||[],B.$__.removedSubdocs.push(this)}return this.$__deleteOne(A)};/*!
197
+ * ignore
198
+ */c1.prototype.populate=function(){throw new Error('Mongoose does not support calling populate() on nested docs. Instead of `doc.nested.populate("path")`, use `doc.populate("nested.path")`')};c1.prototype.inspect=function(){return this.toObject()};if(Dx.inspect.custom)c1.prototype[Dx.inspect.custom]=c1.prototype.inspect;function mJ1(F){let A=F.ownerDocument();function B(){A.$removeListener("save",B),A.$removeListener("deleteOne",B),F.emit("deleteOne",F),F.constructor.emit("deleteOne",F)}A.$on("save",B),A.$on("deleteOne",B)}});var D8=K((JN1,Yx)=>{/*!
199
+ * Module dependencies.
200
+ */var Xx=import.meta.require("events").EventEmitter,Zx=kD(),dJ1=X1(),$F=t().documentArrayParent;function v2(F,A,B,D,J){if(dJ1.isMongooseDocumentArray(A))this.__parentArray=A,this[$F]=A.$parent();else this.__parentArray=void 0,this[$F]=void 0;this.$setIndex(J),this.$__parent=this[$F];let X;if(typeof B==="object"&&B!=null)X={isNew:!0,...B},B=void 0;else X={isNew:!0};Zx.call(this,F,D,this[$F],B,X)}/*!
201
+ * Inherit from Subdocument
202
+ */v2.prototype=Object.create(Zx.prototype);v2.prototype.constructor=v2;Object.defineProperty(v2.prototype,"$isSingleNested",{configurable:!1,writable:!1,value:!1});Object.defineProperty(v2.prototype,"$isDocumentArrayElement",{configurable:!1,writable:!1,value:!0});for(let F in Xx.prototype)v2[F]=Xx.prototype[F];/*!
203
+ * ignore
204
+ */v2.prototype.$setIndex=function(F){if(this.__index=F,this.$__!=null&&this.$__.validationError!=null){let A=Object.keys(this.$__.validationError.errors);for(let B of A)this.invalidate(B,this.$__.validationError.errors[B])}};/*!
205
+ * ignore
206
+ */v2.prototype.populate=function(){throw new Error('Mongoose does not support calling populate() on nested docs. Instead of `doc.arr[0].populate("path")`, use `doc.populate("arr.0.path")`')};/*!
207
+ * ignore
208
+ */v2.prototype.$__removeFromParent=function(){let F=this._doc._id;if(!F)throw new Error("For your own good, Mongoose does not know how to remove an ArraySubdocument that has no _id");this.__parentArray.pull({_id:F})};v2.prototype.$__fullPath=function(F,A){if(this.__index==null)return null;if(!this.$__.fullPath)this.ownerDocument();if(A)return F?this.$__.fullPath+"."+F:this.$__.fullPath;return F?this.$__.fullPath+"."+this.__index+"."+F:this.$__.fullPath+"."+this.__index};v2.prototype.$__pathRelativeToParent=function(F,A){if(this.__index==null||(!this.__parentArray||!this.__parentArray.$path))return null;if(A)return F==null?this.__parentArray.$path():this.__parentArray.$path()+"."+F;if(F==null)return this.__parentArray.$path()+"."+this.__index;return this.__parentArray.$path()+"."+this.__index+"."+F};v2.prototype.$parent=function(){return this[$F]};v2.prototype.parentArray=function(){return this.__parentArray};/*!
209
+ * Module exports.
210
+ */Yx.exports=v2});var uD=K((XN1,Cx)=>{var NH=y2(),wH=D8(),cJ1=z1(),$x=ID(),lJ1=Z0(),Gx=n6().internalToObjectOptions,qx=D6(),E2=X1(),IH=l0(),y3=t().arrayAtomicsSymbol,v3=t().arrayParentSymbol,h3=t().arrayPathSymbol,h2=t().arraySchemaSymbol,Wx=t().populateModelSymbol,pJ1=Symbol("mongoose#Array#sliced"),Ex=Array.prototype.push;/*!
211
+ * ignore
212
+ */var SD={$__getAtomics(){let F=[],A=Object.keys(this[y3]||{}),B=A.length,D=Object.assign({},Gx,{_isNested:!0});if(B===0)return F[0]=["$set",this.toObject(D)],F;while(B--){let J=A[B],X=this[y3][J];if(E2.isMongooseObject(X))X=X.toObject(D);else if(Array.isArray(X))X=this.toObject.call(X,D);else if(X!=null&&Array.isArray(X.$each))X.$each=this.toObject.call(X.$each,D);else if(X!=null&&typeof X.valueOf==="function")X=X.valueOf();if(J==="$addToSet")X={$each:X};F.push([J,X])}return F},$atomics(){/*!
213
+ * ignore
214
+ */return this[y3]},$parent(){/*!
215
+ * ignore
216
+ */return this[v3]},$path(){/*!
217
+ * ignore
218
+ */return this[h3]},$shift(){this._registerAtomic("$pop",-1),this._markModified();let F=this.__array;if(F._shifted)return;return F._shifted=!0,[].shift.call(F)},$pop(){if(this._registerAtomic("$pop",1),this._markModified(),this._popped)return;return this._popped=!0,[].pop.call(this)},$schema(){/*!
219
+ * ignore
220
+ */return this[h2]},_cast(F){let A=!1,B,D=this[v3];if(D)A=D.$populated(this[h3],!0);if(A&&F!==null&&F!==void 0){if(B=A.options[Wx],B==null)throw new cJ1("No populated model found for path `"+this[h3]+"`. This is likely a bug in Mongoose, please report an issue on github.com/Automattic/mongoose.");if(Buffer.isBuffer(F)||IH(F,"ObjectId")||!E2.isObject(F))F={_id:F};if(!(F.schema&&F.schema.discriminatorMapping&&F.schema.discriminatorMapping.key!==void 0))F=new B(F);return this[h2].caster.applySetters(F,D,!0)}return this[h2].caster.applySetters(F,D,!1)},_mapCast(F,A){return this._cast(F,this.length+A)},_markModified(F){let A=this[v3],B;if(A){if(B=this[h3],arguments.length)B=B+"."+F;if(B!=null&&B.endsWith(".$"))return this;A.markModified(B,arguments.length!==0?F:A)}return this},_registerAtomic(F,A){if(this[pJ1])return;if(F==="$set")return this[y3]={$set:A},$x(this[v3],this[h3]),this._markModified(),this;let B=this[y3];if(F==="$pop"&&!("$pop"in B)){let J=this;this[v3].once("save",function(){J._popped=J._shifted=null})}if(B.$set||Object.keys(B).length&&!(F in B))return this[y3]={$set:this},this;let D;if(F==="$pullAll"||F==="$addToSet")B[F]||(B[F]=[]),B[F]=B[F].concat(A);else if(F==="$pullDocs"){let J=B.$pull||(B.$pull={});if(A[0]instanceof wH)D=J.$or||(J.$or=[]),Array.prototype.push.apply(D,A.map((X)=>{return X.toObject({transform:(Z,Y)=>{if(X==null||X.$__==null)return Y;return Object.keys(X.$__.activePaths.getStatePaths("default")).forEach(($)=>{qx.unset($,Y),zx(Y,$)}),Y},virtuals:!1})}));else D=J._id||(J._id={$in:[]}),D.$in=D.$in.concat(A)}else if(F==="$push")if(B.$push=B.$push||{$each:[]},A!=null&&E2.hasUserDefinedProperty(A,"$each"))B.$push=A;else if(A.length===1)B.$push.$each.push(A[0]);else if(A.length<1e4)B.$push.$each.push(...A);else for(let J of A)B.$push.$each.push(J);else B[F]=A;return this},addToSet(){OD(this,arguments),Hx(this,arguments);let F=[].map.call(arguments,this._mapCast,this),A=[],B="";if(F[0]instanceof wH)B="doc";else if(F[0]instanceof Date)B="date";else if(IH(F[0],"ObjectId"))B="ObjectId";let D=E2.isMongooseArray(F)?F.__array:F,J=E2.isMongooseArray(this)?this.__array:this;return D.forEach(function(X){let Z,Y=+X;switch(B){case"doc":Z=this.some(function($){return $.equals(X)});break;case"date":Z=this.some(function($){return+$===Y});break;case"ObjectId":Z=this.find(($)=>$.toString()===X.toString());break;default:Z=~this.indexOf(X);break}if(!Z)this._markModified(),J.push(X),this._registerAtomic("$addToSet",X),[].push.call(A,X)},this),A},hasAtomics(){if(!E2.isPOJO(this[y3]))return 0;return Object.keys(this[y3]).length},includes(F,A){return this.indexOf(F,A)!==-1},indexOf(F,A){if(IH(F,"ObjectId"))F=F.toString();A=A==null?0:A;let B=this.length;for(let D=A;D<B;++D)if(F==this[D])return D;return-1},inspect(){return JSON.stringify(this)},nonAtomicPush(){let F=[].map.call(arguments,this._mapCast,this);this._markModified();let A=[].push.apply(this,F);return this._registerAtomic("$set",this),A},pop(){this._markModified();let F=[].pop.call(this);return this._registerAtomic("$set",this),F},pull(){let F=[].map.call(arguments,(J,X)=>this._cast(J,X,{defaults:!1}),this),A=this[v3].get(this[h3]);if(E2.isMongooseArray(A))A=A.__array;let B=A.length,D;this._markModified();while(B--)if(D=A[B],D instanceof NH){if(F.some(function(X){return D.equals(X)}))A.splice(B,1)}else if(~this.indexOf.call(F,D))A.splice(B,1);if(F[0]instanceof wH)this._registerAtomic("$pullDocs",F.map(function(J){let X=J.$__getValue("_id");if(X===void 0||J.$isDefault("_id"))return J;return X}));else this._registerAtomic("$pullAll",F);if($x(this[v3],this[h3])>0)this._registerAtomic("$set",this);return this},push(){let F=arguments,A=F,B=F[0]!=null&&E2.hasUserDefinedProperty(F[0],"$each"),D=E2.isMongooseArray(this)?this.__array:this;if(B)A=F[0],F=F[0].$each;if(this[h2]==null)return Ex.apply(this,F);OD(this,F),Hx(this,F),F=[].map.call(F,this._mapCast,this);let J,X=this[y3];if(this._markModified(),B)if(A.$each=F,(X.$push&&X.$push.$each&&X.$push.$each.length||0)!==0&&X.$push.$position!=A.$position){if(A.$position!=null)[].splice.apply(D,[A.$position,0].concat(F)),J=D.length;else J=[].push.apply(D,F);this._registerAtomic("$set",this)}else if(A.$position!=null)[].splice.apply(D,[A.$position,0].concat(F)),J=this.length;else J=[].push.apply(D,F);else A=F,J=Ex.apply(D,F);return this._registerAtomic("$push",A),J},remove(){return this.pull.apply(this,arguments)},set(F,A,B){let D=this.__array;if(B)return D[F]=A,this;let J=SD._cast.call(this,A,F);return SD._markModified.call(this,F),D[F]=J,this},shift(){let F=E2.isMongooseArray(this)?this.__array:this;this._markModified();let A=[].shift.call(F);return this._registerAtomic("$set",this),A},sort(){let F=E2.isMongooseArray(this)?this.__array:this,A=[].sort.apply(F,arguments);return this._registerAtomic("$set",this),A},splice(){let F,A=E2.isMongooseArray(this)?this.__array:this;if(this._markModified(),OD(this,Array.prototype.slice.call(arguments,2)),arguments.length){let B;if(this[h2]==null)B=arguments;else{B=[];for(let D=0;D<arguments.length;++D)B[D]=D<2?arguments[D]:this._cast(arguments[D],arguments[0]+(D-2))}F=[].splice.apply(A,B),this._registerAtomic("$set",this)}return F},toBSON(){/*!
221
+ * ignore
222
+ */return this.toObject(Gx)},toObject(F){let A=E2.isMongooseArray(this)?this.__array:this;if(F&&F.depopulate)return F=lJ1(F),F._isNested=!0,[].concat(A).map(function(B){return B instanceof NH?B.toObject(F):B});return[].concat(A)},$toObject(){return this.constructor.prototype.toObject.apply(this,arguments)},unshift(){OD(this,arguments);let F;if(this[h2]==null)F=arguments;else F=[].map.call(arguments,this._cast,this);let A=E2.isMongooseArray(this)?this.__array:this;return this._markModified(),[].unshift.apply(A,F),this._registerAtomic("$set",this),this.length}};/*!
223
+ * ignore
224
+ */function iJ1(F,A){if(!A)return!1;for(let B of F){if(B==null)return!1;let D=B.constructor;if(!(B instanceof NH)||D.modelName!==A&&D.baseModelName!==A)return!1}return!0}/*!
225
+ * Minimize _just_ empty objects along the path chain specified
226
+ * by `parts`, ignoring all other paths. Useful in cases where
227
+ * you want to minimize after unsetting a path.
228
+ *
229
+ * #### Example:
230
+ *
231
+ * const obj = { foo: { bar: { baz: {} } }, a: {} };
232
+ * _minimizePath(obj, 'foo.bar.baz');
233
+ * obj; // { a: {} }
234
+ */function zx(F,A,B){if(typeof A==="string"){if(A.indexOf(".")===-1)return;A=qx.stringToParts(A)}if(B=B||0,B>=A.length)return;if(F==null||typeof F!=="object")return;if(zx(F[A[0]],A,B+1),F[A[0]]!=null&&typeof F[A[0]]==="object"&&Object.keys(F[A[0]]).length===0)delete F[A[0]]}/*!
235
+ * ignore
236
+ */function OD(F,A){let B=F==null?null:F[h2]&&F[h2].caster&&F[h2].caster.options&&F[h2].caster.options.ref||null;if(F.length===0&&A.length!==0){if(iJ1(A,B))F[v3].$populated(F[h3],[],{[Wx]:A[0].constructor})}}/*!
237
+ * If `docs` isn't all instances of the right model, depopulate `arr`
238
+ */function Hx(F,A){let B=F==null?null:F[h2]&&F[h2].caster&&F[h2].caster.options&&F[h2].caster.options.ref||null,D=F[v3],J=F[h3];if(!B||!D.populated(J))return;for(let X of A){if(X==null)continue;if(typeof X!=="object"||X instanceof String||X instanceof Number||X instanceof Buffer||E2.isMongooseType(X)){D.depopulate(J);break}}}var nJ1=["filter","flat","flatMap","map","slice"];for(let F of nJ1){if(Array.prototype[F]==null)continue;SD[F]=function(){let A=E2.isMongooseArray(this)?this.__array:this,B=[].concat(A);return B[F].apply(B,arguments)}}Cx.exports=SD});var MH=K((Vx,Rx)=>{/*!
239
+ * Module dependencies.
240
+ */var sJ1=y2(),PH=uD(),xD=t().arrayAtomicsSymbol,aJ1=t().arrayAtomicsBackupSymbol,Kx=t().arrayParentSymbol,rJ1=t().arrayPathSymbol,Ux=t().arraySchemaSymbol,Qx=Array.prototype.push,Lx=/^\d+$/;function tJ1(F,A,B,D){let J;if(Array.isArray(F)){let Y=F.length;if(Y===0)J=new Array;else if(Y===1)J=new Array(1),J[0]=F[0];else if(Y<1e4)J=new Array,Qx.apply(J,F);else{J=new Array;for(let $=0;$<Y;++$)Qx.call(J,F[$])}}else J=[];let X={[xD]:{},[aJ1]:void 0,[rJ1]:A,[Ux]:D,[Kx]:void 0,isMongooseArray:!0,isMongooseArrayProxy:!0,__array:J};if(F&&F[xD]!=null)X[xD]=F[xD];if(B!=null&&B instanceof sJ1)X[Kx]=B,X[Ux]=D||B.schema.path(A);let Z=new Proxy(J,{get:function(Y,$){if(X.hasOwnProperty($))return X[$];if(PH.hasOwnProperty($))return PH[$];if(D&&D.virtuals&&D.virtuals.hasOwnProperty($))return D.virtuals[$].applyGetters(void 0,Y);if(typeof $==="string"&&Lx.test($)&&D?.$embeddedSchemaType!=null)return D.$embeddedSchemaType.applyGetters(J[$],B);return J[$]},set:function(Y,$,G){if(typeof $==="string"&&Lx.test($))PH.set.call(Z,$,G,!1);else if(X.hasOwnProperty($))X[$]=G;else if(D&&D.virtuals&&D.virtuals.hasOwnProperty($))D.virtuals[$].applySetters(G,Y);else J[$]=G;return!0}});return Z}/*!
241
+ * Module exports.
242
+ */Rx.exports=Vx=tJ1});var jH=K((ZN1,Ix)=>{var wx=l0(),TH=b3();Ix.exports=function F(A){if(A==null)return A;if(wx(A,"ObjectId"))return A;if(A._id){if(wx(A._id,"ObjectId"))return A._id;if(A._id.toString instanceof Function)return new TH(A._id.toString())}if(A.toString instanceof Function)return new TH(A.toString());return new TH(A)}});var Tx=K((YN1,Mx)=>{var fD=uD(),oJ1=y2(),eJ1=jH(),Nx=M6(),FX1=n6().internalToObjectOptions,_D=X1(),kH=l0(),bD=t().arrayParentSymbol,SH=t().arrayPathSymbol,OH=t().arraySchemaSymbol,Px=t().documentArrayParent,AX1=Array.prototype.toString,uH={toBSON(){/*!
243
+ * ignore
244
+ */return this.toObject(FX1)},toString(){return AX1.call(this.__array.map((F)=>{if(F!=null&&F.$__!=null)return F.toString();return F}))},getArrayParent(){/*!
245
+ * ignore
246
+ */return this[bD]},_cast(F,A,B){if(this[OH]==null)return F;let D=this[OH].casterConstructor;if((D.$isMongooseDocumentArray?_D.isMongooseDocumentArray(F):F instanceof D)||F&&F.constructor&&F.constructor.baseCasterConstructor===D){if(!(F[Px]&&F.__parentArray))F[Px]=this[bD],F.__parentArray=this;return F.$setIndex(A),F}if(F===void 0||F===null)return null;if(Buffer.isBuffer(F)||kH(F,"ObjectId")||!_D.isObject(F))F={_id:F};if(F&&D.discriminators&&D.schema&&D.schema.options&&D.schema.options.discriminatorKey)if(typeof F[D.schema.options.discriminatorKey]==="string"&&D.discriminators[F[D.schema.options.discriminatorKey]])D=D.discriminators[F[D.schema.options.discriminatorKey]];else{let Z=Nx(D.discriminators,F[D.schema.options.discriminatorKey]);if(Z)D=Z}if(D.$isMongooseDocumentArray)return D.cast(F,this,void 0,void 0,A);let X=new D(F,this,B,void 0,A);return X.isNew=!0,X},id(F){let A,B,D;try{A=eJ1(F).toString()}catch(J){A=null}for(let J of this){if(!J)continue;if(D=J.get("_id"),D===null||typeof D==="undefined")continue;else if(D instanceof oJ1){if(B||(B=String(F)),B==D._id)return J}else if(!kH(F,"ObjectId")&&!kH(D,"ObjectId")){if(F==D||_D.deepEqual(F,D))return J}else if(A==D)return J}return null},toObject(F){return[].concat(this.map(function(A){if(A==null)return null;if(typeof A.toObject!=="function")return A;return A.toObject(F)}))},$toObject(){return this.constructor.prototype.toObject.apply(this,arguments)},push(){let F=fD.push.apply(this,arguments);return gD(this),F},pull(){let F=fD.pull.apply(this,arguments);return gD(this),F},shift(){let F=fD.shift.apply(this,arguments);return gD(this),F},splice(){let F=fD.splice.apply(this,arguments);return gD(this),F},inspect(){return this.toObject()},create(F){let A=this[OH].casterConstructor;if(F&&A.discriminators&&A.schema&&A.schema.options&&A.schema.options.discriminatorKey)if(typeof F[A.schema.options.discriminatorKey]==="string"&&A.discriminators[F[A.schema.options.discriminatorKey]])A=A.discriminators[F[A.schema.options.discriminatorKey]];else{let B=Nx(A.discriminators,F[A.schema.options.discriminatorKey]);if(B)A=B}return new A(F,this)},notify(F){/*!
247
+ * ignore
248
+ */let A=this;return function B(D,J){J=J||A;let X=J.length;while(X--){if(J[X]==null)continue;switch(F){case"save":D=A[X];break;default:break}if(_D.isMongooseArray(J[X]))B(D,J[X]);else if(J[X])J[X].emit(F,D)}}},set(F,A,B){let D=this.__array;if(B)return D[F]=A,this;let J=uH._cast.call(this,A,F);return uH._markModified.call(this,F),D[F]=J,this},_markModified(F,A){let B=this[bD],D;if(B){if(D=this[SH],arguments.length)if(A!=null){let J=F.__index;D=D+"."+J+"."+A}else D=D+"."+F;if(D!=null&&D.endsWith(".$"))return this;B.markModified(D,arguments.length!==0?F:B)}return this}};Mx.exports=uH;function gD(F){let A=F[bD];if(!A||A.$__.populated==null)return;let B=Object.keys(A.$__.populated).filter((D)=>D.startsWith(F[SH]+"."));for(let D of B){let J=D.slice((F[SH]+".").length);if(!Array.isArray(A.$__.populated[D].value))continue;A.$__.populated[D].value=F.map((X)=>X.$populated(J))}}});var V9=K(($N1,kx)=>{/*!
249
+ * Module dependencies.
250
+ */var jx=uD(),xH=Tx(),BX1=y2(),fH=t().arrayAtomicsSymbol,DX1=t().arrayAtomicsBackupSymbol,_H=t().arrayParentSymbol,gH=t().arrayPathSymbol,L9=t().arraySchemaSymbol,JX1=Array.prototype.push,XX1=/^\d+$/;function ZX1(F,A,B,D){let J=[],X={[fH]:{},[DX1]:void 0,[gH]:A,[L9]:void 0,[_H]:void 0};if(Array.isArray(F)){if(F[gH]===A&&F[_H]===B)X[fH]=Object.assign({},F[fH]);F.forEach((Y)=>{JX1.call(J,Y)})}if(X[gH]=A,X.__array=J,B&&B instanceof BX1){X[_H]=B,X[L9]=B.$__schema.path(A);while(X[L9]!=null&&X[L9].$isMongooseArray&&!X[L9].$isMongooseDocumentArray)X[L9]=X[L9].casterConstructor}let Z=new Proxy(J,{get:function(Y,$){if($==="isMongooseArray"||$==="isMongooseArrayProxy"||$==="isMongooseDocumentArray"||$==="isMongooseDocumentArrayProxy")return!0;if(X.hasOwnProperty($))return X[$];if(xH.hasOwnProperty($))return xH[$];if(D&&D.virtuals&&D.virtuals.hasOwnProperty($))return D.virtuals[$].applyGetters(void 0,Y);if(jx.hasOwnProperty($))return jx[$];return J[$]},set:function(Y,$,G){if(typeof $==="string"&&XX1.test($))xH.set.call(Z,$,G,!1);else if(X.hasOwnProperty($))X[$]=G;else if(D&&D.virtuals&&D.virtuals.hasOwnProperty($))D.virtuals[$].applySetters(G,Y);else J[$]=G;return!0}});return Z}/*!
251
+ * Module exports.
252
+ */kx.exports=ZX1});var y2=K((nx,sx)=>{/*!
253
+ * Module dependencies.
254
+ */var YX1=AH(),vH=import.meta.require("events").EventEmitter,$X1=Bu(),GX1=ZF(),m2=_2(),Ox=Q9(),EX1=$u(),HX1=EH(),qX1=RD(),Sx=qu(),WX1=J8(),hH=N4(),mD=C9(),vx=lE(),hx=WH(),mH=wD(),bH=ID(),H3=Z0(),zX1=PD().compile,CX1=PD().defineKey,KX1=Iu(),UX1=F8().flatten,yH=fu(),ux=gu(),QX1=yu(),LX1=TD(),xx=Z6(),fx=l0(),mx=A8(),VX1=B8(),_x=UH(),dH=import.meta.require("util").inspect,dx=n6().internalToObjectOptions,RX1=QH(),wX1=LH(),IX1=D6(),cH=VH(),NX1=YF(),$1=X1(),PX1=RH(),vD=$1.deepEqual,MX1=$1.isMongooseObject,EF=t().arrayAtomicsBackupSymbol,N2=t().arrayAtomicsSymbol,TX1=t().documentArrayParent,jX1=t().documentIsModified,cx=t().documentModifiedPaths,kX1=t().documentSchemaSymbol,OX1=t().getSymbol,gx=t().populateModelSymbol,SX1=t().scopeSymbol,uX1=U9().schemaMixedSymbol,xX1=Bx(),yD=t().sessionNewDocuments,hD,bx,GF,fX1=$1.specialProperties;function b(F,A,B,D){if(typeof B==="object"&&B!=null)D=B,B=D.skipId;if(D=Object.assign({},D),this.$__schema==null){let G=$1.isObject(A)&&!A.instanceOfSchema?new WX1(A):A;this.$__setSchema(G),A=B,B=D,D=arguments[4]||{}}if(this.$__=new $X1,D.isNew!=null&&D.isNew!==!0)this.$isNew=D.isNew;if(D.priorDoc!=null)this.$__.priorDoc=D.priorDoc;if(B)this.$__.skipId=B;if(F!=null&&typeof F!=="object")throw new qX1(F,"obj","Document");let J=!0;if(D.defaults!==void 0)this.$__.defaults=D.defaults,J=D.defaults;let X=this.$__schema;if(typeof A==="boolean"||A==="throw"){if(A!==!0)this.$__.strictMode=A;A=void 0}else if(X.options.strict!==!0)this.$__.strictMode=X.options.strict;let Z=X.requiredPaths(!0);for(let G of Z)this.$__.activePaths.require(G);let Y=null;if($1.isPOJO(A)&&Object.keys(A).length>0)Y=VX1(A),this.$__.selected=A,this.$__.exclude=Y;let $=Y===!1&&A?hx(A):null;if(this._doc==null){if(this.$__buildDoc(F,A,B,Y,$,!1),J)mH(this,A,Y,$,!0,null,{skipParentChangeTracking:!0})}if(F){if(this.$__original_set)this.$__original_set(F,void 0,!0,D);else this.$set(F,void 0,!0,D);if(F instanceof b)this.$isNew=F.$isNew}if(D.willInit&&J){if(D.skipDefaults)this.$__.skipDefaults=D.skipDefaults}else if(J)mH(this,A,Y,$,!1,D.skipDefaults);if(!this.$__.strictMode&&F){let G=this;Object.keys(this._doc).forEach(function(H){if(!(H in X.tree)&&!(H in X.methods)&&!(H in X.virtuals)&&!H.startsWith("$"))CX1({prop:H,subprops:null,prototype:G})})}cX1(this)}b.prototype.$isMongooseDocumentPrototype=!0;Object.defineProperty(b.prototype,"isNew",{get:function(){return this.$isNew},set:function(F){this.$isNew=F}});Object.defineProperty(b.prototype,"errors",{get:function(){return this.$errors},set:function(F){this.$errors=F}});/*!
255
+ * ignore
256
+ */b.prototype.$isNew=!0;/*!
257
+ * Document exposes the NodeJS event emitter API, so you can use
258
+ * `on`, `once`, etc.
259
+ */$1.each(["on","once","emit","listeners","removeListener","setMaxListeners","removeAllListeners","addListener"],function(F){b.prototype[F]=function(){if(!this.$__.emitter){if(F==="emit")return;this.$__.emitter=new vH,this.$__.emitter.setMaxListeners(0)}return this.$__.emitter[F].apply(this.$__.emitter,arguments)},b.prototype[`$${F}`]=b.prototype[F]});b.prototype.constructor=b;for(let F in vH.prototype)b[F]=vH.prototype[F];b.prototype.$__schema;b.prototype.schema;Object.defineProperty(b.prototype,"$locals",{configurable:!1,enumerable:!1,get:function(){if(this.$__.locals==null)this.$__.locals={};return this.$__.locals},set:function(F){this.$__.locals=F}});b.prototype.isNew;Object.defineProperty(b.prototype,"$where",{configurable:!1,enumerable:!1,writable:!0});b.prototype.id;b.prototype.$errors;Object.defineProperty(b.prototype,"$op",{get:function(){return this.$__.op||null},set:function(F){this.$__.op=F}});/*!
260
+ * ignore
261
+ */function _X1(F,A,B){if(F==null)return;let D=Object.keys(B.$__schema.paths),J=D.length,X=A.indexOf(".")===-1?[A]:A.split(".");for(let Z=0;Z<J;++Z){let Y="",$=D[Z];if(!$.startsWith(A+"."))continue;let G=B.$__schema.paths[$],E=G.splitPath().slice(X.length),H=E.length;if(G.defaultValue===void 0)continue;let q=F;for(let W=0;W<H;++W){if(q==null)break;let z=E[W];if(W===H-1){if(q[z]!==void 0)break;try{let C=G.getDefault(B,!1);if(C!==void 0)q[z]=C}catch(C){B.invalidate(A+"."+Y,C);break}break}Y+=(!Y.length?"":".")+z,q[z]=q[z]||{},q=q[z]}}}b.prototype.$__buildDoc=function(F,A,B,D,J){let X={},Z=Object.keys(this.$__schema.paths).filter((G)=>!G.includes("$*")),Y=Z.length,$=0;for(;$<Y;++$){let G=Z[$];if(G==="_id"){if(B)continue;if(F&&"_id"in F)continue}let E=this.$__schema.paths[G].splitPath(),H=E.length,q=H-1,W="",z=X,C=!1;for(let U=0;U<H;++U){let Q=E[U];if(!W.length)W=Q;else W+="."+Q;if(D===!0){if(W in A)break}else if(D===!1&&A&&!C){if(W in A)C=!0;else if(!J[W])break}if(U<q)z=z[Q]||(z[Q]={})}}this._doc=X};/*!
262
+ * Converts to POJO when you use the document for querying
263
+ */b.prototype.toBSON=function(){return this.toObject(dx)};b.prototype.init=function(F,A,B){if(typeof A==="function")B=A,A=null;if(this.$__init(F,A),B)B(null,this);return this};b.prototype.$init=function(){return this.constructor.prototype.init.apply(this,arguments)};b.prototype.$__init=function(F,A){if(this.$isNew=!1,A=A||{},F._id!=null&&A.populated&&A.populated.length){let D=String(F._id);for(let J of A.populated){if(J.isVirtual)this.$populated(J.path,$1.getValue(J.path,F),J);else this.$populated(J.path,J._docs[D],J);if(J._childDocs==null)continue;for(let X of J._childDocs){if(X==null||X.$__==null)continue;X.$__.parent=this}J._childDocs=[]}}lx(this,F,this._doc,A),RX1(this,A.populated),this.$emit("init",this),this.constructor.emit("init",this);let B=this.$__.exclude===!1&&this.$__.selected?hx(this.$__.selected):null;return mH(this,this.$__.selected,this.$__.exclude,B,!1,this.$__.skipDefaults),this};function lx(F,A,B,D,J){if(J=J||"",A.$__!=null)A=A._doc;let X=Object.keys(A),Z=X.length,Y,$,G,E=0,H=F.$__.strictMode,q=F.$__schema;while(E<Z)W(E++);function W(z){if(G=X[z],G==="__proto__"||G==="constructor")return;if($=J?J+G:G,Y=q.path($),q.$isRootDiscriminator&&!F.$__isSelected($))return;let C=A[G];if(!Y&&$1.isPOJO(C)){if(!B[G]){if(B[G]={},!H&&!(G in q.tree)&&!(G in q.methods)&&!(G in q.virtuals))F[G]=B[G]}lx(F,C,B[G],D,$+".")}else if(!Y){if(B[G]=C,!H&&!J)F[G]=C}else{if(B.hasOwnProperty(G)&&C!==void 0&&!D.hydratedPopulatedDocs)delete B[G];if(C===null)B[G]=Y._castNullish(null);else if(C!==void 0){let U=C.$__==null?null:C.$__.wasPopulated;if(Y&&!U&&!D.hydratedPopulatedDocs)try{if(D&&D.setters)B[G]=Y.applySetters(C,F,!1);else B[G]=Y.cast(C,F,!0)}catch(Q){F.invalidate(Q.path,new vx({path:Q.path,message:Q.message,type:"cast",value:Q.value,reason:Q}))}else if(D.hydratedPopulatedDocs){if(B[G]=Y.cast(C,F,!0),B[G]&&B[G].$__&&B[G].$__.wasPopulated)F.$populated($,B[G].$__.wasPopulated.value,B[G].$__.wasPopulated.options);else if(Array.isArray(B[G])&&B[G].length&&B[G][0]?.$__?.wasPopulated)F.$populated($,B[G].map((Q)=>Q?.$__?.wasPopulated?.value).filter((Q)=>Q!=null),B[G][0].$__.wasPopulated.options)}else B[G]=C}if(!F.$isModified($))F.$__.activePaths.init($)}}}b.prototype.updateOne=function F(A,B,D){let J=this.constructor.updateOne({_id:this._doc._id},A,B),X=this;if(J.pre(function Z(Y){X.constructor._middleware.execPre("updateOne",X,[X],Y)}),J.post(function Z(Y){X.constructor._middleware.execPost("updateOne",X,[X],{},Y)}),this.$session()!=null){if(!("session"in J.options))J.options.session=this.$session()}if(D!=null)return J.exec(D);return J};b.prototype.replaceOne=function F(){let A=[...arguments];return A.unshift({_id:this._doc._id}),this.constructor.replaceOne.apply(this.constructor,A)};b.prototype.$session=function F(A){if(arguments.length===0){if(this.$__.session!=null&&this.$__.session.hasEnded)return this.$__.session=null,null;return this.$__.session}if(A!=null&&A.hasEnded)throw new m2("Cannot set a document's session to a session that has ended. Make sure you haven't called `endSession()` on the session you are passing to `$session()`.");if(A==null&&this.$__.session==null)return;if(this.$__.session=A,!this.$isSubdocument){let B=this.$getAllSubdocs();for(let D of B)D.$session(A)}return A};b.prototype.$timestamps=function F(A){if(arguments.length===0){if(this.$__.timestamps!=null)return this.$__.timestamps;if(this.$__schema)return this.$__schema.options.timestamps;return}let B=this.$timestamps();if(A!==B)this.$__.timestamps=A;return this};b.prototype.overwrite=function F(A){let B=Array.from(new Set(Object.keys(this._doc).concat(Object.keys(A))));for(let D of B){if(D==="_id")continue;if(this.$__schema.options.versionKey&&D===this.$__schema.options.versionKey)continue;if(this.$__schema.options.discriminatorKey&&D===this.$__schema.options.discriminatorKey)continue;this.$set(D,A[D])}return this};b.prototype.$set=function F(A,B,D,J){if($1.isPOJO(D))J=D,D=void 0;let X=J&&J.merge,Z=D&&D!==!0,Y=D===!0,$,G,E=0,H,q,W,z=J&&"strict"in J,C=z?J.strict:this.$__.strictMode;if(Z)$=this.$__.adhocPaths||(this.$__.adhocPaths={}),$[A]=this.$__schema.interpretAsType(A,D,this.$__schema.options);if(A==null)[A,B]=[B,A];else if(typeof A!=="string"){if(A instanceof b)if(A.$__isNested)A=A.toObject();else A=A.$__schema===this.$__schema?lH(A,{...A._doc}):A._doc;if(A==null)[A,B]=[B,A];W=B?B+".":"",G=ux(this.$__schema,A);let f=G.length,m=J&&J._skipMinimizeTopLevel||!1;if(f===0&&m){if(delete J._skipMinimizeTopLevel,B)this.$set(B,{});return this}J=Object.assign({},J,{_skipMinimizeTopLevel:!1});for(let k=0;k<f;++k){q=G[k];let y=W?W+q:q;H=this.$__schema.pathType(y);let s=A[q];if(D===!0&&!W&&s!=null&&H==="nested"&&this._doc[q]!=null)delete this._doc[q];if($1.isNonBuiltinObject(s)&&H==="nested"){this.$set(y,s,Y,Object.assign({},J,{_skipMarkModified:!0})),_X1(this.$get(y),y,this);continue}else if(C){if(Y&&s===void 0&&this.$get(y)!==void 0)continue;if(H==="adhocOrUndefined")H=yH(this,y,{typeOnly:!0});if(H==="real"||H==="virtual")this.$set(y,s,Y,J);else if(H==="nested"&&s instanceof b)this.$set(y,s.toObject({transform:!1}),Y,J);else if(C==="throw")if(H==="nested")throw new HX1(q,s);else throw new hH(q);else if(H==="nested"&&s==null)this.$set(y,s,Y,J)}else if(s!==void 0)this.$set(y,s,Y,J)}let O={},_=Object.keys(this.$__schema.tree);for(let k=0,y=_.length;k<y;++k)(q=_[k])&&this._doc.hasOwnProperty(q)&&(O[q]=void 0);return this._doc=Object.assign(O,this._doc),this}let U=this.$__schema.pathType(A),Q=null;if(U==="adhocOrUndefined")Q=A.indexOf(".")===-1?[A]:A.split("."),U=yH(this,Q,{typeOnly:!0});if(U==="adhocOrUndefined"&&!z){if(Q==null)Q=A.indexOf(".")===-1?[A]:A.split(".");let f=QX1(this.$__schema,Q);if(f!==void 0)C=f}B=LX1(B,!0);let L=(()=>{if(this.$__.priorDoc!=null)return this.$__.priorDoc.$__getValue(A);if(Y)return;return this.$__getValue(A)})();if(U==="nested"&&B){if(typeof B==="object"&&B!=null){if(B.$__!=null)B=B.toObject(dx);if(B==null)return this.invalidate(A,new m2.CastError("Object",B,A)),this;let f=this.$isModified(A),m=this.$__.savedState!=null&&this.$__.savedState.hasOwnProperty(A);if(this.$__.savedState!=null&&!this.$isNew&&!this.$__.savedState.hasOwnProperty(A)){let _=this.$__getValue(A);this.$__.savedState[A]=_;let k=Object.keys(_||{});for(let y of k)this.$__.savedState[A+"."+y]=_[y]}if(!X)this.$__setValue(A,null),bH(this,A);else return this.$set(B,A,Y,J);let O=ux(this.$__schema,B,A);this.$__setValue(A,{});for(let _ of O)this.$set(A+"."+_,B[_],Y,{...J,_skipMarkModified:!0});if(L!=null&&(!f||m)&&$1.deepEqual(m?this.$__.savedState[A]:L,B))this.unmarkModified(A);else this.markModified(A);return this}return this.invalidate(A,new m2.CastError("Object",B,A)),this}let V;if(Q==null)Q=A.indexOf(".")===-1?[A]:A.split(".");if(typeof this.$__schema.aliases[Q[0]]==="string")Q[0]=this.$__schema.aliases[Q[0]];if(U==="adhocOrUndefined"&&C){let f;for(E=0;E<Q.length;++E){let m=Q.slice(0,E+1).join(".");if(E+1<Q.length&&this.$__schema.pathType(m)==="virtual")return IX1.set(A,B,this),this;if(V=this.$__schema.path(m),V==null)continue;if(V instanceof Ox){f=!0;break}else if(V.$isSchemaMap&&V.$__schemaType instanceof Ox&&E<Q.length-1){f=!0,V=V.$__schemaType;break}}if(V==null)V=yH(this,A);if(!f&&!V){if(C==="throw")throw new hH(A);return this}}else if(U==="virtual")return V=this.$__schema.virtualpath(A),V.applySetters(B,this),this;else V=this.$__path(A);let w=this._doc,j="";for(E=0;E<Q.length-1;++E)if(w=w[Q[E]],j+=(j.length!==0?".":"")+Q[E],!w){if(this.$set(j,{}),!this.$__isSelected(j))this.unmarkModified(j);w=this.$__getValue(j)}let T;if(Q.length<=1)T=A;else{let f=Q.length;for(E=0;E<f;++E){let m=Q.slice(0,E+1).join(".");if(this.$get(m,null,{getters:!1})===null){T=m;break}}if(!T)T=A}if(!V){if(this.$__set(T,A,J,Y,Q,V,B,L),U==="nested"&&B==null)bH(this,A);return this}if(V.$isSingleNested||V.$isMongooseArray)mX1(this,A);if(B!=null&&X&&V.$isSingleNested){if(B instanceof b)B=B.toObject({virtuals:!1,transform:!1});let f=Object.keys(B);for(let m of f)this.$set(A+"."+m,B[m],Y,J);return this}let M=!0;try{let f=(()=>{if(V.options==null)return!1;if(!(B instanceof b))return!1;let k=B.constructor,y=V.options.ref;if(y!=null&&(y===k.modelName||y===k.baseModelName))return!0;let s=V.options.refPath;if(s==null)return!1;let P1=B.get(s);return P1===k.modelName||P1===k.baseModelName})(),m=!1;if(f&&B instanceof b&&(!B.$__.wasPopulated||$1.deepEqual(B.$__.wasPopulated.value,B._doc._id))){let k=V&&V.$isSingleNested?V.cast(B,this):B._doc._id;this.$populated(A,k,{[gx]:B.constructor}),B.$__.wasPopulated={value:k},m=!0}let O,_=this.$__schema.options.typeKey;if(V.options&&Array.isArray(V.options[_])&&V.options[_].length&&V.options[_][0]&&V.options[_][0].ref&&gX1(B,V.options[_][0].ref)){O={[gx]:B[0].constructor},this.$populated(A,B.map(function(k){return k._doc._id}),O);for(let k of B)k.$__.wasPopulated={value:k._doc._id};m=!0}if(!f||!V.$isSingleNested||!B.$__){let k=this;if(this.$__schema.singleNestedPaths[A]!=null&&Q.length>1)k=xX1(this,Q,this.schema);if(J!=null&&J.overwriteImmutable)B=V.applySetters(B,k,!1,L,{overwriteImmutable:!0});else B=V.applySetters(B,k,!1,L)}if(Array.isArray(B)&&!Array.isArray(V)&&V.$isMongooseDocumentArray&&B.length!==0&&B[0]!=null&&B[0].$__!=null&&B[0].$__.populated!=null){let k=Object.keys(B[0].$__.populated);for(let y of k)this.$populated(A+"."+y,B.map((s)=>s.$populated(y)),B[0].$__.populated[y].options);m=!0}if(!m&&this.$__.populated){if(Array.isArray(B)&&this.$__.populated[A]){for(let k=0;k<B.length;++k)if(B[k]instanceof b)B.set(k,B[k]._doc._id,!0)}delete this.$__.populated[A]}if(B!=null&&V.$isSingleNested)dX1(B,V,L);this.$markValid(A)}catch(f){if(f instanceof m2.StrictModeError&&f.isImmutableError)this.invalidate(A,f);else if(f instanceof m2.CastError){if(this.invalidate(f.path,f),f.$originalErrorPath)this.invalidate(A,new m2.CastError(V.instance,B,A,f.$originalErrorPath))}else this.invalidate(A,new m2.CastError(V.instance,B,A,f));M=!1}if(M){let f=null,m=null;if(!Y){let k=this.$isSubdocument?this.ownerDocument():this;f=k.$__.savedState,m=this.$isSubdocument?this.$__.fullPath+"."+A:A,k.$__saveInitialState(m)}this.$__set(T,A,J,Y,Q,V,B,L);let O=!!this.$__.session?.transaction,_=this.$__.session&&this.$__.session[yD]&&this.$__.session[yD].has(this)&&this.$__.session[yD].get(this).modifiedPaths&&!this.$__.session[yD].get(this).modifiedPaths.has(m);if(f!=null&&f.hasOwnProperty(m)&&(!O||_)&&$1.deepEqual(B,f[m]))this.unmarkModified(A)}if(V.$isSingleNested&&(this.isDirectModified(A)||B==null))bH(this,A);return this};/*!
264
+ * ignore
265
+ */function gX1(F,A){if(!Array.isArray(F))return!1;if(F.length===0)return!1;for(let B of F){if(!(B instanceof b))return!1;if(B.constructor.modelName==null)return!1;if(B.constructor.modelName!=A&&B.constructor.baseModelName!=A)return!1}return!0}b.prototype.set=b.prototype.$set;b.prototype.$__shouldModify=function(F,A,B,D,J,X,Z,Y){if(B&&B._skipMarkModified)return!1;if(this.$isNew)return!0;if(A in this.$__.activePaths.getStatePaths("modify"))return!0;if(Z===void 0&&!this.$__isSelected(A))return!0;if(Z===void 0&&A in this.$__.activePaths.getStatePaths("default"))return!1;if(this.$populated(A)&&Z instanceof b&&vD(Z._doc._id,Y))return!1;if(!vD(Z,Y!==void 0?Y:$1.getValue(A,this)))return!0;if(!D&&Z!==null&&Z!==void 0&&A in this.$__.activePaths.getStatePaths("default")&&vD(Z,X.getDefault(this,D)))return!0;return!1};b.prototype.$__set=function(F,A,B,D,J,X,Z,Y){GF=GF||D8();let $=this.$__shouldModify(F,A,B,D,J,X,Z,Y);if($){if(this.$__.primitiveAtomics&&this.$__.primitiveAtomics[A]){if(delete this.$__.primitiveAtomics[A],Object.keys(this.$__.primitiveAtomics).length===0)delete this.$__.primitiveAtomics}if(this.markModified(F),bx||(bx=MH()),Z&&$1.isMongooseArray(Z)){if(Z._registerAtomic("$set",Z),$1.isMongooseDocumentArray(Z))Z.forEach(function(W){W&&W.__parentArray&&(W.__parentArray=Z)})}}else if(Array.isArray(Z)&&Array.isArray(Y)&&$1.isMongooseArray(Z)&&$1.isMongooseArray(Y)){if(Z[N2]=Y[N2],Z[EF]=Y[EF],$1.isMongooseDocumentArray(Z))Z.forEach((W)=>{if(W!=null)W.$isNew=!1})}let G=this._doc,E=0,H=J.length,q="";for(;E<H;E++){let z=E+1===H;if(q+=q?"."+J[E]:J[E],fX1.has(J[E]))return;if(z)if(G instanceof Map)G.set(J[E],Z);else if(G.$isSingleNested){if(!(J[E]in G))G[J[E]]=Z,G._doc[J[E]]=Z;else G._doc[J[E]]=Z;if($)G.markModified(J[E])}else G[J[E]]=Z;else{let C=G instanceof Map,U=C?G.get(J[E]):G[J[E]];if($1.isPOJO(U))G=U;else if(U&&U instanceof GF)G=U;else if(U&&!Array.isArray(U)&&U.$isSingleNested)G=U;else if(U&&Array.isArray(U))G=U;else if(U==null){if(U={},C)G.set(J[E],U);else G[J[E]]=U;G=U}else G=U}}};b.prototype.$__getValue=function(F){if(typeof F!=="string"&&!Array.isArray(F))throw new TypeError(`Invalid \`path\`. Must be either string or array. Got "${F}" (type ${typeof F})`);return $1.getValue(F,this._doc)};b.prototype.$inc=function F(A,B){if(B==null)B=1;if(Array.isArray(A))return A.forEach(($)=>this.$inc($,B)),this;let D=this.$__path(A);if(D==null){if(this.$__.strictMode==="throw")throw new hH(A);else if(this.$__.strictMode===!0)return this}else if(D.instance!=="Number")return this.invalidate(A,new m2.CastError(D.instance,B,A)),this;let J=this.$__getValue(A)||0,X=!1,Z=null,Y=B;try{B=D.cast(B),Z=D.applySetters(J+B,this),Y=Z-J,X=!0}catch($){this.invalidate(A,new m2.CastError("number",B,A,$))}if(X){if(this.$__.primitiveAtomics=this.$__.primitiveAtomics||{},this.$__.primitiveAtomics[A]==null)this.$__.primitiveAtomics[A]={$inc:Y};else this.$__.primitiveAtomics[A].$inc+=Y;this.markModified(A),this.$__setValue(A,Z)}return this};b.prototype.$__setValue=function(F,A){return $1.setValue(F,A,this._doc),this};b.prototype.get=function(F,A,B){let D;if(B==null)B={};if(A)D=this.$__schema.interpretAsType(F,A,this.$__schema.options);let J=B.noDottedPath,X=J?this.$__schema.paths[F]:this.$__path(F);if(X==null){if(X=this.$__schema.virtualpath(F),X!=null)return X.applyGetters(void 0,this)}if(J){let G=this._doc[F];if(D)G=D.cast(G);if(X!=null&&B.getters!==!1)return X.applyGetters(G,this);return G}if(X!=null&&X.instance==="Mixed"){let G=this.$__schema.virtualpath(F);if(G!=null)X=G}let Z=F.indexOf(".")!==-1,Y=this._doc,$=Z?F.split("."):[F];if(typeof this.$__schema.aliases[$[0]]==="string")$[0]=this.$__schema.aliases[$[0]];for(let G=0,E=$.length;G<E;G++){if(Y&&Y._doc)Y=Y._doc;if(Y==null)Y=void 0;else if(Y instanceof Map)Y=Y.get($[G],{getters:!1});else if(G===E-1)Y=$1.getValue($[G],Y);else Y=Y[$[G]]}if(D)Y=D.cast(Y);if(X!=null&&B.getters!==!1)Y=X.applyGetters(Y,this);else if(this.$__schema.nested[F]&&B.virtuals)return lH(this,H3(Y)||{},{path:F});return Y};/*!
266
+ * ignore
267
+ */b.prototype[OX1]=b.prototype.get;b.prototype.$get=b.prototype.get;b.prototype.$__path=function(F){let A=this.$__.adhocPaths,B=A&&A.hasOwnProperty(F)?A[F]:null;if(B)return B;return this.$__schema.path(F)};b.prototype.markModified=function(F,A){if(this.$__saveInitialState(F),this.$__.activePaths.modify(F),A!=null&&!this.$isSubdocument)this.$__.pathsToScopes=this.$__pathsToScopes||{},this.$__.pathsToScopes[F]=A};/*!
268
+ * ignore
269
+ */b.prototype.$__saveInitialState=function F(A){let B=this.$__.savedState,D=A;if(B!=null){let J=D.indexOf("."),X=J===-1?D:D.slice(0,J);if(!B.hasOwnProperty(X))B[X]=H3(this.$__getValue(X))}};b.prototype.unmarkModified=function(F){if(this.$__.activePaths.init(F),this.$__.pathsToScopes!=null)delete this.$__.pathsToScopes[F]};b.prototype.$ignore=function(F){this.$__.activePaths.ignore(F)};b.prototype.directModifiedPaths=function(){return Object.keys(this.$__.activePaths.getStatePaths("modify"))};b.prototype.$isEmpty=function(F){let A={minimize:!0,virtuals:!1,getters:!1,transform:!1};if(arguments.length!==0){let B=this.$get(F);if(B==null)return!0;if(typeof B!=="object")return!1;if($1.isPOJO(B))return px(B);return Object.keys(B.toObject(A)).length===0}return Object.keys(this.toObject(A)).length===0};/*!
270
+ * ignore
271
+ */function px(F){if(F==null)return!0;if(typeof F!=="object"||Array.isArray(F))return!1;for(let A of Object.keys(F))if(!px(F[A]))return!1;return!0}b.prototype.modifiedPaths=function(F){F=F||{};let A=Object.keys(this.$__.activePaths.getStatePaths("modify")),B=new Set,D=0,J=0,X=A.length;for(D=0;D<X;++D){let Z=A[D],Y=cH(Z),$=Y.length;for(J=0;J<$;++J)B.add(Y[J]);if(!F.includeChildren)continue;let G=0,E=this.$get(Z);if(typeof E==="object"&&E!==null){if(E._doc)E=E._doc;let H=E.length;if(Array.isArray(E))for(G=0;G<H;++G){let q=Z+"."+G;if(!B.has(q)){if(B.add(q),E[G]!=null&&E[G].$__){let W=E[G].modifiedPaths(),z=0,C=W.length;for(z=0;z<C;++z)B.add(q+"."+W[z])}}}else{let q=Object.keys(E),W=0,z=q.length;for(W=0;W<z;++W)B.add(Z+"."+q[W])}}}return Array.from(B)};b.prototype[cx]=b.prototype.modifiedPaths;b.prototype.isModified=function(F,A,B){if(F){let D=A&&A.ignoreAtomics,J=this.$__.activePaths.states.modify;if(J==null)return!1;if(typeof F==="string")F=F.indexOf(" ")===-1?[F]:F.split(" ");for(let $ of F)if(J[$]!=null)return!0;let X=B||this[cx](),Z=F.some(function($){return!!~X.indexOf($)}),Y=Object.keys(J);if(D)Y=Y.filter(($)=>{let G=this.$__getValue($);if(G!=null&&G[N2]!=null&&G[N2].$set===void 0)return!1;return!0});return Z||F.some(function($){return Y.some(function(G){return G===$||$.startsWith(G+".")})})}return this.$__.activePaths.some("modify")};b.prototype.$isModified=b.prototype.isModified;b.prototype[jX1]=b.prototype.isModified;b.prototype.$isDefault=function(F){if(F==null)return this.$__.activePaths.some("default");if(typeof F==="string"&&F.indexOf(" ")===-1)return this.$__.activePaths.getStatePaths("default").hasOwnProperty(F);let A=F;if(!Array.isArray(A))A=A.split(" ");return A.some((B)=>this.$__.activePaths.getStatePaths("default").hasOwnProperty(B))};b.prototype.$isDeleted=function(F){if(arguments.length===0)return!!this.$__.isDeleted;return this.$__.isDeleted=!!F,this};b.prototype.isDirectModified=function(F){if(F==null)return this.$__.activePaths.some("modify");if(typeof F==="string"&&F.indexOf(" ")===-1){let B=this.$__.activePaths.getStatePaths("modify").hasOwnProperty(F);if(B||F.indexOf(".")===-1)return B;let D=F.split(".");for(let J=0;J<D.length-1;++J){let X=D.slice(0,J+1).join("."),Z=this.$get(X);if(Z!=null&&Z.$__!=null&&Z.isDirectModified(D.slice(J+1).join(".")))return!0}return!1}let A=F;if(typeof A==="string")A=A.split(" ");return A.some((B)=>this.isDirectModified(B))};b.prototype.isInit=function(F){if(F==null)return this.$__.activePaths.some("init");if(typeof F==="string"&&F.indexOf(" ")===-1)return this.$__.activePaths.getStatePaths("init").hasOwnProperty(F);let A=F;if(!Array.isArray(A))A=A.split(" ");return A.some((B)=>this.$__.activePaths.getStatePaths("init").hasOwnProperty(B))};b.prototype.isSelected=function F(A){if(this.$__.selected==null)return!0;if(!A)return!1;if(A==="_id")return this.$__.selected._id!==0;if(A.indexOf(" ")!==-1)A=A.split(" ");if(Array.isArray(A))return A.some((X)=>this.$__isSelected(X));let B=Object.keys(this.$__.selected),D=null;if(B.length===1&&B[0]==="_id")return this.$__.selected._id===0;for(let X of B){if(X==="_id")continue;if(!mx(this.$__.selected[X]))continue;D=!!this.$__.selected[X];break}if(D===null)return!0;if(A in this.$__.selected)return D;let J=A+".";for(let X of B){if(X==="_id")continue;if(X.startsWith(J))return D||X!==J;if(J.startsWith(X+"."))return D}return!D};b.prototype.$__isSelected=b.prototype.isSelected;b.prototype.isDirectSelected=function F(A){if(this.$__.selected==null)return!0;if(A==="_id")return this.$__.selected._id!==0;if(A.indexOf(" ")!==-1)A=A.split(" ");if(Array.isArray(A))return A.some((J)=>this.isDirectSelected(J));let B=Object.keys(this.$__.selected),D=null;if(B.length===1&&B[0]==="_id")return this.$__.selected._id===0;for(let J of B){if(J==="_id")continue;if(!mx(this.$__.selected[J]))continue;D=!!this.$__.selected[J];break}if(D===null)return!0;if(this.$__.selected.hasOwnProperty(A))return D;return!D};b.prototype.validate=async function F(A,B){if(typeof A==="function"||typeof B==="function"||typeof arguments[2]==="function")throw new m2("Document.prototype.validate() no longer accepts a callback");let D;if(this.$op="validate",arguments.length===1){if(typeof arguments[0]==="object"&&!Array.isArray(arguments[0]))B=arguments[0],A=null}if(B&&typeof B.pathsToSkip==="string"){let X=B.pathsToSkip.indexOf(" ")===-1;B.pathsToSkip=X?[B.pathsToSkip]:B.pathsToSkip.split(" ")}let J=B&&B._skipParallelValidateCheck;if(this.$isSubdocument!=null);else if(this.$__.validating&&!J)D=new Sx(this,{parentStack:B&&B.parentStack,conflictStack:this.$__.validating.stack});else if(!J)this.$__.validating=new Sx(this,{parentStack:B&&B.parentStack});if(D!=null)throw D;return new Promise((X,Z)=>{this.$__validate(A,B,(Y)=>{if(this.$op=null,this.$__.validating=null,Y!=null)return Z(Y);X()})})};b.prototype.$validate=b.prototype.validate;/*!
272
+ * ignore
273
+ */function bX1(F){let A=Object.keys(F.$__.activePaths.getStatePaths("require")),B=0,D=A.length;for(B=0;B<D;++B){let J=A[B],X=F.$__schema.path(J);if(X!=null&&typeof X.originalRequiredValue==="function"){F.$__.cachedRequired=F.$__.cachedRequired||{};try{F.$__.cachedRequired[J]=X.originalRequiredValue.call(F,F)}catch(Z){F.invalidate(J,Z)}}}}/*!
274
+ * ignore
275
+ */function ix(F,A,B,D){let J={};bX1(F);let X=new Set(Object.keys(F.$__.activePaths.getStatePaths("require")).filter(function($){if(!F.$__isSelected($)&&!F.$isModified($))return!1;if(F.$__.cachedRequired!=null&&$ in F.$__.cachedRequired)return F.$__.cachedRequired[$];return!0}));Object.keys(F.$__.activePaths.getStatePaths("init")).forEach(Z),Object.keys(F.$__.activePaths.getStatePaths("modify")).forEach(Z),Object.keys(F.$__.activePaths.getStatePaths("default")).forEach(Z);function Z($){X.add($)}if(!D){let $=F.$getAllSubdocs({useCache:!0}),G=F.modifiedPaths();for(let E of $)if(E.$basePath){let H=E.$isSingleNested?E.$__pathRelativeToParent():E.$__fullPathWithIndexes();for(let q of E.modifiedPaths())X.delete(H+"."+q);if(F.$isModified(H,null,G)&&!F.$__.activePaths.getStatePaths("modify").hasOwnProperty(H)&&!F.$isDefault(H)){if(X.add(H),F.$__.pathsToScopes==null)F.$__.pathsToScopes={};if(F.$__.pathsToScopes[H]=E.$isDocumentArrayElement?E.__parentArray:E.$parent(),J[H]={skipSchemaValidators:!0},E.$isDocumentArrayElement&&E.__index!=null)J[H].index=E.__index}}}for(let $ of X){let G=F.$__schema.path($);if(!G)continue;if(G.$isMongooseDocumentArray){for(let E of X)if(E==null||E.startsWith(G.path+"."))X.delete(E)}if(!G.caster&&G.validators.length===0&&!G.$parentSchemaDocArray)X.delete($);else if(G.$isMongooseArray&&!G.$isMongooseDocumentArray&&!G.$embeddedSchemaType.$isMongooseArray&&G.validators.length===0&&G.$embeddedSchemaType.validators.length===0)X.delete($)}if(Array.isArray(A))X=vX1(X,A);else if(Array.isArray(B))X=hX1(X,B);yX1(F,X);let Y={skipArrays:!0};for(let $ of X)if(F.$__schema.nested[$]){let G=F.$__getValue($);if(MX1(G))G=G.toObject({transform:!1});let E=UX1(G,$,Y,F.$__schema);Object.keys(E).filter((H)=>!F.$__schema.singleNestedPaths.hasOwnProperty(H)).forEach(Z)}for(let $ of X){let G=F.$__schema.path($);if(!G)continue;if(G.$parentSchemaDocArray&&typeof G.$parentSchemaDocArray.path==="string")X.add(G.$parentSchemaDocArray.path);if(!G.$isSchemaMap)continue;let E=F.$__getValue($);if(E==null)continue;for(let H of E.keys())X.add($+"."+H)}return X=Array.from(X),[X,J]}function yX1(F,A){for(let B of A){let D=F.$__schema.path(B);if(!D)continue;if(!D.$isMongooseArray||!Array.isArray(D)&&D.$isMongooseDocumentArray&&!(D&&D.schemaOptions&&D.schemaOptions.required))continue;if(D.$isMongooseArray&&!D.$isMongooseDocumentArray&&!D.$embeddedSchemaType.$isMongooseArray&&D.$embeddedSchemaType.validators.length===0)continue;let J=F.$__getValue(B);dD(J,A,B)}}function dD(F,A,B){if(F!=null){let D=F.length;for(let J=0;J<D;++J)if(Array.isArray(F[J]))dD(F[J],A,B+"."+J);else A.add(B+"."+J)}}/*!
276
+ * ignore
277
+ */b.prototype.$__validate=function(F,A,B){if(this.$__.saveOptions&&this.$__.saveOptions.pathsToSave&&!F)F=[...this.$__.saveOptions.pathsToSave];else if(typeof F==="function")B=F,A=null,F=null;else if(typeof A==="function")B=A,A=null;let D=A&&typeof A==="object"&&"validateModifiedOnly"in A,J=A&&A.pathsToSkip||null,X;if(D)X=!!A.validateModifiedOnly;else X=this.$__schema.options.validateModifiedOnly;let Z=A&&A.validateAllPaths;if(Z){if(J)throw new TypeError("Cannot set both `validateAllPaths` and `pathsToSkip`");if(F)throw new TypeError("Cannot set both `validateAllPaths` and `pathsToValidate`");if(D&&X)throw new TypeError("Cannot set both `validateAllPaths` and `validateModifiedOnly`")}let Y=this,$=()=>{let U=this.$__.validationError;if(this.$__.validationError=null,this.$__.validating=null,X&&U!=null){let Q=Object.keys(U.errors);for(let L of Q)if(!this.$isModified(L))delete U.errors[L];if(Object.keys(U.errors).length===0)U=void 0}if(this.$__.cachedRequired={},this.$emit("validate",Y),this.constructor.emit("validate",Y),U){for(let Q in U.errors)if(!this[TX1]&&U.errors[Q]instanceof m2.CastError)this.invalidate(Q,U.errors[Q]);return U}},G,E;if(Z){G=new Set(Object.keys(this.$__schema.paths));for(let U of G){let Q=this.$__schema.path(U);if(!Q||!Q.$isMongooseArray)continue;let L=this.$__getValue(U);if(!L)continue;dD(L,G,U)}G=[...G],E={}}else{let U=ix(this,F,J,A&&A._nestedValidate);G=X?U[0].filter((Q)=>this.$isModified(Q)):U[0],E=U[1]}if(typeof F==="string")F=F.split(" ");if(G.length===0)return xx(function(){let U=$();if(U)return Y.$__schema.s.hooks.execPost("validate:error",Y,[Y],{error:U},function(Q){B(Q)});B(null,Y)});let H={},q=0,W=this.$__.saveOptions?.pathsToSave;if(Array.isArray(W)){W=new Set(W);for(let U of G){if(!W.has(U))continue;z(U)}}else for(let U of G)z(U);function z(U){if(U==null||H[U])return;H[U]=!0,q++,xx(function(){let Q=Y.$__schema.path(U);if(!Q)return--q||C();if(!Y.$isValid(U)){--q||C();return}if(Q[uX1]!=null&&U!==Q.path)return--q||C();let L=Y.$__getValue(U),V;if(V=Y.$populated(U))L=V;else if(L!=null&&L.$__!=null&&L.$__.wasPopulated)L=L._doc._id;let w=Y.$__.pathsToScopes!=null&&U in Y.$__.pathsToScopes?Y.$__.pathsToScopes[U]:Y,j={...E[U],path:U,validateAllPaths:Z,_nestedValidate:!0};Q.doValidate(L,function(T){if(T){if((Q.$isSingleNested||Q.$isArraySubdocument||Q.$isMongooseDocumentArray)&&T instanceof mD)return--q||C();Y.invalidate(U,T,void 0,!0)}--q||C()},w,j)})}function C(){let U=$();if(U)return Y.$__schema.s.hooks.execPost("validate:error",Y,[Y],{error:U},function(Q){B(Q)});B(null,Y)}};/*!
278
+ * ignore
279
+ */function vX1(F,A){let B=new Set(A),D=new Map([]);for(let X of A){if(X.indexOf(".")===-1)continue;let Z=X.split("."),Y=Z[0];for(let $=1;$<Z.length;++$)D.set(Y,X),Y=Y+"."+Z[$]}let J=new Set;for(let X of F)if(B.has(X))J.add(X);else if(D.has(X))J.add(D.get(X));return J}/*!
280
+ * ignore
281
+ */function hX1(F,A){return A=new Set(A),F=Array.from(F).filter((B)=>!A.has(B)),new Set(F)}b.prototype.validateSync=function(F,A){let B=this;if(arguments.length===1&&typeof arguments[0]==="object"&&!Array.isArray(arguments[0]))A=arguments[0],F=null;let D=A&&typeof A==="object"&&"validateModifiedOnly"in A,J;if(D)J=!!A.validateModifiedOnly;else J=this.$__schema.options.validateModifiedOnly;let X=A&&A.pathsToSkip,Z=A&&A.validateAllPaths;if(Z){if(X)throw new TypeError("Cannot set both `validateAllPaths` and `pathsToSkip`");if(F)throw new TypeError("Cannot set both `validateAllPaths` and `pathsToValidate`")}if(typeof F==="string")F=F.indexOf(" ")===-1?[F]:F.split(" ");else if(typeof X==="string"&&X.indexOf(" ")!==-1)X=X.split(" ");let Y,$;if(Z){Y=new Set(Object.keys(this.$__schema.paths));for(let H of Y){let q=this.$__schema.path(H);if(!q||!q.$isMongooseArray)continue;let W=this.$__getValue(H);if(!W)continue;dD(W,Y,H)}Y=[...Y],$={}}else{let H=ix(this,F,X);Y=J?H[0].filter((q)=>this.$isModified(q)):H[0],$=H[1]}let G={};for(let H=0,q=Y.length;H<q;++H){let W=Y[H];if(G[W])continue;G[W]=!0;let z=B.$__schema.path(W);if(!z)continue;if(!B.$isValid(W))continue;let C=B.$__getValue(W),U=z.doValidateSync(C,B,{skipSchemaValidators:$[W],path:W,validateModifiedOnly:J,validateAllPaths:Z});if(U){if((z.$isSingleNested||z.$isArraySubdocument||z.$isMongooseDocumentArray)&&U instanceof mD)continue;B.invalidate(W,U,void 0,!0)}}let E=B.$__.validationError;if(B.$__.validationError=void 0,B.$emit("validate",B),B.constructor.emit("validate",B),E){for(let H in E.errors)if(E.errors[H]instanceof m2.CastError)B.invalidate(H,E.errors[H])}return E};b.prototype.invalidate=function(F,A,B,D){if(!this.$__.validationError)this.$__.validationError=new mD(this);if(this.$__.validationError.errors[F])return;if(!A||typeof A==="string")A=new vx({path:F,message:A,type:D||"user defined",value:B});if(this.$__.validationError===A)return this.$__.validationError;return this.$__.validationError.addError(F,A),this.$__.validationError};b.prototype.$markValid=function(F){if(!this.$__.validationError||!this.$__.validationError.errors[F])return;if(delete this.$__.validationError.errors[F],Object.keys(this.$__.validationError.errors).length===0)this.$__.validationError=null};/*!
282
+ * ignore
283
+ */function mX1(F,A){if(!F.$__.validationError)return;let B=Object.keys(F.$__.validationError.errors);for(let D of B)if(D.startsWith(A+"."))delete F.$__.validationError.errors[D];if(Object.keys(F.$__.validationError.errors).length===0)F.$__.validationError=null}/*!
284
+ * ignore
285
+ */function dX1(F,A,B){let D=A.schema;if(D==null)return;for(let J of Object.keys(D.paths)){let X=D.paths[J];if(X.$immutableSetter==null)continue;let Z=B==null?void 0:B.$__getValue(J);X.$immutableSetter.call(F,Z)}}b.prototype.$isValid=function(F){if(this.$__.validationError==null||Object.keys(this.$__.validationError.errors).length===0)return!0;if(F==null)return!1;if(F.indexOf(" ")!==-1)F=F.split(" ");if(Array.isArray(F))return F.some((A)=>this.$__.validationError.errors[A]==null);return this.$__.validationError.errors[F]==null};b.prototype.$__reset=function F(){let A=this,B=!this.$isSubdocument?this.$getAllSubdocs({useCache:!0}):null;if(B&&B.length>0)for(let D of B)D.$__reset();return this.$__dirty().forEach(function(D){let J=D.value;if(J&&J[N2])J[EF]=J[N2],J[N2]={}}),this.$__.backup={},this.$__.backup.activePaths={modify:Object.assign({},this.$__.activePaths.getStatePaths("modify")),default:Object.assign({},this.$__.activePaths.getStatePaths("default"))},this.$__.backup.validationError=this.$__.validationError,this.$__.backup.errors=this.$errors,this.$__.activePaths.clear("modify"),this.$__.activePaths.clear("default"),this.$__.validationError=void 0,this.$errors=void 0,A=this,this.$__schema.requiredPaths().forEach(function(D){A.$__.activePaths.require(D)}),this};/*!
286
+ * ignore
287
+ */b.prototype.$__undoReset=function F(){if(this.$__.backup==null||this.$__.backup.activePaths==null)return;this.$__.activePaths.states.modify=this.$__.backup.activePaths.modify,this.$__.activePaths.states.default=this.$__.backup.activePaths.default,this.$__.validationError=this.$__.backup.validationError,this.$errors=this.$__.backup.errors;for(let A of this.$__dirty()){let B=A.value;if(B&&B[N2]&&B[EF])B[N2]=B[EF]}for(let A of this.$getAllSubdocs())A.$__undoReset()};b.prototype.$__dirty=function(){let F=this,A=this.$__.activePaths.map("modify",function(J){return{path:J,value:F.$__getValue(J),schema:F.$__path(J)}});A=A.concat(this.$__.activePaths.map("default",function(J){if(J==="_id"||F.$__getValue(J)==null)return;return{path:J,value:F.$__getValue(J),schema:F.$__path(J)}}));let B=new Map(A.filter((J)=>J!=null).map((J)=>[J.path,J.value])),D=[];return A.forEach(function(J){if(!J)return;let X=null,Z=cH(J.path);for(let Y=0;Y<Z.length-1;Y++)if(B.has(Z[Y])){X=B.get(Z[Y]);break}if(X==null)D.push(J);else if(X!=null&&X[N2]!=null&&X.hasAtomics())X[N2]={},X[N2].$set=X}),D};b.prototype.$__setSchema=function(F){zX1(F.tree,this,void 0,F.options);for(let A of Object.keys(F.virtuals))F.virtuals[A]._applyDefaultGetters();if(F.path("schema")==null)this.schema=F;this.$__schema=F,this[kX1]=F};b.prototype.$__getArrayPathsToValidate=function(){return hD||(hD=V9()),this.$__.activePaths.map("init","modify",function(F){return this.$__getValue(F)}.bind(this)).filter(function(F){return F&&Array.isArray(F)&&$1.isMongooseDocumentArray(F)&&F.length}).reduce(function(F,A){return F.concat(A)},[]).filter(function(F){return F})};b.prototype.$getAllSubdocs=function(F){if(F?.useCache&&this.$__.saveOptions?.__subdocs)return this.$__.saveOptions.__subdocs;hD||(hD=V9()),GF=GF||D8();let A=[];function B(D){let J=[];for(let{path:X}of D.$__schema.childSchemas){let Z=D.$__getValue(X);if(Z==null)continue;if(Z.$__)J.push(Z);if(Array.isArray(Z)){for(let Y of Z)if(Y!=null&&Y.$__)J.push(Y)}if(Z instanceof Map){for(let Y of Z.values())if(Y!=null&&Y.$__)J.push(Y)}}for(let X of J)B(X);A.push(...J)}if(B(this),this.$__.saveOptions)this.$__.saveOptions.__subdocs=A;return A};/*!
288
+ * Runs queued functions
289
+ */function cX1(F){let A=F.$__schema&&F.$__schema.callQueue;if(!A.length)return;for(let B of A)if(B[0]!=="pre"&&B[0]!=="post"&&B[0]!=="on")F[B[0]].apply(F,B[1])}/*!
290
+ * ignore
291
+ */b.prototype.$__handleReject=function F(A){if(this.$listeners("error").length)this.$emit("error",A);else if(this.constructor.listeners&&this.constructor.listeners("error").length)this.constructor.emit("error",A)};b.prototype.$toObject=function(F,A){let B=this.$__schema._defaultToObjectOptions(A),D=this.$__hasOnlyPrimitiveValues();F=$1.isPOJO(F)?{...F}:{},F._calledWithOptions=F._calledWithOptions||{...F};let J;if(F._calledWithOptions.minimize!=null)J=F.minimize;else if(B!=null&&B.minimize!=null)J=B.minimize;else J=this.$__schema.options.minimize;if(F.minimize=J,!D)F._seen=F._seen||new Map;let X=F._calledWithOptions.depopulate??B?.depopulate??F.depopulate??!1;if(X&&F._isNested&&this.$__.wasPopulated)return H3(this.$__.wasPopulated.value||this._doc._id,F);if(X)F.depopulate=!0;if(B!=null){for(let q of Object.keys(B))if(F[q]==null)F[q]=B[q]}F._isNested=!0,F.json=A,F.minimize=J;let Z=F._parentOptions;F._parentOptions=this.$isSubdocument?F:null;let Y;if(D&&!F.flattenObjectIds)Y=this.$__toObjectShallow();else Y=H3(this._doc,F)||{};let $=F._calledWithOptions.getters??F.getters??B.getters??!1;if($){if(lX1(this,Y),F.minimize)Y=wX1(Y)||{}}let G=F._calledWithOptions.virtuals??B.virtuals??Z?.virtuals??void 0;if(G||$&&G!==!1)lH(this,Y,F,F);if(F.versionKey===!1&&this.$__schema.options.versionKey)delete Y[this.$__schema.options.versionKey];let E=F._calledWithOptions.transform??!0,H=void 0;if(E===!0)H=B.transform;else if(typeof E==="function")H=E;if(E)pX1(this,Y);if(F.useProjection)iX1(this,Y);if(typeof H==="function"){let q=H(this,Y,F);if(typeof q!=="undefined")Y=q}return Y};/*!
292
+ * Internal shallow clone alternative to `$toObject()`: much faster, no options processing
293
+ */b.prototype.$__toObjectShallow=function F(){let A={};if(this._doc!=null)for(let B of Object.keys(this._doc)){let D=this._doc[B];if(D instanceof Date)A[B]=new Date(D);else if(D!==void 0)A[B]=D}return A};b.prototype.toObject=function(F){return this.$toObject(F)};/*!
294
+ * Applies virtuals properties to `json`.
295
+ */function lH(F,A,B,D){let J=F.$__schema,X=J.virtuals,Z=Object.keys(X),Y=Z.length,$=Y,G,E,H=F._doc,q,W=typeof(D&&D.aliases)==="boolean"?D.aliases:!0;B=B||{};let z=null;if(Array.isArray(B.virtuals))z=new Set(B.virtuals);else if(B.virtuals&&B.virtuals.pathsToSkip){z=new Set(Z);for(let C=0;C<B.virtuals.pathsToSkip.length;C++)if(z.has(B.virtuals.pathsToSkip[C]))z.delete(B.virtuals.pathsToSkip[C])}if(!H)return A;for(Y=0;Y<$;++Y){if(G=Z[Y],z!=null&&!z.has(G))continue;if(!W&&J.aliases.hasOwnProperty(G))continue;if(E=G,B.path!=null){if(!G.startsWith(B.path+"."))continue;E=G.substring(B.path.length+1)}if(E.indexOf(".")===-1&&E===G){if(q=X[G].applyGetters(void 0,F),q===void 0)continue;q=H3(q,B),A[E]=q;continue}let C=E.split(".");if(q=H3(F.get(G),B),q===void 0)continue;let U=C.length;H=A;for(let Q=0;Q<U-1;++Q)H[C[Q]]=H[C[Q]]||{},H=H[C[Q]];H[C[U-1]]=q}return A}function lX1(F,A){let B=F.$__schema,D=Object.keys(B.paths),J=D.length,X,Z=F._doc,Y;if(!Z)return A;while(J--){X=D[J];let $=X.split("."),G=$.length,E=G-1,H=A,q;if(Z=F._doc,!F.$__isSelected(X))continue;for(let W=0;W<G;++W){if(q=$[W],Y=Z[q],H!=null&&typeof H!=="object")break;else if(W===E){if(H[q]=B.paths[X].applyGetters(H[q],F),Array.isArray(H[q])&&B.paths[X].$embeddedSchemaType)for(let z=0;z<H[q].length;++z)H[q][z]=B.paths[X].$embeddedSchemaType.applyGetters(H[q][z],F)}else if(Y==null){if(q in Z)H[q]=Y;break}else H=H[q]||(H[q]={});Z=Y}}return A}function pX1(F,A){let B=F.$__schema,D=Object.keys(B.paths||{});if(!F._doc)return A;for(let X of D){let Z=B.paths[X];if(typeof Z.options.transform==="function"){let Y=F.$get(X);if(Y===void 0)continue;let $=Z.options.transform.call(F,Y);yx(X,$),$1.setValue(X,$,A)}else if(Z.$embeddedSchemaType!=null&&typeof Z.$embeddedSchemaType.options.transform==="function"){let Y=F.$get(X);if(Y===void 0)continue;let $=[].concat(Y),G=Z.$embeddedSchemaType.options.transform;for(let E=0;E<$.length;++E){let H=G.call(F,$[E]);$[E]=H,yx(X,H)}A[X]=$}}return A}function yx(F,A){if(PX1(A))throw new Error("`transform` function must be synchronous, but the transform on path `"+F+"` returned a promise.")}/*!
296
+ * ignore
297
+ */function iX1(F,A){let B=F.$__schema,D=Object.keys(B.paths||{});if(!F._doc)return A;let X=F.$__.selected;if(X===void 0)X={},NX1.applyPaths(X,B);if(X==null||Object.keys(X).length===0)return A;for(let Z of D)if(X[Z]!=null&&!X[Z])delete A[Z];return A}b.prototype.toJSON=function(F){return this.$toObject(F,!0)};/*!
298
+ * ignore
299
+ */b.prototype.ownerDocument=function(){return this};b.prototype.parent=function(){if(this.$isSubdocument||this.$__.wasPopulated)return this.$__.parent;return this};b.prototype.$parent=b.prototype.parent;b.prototype.inspect=function(F){let A=$1.isPOJO(F),B;if(A)B=F,B.minimize=!1;let D=arguments.length>0?this.toObject(B):this.toObject();if(D==null)return"MongooseDocument { "+D+" }";return D};if(dH.custom)b.prototype[dH.custom]=b.prototype.inspect;b.prototype.toString=function(){let F=this.inspect();if(typeof F==="string")return F;return dH(F)};b.prototype.equals=function(F){if(!F)return!1;let A=this.$__getValue("_id"),B=F.$__!=null?F.$__getValue("_id"):F;if(!A&&!B)return vD(this,F);return A&&A.equals?A.equals(B):A===B};b.prototype.populate=async function F(){let A={},B=[...arguments];if(typeof B[B.length-1]==="function")throw new m2("Document.prototype.populate() no longer accepts a callback");if(B.length!==0){let X=$1.populate.apply(null,B);for(let Z of X)A[Z.path]=Z}let D=$1.object.vals(A),J=this.constructor;if(this.$__isNested){J=this.$__[SX1].constructor;let X=this.$__.nestedPath;D.forEach(function(Z){Z.path=X+"."+Z.path})}if(this.$session()!=null){let X=this.$session();D.forEach((Z)=>{if(Z.options==null){Z.options={session:X};return}if(!("session"in Z.options))Z.options.session=X})}return D.forEach((X)=>{X._localModel=J}),J.populate(this,D)};b.prototype.$getPopulatedDocs=function F(){let A=[];if(this.$__.populated!=null)A=A.concat(Object.keys(this.$__.populated));let B=[];for(let D of A){let J=this.$get(D);if(Array.isArray(J))B=B.concat(J);else if(J instanceof b)B.push(J)}return B};b.prototype.populated=function(F,A,B){if(A==null||A===!0){if(!this.$__.populated)return;if(typeof F!=="string")return;let J=F.endsWith(".$*")?F.replace(/\.\$\*$/,""):F,X=this.$__.populated[J];if(X)return A===!0?X:X.value;return}this.$__.populated||(this.$__.populated={}),this.$__.populated[F]={value:A,options:B};let D=F.split(".");for(let J=0;J<D.length-1;++J){let X=D.slice(0,J+1).join("."),Z=this.$get(X);if(Z!=null&&Z.$__!=null&&this.$populated(X)){let Y=D.slice(J+1).join(".");Z.$populated(Y,A,B);break}}return A};b.prototype.$populated=b.prototype.populated;b.prototype.$assertPopulated=function F(A,B){if(Array.isArray(A))return A.forEach((D)=>this.$assertPopulated(D,B)),this;if(arguments.length>1)this.$set(B);if(!this.$populated(A))throw new m2(`Expected path "${A}" to be populated`);return this};b.prototype.depopulate=function(F){if(typeof F==="string")F=F.indexOf(" ")===-1?[F]:F.split(" ");let A,B=this.$$populatedVirtuals?Object.keys(this.$$populatedVirtuals):[],D=this.$__&&this.$__.populated||{};if(arguments.length===0){for(let X of B)delete this.$$populatedVirtuals[X],delete this._doc[X],delete D[X];let J=Object.keys(D);for(let X of J){if(A=this.$populated(X),!A)continue;if(delete D[X],Array.isArray(A)){let Z=$1.getValue(X,this._doc);if(Z.isMongooseArray){let Y=Z.__array;for(let $=0;$<Y.length;++$){let G=Y[$];if(G==null)continue;Y[$]=G instanceof b?G._doc._id:G._id}}else $1.setValue(X,A,this._doc)}else $1.setValue(X,A,this._doc)}return this}for(let J of F)if(A=this.$populated(J),delete D[J],B.indexOf(J)!==-1)delete this.$$populatedVirtuals[J],delete this._doc[J];else if(A)if(Array.isArray(A)){let X=$1.getValue(J,this._doc);if(X.isMongooseArray){let Z=X.__array;for(let Y=0;Y<Z.length;++Y){let $=Z[Y];if($==null)continue;Z[Y]=$ instanceof b?$._doc._id:$._id}}else $1.setValue(J,A,this._doc)}else $1.setValue(J,A,this._doc);return this};b.prototype.$__fullPath=function(F){return F||""};b.prototype.getChanges=function(){let F=this.$__delta();return F?F[1]:{}};b.prototype.$__delta=function F(){let A=this.$__dirty(),B=this.$__schema.options.optimisticConcurrency;if(B)if(Array.isArray(B)){let $=new Set(B);if(this.modifiedPaths().find((E)=>$.has(E)))this.$__.version=A.length?3:1}else this.$__.version=A.length?3:1;if(!A.length&&this.$__.version!==3)return;let D={},J={},X=A.length,Z=[],Y=0;if(D._id=this._doc._id,(D&&D._id&&D._id.$__||null)!=null)D._id=D._id.toObject({transform:!1,depopulate:!0});for(;Y<X;++Y){let $=A[Y],G=$.value,E=nX1(this,$.path,G);if(E){Z.push(E);continue}if(!this.$populated($.path,!0)&&this.$__.selected){let q=$.path.split("."),W=q[0];if(this.$__.selected[W]&&this.$__.selected[W].$elemMatch)if(q.length>1&&q[1]==0&&typeof D[W]==="undefined")D[W]=this.$__.selected[W],q[1]="$",$.path=q.join(".");else{Z.push($.path);continue}}if(this.$isDefault($.path)&&this.$__.selected){if($.path.indexOf(".")===-1&&_x(this.$__.selected,$.path))continue;if(cH($.path).find((W)=>_x(this.$__.isSelected,W)))continue}if(Z.length)continue;if(G===void 0)M4(this,D,J,$,1,"$unset");else if(G===null)M4(this,D,J,$,null);else if($1.isMongooseArray(G)&&G.$path()&&G[N2])sX1(this,D,J,$,G);else if(G[GX1.pathSymbol]&&Buffer.isBuffer(G))G=G.toObject(),M4(this,D,J,$,G);else if(this.$__.primitiveAtomics&&this.$__.primitiveAtomics[$.path]!=null){let q=this.$__.primitiveAtomics[$.path],W=KX1(q);M4(this,D,J,$,q[W],W)}else G=H3(G,{depopulate:!0,transform:!1,virtuals:!1,getters:!1,omitUndefined:!0,_isNested:!0}),M4(this,D,J,$,G)}if(Z.length)return new YX1(Z);if(this.$__.version)this.$__version(D,J);if(Object.keys(J).length===0)return[D,null];return[D,J]};function nX1(F,A,B){let D=F.$populated(A,!0);if(!D&&F.$__.selected){let X=A.split(".")[0];if(F.$__.selected[X+".$"])return X}if(!(D&&$1.isMongooseArray(B)))return;if(D.options.match||D.options.options&&$1.object.hasOwnProperty(D.options.options,"limit")||D.options.options&&D.options.options.skip||D.options.select&&(D.options.select._id===0||/\s?-_id\s?/.test(D.options.select))){let X=B[N2];if(Object.keys(X).length===0||X.$set||X.$pop)return A}}function M4(F,A,B,D,J,X){if(X||(X="$set"),!B[X])B[X]={};if(B[X][D.path]=J,F.$__schema.options.versionKey===!1)return;if(aX1(F,D.path))return;if((3&F.$__.version)===3)return;if(F.$__schema.options.optimisticConcurrency)return;switch(X){case"$set":case"$unset":case"$pop":case"$pull":case"$pullAll":case"$push":case"$addToSet":case"$inc":break;default:return}if(X==="$push"||X==="$addToSet"||X==="$pullAll"||X==="$pull")if(/\.\d+\.|\.\d+$/.test(D.path))F.$__.version=3;else F.$__.version=2;else if(/^\$p/.test(X))F.$__.version=3;else if(Array.isArray(J))F.$__.version=3;else if(/\.\d+\.|\.\d+$/.test(D.path))F.$__.version=1}function sX1(F,A,B,D,J){if(B.$set&&B.$set[D.path])return;if(typeof J.$__getAtomics==="function"){J.$__getAtomics().forEach(function(H){let q=H[0],W=H[1];M4(F,A,B,D,W,q)});return}let X=J[N2],Z=Object.keys(X),Y=Z.length,$,G;if(Y===0){if($1.isMongooseObject(J))J=J.toObject({depopulate:1,_isNested:!0});else if(J.valueOf)J=J.valueOf();return M4(F,A,B,D,J)}function E(H){return $1.isMongooseObject(H)?H.toObject({depopulate:1,_isNested:!0}):H}while(Y--){if(G=Z[Y],$=X[G],$1.isMongooseObject($))$=$.toObject({depopulate:!0,transform:!1,_isNested:!0});else if(Array.isArray($))$=$.map(E);else if($.valueOf)$=$.valueOf();if(G==="$addToSet")$={$each:$};M4(F,A,B,D,$,G)}}function aX1(F,A){let B=F.$__schema.options.skipVersioning;if(!B)return!1;return A=A.replace(/\.\d+\./,"."),B[A]}b.prototype.$clone=function(){let A=new this.constructor;if(A.$isNew=this.$isNew,this._doc)A._doc=H3(this._doc,{retainDocuments:!0});if(this.$__){let D=new this.$__.constructor;for(let J of Object.getOwnPropertyNames(this.$__)){if(J==="activePaths")continue;D[J]=H3(this.$__[J])}Object.assign(D.activePaths,H3({...this.$__.activePaths})),A.$__=D}return A};b.prototype.$createModifiedPathsSnapshot=function F(){let A=new WeakMap;if(!this.$isSubdocument){let B=this.$getAllSubdocs();for(let D of B)A.set(D,D.$__.activePaths.clone())}return new EX1(A,this.$__.activePaths.clone(),this.$__.version)};b.prototype.$restoreModifiedPathsSnapshot=function F(A){if(this.$__.activePaths=A.activePaths.clone(),this.$__.version=A.version,!this.$isSubdocument){let B=this.$getAllSubdocs();for(let D of B)if(A.subdocSnapshot.has(D))D.$__.activePaths=A.subdocSnapshot.get(D)}return this};b.prototype.$clearModifiedPaths=function F(){if(this.$__.activePaths.clear("modify"),this.$__.activePaths.clear("init"),this.$__.version=0,!this.$isSubdocument){let A=this.$getAllSubdocs();for(let B of A)B.$clearModifiedPaths()}return this};/*!
300
+ * Check if the given document only has primitive values
301
+ */b.prototype.$__hasOnlyPrimitiveValues=function F(){return!this.$__.populated&&!this.$__.wasPopulated&&(this._doc==null||Object.values(this._doc).every((A)=>{return A==null||typeof A!=="object"||$1.isNativeObject(A)&&!Array.isArray(A)||fx(A,"ObjectId")||fx(A,"Decimal128")}))};/*!
302
+ * Module exports.
303
+ */b.VERSION_WHERE=1;b.VERSION_INC=2;b.VERSION_ALL=3;b.ValidationError=mD;sx.exports=nx=b});var X1=K((EZ1)=>{/*!
304
+ * Module dependencies.
305
+ */var rX1=H6().UUID,tX1=gS(),Ff=D6(),oX1=b3(),Af=YH(),iH=Z0(),eX1=Z6(),FZ1=I4(),Bf=ED(),Df=sS(),T4=l0(),AZ1=l7(),BZ1=kE(),HF=e5(),DZ1=QD(),JZ1=LD(),qF=W9(),{trustedSymbol:Z8}=p7(),pH;EZ1.specialProperties=qF;EZ1.isMongooseArray=Bf.isMongooseArray;EZ1.isMongooseDocumentArray=Df.isMongooseDocumentArray;EZ1.registerMongooseArray=Bf.registerMongooseArray;EZ1.registerMongooseDocumentArray=Df.registerMongooseDocumentArray;var nH=/\s/,sH=/\s+/;EZ1.toCollectionName=function(F,A){if(F==="system.profile")return F;if(F==="system.indexes")return F;if(typeof A==="function"){if(typeof F!=="string")throw new TypeError("Collection name must be a string");if(F.length===0)throw new TypeError("Collection name cannot be empty");return A(F)}return F};EZ1.deepEqual=function F(A,B){if(A===B)return!0;if(typeof A!=="object"||typeof B!=="object")return A===B;if(A instanceof Date&&B instanceof Date)return A.getTime()===B.getTime();if(T4(A,"ObjectId")&&T4(B,"ObjectId")||T4(A,"Decimal128")&&T4(B,"Decimal128"))return A.toString()===B.toString();if(A instanceof RegExp&&B instanceof RegExp)return A.source===B.source&&A.ignoreCase===B.ignoreCase&&A.multiline===B.multiline&&A.global===B.global&&A.dotAll===B.dotAll&&A.unicode===B.unicode&&A.sticky===B.sticky&&A.hasIndices===B.hasIndices;if(A==null||B==null)return!1;if(A.prototype!==B.prototype)return!1;if(A instanceof Map||B instanceof Map){if(!(A instanceof Map)||!(B instanceof Map))return!1;return F(Array.from(A.keys()),Array.from(B.keys()))&&F(Array.from(A.values()),Array.from(B.values()))}if(A instanceof Number&&B instanceof Number)return A.valueOf()===B.valueOf();if(Buffer.isBuffer(A))return EZ1.buffer.areEqual(A,B);if(Array.isArray(A)||Array.isArray(B)){if(!Array.isArray(A)||!Array.isArray(B))return!1;let Z=A.length;if(Z!==B.length)return!1;for(let Y=0;Y<Z;++Y)if(!F(A[Y],B[Y]))return!1;return!0}if(A.$__!=null)A=A._doc;else if(HF(A))A=A.toObject();if(B.$__!=null)B=B._doc;else if(HF(B))B=B.toObject();let D=Object.keys(A),J=Object.keys(B),X=D.length;if(X!==J.length)return!1;for(let Z=X-1;Z>=0;Z--)if(D[Z]!==J[Z])return!1;for(let Z of D)if(!F(A[Z],B[Z]))return!1;return!0};EZ1.last=function(F){if(F.length>0)return F[F.length-1];return};/*!
306
+ * ignore
307
+ */EZ1.promiseOrCallback=DZ1;/*!
308
+ * ignore
309
+ */EZ1.cloneArrays=function F(A){if(!Array.isArray(A))return A;return A.map((B)=>EZ1.cloneArrays(B))};/*!
310
+ * ignore
311
+ */EZ1.omit=function F(A,B){if(B==null)return Object.assign({},A);if(!Array.isArray(B))B=[B];let D=Object.assign({},A);for(let J of B)delete D[J];return D};EZ1.merge=function F(A,B,D,J){D=D||{};let X=Object.keys(B),Z=0,Y=X.length,$;if(B[Z8])A[Z8]=B[Z8];J=J||"";let G=D.omitNested||{};while(Z<Y){if($=X[Z++],D.omit&&D.omit[$])continue;if(G[J])continue;if(qF.has($))continue;if(A[$]==null)if(AZ1(B[$]))A[$]={...B[$]};else if(Array.isArray(B[$]))A[$]=[...B[$]];else A[$]=B[$];else if(EZ1.isObject(B[$])){if(!EZ1.isObject(A[$]))A[$]={};if(B[$]!=null){if(D.isDiscriminatorSchemaMerge&&(B[$].$isSingleNested&&A[$].$isMongooseDocumentArray)||B[$].$isMongooseDocumentArray&&A[$].$isSingleNested)continue;else if(B[$].instanceOfSchema){if(A[$].instanceOfSchema)JZ1(A[$],B[$].clone(),D.isDiscriminatorSchemaMerge);else A[$]=B[$].clone();continue}else if(T4(B[$],"ObjectId")){A[$]=new oX1(B[$]);continue}}F(A[$],B[$],D,J?J+"."+$:$)}else if(D.overwrite)A[$]=B[$]}return A};EZ1.toObject=function F(A){pH||(pH=y2());let B;if(A==null)return A;if(A instanceof pH)return A.toObject();if(Array.isArray(A)){B=[];for(let D of A)B.push(F(D));return B}if(EZ1.isPOJO(A)){if(B={},A[Z8])B[Z8]=A[Z8];for(let D of Object.keys(A)){if(qF.has(D))continue;B[D]=F(A[D])}return B}return A};EZ1.isObject=FZ1;EZ1.isPOJO=l7();EZ1.isNonBuiltinObject=function F(A){return typeof A==="object"&&!EZ1.isNativeObject(A)&&!EZ1.isMongooseType(A)&&!(A instanceof rX1)&&A!=null};EZ1.isNativeObject=function(F){return Array.isArray(F)||F instanceof Date||F instanceof Boolean||F instanceof Number||F instanceof String};EZ1.isEmptyObject=function(F){return F!=null&&typeof F==="object"&&Object.keys(F).length===0};EZ1.hasKey=function F(A,B){let D=Object.keys(A);for(let J of D){if(J===B)return!0;if(EZ1.isPOJO(A[J])&&EZ1.hasKey(A[J],B))return!0}return!1};EZ1.tick=function F(A){if(typeof A!=="function")return;return function(){try{A.apply(this,arguments)}catch(B){eX1(function(){throw B})}}};EZ1.isMongooseType=function(F){return T4(F,"ObjectId")||T4(F,"Decimal128")||F instanceof Buffer};EZ1.isMongooseObject=HF;EZ1.expires=function F(A){if(!(A&&A.constructor.name==="Object"))return;if(!("expires"in A))return;A.expireAfterSeconds=typeof A.expires!=="string"?A.expires:Math.round(tX1(A.expires)/1000),delete A.expires};EZ1.populate=function F(A,B,D,J,X,Z,Y,$){let G=null;if(arguments.length===1){if(A instanceof Af)return A._docs={},A._childDocs=[],[A];if(Array.isArray(A))return E(A).map((q)=>EZ1.populate(q)[0]);if(EZ1.isObject(A))G=Object.assign({},A);else G={path:A}}else if(typeof D==="object")G={path:A,select:B,match:D,options:J};else G={path:A,select:B,model:D,match:J,options:X,populate:Z,justOne:Y,count:$};if(typeof G.path!=="string")throw new TypeError("utils.populate: invalid path. Expected string. Got typeof `"+typeof A+"`");return XZ1(G);function E(H){let q=[];return H.forEach(function(W){if(nH.test(W.path))W.path.split(sH).forEach(function(C){let U=Object.assign({},W);U.path=C,q.push(U)});else q.push(W)}),q}};function XZ1(F){if(Array.isArray(F.populate)){let D=[];F.populate.forEach(function(J){if(nH.test(J.path)){let X=Object.assign({},J);X.path.split(sH).forEach(function(Y){X.path=Y,D.push(EZ1.populate(X)[0])})}else D.push(EZ1.populate(J)[0])}),F.populate=EZ1.populate(D)}else if(F.populate!=null&&typeof F.populate==="object")F.populate=EZ1.populate(F.populate);let A=[],B=nH.test(F.path)?F.path.split(sH):[F.path];if(F.options!=null)F.options=iH(F.options);for(let D of B)A.push(new Af(Object.assign({},F,{path:D})));return A}EZ1.getValue=function(F,A,B){return Ff.get(F,A,YZ1,B)};/*!
312
+ * ignore
313
+ */var ZZ1=Object.freeze({getters:!1});function YZ1(F,A){let B=F?._doc||F;if(B!=null&&B.isMongooseArrayProxy)B=B.__array;return B instanceof Map?B.get(A,ZZ1):B[A]}EZ1.setValue=function(F,A,B,D,J){Ff.set(F,A,B,"_doc",D,J)};EZ1.object={};EZ1.object.vals=function F(A){let B=Object.keys(A),D=B.length,J=[];while(D--)J.push(A[B[D]]);return J};var $Z1=Object.prototype.hasOwnProperty;EZ1.object.hasOwnProperty=function(F,A){return $Z1.call(F,A)};EZ1.isNullOrUndefined=function(F){return F===null||F===void 0};/*!
314
+ * ignore
315
+ */EZ1.array={};EZ1.array.flatten=function F(A,B,D){return D||(D=[]),A.forEach(function(J){if(Array.isArray(J))F(J,B,D);else if(!B||B(J))D.push(J)}),D};/*!
316
+ * ignore
317
+ */var GZ1=Object.prototype.hasOwnProperty;EZ1.hasUserDefinedProperty=function(F,A){if(F==null)return!1;if(Array.isArray(A)){for(let B of A)if(EZ1.hasUserDefinedProperty(F,B))return!0;return!1}if(GZ1.call(F,A))return!0;if(typeof F==="object"&&A in F){let B=F[A];return B!==Object.prototype[A]&&B!==Array.prototype[A]}return!1};/*!
318
+ * ignore
319
+ */var ax=Math.pow(2,32)-1;EZ1.isArrayIndex=function(F){if(typeof F==="number")return F>=0&&F<=ax;if(typeof F==="string"){if(!/^\d+$/.test(F))return!1;return F=+F,F>=0&&F<=ax}return!1};EZ1.array.unique=function(F){let A=new Set,B=new Set,D=[];for(let J of F)if(typeof J==="number"||typeof J==="string"||J==null){if(A.has(J))continue;D.push(J),A.add(J)}else if(T4(J,"ObjectId")){if(B.has(J.toString()))continue;D.push(J),B.add(J.toString())}else D.push(J);return D};EZ1.buffer={};EZ1.buffer.areEqual=function(F,A){if(!Buffer.isBuffer(F))return!1;if(!Buffer.isBuffer(A))return!1;if(F.length!==A.length)return!1;for(let B=0,D=F.length;B<D;++B)if(F[B]!==A[B])return!1;return!0};EZ1.getFunctionName=BZ1;EZ1.decorate=function(F,A){for(let B in A){if(qF.has(B))continue;F[B]=A[B]}};EZ1.mergeClone=function(F,A){if(HF(A))A=A.toObject({transform:!1,virtuals:!1,depopulate:!0,getters:!1,flattenDecimals:!1});let B=Object.keys(A),D=B.length,J=0,X;while(J<D){if(X=B[J++],qF.has(X))continue;if(typeof F[X]==="undefined")F[X]=iH(A[X],{transform:!1,virtuals:!1,depopulate:!0,getters:!1,flattenDecimals:!1});else{let Z=A[X];if(Z!=null&&Z.valueOf&&!(Z instanceof Date))Z=Z.valueOf();if(EZ1.isObject(Z)){let Y=Z;if(HF(Z)&&!Z.isMongooseBuffer)Y=Y.toObject({transform:!1,virtuals:!1,depopulate:!0,getters:!1,flattenDecimals:!1});if(Z.isMongooseBuffer)Y=Buffer.from(Y);EZ1.mergeClone(F[X],Y)}else F[X]=iH(Z,{flattenDecimals:!1})}}};EZ1.each=function(F,A){for(let B of F)A(B)};EZ1.renameObjKey=function(F,A,B){return Object.keys(F).reduce((J,X)=>{if(X===A)J[B]=F[A];else J[X]=F[X];return J},{})};/*!
320
+ * ignore
321
+ */EZ1.getOption=function(F){let A=Array.prototype.slice.call(arguments,1);for(let B of A){if(B==null)continue;if(B[F]!=null)return B[F]}return null};/*!
322
+ * ignore
323
+ */EZ1.noop=function(){};EZ1.errorToPOJO=function F(A){if(!(A instanceof Error))throw new Error("`error` must be `instanceof Error`.");let D={};for(let J of Object.getOwnPropertyNames(A))D[J]=A[J];return D};/*!
324
+ * ignore
325
+ */EZ1.warn=function F(A){return process.emitWarning(A,{code:"MONGOOSE"})};EZ1.injectTimestampsOption=function F(A,B){if(B==null)return;A.timestamps=B}});var P0=K((pD,Wf)=>{/*!
326
+ * Module dependencies.
327
+ */var WF=_2(),Hf=B6(),cZ1=KD(),lZ1=XH(),lD=Z0(),tH=OS(),pZ1=uS(),oH=fS(),Zf=Z6(),iZ1=t().schemaTypeSymbol,R9=X1(),qf=t().validatorErrorSymbol,nZ1=t().documentIsModified,Yf=t().populateModelSymbol,eH=WF.CastError,Fq=WF.ValidatorError,sZ1={_skipMarkModified:!0};function H1(F,A,B){this[iZ1]=!0,this.path=F,this.instance=B,this.validators=[],this.getters=this.constructor.hasOwnProperty("getters")?this.constructor.getters.slice():[],this.setters=this.constructor.hasOwnProperty("setters")?this.constructor.setters.slice():[],this.splitPath(),A=A||{};let D=this.constructor.defaultOptions||{},J=Object.keys(D);for(let Y of J)if(Y==="validate")this.validate(D.validate);else if(D.hasOwnProperty(Y)&&!Object.prototype.hasOwnProperty.call(A,Y))A[Y]=D[Y];if(A.select==null)delete A.select;let X=this.OptionsConstructor||Hf;if(this.options=new X(A),this._index=null,R9.hasUserDefinedProperty(this.options,"immutable"))this.$immutable=this.options.immutable,tH(this);let Z=Object.keys(this.options);for(let Y of Z){if(Y==="cast"){if(Array.isArray(this.options[Y]))this.castFunction.apply(this,this.options[Y]);else this.castFunction(this.options[Y]);continue}if(R9.hasUserDefinedProperty(this.options,Y)&&typeof this[Y]==="function"){if(Y==="index"&&this._index){if(A.index===!1){let E=this._index;if(typeof E==="object"&&E!=null){if(E.unique)throw new Error('Path "'+this.path+'" may not have `index` set to false and `unique` set to true');if(E.sparse)throw new Error('Path "'+this.path+'" may not have `index` set to false and `sparse` set to true')}this._index=!1}continue}let $=A[Y];if(Y==="default"){this.default($);continue}let G=Array.isArray($)?$:[$];this[Y].apply(this,G)}}Object.defineProperty(this,"$$context",{enumerable:!1,configurable:!1,writable:!0,value:null})}H1.prototype.OptionsConstructor=Hf;H1.prototype.path;H1.prototype.validators;H1.prototype.isRequired;H1.prototype.splitPath=function(){if(this._presplitPath!=null)return this._presplitPath;if(this.path==null)return;return this._presplitPath=this.path.indexOf(".")===-1?[this.path]:this.path.split("."),this._presplitPath};H1.cast=function F(A){if(arguments.length===0)return this._cast;if(A===!1)A=(B)=>B;return this._cast=A,this._cast};H1.prototype.castFunction=function F(A,B){if(arguments.length===0)return this._castFunction;if(A===!1)A=this.constructor._defaultCaster||((D)=>D);if(typeof A==="string")return this._castErrorMessage=A,this._castFunction;if(A!=null)this._castFunction=A;if(B!=null)this._castErrorMessage=B;return this._castFunction};H1.prototype.cast=function F(){throw new Error("Base SchemaType class does not implement a `cast()` function")};H1.set=function F(A,B){if(!this.hasOwnProperty("defaultOptions"))this.defaultOptions=Object.assign({},this.defaultOptions);this.defaultOptions[A]=B};H1.get=function(F){this.getters=this.hasOwnProperty("getters")?this.getters:[],this.getters.push(F)};H1.prototype.default=function(F){if(arguments.length===1){if(F===void 0){this.defaultValue=void 0;return}if(F!=null&&F.instanceOfSchema)throw new WF("Cannot set default value of path `"+this.path+"` to a mongoose Schema instance.");return this.defaultValue=F,this.defaultValue}else if(arguments.length>1)this.defaultValue=[...arguments];return this.defaultValue};H1.prototype.index=function(F){return this._index=F,R9.expires(this._index),this};H1.prototype.unique=function F(A,B){if(this._index===!1){if(!A)return;throw new Error('Path "'+this.path+'" may not have `index` set to false and `unique` set to true')}if(!this.options.hasOwnProperty("index")&&A===!1)return this;if(this._index==null||this._index===!0)this._index={};else if(typeof this._index==="string")this._index={type:this._index};if(this._index.unique=!!A,typeof B==="string")this._duplicateKeyErrorMessage=B;return this};H1.prototype.text=function(F){if(this._index===!1){if(!F)return this;throw new Error('Path "'+this.path+'" may not have `index` set to false and `text` set to true')}if(!this.options.hasOwnProperty("index")&&F===!1)return this;if(this._index===null||this._index===void 0||typeof this._index==="boolean")this._index={};else if(typeof this._index==="string")this._index={type:this._index};return this._index.text=F,this};H1.prototype.sparse=function(F){if(this._index===!1){if(!F)return this;throw new Error('Path "'+this.path+'" may not have `index` set to false and `sparse` set to true')}if(!this.options.hasOwnProperty("index")&&F===!1)return this;if(this._index==null||typeof this._index==="boolean")this._index={};else if(typeof this._index==="string")this._index={type:this._index};return this._index.sparse=F,this};H1.prototype.immutable=function(F){return this.$immutable=F,tH(this),this};H1.prototype.transform=function(F){return this.options.transform=F,this};H1.prototype.set=function(F){if(typeof F!=="function")throw new TypeError("A setter must be a function.");return this.setters.push(F),this};H1.prototype.get=function(F){if(typeof F!=="function")throw new TypeError("A getter must be a function.");return this.getters.push(F),this};H1.prototype.validateAll=function(F){for(let A=0;A<F.length;A++)this.validate(F[A]);return this};H1.prototype.validate=function(F,A,B){if(typeof F==="function"||F&&R9.getFunctionName(F.constructor)==="RegExp"){let Z;if(typeof A==="function")Z={validator:F,message:A},Z.type=B||"user defined";else if(A instanceof Object&&!B){if(Z=oH(A)?Object.assign({},A):lD(A),!Z.message)Z.message=Z.msg;Z.validator=F,Z.type=Z.type||"user defined"}else{if(A==null)A=WF.messages.general.default;if(!B)B="user defined";Z={message:A,type:B,validator:F}}return this.validators.push(Z),this}let D,J,X;for(D=0,J=arguments.length;D<J;D++){if(X=arguments[D],!R9.isPOJO(X)){let Z="Invalid validator. Received ("+typeof X+") "+X+". See https://mongoosejs.com/docs/api/schematype.html#SchemaType.prototype.validate()";throw new Error(Z)}this.validate(X.validator,X)}return this};H1.prototype.required=function(F,A){let B={};if(arguments.length>0&&F==null)return this.validators=this.validators.filter(function(X){return X.validator!==this.requiredValidator},this),this.isRequired=!1,delete this.originalRequiredValue,this;if(typeof F==="object")B=F,A=B.message||A,F=F.isRequired;if(F===!1)return this.validators=this.validators.filter(function(X){return X.validator!==this.requiredValidator},this),this.isRequired=!1,delete this.originalRequiredValue,this;let D=this;if(this.isRequired=!0,this.requiredValidator=function(X){let Z=this&&this.$__&&this.$__.cachedRequired;if(Z!=null&&!this.$__isSelected(D.path)&&!this[nZ1](D.path))return!0;if(Z!=null&&D.path in Z){let Y=Z[D.path]?D.checkRequired(X,this):!0;return delete Z[D.path],Y}else if(typeof F==="function")return F.apply(this)?D.checkRequired(X,this):!0;return D.checkRequired(X,this)},this.originalRequiredValue=F,typeof F==="string")A=F,F=void 0;let J=A||WF.messages.general.required;return this.validators.unshift(Object.assign({},B,{validator:this.requiredValidator,message:J,type:"required"})),this};H1.prototype.ref=function(F){return this.options.ref=F,this};H1.prototype.getDefault=function(F,A,B){let D;if(typeof this.defaultValue==="function")if(this.defaultValue===Date.now||this.defaultValue===Array||this.defaultValue.name.toLowerCase()==="objectid")D=this.defaultValue.call(F);else D=this.defaultValue.call(F,F);else D=this.defaultValue;if(D!==null&&D!==void 0){if(typeof D==="object"&&(!this.options||!this.options.shared))D=lD(D);if(B&&B.skipCast)return this._applySetters(D,F);let J=this.applySetters(D,F,A,void 0,sZ1);if(J&&!Array.isArray(J)&&J.$isSingleNested)J.$__parent=F;return J}return D};H1.prototype._applySetters=function(F,A,B,D,J){let X=F;if(B)return X;let Z=this.setters;for(let Y=Z.length-1;Y>=0;Y--)X=Z[Y].call(A,X,D,this,J);return X};/*!
328
+ * ignore
329
+ */H1.prototype._castNullish=function F(A){return A};H1.prototype.applySetters=function(F,A,B,D,J){let X=this._applySetters(F,A,B,D,J);if(X==null)return this._castNullish(X);return X=this.cast(X,A,B,D,J),X};H1.prototype.applyGetters=function(F,A){let B=F,D=this.getters,J=D.length;if(J===0)return B;for(let X=0;X<J;++X)B=D[X].call(A,B,this);return B};H1.prototype.select=function F(A){return this.selected=!!A,this};H1.prototype.doValidate=function(F,A,B,D){let J=!1,X=this.path;if(typeof A!=="function")throw new TypeError(`Must pass callback function to doValidate(), got ${typeof A}`);let Z=this.validators.filter((G)=>typeof G==="object"&&G!==null),Y=Z.length;if(!Y)return A(null);for(let G=0,E=Z.length;G<E;++G){if(J)break;let H=Z[G],q=H.validator,W,z=oH(H)?Object.assign({},H):lD(H);if(z.path=D&&D.path?D.path:X,z.fullPath=this.$fullPath,z.value=F,q instanceof RegExp){$(q.test(F),z,B);continue}if(typeof q!=="function")continue;if(F===void 0&&q!==this.requiredValidator){$(!0,z,B);continue}try{if(z.propsParameter)W=q.call(B,F,z);else W=q.call(B,F)}catch(C){if(W=!1,z.reason=C,C.message)z.message=C.message}if(W!=null&&typeof W.then==="function")W.then(function(C){$(C,z,B)},function(C){z.reason=C,z.message=C.message,W=!1,$(W,z,B)});else $(W,z,B)}function $(G,E,H){if(J)return;if(G===void 0||G){if(--Y<=0)Zf(function(){A(null)})}else J=new(E.ErrorConstructor||Fq)(E,H),J[qf]=!0,Zf(function(){A(J)})}};function $f(F,A){if(F!==void 0&&!F){let D=new(A.ErrorConstructor||Fq)(A);return D[qf]=!0,D}}H1.prototype.doValidateSync=function(F,A,B){let D=this.path;if(!this.validators.length)return null;let X=this.validators;if(F===void 0)if(this.validators.length!==0&&this.validators[0].type==="required")X=[this.validators[0]];else return null;let Z=null,Y=0,$=X.length;for(Y=0;Y<$;++Y){let G=X[Y];if(G===null||typeof G!=="object")continue;let E=G.validator,H=oH(G)?Object.assign({},G):lD(G);H.path=B&&B.path?B.path:D,H.fullPath=this.$fullPath,H.value=F;let q=!1;if(pZ1(E))continue;if(E instanceof RegExp){Z=$f(E.test(F),H);continue}if(typeof E!=="function")continue;try{if(H.propsParameter)q=E.call(A,F,H);else q=E.call(A,F)}catch(W){q=!1,H.reason=W}if(q!=null&&typeof q.then==="function")continue;if(Z=$f(q,H),Z)break}return Z};H1._isRef=function(F,A,B,D){let J=D&&F.options&&(F.options.ref||F.options.refPath);if(!J&&B&&B.$__!=null){let X=B.$__fullPath(F.path,!0),Z=B.ownerDocument();J=X!=null&&Z.$populated(X)||B.$populated(F.path)}if(J){if(A==null)return!0;if(!Buffer.isBuffer(A)&&A._bsontype!=="Binary"&&R9.isObject(A))return!0;return D}return!1};/*!
330
+ * ignore
331
+ */H1.prototype._castRef=function F(A,B,D){if(A==null)return A;if(A.$__!=null)return A.$__.wasPopulated=A.$__.wasPopulated||{value:A._doc._id},A;if(Buffer.isBuffer(A)||!R9.isObject(A)){if(D)return A;throw new eH(this.instance,A,this.path,null,this)}let J=B.$__fullPath(this.path,!0),Z=B.ownerDocument().$populated(J,!0),Y=A;if(!B.$__.populated||!B.$__.populated[J]||!B.$__.populated[J].options||!B.$__.populated[J].options.options||!B.$__.populated[J].options.options.lean){let $=Z?Z.options[Yf]:B.constructor.db.model(this.options.ref);Y=new $(A),Y.$__.wasPopulated={value:Y._doc._id,options:{[Yf]:$}}}return Y};/*!
332
+ * ignore
333
+ */function Gf(F,A){return this.castForQuery(null,F,A)}/*!
334
+ * ignore
335
+ */function aZ1(F,A){let B=this;if(!Array.isArray(F))return[this.castForQuery(null,F,A)];return F.map(function(D){return B.castForQuery(null,D,A)})}function Ef(F,A){let B=this;if(!Array.isArray(F))return[this.castForQuery(null,F,A)];return F.map(function(D){if(Array.isArray(D)&&D.length===0)return D;return B.castForQuery(null,D,A)})}/*!
336
+ * ignore
337
+ */H1.prototype.$conditionalHandlers={$all:aZ1,$eq:Gf,$in:Ef,$ne:Gf,$nin:Ef,$exists:cZ1,$type:lZ1};H1.prototype.castForQuery=function(F,A,B){let D;if(F!=null){if(D=this.$conditionalHandlers[F],!D)throw new Error("Can't use "+F);return D.call(this,A,B)}try{return this.applySetters(A,B)}catch(J){if(J instanceof eH&&J.path===this.path&&this.$fullPath!=null)J.path=this.$fullPath;throw J}};H1.checkRequired=function(F){if(arguments.length!==0)this._checkRequired=F;return this._checkRequired};H1.prototype.checkRequired=function(F){return F!=null};H1.prototype.clone=function(){let F=Object.assign({},this.options),A=new this.constructor(this.path,F,this.instance);if(A.validators=this.validators.slice(),this.requiredValidator!==void 0)A.requiredValidator=this.requiredValidator;if(this.defaultValue!==void 0)A.defaultValue=this.defaultValue;if(this.$immutable!==void 0&&this.options.immutable===void 0)A.$immutable=this.$immutable,tH(A);if(this._index!==void 0)A._index=this._index;if(this.selected!==void 0)A.selected=this.selected;if(this.isRequired!==void 0)A.isRequired=this.isRequired;if(this.originalRequiredValue!==void 0)A.originalRequiredValue=this.originalRequiredValue;return A.getters=this.getters.slice(),A.setters=this.setters.slice(),A};H1.prototype.getEmbeddedSchemaType=function F(){return this.$embeddedSchemaType};/*!
338
+ * If _duplicateKeyErrorMessage is a string, replace unique index errors "E11000 duplicate key error" with this string.
339
+ *
340
+ * @api private
341
+ */H1.prototype._duplicateKeyErrorMessage=null;/*!
342
+ * Module exports.
343
+ */Wf.exports=pD=H1;pD.CastError=eH;pD.ValidatorError=Fq});var Aq=K((EN1,zf)=>{var r6=N6();class J6{constructor(F){if(Object.assign(this,F),F!=null&&F.options!=null)this.options=Object.assign({},F.options)}}Object.defineProperty(J6.prototype,"ref",r6);Object.defineProperty(J6.prototype,"refPath",r6);Object.defineProperty(J6.prototype,"localField",r6);Object.defineProperty(J6.prototype,"foreignField",r6);Object.defineProperty(J6.prototype,"justOne",r6);Object.defineProperty(J6.prototype,"count",r6);Object.defineProperty(J6.prototype,"match",r6);Object.defineProperty(J6.prototype,"options",r6);Object.defineProperty(J6.prototype,"skip",r6);Object.defineProperty(J6.prototype,"limit",r6);Object.defineProperty(J6.prototype,"perDocumentLimit",r6);zf.exports=J6});var iD=K((HN1,Cf)=>{Cf.exports=function F(A,B,D){if(A==null)return A;if(A._doc!=null)A=A._doc;if(arguments.length>=3){if(typeof A!=="object")return;if(D===void 0)return;if(A instanceof Map)A.set(B,D);else A[B]=D;return D}if(B==="$*")return A instanceof Map?Array.from(A.values()):Object.keys(A).map((J)=>A[J]);if(A instanceof Map)return A.get(B);return A[B]}});var Bq=K((qN1,Lf)=>{var rZ1=z1(),tZ1=UH(),Kf=iD(),Uf=D6(),oZ1=import.meta.require("util"),eZ1=X1(),Qf=/(\.\d+$|\.\d+\.)/g;Lf.exports=function F(A,B,D,J,X){if(A==null)return[];if(typeof A==="string"&&X!=null&&tZ1(X,A))throw new rZ1("refPath `"+A+"` must not be excluded in projection, got "+oZ1.inspect(X));if(Qf.test(D)){let $=D.split(Qf);if($[$.length-1]==="")throw new Error("Can't populate individual element in an array");let G="",E=A;for(let W=0;W<$.length;W+=2){let z=$[W];if(E.startsWith(z+"."))G+=E.substring(0,z.length)+$[W+1],E=E.substring(z.length+1);else if(W===$.length-1){G+=E,E="";break}else throw new Error("Could not normalize ref path, chunk "+z+" not in populated path")}let H=Uf.get(G,B,Kf),q=Array.isArray(H)?H:[H];return q=eZ1.array.flatten(q),q}let Z=Uf.get(A,B,Kf),Y;if(J!=null&&J.virtuals.hasOwnProperty(A))Y=[J.virtuals[A].applyGetters(void 0,B)];else Y=Array.isArray(Z)?Z:[Z];return Y}});var nD=K((WN1,Vf)=>{var FY1=Bq(),AY1=X1(),BY1=t().modelSymbol;function m3(F,A){this.path=A,this.getters=[],this.setters=[],this.options=Object.assign({},F)}m3.prototype._applyDefaultGetters=function(){if(this.getters.length>0||this.setters.length>0)return;let A="$"+this.path;this.getters.push(function(){return this.$locals[A]}),this.setters.push(function(B){this.$locals[A]=B})};/*!
344
+ * ignore
345
+ */m3.prototype.clone=function(){let F=new m3(this.options,this.path);return F.getters=[].concat(this.getters),F.setters=[].concat(this.setters),F};m3.prototype.get=function(F){return this.getters.push(F),this};m3.prototype.set=function(F){return this.setters.push(F),this};m3.prototype.applyGetters=function(F,A){if(AY1.hasUserDefinedProperty(this.options,["ref","refPath"])&&A.$$populatedVirtuals&&A.$$populatedVirtuals.hasOwnProperty(this.path))F=A.$$populatedVirtuals[this.path];let B=F;for(let D of this.getters)B=D.call(A,B,this,A);return B};m3.prototype.applySetters=function(F,A){let B=F;for(let D of this.setters)B=D.call(A,B,this,A);return B};m3.prototype._getModelNamesForPopulate=function F(A){if(this.options.refPath)return FY1(this.options.refPath,A,this.path);let B=null;if(typeof this.options.ref==="function"&&!this.options.ref[BY1])B=this.options.ref.call(A,A);else B=this.options.ref;if(B!=null&&!Array.isArray(B))return[B];return B};/*!
346
+ * exports
347
+ */Vf.exports=m3});var Dq=K((zN1,Rf)=>{Rf.exports=function F(A){let B={_id:{auto:!0}};B._id[A.options.typeKey]="ObjectId",A.add(B)}});var Jq=K((CN1,wf)=>{wf.exports=function F(A,B){let D=A.discriminatorMapping&&A.discriminatorMapping.value;if(D&&!("sparse"in B)){let J=A.options.discriminatorKey;B.partialFilterExpression=B.partialFilterExpression||{},B.partialFilterExpression[J]=D}return B}});var Nf=K((KN1,If)=>{var Xq=W0(),DY1=I4(),JY1=Jq();If.exports=function F(A){let B=[],D=new WeakMap,J=A.constructor.indexTypes,X=new Map;return Z(A),B;function Z($,G,E){if(D.has($))return;D.set($,!0),G=G||"";let H=Object.keys($.paths);for(let q of H){let W=$.paths[q];if(E!=null&&E.paths[q])continue;if(W._duplicateKeyErrorMessage!=null)$._duplicateKeyErrorMessagesByPath=$._duplicateKeyErrorMessagesByPath||{},$._duplicateKeyErrorMessagesByPath[q]=W._duplicateKeyErrorMessage;if(W.$isMongooseDocumentArray||W.$isSingleNested){if(Xq(W,"options.excludeIndexes")!==!0&&Xq(W,"schemaOptions.excludeIndexes")!==!0&&Xq(W,"schema.options.excludeIndexes")!==!0)Z(W.schema,G+q+".");if(W.schema.discriminators!=null){let C=W.schema.discriminators,U=Object.keys(C);for(let Q of U)Z(C[Q],G+q+".",W.schema)}if(W.$isMongooseDocumentArray)continue}let z=W._index||W.caster&&W.caster._index;if(z!==!1&&z!==null&&z!==void 0){let C={},U=DY1(z),Q=U?z:{},L=typeof z==="string"?z:U?z.type:!1;if(L&&J.indexOf(L)!==-1)C[G+q]=L;else if(Q.text)C[G+q]="text",delete Q.text;else{let w=!1;if(z==="descending"||z==="desc")w=!0;else if(z==="ascending"||z==="asc")w=!1;else w=Number(z)===-1;C[G+q]=w?-1:1}if(delete Q.type,!("background"in Q))Q.background=!0;if($.options.autoIndex!=null)Q._autoIndex=$.options.autoIndex;let V=Q&&Q.name;if(typeof V==="string")if(X.has(V))Object.assign(X.get(V),C);else B.push([C,Q]),X.set(V,C);else B.push([C,Q]),X.set(V,C)}}if(D.delete($),G)Y($,G);else $._indexes.forEach(function(q){let W=q[1];if(!("background"in W))W.background=!0;JY1($,W)}),B=B.concat($._indexes)}function Y($,G){let E=$._indexes,H=E.length;for(let q=0;q<H;++q){let W=E[q][0],z=E[q][1],C=Object.keys(W),U=C.length,Q={};for(let V=0;V<U;++V){let w=C[V];Q[G+w]=W[w]}let L=Object.assign({},z);if(z!=null&&z.partialFilterExpression!=null){L.partialFilterExpression={};let V=z.partialFilterExpression;for(let w of Object.keys(V))L.partialFilterExpression[G+w]=V[w]}B.push([Q,L])}}}});var Zq=K((UN1,Pf)=>{Pf.exports=function F(A){switch(A){case"p":A="primary";break;case"pp":A="primaryPreferred";break;case"s":A="secondary";break;case"sp":A="secondaryPreferred";break;case"n":A="nearest";break}return A}});var Tf=K((QN1,Mf)=>{/*!
348
+ * ignore
349
+ */Mf.exports=function F(A){if(!(!A.paths.id&&A.paths._id&&A.options.id))return A;if(A.aliases&&A.aliases.id)return A;return A.virtual("id").get(XY1),A};function XY1(){if(this._id!=null)return this._id.toString();return null}});var kf=K((LN1,jf)=>{jf.exports=function F(A,B){let D=Object.keys(A),J=Object.keys(B);if(D.length!==J.length)return!1;for(let X=0;X<D.length;X++){let Z=D[X];if(Z!==J[X]||A[Z]!==B[Z])return!1}return!0}});var Sf=K((VN1,Of)=>{Of.exports=function F(A,B,D,J){if(J.justOne||J.count){if(A[B]=Array.isArray(D)?D[0]:D,typeof A[B]!=="object")A[B]=J.count?D:null}else A[B]=Array.isArray(D)?D:D==null?[]:[D],A[B]=A[B].filter(function(X){return X&&typeof X==="object"});return A[B]}});var zF=K((RN1,uf)=>{uf.exports=function F(A){return A.replace(/\.\$(\[[^\]]*\])?(?=\.)/g,".0").replace(/\.\$(\[[^\]]*\])?$/g,".0")}});var sD=K((wN1,xf)=>{xf.exports=ZY1;/*!
350
+ * ignore
351
+ */function ZY1(F,A){if(F==null)return null;if(typeof F==="boolean")return A;if(typeof F[A]==="boolean")return F[A]?A:null;if(!(A in F))return A;return F[A]}});var $q=K((IN1,ff)=>{var YY1=zF(),d3=sD();ff.exports=w9;/*!
352
+ * ignore
353
+ */function w9(F,A,B){if(A==null)return;if(Object.keys(A).some((Y)=>Y[0]==="$")){if(A.$push)Z(A.$push);if(A.$addToSet)Z(A.$addToSet);if(A.$set!=null){let Y=Object.keys(A.$set);for(let $ of Y)Yq(B,$,A.$set,F)}if(A.$setOnInsert!=null){let Y=Object.keys(A.$setOnInsert);for(let $ of Y)Yq(B,$,A.$setOnInsert,F)}}let X=Object.keys(A).filter((Y)=>Y[0]!=="$");for(let Y of X)Yq(B,Y,A,F);function Z(Y){for(let $ of Object.keys(Y)){let G=B.path($.replace(/\.\$\./i,".").replace(/.\$$/,""));if(Y[$]&&G&&G.$isMongooseDocumentArray&&G.schema.options.timestamps){let E=G.schema.options.timestamps,H=d3(E,"createdAt"),q=d3(E,"updatedAt");if(Y[$].$each)Y[$].$each.forEach(function(W){if(q!=null)W[q]=F;if(H!=null)W[H]=F;w9(F,W,G.schema)});else{if(q!=null)Y[$][q]=F;if(H!=null)Y[$][H]=F;w9(F,Y[$],G.schema)}}}}}function $Y1(F,A,B){let D=A.schema.options.timestamps,J=F.length;if(!D){for(let Y=0;Y<J;++Y)w9(B,F[Y],A.schema);return}let X=d3(D,"createdAt"),Z=d3(D,"updatedAt");for(let Y=0;Y<J;++Y){if(Z!=null)F[Y][Z]=B;if(X!=null)F[Y][X]=B;w9(B,F[Y],A.schema)}}function GY1(F,A,B){let D=A.schema.options.timestamps;if(!D){w9(B,F,A.schema);return}let J=d3(D,"createdAt"),X=d3(D,"updatedAt");if(X!=null)F[X]=B;if(J!=null)F[J]=B;w9(B,F,A.schema)}function Yq(F,A,B,D){let J=YY1(A),X=F.path(J);if(!X)return;let Z=[],Y=J.split(".");for(let $=Y.length-1;$>0;--$){let G=F.path(Y.slice(0,$).join("."));if(G!=null&&(G.$isMongooseDocumentArray||G.$isSingleNested))Z.push({parentPath:A.split(".").slice(0,$).join("."),parentSchemaType:G})}if(Array.isArray(B[A])&&X.$isMongooseDocumentArray)$Y1(B[A],X,D);else if(B[A]&&X.$isSingleNested)GY1(B[A],X,D);else if(Z.length>0)for(let $ of Z){let{parentPath:G,parentSchemaType:E}=$,H=E.schema.options.timestamps,q=d3(H,"updatedAt");if(!H||q==null)continue;if(E.$isSingleNested)B[G+"."+q]=D;else if(E.$isMongooseDocumentArray){let W=A.substring(G.length+1);if(/^\d+$/.test(W)){B[G+"."+W][q]=D;continue}let z=W.indexOf(".");W=z!==-1?W.substring(0,z):W,B[G+"."+W+"."+q]=D}}else if(X.schema!=null&&X.schema!=F&&B[A]){let $=X.schema.options.timestamps,G=d3($,"createdAt"),E=d3($,"updatedAt");if(!$)return;if(E!=null)B[A][E]=D;if(G!=null)B[A][G]=D}}});var Gq=K((NN1,_f)=>{/*!
354
+ * ignore
355
+ */var EY1=W0();_f.exports=HY1;/*!
356
+ * ignore
357
+ */function HY1(F,A,B,D,J,X){let Z=D,Y=Z,$=EY1(J,"timestamps",!0);if(!$||Z==null)return D;let G=$!=null&&$.createdAt===!1,E=$!=null&&$.updatedAt===!1;if(X){if(D&&D.$set)D=D.$set,Z.$set={},Y=Z.$set;if(!E&&B&&!D[B])Y[B]=F;if(!G&&A&&!D[A])Y[A]=F;return Z}if(D=D||{},Array.isArray(Z)){if(B==null)return Z;return Z.push({$set:{[B]:F}}),Z}if(Z.$set=Z.$set||{},!E&&B&&(!D.$currentDate||!D.$currentDate[B])){let H=!1;if(B.indexOf(".")!==-1){let q=B.split(".");for(let W=1;W<q.length;++W){let z=q.slice(-W).join("."),C=q.slice(0,-W).join(".");if(D[C]!=null){D[C][z]=F,H=!0;break}else if(D.$set&&D.$set[C]){D.$set[C][z]=F,H=!0;break}}}if(!H)Z.$set[B]=F;if(Z.hasOwnProperty(B))delete Z[B]}if(!G&&A){if(D[A])delete D[A];if(D.$set&&D.$set[A])delete D.$set[A];let H=!1;if(A.indexOf(".")!==-1){let q=A.split(".");for(let W=1;W<q.length;++W){let z=q.slice(-W).join("."),C=q.slice(0,-W).join(".");if(D[C]!=null){D[C][z]=F,H=!0;break}else if(D.$set&&D.$set[C]){D.$set[C][z]=F,H=!0;break}}}if(!H)Z.$setOnInsert=Z.$setOnInsert||{},Z.$setOnInsert[A]=F}if(Object.keys(Z.$set).length===0)delete Z.$set;return Z}});var bf=K((PN1,gf)=>{gf.exports=function F(A,B,D,J,X){let Z=B!=null&&B.updatedAt===!1,Y=B!=null&&B.createdAt===!1,$=D!=null?D():A.ownerDocument().constructor.base.now();if(!Y&&(A.isNew||A.$isSubdocument)&&J&&!A.$__getValue(J)&&A.$__isSelected(J))A.$set(J,$,void 0,{overwriteImmutable:!0});if(!Z&&X&&(A.isNew||A.$isModified())){let G=$;if(A.isNew&&J!=null)G=A.$__getValue(J);A.$set(X,G)}}});var mf=K((MN1,hf)=>{var qY1=$q(),WY1=Gq(),zY1=W0(),yf=sD(),CY1=bf(),KY1=U9(),vf=new Set(["replaceOne","findOneAndReplace"]);hf.exports=function F(A,B){let D=A.childSchemas.find(J);function J(H){return!!H.schema.options.timestamps}if(!B&&!D)return;let X=yf(B,"createdAt"),Z=yf(B,"updatedAt"),Y=B!=null&&B.hasOwnProperty("currentTime")?B.currentTime:null,$={};if(A.$timestamps={createdAt:X,updatedAt:Z},X&&!A.paths[X]){let H=A.base!=null?A.base.get("timestamps.createdAt.immutable"):null,q=H!=null?H:!0;$[X]={[A.options.typeKey||"type"]:Date,immutable:q}}if(Z&&!A.paths[Z])$[Z]=Date;A.add($),A.pre("save",function H(q){let W=zY1(this,"$__.saveOptions.timestamps");if(W===!1)return q();CY1(this,W,Y,X,Z),q()}),A.methods.initializeTimestamps=function(){let H=Y!=null?Y():this.constructor.base.now();if(X&&!this.get(X))this.$set(X,H);if(Z&&!this.get(Z))this.$set(Z,H);if(this.$isSubdocument)return this;let q=this.$getAllSubdocs();for(let W of q)if(W.initializeTimestamps)W.initializeTimestamps();return this},E[KY1.builtInMiddleware]=!0;let G={query:!0,model:!1};A.pre("findOneAndReplace",G,E),A.pre("findOneAndUpdate",G,E),A.pre("replaceOne",G,E),A.pre("update",G,E),A.pre("updateOne",G,E),A.pre("updateMany",G,E);function E(H){let q=Y!=null?Y():this.model.base.now();if(vf.has(this.op)&&this.getUpdate()==null)this.setUpdate({});WY1(q,X,Z,this.getUpdate(),this._mongooseOptions,vf.has(this.op)),qY1(q,this.getUpdate(),this.model.schema),H()}}});var cf=K((TN1,df)=>{var UY1=z1(),QY1=import.meta.require("util");df.exports=LY1;function LY1(F,A){if(typeof F==="string")return;if(typeof F==="function")return;throw new UY1('Invalid ref at path "'+A+'". Got '+QY1.inspect(F,{depth:0}))}});var aD=K((NY1)=>{/*!
358
+ * ignore
359
+ */var lf=Object.freeze(["countDocuments","distinct","estimatedDocumentCount","find","findOne","findOneAndReplace","findOneAndUpdate","replaceOne","updateMany","updateOne","deleteMany","deleteOne","findOneAndDelete"]);NY1.queryOperations=lf;/*!
360
+ * ignore
361
+ */var VY1=lf.concat(["validate"]);NY1.queryMiddlewareFunctions=VY1;/*!
362
+ * ignore
363
+ */var RY1=["aggregate"];NY1.aggregateMiddlewareFunctions=RY1;/*!
364
+ * ignore
365
+ */var wY1=["bulkWrite","createCollection","insertMany"];NY1.modelMiddlewareFunctions=wY1;/*!
366
+ * ignore
367
+ */var IY1=["validate","save","remove","updateOne","deleteOne","init"];NY1.documentMiddlewareFunctions=IY1});var rD=K((kN1,pf)=>{var OY1=U9(),SY1=QD();/*!
368
+ * ignore
369
+ */pf.exports=CF;/*!
370
+ * ignore
371
+ */CF.middlewareFunctions=["deleteOne","save","validate","remove","updateOne","init"];/*!
372
+ * ignore
373
+ */var uY1=new Set(CF.middlewareFunctions.flatMap((F)=>[F,`$__${F}`]));function CF(F,A,B){B=B||{};let D={useErrorHandlers:!0,numCallbackParams:1,nullResultByDefault:!0,contextParameter:!0},J=B.decorateDoc?F:F.prototype;F.$appliedHooks=!0;for(let G of Object.keys(A.paths)){let E=A.paths[G],H=null;if(E.$isSingleNested)H=E.caster;else if(E.$isMongooseDocumentArray)H=E.Constructor;else continue;if(H.$appliedHooks)continue;if(CF(H,E.schema,{...B,isChildSchema:!0}),H.discriminators!=null){let q=Object.keys(H.discriminators);for(let W of q)CF(H.discriminators[W],H.discriminators[W].schema,B)}}let X=A.s.hooks.filter((G)=>{if(G.name==="updateOne"||G.name==="deleteOne")return!!G.document;if(G.name==="remove"||G.name==="init")return G.document==null||!!G.document;if(G.query!=null||G.document!=null)return G.document!==!1;return!0}).filter((G)=>{if(A.methods[G.name])return!G.fn[OY1.builtInMiddleware];return!0});F._middleware=X,J.$__originalValidate=J.$__originalValidate||J.$__validate;let Z=B&&B.isChildSchema?["save","validate","deleteOne"]:["save","validate"];for(let G of Z){let E=G==="validate"?"$__originalValidate":`$__${G}`,H=X.createWrapper(G,J[E],null,D);J[`$__${G}`]=H}J.$__init=X.createWrapperSync("init",J.$__init,null,D);let Y=Object.keys(A.methods),$=Object.assign({},D,{checkForPromise:!0});for(let G of Y){if(uY1.has(G))continue;if(!X.hasHooks(G))continue;let E=J[G];J[G]=function(){let H=Array.prototype.slice.call(arguments),q=H.slice(-1).pop(),W=typeof q==="function"?H.slice(0,H.length-1):H;return SY1(q,(z)=>{return this[`$__${G}`].apply(this,W.concat([z]))},F.events)},J[`$__${G}`]=X.createWrapper(G,E,null,$)}}});var tD=K((ON1,tf)=>{var xY1=Q9(),fY1=z1(),nf=Z0(),_Y1=X1().deepEqual,gY1=I2(),bY1=TD(),sf=import.meta.require("util"),yY1=W9(),Eq=l0(),vY1=ID(),af=t().populateModelSymbol;/*!
374
+ * ignore
375
+ */class q3 extends Map{constructor(F,A,B,D){if(gY1(F)==="Object")F=Object.keys(F).reduce((J,X)=>J.concat([[X,F[X]]]),[]);super(F);this.$__parent=B!=null&&B.$__!=null?B:null,this.$__path=A,this.$__schemaType=D==null?new xY1(A):D,this.$__runDeferred()}$init(F,A){if(rf(F),super.set(F,A),A!=null&&A.$isSingleNested)A.$basePath=this.$__path+"."+F}$__set(F,A){super.set(F,A)}get(F,A){if(Eq(F,"ObjectId"))F=F.toString();if(A=A||{},A.getters===!1)return super.get(F);return this.$__schemaType.applyGetters(super.get(F),this.$__parent)}set(F,A){if(Eq(F,"ObjectId"))F=F.toString();if(rf(F),A=bY1(A),this.$__schemaType==null){this.$__deferred=this.$__deferred||[],this.$__deferred.push({key:F,value:A});return}let B,D=this.$__parent,J=D!=null&&D.$__&&D.$__.populated?D.$populated(Z.call(this),!0)||D.$populated(this.$__path,!0):null,X=this.get(F);if(J!=null){if(this.$__schemaType.$isSingleNested)throw new fY1(`Cannot manually populate single nested subdoc underneath Map at path "${this.$__path}". Try using an array instead of a Map.`);if(Array.isArray(A)&&this.$__schemaType.$isMongooseArray)A=A.map((Y)=>{if(Y.$__==null)Y=new J.options[af](Y);return Y.$__.wasPopulated={value:Y._doc._id},Y});else if(A!=null){if(A.$__==null)A=new J.options[af](A);A.$__.wasPopulated={value:A._doc._id}}}else try{let Y=this.$__schemaType.$isMongooseDocumentArray||this.$__schemaType.$isSingleNested?{path:Z.call(this)}:null;A=this.$__schemaType.applySetters(A,this.$__parent,!1,this.get(F),Y)}catch(Y){if(this.$__parent!=null&&this.$__parent.$__!=null){this.$__parent.invalidate(Z.call(this),Y);return}throw Y}if(super.set(F,A),D!=null&&D.$__!=null&&!_Y1(A,X)){let Y=Z.call(this);if(D.markModified(Y),this.$__schemaType.$isMongooseDocumentArray||this.$__schemaType.$isSingleNested)vY1(D,Y)}function Z(){if(B)return B;return B=this.$__path+"."+F,B}}clear(){super.clear();let F=this.$__parent;if(F!=null)F.markModified(this.$__path)}delete(F){if(Eq(F,"ObjectId"))F=F.toString();return this.set(F,void 0),super.delete(F)}toBSON(){return new Map(this)}toObject(F){if(F&&F.flattenMaps){let A={},B=this.keys();for(let D of B)A[D]=nf(this.get(D),F);return A}return new Map(this)}$toObject(){return this.constructor.prototype.toObject.apply(this,arguments)}toJSON(F){if(typeof(F&&F.flattenMaps)==="boolean"?F.flattenMaps:!0){let A={},B=this.keys();for(let D of B)A[D]=nf(this.get(D),F);return A}return new Map(this)}inspect(){return new Map(this)}$__runDeferred(){if(!this.$__deferred)return;for(let F of this.$__deferred)this.set(F.key,F.value);this.$__deferred=null}}if(sf.inspect.custom)Object.defineProperty(q3.prototype,sf.inspect.custom,{enumerable:!1,writable:!1,configurable:!1,value:q3.prototype.inspect});Object.defineProperty(q3.prototype,"$__set",{enumerable:!1,writable:!0,configurable:!1});Object.defineProperty(q3.prototype,"$__parent",{enumerable:!1,writable:!0,configurable:!1});Object.defineProperty(q3.prototype,"$__path",{enumerable:!1,writable:!0,configurable:!1});Object.defineProperty(q3.prototype,"$__schemaType",{enumerable:!1,writable:!0,configurable:!1});Object.defineProperty(q3.prototype,"$isMongooseMap",{enumerable:!1,writable:!1,configurable:!1,value:!0});Object.defineProperty(q3.prototype,"$__deferredCalls",{enumerable:!1,writable:!1,configurable:!1,value:!0});function rf(F){let A=typeof F;if(A!=="string")throw new TypeError(`Mongoose maps only support string keys, got ${A}`);if(F.startsWith("$"))throw new Error(`Mongoose maps do not support keys that start with "$", got "${F}"`);if(F.includes("."))throw new Error(`Mongoose maps do not support keys that contain ".", got "${F}"`);if(yY1.has(F))throw new Error(`Mongoose maps do not support reserved key name "${F}"`)}tf.exports=q3});var ef=K((SN1,of)=>{of.exports=H6().UUID});var Y8=K((hY1)=>{/*!
376
+ * Module exports.
377
+ */hY1.Array=MH();hY1.Buffer=ZF();hY1.Document=hY1.Embedded=D8();hY1.DocumentArray=V9();hY1.Decimal128=GD();hY1.ObjectId=b3();hY1.Map=tD();hY1.Subdocument=kD();hY1.UUID=ef()});var A_=K((fN1,F_)=>{var rY1=B6();class KF extends rY1{}var Hq=N6();Object.defineProperty(KF.prototype,"enum",Hq);Object.defineProperty(KF.prototype,"of",Hq);Object.defineProperty(KF.prototype,"castNonArrays",Hq);/*!
378
+ * ignore
379
+ */F_.exports=KF});var D_=K((_N1,B_)=>{B_.exports=qq;function qq(F){if(!Array.isArray(F))return{min:0,max:0,containsNonArrayItem:!0};if(F.length===0)return{min:1,max:1,containsNonArrayItem:!1};if(F.length===1&&!Array.isArray(F[0]))return{min:1,max:1,containsNonArrayItem:!1};let A=qq(F[0]);for(let B=1;B<F.length;++B){let D=qq(F[B]);if(D.min<A.min)A.min=D.min;if(D.max>A.max)A.max=D.max;A.containsNonArrayItem=A.containsNonArrayItem||D.containsNonArrayItem}return A.min=A.min+1,A.max=A.max+1,A}});var UF=K((gN1,X_)=>{var J_=import.meta.require("assert");X_.exports=function F(A){if(A==null)return A;if(A==="")return null;if(typeof A==="string"||typeof A==="boolean")A=Number(A);if(J_.ok(!isNaN(A)),A instanceof Number)return A.valueOf();if(typeof A==="number")return A;if(!Array.isArray(A)&&typeof A.valueOf==="function")return Number(A.valueOf());if(A.toString&&!Array.isArray(A)&&A.toString()==Number(A))return Number(A);J_.ok(!1)}});var Wq=K((bN1,Z_)=>{Z_.exports=function F(A){if(A==null||typeof A!=="object")return A;if(Array.isArray(A)){for(let B=A.length-1;B>=0;--B)if(A[B]===void 0)A.splice(B,1)}for(let B of Object.keys(A))if(A[B]===void 0)delete A[B];return A}});var G_=K((yN1,$_)=>{var $8=Y2(),Y_=N4(),oD=UF(),tY1=Wq(),oY1=new Set(["$and","$or"]),eY1=new Set(["$cmp","$eq","$lt","$lte","$gt","$gte"]),F$1=new Set(["$multiply","$divide","$log","$mod","$trunc","$avg","$max","$min","$stdDevPop","$stdDevSamp","$sum"]),A$1=new Set(["$abs","$exp","$ceil","$floor","$ln","$log10","$sqrt","$sin","$cos","$tan","$asin","$acos","$atan","$atan2","$asinh","$acosh","$atanh","$sinh","$cosh","$tanh","$degreesToRadians","$radiansToDegrees"]),B$1=new Set(["$arrayElemAt","$first","$last"]),D$1=new Set(["$year","$month","$week","$dayOfMonth","$dayOfYear","$hour","$minute","$second","$isoDayOfWeek","$isoWeekYear","$isoWeek","$millisecond"]),J$1=new Set(["$not"]);$_.exports=function F(A,B,D){if(typeof A!=="object"||A===null)throw new Error("`$expr` must be an object");return T6(A,B,D)};function T6(F,A,B){if(QF(F)||F===null)return F;if(F.$cond!=null)if(Array.isArray(F.$cond))F.$cond=F.$cond.map((J)=>T6(J,A,B));else F.$cond.if=T6(F.$cond.if,A,B),F.$cond.then=T6(F.$cond.then,A,B),F.$cond.else=T6(F.$cond.else,A,B);else if(F.$ifNull!=null)F.$ifNull.map((J)=>T6(J,A,B));else if(F.$switch!=null){if(Array.isArray(F.$switch.branches))F.$switch.branches=F.$switch.branches.map((J)=>T6(J,A,B));if("default"in F.$switch)F.$switch.default=T6(F.$switch.default,A,B)}let D=Object.keys(F);for(let J of D)if(oY1.has(J))F[J]=F[J].map((X)=>T6(X,A,B));else if(eY1.has(J))F[J]=Y$1(F[J],A,B);else if(F$1.has(J))F[J]=Z$1(F[J],A,B);else if(A$1.has(J))F[J]=zq(F[J],A,B);else if(J$1.has(J))F[J]=T6(F[J],A,B);if(F.$in)F.$in=X$1(F.$in,A,B);if(F.$size)F.$size=zq(F.$size,A,B);if(F.$round){let J=F.$round;if(!Array.isArray(J)||J.length<1||J.length>2)throw new $8("Array",J,"$round");F.$round=J.map((X)=>zq(X,A,B))}return tY1(F),F}function zq(F){if(!eD(F))return F;try{return oD(F)}catch(A){throw new $8("Number",F)}}function X$1(F,A,B){let D=F[1];if(!QF(D))return F;let J=F[0],X=A.path(D.slice(1));if(X===null){if(B===!1)return F;else if(B==="throw")throw new Y_("$in");return}if(!X.$isMongooseArray)throw new Error("Path must be an array for $in");return[X.$isMongooseDocumentArray?X.$embeddedSchemaType.cast(J):X.caster.cast(J),D]}function Z$1(F){if(!Array.isArray(F)){if(!eD(F))return F;try{return oD(F)}catch(A){throw new $8("Number",F)}}return F.map((A)=>{if(!eD(A))return A;try{return oD(A)}catch(B){throw new $8("Number",A)}})}function Y$1(F,A,B){if(!Array.isArray(F)||F.length!==2)throw new Error("Comparison operator must be an array of length 2");F[0]=T6(F[0],A,B);let D=F[0];if(eD(F[1])){let J=null,X=null,Z=null;if(QF(D))J=D.slice(1),X=A.path(J);else if(typeof D==="object"&&D!=null){for(let $ of Object.keys(D))if(D$1.has($)&&QF(D[$]))J=D[$].slice(1)+"."+$,Z=oD;else if(B$1.has($)&&QF(D[$])){if(J=D[$].slice(1)+"."+$,X=A.path(D[$].slice(1)),X!=null){if(X.$isMongooseDocumentArray)X=X.$embeddedSchemaType;else if(X.$isMongooseArray)X=X.caster}}}let Y=typeof F[1]==="object"&&F[1]!=null&&F[1].$literal!=null;if(X!=null)if(Y)F[1]={$literal:X.cast(F[1].$literal)};else F[1]=X.cast(F[1]);else if(Z!=null)if(Y)try{F[1]={$literal:Z(F[1].$literal)}}catch($){throw new $8(Z.name.replace(/^cast/,""),F[1],J+".$literal")}else try{F[1]=Z(F[1])}catch($){throw new $8(Z.name.replace(/^cast/,""),F[1],J)}else if(J!=null&&B===!0)return;else if(J!=null&&B==="throw")throw new Y_(J)}else F[1]=T6(F[1]);return F}function QF(F){return typeof F==="string"&&F[0]==="$"}function eD(F){if(typeof F==="string"&&F[0]==="$")return!1;if(typeof F==="object"&&F!==null&&Object.keys(F).find((A)=>A[0]==="$"))return F.$literal!=null;return!0}});var FJ=K((vN1,E_)=>{var $$1=Y2();E_.exports=function F(A,B){if(A==null)return A;if(A._id&&typeof A._id==="string")return A._id;if(A.toString&&A.toString!==Object.prototype.toString&&!Array.isArray(A))return A.toString();throw new $$1("string",A,B)}});var z_=K((hN1,W_)=>{var G$1=Y2(),H_=CD(),q_=FJ();W_.exports=function F(A,B){if(A==null||typeof A!=="object")throw new G$1("$text",A,B);if(A.$search!=null)A.$search=q_(A.$search,B+".$search");if(A.$language!=null)A.$language=q_(A.$language,B+".$language");if(A.$caseSensitive!=null)A.$caseSensitive=H_(A.$caseSensitive,B+".$castSensitive");if(A.$diacriticSensitive!=null)A.$diacriticSensitive=H_(A.$diacriticSensitive,B+".$diacriticSensitive");return A}});var LF=K((mN1,C_)=>{var E$1=new Set(["$ref","$id","$db"]);C_.exports=function F(A){return A[0]==="$"&&!E$1.has(A)}});var I9=K((dN1,V_)=>{/*!
380
+ * Module dependencies.
381
+ */var K_=Y2(),Cq=N4(),H$1=VF(),q$1=G_(),W$1=FJ(),z$1=z_(),C$1=W0(),U_=MD(),Q_=LF(),K$1=import.meta.require("util"),Uq=I4(),Kq=e5(),L_=X1(),U$1=["Polygon","MultiPolygon"];V_.exports=function F(A,B,D,J){if(Array.isArray(B))throw new Error("Query filter must be an object, got an array ",K$1.inspect(B));if(B==null)return B;if(A!=null&&A.discriminators!=null&&B[A.options.discriminatorKey]!=null)A=U_(A,B[A.options.discriminatorKey])||A;let X=Object.keys(B),Z=X.length,Y,$,G,E,H,q,W;D=D||{};while(Z--)if(H=X[Z],W=B[H],H==="$or"||H==="$nor"||H==="$and"){if(!Array.isArray(W))throw new K_("Array",W,H);for(let z=W.length-1;z>=0;z--){if(W[z]==null||typeof W[z]!=="object")throw new K_("Object",W[z],H+"."+z);let C=Object.keys(W[z]).length,U=W[z][A.options.discriminatorKey];if(U==null)W[z]=F(A,W[z],D,J);else{let Q=U_(J.schema,U);W[z]=F(Q?Q:A,W[z],D,J)}if(Object.keys(W[z]).length===0&&C!==0)W.splice(z,1)}if(W.length===0)delete B[H]}else if(H==="$where"){if(q=typeof W,q!=="string"&&q!=="function")throw new Error("Must have a string or function for $where");if(q==="function")B[H]=W.toString();continue}else if(H==="$expr"){W=q$1(W,A);continue}else if(H==="$elemMatch")W=F(A,W,D,J);else if(H==="$text")W=z$1(W,H);else if(H==="$comment"&&!A.paths.hasOwnProperty("$comment"))W=W$1(W,H),B[H]=W;else{if(!A)continue;if(G=A.path(H),!G){let z=H.split("."),C=z.length;while(C--){let U=z.slice(0,C).join("."),Q=z.slice(C).join("."),L=A.path(U),V=L&&L.schema&&L.schema.options&&L.schema.options.discriminatorKey;if(L!=null&&(L.schema&&L.schema.discriminators)!=null&&V!=null&&Q!==V){let w=C$1(B,U+"."+V),j=L.schema.discriminators;if(typeof w==="string"&&j[w]!=null)G=j[w].path(Q);else if(w!=null&&Object.keys(w).length===1&&Array.isArray(w.$in)&&w.$in.length===1&&typeof w.$in[0]==="string"&&j[w.$in[0]]!=null)G=j[w.$in[0]].path(Q)}}}if(!G){let z=H.split("."),C=z.length,U,Q,L;while(C--)if(U=z.slice(0,C).join("."),G=A.path(U),G)break;if(G){if(G.caster&&G.caster.schema){L={},Q=z.slice(C).join("."),L[Q]=W;let j=F(G.caster.schema,L,D,J)[Q];if(j===void 0)delete B[H];else B[H]=j}else B[H]=W;continue}if(Uq(W)){let j="";if(W.$near)j="$near";else if(W.$nearSphere)j="$nearSphere";else if(W.$within)j="$within";else if(W.$geoIntersects)j="$geoIntersects";else if(W.$geoWithin)j="$geoWithin";if(j){let T=new H$1.Number("__QueryCasting__"),M=W[j];if(W.$maxDistance!=null)W.$maxDistance=T.castForQuery(null,W.$maxDistance,J);if(W.$minDistance!=null)W.$minDistance=T.castForQuery(null,W.$minDistance,J);if(j==="$within"){let f=M.$center||M.$centerSphere||M.$box||M.$polygon;if(!f)throw new Error("Bad $within parameter: "+JSON.stringify(W));M=f}else if(j==="$near"&&typeof M.type==="string"&&Array.isArray(M.coordinates))M=M.coordinates;else if((j==="$near"||j==="$nearSphere"||j==="$geoIntersects")&&M.$geometry&&typeof M.$geometry.type==="string"&&Array.isArray(M.$geometry.coordinates)){if(M.$maxDistance!=null)M.$maxDistance=T.castForQuery(null,M.$maxDistance,J);if(M.$minDistance!=null)M.$minDistance=T.castForQuery(null,M.$minDistance,J);if(Kq(M.$geometry))M.$geometry=M.$geometry.toObject({transform:!1,virtuals:!1});M=M.$geometry.coordinates}else if(j==="$geoWithin"){if(M.$geometry){if(Kq(M.$geometry))M.$geometry=M.$geometry.toObject({virtuals:!1});let f=M.$geometry.type;if(U$1.indexOf(f)===-1)throw new Error('Invalid geoJSON type for $geoWithin "'+f+'", must be "Polygon" or "MultiPolygon"');M=M.$geometry.coordinates}else if(M=M.$box||M.$polygon||M.$center||M.$centerSphere,Kq(M))M=M.toObject({virtuals:!1})}Qq(M,T,J);continue}}if(A.nested[H])continue;let V="strict"in D?D.strict:A.options.strict,w=Q$1(D,A._userProvidedOptions,A.options,J);if(D.upsert&&V){if(V==="throw")throw new Cq(H);throw new Cq(H,'Path "'+H+'" is not in schema, strict mode is `true`, and upsert is `true`.')}if(w==="throw")throw new Cq(H,'Path "'+H+`" is not in schema and strictQuery is 'throw'.`);else if(w)delete B[H]}else if(W==null)continue;else if(L_.isPOJO(W))if($=Object.keys(W).some(Q_),!$)B[H]=G.castForQuery(null,W,J);else{let z=Object.keys(W),C,U=z.length;while(U--)if(C=z[U],E=W[C],C==="$elemMatch"){if(E&&G!=null&&G.schema!=null)F(G.schema,E,D,J);else if(E&&G!=null&&G.$isMongooseArray)if(L_.isPOJO(E)&&E.$not!=null)F(A,E,D,J);else W[C]=G.castForQuery(C,E,J)}else if(C==="$not"){if(E&&G){if(Y=Object.keys(E),Y.length&&Q_(Y[0]))for(let Q in E)E[Q]=G.castForQuery(Q,E[Q],J);else W[C]=G.castForQuery(C,E,J);continue}}else W[C]=G.castForQuery(C,E,J)}else if(Array.isArray(W)&&["Buffer","Array"].indexOf(G.instance)===-1&&!D.sanitizeFilter){let z=[],C=W;for(let U of C)z.push(G.castForQuery(null,U,J));B[H]={$in:z}}else B[H]=G.castForQuery(null,W,J)}return B};function Qq(F,A,B){if(Array.isArray(F))F.forEach(function(D,J){if(Array.isArray(D)||Uq(D))return Qq(D,A,B);F[J]=A.castForQuery(null,D,B)});else{let D=Object.keys(F),J=D.length;while(J--){let X=D[J],Z=F[X];if(Array.isArray(Z)||Uq(Z))Qq(Z,A,B),F[X]=Z;else F[X]=A.castForQuery({val:Z,context:B})}}}function Q$1(F,A,B,D){if("strictQuery"in F)return F.strictQuery;if("strictQuery"in A)return A.strictQuery;let J=D&&D.mongooseCollection&&D.mongooseCollection.conn&&D.mongooseCollection.conn.base&&D.mongooseCollection.conn.base.options;if(J){if("strictQuery"in J)return J.strictQuery}return B.strictQuery}});var w_=K((cN1,R_)=>{var L$1=B6();class G8 extends L$1{}var AJ=N6();Object.defineProperty(G8.prototype,"min",AJ);Object.defineProperty(G8.prototype,"max",AJ);Object.defineProperty(G8.prototype,"enum",AJ);Object.defineProperty(G8.prototype,"populate",AJ);/*!
382
+ * ignore
383
+ */R_.exports=G8});var BJ=K((lN1,N_)=>{/*!
384
+ * Module requirements.
385
+ */var V$1=Y2();/*!
386
+ * ignore
387
+ */function R$1(F){let A=this;if(Array.isArray(F))return F.map(function(B){return I_(A.path,B)});else if(Buffer.isBuffer(F))return F;return I_(A.path,F)}/*!
388
+ * ignore
389
+ */function I_(F,A){let B=Number(A);if(isNaN(B))throw new V$1("number",A,F);return B}N_.exports=R$1});var Rq=K((pN1,P_)=>{/*!
390
+ * Module requirements.
391
+ */var XJ=_2(),w$1=w_(),c3=P0(),I$1=UF(),DJ=BJ(),Lq=X1(),Vq=c3.CastError;function A0(F,A){c3.call(this,F,A,"Number")}A0.get=c3.get;A0.set=c3.set;A0.setters=[];/*!
392
+ * ignore
393
+ */A0._cast=I$1;A0.cast=function F(A){if(arguments.length===0)return this._cast;if(A===!1)A=this._defaultCaster;return this._cast=A,this._cast};/*!
394
+ * ignore
395
+ */A0._defaultCaster=(F)=>{if(typeof F!=="number")throw new Error;return F};A0.schemaName="Number";A0.defaultOptions={};/*!
396
+ * Inherits from SchemaType.
397
+ */A0.prototype=Object.create(c3.prototype);A0.prototype.constructor=A0;A0.prototype.OptionsConstructor=w$1;/*!
398
+ * ignore
399
+ */A0._checkRequired=(F)=>typeof F==="number"||F instanceof Number;A0.checkRequired=c3.checkRequired;A0.prototype.checkRequired=function F(A,B){if(typeof A==="object"&&c3._isRef(this,A,B,!0))return A!=null;return(typeof this.constructor.checkRequired==="function"?this.constructor.checkRequired():A0.checkRequired())(A)};A0.prototype.min=function(F,A){if(this.minValidator)this.validators=this.validators.filter(function(B){return B.validator!==this.minValidator},this);if(F!==null&&F!==void 0){let B=A||XJ.messages.Number.min;B=B.replace(/{MIN}/,F),this.validators.push({validator:this.minValidator=function(D){return D==null||D>=F},message:B,type:"min",min:F})}return this};A0.prototype.max=function(F,A){if(this.maxValidator)this.validators=this.validators.filter(function(B){return B.validator!==this.maxValidator},this);if(F!==null&&F!==void 0){let B=A||XJ.messages.Number.max;B=B.replace(/{MAX}/,F),this.validators.push({validator:this.maxValidator=function(D){return D==null||D<=F},message:B,type:"max",max:F})}return this};A0.prototype.enum=function(F,A){if(this.enumValidator)this.validators=this.validators.filter(function(B){return B.validator!==this.enumValidator},this);if(!Array.isArray(F)){if(Lq.isPOJO(F)&&F.values!=null)A=F.message,F=F.values;else if(typeof F==="number")F=Array.prototype.slice.call(arguments),A=null;if(Lq.isPOJO(F))F=Object.values(F);A=A||XJ.messages.Number.enum}return A=A==null?XJ.messages.Number.enum:A,this.enumValidator=(B)=>B==null||F.indexOf(B)!==-1,this.validators.push({validator:this.enumValidator,message:A,type:"enum",enumValues:F}),this};A0.prototype.cast=function(F,A,B){if(typeof F!=="number"&&c3._isRef(this,F,A,B)){if(F==null||Lq.isNonBuiltinObject(F))return this._castRef(F,A,B)}let D=F&&typeof F._id!=="undefined"?F._id:F,J;if(typeof this._castFunction==="function")J=this._castFunction;else if(typeof this.constructor.cast==="function")J=this.constructor.cast();else J=A0.cast();try{return J(D)}catch(X){throw new Vq("Number",D,this.path,X,this)}};/*!
400
+ * ignore
401
+ */function JJ(F){return this.cast(F)}function N$1(F){let A=this;if(!Array.isArray(F))return[this.cast(F)];return F.map(function(B){return A.cast(B)})}A0.prototype.$conditionalHandlers={...c3.prototype.$conditionalHandlers,$bitsAllClear:DJ,$bitsAnyClear:DJ,$bitsAllSet:DJ,$bitsAnySet:DJ,$gt:JJ,$gte:JJ,$lt:JJ,$lte:JJ,$mod:N$1};A0.prototype.castForQuery=function(F,A,B){let D;if(F!=null){if(D=this.$conditionalHandlers[F],!D)throw new Vq("number",A,this.path,null,this);return D.call(this,A,B)}try{A=this.applySetters(A,B)}catch(J){if(J instanceof Vq&&J.path===this.path&&this.$fullPath!=null)J.path=this.$fullPath;throw J}return A};/*!
402
+ * Module exports.
403
+ */P_.exports=A0});var RF=K((M$1)=>{/*!
404
+ * Module requirements.
405
+ */var P$1=Rq();/*!
406
+ * ignore
407
+ */M$1.castToNumber=M_;M$1.castArraysOfNumbers=T_;/*!
408
+ * ignore
409
+ */function M_(F){return P$1.cast()(F)}function T_(F,A){F.forEach(function(B,D){if(Array.isArray(B))T_(B,A);else F[D]=M_.call(A,B)})}});var Nq=K((u$1)=>{/*!
410
+ * Module requirements.
411
+ */var j_=RF().castArraysOfNumbers,wF=RF().castToNumber;/*!
412
+ * ignore
413
+ */u$1.cast$geoIntersects=S$1;u$1.cast$near=k$1;u$1.cast$within=O$1;function k$1(F){let A=ZJ();if(Array.isArray(F))return j_(F,this),F;if(Iq(this,F),F&&F.$geometry)return wq(F,this);if(!Array.isArray(F))throw new TypeError("$near must be either an array or an object with a $geometry property");return A.prototype.castForQuery.call(this,null,F)}function wq(F,A){switch(F.$geometry.type){case"Polygon":case"LineString":case"Point":j_(F.$geometry.coordinates,A);break;default:break}return Iq(A,F),F}function O$1(F){if(Iq(this,F),F.$box||F.$polygon){let A=F.$box?"$box":"$polygon";F[A].forEach((B)=>{if(!Array.isArray(B)){let D="Invalid $within $box argument. Expected an array, received "+B;throw new TypeError(D)}B.forEach((D,J)=>{B[J]=wF.call(this,D)})})}else if(F.$center||F.$centerSphere){let A=F.$center?"$center":"$centerSphere";F[A].forEach((B,D)=>{if(Array.isArray(B))B.forEach((J,X)=>{B[X]=wF.call(this,J)});else F[A][D]=wF.call(this,B)})}else if(F.$geometry)wq(F,this);return F}function S$1(F){if(!F.$geometry)return;return wq(F,this),F}function Iq(F,A){if(A.$maxDistance)A.$maxDistance=wF.call(F,A.$maxDistance);if(A.$minDistance)A.$minDistance=wF.call(F,A.$minDistance)}});var ZJ=K((sN1,u_)=>{/*!
414
+ * Module dependencies.
415
+ */var g$1=KD(),b$1=XH(),O_=z1(),y$1=A_(),j6=P0(),$J=j6.CastError,GJ=Q9(),v$1=Aq(),k_=nD(),h$1=D_(),Pq=I9(),m$1=Z0(),d$1=I2(),c$1=LF(),EJ=import.meta.require("util"),j4=X1(),l$1=RF().castToNumber,Mq=Nq(),p$1=M6(),IF,YJ,S_=Symbol("mongoose#isNestedArray"),i$1=Object.freeze({});function j1(F,A,B,D){YJ||(YJ=Y8().Embedded);let J="type";if(D&&D.typeKey)J=D.typeKey;if(this.schemaOptions=D,A){let Y={};if(j4.isPOJO(A))if(A[J])Y=m$1(A),delete Y[J],A=A[J];else A=GJ;if(B!=null&&B.ref!=null&&Y.ref==null)Y.ref=B.ref;if(A===Object)A=GJ;let $=typeof A==="string"?A:j4.getFunctionName(A),G=VF(),E=G.hasOwnProperty($)?G[$]:A;if(this.casterConstructor=E,this.casterConstructor instanceof j1)this.casterConstructor[S_]=!0;if(typeof E==="function"&&!E.$isArraySubdocument&&!E.$isSchemaMap){let H=this.caster instanceof YJ?null:F;this.caster=new E(H,Y)}else if(this.caster=E,!(this.caster instanceof YJ))this.caster.path=F;this.$embeddedSchemaType=this.caster}this.$isMongooseArray=!0,j6.call(this,F,B,"Array");let X,Z;if(this.defaultValue!=null)X=this.defaultValue,Z=typeof X==="function";if(!("defaultValue"in this)||this.defaultValue!=null){let Y=function(){return Z?X.call(this):X!=null?[].concat(X):[]};Y.$runBeforeSetters=!Z,this.default(Y)}}j1.schemaName="Array";j1.options={castNonArrays:!0};/*!
416
+ * ignore
417
+ */j1.defaultOptions={};j1.set=j6.set;j1.setters=[];j1.get=j6.get;/*!
418
+ * Inherits from SchemaType.
419
+ */j1.prototype=Object.create(j6.prototype);j1.prototype.constructor=j1;j1.prototype.OptionsConstructor=y$1;/*!
420
+ * ignore
421
+ */j1._checkRequired=j6.prototype.checkRequired;j1.checkRequired=j6.checkRequired;/*!
422
+ * Virtuals defined on this array itself.
423
+ */j1.prototype.virtuals=null;j1.prototype.checkRequired=function F(A,B){if(typeof A==="object"&&j6._isRef(this,A,B,!0))return!!A;return(typeof this.constructor.checkRequired==="function"?this.constructor.checkRequired():j1.checkRequired())(A)};j1.prototype.enum=function(){let F=this;while(!0){let B=F&&F.caster&&F.caster.instance;if(B==="Array"){F=F.caster;continue}if(B!=="String"&&B!=="Number")throw new Error("`enum` can only be set on an array of strings or numbers , not "+B);break}let A=arguments;if(!Array.isArray(arguments)&&j4.isObject(arguments))A=j4.object.vals(A);return F.caster.enum.apply(F.caster,A),this};j1.prototype.applyGetters=function(F,A){if(A!=null&&A.$__!=null&&A.$populated(this.path))return F;return j6.prototype.applyGetters.call(this,F,A)};j1.prototype._applySetters=function(F,A,B,D){if(this.casterConstructor.$isMongooseArray&&j1.options.castNonArrays&&!this[S_]){let J=0,X=this;while(X!=null&&X.$isMongooseArray&&!X.$isMongooseDocumentArray)++J,X=X.casterConstructor;if(F!=null&&F.length!==0){let Z=h$1(F);if(Z.min===Z.max&&Z.max<J&&Z.containsNonArrayItem)for(let Y=Z.max;Y<J;++Y)F=[F]}}return j6.prototype._applySetters.call(this,F,A,B,D)};j1.prototype.cast=function(F,A,B,D,J){IF||(IF=Y8().Array);let X,Z;if(Array.isArray(F)){if(!F.length&&A){let W=A.schema.indexedPaths(),z=this.path;for(X=0,Z=W.length;X<Z;++X){let U=W[X][0][z];if(U==="2dsphere"||U==="2d")return}let C=this.path.endsWith(".coordinates")?this.path.substring(0,this.path.lastIndexOf(".")):null;if(C!=null){for(X=0,Z=W.length;X<Z;++X)if(W[X][0][C]==="2dsphere")return}}J=J||i$1;let G=j4.isMongooseArray(F)?F.__array:F,E=J.path||this.path;if(J.arrayPathIndex!=null)E+="."+J.arrayPathIndex;if(F=IF(G,E,A,this),G=F.__array,B&&A!=null&&A.$__!=null&&A.$populated(this.path))return F;let H=this.caster,q=H.$isMongooseArray;if(H&&this.casterConstructor!==GJ)try{let W=G.length;for(X=0;X<W;X++){let z={};if(q){if(J.arrayPath!=null)z.arrayPathIndex=X;else if(H._arrayParentPath!=null)z.arrayPathIndex=X}G[X]=H.applySetters(G[X],A,B,void 0,z)}}catch(W){throw new $J("["+W.kind+"]",EJ.inspect(F),this.path+"."+X,W,this)}return F}let Y=this.options.castNonArrays!=null?this.options.castNonArrays:j1.options.castNonArrays;if(B||Y){if(!!A&&!!B)A.markModified(this.path);return this.cast([F],A,B)}throw new $J("Array",EJ.inspect(F),this.path,null,this)};/*!
424
+ * ignore
425
+ */j1.prototype._castForPopulate=function F(A,B){if(IF||(IF=Y8().Array),Array.isArray(A)){let D,J=A.__array?A.__array:A,X=J.length,Z=this.caster;if(Z&&this.casterConstructor!==GJ)try{for(D=0;D<X;D++){let Y={};if(Z.$isMongooseArray&&Z._arrayParentPath!=null)Y.arrayPathIndex=D;J[D]=Z.cast(J[D],B,!1,void 0,Y)}}catch(Y){throw new $J("["+Y.kind+"]",EJ.inspect(A),this.path+"."+D,Y,this)}return A}throw new $J("Array",EJ.inspect(A),this.path,null,this)};j1.prototype.$toObject=j1.prototype.toObject;/*!
426
+ * ignore
427
+ */j1.prototype.discriminator=function(...F){let A=this;while(A.$isMongooseArray&&!A.$isMongooseDocumentArray)if(A=A.casterConstructor,A==null||typeof A==="function")throw new O_("You can only add an embedded discriminator on a document array, "+this.path+" is a plain array");return A.discriminator(...F)};/*!
428
+ * ignore
429
+ */j1.prototype.clone=function(){let F=Object.assign({},this.options),A=new this.constructor(this.path,this.caster,F,this.schemaOptions);if(A.validators=this.validators.slice(),this.requiredValidator!==void 0)A.requiredValidator=this.requiredValidator;return A};j1.prototype._castForQuery=function(F,A){let B=this.casterConstructor;if(F&&B.discriminators&&B.schema&&B.schema.options&&B.schema.options.discriminatorKey)if(typeof F[B.schema.options.discriminatorKey]==="string"&&B.discriminators[F[B.schema.options.discriminatorKey]])B=B.discriminators[F[B.schema.options.discriminatorKey]];else{let $=p$1(B.discriminators,F[B.schema.options.discriminatorKey]);if($)B=$}let D=this.casterConstructor.prototype,J=D&&D.castForQuery,X=D&&D.cast,Z=B.castForQuery,Y=this.caster;if(Array.isArray(F))this.setters.reverse().forEach(($)=>{F=$.call(this,F,this)}),F=F.map(function($){if(j4.isObject($)&&$.$elemMatch)return $;if(J)return $=J.call(Y,null,$,A),$;else if(X)return $=X.call(Y,$),$;else if(Z)return $=Z.call(Y,null,$,A),$;if($!=null)return $=new B($),$;return $});else if(J)F=J.call(Y,null,F,A);else if(X)F=X.call(Y,F);else if(Z)F=Z.call(Y,null,F,A);else if(F!=null)F=new B(F);return F};j1.prototype.castForQuery=function(F,A,B){let D;if(F!=null){if(D=this.$conditionalHandlers[F],!D)throw new Error("Can't use "+F+" with Array.");return D.call(this,A,B)}else return this._castForQuery(A,B)};j1.prototype.virtual=function F(A,B){if(A instanceof k_||d$1(A)==="VirtualType")return this.virtual(A.path,A.options);if(B=new v$1(B),j4.hasUserDefinedProperty(B,["ref","refPath"]))throw new O_("Cannot set populate virtual as a property of an array");let D=new k_(B,A);if(this.virtuals===null)this.virtuals={};return this.virtuals[A]=D,D};function n$1(F,A){if(!Array.isArray(F))F=[F];return F=F.map((B)=>{if(!j4.isObject(B))return B;if(B.$elemMatch!=null)return{$elemMatch:Pq(this.casterConstructor.schema,B.$elemMatch,null,this&&this.$$context)};let D={};return D[this.path]=B,Pq(this.casterConstructor.schema,D,null,this&&this.$$context)[this.path]},this),this.castForQuery(null,F,A)}function s$1(F,A){let B=Object.keys(F),D=B.length;for(let J=0;J<D;++J){let X=B[J],Z=F[X];if(c$1(X)&&Z!=null)F[X]=this.castForQuery(X,Z,A)}return F}var s1=j1.prototype.$conditionalHandlers={};s1.$all=n$1;s1.$options=String;s1.$elemMatch=s$1;s1.$geoIntersects=Mq.cast$geoIntersects;s1.$or=Tq("$or");s1.$and=Tq("$and");s1.$nor=Tq("$nor");function Tq(F){return function A(B,D){if(!Array.isArray(B))throw new TypeError("conditional "+F+" requires an array");let J=[];for(let X of B)J.push(Pq(this.casterConstructor.schema??D.schema,X,null,this&&this.$$context));return J}}s1.$near=s1.$nearSphere=Mq.cast$near;s1.$within=s1.$geoWithin=Mq.cast$within;s1.$size=s1.$minDistance=s1.$maxDistance=l$1;s1.$exists=g$1;s1.$type=b$1;s1.$eq=s1.$gt=s1.$gte=s1.$lt=s1.$lte=s1.$not=s1.$regex=s1.$ne=j1.prototype._castForQuery;s1.$nin=j6.prototype.$conditionalHandlers.$nin;s1.$in=j6.prototype.$conditionalHandlers.$in;/*!
430
+ * Module exports.
431
+ */u_.exports=j1});var f_=K((aN1,x_)=>{var a$1=import.meta.require("assert"),{Long:r$1}=H6();x_.exports=function F(A){if(A==null)return A;if(A==="")return null;if(typeof A==="bigint")return A;if(A instanceof r$1)return A.toBigInt();if(typeof A==="string"||typeof A==="number")return BigInt(A);a$1.ok(!1)}});var b_=K((rN1,g_)=>{/*!
432
+ * Module dependencies.
433
+ */var __=Y2(),E8=P0(),t$1=f_();function Q0(F,A){E8.call(this,F,A,"BigInt")}Q0.schemaName="BigInt";Q0.defaultOptions={};/*!
434
+ * Inherits from SchemaType.
435
+ */Q0.prototype=Object.create(E8.prototype);Q0.prototype.constructor=Q0;/*!
436
+ * ignore
437
+ */Q0._cast=t$1;Q0.set=E8.set;Q0.setters=[];Q0.get=E8.get;Q0.cast=function F(A){if(arguments.length===0)return this._cast;if(A===!1)A=this._defaultCaster;return this._cast=A,this._cast};/*!
438
+ * ignore
439
+ */Q0._checkRequired=(F)=>F!=null;Q0.checkRequired=E8.checkRequired;Q0.prototype.checkRequired=function(F){return this.constructor._checkRequired(F)};Q0.prototype.cast=function(F){let A;if(typeof this._castFunction==="function")A=this._castFunction;else if(typeof this.constructor.cast==="function")A=this.constructor.cast();else A=Q0.cast();try{return A(F)}catch(B){throw new __("BigInt",F,this.path,B,this)}};/*!
440
+ * ignore
441
+ */Q0.$conditionalHandlers={...E8.prototype.$conditionalHandlers,$gt:HJ,$gte:HJ,$lt:HJ,$lte:HJ};/*!
442
+ * ignore
443
+ */function HJ(F,A){return this.castForQuery(null,F,A)}Q0.prototype.castForQuery=function(F,A,B){let D;if(F!=null){if(D=Q0.$conditionalHandlers[F],D)return D.call(this,A);return this.applySetters(null,A,B)}try{return this.applySetters(A,B)}catch(J){if(J instanceof __&&J.path===this.path&&this.$fullPath!=null)J.path=this.$fullPath;throw J}};Q0.prototype._castNullish=function F(A){if(typeof A==="undefined")return A;if((typeof this.constructor.cast==="function"?this.constructor.cast():Q0.cast())==null)return A;return A};/*!
444
+ * Module exports.
445
+ */g_.exports=Q0});var h_=K((tN1,v_)=>{/*!
446
+ * Module dependencies.
447
+ */var y_=Y2(),H8=P0(),NF=CD();function B0(F,A){H8.call(this,F,A,"Boolean")}B0.schemaName="Boolean";B0.defaultOptions={};/*!
448
+ * Inherits from SchemaType.
449
+ */B0.prototype=Object.create(H8.prototype);B0.prototype.constructor=B0;/*!
450
+ * ignore
451
+ */B0._cast=NF;B0.set=H8.set;B0.setters=[];B0.get=H8.get;B0.cast=function F(A){if(arguments.length===0)return this._cast;if(A===!1)A=this._defaultCaster;return this._cast=A,this._cast};/*!
452
+ * ignore
453
+ */B0._defaultCaster=(F)=>{if(F!=null&&typeof F!=="boolean")throw new Error;return F};/*!
454
+ * ignore
455
+ */B0._checkRequired=(F)=>F===!0||F===!1;B0.checkRequired=H8.checkRequired;B0.prototype.checkRequired=function(F){return this.constructor._checkRequired(F)};Object.defineProperty(B0,"convertToTrue",{get:()=>NF.convertToTrue,set:(F)=>{NF.convertToTrue=F}});Object.defineProperty(B0,"convertToFalse",{get:()=>NF.convertToFalse,set:(F)=>{NF.convertToFalse=F}});B0.prototype.cast=function(F){let A;if(typeof this._castFunction==="function")A=this._castFunction;else if(typeof this.constructor.cast==="function")A=this.constructor.cast();else A=B0.cast();try{return A(F)}catch(B){throw new y_("Boolean",F,this.path,B,this)}};B0.$conditionalHandlers={...H8.prototype.$conditionalHandlers};B0.prototype.castForQuery=function(F,A,B){let D;if(F!=null){if(D=B0.$conditionalHandlers[F],D)return D.call(this,A);return this.applySetters(null,A,B)}try{return this.applySetters(A,B)}catch(J){if(J instanceof y_&&J.path===this.path&&this.$fullPath!=null)J.path=this.$fullPath;throw J}};B0.prototype._castNullish=function F(A){if(typeof A==="undefined")return A;let B=typeof this.constructor.cast==="function"?this.constructor.cast():B0.cast();if(B==null)return A;if(B.convertToFalse instanceof Set&&B.convertToFalse.has(A))return!1;if(B.convertToTrue instanceof Set&&B.convertToTrue.has(A))return!0;return A};/*!
456
+ * Module exports.
457
+ */v_.exports=B0});var d_=K((oN1,m_)=>{var o$1=B6();class jq extends o$1{}var e$1=N6();Object.defineProperty(jq.prototype,"subtype",e$1);/*!
458
+ * ignore
459
+ */m_.exports=jq});var p_=K((eN1,l_)=>{/*!
460
+ * Module dependencies.
461
+ */var q8=ZF(),FG1=d_(),l3=P0(),qJ=BJ(),c_=X1(),kq=q8.Binary,zJ=l3.CastError;function p0(F,A){l3.call(this,F,A,"Buffer")}p0.schemaName="Buffer";p0.defaultOptions={};/*!
462
+ * Inherits from SchemaType.
463
+ */p0.prototype=Object.create(l3.prototype);p0.prototype.constructor=p0;p0.prototype.OptionsConstructor=FG1;/*!
464
+ * ignore
465
+ */p0._checkRequired=(F)=>!!(F&&F.length);p0.set=l3.set;p0.setters=[];p0.get=l3.get;p0.checkRequired=l3.checkRequired;p0.prototype.checkRequired=function(F,A){if(l3._isRef(this,F,A,!0))return!!F;return this.constructor._checkRequired(F)};p0.prototype.cast=function(F,A,B){let D;if(l3._isRef(this,F,A,B)){if(F&&F.isMongooseBuffer)return F;if(Buffer.isBuffer(F)){if(!F||!F.isMongooseBuffer){if(F=new q8(F,[this.path,A]),this.options.subtype!=null)F._subtype=this.options.subtype}return F}if(F instanceof kq){if(D=new q8(F.value(!0),[this.path,A]),typeof F.sub_type!=="number")throw new zJ("Buffer",F,this.path,null,this);return D._subtype=F.sub_type,D}if(F==null||c_.isNonBuiltinObject(F))return this._castRef(F,A,B)}if(F&&F._id)F=F._id;if(F&&F.isMongooseBuffer)return F;if(Buffer.isBuffer(F)){if(!F||!F.isMongooseBuffer){if(F=new q8(F,[this.path,A]),this.options.subtype!=null)F._subtype=this.options.subtype}return F}if(F instanceof kq){if(D=new q8(F.value(!0),[this.path,A]),typeof F.sub_type!=="number")throw new zJ("Buffer",F,this.path,null,this);return D._subtype=F.sub_type,D}if(F===null)return F;let J=typeof F;if(J==="string"||J==="number"||Array.isArray(F)||J==="object"&&F.type==="Buffer"&&Array.isArray(F.data)){if(J==="number")F=[F];if(D=new q8(F,[this.path,A]),this.options.subtype!=null)D._subtype=this.options.subtype;return D}if(c_.isPOJO(F)&&(F.$binary instanceof kq||typeof F.$binary==="string")){let X=this.cast(Buffer.from(F.$binary,"base64"));if(F.$type!=null)return X._subtype=F.$type,X}throw new zJ("Buffer",F,this.path,null,this)};p0.prototype.subtype=function(F){return this.options.subtype=F,this};/*!
466
+ * ignore
467
+ */function WJ(F,A){return this.castForQuery(null,F,A)}p0.prototype.$conditionalHandlers={...l3.prototype.$conditionalHandlers,$bitsAllClear:qJ,$bitsAnyClear:qJ,$bitsAllSet:qJ,$bitsAnySet:qJ,$gt:WJ,$gte:WJ,$lt:WJ,$lte:WJ};p0.prototype.castForQuery=function(F,A,B){let D;if(F!=null){if(D=this.$conditionalHandlers[F],!D)throw new Error("Can't use "+F+" with Buffer.");return D.call(this,A)}let J;try{J=this.applySetters(A,B)}catch(X){if(X instanceof zJ&&X.path===this.path&&this.$fullPath!=null)X.path=this.$fullPath;throw X}return J?J.toObject({transform:!1,virtuals:!1}):J};/*!
468
+ * Module exports.
469
+ */l_.exports=p0});var n_=K((FP1,i_)=>{var AG1=B6();class PF extends AG1{}var Oq=N6();Object.defineProperty(PF.prototype,"min",Oq);Object.defineProperty(PF.prototype,"max",Oq);Object.defineProperty(PF.prototype,"expires",Oq);/*!
470
+ * ignore
471
+ */i_.exports=PF});var a_=K((AP1,s_)=>{var Sq=import.meta.require("assert");s_.exports=function F(A){if(A==null||A==="")return null;if(A instanceof Date)return Sq.ok(!isNaN(A.valueOf())),A;let B;if(Sq.ok(typeof A!=="boolean"),A instanceof Number||typeof A==="number")B=new Date(A);else if(typeof A==="string"&&!isNaN(Number(A))&&(Number(A)>=275761||Number(A)<-271820))B=new Date(Number(A));else if(typeof A.valueOf==="function")B=new Date(A.valueOf());else B=new Date(A);if(!isNaN(B.valueOf()))return B;Sq.ok(!1)}});var e_=K((BP1,o_)=>{/*!
472
+ * Module requirements.
473
+ */var r_=_2(),BG1=n_(),k4=P0(),DG1=a_(),JG1=I2(),XG1=X1(),t_=k4.CastError;function D0(F,A){k4.call(this,F,A,"Date")}D0.schemaName="Date";D0.defaultOptions={};/*!
474
+ * Inherits from SchemaType.
475
+ */D0.prototype=Object.create(k4.prototype);D0.prototype.constructor=D0;D0.prototype.OptionsConstructor=BG1;/*!
476
+ * ignore
477
+ */D0._cast=DG1;D0.set=k4.set;D0.setters=[];D0.get=k4.get;D0.cast=function F(A){if(arguments.length===0)return this._cast;if(A===!1)A=this._defaultCaster;return this._cast=A,this._cast};/*!
478
+ * ignore
479
+ */D0._defaultCaster=(F)=>{if(F!=null&&!(F instanceof Date))throw new Error;return F};D0.prototype.expires=function(F){if(JG1(this._index)!=="Object")this._index={};return this._index.expires=F,XG1.expires(this._index),this};/*!
480
+ * ignore
481
+ */D0._checkRequired=(F)=>F instanceof Date;D0.checkRequired=k4.checkRequired;D0.prototype.checkRequired=function(F,A){if(typeof F==="object"&&k4._isRef(this,F,A,!0))return F!=null;return(typeof this.constructor.checkRequired==="function"?this.constructor.checkRequired():D0.checkRequired())(F)};D0.prototype.min=function(F,A){if(this.minValidator)this.validators=this.validators.filter(function(B){return B.validator!==this.minValidator},this);if(F){let B=A||r_.messages.Date.min;if(typeof B==="string")B=B.replace(/{MIN}/,F===Date.now?"Date.now()":F.toString());let D=this;this.validators.push({validator:this.minValidator=function(J){let X=F;if(typeof F==="function"&&F!==Date.now)X=X.call(this);let Z=X===Date.now?X():D.cast(X);return J===null||J.valueOf()>=Z.valueOf()},message:B,type:"min",min:F})}return this};D0.prototype.max=function(F,A){if(this.maxValidator)this.validators=this.validators.filter(function(B){return B.validator!==this.maxValidator},this);if(F){let B=A||r_.messages.Date.max;if(typeof B==="string")B=B.replace(/{MAX}/,F===Date.now?"Date.now()":F.toString());let D=this;this.validators.push({validator:this.maxValidator=function(J){let X=F;if(typeof X==="function"&&X!==Date.now)X=X.call(this);let Z=X===Date.now?X():D.cast(X);return J===null||J.valueOf()<=Z.valueOf()},message:B,type:"max",max:F})}return this};D0.prototype.cast=function(F){let A;if(typeof this._castFunction==="function")A=this._castFunction;else if(typeof this.constructor.cast==="function")A=this.constructor.cast();else A=D0.cast();try{return A(F)}catch(B){throw new t_("date",F,this.path,B,this)}};function CJ(F){return this.cast(F)}D0.prototype.$conditionalHandlers={...k4.prototype.$conditionalHandlers,$gt:CJ,$gte:CJ,$lt:CJ,$lte:CJ};D0.prototype.castForQuery=function(F,A,B){if(F==null)try{return this.applySetters(A,B)}catch(J){if(J instanceof t_&&J.path===this.path&&this.$fullPath!=null)J.path=this.$fullPath;throw J}let D=this.$conditionalHandlers[F];if(!D)throw new Error("Can't use "+F+" with Date.");return D.call(this,A)};/*!
482
+ * Module exports.
483
+ */o_.exports=D0});var Ag=K((DP1,Fg)=>{var N9=GD(),ZG1=import.meta.require("assert");Fg.exports=function F(A){if(A==null)return A;if(typeof A==="object"&&typeof A.$numberDecimal==="string")return N9.fromString(A.$numberDecimal);if(A instanceof N9)return A;if(typeof A==="string")return N9.fromString(A);if(typeof Buffer==="function"&&Buffer.isBuffer(A))return new N9(A);if(typeof Uint8Array==="function"&&A instanceof Uint8Array)return new N9(A);if(typeof A==="number")return N9.fromString(String(A));if(typeof A.valueOf==="function"&&typeof A.valueOf()==="string")return N9.fromString(A.valueOf());ZG1.ok(!1)}});var Dg=K((JP1,Bg)=>{/*!
484
+ * Module dependencies.
485
+ */var p3=P0(),YG1=p3.CastError,$G1=Ag(),uq=l0();function j0(F,A){p3.call(this,F,A,"Decimal128")}j0.schemaName="Decimal128";j0.defaultOptions={};/*!
486
+ * Inherits from SchemaType.
487
+ */j0.prototype=Object.create(p3.prototype);j0.prototype.constructor=j0;/*!
488
+ * ignore
489
+ */j0._cast=$G1;j0.set=p3.set;j0.setters=[];j0.get=p3.get;j0.cast=function F(A){if(arguments.length===0)return this._cast;if(A===!1)A=this._defaultCaster;return this._cast=A,this._cast};/*!
490
+ * ignore
491
+ */j0._defaultCaster=(F)=>{if(F!=null&&!uq(F,"Decimal128"))throw new Error;return F};/*!
492
+ * ignore
493
+ */j0._checkRequired=(F)=>uq(F,"Decimal128");j0.checkRequired=p3.checkRequired;j0.prototype.checkRequired=function F(A,B){if(p3._isRef(this,A,B,!0))return!!A;return(typeof this.constructor.checkRequired==="function"?this.constructor.checkRequired():j0.checkRequired())(A)};j0.prototype.cast=function(F,A,B){if(p3._isRef(this,F,A,B)){if(uq(F,"Decimal128"))return F;return this._castRef(F,A,B)}let D;if(typeof this._castFunction==="function")D=this._castFunction;else if(typeof this.constructor.cast==="function")D=this.constructor.cast();else D=j0.cast();try{return D(F)}catch(J){throw new YG1("Decimal128",F,this.path,J,this)}};/*!
494
+ * ignore
495
+ */function KJ(F){return this.cast(F)}j0.prototype.$conditionalHandlers={...p3.prototype.$conditionalHandlers,$gt:KJ,$gte:KJ,$lt:KJ,$lte:KJ};/*!
496
+ * Module exports.
497
+ */Bg.exports=j0});var Xg=K((XP1,Jg)=>{var GG1=B6();class xq extends GG1{}var EG1=N6();Object.defineProperty(xq.prototype,"_id",EG1);Jg.exports=xq});var fq=K((ZP1,Zg)=>{Zg.exports=function F(A,B,D){if(A.length===0)return D();let J=A.length,X=null;for(let Z of A)B(Z,function(Y){if(X!=null)return;if(Y!=null)return X=Y,D(X);if(--J<=0)return D()})}});var $g=K((YP1,Yg)=>{var HG1=fq();/*!
498
+ * ignore
499
+ */Yg.exports=function F(A){A.s.hooks.pre("save",!1,function D(J){if(this.$isSubdocument){J();return}let X=this,Z=this.$getAllSubdocs({useCache:!0});if(!Z.length){J();return}HG1(Z,function(Y,$){Y.$__schema.s.hooks.execPre("save",Y,function(G){$(G)})},function(Y){if(X.$__.saveOptions)X.$__.saveOptions.__subdocs=null;if(Y)return X.$__schema.s.hooks.execPost("save:error",X,[X],{error:Y},function($){J($)});J()})},null,!0),A.s.hooks.post("save",async function D(){let J=this.$__.removedSubdocs;if(!J||!J.length)return;let X=[];for(let Z of J)X.push(new Promise((Y,$)=>{Z.$__schema.s.hooks.execPost("deleteOne",Z,[Z],function(G){if(G)return $(G);Y()})}));this.$__.removedSubdocs=null,await Promise.all(X)}),A.s.hooks.post("save",async function D(){if(this.$isSubdocument)return;let J=this,X=this.$getAllSubdocs({useCache:!0});if(!X.length)return;let Z=[];for(let Y of X)Z.push(new Promise(($,G)=>{Y.$__schema.s.hooks.execPost("save",Y,[Y],function(E){if(E)return G(E);$()})}));try{await Promise.all(Z)}catch(Y){await new Promise(($,G)=>{this.$__schema.s.hooks.execPost("save:error",J,[J],{error:Y},function(E){if(E)return G(E);$()})})}},null,!0)}});var Hg=K(($P1,gq)=>{var qG1=t().objectIdSymbol,Gg=X1();/*!
500
+ * ignore
501
+ */gq.exports=function F(A){A.post("init",function B(){return _q.call(this),this}),A.pre("save",function B(D){Eg.call(this),D()}),A.pre("remove",function B(D){Eg.call(this),D()}),A.post("save",function B(){_q.call(this)})};/*!
502
+ * ignore
503
+ */function Eg(){let F,A;if(this.$__.shardval){F=Object.keys(this.$__.shardval),A=F.length,this.$where=this.$where||{};for(let B=0;B<A;++B)this.$where[F[B]]=this.$__.shardval[F[B]]}}/*!
504
+ * ignore
505
+ */gq.exports.storeShard=_q;/*!
506
+ * ignore
507
+ */function _q(){let F=this.$__schema.options.shardKey||this.$__schema.options.shardkey;if(!Gg.isPOJO(F))return;let A=this.$__.shardval={},B=Object.keys(F),D=B.length,J;for(let X=0;X<D;++X)if(J=this.$__getValue(B[X]),J==null)A[B[X]]=J;else if(Gg.isMongooseObject(J))A[B[X]]=J.toObject({depopulate:!0,_isNested:!0});else if(J instanceof Date||J[qG1])A[B[X]]=J;else if(typeof J.valueOf==="function")A[B[X]]=J.valueOf();else A[B[X]]=J}});var zg=K((GP1,Wg)=>{var W8=t().arrayAtomicsSymbol,bq=t().sessionNewDocuments,WG1=X1();Wg.exports=function F(A){A.pre("save",function B(){let D=this.$session();if(D==null)return;if(D.transaction==null||D[bq]==null)return;if(!D[bq].has(this)){let J={};if(this.isNew)J.isNew=!0;if(this.$__schema.options.versionKey)J.versionKey=this.get(this.$__schema.options.versionKey);J.modifiedPaths=new Set(Object.keys(this.$__.activePaths.getStatePaths("modify"))),J.atomics=zG1(this),D[bq].set(this,J)}})};function zG1(F,A){let B=new Map;A=A||new Map;let D=Object.keys(F.$__.activePaths.init).concat(Object.keys(F.$__.activePaths.modify));for(let X of D){let Z=F.$__getValue(X);if(Z!=null&&Array.isArray(Z)&&WG1.isMongooseDocumentArray(Z)&&Z.length&&Z[W8]!=null&&Object.keys(Z[W8]).length!==0){let Y=A.get(X)||{};B.set(X,qg(Y,Z[W8]))}}let J=F.$__dirty();for(let X of J){let{path:Z,value:Y}=X;if(Y!=null&&Y[W8]!=null&&Object.keys(Y[W8]).length!==0){let $=A.get(Z)||{};B.set(Z,qg($,Y[W8]))}}return B}function qg(F,A){if(F=F||{},A.$pullAll!=null)F.$pullAll=(F.$pullAll||[]).concat(A.$pullAll);if(A.$push!=null)F.$push=F.$push||{},F.$push.$each=(F.$push.$each||[]).concat(A.$push.$each);if(A.$addToSet!=null)F.$addToSet=(F.$addToSet||[]).concat(A.$addToSet);if(A.$set!=null)F.$set=Array.isArray(A.$set)?[...A.$set]:Object.assign({},A.$set);return F}});var Kg=K((EP1,Cg)=>{/*!
508
+ * ignore
509
+ */Cg.exports=function F(A){A.pre("save",!1,function D(J,X){let Z=this;if(this.$isSubdocument)return J();let Y=X&&typeof X==="object"&&"validateBeforeSave"in X,$;if(Y)$=!!X.validateBeforeSave;else $=this.$__schema.options.validateBeforeSave;if($){let E=X&&typeof X==="object"&&"validateModifiedOnly"in X?{validateModifiedOnly:X.validateModifiedOnly}:null;this.$validate(E).then(()=>{this.$op="save",J()},(H)=>{Z.$__schema.s.hooks.execPost("save:error",Z,[Z],{error:H},function(q){Z.$op="save",J(q)})})}else J()},null,!0)}});var yq=K((CG1)=>{CG1.saveSubdocs=$g();CG1.sharding=Hg();CG1.trackTransaction=zg();CG1.validateBeforeSave=Kg()});var Lg=K((qP1,Qg)=>{var Ug=yq();Qg.exports=function F(A){for(let B of Object.values(Ug))B(A,{deduplicate:!0});A.plugins=Object.values(Ug).map((B)=>({fn:B,opts:{deduplicate:!0}})).concat(A.plugins)}});var wg=K((WP1,Rg)=>{var VG1=LD(),RG1=W9(),wG1=l0(),IG1=b3(),Vg=I4();Rg.exports=function F(A,B,D,J){let X=Object.keys(B),Z=0,Y=X.length,$;if(D=D||"",J=J||new WeakSet,J.has(B))return;J.add(B);while(Z<Y){if($=X[Z++],!D){if($==="discriminators"||$==="base"||$==="_applyDiscriminators"||$==="_userProvidedOptions"||$==="options"||$==="tree")continue}if(D==="tree"&&B!=null&&B.instanceOfSchema)continue;if(RG1.has($))continue;if(A[$]==null)A[$]=B[$];else if(Vg(B[$])){if(!Vg(A[$]))A[$]={};if(B[$]!=null){if(B[$].$isSingleNested&&A[$].$isMongooseDocumentArray||B[$].$isMongooseDocumentArray&&A[$].$isSingleNested||B[$].$isMongooseDocumentArrayElement&&A[$].$isMongooseDocumentArrayElement)continue;else if(B[$].instanceOfSchema){if(A[$].instanceOfSchema)VG1(A[$],B[$].clone(),!0);else A[$]=B[$].clone();continue}else if(wG1(B[$],"ObjectId")){A[$]=new IG1(B[$]);continue}}F(A[$],B[$],D?D+"."+$:$,J)}}if(B!=null&&B.instanceOfSchema)A.tree=Object.assign({},B.tree,A.tree)}});var UJ=K((zP1,Pg)=>{var Ig=Q9(),NG1=Lg(),PG1=Z0(),MG1=PD().defineKey,TG1=W0(),vq=X1(),jG1=wg(),Ng={toJSON:!0,toObject:!0,_id:!0,id:!0,virtuals:!0,methods:!0};/*!
510
+ * ignore
511
+ */Pg.exports=function F(A,B,D,J,X,Z,Y){if(!(D&&D.instanceOfSchema))throw new Error("You must pass a valid discriminator Schema");if(Z=Z==null?!0:Z,A.schema.discriminatorMapping&&!A.schema.discriminatorMapping.isRoot)throw new Error('Discriminator "'+B+'" can only be a discriminator of the root model');if(X){let q=TG1(A.base,"options.applyPluginsToDiscriminators",!1)||!Z;A.base._applyPlugins(D,{skipTopLevel:!q})}else if(!Z)NG1(D);let $=A.schema.options.discriminatorKey,G=A.schema.path($);if(G!=null){if(!vq.hasUserDefinedProperty(G.options,"select"))G.options.select=!0;G.options.$skipDiscriminatorCheck=!0}else{let q={};q[$]={default:void 0,select:!0,$skipDiscriminatorCheck:!0},q[$][A.schema.options.typeKey]=String,A.schema.add(q),MG1({prop:$,prototype:A.prototype,options:A.schema.options})}if(D.path($)&&D.path($).options.$skipDiscriminatorCheck!==!0)throw new Error('Discriminator "'+B+'" cannot have field with name "'+$+'"');let E=B;if(typeof J==="string"&&J.length||J!=null)E=J;function H(q,W){if(q._baseSchema=W,W.paths._id&&W.paths._id.options&&!W.paths._id.options.auto)q.remove("_id");let z=Object.keys(W.paths),C=[];for(let M of z){if(q.nested[M]){C.push(M);continue}if(M.indexOf(".")===-1)continue;let f=M.split(".").slice(0,-1),m="";for(let O of f)if(m+=(m.length?".":"")+O,q.paths[m]instanceof Ig||q.singleNestedPaths[m]instanceof Ig)C.push(M)}q.obj={...q.obj},jG1(q,W),q._gatherChildSchemas();for(let M of C)delete q.paths[M];q.childSchemas.forEach((M)=>{M.model.prototype.$__setSchema(M.schema)});let U={};if(U[$]={default:E,select:!0,set:function(M){if(M===E||Array.isArray(E)&&vq.deepEqual(M,E))return E;throw new Error(`Can't set discriminator key "`+$+'"')},$skipDiscriminatorCheck:!0},U[$][q.options.typeKey]=G?G.options[q.options.typeKey]:String,q.add(U),q.discriminatorMapping={key:$,value:E,isRoot:!1},W.options.collection)q.options.collection=W.options.collection;let Q=q.options.toJSON,L=q.options.toObject,V=q.options._id,w=q.options.id,j=Object.keys(q.options);q.options.discriminatorKey=W.options.discriminatorKey;let T=q._userProvidedOptions;for(let M of j)if(!Ng[M]){if(M in T&&!vq.deepEqual(q.options[M],W.options[M]))throw new Error("Can't customize discriminator option "+M+" (can only modify "+Object.keys(Ng).join(", ")+")")}q.options=PG1(W.options);for(let M of Object.keys(T))q.options[M]=T[M];if(Q)q.options.toJSON=Q;if(L)q.options.toObject=L;if(typeof V!=="undefined")q.options._id=V;if(q.options.id=w,Z)q.s.hooks=A.schema.s.hooks.merge(q.s.hooks);if(X)q.plugins=Array.prototype.slice.call(W.plugins);q.callQueue=W.callQueue.concat(q.callQueue),delete q._requiredpaths}if(H(D,A.schema),!A.discriminators)A.discriminators={};if(!A.schema.discriminatorMapping)A.schema.discriminatorMapping={key:$,value:null,isRoot:!0};if(!A.schema.discriminators)A.schema.discriminators={};if(A.schema.discriminators[B]=D,A.discriminators[B]&&!D.options.overwriteModels&&!Y)throw new Error('Discriminator with name "'+B+'" already exists');return D}});var QJ=K((CP1,Mg)=>{var kG1=M6();Mg.exports=function F(A,B,D){let J=A.schema.options.discriminatorKey,X=B!=null&&B[J];if(X==null)X=D;if(A.discriminators&&X!=null)if(A.discriminators[X])A=A.discriminators[X];else{let Z=kG1(A.discriminators,X);if(Z)A=Z}return A}});var hq=K((KP1,Tg)=>{var OG1=Dq();Tg.exports=function F(A,B){if(B==null||B._id==null)return A;if(A=A.clone(),!B._id)A.remove("_id"),A.options._id=!1;else if(!A.paths._id)OG1(A),A.options._id=!0;return A}});var dq=K((UP1,jg)=>{/*!
512
+ * Module dependencies.
513
+ */var SG1=z1();class mq extends SG1{constructor(F,A){let B=`Cannot create use schema for property "${F}" because the schema has the ${A} option enabled.`;super(B)}}Object.defineProperty(mq.prototype,"name",{value:"InvalidSchemaOptionError"});/*!
514
+ * exports
515
+ */jg.exports=mq});var iq=K((QP1,ug)=>{/*!
516
+ * Module dependencies.
517
+ */var kg=Y2(),cq=import.meta.require("events").EventEmitter,uG1=EH(),xG1=Xg(),z8=P0(),fG1=wD(),_G1=KD(),Og=RF().castToNumber,gG1=UJ(),lq=Nq(),pq=QJ(),bG1=hq(),yG1=n6().internalToObjectOptions,vG1=B8(),hG1=X1(),mG1=dq(),LJ;ug.exports=l1;function l1(F,A,B){if(F.options.timeseries)throw new mG1(A,"timeseries");let D=l1.defaultOptions&&l1.defaultOptions._id;if(D!=null)B=B||{},B._id=D;F=bG1(F,B),this.caster=Sg(F,null,B),this.caster.path=A,this.caster.prototype.$basePath=A,this.schema=F,this.$isSingleNested=!0,this.base=F.base,z8.call(this,A,B,"Embedded")}/*!
518
+ * ignore
519
+ */l1.prototype=Object.create(z8.prototype);l1.prototype.constructor=l1;l1.prototype.OptionsConstructor=xG1;/*!
520
+ * ignore
521
+ */function Sg(F,A,B){LJ||(LJ=kD());let D=function X(Z,Y,$){if(this.$__parent=$,LJ.apply(this,arguments),$==null)return;this.$session($.$session())};F._preCompile();let J=A!=null?A.prototype:LJ.prototype;D.prototype=Object.create(J),D.prototype.$__setSchema(F),D.prototype.constructor=D,D.$__required=B?.required,D.base=F.base,D.schema=F,D.$isSingleNested=!0,D.events=new cq,D.prototype.toBSON=function(){return this.toObject(yG1)};for(let X in F.methods)D.prototype[X]=F.methods[X];for(let X in F.statics)D[X]=F.statics[X];for(let X in cq.prototype)D[X]=cq.prototype[X];return D}l1.prototype.$conditionalHandlers.$geoWithin=function F(A,B){return{$geometry:this.castForQuery(null,A.$geometry,B)}};/*!
522
+ * ignore
523
+ */l1.prototype.$conditionalHandlers.$near=l1.prototype.$conditionalHandlers.$nearSphere=lq.cast$near;l1.prototype.$conditionalHandlers.$within=l1.prototype.$conditionalHandlers.$geoWithin=lq.cast$within;l1.prototype.$conditionalHandlers.$geoIntersects=lq.cast$geoIntersects;l1.prototype.$conditionalHandlers.$minDistance=Og;l1.prototype.$conditionalHandlers.$maxDistance=Og;l1.prototype.$conditionalHandlers.$exists=_G1;l1.prototype.cast=function(F,A,B,D,J){if(F&&F.$isSingleNested&&F.parent===A)return F;if(F!=null&&(typeof F!=="object"||Array.isArray(F)))throw new uG1(this.path,F);let X=this.schema.path(this.schema.options.discriminatorKey),Z=X==null?null:X.getDefault(A),Y=pq(this.caster,F,Z),$,G=A&&A.$__&&A.$__.selected,E=this.path,H=G==null?null:Object.keys(G).reduce((q,W)=>{if(W.startsWith(E+"."))q=q||{},q[W.substring(E.length+1)]=G[W];return q},null);if(B){$=new Y(void 0,H,A,!1,{defaults:!1}),delete $.$__.defaults,$.$init(F);let q=vG1(H);fG1($,H,q)}else{if(J=Object.assign({},J,{priorDoc:D}),Object.keys(F).length===0)return new Y({},H,A,void 0,J);return new Y(F,H,A,void 0,J)}return $};l1.prototype.castForQuery=function(F,A,B,D){let J;if(F!=null){if(J=this.$conditionalHandlers[F],!J)throw new Error("Can't use "+F);return J.call(this,A)}if(A==null)return A;let X=pq(this.caster,A);if(A instanceof X)return A;if(this.options.runSetters)A=this._applySetters(A,B);let Z=D!=null&&D.strict!=null?D.strict:void 0;try{A=new X(A,Z)}catch(Y){if(!(Y instanceof kg))throw new kg("Embedded",A,this.path,Y,this);throw Y}return A};l1.prototype.doValidate=function(F,A,B,D){let J=pq(this.caster,F);if(F&&!(F instanceof J))F=new J(F,null,B!=null&&B.$__!=null?B:null);if(D&&D.skipSchemaValidators){if(!F)return A(null);return F.validate().then(()=>A(null),(X)=>A(X))}z8.prototype.doValidate.call(this,F,function(X){if(X)return A(X);if(!F)return A(null);F.validate().then(()=>A(null),(Z)=>A(Z))},B,D)};l1.prototype.doValidateSync=function(F,A,B){if(!B||!B.skipSchemaValidators){let D=z8.prototype.doValidateSync.call(this,F,A);if(D)return D}if(!F)return;return F.validateSync()};l1.prototype.discriminator=function(F,A,B){B=B||{};let D=hG1.isPOJO(B)?B.value:B,J=typeof B.clone==="boolean"?B.clone:!0;if(A.instanceOfSchema&&J)A=A.clone();return A=gG1(this.caster,F,A,D,null,null,B.overwriteExisting),this.caster.discriminators[F]=Sg(A,this.caster),this.caster.discriminators[F]};/*!
524
+ * ignore
525
+ */l1.defaultOptions={};l1.set=z8.set;l1.setters=[];l1.get=z8.get;/*!
526
+ * ignore
527
+ */l1.prototype.toJSON=function F(){return{path:this.path,options:this.options}};/*!
528
+ * ignore
529
+ */l1.prototype.clone=function(){let F=new this.constructor(this.schema,this.path,{...this.options,_skipApplyDiscriminators:!0});if(F.validators=this.validators.slice(),this.requiredValidator!==void 0)F.requiredValidator=this.requiredValidator;return F.caster.discriminators=Object.assign({},this.caster.discriminators),F}});var fg=K((LP1,xg)=>{/*!
530
+ * Module dependencies.
531
+ */var dG1=z1(),nq=P0(),cG1=iq(),lG1=QJ();function i3(F,A){if(this.$parentSchemaType=A&&A.$parentSchemaType,!this.$parentSchemaType)throw new dG1("Cannot create DocumentArrayElement schematype without a parent");delete A.$parentSchemaType,nq.call(this,F,A,"DocumentArrayElement"),this.$isMongooseDocumentArrayElement=!0}i3.schemaName="DocumentArrayElement";i3.defaultOptions={};/*!
532
+ * Inherits from SchemaType.
533
+ */i3.prototype=Object.create(nq.prototype);i3.prototype.constructor=i3;i3.prototype.cast=function(...F){return this.$parentSchemaType.cast(...F)[0]};i3.prototype.doValidate=function(F,A,B,D){let J=lG1(this.caster,F);if(F&&!(F instanceof J))F=new J(F,B,null,null,D&&D.index!=null?D.index:null);return cG1.prototype.doValidate.call(this,F,A,B,D)};i3.prototype.clone=function(){this.options.$parentSchemaType=this.$parentSchemaType;let F=nq.prototype.clone.apply(this,arguments);return delete this.options.$parentSchemaType,F.caster=this.caster,F.schema=this.schema,F};/*!
534
+ * Module exports.
535
+ */xg.exports=i3});var bg=K((VP1,gg)=>{var pG1=B6();class VJ extends pG1{}var _g=N6();Object.defineProperty(VJ.prototype,"excludeIndexes",_g);Object.defineProperty(VJ.prototype,"_id",_g);/*!
536
+ * ignore
537
+ */gg.exports=VJ});var pg=K((RP1,lg)=>{/*!
538
+ * Module dependencies.
539
+ */var yg=Y2(),iG1=fg(),sq=import.meta.require("events").EventEmitter,rq=ZJ(),nG1=bg(),MF=P0(),vg=I9(),sG1=UJ(),hg=hq(),aG1=TD(),rG1=LF(),C8=X1(),RJ=QJ(),tG1=dq(),mg=t().arrayAtomicsSymbol,aq=t().arrayPathSymbol,oG1=t().documentArrayParent,n3,P9;function Y0(F,A,B,D){if(A.options&&A.options.timeseries)throw new tG1(F,"timeseries");let J=Y0.defaultOptions&&Y0.defaultOptions._id;if(J!=null)D=D||{},D._id=J;if(D!=null&&D._id!=null)A=hg(A,D);else if(B!=null&&B._id!=null)A=hg(A,B);let X=cg(A,B);X.prototype.$basePath=F,rq.call(this,F,X,B),this.schema=A,this.schemaOptions=D||{},this.$isMongooseDocumentArray=!0,this.Constructor=X,X.base=A.base;let Z=this.defaultValue;if(!("defaultValue"in this)||Z!=null)this.default(function(){let $=Z.call(this);if($!=null&&!Array.isArray($))$=[$];return $});let Y=this;this.$embeddedSchemaType=new iG1(F+".$",{required:this&&this.schemaOptions&&this.schemaOptions.required||!1,$parentSchemaType:Y}),this.$embeddedSchemaType.caster=this.Constructor,this.$embeddedSchemaType.schema=this.schema}Y0.schemaName="DocumentArray";Y0.options={castNonArrays:!0};/*!
540
+ * Inherits from SchemaArray.
541
+ */Y0.prototype=Object.create(rq.prototype);Y0.prototype.constructor=Y0;Y0.prototype.OptionsConstructor=nG1;Y0.prototype.$conditionalHandlers={...rq.prototype.$conditionalHandlers};/*!
542
+ * ignore
543
+ */function cg(F,A,B){P9||(P9=D8());function D(){if(P9.apply(this,arguments),this.__parentArray==null||this.__parentArray.getArrayParent()==null)return;this.$session(this.__parentArray.getArrayParent().$session())}F._preCompile();let J=B!=null?B.prototype:P9.prototype;D.prototype=Object.create(J),D.prototype.$__setSchema(F),D.schema=F,D.prototype.constructor=D,D.$isArraySubdocument=!0,D.events=new sq,D.base=F.base;for(let X in F.methods)D.prototype[X]=F.methods[X];for(let X in F.statics)D[X]=F.statics[X];for(let X in sq.prototype)D[X]=sq.prototype[X];return D.options=A,D}Y0.prototype.discriminator=function(F,A,B){if(typeof F==="function")F=C8.getFunctionName(F);B=B||{};let D=C8.isPOJO(B)?B.value:B,J=typeof B.clone==="boolean"?B.clone:!0;if(A.instanceOfSchema&&J)A=A.clone();A=sG1(this.casterConstructor,F,A,D,null,null,B?.overwriteExisting);let X=cg(A,null,this.casterConstructor);X.baseCasterConstructor=this.casterConstructor;try{Object.defineProperty(X,"name",{value:F})}catch(Z){}return this.casterConstructor.discriminators[F]=X,this.casterConstructor.discriminators[F]};Y0.prototype.doValidate=function(F,A,B,D){n3||(n3=V9());let J=this;try{MF.prototype.doValidate.call(this,F,X,B)}catch(Z){return A(Z)}function X(Z){if(Z)return A(Z);let Y=F&&F.length,$;if(!Y)return A();if(D&&D.updateValidator)return A();if(!C8.isMongooseDocumentArray(F))F=new n3(F,J.path,B);function G(E){if(E!=null)$=E;--Y||A($)}for(let E=0,H=Y;E<H;++E){let q=F[E];if(q==null){--Y||A($);continue}if(!(q instanceof P9)){let W=RJ(J.casterConstructor,F[E]);q=F[E]=new W(q,F,void 0,void 0,E)}if(D!=null&&D.validateModifiedOnly&&!q.$isModified()){--Y||A($);continue}q.$__validate(null,D,G)}}};Y0.prototype.doValidateSync=function(F,A,B){let D=MF.prototype.doValidateSync.call(this,F,A);if(D!=null)return D;let J=F&&F.length,X=null;if(!J)return;for(let Z=0,Y=J;Z<Y;++Z){let $=F[Z];if(!$)continue;if(!($ instanceof P9)){let E=RJ(this.casterConstructor,F[Z]);$=F[Z]=new E($,F,void 0,void 0,Z)}if(B!=null&&B.validateModifiedOnly&&!$.$isModified())continue;let G=$.validateSync(B);if(G&&X==null)X=G}return X};/*!
544
+ * ignore
545
+ */Y0.prototype.getDefault=function(F,A,B){let D=typeof this.defaultValue==="function"?this.defaultValue.call(F):this.defaultValue;if(D==null)return D;if(B&&B.skipCast)return D;if(n3||(n3=V9()),!Array.isArray(D))D=[D];D=new n3(D,this.path,F);for(let J=0;J<D.length;++J){let Z=new(RJ(this.casterConstructor,D[J]))({},D,void 0,void 0,J);Z.$init(D[J]),Z.isNew=!0,Object.assign(Z.$__.activePaths.default,Z.$__.activePaths.init),Z.$__.activePaths.init={},D[J]=Z}return D};var eG1=Object.freeze({transform:!1,virtuals:!1}),dg=Object.freeze({skipId:!1,willInit:!0});Y0.prototype.cast=function(F,A,B,D,J){if(n3||(n3=V9()),F!=null&&F[aq]!=null&&F===D)return F;let X,Z;J=J||{};let Y=J.path||this.path;if(!Array.isArray(F)){if(!B&&!Y0.options.castNonArrays)throw new yg("DocumentArray",F,this.path,null,this);if(!!A&&B)A.markModified(Y);return this.cast([F],A,B,D,J)}if(!J.skipDocumentArrayCast||C8.isMongooseDocumentArray(F))F=new n3(F,Y,A,this);if(D!=null)F[mg]=D[mg]||{};if(J.arrayPathIndex!=null)F[aq]=Y+"."+J.arrayPathIndex;let $=C8.isMongooseDocumentArray(F)?F.__array:F,G=$.length;for(let E=0;E<G;++E){if(!$[E])continue;let H=RJ(this.casterConstructor,$[E]),q=aG1($[E],!0);if($[E]!==q)$[E]=q;if($[E]instanceof P9){if($[E][oG1]!==A)if(B){let W=new H(null,F,dg,X,E);$[E]=W.$init($[E])}else{let W=new H($[E],F,void 0,void 0,E);$[E]=W}if($[E].__index==null)$[E].$setIndex(E)}else if($[E]!=null)if(B){if(A)X||(X=FE1(this,A.$__.selected,B));else X=!0;Z=new H(null,F,dg,X,E),$[E]=Z.$init($[E])}else{if(D&&typeof D.id==="function")Z=D.id($[E]._id);if(D&&Z&&C8.deepEqual(Z.toObject(eG1),$[E]))Z.set($[E]),$[E]=Z;else try{Z=new H($[E],F,void 0,void 0,E),$[E]=Z}catch(W){throw new yg("embedded",$[E],F[aq],W,this)}}}return F};/*!
546
+ * ignore
547
+ */Y0.prototype.clone=function(){let F=Object.assign({},this.options),A=new this.constructor(this.path,this.schema,F,this.schemaOptions);if(A.validators=this.validators.slice(),this.requiredValidator!==void 0)A.requiredValidator=this.requiredValidator;return A.Constructor.discriminators=Object.assign({},this.Constructor.discriminators),A};/*!
548
+ * ignore
549
+ */Y0.prototype.applyGetters=function(F,A){return MF.prototype.applyGetters.call(this,F,A)};function FE1(F,A,B){if(!(B&&A))return;let D=F.path+".",J=Object.keys(A),X=J.length,Z={},Y,$,G;while(X--)if($=J[X],$.startsWith(D)){if(G=$.substring(D.length),G==="$")continue;if(G.startsWith("$."))G=G.substring(2);Y||(Y=!0),Z[G]=A[$]}return Y&&Z||void 0}/*!
550
+ * ignore
551
+ */Y0.defaultOptions={};Y0.set=MF.set;Y0.setters=[];Y0.get=MF.get;/*!
552
+ * Handle casting $elemMatch operators
553
+ */Y0.prototype.$conditionalHandlers.$elemMatch=AE1;function AE1(F,A){let B=Object.keys(F),D=B.length;for(let Y=0;Y<D;++Y){let $=B[Y],G=F[$];if(rG1($)&&G!=null)F[$]=this.castForQuery($,G,A)}let J=this&&this.casterConstructor&&this.casterConstructor.schema&&this.casterConstructor.schema.options&&this.casterConstructor.schema.options.discriminatorKey,X=this&&this.casterConstructor&&this.casterConstructor.schema&&this.casterConstructor.schema.discriminators||{};if(J!=null&&F[J]!=null&&X[F[J]]!=null)return vg(X[F[J]],F,null,this&&this.$$context);let Z=this.casterConstructor.schema??A.schema;return vg(Z,F,null,this&&this.$$context)}/*!
554
+ * Module exports.
555
+ */lg.exports=Y0});var ng=K((wP1,ig)=>{var BE1=B6();class tq extends BE1{}var DE1=N6();Object.defineProperty(tq.prototype,"of",DE1);ig.exports=tq});var rg=K((IP1,ag)=>{/*!
556
+ * ignore
557
+ */var oq=tD(),JE1=ng(),sg=P0();/*!
558
+ * ignore
559
+ */class TF extends sg{constructor(F,A){super(F,A,"Map");this.$isSchemaMap=!0}set(F,A){return sg.set(F,A)}cast(F,A,B){if(F instanceof oq)return F;let D=this.path;if(B){let J=new oq({},D,A,this.$__schemaType);if(F instanceof global.Map)for(let X of F.keys()){let Z=F.get(X);if(Z==null)Z=J.$__schemaType._castNullish(Z);else Z=J.$__schemaType.cast(Z,A,!0,null,{path:D+"."+X});J.$init(X,Z)}else for(let X of Object.keys(F)){let Z=F[X];if(Z==null)Z=J.$__schemaType._castNullish(Z);else Z=J.$__schemaType.cast(Z,A,!0,null,{path:D+"."+X});J.$init(X,Z)}return J}return new oq(F,D,A,this.$__schemaType)}clone(){let F=super.clone();if(this.$__schemaType!=null)F.$__schemaType=this.$__schemaType.clone();return F}}TF.schemaName="Map";TF.prototype.OptionsConstructor=JE1;TF.defaultOptions={};ag.exports=TF});var eg=K((NP1,og)=>{var XE1=B6();class wJ extends XE1{}var tg=N6();Object.defineProperty(wJ.prototype,"auto",tg);Object.defineProperty(wJ.prototype,"populate",tg);/*!
560
+ * ignore
561
+ */og.exports=wJ});var Db=K((PP1,Bb)=>{/*!
562
+ * Module dependencies.
563
+ */var ZE1=eg(),s3=P0(),YE1=jH(),$E1=I2(),FW=b3(),AW=l0(),Fb=X1(),GE1=s3.CastError,eq;function L0(F,A){let B=typeof F==="string"&&F.length===24&&/^[a-f0-9]+$/i.test(F),D=A&&A.suppressWarning;if((B||typeof F==="undefined")&&!D)Fb.warn("mongoose: To create a new ObjectId please try `Mongoose.Types.ObjectId` instead of using `Mongoose.Schema.ObjectId`. Set the `suppressWarning` option if you're trying to create a hex char path in your schema.");s3.call(this,F,A,"ObjectId")}L0.schemaName="ObjectId";L0.defaultOptions={};/*!
564
+ * Inherits from SchemaType.
565
+ */L0.prototype=Object.create(s3.prototype);L0.prototype.constructor=L0;L0.prototype.OptionsConstructor=ZE1;L0.get=s3.get;L0.set=s3.set;L0.setters=[];L0.prototype.auto=function(F){if(F)this.default(Ab),this.set(EE1);return this};/*!
566
+ * ignore
567
+ */L0._checkRequired=(F)=>AW(F,"ObjectId");/*!
568
+ * ignore
569
+ */L0._cast=YE1;L0.cast=function F(A){if(arguments.length===0)return this._cast;if(A===!1)A=this._defaultCaster;return this._cast=A,this._cast};/*!
570
+ * ignore
571
+ */L0._defaultCaster=(F)=>{if(!AW(F,"ObjectId"))throw new Error(F+" is not an instance of ObjectId");return F};L0.checkRequired=s3.checkRequired;L0.prototype.checkRequired=function F(A,B){if(s3._isRef(this,A,B,!0))return!!A;return(typeof this.constructor.checkRequired==="function"?this.constructor.checkRequired():L0.checkRequired())(A)};L0.prototype.cast=function(F,A,B){if(!AW(F,"ObjectId")&&s3._isRef(this,F,A,B)){if(($E1(F)||"").toLowerCase()==="objectid")return new FW(F.toHexString());if(F==null||Fb.isNonBuiltinObject(F))return this._castRef(F,A,B)}let D;if(typeof this._castFunction==="function")D=this._castFunction;else if(typeof this.constructor.cast==="function")D=this.constructor.cast();else D=L0.cast();try{return D(F)}catch(J){throw new GE1("ObjectId",F,this.path,J,this)}};/*!
572
+ * ignore
573
+ */function IJ(F){return this.cast(F)}L0.prototype.$conditionalHandlers={...s3.prototype.$conditionalHandlers,$gt:IJ,$gte:IJ,$lt:IJ,$lte:IJ};/*!
574
+ * ignore
575
+ */function Ab(){return new FW}Ab.$runBeforeSetters=!0;function EE1(F){if(eq||(eq=y2()),this instanceof eq){if(F===void 0)return new FW}return F}/*!
576
+ * Module exports.
577
+ */Bb.exports=L0});var Xb=K((MP1,Jb)=>{var HE1=B6();class k6 extends HE1{}var W3=N6();Object.defineProperty(k6.prototype,"enum",W3);Object.defineProperty(k6.prototype,"match",W3);Object.defineProperty(k6.prototype,"lowercase",W3);Object.defineProperty(k6.prototype,"trim",W3);Object.defineProperty(k6.prototype,"uppercase",W3);Object.defineProperty(k6.prototype,"minLength",W3);Object.defineProperty(k6.prototype,"minlength",W3);Object.defineProperty(k6.prototype,"maxLength",W3);Object.defineProperty(k6.prototype,"maxlength",W3);Object.defineProperty(k6.prototype,"populate",W3);/*!
578
+ * ignore
579
+ */Jb.exports=k6});var BW=K((TP1,Gb)=>{/*!
580
+ * Module dependencies.
581
+ */var a3=P0(),kF=_2(),qE1=Xb(),WE1=FJ(),Zb=X1(),zE1=l0(),$b=a3.CastError;function S1(F,A){this.enumValues=[],this.regExp=null,a3.call(this,F,A,"String")}S1.schemaName="String";S1.defaultOptions={};/*!
582
+ * Inherits from SchemaType.
583
+ */S1.prototype=Object.create(a3.prototype);S1.prototype.constructor=S1;Object.defineProperty(S1.prototype,"OptionsConstructor",{configurable:!1,enumerable:!1,writable:!1,value:qE1});/*!
584
+ * ignore
585
+ */S1._cast=WE1;S1.cast=function F(A){if(arguments.length===0)return this._cast;if(A===!1)A=this._defaultCaster;return this._cast=A,this._cast};/*!
586
+ * ignore
587
+ */S1._defaultCaster=(F)=>{if(F!=null&&typeof F!=="string")throw new Error;return F};S1.get=a3.get;S1.set=a3.set;S1.setters=[];/*!
588
+ * ignore
589
+ */S1._checkRequired=(F)=>(F instanceof String||typeof F==="string")&&F.length;S1.checkRequired=a3.checkRequired;S1.prototype.enum=function(){if(this.enumValidator)this.validators=this.validators.filter(function(D){return D.validator!==this.enumValidator},this),this.enumValidator=!1;if(arguments[0]===void 0||arguments[0]===!1)return this;let F,A;if(Zb.isObject(arguments[0]))if(Array.isArray(arguments[0].values))F=arguments[0].values,A=arguments[0].message;else F=Zb.object.vals(arguments[0]),A=kF.messages.String.enum;else F=arguments,A=kF.messages.String.enum;for(let D of F)if(D!==void 0)this.enumValues.push(this.cast(D));let B=this.enumValues;return this.enumValidator=function(D){return D==null||~B.indexOf(D)},this.validators.push({validator:this.enumValidator,message:A,type:"enum",enumValues:B}),this};S1.prototype.lowercase=function(F){if(arguments.length>0&&!F)return this;return this.set((A)=>{if(typeof A!=="string")A=this.cast(A);if(A)return A.toLowerCase();return A})};S1.prototype.uppercase=function(F){if(arguments.length>0&&!F)return this;return this.set((A)=>{if(typeof A!=="string")A=this.cast(A);if(A)return A.toUpperCase();return A})};S1.prototype.trim=function(F){if(arguments.length>0&&!F)return this;return this.set((A)=>{if(typeof A!=="string")A=this.cast(A);if(A)return A.trim();return A})};S1.prototype.minlength=function(F,A){if(this.minlengthValidator)this.validators=this.validators.filter(function(B){return B.validator!==this.minlengthValidator},this);if(F!==null&&F!==void 0){let B=A||kF.messages.String.minlength;B=B.replace(/{MINLENGTH}/,F),this.validators.push({validator:this.minlengthValidator=function(D){return D===null||D.length>=F},message:B,type:"minlength",minlength:F})}return this};S1.prototype.minLength=S1.prototype.minlength;S1.prototype.maxlength=function(F,A){if(this.maxlengthValidator)this.validators=this.validators.filter(function(B){return B.validator!==this.maxlengthValidator},this);if(F!==null&&F!==void 0){let B=A||kF.messages.String.maxlength;B=B.replace(/{MAXLENGTH}/,F),this.validators.push({validator:this.maxlengthValidator=function(D){return D===null||D.length<=F},message:B,type:"maxlength",maxlength:F})}return this};S1.prototype.maxLength=S1.prototype.maxlength;S1.prototype.match=function F(A,B){let D=B||kF.messages.String.match,J=function(X){if(!A)return!1;return A.lastIndex=0,X!=null&&X!==""?A.test(X):!0};return this.validators.push({validator:J,message:D,type:"regexp",regexp:A}),this};S1.prototype.checkRequired=function F(A,B){if(typeof A==="object"&&a3._isRef(this,A,B,!0))return A!=null;return(typeof this.constructor.checkRequired==="function"?this.constructor.checkRequired():S1.checkRequired())(A)};S1.prototype.cast=function(F,A,B){if(typeof F!=="string"&&a3._isRef(this,F,A,B))return this._castRef(F,A,B);let D;if(typeof this._castFunction==="function")D=this._castFunction;else if(typeof this.constructor.cast==="function")D=this.constructor.cast();else D=S1.cast();try{return D(F)}catch(J){throw new $b("string",F,this.path,null,this)}};/*!
590
+ * ignore
591
+ */function jF(F,A){return this.castForQuery(null,F,A)}/*!
592
+ * ignore
593
+ */function CE1(F,A){let B=this;if(!Array.isArray(F))return[this.castForQuery(null,F,A)];return F.map(function(D){return B.castForQuery(null,D,A)})}/*!
594
+ * ignore
595
+ */function Yb(F){if(F==null)return this._castNullish(F);return this.cast(F,this)}var KE1={...a3.prototype.$conditionalHandlers,$all:CE1,$gt:jF,$gte:jF,$lt:jF,$lte:jF,$options:Yb,$regex:function F(A){if(Object.prototype.toString.call(A)==="[object RegExp]")return A;return Yb.call(this,A)},$not:jF};Object.defineProperty(S1.prototype,"$conditionalHandlers",{configurable:!1,enumerable:!1,writable:!1,value:Object.freeze(KE1)});S1.prototype.castForQuery=function(F,A,B){let D;if(F!=null){if(D=this.$conditionalHandlers[F],!D)throw new Error("Can't use "+F+" with String.");return D.call(this,A,B)}if(Object.prototype.toString.call(A)==="[object RegExp]"||zE1(A,"BSONRegExp"))return A;try{return this.applySetters(A,B)}catch(J){if(J instanceof $b&&J.path===this.path&&this.$fullPath!=null)J.path=this.$fullPath;throw J}};/*!
596
+ * Module exports.
597
+ */Gb.exports=S1});var zb=K((jP1,Wb)=>{/*!
598
+ * Module dependencies.
599
+ */var XW=ZF(),O4=P0(),MJ=O4.CastError,Hb=X1(),NJ=BJ(),JW=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i,qb=XW.Binary;function UE1(F){return F!=null&&Buffer.from(F,"hex")}function Eb(F){if(typeof F!=="string")F="";let A=F.replace(/[{}-]/g,""),B=UE1(A),D=new XW(B);return D._subtype=4,D}function PJ(F){let A;if(typeof F!=="string"&&F!=null)return A=F.toString("hex"),A.substring(0,8)+"-"+A.substring(8,12)+"-"+A.substring(12,16)+"-"+A.substring(16,20)+"-"+A.substring(20,32);return F}function V0(F,A){O4.call(this,F,A,"UUID"),this.getters.push(function(B){if(B!=null&&B.$__!=null)return B;if(Buffer.isBuffer(B))return PJ(B);else if(B instanceof qb)return PJ(B.buffer);else if(Hb.isPOJO(B)&&B.type==="Buffer"&&Array.isArray(B.data))return PJ(Buffer.from(B.data));return B})}V0.schemaName="UUID";V0.defaultOptions={};/*!
600
+ * Inherits from SchemaType.
601
+ */V0.prototype=Object.create(O4.prototype);V0.prototype.constructor=V0;/*!
602
+ * ignore
603
+ */V0._cast=function(F){if(F==null)return F;function A(B){let D=new XW(B);return D._subtype=4,D}if(typeof F==="string")if(JW.test(F))return Eb(F);else throw new MJ(V0.schemaName,F,this.path);if(Buffer.isBuffer(F))return A(F);if(F instanceof qb)return A(F.value(!0));if(F.toString&&F.toString!==Object.prototype.toString){if(JW.test(F.toString()))return Eb(F.toString())}throw new MJ(V0.schemaName,F,this.path)};V0.get=O4.get;V0.set=O4.set;V0.setters=[];V0.cast=function F(A){if(arguments.length===0)return this._cast;if(A===!1)A=this._defaultCaster;return this._cast=A,this._cast};/*!
604
+ * ignore
605
+ */V0._checkRequired=(F)=>F!=null;V0.checkRequired=O4.checkRequired;V0.prototype.checkRequired=function F(A){if(Buffer.isBuffer(A))A=PJ(A);return A!=null&&JW.test(A)};V0.prototype.cast=function(F,A,B){if(Hb.isNonBuiltinObject(F)&&O4._isRef(this,F,A,B))return this._castRef(F,A,B);let D;if(typeof this._castFunction==="function")D=this._castFunction;else if(typeof this.constructor.cast==="function")D=this.constructor.cast();else D=V0.cast();try{return D(F)}catch(J){throw new MJ(V0.schemaName,F,this.path,J,this)}};/*!
606
+ * ignore
607
+ */function OF(F){return this.cast(F)}/*!
608
+ * ignore
609
+ */function DW(F){return F.map((A)=>{return this.cast(A)})}V0.prototype.$conditionalHandlers={...O4.prototype.$conditionalHandlers,$bitsAllClear:NJ,$bitsAnyClear:NJ,$bitsAllSet:NJ,$bitsAnySet:NJ,$all:DW,$gt:OF,$gte:OF,$in:DW,$lt:OF,$lte:OF,$ne:OF,$nin:DW};V0.prototype.castForQuery=function(F,A,B){let D;if(F!=null){if(D=this.$conditionalHandlers[F],!D)throw new Error("Can't use "+F+" with UUID.");return D.call(this,A,B)}try{return this.applySetters(A,B)}catch(J){if(J instanceof MJ&&J.path===this.path&&this.$fullPath!=null)J.path=this.$fullPath;throw J}};/*!
610
+ * Module exports.
611
+ */Wb.exports=V0});var Ub=K((kP1,Kb)=>{var Cb=import.meta.require("assert"),ZW=H6(),QE1=l0();Kb.exports=function F(A){if(A==null||A==="")return null;let B;if(QE1(A,"Long"))B=A.toNumber();else if(typeof A==="string")try{return B=ZW.Double.fromString(A),B}catch{Cb.ok(!1)}else if(typeof A==="object"){let D=A.valueOf()??A.toString();if(typeof D==="string")try{return B=ZW.Double.fromString(A),B}catch{Cb.ok(!1)}else B=Number(D)}else B=Number(A);return new ZW.Double(B)}});var Lb=K((OP1,Qb)=>{/*!
612
+ * Module dependencies.
613
+ */var LE1=Y2(),K8=P0(),VE1=Ub();function x0(F,A){K8.call(this,F,A,"Double")}x0.schemaName="Double";x0.defaultOptions={};/*!
614
+ * Inherits from SchemaType.
615
+ */x0.prototype=Object.create(K8.prototype);x0.prototype.constructor=x0;/*!
616
+ * ignore
617
+ */x0._cast=VE1;x0.set=K8.set;x0.setters=[];x0.get=K8.get;/*!
618
+ * ignore
619
+ */x0._defaultCaster=(F)=>{if(F!=null){if(F._bsontype!=="Double")throw new Error}return F};x0.cast=function F(A){if(arguments.length===0)return this._cast;if(A===!1)A=this._defaultCaster;return this._cast=A,this._cast};/*!
620
+ * ignore
621
+ */x0._checkRequired=(F)=>F!=null;x0.checkRequired=K8.checkRequired;x0.prototype.checkRequired=function(F){return this.constructor._checkRequired(F)};x0.prototype.cast=function(F){let A;if(typeof this._castFunction==="function")A=this._castFunction;else if(typeof this.constructor.cast==="function")A=this.constructor.cast();else A=x0.cast();try{return A(F)}catch(B){throw new LE1("Double",F,this.path,B,this)}};/*!
622
+ * ignore
623
+ */function TJ(F){return this.cast(F)}x0.prototype.$conditionalHandlers={...K8.prototype.$conditionalHandlers,$gt:TJ,$gte:TJ,$lt:TJ,$lte:TJ};/*!
624
+ * Module exports.
625
+ */Qb.exports=x0});var Rb=K((SP1,Vb)=>{var RE1=l0(),wE1=import.meta.require("assert");Vb.exports=function F(A){if(A==null)return A;if(A==="")return null;let B=RE1(A,"Long")?A.toNumber():Number(A),D=2147483647,J=-2147483648;if(B===(B|0)&&B>=J&&B<=D)return B;wE1.ok(!1)}});var Nb=K((uP1,Ib)=>{/*!
626
+ * Module dependencies.
627
+ */var wb=Y2(),U8=P0(),IE1=Rb();function M0(F,A){U8.call(this,F,A,"Int32")}M0.schemaName="Int32";M0.defaultOptions={};/*!
628
+ * Inherits from SchemaType.
629
+ */M0.prototype=Object.create(U8.prototype);M0.prototype.constructor=M0;/*!
630
+ * ignore
631
+ */M0._cast=IE1;M0.set=U8.set;M0.setters=[];M0.get=U8.get;/*!
632
+ * ignore
633
+ */M0._defaultCaster=(F)=>{if(F!=null){if(typeof F!=="number"||F!==(F|0)||F<-2147483648||F>2147483647)throw new Error}return F};M0.cast=function F(A){if(arguments.length===0)return this._cast;if(A===!1)A=this._defaultCaster;return this._cast=A,this._cast};/*!
634
+ * ignore
635
+ */M0._checkRequired=(F)=>F!=null;M0.checkRequired=U8.checkRequired;M0.prototype.checkRequired=function(F){return this.constructor._checkRequired(F)};M0.prototype.cast=function(F){let A;if(typeof this._castFunction==="function")A=this._castFunction;else if(typeof this.constructor.cast==="function")A=this.constructor.cast();else A=M0.cast();try{return A(F)}catch(B){throw new wb("Int32",F,this.path,B,this)}};/*!
636
+ * ignore
637
+ */M0.$conditionalHandlers={...U8.prototype.$conditionalHandlers,$gt:jJ,$gte:jJ,$lt:jJ,$lte:jJ};/*!
638
+ * ignore
639
+ */function jJ(F,A){return this.castForQuery(null,F,A)}M0.prototype.castForQuery=function(F,A,B){let D;if(F!=null){if(D=M0.$conditionalHandlers[F],D)return D.call(this,A);return this.applySetters(null,A,B)}try{return this.applySetters(A,B)}catch(J){if(J instanceof wb&&J.path===this.path&&this.$fullPath!=null)J.path=this.$fullPath;throw J}};/*!
640
+ * Module exports.
641
+ */Ib.exports=M0});var VF=K((NE1)=>{/*!
642
+ * Module exports.
643
+ */NE1.Array=ZJ();NE1.BigInt=b_();NE1.Boolean=h_();NE1.Buffer=p_();NE1.Date=e_();NE1.Decimal128=NE1.Decimal=Dg();NE1.DocumentArray=pg();NE1.Map=rg();NE1.Mixed=Q9();NE1.Number=Rq();NE1.ObjectId=Db();NE1.String=BW();NE1.Subdocument=iq();NE1.UUID=zb();NE1.Double=Lb();NE1.Int32=Nb();NE1.Oid=NE1.ObjectId;NE1.Object=NE1.Mixed;NE1.Bool=NE1.Boolean;NE1.ObjectID=NE1.ObjectId});var J8=K((HW,yb)=>{/*!
644
+ * Module dependencies.
645
+ */var dE1=import.meta.require("events").EventEmitter,cE1=n7(),z3=z1(),Tb=P0(),jb=B6(),lE1=Aq(),EW=nD(),kb=Dq(),P2=Z0(),Ob=W0(),pE1=I2(),iE1=Nf(),SJ=Zq(),nE1=Tf(),Sb=kf(),sE1=LD(),kJ=D6(),aE1=Sf(),rE1=mf(),a1=X1(),tE1=cf(),oE1=/\.\d+(\.|$)/,S4,eE1=aD().queryMiddlewareFunctions,FH1=rD().middlewareFunctions,ub=eE1.concat(FH1).reduce((F,A)=>F.add(A),new Set),$W=a1.isPOJO,xb=0,AH1=/^\d+$/;function i(F,A){if(!(this instanceof i))return new i(F,A);if(this.obj=F,this.paths={},this.aliases={},this.subpaths={},this.virtuals={},this.singleNestedPaths={},this.nested={},this.inherits={},this.callQueue=[],this._indexes=[],this._searchIndexes=[],this.methods=A&&A.methods||{},this.methodOptions={},this.statics=A&&A.statics||{},this.tree={},this.query=A&&A.query||{},this.childSchemas=[],this.plugins=[],this.$id=++xb,this.mapPaths=[],this.s={hooks:new cE1},this.options=this.defaultOptions(A),Array.isArray(F))for(let J of F)this.add(J);else if(F)this.add(F);if(A&&A.virtuals){let J=A.virtuals,X=Object.keys(J);for(let Z of X){let Y=J[Z].options?J[Z].options:void 0,$=this.virtual(Z,Y);if(J[Z].get)$.get(J[Z].get);if(J[Z].set)$.set(J[Z].set)}}let B=F&&F._id&&a1.isObject(F._id);if(!this.paths._id&&this.options._id&&!B)kb(this);this.setupTimestamp(this.options.timestamps)}function fb(F,A){for(let B of Object.keys(A)){let D=null;if(A[B]!=null)D=A[B];else{let X=Ob(F.paths[B],"options");if(X==null)continue;D=X.alias}if(!D)continue;let J=F.paths[B].path;if(Array.isArray(D)){for(let X of D){if(typeof X!=="string")throw new Error("Invalid value for alias option on "+J+", got "+X);F.aliases[X]=J,F.virtual(X).get(function(Z){return function(){if(typeof this.get==="function")return this.get(Z);return this[Z]}}(J)).set(function(Z){return function(Y){return this.$set(Z,Y)}}(J))}continue}if(typeof D!=="string")throw new Error("Invalid value for alias option on "+J+", got "+D);F.aliases[D]=J,F.virtual(D).get(function(X){return function(){if(typeof this.get==="function")return this.get(X);return this[X]}}(J)).set(function(X){return function(Z){return this.$set(X,Z)}}(J))}}/*!
646
+ * Inherit from EventEmitter.
647
+ */i.prototype=Object.create(dE1.prototype);i.prototype.constructor=i;i.prototype.instanceOfSchema=!0;/*!
648
+ * ignore
649
+ */Object.defineProperty(i.prototype,"$schemaType",{configurable:!1,enumerable:!1,writable:!0});Object.defineProperty(i.prototype,"childSchemas",{configurable:!1,enumerable:!0,writable:!0});Object.defineProperty(i.prototype,"virtuals",{configurable:!1,enumerable:!0,writable:!0});i.prototype.obj;i.prototype.paths;i.prototype.tree;i.prototype.clone=function(){let F=this._clone();return F.on("init",(A)=>this.emit("init",A)),F};/*!
650
+ * ignore
651
+ */i.prototype._clone=function F(A){A=A||(this.base==null?i:this.base.Schema);let B=new A({},this._userProvidedOptions);B.base=this.base,B.obj=this.obj,B.options=P2(this.options),B.callQueue=this.callQueue.map(function(D){return D}),B.methods=P2(this.methods),B.methodOptions=P2(this.methodOptions),B.statics=P2(this.statics),B.query=P2(this.query),B.plugins=Array.prototype.slice.call(this.plugins),B._indexes=P2(this._indexes),B._searchIndexes=P2(this._searchIndexes),B.s.hooks=this.s.hooks.clone(),B.tree=P2(this.tree),B.paths=Object.fromEntries(Object.entries(this.paths).map(([D,J])=>[D,J.clone()])),B.nested=P2(this.nested),B.subpaths=P2(this.subpaths);for(let D of Object.values(B.paths))if(D.$isSingleNested){let J=D.path;for(let X of Object.keys(D.schema.paths))B.singleNestedPaths[J+"."+X]=D.schema.paths[X];for(let X of Object.keys(D.schema.singleNestedPaths))B.singleNestedPaths[J+"."+X]=D.schema.singleNestedPaths[X];for(let X of Object.keys(D.schema.subpaths))B.singleNestedPaths[J+"."+X]=D.schema.subpaths[X];for(let X of Object.keys(D.schema.nested))B.singleNestedPaths[J+"."+X]="nested"}if(B._gatherChildSchemas(),B.virtuals=P2(this.virtuals),B.$globalPluginsApplied=this.$globalPluginsApplied,B.$isRootDiscriminator=this.$isRootDiscriminator,B.$implicitlyCreated=this.$implicitlyCreated,B.$id=++xb,B.$originalSchemaId=this.$id,B.mapPaths=[].concat(this.mapPaths),this.discriminatorMapping!=null)B.discriminatorMapping=Object.assign({},this.discriminatorMapping);if(this.discriminators!=null)B.discriminators=Object.assign({},this.discriminators);if(this._applyDiscriminators!=null)B._applyDiscriminators=new Map(this._applyDiscriminators);return B.aliases=Object.assign({},this.aliases),B};i.prototype.pick=function(F,A){let B=new i({},A||this.options);if(!Array.isArray(F))throw new z3('Schema#pick() only accepts an array argument, got "'+typeof F+'"');for(let D of F)if(this.nested[D])B.add({[D]:Ob(this.tree,D)});else{let J=this.path(D);if(J==null)throw new z3("Path `"+D+"` is not in the schema");B.add({[D]:J})}return B};i.prototype.omit=function(F,A){let B=new i(this,A||this.options);if(!Array.isArray(F))throw new z3('Schema#omit() only accepts an array argument, got "'+typeof F+'"');B.remove(F);for(let D in B.singleNestedPaths)if(F.includes(D))delete B.singleNestedPaths[D];return B};i.prototype.defaultOptions=function(F){this._userProvidedOptions=F==null?{}:P2(F);let A=this.base&&this.base.options||{},B="strict"in A?A.strict:!0,D="strictQuery"in A?A.strictQuery:!1,J="id"in A?A.id:!0;if(F={strict:B,strictQuery:D,bufferCommands:!0,capped:!1,versionKey:"__v",optimisticConcurrency:!1,minimize:!0,autoIndex:null,discriminatorKey:"__t",shardKey:null,read:null,validateBeforeSave:!0,validateModifiedOnly:!1,_id:!0,id:J,typeKey:"type",...F},F.versionKey&&typeof F.versionKey!=="string")throw new z3("`versionKey` must be falsy or string, got `"+typeof F.versionKey+"`");if(typeof F.read==="string")F.read=SJ(F.read);else if(Array.isArray(F.read)&&typeof F.read[0]==="string")F.read={mode:SJ(F.read[0]),tags:F.read[1]};if(F.optimisticConcurrency&&!F.versionKey)throw new z3("Must set `versionKey` if using `optimisticConcurrency`");return F};i.prototype.discriminator=function(F,A,B){return this._applyDiscriminators=this._applyDiscriminators||new Map,this._applyDiscriminators.set(F,{schema:A,options:B}),this};/*!
652
+ * Get this schema's default toObject/toJSON options, including Mongoose global
653
+ * options.
654
+ */i.prototype._defaultToObjectOptions=function(F){let A=F?"toJSON":"toObject";if(this._defaultToObjectOptionsMap&&this._defaultToObjectOptionsMap[A])return this._defaultToObjectOptionsMap[A];let B=this.base&&this.base.options&&this.base.options[A]||{},D=this.options[A]||{},J=Object.assign({},B,D);return this._defaultToObjectOptionsMap=this._defaultToObjectOptionsMap||{},this._defaultToObjectOptionsMap[A]=J,J};i.prototype.add=function F(A,B){if(A instanceof i||A!=null&&A.instanceOfSchema)return sE1(this,A),this;if(A._id===!1&&B==null)this.options._id=!1;if(B=B||"",B==="__proto__."||B==="constructor."||B==="prototype.")return this;let D=Object.keys(A),J=this.options.typeKey;for(let Z of D){if(a1.specialProperties.has(Z))continue;let Y=B+Z,$=A[Z];if($==null)throw new TypeError("Invalid value for schema path `"+Y+'`, got value "'+$+'"');if(Z==="_id"&&$===!1)continue;let G=!1;if(typeof $==="string"){let E=this.base!=null?this.base.Schema.Types:i.Types,H=$.charAt(0).toUpperCase()+$.substring(1);G=E[H]!=null}if(Z!=="_id"&&(typeof $!=="object"&&typeof $!=="function"&&!G||$==null))throw new TypeError(`Invalid schema configuration: \`${$}\` is not a valid type at path \`${Z}\`. See https://bit.ly/mongoose-schematypes for a list of valid schema types.`);if($ instanceof EW||($.constructor&&$.constructor.name||null)==="VirtualType"){this.virtual($);continue}if(Array.isArray($)&&$.length===1&&$[0]==null)throw new TypeError("Invalid value for schema Array path `"+Y+'`, got value "'+$[0]+'"');if(!($W($)||$ instanceof jb)){if(B)this.nested[B.substring(0,B.length-1)]=!0;if(this.path(B+Z,$),$[0]!=null&&!$[0].instanceOfSchema&&a1.isPOJO($[0].discriminators)){let E=this.path(B+Z);for(let H in $[0].discriminators)E.discriminator(H,$[0].discriminators[H])}}else if(Object.keys($).length<1){if(B)this.nested[B.substring(0,B.length-1)]=!0;this.path(Y,$)}else if(!$[J]||J==="type"&&$W($.type)&&$.type.type)this.nested[Y]=!0,this.add($,Y+".");else{let E=$[J];if($W(E)&&Object.keys(E).length>0){if(B)this.nested[B.substring(0,B.length-1)]=!0;let H={};if(this._userProvidedOptions.typeKey)H.typeKey=this._userProvidedOptions.typeKey;if(this._userProvidedOptions.strict!=null)H.strict=this._userProvidedOptions.strict;if(this._userProvidedOptions.toObject!=null)H.toObject=a1.omit(this._userProvidedOptions.toObject,["transform"]);if(this._userProvidedOptions.toJSON!=null)H.toJSON=a1.omit(this._userProvidedOptions.toJSON,["transform"]);let q=new i(E,H);q.$implicitlyCreated=!0;let W=Object.assign({},$,{[J]:q});this.path(B+Z,W)}else{if(B)this.nested[B.substring(0,B.length-1)]=!0;if(this.path(B+Z,$),$!=null&&!$.instanceOfSchema&&a1.isPOJO($.discriminators)){let H=this.path(B+Z);for(let q in $.discriminators)H.discriminator(q,$.discriminators[q])}}}}let X=Object.fromEntries(Object.entries(A).map(([Z])=>[B+Z,null]));return fb(this,X),this};i.prototype.alias=function A(F,A){return fb(this,{[F]:A}),this};i.prototype.removeIndex=function F(A){if(arguments.length>1)throw new Error("removeIndex() takes only 1 argument");if(typeof A!=="object"&&typeof A!=="string")throw new Error("removeIndex() may only take either an object or a string as an argument");if(typeof A==="object"){for(let B=this._indexes.length-1;B>=0;--B)if(Sb(this._indexes[B][0],A))this._indexes.splice(B,1)}else for(let B=this._indexes.length-1;B>=0;--B)if(this._indexes[B][1]!=null&&this._indexes[B][1].name===A)this._indexes.splice(B,1);return this};i.prototype.clearIndexes=function F(){return this._indexes.length=0,this};i.prototype.searchIndex=function F(A){return this._searchIndexes.push(A),this};i.reserved=Object.create(null);i.prototype.reserved=i.reserved;var i0=i.reserved;i0.prototype=i0.emit=i0.listeners=i0.removeListener=i0.collection=i0.errors=i0.get=i0.init=i0.isModified=i0.isNew=i0.populated=i0.remove=i0.save=i0.toObject=i0.validate=1;i0.collection=1;i.prototype.path=function(F,A){if(A===void 0){if(this.paths[F]!=null)return this.paths[F];let $=_b(F),G=BH1(this,F,$);if(G!=null)return G;let E=gb(this,F);if(E!=null)return E;if(G=this.hasMixedParent($),G!=null)return G;return oE1.test(F)?JH1(this,F,$):void 0}let B=F.split(".")[0];if(i0[B]&&!this.options.suppressReservedKeysWarning){let $=`\`${B}\` is a reserved schema pathname and may break some functionality. You are allowed to use it, but use at your own risk. To disable this warning pass \`suppressReservedKeysWarning\` as a schema option.`;a1.warn($)}if(typeof A==="object"&&a1.hasUserDefinedProperty(A,"ref"))tE1(A.ref,F);let D=F.split(/\./),J=D.pop(),X=this.tree,Z="";for(let $ of D){if(a1.specialProperties.has($))throw new Error("Cannot set special property `"+$+"` on a schema");if(Z=Z+=(Z.length>0?".":"")+$,!X[$])this.nested[Z]=!0,X[$]={};if(typeof X[$]!=="object"){let G="Cannot set nested path `"+F+"`. Parent path `"+Z+"` already set to type "+X[$].name+".";throw new Error(G)}X=X[$]}X[J]=P2(A),this.paths[F]=this.interpretAsType(F,A,this.options);let Y=this.paths[F];if(Y.$isSchemaMap){let $=F+".$*";if(this.paths[$]=Y.$__schemaType,this.mapPaths.push(this.paths[$]),Y.$__schemaType.$isSingleNested)this.childSchemas.push({schema:Y.$__schemaType.schema,model:Y.$__schemaType.caster,path:F})}if(Y.$isSingleNested){for(let $ of Object.keys(Y.schema.paths))this.singleNestedPaths[F+"."+$]=Y.schema.paths[$];for(let $ of Object.keys(Y.schema.singleNestedPaths))this.singleNestedPaths[F+"."+$]=Y.schema.singleNestedPaths[$];for(let $ of Object.keys(Y.schema.subpaths))this.singleNestedPaths[F+"."+$]=Y.schema.subpaths[$];for(let $ of Object.keys(Y.schema.nested))this.singleNestedPaths[F+"."+$]="nested";Object.defineProperty(Y.schema,"base",{configurable:!0,enumerable:!1,writable:!1,value:this.base}),Y.caster.base=this.base,this.childSchemas.push({schema:Y.schema,model:Y.caster,path:F})}else if(Y.$isMongooseDocumentArray)Object.defineProperty(Y.schema,"base",{configurable:!0,enumerable:!1,writable:!1,value:this.base}),Y.casterConstructor.base=this.base,this.childSchemas.push({schema:Y.schema,model:Y.casterConstructor,path:F});if(Y.$isMongooseArray&&Y.caster instanceof Tb){let $=F,G=Y,E=[];while(G.$isMongooseArray){if($=$+".$",G.$isMongooseDocumentArray)G.$embeddedSchemaType._arrayPath=$,G.$embeddedSchemaType._arrayParentPath=F,G=G.$embeddedSchemaType;else G.caster._arrayPath=$,G.caster._arrayParentPath=F,G=G.caster;this.subpaths[$]=G}for(let H of E)this.subpaths[H.path]=H}if(Y.$isMongooseDocumentArray){for(let $ of Object.keys(Y.schema.paths)){let G=Y.schema.paths[$];if(this.subpaths[F+"."+$]=G,typeof G==="object"&&G!=null&&G.$parentSchemaDocArray==null)G.$parentSchemaDocArray=Y}for(let $ of Object.keys(Y.schema.subpaths)){let G=Y.schema.subpaths[$];if(this.subpaths[F+"."+$]=G,typeof G==="object"&&G!=null&&G.$parentSchemaDocArray==null)G.$parentSchemaDocArray=Y}for(let $ of Object.keys(Y.schema.singleNestedPaths)){let G=Y.schema.singleNestedPaths[$];if(this.subpaths[F+"."+$]=G,typeof G==="object"&&G!=null&&G.$parentSchemaDocArray==null)G.$parentSchemaDocArray=Y}}return this};/*!
655
+ * ignore
656
+ */i.prototype._gatherChildSchemas=function F(){let A=[];for(let B of Object.keys(this.paths)){if(typeof B!=="string")continue;let D=this.paths[B];if(D.$isMongooseDocumentArray||D.$isSingleNested)A.push({schema:D.schema,model:D.caster,path:B});else if(D.$isSchemaMap&&D.$__schemaType.$isSingleNested)A.push({schema:D.$__schemaType.schema,model:D.$__schemaType.caster,path:B})}return this.childSchemas=A,A};/*!
657
+ * ignore
658
+ */function BH1(F,A,B){if(F.paths.hasOwnProperty(A))return F.paths[A];if(F.subpaths.hasOwnProperty(B)){let D=F.subpaths[B];if(D==="nested")return;return D}if(F.singleNestedPaths.hasOwnProperty(B)&&typeof F.singleNestedPaths[B]==="object"){let D=F.singleNestedPaths[B];if(D==="nested")return;return D}return null}/*!
659
+ * ignore
660
+ */function _b(F){if(!/\.\d+/.test(F))return F;return F.replace(/\.\d+\./g,".$.").replace(/\.\d+$/,".$")}/*!
661
+ * ignore
662
+ */function gb(F,A){if(F.mapPaths.length===0)return null;for(let B of F.mapPaths){let D=B.path;if(new RegExp("^"+D.replace(/\.\$\*/g,"\\.[^.]+")+"$").test(A))return F.paths[D]}return null}Object.defineProperty(i.prototype,"base",{configurable:!0,enumerable:!1,writable:!0,value:null});i.prototype.interpretAsType=function(F,A,B){if(A instanceof Tb){if(A.path===F)return A;let $=A.clone();return $.path=F,$}let D=this.base!=null?this.base.Schema.Types:i.Types,J=this.base!=null?this.base.Types:Y8();if(!a1.isPOJO(A)&&!(A instanceof jb)){if(a1.getFunctionName(A.constructor)!=="Object"){let G=A;A={},A[B.typeKey]=G}}let X=A[B.typeKey]&&(A[B.typeKey]instanceof Function||B.typeKey!=="type"||!A.type.type)?A[B.typeKey]:{},Z;if(a1.isPOJO(X)||X==="mixed")return new D.Mixed(F,A);if(Array.isArray(X)||X===Array||X==="array"||X===D.Array){let $=X===Array||X==="array"?A.cast||A.of:X[0];if($&&$.instanceOfSchema){if(!($ instanceof i))if(this.options._isMerging)$=new i($);else throw new TypeError("Schema for array path `"+F+`\` is from a different copy of the Mongoose module. Please make sure you're using the same version of Mongoose everywhere with \`npm list mongoose\`. If you are still getting this error, please add \`new Schema()\` around the path: ${F}: new Schema(...)`);return new D.DocumentArray(F,$,A)}if($&&$[B.typeKey]&&$[B.typeKey].instanceOfSchema){if(!($[B.typeKey]instanceof i))if(this.options._isMerging)$[B.typeKey]=new i($[B.typeKey]);else throw new TypeError("Schema for array path `"+F+`\` is from a different copy of the Mongoose module. Please make sure you're using the same version of Mongoose everywhere with \`npm list mongoose\`. If you are still getting this error, please add \`new Schema()\` around the path: ${F}: new Schema(...)`);return new D.DocumentArray(F,$[B.typeKey],A,$)}if(typeof $!=="undefined"){if(Array.isArray($)||$.type===Array||$.type=="Array"){if($&&$.type=="Array")$.type=Array;return new D.Array(F,this.interpretAsType(F,$,B),A)}}let G=$!=null&&$[B.typeKey]&&(B.typeKey!=="type"||!$.type.type)?$[B.typeKey]:$;if(typeof $==="string")$=D[$.charAt(0).toUpperCase()+$.substring(1)];else if(a1.isPOJO(G))if(Object.keys(G).length){let E={minimize:B.minimize};if(B.typeKey)E.typeKey=B.typeKey;if(B.hasOwnProperty("strict"))E.strict=B.strict;if(B.hasOwnProperty("strictQuery"))E.strictQuery=B.strictQuery;if(B.hasOwnProperty("toObject"))E.toObject=a1.omit(B.toObject,["transform"]);if(B.hasOwnProperty("toJSON"))E.toJSON=a1.omit(B.toJSON,["transform"]);if(this._userProvidedOptions.hasOwnProperty("_id"))E._id=this._userProvidedOptions._id;else if(i.Types.DocumentArray.defaultOptions._id!=null)E._id=i.Types.DocumentArray.defaultOptions._id;let H=new i(G,E);return H.$implicitlyCreated=!0,new D.DocumentArray(F,H,A)}else return new D.Array(F,D.Mixed,A);if($){if(X=$[B.typeKey]&&(B.typeKey!=="type"||!$.type.type)?$[B.typeKey]:$,Array.isArray(X))return new D.Array(F,this.interpretAsType(F,X,B),A);if(Z=typeof X==="string"?X:X.schemaName||a1.getFunctionName(X),Z==="ClockDate")Z="Date";if(Z===void 0)throw new TypeError(`Invalid schema configuration: Could not determine the embedded type for array \`${F}\`. See https://mongoosejs.com/docs/guide.html#definition for more info on supported schema syntaxes.`);if(!D.hasOwnProperty(Z))throw new TypeError(`Invalid schema configuration: \`${Z}\` is not a valid type within the array \`${F}\`.See https://bit.ly/mongoose-schematypes for a list of valid schema types.`)}return new D.Array(F,$||D.Mixed,A,B)}if(X&&X.instanceOfSchema)return new D.Subdocument(X,F,A);if(Buffer.isBuffer(X))Z="Buffer";else if(typeof X==="function"||typeof X==="object")Z=X.schemaName||a1.getFunctionName(X);else if(X===J.ObjectId)Z="ObjectId";else if(X===J.Decimal128)Z="Decimal128";else Z=X==null?""+X:X.toString();if(Z)Z=Z.charAt(0).toUpperCase()+Z.substring(1);if(Z==="ObjectID")Z="ObjectId";if(Z==="ClockDate")Z="Date";if(Z===void 0)throw new TypeError(`Invalid schema configuration: \`${F}\` schematype definition is invalid. See https://mongoosejs.com/docs/guide.html#definition for more info on supported schema syntaxes.`);if(D[Z]==null)throw new TypeError(`Invalid schema configuration: \`${Z}\` is not a valid type at path \`${F}\`. See https://bit.ly/mongoose-schematypes for a list of valid schema types.`);let Y=new D[Z](F,A);if(Y.$isSchemaMap)DH1(this,Y,F,A,B);return Y};/*!
663
+ * ignore
664
+ */function DH1(F,A,B,D,J){let X=B+".$*",Z={type:{}};if(a1.hasUserDefinedProperty(D,"of")){if(a1.isPOJO(D.of)&&Object.keys(D.of).length>0&&!a1.hasUserDefinedProperty(D.of,F.options.typeKey))Z={[F.options.typeKey]:new i(D.of)};else if(a1.isPOJO(D.of))Z=Object.assign({},D.of);else Z={[F.options.typeKey]:D.of};if(Z[F.options.typeKey]&&Z[F.options.typeKey].instanceOfSchema)Z[F.options.typeKey].eachPath((G,E)=>{if(E.options.select===!0||E.options.select===!1)throw new z3('Cannot use schema-level projections (`select: true` or `select: false`) within maps at path "'+B+"."+G+'"')});if(a1.hasUserDefinedProperty(D,"ref"))Z.ref=D.ref}A.$__schemaType=F.interpretAsType(X,Z,J)}i.prototype.eachPath=function(F){let A=Object.keys(this.paths),B=A.length;for(let D=0;D<B;++D)F(A[D],this.paths[A[D]]);return this};i.prototype.requiredPaths=function F(A){if(this._requiredpaths&&!A)return this._requiredpaths;let B=Object.keys(this.paths),D=B.length,J=[];while(D--){let X=B[D];if(this.paths[X].isRequired)J.push(X)}return this._requiredpaths=J,this._requiredpaths};i.prototype.indexedPaths=function F(){if(this._indexedpaths)return this._indexedpaths;return this._indexedpaths=this.indexes(),this._indexedpaths};i.prototype.pathType=function(F){if(this.paths.hasOwnProperty(F))return"real";if(this.virtuals.hasOwnProperty(F))return"virtual";if(this.nested.hasOwnProperty(F))return"nested";let A=_b(F);if(this.subpaths.hasOwnProperty(A)||this.subpaths.hasOwnProperty(F))return"real";let B=this.singleNestedPaths.hasOwnProperty(A)||this.singleNestedPaths.hasOwnProperty(F);if(B)return B==="nested"?"nested":"real";if(gb(this,F)!=null)return"real";if(/\.\d+\.|\.\d+$/.test(F))return bb(this,F,A);return"adhocOrUndefined"};i.prototype.hasMixedParent=function(F){let A=F.split(/\./g);F="";for(let B=0;B<A.length;++B)if(F=B>0?F+"."+A[B]:A[B],this.paths.hasOwnProperty(F)&&this.paths[F]instanceof S4.Mixed)return this.paths[F];return null};i.prototype.setupTimestamp=function(F){return rE1(this,F)};function bb(F,A,B){let D=A.split(/\.(\d+)\.|\.(\d+)$/).filter(Boolean);if(D.length<2)return F.paths.hasOwnProperty(D[0])?F.paths[D[0]]:"adhocOrUndefined";let J=F.path(D[0]),X=!1;if(!J)return"adhocOrUndefined";let Z=D.length-1;for(let Y=1;Y<D.length;++Y){X=!1;let $=D[Y];if(Y===Z&&J&&!/\D/.test($)){if(J.$isMongooseDocumentArray)J=J.$embeddedSchemaType;else if(J instanceof S4.Array)J=J.caster;else J=void 0;break}if(!/\D/.test($)){if(J instanceof S4.Array&&Y!==Z)J=J.caster;continue}if(!(J&&J.schema)){J=void 0;break}X=J.schema.pathType($)==="nested",J=J.schema.path($)}if(F.subpaths[B]=J,J)return"real";if(X)return"nested";return"adhocOrUndefined"}/*!
665
+ * ignore
666
+ */function JH1(F,A,B){return bb(F,A,B),F.subpaths[B]}i.prototype.queue=function(F,A){return this.callQueue.push([F,A]),this};i.prototype.pre=function(F){if(F instanceof RegExp){let A=Array.prototype.slice.call(arguments,1);for(let B of ub)if(F.test(B))this.pre.apply(this,[B].concat(A));return this}if(Array.isArray(F)){let A=Array.prototype.slice.call(arguments,1);for(let B of F)this.pre.apply(this,[B].concat(A));return this}return this.s.hooks.pre.apply(this.s.hooks,arguments),this};i.prototype.post=function(F){if(F instanceof RegExp){let A=Array.prototype.slice.call(arguments,1);for(let B of ub)if(F.test(B))this.post.apply(this,[B].concat(A));return this}if(Array.isArray(F)){let A=Array.prototype.slice.call(arguments,1);for(let B of F)this.post.apply(this,[B].concat(A));return this}return this.s.hooks.post.apply(this.s.hooks,arguments),this};i.prototype.plugin=function(F,A){if(typeof F!=="function")throw new Error('First param to `schema.plugin()` must be a function, got "'+typeof F+'"');if(A&&A.deduplicate){for(let B of this.plugins)if(B.fn===F)return this}return this.plugins.push({fn:F,opts:A}),F(this,A),this};i.prototype.method=function(F,A,B){if(typeof F!=="string")for(let D in F)this.methods[D]=F[D],this.methodOptions[D]=P2(B);else this.methods[F]=A,this.methodOptions[F]=P2(B);return this};i.prototype.static=function(F,A){if(typeof F!=="string")for(let B in F)this.statics[B]=F[B];else this.statics[F]=A;return this};i.prototype.index=function(F,A){if(F||(F={}),A||(A={}),A.expires)a1.expires(A);for(let B in F)if(this.aliases[B])F=a1.renameObjKey(F,B,this.aliases[B]);for(let B of Object.keys(F))if(F[B]==="ascending"||F[B]==="asc")F[B]=1;else if(F[B]==="descending"||F[B]==="desc")F[B]=-1;for(let B of this.indexes())if(A.name==null&&B[1].name==null&&Sb(B[0],F))throw new z3(`Schema already has an index on ${JSON.stringify(F)}`);return this._indexes.push([F,A]),this};i.prototype.set=function(F,A,B){if(arguments.length===1)return this.options[F];switch(F){case"read":if(typeof A==="string")this.options[F]={mode:SJ(A),tags:B};else if(Array.isArray(A)&&typeof A[0]==="string")this.options[F]={mode:SJ(A[0]),tags:A[1]};else this.options[F]=A;this._userProvidedOptions[F]=this.options[F];break;case"timestamps":this.setupTimestamp(A),this.options[F]=A,this._userProvidedOptions[F]=this.options[F];break;case"_id":if(this.options[F]=A,this._userProvidedOptions[F]=this.options[F],A&&!this.paths._id)kb(this);else if(!A&&this.paths._id!=null&&this.paths._id.auto)this.remove("_id");break;default:this.options[F]=A,this._userProvidedOptions[F]=this.options[F];break}if(F==="strict")SF(this,{strict:A});if(F==="strictQuery")SF(this,{strictQuery:A});if(F==="toObject")A={...A},delete A.transform,SF(this,{toObject:A});if(F==="toJSON")A={...A},delete A.transform,SF(this,{toJSON:A});return this};/*!
667
+ * Recursively set options on implicitly created schemas
668
+ */function SF(F,A){for(let{schema:B}of F.childSchemas){if(!B.$implicitlyCreated)continue;Object.assign(B.options,A),SF(B,A)}}i.prototype.get=function(F){return this.options[F]};var XH1="2d 2dsphere hashed text".split(" ");Object.defineProperty(i,"indexTypes",{get:function(){return XH1},set:function(){throw new Error("Cannot overwrite Schema.indexTypes")}});i.prototype.indexes=function(){return iE1(this)};i.prototype.virtual=function(F,A){if(F instanceof EW||pE1(F)==="VirtualType")return this.virtual(F.path,F.options);if(A=new lE1(A),a1.hasUserDefinedProperty(A,["ref","refPath"])){if(A.localField==null)throw new Error("Reference virtuals require `localField` option");if(A.foreignField==null)throw new Error("Reference virtuals require `foreignField` option");let J=this.virtual(F);if(J.options=A,this.pre("init",function Y($,G){if(kJ.has(F,$)){let E=kJ.get(F,$);if(!this.$$populatedVirtuals)this.$$populatedVirtuals={};if(A.justOne||A.count)this.$$populatedVirtuals[F]=Array.isArray(E)?E[0]:E;else this.$$populatedVirtuals[F]=Array.isArray(E)?E:E==null?[]:[E];if(G?.hydratedPopulatedDocs&&!A.count){let H=J._getModelNamesForPopulate(this),q=this.$$populatedVirtuals[F];if(!Array.isArray(q)&&!q.$__&&H?.length===1){let W=this.db.model(H[0]);this.$$populatedVirtuals[F]=W.hydrate(q)}else if(Array.isArray(q)&&H?.length===1){let W=this.db.model(H[0]);for(let z=0;z<q.length;++z)if(!q[z].$__)q[z]=W.hydrate(q[z])}}kJ.unset(F,$)}}),J.set(function(Y){if(!this.$$populatedVirtuals)this.$$populatedVirtuals={};return aE1(this.$$populatedVirtuals,F,Y,A)}),typeof A.get==="function")J.get(A.get);let X=F.split("."),Z=X[0];for(let Y=0;Y<X.length-1;++Y){if(this.paths[Z]==null)continue;if(this.paths[Z].$isMongooseDocumentArray||this.paths[Z].$isSingleNested){let $=X.slice(Y+1).join(".");this.paths[Z].schema.virtual($,A);break}Z+="."+X[Y+1]}return J}let B=this.virtuals,D=F.split(".");if(this.pathType(F)==="real")throw new Error('Virtual path "'+F+'" conflicts with a real path in the schema');if(B[F]=D.reduce(function(J,X,Z){return J[X]||(J[X]=Z===D.length-1?new EW(A,F):{}),J[X]},this.tree),A&&A.applyToArray&&D.length>1){let J=this.path(D.slice(0,-1).join("."));if(J&&J.$isMongooseArray)return J.virtual(D[D.length-1],A);else throw new z3(`Path "${J}" is not an array`)}return B[F]};i.prototype.virtualpath=function(F){return this.virtuals.hasOwnProperty(F)?this.virtuals[F]:null};i.prototype.remove=function(F){if(typeof F==="string")F=[F];if(Array.isArray(F))F.forEach(function(A){if(this.path(A)==null&&!this.nested[A])return;if(this.nested[A]){let B=Object.keys(this.paths).concat(Object.keys(this.nested));for(let D of B)if(D.startsWith(A+"."))delete this.paths[D],delete this.nested[D],GW(this,D);delete this.nested[A],GW(this,A);return}delete this.paths[A],GW(this,A)},this);return this};/*!
669
+ * ignore
670
+ */function GW(F,A){let B=A.split("."),D=B.pop(),J=F.tree;for(let X of B)J=J[X];delete J[D]}i.prototype.removeVirtual=function(F){if(typeof F==="string")F=[F];if(Array.isArray(F)){for(let A of F)if(this.virtuals[A]==null)throw new z3(`Attempting to remove virtual "${A}" that does not exist.`);for(let A of F)if(delete this.paths[A],delete this.virtuals[A],A.indexOf(".")!==-1)kJ.unset(A,this.tree);else delete this.tree[A]}return this};i.prototype.loadClass=function(F,A){if(F===Object.prototype||F===Function.prototype||F.prototype.hasOwnProperty("$isMongooseModelPrototype")||F.prototype.hasOwnProperty("$isMongooseDocumentPrototype"))return this;if(this.loadClass(Object.getPrototypeOf(F),A),!A)Object.getOwnPropertyNames(F).forEach(function(B){if(B.match(/^(length|name|prototype|constructor|__proto__)$/))return;let D=Object.getOwnPropertyDescriptor(F,B);if(D.hasOwnProperty("value"))this.static(B,D.value)},this);return Object.getOwnPropertyNames(F.prototype).forEach(function(B){if(B.match(/^(constructor)$/))return;let D=Object.getOwnPropertyDescriptor(F.prototype,B);if(!A){if(typeof D.value==="function")this.method(B,D.value)}if(typeof D.get==="function"){if(this.virtuals[B])this.virtuals[B].getters=[];this.virtual(B).get(D.get)}if(typeof D.set==="function"){if(this.virtuals[B])this.virtuals[B].setters=[];this.virtual(B).set(D.set)}},this),this};/*!
671
+ * ignore
672
+ */i.prototype._getSchema=function(F){let A=this,B=A.path(F),D=[];if(B)return B.$fullPath=F,B;function J(Z,Y){let $=Z.length+1,G,E;while($--)if(E=Z.slice(0,$).join("."),G=Y.path(E),G){if(D.push(E),G.caster){if(G.caster instanceof S4.Mixed)return G.caster.$fullPath=D.join("."),G.caster;if($!==Z.length){if($+1===Z.length&&G.$embeddedSchemaType&&(Z[$]==="$"||OJ(Z[$])))return G.$embeddedSchemaType;if(G.schema){let H;if(Z[$]==="$"||OJ(Z[$])){if($+1===Z.length)return G.$embeddedSchemaType;if(H=J(Z.slice($+1),G.schema),H)H.$parentSchemaDocArray=H.$parentSchemaDocArray||(G.schema.$isSingleNested?null:G);return H}if(H=J(Z.slice($),G.schema),H)H.$parentSchemaDocArray=H.$parentSchemaDocArray||(G.schema.$isSingleNested?null:G);return H}}}else if(G.$isSchemaMap){if($>=Z.length)return G;if($+1>=Z.length)return G.$__schemaType;if(G.$__schemaType instanceof S4.Mixed)return G.$__schemaType;if(G.$__schemaType.schema!=null)return J(Z.slice($+1),G.$__schemaType.schema)}return G.$fullPath=D.join("."),G}}let X=F.split(".");for(let Z=0;Z<X.length;++Z){if(X[Z]==="$"||OJ(X[Z]))X[Z]="0";if(AH1.test(X[Z]))X[Z]="$"}return J(X,A)};/*!
673
+ * ignore
674
+ */i.prototype._getPathType=function(F){let A=this;if(A.path(F))return"real";function D(J,X){let Z=J.length+1,Y,$;while(Z--)if($=J.slice(0,Z).join("."),Y=X.path($),Y){if(Y.caster){if(Y.caster instanceof S4.Mixed)return{schema:Y,pathType:"mixed"};if(Z!==J.length&&Y.schema){if(J[Z]==="$"||OJ(J[Z])){if(Z===J.length-1)return{schema:Y,pathType:"nested"};return D(J.slice(Z+1),Y.schema)}return D(J.slice(Z),Y.schema)}return{schema:Y,pathType:Y.$isSingleNested?"nested":"array"}}return{schema:Y,pathType:"real"}}else if(Z===J.length&&X.nested[$])return{schema:X,pathType:"nested"};return{schema:Y||X,pathType:"undefined"}}return D(F.split("."),A)};i.prototype._transformDuplicateKeyError=function F(A){if(!this._duplicateKeyErrorMessagesByPath)return A;if(A.code!==11000&&A.code!==11001)return A;if(A.keyPattern!=null){let B=A.keyPattern,D=Object.keys(B);if(D.length!==1)return A;let J=D[0];if(!this._duplicateKeyErrorMessagesByPath.hasOwnProperty(J))return A;return new z3(this._duplicateKeyErrorMessagesByPath[J],{cause:A})}return A};/*!
675
+ * ignore
676
+ */function OJ(F){return F.startsWith("$[")&&F.endsWith("]")}i.prototype._preCompile=function F(){this.plugin(nE1,{deduplicate:!0})};/*!
677
+ * Module exports.
678
+ */yb.exports=HW=i;i.Types=S4=VF();/*!
679
+ * ignore
680
+ */HW.ObjectId=S4.ObjectId});var WW=K((_P1,vb)=>{/*!
681
+ * Module dependencies.
682
+ */var ZH1=_2();class qW extends ZH1{constructor(F,A,B,D){let J=F.map((X)=>X.message).join(", ");if(J.length>200)J=J.slice(0,200)+"...";super(`${D} failed with ${F.length} Mongoose validation errors: ${J}`);this.validationErrors=F,this.results=A,this.rawResult=B,this.operation=D}}Object.defineProperty(qW.prototype,"name",{value:"MongooseBulkWriteError"});/*!
683
+ * exports
684
+ */vb.exports=qW});var mb=K((gP1,hb)=>{/*!
685
+ * Module dependencies.
686
+ */var YH1=z1();class zW extends YH1{constructor(F,A){super(F);this.errors=A}}Object.defineProperty(zW.prototype,"name",{value:"SyncIndexesError"});hb.exports=zW});var CW=K((bP1,db)=>{db.exports=function F(A,B,D,J){if(A[J])return;if(A[J]=!0,!D||!D.skipTopLevel){let $=null;for(let G of B){let E=G[1]==null?null:G[1].tags;if(!Array.isArray(E)){A.plugin(G[0],G[1]);continue}if($=$||new Set(A.options.pluginTags||[]),!E.find((H)=>$.has(H)))continue;A.plugin(G[0],G[1])}}if(D=Object.assign({},D),delete D.skipTopLevel,D.applyPluginsToChildSchemas!==!1)for(let $ of Object.keys(A.paths)){let G=A.paths[$];if(G.schema!=null)F(G.schema,B,D,J),G.caster.prototype.$__setSchema(G.schema)}let X=A.discriminators;if(X==null)return;let Z=D.applyPluginsToDiscriminators,Y=Object.keys(X);for(let $ of Y){let G=X[$];F(G,B,{skipTopLevel:!Z},J)}}});var uJ=K(($H1,KW)=>{/*!
687
+ * ignore
688
+ */var cb=null;$H1.get=function(){return cb};$H1.set=function(F){cb=F}});var UW=K((yP1,lb)=>{function HH1(){return{result:{ok:1,writeErrors:[],writeConcernErrors:[],insertedIds:[],nInserted:0,nUpserted:0,nMatched:0,nModified:0,nRemoved:0,upserted:[]},insertedCount:0,matchedCount:0,modifiedCount:0,deletedCount:0,upsertedCount:0,upsertedIds:{},insertedIds:{},n:0}}lb.exports=HH1});var ib=K((vP1,pb)=>{var qH1=z1();class QW extends qH1{constructor(F,A){super(F);this.errors=A}}Object.defineProperty(QW.prototype,"name",{value:"CreateCollectionsError"});pb.exports=QW});var LW=K((hP1,sb)=>{var nb=F8().modifiedPaths;sb.exports=function F(A){let B=Object.keys(A),D={},J={};for(let X of B){if(X.startsWith("$")){nb(A[X],"",D);continue}J[X]=A[X]}return nb(J,"",D),D}});var VW=K((mP1,ab)=>{var WH1=LW();ab.exports=function F(A){if(A==null)return{};let B=WH1(A);return Object.keys(B).reduce((D,J)=>{let X=J.match(/\$\[[^\]]+\]/g);if(X==null)return D;for(let Z of X){let Y=J.indexOf(Z);if(Y!==J.lastIndexOf(Z))throw new Error(`Path '${J}' contains the same array filter multiple times`);D[Z.substring(2,Z.length-1)]=J.substring(0,Y-1).replace(/\$\[[^\]]+\]/g,"0")}return D},{})}});var ob=K((dP1,tb)=>{var zH1=zF(),rb=W0(),CH1=M6(),KH1=VW();tb.exports=function F(A,B,D,J,X){let Z=J.split("."),Y=null,$="adhocOrUndefined";D=D||{},B=B||{};let G=X!=null&&Array.isArray(X.arrayFilters)?X.arrayFilters:[],E=KH1(B);for(let H=0;H<Z.length;++H){let q=Z.slice(0,H+1).join("."),W=zH1(q);if(Y=A.path(W),Y==null)continue;if($=A.pathType(W),(Y.$isSingleNested||Y.$isMongooseDocumentArrayElement)&&Y.schema.discriminators!=null){let z=rb(Y,"schema.options.discriminatorKey"),C=W+"."+z,U=C.replace(/\.\d+\./,"."),Q=null;if(C in D)Q=D[C];if(U in D)Q=D[U];let L=W.replace(/\.\d+$/,"");if(Y.$isMongooseDocumentArrayElement&&rb(D[L],"$elemMatch."+z)!=null)Q=D[L].$elemMatch[z];let V=q+"."+z;if(V in B)Q=B[V];if(C in B)Q=B[C];for(let M of Object.keys(E)){let f=E[M]+"."+z,m=M+"."+z;if(f===U){let O=G.find((_)=>_.hasOwnProperty(m));if(O!=null)Q=O[m]}}if(Q==null)continue;let w=CH1(Y.caster.discriminators,Q),j=w&&w.schema;if(j==null)continue;let T=Z.slice(H+1).join(".");if(Y=j.path(T),Y!=null){$=j._getPathType(T);break}}}return{type:$,schematype:Y}}});var Fy=K((cP1,eb)=>{var UH1=N4();eb.exports=function F(A,B,D,J,X,Z,Y){if(A==null||!A.options||!A.options.immutable)return!1;let $=A.options.immutable;if(typeof $==="function")$=$.call(Y,Y);if(!$)return!1;if(Z&&Z.overwriteImmutable)return!1;if(B===!1)return!1;if(B==="throw")throw new UH1(null,`Field ${X} is immutable and strict = 'throw'`);return delete D[J],!0}});var Dy=K((lP1,By)=>{var QH1=W0();By.exports=function F(A,B,D){if(B==null)return;let J=Object.keys(B);for(let X of J){let Z=X.startsWith("$");if(X==="$set"){let Y=Object.keys(B[X]);for(let $ of Y)Ay(A,B[X],$,B,D)}else if(!Z)Ay(A,B,X,B,D)}};function Ay(F,A,B,D,J){let X=F.path(B);if(X==null)return;let Z=QH1(X,"options.immutable",null);if(Z==null)return;if(typeof Z==="function")Z=Z.call(J,J);if(!Z)return;D.$setOnInsert=D.$setOnInsert||{},D.$setOnInsert[B]=A[B],delete A[B]}});var wW=K((pP1,Jy)=>{var RW=W9();Jy.exports=function F(A,B,D){if(B.indexOf(".")===-1){if(RW.has(B))return;A[B]=D;return}let J=B.split("."),X=J.pop(),Z=A;for(let Y of J){if(RW.has(Y))continue;if(Z[Y]==null)Z[Y]={};Z=Z[Y]}if(!RW.has(X))Z[X]=D}});var TW=K((iP1,Wy)=>{var xJ=Y2(),uF=z1(),Xy=BW(),Zy=N4(),LH1=C9(),NW=UF(),VH1=I9(),RH1=I2(),Yy=M6(),IW=ob(),$y=Fy(),wH1=Dy(),Hy=U9().schemaMixedSymbol,IH1=wW(),xF=X1(),{internalToObjectOptions:NH1}=n6(),PW=new Set(["$currentDate","$inc","$min","$max","$mul","$rename","$set","$setOnInsert","$unset","$addToSet","$pop","$pull","$push","$pullAll","$bit"]);Wy.exports=function F(A,B,D,J,X){if(B==null)return;if(D=D||{},Array.isArray(B)){let H=B.length;for(let q=0;q<H;++q){let W=Object.keys(B[q]);for(let z of W)B[q][z]=PH1(z,B[q][z])}return B}if(A!=null&&X!=null&&xF.hasUserDefinedProperty(X,A.options.discriminatorKey)&&typeof X[A.options.discriminatorKey]!=="object"&&A.discriminators!=null){let H=X[A.options.discriminatorKey],q=Yy(J.model.discriminators,H);A=A.discriminators[H]||q&&q.schema||A}else if(A!=null&&D.overwriteDiscriminatorKey&&xF.hasUserDefinedProperty(B,A.options.discriminatorKey)&&A.discriminators!=null){let H=B[A.options.discriminatorKey],q=Yy(J.model.discriminators,H);A=A.discriminators[H]||q&&q.schema||A}if(D.upsert)wH1(A,B,J);let Z=Object.keys(B),Y=Z.length,$={},G,E=!1;X=X||{};while(Y--){let H=Z[Y];if(!PW.has(H)){if(!$.$set)if(B.$set)$.$set=B.$set;else $.$set={};if($.$set[H]=B[H],Z.splice(Y,1),!~Z.indexOf("$set"))Z.push("$set")}else if(H==="$set"){if(!$.$set)$[H]=B[H]}else $[H]=B[H]}Y=Z.length;while(Y--){let H=Z[Y];if(G=$[H],E=E||H.startsWith("$"),G!=null&&G.$__)G=G.toObject(NH1),$[H]=G;if(G&&typeof G==="object"&&!Buffer.isBuffer(G)&&PW.has(H))qy(A,G,H,D,J,X);else{let q="Invalid atomic update value for "+H+". Expected an object, received "+typeof G;throw new Error(q)}if(H.startsWith("$")&&xF.isEmptyObject(G))delete $[H]}if(Object.keys($).length===0&&D.upsert&&Object.keys(X).length>0)return{$setOnInsert:{...X}};return $};/*!
689
+ * ignore
690
+ */function PH1(F,A){if(F==="$unset"){if(typeof A!=="string"&&(!Array.isArray(A)||A.find((B)=>typeof B!=="string")))throw new uF("Invalid $unset in pipeline, must be a string or an array of strings");return A}if(F==="$project"){if(A==null||typeof A!=="object")throw new uF("Invalid $project in pipeline, must be an object");return A}if(F==="$addFields"||F==="$set"){if(A==null||typeof A!=="object")throw new uF("Invalid "+F+" in pipeline, must be an object");return A}else if(F==="$replaceRoot"||F==="$replaceWith"){if(A==null||typeof A!=="object")throw new uF("Invalid "+F+" in pipeline, must be an object");return A}throw new uF('Invalid update pipeline operator: "'+F+'"')}function qy(F,A,B,D,J,X,Z){let Y=D.strict,$=Z?Z+".":"",G=Object.keys(A),E=G.length,H=!1,q,W,z,C=null,U=Y!=null?Y:F.options.strict;while(E--){if(W=G[E],z=A[W],B==="$pull"){if(q=F._getSchema($+W),q==null){let L=IW(F,A,X,$+W,D);if(L.schematype!=null)q=L.schematype}if(q!=null&&q.schema!=null){A[W]=VH1(q.schema,A[W],D,J),H=!0;continue}}let Q=$?$+W:W;if(F.discriminatorMapping!=null&&Q===F.options.discriminatorKey&&F.discriminatorMapping.value!==A[W]&&!D.overwriteDiscriminatorKey){if(U==="throw"){let L=new Error(`Can't modify discriminator key "`+Q+'" on discriminator model');C=M9(L,J,Q,C);continue}else if(U){delete A[W];continue}}if(RH1(z)==="Object"){if(q=F._getSchema($+W),q==null){let L=IW(F,A,X,$+W,D);if(L.schematype!=null)q=L.schematype}if(B!=="$setOnInsert"&&$y(q,Y,A,W,$+W,D,J))continue;if(q&&q.caster&&B in MW)if("$each"in z){H=!0;try{A[W]={$each:Q8(q,z.$each,B,W,J,$+W)}}catch(L){C=M9(L,J,W,C)}if(z.$slice!=null)A[W].$slice=z.$slice|0;if(z.$sort)A[W].$sort=z.$sort;if(z.$position!=null)A[W].$position=NW(z.$position)}else{if(q!=null&&q.$isSingleNested){let L=Y==null?q.schema.options.strict:Y;try{A[W]=q.castForQuery(null,z,J,{strict:L})}catch(V){C=M9(V,J,W,C)}}else try{A[W]=Q8(q,z,B,W,J,$+W)}catch(L){C=M9(L,J,W,C)}if(A[W]===void 0){delete A[W];continue}H=!0}else if(B==="$currentDate"||B in MW&&q){try{A[W]=Q8(q,z,B,W,J,$+W)}catch(L){C=M9(L,J,W,C)}if(A[W]===void 0){delete A[W];continue}H=!0}else if(B==="$rename"){let L=new Xy(`${$}${W}.$rename`);try{A[W]=Q8(L,z,B,W,J,$+W)}catch(V){C=M9(V,J,W,C)}if(A[W]===void 0){delete A[W];continue}H=!0}else{let L=$+W,V=F._getPathType(L),w=Y;if(V&&V.schema&&w==null)w=V.schema.options.strict;if(V.pathType==="undefined"){if(w==="throw")throw new Zy(L);else if(w){delete A[W];continue}}H|=qy(F,z,B,D,J,X,$+W)||xF.isObject(z)&&Object.keys(z).length===0}}else{let L=W==="$each"||W==="$or"||W==="$and"||W==="$in"?Z:$+W;if(q=F._getSchema(L),B!=="$setOnInsert"&&$y(q,Y,A,W,$+W,D,J))continue;let V=F._getPathType(L);if(q==null){let T=IW(F,A,X,L,D);if(T.schematype!=null)q=T.schematype,V=T.type}let w=Y;if(V&&V.schema&&Y==null)w=V.schema.options.strict;if(w&&!q&&!/real|nested/.test(V.pathType))if(w==="throw"&&F.virtuals[L]==null)throw new Zy($+W);else delete A[W];else{if(B==="$rename"){if(A[W]==null)throw new xJ("String",A[W],`${$}${W}.$rename`);let T=new Xy(`${$}${W}.$rename`);A[W]=T.castForQuery(null,A[W],J);continue}try{if($.length===0||W.indexOf(".")===-1)A[W]=Q8(q,z,B,W,J,$+W);else if(w!==!1||q!=null)IH1(A,W,Q8(q,z,B,W,J,$+W)),delete A[W]}catch(T){C=M9(T,J,W,C)}if(Array.isArray(A[W])&&(B==="$addToSet"||B==="$push")&&W!=="$each"){if(q&&q.caster&&!q.caster.$isMongooseArray&&!q.caster[Hy])A[W]={$each:A[W]}}if(A[W]===void 0){delete A[W];continue}H=!0}}}if(C!=null)throw C;return H}/*!
691
+ * ignore
692
+ */function M9(F,A,B,D){if(typeof A!=="object"||!A.options.multipleCastError)throw F;return D=D||new LH1,D.addError(B,F),D}var Gy={$pop:1,$inc:1},MH1={$unset:1},MW={$push:1,$addToSet:1,$set:1,$setOnInsert:1};/*!
693
+ * ignore
694
+ */var Ey={$set:1,$setOnInsert:1};function Q8(F,A,B,D,J,X){if(!F){if(B in Gy)try{return NW(A)}catch(Y){throw new xJ("number",A,X)}return A}if(F.caster&&B in MW&&(xF.isObject(A)||Array.isArray(A))&&!Ey[B]){let Y=0,$=F;while($.$isMongooseArray)++Y,$=$.caster;let G=0,E=A;while(Array.isArray(E))++G,E=E[0];let H=Y-G;while(G<Y)A=[A],++G;let q=F.applySetters(Array.isArray(A)?A:[A],J);for(let W=0;W<H;++W)q=q[0];return q}if(B in MH1)return A;if(B in Gy){if(A==null)throw new xJ("number",A,F.path);if(B==="$inc")return F.castForQuery(null,A,J);try{return NW(A)}catch(Y){throw new xJ("number",A,F.path)}}if(B==="$currentDate"){if(typeof A==="object")return{$type:A.$type};return Boolean(A)}if(PW.has(D))return F.castForQuery(D,A,J);if(Ey[B]){let Y=A!=null&&F.$isMongooseArray&&F.$fullPath!=null&&!F.$fullPath.match(/\d+$/),$=F[Hy]!=null;if(Y||$)return F.applySetters(A,J);return F.castForQuery(null,A,J)}return F.castForQuery(null,A,J)}});var jW=K((nP1,zy)=>{var TH1=LW();zy.exports=function F(A,B,D){if(!D||!(B&&B.upsert))return;if(!TH1(A)[D])if(B.overwrite)A[D]=0;else{if(!A.$setOnInsert)A.$setOnInsert={};A.$setOnInsert[D]=0}}});var kW=K((sP1,Ky)=>{var Cy=F8().modifiedPaths,jH1=W0();Ky.exports=function(F,A,B,D){D=D||{};let J=D.setDefaultsOnInsert!=null?D.setDefaultsOnInsert:A.base.options.setDefaultsOnInsert;if(!D.upsert||J===!1)return B;let X=Object.keys(B||{}),Z={},Y={},$=X.length,G={},E=!1;for(let W=0;W<$;++W)if(X[W].startsWith("$"))Cy(B[X[W]],"",G),E=!0;if(!E)Cy(B,"",G);let H=Object.keys(F),q=H.length;for(let W=0;W<q;++W){let z=H[W],C=F[z];if(C&&typeof C==="object"){let U=Object.keys(C),Q=U.length,L=!1;for(let V=0;V<Q;++V)if(U[V].startsWith("$")){L=!0;break}if(L)continue}Z[z]=!0,G[z]=!0}if(D&&D.overwrite&&!E)return B;return A.eachPath(function(W,z){if(z.path==="_id"&&z.options.auto)return;let C=z.getDefault(null,!0);if(kH1(G,W))return;if(typeof C==="undefined")return;if(z.splitPath().includes("$*"))return;if(B=B||{},B.$setOnInsert=B.$setOnInsert||{},jH1(B,W)==null)B.$setOnInsert[W]=C;Y[W]=C}),B};function kH1(F,A){if(F[A])return!0;let B=A.split("."),D=B[0];for(let X=1;X<B.length;++X){if(F[D])return!0;D+="."+B[X]}let J=Object.keys(F);if(J.length){let X=A+".";for(let Z of J)if(Z.slice(0,A.length+1)===X)return!0}return!1}});var OW=K((aP1,R0)=>{var OH1=z1(),SH1=M6(),Uy=$q(),Qy=Gq(),fF=I9(),Ly=TW(),uH1=Z0(),Vy=jW(),{inspect:xH1}=import.meta.require("util"),Ry=kW();R0.exports=function F(A,B,D){let J=A.base.now();if(B.insertOne)return(X)=>R0.exports.castInsertOne(A,B.insertOne,D).then(()=>X(null),(Z)=>X(Z));else if(B.updateOne)return(X)=>{try{R0.exports.castUpdateOne(A,B.updateOne,D,J),X(null)}catch(Z){X(Z)}};else if(B.updateMany)return(X)=>{try{R0.exports.castUpdateMany(A,B.updateMany,D,J),X(null)}catch(Z){X(Z)}};else if(B.replaceOne)return(X)=>{R0.exports.castReplaceOne(A,B.replaceOne,D).then(()=>X(null),(Z)=>X(Z))};else if(B.deleteOne)return(X)=>{try{R0.exports.castDeleteOne(A,B.deleteOne),X(null)}catch(Z){X(Z)}};else if(B.deleteMany)return(X)=>{try{R0.exports.castDeleteMany(A,B.deleteMany),X(null)}catch(Z){X(Z)}};else return(X)=>{let Z=new OH1(`Invalid op passed to \`bulkWrite()\`: ${xH1(B)}`);X(Z,null)}};R0.exports.castInsertOne=async function F(A,B,D){let J=L8(A,B.document),X=new J(B.document);if(J.schema.options.timestamps&&fJ(B,D))X.initializeTimestamps();if(D.session!=null)X.$session(D.session);let Z=J?.schema?.options?.versionKey;if(Z&&X[Z]==null)X[Z]=0;if(B.document=X,D.skipValidation||B.skipValidation)return B;return await B.document.$validate(),B};R0.exports.castUpdateOne=function F(A,B,D,J){if(!B.filter)throw new Error("Must provide a filter object.");if(!B.update)throw new Error("Must provide an update object.");let X=L8(A,B.filter),Z=X.schema,Y=D.strict!=null?D.strict:X.schema.options.strict,$=uH1(B.update);_F(Z,B.filter);let G=fJ(B,D);if(X.schema.$timestamps!=null&&G){let q=X.schema.$timestamps.createdAt,W=X.schema.$timestamps.updatedAt;Qy(J,q,W,$,{})}if(G)Uy(J,$,X.schema);let E=A.base.options.setDefaultsOnInsert;if((B.setDefaultsOnInsert==null?E:B.setDefaultsOnInsert)!==!1)Ry(B.filter,X.schema,$,{setDefaultsOnInsert:!0,upsert:B.upsert});return Vy($,B,X.schema.options.versionKey),B.filter=fF(X.schema,B.filter,{strict:Y,upsert:B.upsert}),B.update=Ly(X.schema,$,{strict:Y,upsert:B.upsert,arrayFilters:B.arrayFilters,overwriteDiscriminatorKey:B.overwriteDiscriminatorKey},X,B.filter),B};R0.exports.castUpdateMany=function F(A,B,D,J){if(!B.filter)throw new Error("Must provide a filter object.");if(!B.update)throw new Error("Must provide an update object.");let X=L8(A,B.filter),Z=X.schema,Y=D.strict!=null?D.strict:X.schema.options.strict,$=A.base.options.setDefaultsOnInsert;if((B.setDefaultsOnInsert==null?$:B.setDefaultsOnInsert)!==!1)Ry(B.filter,X.schema,B.update,{setDefaultsOnInsert:!0,upsert:B.upsert});let E=fJ(B,D);if(X.schema.$timestamps!=null&&E){let H=X.schema.$timestamps.createdAt,q=X.schema.$timestamps.updatedAt;Qy(J,H,q,B.update,{})}if(E)Uy(J,B.update,X.schema);_F(Z,B.filter),Vy(B.update,B,X.schema.options.versionKey),B.filter=fF(X.schema,B.filter,{strict:Y,upsert:B.upsert}),B.update=Ly(X.schema,B.update,{strict:Y,upsert:B.upsert,arrayFilters:B.arrayFilters,overwriteDiscriminatorKey:B.overwriteDiscriminatorKey},X,B.filter)};R0.exports.castReplaceOne=async function F(A,B,D){let J=L8(A,B.filter),X=J.schema,Z=D.strict!=null?D.strict:J.schema.options.strict;_F(X,B.filter),B.filter=fF(J.schema,B.filter,{strict:Z,upsert:B.upsert});let Y=new J(B.replacement,Z,!0);if(J.schema.options.timestamps&&fJ(B,D))Y.initializeTimestamps();if(D.session!=null)Y.$session(D.session);let $=J?.schema?.options?.versionKey;if($&&Y[$]==null)Y[$]=0;if(B.replacement=Y,D.skipValidation||B.skipValidation){B.replacement=B.replacement.toBSON();return}await B.replacement.$validate(),B.replacement=B.replacement.toBSON()};R0.exports.castDeleteOne=function F(A,B){let D=L8(A,B.filter),J=D.schema;_F(J,B.filter),B.filter=fF(D.schema,B.filter)};R0.exports.castDeleteMany=function F(A,B){let D=L8(A,B.filter),J=D.schema;_F(J,B.filter),B.filter=fF(D.schema,B.filter)};R0.exports.cast={insertOne:R0.exports.castInsertOne,updateOne:R0.exports.castUpdateOne,updateMany:R0.exports.castUpdateMany,replaceOne:R0.exports.castReplaceOne,deleteOne:R0.exports.castDeleteOne,deleteMany:R0.exports.castDeleteMany};function _F(F,A){if(F==null)return;if(F.discriminatorMapping&&!F.discriminatorMapping.isRoot)A[F.discriminatorMapping.key]=F.discriminatorMapping.value}function L8(F,A){let B=F.schema.options.discriminatorKey;if(A!=null&&A.hasOwnProperty(B))F=SH1(F.discriminators,A[B])||F;return F}function fJ(F,A){let B=F.timestamps,D=A.timestamps;if(B!=null)return B;else if(D!=null)return D;return!0}});var My=K((rP1,Py)=>{/*!
695
+ * Module dependencies.
696
+ */var fH1=yE(),SW=import.meta.require("events").EventEmitter,_H1=J8(),I0=u9(),wy=WW(),w0=_2(),gH1=eE(),bH1=mb(),yH1=CW(),vH1=Z0(),hH1=uJ(),mH1=W0(),dH1=UW(),Iy=Z6(),uW=X1(),cH1=ib(),_J=OW(),{modelSymbol:gJ}=t(),lH1=RH(),pH1=t().arrayAtomicsSymbol,gF=t().sessionNewDocuments,iH1=["MONGODB-X509"];function F1(F){if(this.base=F,this.collections={},this.models={},this.config={},this.replica=!1,this.options=null,this.otherDbs=[],this.relatedDbs={},this.states=I0,this._readyState=I0.disconnected,this._closeCalled=!1,this._hasOpened=!1,this.plugins=[],typeof F==="undefined"||!F.connections.length)this.id=0;else this.id=F.nextConnectionId;this._queue=[]}/*!
697
+ * Inherit from EventEmitter
698
+ */Object.setPrototypeOf(F1.prototype,SW.prototype);Object.defineProperty(F1.prototype,"readyState",{get:function(){if(this._readyState===I0.connected&&this._lastHeartbeatAt!=null&&this.client?.topology?.s?.description?.type!=="LoadBalanced"&&typeof this.client?.topology?.s?.description?.heartbeatFrequencyMS==="number"&&Date.now()-this._lastHeartbeatAt>=this.client.topology.s.description.heartbeatFrequencyMS*2)return I0.disconnected;return this._readyState},set:function(F){if(!(F in I0))throw new Error("Invalid connection state: "+F);if(this._readyState!==F){this._readyState=F;for(let A of this.otherDbs)A.readyState=F;if(I0.connected===F)this._hasOpened=!0;this.emit(I0[F])}}});F1.prototype.get=function F(A){if(this.config.hasOwnProperty(A))return this.config[A];return mH1(this.options,A)};F1.prototype.set=function F(A,B){if(this.config.hasOwnProperty(A))return this.config[A]=B,B;return this.options=this.options||{},this.options[A]=B,B};F1.prototype.collections;F1.prototype.name;F1.prototype.models;F1.prototype.id;Object.defineProperty(F1.prototype,"plugins",{configurable:!1,enumerable:!0,writable:!0});Object.defineProperty(F1.prototype,"host",{configurable:!0,enumerable:!0,writable:!0});Object.defineProperty(F1.prototype,"port",{configurable:!0,enumerable:!0,writable:!0});Object.defineProperty(F1.prototype,"user",{configurable:!0,enumerable:!0,writable:!0});Object.defineProperty(F1.prototype,"pass",{configurable:!0,enumerable:!0,writable:!0});F1.prototype.db;F1.prototype.client;F1.prototype.config;F1.prototype.createCollection=async function F(A,B){if(typeof B==="function"||arguments.length>=3&&typeof arguments[2]==="function")throw new w0("Connection.prototype.createCollection() no longer accepts a callback");return await this._waitForConnect(),this.db.createCollection(A,B)};F1.prototype.bulkWrite=async function F(A,B){await this._waitForConnect(),B=B||{};let D=B.ordered==null?!0:B.ordered,J=this.base.transactionAsyncLocalStorage?.getStore();if((!B||!B.hasOwnProperty("session"))&&J?.session!=null)B={...B,session:J.session};let X=this.base.now(),Z=null;if(D){let Y=[];for(let $ of A){if(typeof $.model!=="string"&&!$.model?.[gJ])throw new w0("Must specify model in Connection.prototype.bulkWrite() operations");let G=$.model[gJ]?$.model:this.model($.model);if($.name==null)throw new w0("Must specify operation name in Connection.prototype.bulkWrite()");if(!_J.cast.hasOwnProperty($.name))throw new w0(`Unrecognized bulkWrite() operation name ${$.name}`);await _J.cast[$.name](G,$,B,X),Y.push({...$,namespace:G.namespace()})}Z=await this.client.bulkWrite(Y,B)}else{let Y=[],$=[],G=[],E=[],H=[];for(let W=0;W<A.length;++W){let z=A[W];if(typeof z.model!=="string"&&!z.model?.[gJ]){let Q=new w0("Must specify model in Connection.prototype.bulkWrite() operations");G.push({index:W,error:Q}),H[W]=Q;continue}let C;try{C=z.model[gJ]?z.model:this.model(z.model)}catch(Q){G.push({index:W,error:Q});continue}if(z.name==null){let Q=new w0("Must specify operation name in Connection.prototype.bulkWrite()");G.push({index:W,error:Q}),H[W]=Q;continue}if(!_J.cast.hasOwnProperty(z.name)){let Q=new w0(`Unrecognized bulkWrite() operation name ${z.name}`);G.push({index:W,error:Q}),H[W]=Q;continue}let U=null;try{U=_J.cast[z.name](C,z,B,X)}catch(Q){G.push({index:W,error:Q}),H[W]=Q;continue}if(lH1(U))E.push(U.then(()=>{Y.push({...z,namespace:C.namespace()}),$.push(W)},(Q)=>{G.push({index:W,error:Q}),H[W]=Q}));else Y.push({...z,namespace:C.namespace()}),$.push(W)}if(E.length>0)await Promise.all(E);if(G=G.sort((W,z)=>W.index-z.index).map((W)=>W.error),Y.length===0){if(B.throwOnValidationError&&G.length)throw new wy(G,H,Z,"bulkWrite");return dH1()}let q;if([Z,q]=await this.client.bulkWrite(Y,B).then((W)=>[W,null]).catch((W)=>[null,W]),q){if(G.length>0)q.mongoose=q.mongoose||{},q.mongoose.validationErrors=G}for(let W=0;W<$.length;++W)H[$[W]]=null;if(G.length>0)if(B.throwOnValidationError)throw new wy(G,H,Z,"bulkWrite");else Z.mongoose=Z.mongoose||{},Z.mongoose.validationErrors=G,Z.mongoose.results=H}return Z};F1.prototype.createCollections=async function F(A={}){let B={},D={},{continueOnError:J}=A;delete A.continueOnError;for(let X of Object.values(this.models))try{B[X.modelName]=await X.createCollection({})}catch(Z){if(!J){D[X.modelName]=Z;break}else B[X.modelName]=Z}if(!J&&Object.keys(D).length){let X=Object.entries(D).map(([Y,$])=>`${Y}: ${$.message}`).join(", ");throw new cH1(X,D)}return B};F1.prototype.withSession=async function F(A){if(arguments.length===0)throw new Error("Please provide an executor function");return await this.client.withSession(A)};F1.prototype.startSession=async function F(A){if(arguments.length>=2&&typeof arguments[1]==="function")throw new w0("Connection.prototype.startSession() no longer accepts a callback");return await this._waitForConnect(),this.client.startSession(A)};F1.prototype.transaction=function F(A,B){return this.startSession().then((D)=>{return D[gF]=new Map,D.withTransaction(()=>nH1(A,D,this.base),B).then((J)=>{return delete D[gF],J}).catch((J)=>{throw delete D[gF],J}).finally(()=>{D.endSession().catch(()=>{})})})};/*!
699
+ * Reset document state in between transaction retries re: gh-13698
700
+ */async function nH1(F,A,B){try{return B.transactionAsyncLocalStorage==null?await F(A):await new Promise((J)=>{B.transactionAsyncLocalStorage.run({session:A},()=>J(F(A)))})}catch(D){throw sH1(A),D}}/*!
701
+ * If transaction was aborted, we need to reset newly inserted documents' `isNew`.
702
+ */function sH1(F){for(let A of F[gF].keys()){let B=F[gF].get(A);if(B.hasOwnProperty("isNew"))A.$isNew=B.isNew;if(B.hasOwnProperty("versionKey"))A.set(A.schema.options.versionKey,B.versionKey);if(B.modifiedPaths.length>0&&A.$__.activePaths.states.modify==null)A.$__.activePaths.states.modify={};for(let D of B.modifiedPaths){let J=A.$__.activePaths.paths[D];if(J!=null)delete A.$__.activePaths[J][D];A.$__.activePaths.paths[D]="modify",A.$__.activePaths.states.modify[D]=!0}for(let D of B.atomics.keys()){let J=A.$__getValue(D);if(J==null)continue;J[pH1]=B.atomics.get(D)}}}F1.prototype.dropCollection=async function F(A){if(arguments.length>=2&&typeof arguments[1]==="function")throw new w0("Connection.prototype.dropCollection() no longer accepts a callback");return await this._waitForConnect(),this.db.dropCollection(A)};F1.prototype._waitForConnect=async function F(){if((this.readyState===I0.connecting||this.readyState===I0.disconnected)&&this._shouldBufferCommands())await new Promise((A)=>{this._queue.push({fn:A})})};F1.prototype.listCollections=async function F(){return await this._waitForConnect(),await this.db.listCollections().toArray()};F1.prototype.listDatabases=async function F(){throw new w0("listDatabases() not implemented by driver")};F1.prototype.dropDatabase=async function F(){if(arguments.length>=1&&typeof arguments[0]==="function")throw new w0("Connection.prototype.dropDatabase() no longer accepts a callback");await this._waitForConnect();for(let A of Object.values(this.models))delete A.$init;return this.db.dropDatabase()};/*!
703
+ * ignore
704
+ */F1.prototype._shouldBufferCommands=function F(){if(this.config.bufferCommands!=null)return this.config.bufferCommands;if(this.base.get("bufferCommands")!=null)return this.base.get("bufferCommands");return!0};F1.prototype.error=function F(A,B){if(B)return B(A),null;if(this.listeners("error").length>0)this.emit("error",A);return Promise.reject(A)};F1.prototype.onOpen=function(){this.readyState=I0.connected;for(let F of this._queue)F.fn.apply(F.ctx,F.args);this._queue=[];for(let F in this.collections)if(uW.object.hasOwnProperty(this.collections,F))this.collections[F].onOpen();this.emit("open")};F1.prototype.openUri=async function F(A,B){if(this.readyState===I0.connecting||this.readyState===I0.connected){if(this._connectionString===A)return this}this._closeCalled=!1;let D=!1;if(B&&"_fireAndForget"in B)D=B._fireAndForget,delete B._fireAndForget;try{aH1.apply(arguments)}catch(J){if(D)throw J;throw this.$initialConnection=Promise.reject(J),J}this.$initialConnection=this.createClient(A,B).then(()=>this).catch((J)=>{if(this.readyState=I0.disconnected,this.listeners("error").length>0)Iy(()=>this.emit("error",J));throw J});for(let J of Object.values(this.models))J.init().catch(function X(){});if(D)return this;try{await this.$initialConnection}catch(J){throw Ny(J)}return this};F1.prototype.on=function F(A,B){if(A==="error"&&this.$initialConnection)this.$initialConnection.catch(()=>{});return SW.prototype.on.call(this,A,B)};F1.prototype.once=function F(A,B){if(A==="error"&&this.$initialConnection)this.$initialConnection.catch(()=>{});return SW.prototype.once.call(this,A,B)};/*!
705
+ * ignore
706
+ */function aH1(F,A,B){if(typeof A==="function"&&B==null)throw new w0("Connection.prototype.openUri() no longer accepts a callback");else if(typeof B==="function")throw new w0("Connection.prototype.openUri() no longer accepts a callback")}/*!
707
+ * ignore
708
+ */function Ny(F){if(F?.name==="MongoServerSelectionError"){let A=F;F=new gH1,F.assimilateError(A)}return F}F1.prototype.destroy=async function F(A){if(typeof A==="function"||arguments.length===2&&typeof arguments[1]==="function")throw new w0("Connection.prototype.destroy() no longer accepts a callback");if(A!=null&&typeof A==="object")this.$wasForceClosed=!!A.force;else this.$wasForceClosed=!!A;return this._close(A,!0)};F1.prototype.close=async function F(A){if(typeof A==="function"||arguments.length===2&&typeof arguments[1]==="function")throw new w0("Connection.prototype.close() no longer accepts a callback");if(A!=null&&typeof A==="object")this.$wasForceClosed=!!A.force;else this.$wasForceClosed=!!A;for(let B of Object.values(this.models))delete B.$init;return this._close(A,!1)};F1.prototype._close=async function F(A,B){let D=this,J=this._closeCalled;if(this._closeCalled=!0,this._destroyCalled=B,this.client!=null)this.client._closeCalled=!0,this.client._destroyCalled=B;let X=this;switch(this.readyState){case I0.disconnected:if(B&&this.base.connections.indexOf(X)!==-1)this.base.connections.splice(this.base.connections.indexOf(X),1);if(!J)await this.doClose(A),this.onClose(A);break;case I0.connected:if(this.readyState=I0.disconnecting,await this.doClose(A),B&&D.base.connections.indexOf(X)!==-1)this.base.connections.splice(this.base.connections.indexOf(X),1);this.onClose(A);break;case I0.connecting:return new Promise((Z,Y)=>{let $=()=>{if(this.removeListener("open",$),this.removeListener("error",$),B)this.destroy(A).then(Z,Y);else this.close(A).then(Z,Y)};this.once("open",$),this.once("error",$)});case I0.disconnecting:return new Promise((Z)=>{this.once("close",()=>{if(B&&this.base.connections.indexOf(X)!==-1)this.base.connections.splice(this.base.connections.indexOf(X),1);Z()})})}return this};F1.prototype.doClose=function F(){throw new Error("Connection#doClose unimplemented by driver")};F1.prototype.onClose=function F(A){this.readyState=I0.disconnected;for(let B in this.collections)if(uW.object.hasOwnProperty(this.collections,B))this.collections[B].onClose(A);this.emit("close",A);for(let B of this.otherDbs)this._destroyCalled?B.destroy({force:A,skipCloseClient:!0}):B.close({force:A,skipCloseClient:!0})};F1.prototype.collection=function(F,A){let B={autoIndex:this.config.autoIndex!=null?this.config.autoIndex:this.base.options.autoIndex,autoCreate:this.config.autoCreate!=null?this.config.autoCreate:this.base.options.autoCreate,autoSearchIndex:this.config.autoSearchIndex!=null?this.config.autoSearchIndex:this.base.options.autoSearchIndex};A=Object.assign({},B,A?vH1(A):{}),A.$wasForceClosed=this.$wasForceClosed;let D=this.base&&this.base.__driver&&this.base.__driver.Collection||hH1.get().Collection;if(!(F in this.collections))this.collections[F]=new D(F,this,A);return this.collections[F]};F1.prototype.plugin=function(F,A){return this.plugins.push([F,A]),this};F1.prototype.model=function F(A,B,D,J){if(!(this instanceof F1))throw new w0("`connection.model()` should not be run with `new`. If you are doing `new db.model(foo)(bar)`, use `db.model(foo)(bar)` instead");let X;if(typeof A==="function")X=A,A=X.name;if(typeof B==="string")D=B,B=!1;if(uW.isObject(B)){if(!B.instanceOfSchema)B=new _H1(B);else if(!(B instanceof this.base.Schema))B=B._clone(this.base.Schema)}if(B&&!B.instanceOfSchema)throw new Error("The 2nd parameter to `mongoose.model()` should be a schema or a POJO");let Z={cache:!1,overwriteModels:this.base.options.overwriteModels},Y=Object.assign(Z,J,{connection:this});if(this.models[A]&&!D&&Y.overwriteModels!==!0){if(B&&B.instanceOfSchema&&B!==this.models[A].schema)throw new w0.OverwriteModelError(A);return this.models[A]}let $;if(B&&B.instanceOfSchema){if(yH1(B,this.plugins,null,"$connectionPluginsApplied"),$=this.base._model(X||A,B,D,Y),!this.models[A])this.models[A]=$;return $.init().catch(function G(){}),$}if(this.models[A]&&D)return $=this.models[A],B=$.prototype.schema,$.__subclass(this,B,D);if(arguments.length===1){if($=this.models[A],!$)throw new w0.MissingSchemaError(A);return $}if(!$)throw new w0.MissingSchemaError(A);if(this===$.prototype.db&&(!D||D===$.collection.name)){if(!this.models[A])this.models[A]=$;return $}return this.models[A]=$.__subclass(this,B,D),this.models[A]};F1.prototype.deleteModel=function F(A){if(typeof A==="string"){let B=this.model(A);if(B==null)return this;let D=B.collection.name;delete this.models[A],delete this.collections[D],this.emit("deleteModel",B)}else if(A instanceof RegExp){let B=A,D=this.modelNames();for(let J of D)if(B.test(J))this.deleteModel(J)}else throw new Error('First parameter to `deleteModel()` must be a string or regexp, got "'+A+'"');return this};F1.prototype.watch=function F(A,B){return new fH1((X)=>{Iy(()=>{if(this.readyState===I0.connecting)this.once("open",function(){let Z=this.db.watch(A,B);X(null,Z)});else{let Z=this.db.watch(A,B);X(null,Z)}})},A,B)};F1.prototype.asPromise=async function F(){try{return await this.$initialConnection,this}catch(A){throw Ny(A)}};F1.prototype.modelNames=function F(){return Object.keys(this.models)};F1.prototype.shouldAuthenticate=function F(){return this.user!=null&&(this.pass!=null||this.authMechanismDoesNotRequirePassword())};F1.prototype.authMechanismDoesNotRequirePassword=function F(){if(this.options&&this.options.auth)return iH1.indexOf(this.options.auth.authMechanism)>=0;return!0};F1.prototype.optionsProvideAuthenticationData=function F(A){return A&&A.user&&(A.pass||this.authMechanismDoesNotRequirePassword())};F1.prototype.getClient=function F(){return this.client};F1.prototype.setClient=function F(){throw new w0("Connection#setClient not implemented by driver")};/*!
709
+ * Called internally by `openUri()` to create a MongoClient instance.
710
+ */F1.prototype.createClient=function F(){throw new w0("Connection#createClient not implemented by driver")};F1.prototype.syncIndexes=async function F(A={}){let B={},D={},{continueOnError:J}=A;delete A.continueOnError;for(let X of Object.values(this.models))try{B[X.modelName]=await X.syncIndexes(A)}catch(Z){if(!J){D[X.modelName]=Z;break}else B[X.modelName]=Z}if(!J&&Object.keys(D).length){let X=Object.entries(D).map(([Y,$])=>`${Y}: ${$.message}`).join(", ");throw new bH1(X,D)}return B};/*!
711
+ * Module exports.
712
+ */F1.STATES=I0;Py.exports=F1});var xW=K((tP1,rH1)=>{rH1.exports={name:"mongoose",description:"Mongoose MongoDB ODM",version:"8.9.2",author:"Guillermo Rauch <guillermo@learnboost.com>",keywords:["mongodb","document","model","schema","database","odm","data","datastore","query","nosql","orm","db"],license:"MIT",dependencies:{bson:"^6.10.1",kareem:"2.6.3",mongodb:"~6.12.0",mpath:"0.9.0",mquery:"5.0.0",ms:"2.1.3",sift:"17.1.3"},devDependencies:{"@babel/core":"7.26.0","@babel/preset-env":"7.26.0","@typescript-eslint/eslint-plugin":"^8.18.0","@typescript-eslint/parser":"^8.18.0",acquit:"1.3.0","acquit-ignore":"0.2.1","acquit-require":"0.1.1","assert-browserify":"2.0.0",axios:"1.1.3","babel-loader":"8.2.5","broken-link-checker":"^0.7.8",buffer:"^5.6.0",cheerio:"1.0.0","crypto-browserify":"3.12.1",dotenv:"16.4.5",dox:"1.0.0",eslint:"8.57.0","eslint-plugin-markdown":"^5.0.0","eslint-plugin-mocha-no-only":"1.2.0",express:"^4.19.2","fs-extra":"~11.2.0","highlight.js":"11.10.0","lodash.isequal":"4.5.0","lodash.isequalwith":"4.4.0","markdownlint-cli2":"^0.15.0",marked:"15.0.3",mkdirp:"^3.0.1",mocha:"10.8.2",moment:"2.30.1","mongodb-memory-server":"10.1.2",ncp:"^2.0.0",nyc:"15.1.0",pug:"3.0.3",q:"1.5.1",sinon:"19.0.2","stream-browserify":"3.0.0",tsd:"0.31.2",typescript:"5.7.2",uuid:"11.0.3",webpack:"5.96.1"},directories:{lib:"./lib/mongoose"},scripts:{"docs:clean":"npm run docs:clean:stable","docs:clean:stable":"rimraf index.html && rimraf -rf ./docs/*.html && rimraf -rf ./docs/api && rimraf -rf ./docs/tutorials/*.html && rimraf -rf ./docs/typescript/*.html && rimraf -rf ./docs/*.html && rimraf -rf ./docs/source/_docs && rimraf -rf ./tmp","docs:clean:5x":"rimraf index.html && rimraf -rf ./docs/5.x && rimraf -rf ./docs/source/_docs && rimraf -rf ./tmp","docs:clean:6x":"rimraf index.html && rimraf -rf ./docs/6.x && rimraf -rf ./docs/source/_docs && rimraf -rf ./tmp","docs:copy:tmp":"mkdirp ./tmp/docs/css && mkdirp ./tmp/docs/js && mkdirp ./tmp/docs/images && mkdirp ./tmp/docs/tutorials && mkdirp ./tmp/docs/typescript && mkdirp ./tmp/docs/api && ncp ./docs/css ./tmp/docs/css --filter=.css$ && ncp ./docs/js ./tmp/docs/js --filter=.js$ && ncp ./docs/images ./tmp/docs/images && ncp ./docs/tutorials ./tmp/docs/tutorials && ncp ./docs/typescript ./tmp/docs/typescript && ncp ./docs/api ./tmp/docs/api && cp index.html ./tmp && cp docs/*.html ./tmp/docs/","docs:copy:tmp:5x":"rimraf ./docs/5.x && ncp ./tmp ./docs/5.x","docs:copy:tmp:6x":"rimraf ./docs/6.x && ncp ./tmp ./docs/6.x","docs:generate":"node ./scripts/website.js","docs:generate:sponsorData":"node ./scripts/loadSponsorData.js","docs:test":"npm run docs:generate","docs:view":"node ./scripts/static.js","docs:prepare:publish:stable":"git checkout gh-pages && git merge master && npm run docs:generate","docs:prepare:publish:5x":"git checkout 5.x && git merge 5.x && npm run docs:clean:stable && npm run docs:generate && npm run docs:copy:tmp && git checkout gh-pages && npm run docs:copy:tmp:5x","docs:prepare:publish:6x":"git checkout 6.x && git merge 6.x && npm run docs:clean:stable && env DOCS_DEPLOY=true npm run docs:generate && mv ./docs/6.x ./tmp && git checkout gh-pages && npm run docs:copy:tmp:6x","docs:prepare:publish:7x":"env DOCS_DEPLOY=true npm run docs:generate && git checkout gh-pages && rimraf ./docs/7.x && mv ./tmp ./docs/7.x","docs:check-links":"blc http://127.0.0.1:8089 -ro",lint:"eslint .","lint-js":"eslint . --ext .js --ext .cjs","lint-ts":"eslint . --ext .ts","lint-md":'markdownlint-cli2 "**/*.md" "#node_modules" "#benchmarks"',"build-browser":"(rm ./dist/* || true) && node ./scripts/build-browser.js",prepublishOnly:"npm run build-browser",release:"git pull && git push origin master --tags && npm publish","release-5x":"git pull origin 5.x && git push origin 5.x && git push origin 5.x --tags && npm publish --tag 5x","release-6x":"git pull origin 6.x && git push origin 6.x && git push origin 6.x --tags && npm publish --tag 6x",mongo:"node ./tools/repl.js","publish-7x":"npm publish --tag 7x",test:"mocha --exit ./test/*.test.js","test-deno":"deno run --allow-env --allow-read --allow-net --allow-run --allow-sys --allow-write ./test/deno.js","test-rs":"START_REPLICA_SET=1 mocha --timeout 30000 --exit ./test/*.test.js","test-tsd":"node ./test/types/check-types-filename && tsd",tdd:"mocha ./test/*.test.js --inspect --watch --recursive --watch-files ./**/*.{js,ts}","test-coverage":"nyc --reporter=html --reporter=text npm test","ts-benchmark":"cd ./benchmarks/typescript/simple && npm install && npm run benchmark | node ../../../scripts/tsc-diagnostics-check"},main:"./index.js",types:"./types/index.d.ts",engines:{node:">=16.20.1"},bugs:{url:"https://github.com/Automattic/mongoose/issues/new"},repository:{type:"git",url:"git://github.com/Automattic/mongoose.git"},homepage:"https://mongoosejs.com",browser:"./dist/browser.umd.js",config:{mongodbMemoryServer:{disablePostinstall:!0}},funding:{type:"opencollective",url:"https://opencollective.com/mongoose"},tsd:{directory:"test/types",compilerOptions:{esModuleInterop:!1,strict:!0,allowSyntheticDefaultImports:!0,strictPropertyInitialization:!1,noImplicitAny:!1,strictNullChecks:!0,module:"commonjs",target:"ES2017"}}}});var jy=K((oP1,Ty)=>{var tH1=Z0(),oH1=_2();function eH1(F,A){let B=A?A:{},D=B.readPreference?B.readPreference:Dq1(F),J=tH1(B);return D&&D!=="primary"&&D!=="primaryPreferred"?Fq1(D,J):J}function Fq1(F,A){if(Aq1(A)&&Bq1(F))Xq1();else return Jq1(A)}function Aq1(F){let A=F.config&&F.config.autoIndex,{autoCreate:B,autoIndex:D}=F;return!!(A||B||D)}function Bq1(F){return F==="secondary"||F==="secondaryPreferred"}function Dq1(F){let B=/(?:&|\?)readPreference=(\w+)(?:&|$)/.exec(F);return B?B[1]:null}function Jq1(F){return F.config={autoIndex:!1},F.autoCreate=!1,F.autoIndex=!1,F}function Xq1(){throw new oH1('MongoDB prohibits index creation on connections that read from non-primary replicas. Connections that set "readPreference" to "secondary" or "secondaryPreferred" may not opt-in to the following connection options: autoCreate, autoIndex')}Ty.exports=eH1});var ky=K((Zq1)=>{Zq1.setTimeout=setTimeout});var fy=K((FM1,xy)=>{/*!
713
+ * Module dependencies.
714
+ */var Oy=My(),T9=_2(),d2=u9(),Sy=G9(),$q1=xW(),Gq1=jy(),Eq1=ky().setTimeout,uy=X1();function r3(){Oy.apply(this,arguments),this._listening=!1,this._lastHeartbeatAt=null}r3.STATES=d2;/*!
715
+ * Inherits from Connection.
716
+ */Object.setPrototypeOf(r3.prototype,Oy.prototype);r3.prototype.useDb=function(F,A){if(A=A||{},A.useCache&&this.relatedDbs[F])return this.relatedDbs[F];let B=new this.constructor;B.name=F,B.base=this.base,B.collections={},B.models={},B.replica=this.replica,B.config=Object.assign({},this.config,B.config),B.name=this.name,B.options=this.options,B._readyState=this._readyState,B._closeCalled=this._closeCalled,B._hasOpened=this._hasOpened,B._listening=!1,B._parent=this,B.host=this.host,B.port=this.port,B.user=this.user,B.pass=this.pass;let D=this;if(B.client=D.client,this.db&&this._readyState===d2.connected)J();else this._queue.push({fn:J});function J(){B.client=D.client;let X={};if(A.hasOwnProperty("noListener"))X.noListener=A.noListener;B.db=D.client.db(F,X),B._lastHeartbeatAt=D._lastHeartbeatAt,B.onOpen()}if(B.name=F,A.noListener!==!0)this.otherDbs.push(B);if(B.otherDbs.push(this),A&&A.useCache)this.relatedDbs[B.name]=B,B.relatedDbs=this.relatedDbs;return B};r3.prototype.removeDb=function F(A){let B=this.otherDbs.filter((D)=>D.name===A);if(!B.length)throw new T9(`No connections to database "${A}" found`);for(let D of B)D._closeCalled=!0,D._destroyCalled=!0,D._readyState=d2.disconnected,D.$wasForceClosed=!0;delete this.relatedDbs[A],this.otherDbs=this.otherDbs.filter((D)=>D.name!==A)};r3.prototype.doClose=async function F(A){if(this.client==null)return this;let B=!1;if(A!=null&&typeof A==="object")B=A.skipCloseClient,A=A.force;if(B)return this;return await this.client.close(A),await new Promise((D)=>Eq1(D,1)),this};r3.prototype.listDatabases=async function F(){return await this._waitForConnect(),await this.db.admin().listDatabases()};/*!
717
+ * ignore
718
+ */r3.prototype.createClient=async function F(A,B){if(typeof A!=="string")throw new T9(`The \`uri\` parameter to \`openUri()\` must be a string, got "${typeof A}". Make sure the first parameter to \`mongoose.connect()\` or \`mongoose.createConnection()\` is a string.`);if(this._destroyCalled)throw new T9("Connection has been closed and destroyed, and cannot be used for re-opening the connection. Please create a new connection with `mongoose.createConnection()` or `mongoose.connect()`.");if(this.readyState===d2.connecting||this.readyState===d2.connected){if(this._connectionString!==A)throw new T9("Can't call `openUri()` on an active connection with different connection strings. Make sure you aren't calling `mongoose.connect()` multiple times. See: https://mongoosejs.com/docs/connections.html#multiple_connections")}if(B=Gq1(A,B),B){let X=B.config&&B.config.autoIndex!=null?B.config.autoIndex:B.autoIndex;if(X!=null)this.config.autoIndex=X!==!1,delete B.config,delete B.autoIndex;if("autoCreate"in B)this.config.autoCreate=!!B.autoCreate,delete B.autoCreate;if("sanitizeFilter"in B)this.config.sanitizeFilter=B.sanitizeFilter,delete B.sanitizeFilter;if("autoSearchIndex"in B)this.config.autoSearchIndex=B.autoSearchIndex,delete B.autoSearchIndex;if(B.user||B.pass)B.auth=B.auth||{},B.auth.username=B.user,B.auth.password=B.pass,this.user=B.user,this.pass=B.pass;if(delete B.user,delete B.pass,B.bufferCommands!=null)this.config.bufferCommands=B.bufferCommands,delete B.bufferCommands}else B={};this._connectionOptions=B;let D=B.dbName;if(D!=null)this.$dbName=D;if(delete B.dbName,!uy.hasUserDefinedProperty(B,"driverInfo"))B.driverInfo={name:"Mongoose",version:$q1.version};this.readyState=d2.connecting,this._connectionString=A;let J;try{J=new Sy.MongoClient(A,B)}catch(X){throw this.readyState=d2.disconnected,X}this.client=J,J.setMaxListeners(0),await J.connect(),fW(this,J,B,D);for(let X of this.otherDbs)fW(X,J,{},X.name);return this};/*!
719
+ * ignore
720
+ */r3.prototype.setClient=function F(A){if(!(A instanceof Sy.MongoClient))throw new T9("Must call `setClient()` with an instance of MongoClient");if(this.readyState!==d2.disconnected)throw new T9("Cannot call `setClient()` on a connection that is already connected.");if(A.topology==null)throw new T9("Cannot call `setClient()` with a MongoClient that you have not called `connect()` on yet.");this._connectionString=A.s.url,fW(this,A,{},A.s.options.dbName);for(let B of Object.values(this.models))B.init().catch(function D(){});return this};/*!
721
+ * ignore
722
+ */function fW(F,A,B,D){let J=D!=null?A.db(D):A.db();F.db=J,F.client=A,F.host=A&&A.s&&A.s.options&&A.s.options.hosts&&A.s.options.hosts[0]&&A.s.options.hosts[0].host||void 0,F.port=A&&A.s&&A.s.options&&A.s.options.hosts&&A.s.options.hosts[0]&&A.s.options.hosts[0].port||void 0,F.name=D!=null?D:J.databaseName,F._closeCalled=A._closeCalled;let X=()=>{if(F.readyState!==d2.connected)F.readyState=d2.connected,F.emit("reconnect"),F.emit("reconnected"),F.onOpen()},Z=A&&A.topology&&A.topology.description&&A.topology.description.type||"";if(Z==="Single")A.on("serverDescriptionChanged",(Y)=>{if(Y.newDescription.type==="Unknown")F.readyState=d2.disconnected;else X()});else if(Z.startsWith("ReplicaSet"))A.on("topologyDescriptionChanged",(Y)=>{let $=Y.newDescription;if(F.readyState===d2.connected&&$.type!=="ReplicaSetWithPrimary")F.readyState=d2.disconnected;else if(F.readyState===d2.disconnected&&$.type==="ReplicaSetWithPrimary")X()});if(A.on("serverHeartbeatSucceeded",()=>{F._lastHeartbeatAt=Date.now()}),B.monitorCommands)A.on("commandStarted",(Y)=>F.emit("commandStarted",Y)),A.on("commandFailed",(Y)=>F.emit("commandFailed",Y)),A.on("commandSucceeded",(Y)=>F.emit("commandSucceeded",Y));F.onOpen();for(let Y in F.collections)if(uy.object.hasOwnProperty(F.collections,Y))F.collections[Y].onOpen()}/*!
723
+ * Module exports.
724
+ */xy.exports=r3});var _y=K((Hq1)=>{/*!
725
+ * Module exports.
726
+ */Hq1.Collection=hO();Hq1.Connection=fy()});var by=K((BM1,gy)=>{/*!
727
+ * Valid mongoose options
728
+ */var zq1=Object.freeze(["allowDiskUse","applyPluginsToChildSchemas","applyPluginsToDiscriminators","autoCreate","autoIndex","autoSearchIndex","bufferCommands","bufferTimeoutMS","cloneSchemas","createInitialConnection","debug","forceRepopulate","id","timestamps.createdAt.immutable","maxTimeMS","objectIdGetter","overwriteModels","returnOriginal","runValidators","sanitizeFilter","sanitizeProjection","selectPopulatedPaths","setDefaultsOnInsert","strict","strictPopulate","strictQuery","toJSON","toObject","transactionAsyncLocalStorage","translateAliases"]);gy.exports=zq1});var vy=K((DM1,yy)=>{/*!
729
+ * Module dependencies.
730
+ */var Cq1=z1();class _W extends Cq1{constructor(F){let A=F.map((B)=>B.message).join(", ");if(A.length>50)A=A.slice(0,50)+"...";super(`eachAsync() finished with ${F.length} errors: ${A}`);this.errors=F}}Object.defineProperty(_W.prototype,"name",{value:"EachAsyncMultiError"});/*!
731
+ * exports
732
+ */yy.exports=_W});var bW=K((JM1,my)=>{/*!
733
+ * Module dependencies.
734
+ */var Kq1=vy(),gW=Z6();my.exports=async function F(A,B,D){let J=D.parallel||1,X=D.batchSize,Z=D.signal,Y=D.continueOnError,$=[],G=Uq1(),E=!1;return new Promise((W,z)=>{if(Z!=null){if(Z.aborted)return W(null);Z.addEventListener("abort",()=>{return E=!0,W(null)},{once:!0})}if(X!=null){if(typeof X!=="number")throw new TypeError("batchSize must be a number");else if(!Number.isInteger(X))throw new TypeError("batchSize must be an integer");else if(X<1)throw new TypeError("batchSize must be at least 1")}H((C,U)=>{if(C!=null)return z(C);W(U)})});function H(W){let z=0,C=0,U=null;for(let L=0;L<J;++L)G(Q());function Q(){let L=[],V=!1;return w;function w(j){if(V||E)return j();else if(U)return j();A(function(T,M){if(U!=null)return j();if(T!=null)if(T.name==="MongoCursorExhaustedError")M=null;else if(Y)$.push(T);else return U=T,W(T),j();if(M==null){if(V=!0,z<=0){let O=Y?hy($):U;W(O)}else if(X&&L.length)q(L,C++,m);return j()}if(++z,gW(()=>j()),X)L.push(M);if(X&&L.length!==X){gW(()=>G(w));return}let f=X?L:M;function m(O){if(X)z-=L.length,L=[];else--z;if(O!=null)if(Y)$.push(O);else return U=O,W(O);if((V||E)&&z<=0){let _=Y?hy($):U;return W(_)}gW(()=>G(w))}q(f,C++,m)})}}}function q(W,z,C){let U;try{U=B(W,z)}catch(Q){return C(Q)}if(U&&typeof U.then==="function")U.then(function(){C(null)},function(Q){C(Q||new Error("`eachAsync()` promise rejected without error"))});else C(null)}};function Uq1(){let F=[],A=null,B=0;return function J(X){if(A===null&&F.length===0)return A=B++,X(D);F.push(X)};function D(){if(F.length!==0)A=B++,F.shift()(D);else A=null}}function hy(F){if(F.length===0)return null;return new Kq1(F)}});var ry=K((XM1,ay)=>{/*!
735
+ * Module dependencies.
736
+ */var bF=z1(),py=import.meta.require("stream").Readable,Qq1=bW(),iy=YF(),Lq1=n7(),yW=Z6(),{once:Vq1}=import.meta.require("events"),ny=import.meta.require("util");function H2(F){py.call(this,{autoDestroy:!0,objectMode:!0}),this.cursor=null,this.skipped=!1,this.query=F,this._closed=!1;let A=F.model;this._mongooseOptions={},this._transforms=[],this.model=A,this.options={},A.hooks.execPre("find",F,(B)=>{if(B!=null){if(B instanceof Lq1.skipWrappedFunction){let D=B.args[0];if(D!=null&&(!Array.isArray(D)||D.length)){let J=new bF('Cannot `skipMiddlewareFunction()` with a value when using `.find().cursor()`, value must be nullish or empty array, got "'+ny.inspect(D)+'".');this._markError(J),this.listeners("error").length>0&&this.emit("error",J);return}this.skipped=!0,this.emit("cursor",null);return}this._markError(B),this.listeners("error").length>0&&this.emit("error",B);return}if(Object.assign(this.options,F._optionsForExec()),this._transforms=this._transforms.concat(F._transforms.slice()),this.options.transform)this._transforms.push(this.options.transform);if(this.options.batchSize)this.options._populateBatchSize=Math.min(this.options.batchSize,5000);if(A.collection._shouldBufferCommands()&&A.collection.buffer)A.collection.queue.push([()=>dy(F,this)]);else dy(F,this)})}ny.inherits(H2,py);/*!
737
+ * ignore
738
+ */function dy(F,A){try{let B=F.model.collection.find(F._conditions,A.options);A.cursor=B,A.emit("cursor",B)}catch(B){A._markError(B),A.listeners("error").length>0&&A.emit("error",A._error)}}H2.prototype._read=function(){yJ(this,(F,A)=>{if(F)return this.emit("error",F);if(!A){this.push(null),this.cursor.close(function(B){if(B)return this.emit("error",B)});return}this.push(A)})};H2.prototype.getDriverCursor=async function F(){if(this.cursor)return this.cursor;return await Vq1(this,"cursor"),this.cursor};Object.defineProperty(H2.prototype,"map",{value:function(F){return this._transforms.push(F),this},enumerable:!0,configurable:!0,writable:!0});H2.prototype._markError=function(F){return this._error=F,this};H2.prototype.close=async function F(){if(typeof arguments[0]==="function")throw new bF("QueryCursor.prototype.close() no longer accepts a callback");try{await this.cursor.close(),this._closed=!0,this.emit("close")}catch(A){throw this.listeners("error").length>0&&this.emit("error",A),A}};H2.prototype._destroy=function F(A,B){let D=null;if(!this.cursor)D=new Promise((J)=>{this.once("cursor",J)});else D=Promise.resolve();return D.then(()=>{this.cursor.close()}).then(()=>{this._closed=!0,B()}).catch((J)=>{B(J)}),this};H2.prototype.rewind=function(){return sy(this,()=>{this.cursor.rewind()}),this};H2.prototype.next=async function F(){if(typeof arguments[0]==="function")throw new bF("QueryCursor.prototype.next() no longer accepts a callback");if(this._closed)throw new bF("Cannot call `next()` on a closed cursor");return new Promise((A,B)=>{yJ(this,function(D,J){if(D)return B(D);A(J)})})};H2.prototype.eachAsync=function(F,A){if(typeof arguments[2]==="function")throw new bF("QueryCursor.prototype.eachAsync() no longer accepts a callback");if(typeof A==="function")A={};return A=A||{},Qq1((B)=>yJ(this,B),F,A)};H2.prototype.options;H2.prototype.addCursorFlag=function(F,A){return sy(this,()=>{this.cursor.addCursorFlag(F,A)}),this};/*!
739
+ * ignore
740
+ */H2.prototype.transformNull=function(F){if(arguments.length===0)F=!0;return this._mongooseOptions.transformNull=F,this};/*!
741
+ * ignore
742
+ */H2.prototype._transformForAsyncIterator=function(){if(this._transforms.indexOf(cy)===-1)this.map(cy);return this};if(Symbol.asyncIterator!=null)H2.prototype[Symbol.asyncIterator]=function(){return this.transformNull()._transformForAsyncIterator()};/*!
743
+ * ignore
744
+ */function cy(F){return F==null?{done:!0}:{value:F,done:!1}}function yJ(F,A){let B=A;if(F._transforms.length)B=function(D,J){if(D||J===null&&!F._mongooseOptions.transformNull)return A(D,J);A(D,F._transforms.reduce(function(X,Z){return Z.call(F,X)},J))};if(F._error)return yW(function(){B(F._error)});if(F.skipped)return yW(()=>B(null,null));if(F.cursor){if(F.query._mongooseOptions.populate&&!F._pop)F._pop=iy.preparePopulationOptionsMQ(F.query,F.query._mongooseOptions),F._pop.__noPromise=!0;if(F.query._mongooseOptions.populate&&F.options._populateBatchSize>1)if(F._batchDocs&&F._batchDocs.length)return bJ(F,F._batchDocs.shift(),F._pop,B);else if(F._batchExhausted)return B(null,null);else{F._batchDocs=[],F.cursor.next().then((D)=>{V8.call({ctx:F,callback:B},null,D)},(D)=>{V8.call({ctx:F,callback:B},D)});return}else return F.cursor.next().then((D)=>{if(!D){B(null,null);return}if(!F.query._mongooseOptions.populate)return bJ(F,D,null,B);F.query.model.populate(D,F._pop).then((J)=>{bJ(F,J,F._pop,B)},(J)=>{B(J)})},(D)=>{B(D)})}else F.once("error",A),F.once("cursor",function(D){if(F.removeListener("error",A),D==null){if(F.skipped)return A(null,null);return}yJ(F,A)})}/*!
745
+ * ignore
746
+ */function V8(F,A){if(F)return this.callback(F);if(!A)return this.ctx._batchExhausted=!0,ly.call(this);if(this.ctx._batchDocs.push(A),this.ctx._batchDocs.length<this.ctx.options._populateBatchSize){if(this.ctx._batchDocs.length>0&&this.ctx._batchDocs.length%1000===0)return yW(()=>this.ctx.cursor.next().then((B)=>{V8.call(this,null,B)},(B)=>{V8.call(this,B)}));this.ctx.cursor.next().then((B)=>{V8.call(this,null,B)},(B)=>{V8.call(this,B)})}else ly.call(this)}/*!
747
+ * ignore
748
+ */function ly(){if(!this.ctx._batchDocs.length)return this.callback(null,null);this.ctx.query.model.populate(this.ctx._batchDocs,this.ctx._pop).then(()=>{bJ(this.ctx,this.ctx._batchDocs.shift(),this.ctx._pop,this.callback)},(F)=>{this.callback(F)})}/*!
749
+ * ignore
750
+ */function bJ(F,A,B,D){if(F.query._mongooseOptions.lean)return F.model.hooks.execPost("find",F.query,[[A]],($)=>{if($!=null)return D($);D(null,A)});let{model:J,_fields:X,_userProvidedFields:Z,options:Y}=F.query;iy.createModelAndInit(J,A,X,Z,Y,B,($,G)=>{if($!=null)return D($);F.model.hooks.execPost("find",F.query,[[G]],(E)=>{if(E!=null)return D(E);D(null,G)})})}/*!
751
+ * ignore
752
+ */function sy(F,A){if(F.cursor)return A();F.once("cursor",function(B){if(B==null)return;A()})}ay.exports=H2});var hW=K((ZM1,oy)=>{var vW=X1();function Rq1(F,A,B){ty(F,A,B,"maxTimeMS")}function wq1(F,A,B){ty(F,A,B,"allowDiskUse")}oy.exports={applyGlobalMaxTimeMS:Rq1,applyGlobalDiskUse:wq1};function ty(F,A,B,D){if(vW.hasUserDefinedProperty(F,D))return;if(vW.hasUserDefinedProperty(A,D))F[D]=A[D];else if(vW.hasUserDefinedProperty(B,D))F[D]=B[D]}});var mW=K((YM1,ey)=>{ey.exports=function F(A,B){if(B.readConcern!==void 0)return;if(B&&B.session&&B.session.transaction)return;let D=A.options?.readConcern?.level;if(D!=null)B.readConcern={level:D}}});var dW=K(($M1,Fv)=>{Fv.exports=function F(A,B){if(B.writeConcern!=null)return;if(B&&B.session&&B.session.transaction)return;let D=A.options.writeConcern??{};if(Object.keys(D).length!=0){if(B.writeConcern={},!("w"in B)&&D.w!=null)B.writeConcern.w=D.w;if(!("j"in B)&&D.j!=null)B.writeConcern.j=D.j;if(!("wtimeout"in B)&&D.wtimeout!=null)B.writeConcern.wtimeout=D.wtimeout}else{if(!("w"in B)&&D.w!=null)B.w=D.w;if(!("j"in B)&&D.j!=null)B.j=D.j;if(!("wtimeout"in B)&&D.wtimeout!=null)B.wtimeout=D.wtimeout}}});var Dv=K((GM1,Bv)=>{var Av=LF();Bv.exports=function F(A,B,D){if(!Object.keys(D).some(Av))return B.castForQuery(null,D,A);let X=Object.keys(D),Z=X.length;while(Z--){let Y=X[Z],$=D[Y];if(Y==="$not"){if($&&B&&!B.caster){let G=Object.keys($);if(G.length&&Av(G[0]))for(let E of Object.keys($))$[E]=B.castForQuery(E,$[E],A);else D[Y]=B.castForQuery(Y,$,A);continue}}else D[Y]=B.castForQuery(Y,$,A)}return D}});var Xv=K((EM1,Jv)=>{var Iq1=/^\d+$/;Jv.exports=function F(A,B){let D=A.path(B);if(D!=null)return D;let J=B.split("."),X="",Z=!1;for(let Y of J){if(Z&&Iq1.test(Y))continue;if(X=X.length===0?Y:X+"."+Y,D=A.path(X),D!=null&&D.schema){if(A=D.schema,X="",!Z&&D.$isMongooseDocumentArray)Z=!0}}return D}});var Ev=K((HM1,Gv)=>{var Nq1=Dv(),Zv=zF(),Yv=Xv(),Pq1=VW();Gv.exports=function F(A){let B=A.options.arrayFilters,D=A.getUpdate(),J=A.schema,X=Pq1(D),Z=J.options.strict;if(A._mongooseOptions.strict!=null)Z=A._mongooseOptions.strict;if(A.model&&A.model.base.options.strictQuery!=null)Z=A.model.base.options.strictQuery;if(J._userProvidedOptions.strictQuery!=null)Z=J._userProvidedOptions.strictQuery;if(A._mongooseOptions.strictQuery!=null)Z=A._mongooseOptions.strictQuery;$v(B,J,Z,X,A)};function $v(F,A,B,D,J){if(!Array.isArray(F))return;for(let X of F){if(X==null)throw new Error(`Got null array filter in ${F}`);let Z=Object.keys(X).filter((W)=>X[W]!=null);if(Z.length===0)continue;let Y=Z[0];if(Y==="$and"||Y==="$or"){for(let W of Z)$v(X[W],A,B,D,J);continue}let $=Y.indexOf("."),G=$===-1?Y:Y.substring(0,$);if(D[G]==null)continue;let E=Zv(D[G]),H=Yv(A,E),q=H!=null?H.schema:null;if(q!=null&&q.discriminators!=null&&X[G+"."+q.options.discriminatorKey])q=q.discriminators[X[G+"."+q.options.discriminatorKey]]||q;for(let W of Z){if(D[W]===null)continue;if(Object.keys(D).length===0)continue;let z=W.indexOf("."),C=z===-1?null:W.substring(z),U;if(C==null||q==null)U=H;else C=Zv(C),U=Yv(q,C);if(U==null){if(!B)return;let Q=C==null?E+".0":E+".0"+C;throw new Error(`Could not find path "${Q}" in schema`)}if(typeof X[W]==="object")X[W]=Nq1(J,U,X[W]);else X[W]=U.castForQuery(null,X[W])}}}});var vJ=K((qM1,Hv)=>{var Mq1=A8(),Tq1=l7();/*!
753
+ * ignore
754
+ */Hv.exports=function F(A){if(A==null)return!1;let B=Object.keys(A),D=B.length;if(D===0)return!1;for(let J=0;J<D;++J){let X=B[J];if(X.startsWith("+"))continue;if(Mq1(A[X])&&!!A[X])if(Tq1(A[X]))return F(A[X]);else return!!A[X]}return!1}});var Wv=K((WM1,qv)=>{qv.exports=function F(A,B){return A===B||B.startsWith(A+".")}});var Uv=K((Sq1)=>{/*!
755
+ * Module dependencies.
756
+ */var cW=["__proto__","constructor","prototype"],hJ=Sq1.clone=function F(A,B){if(A===void 0||A===null)return A;if(Array.isArray(A))return Sq1.cloneArray(A,B);if(A.constructor){if(/ObjectI[dD]$/.test(A.constructor.name))return typeof A.clone=="function"?A.clone():new A.constructor(A.id);if(A.constructor.name==="ReadPreference")return new A.constructor(A.mode,F(A.tags,B));if(A._bsontype=="Binary"&&A.buffer&&A.value)return typeof A.clone=="function"?A.clone():new A.constructor(A.value(!0),A.sub_type);if(A.constructor.name==="Date"||A.constructor.name==="Function")return new A.constructor(+A);if(A.constructor.name==="RegExp")return new RegExp(A);if(A.constructor.name==="Buffer")return Buffer.from(A)}if(kq1(A))return Sq1.cloneObject(A,B);if(A.valueOf)return A.valueOf()};/*!
757
+ * ignore
758
+ */Sq1.cloneObject=function F(A,B){let D=B&&B.minimize,J={},X=Object.keys(A),Z=X.length,Y=!1,$,G="",E=0;for(E=0;E<Z;++E){if(G=X[E],cW.indexOf(G)!==-1)continue;if($=hJ(A[G],B),!D||typeof $!=="undefined")Y||(Y=!0),J[G]=$}return D?Y&&J:J};Sq1.cloneArray=function F(A,B){let D=[],J=A.length,X=0;for(;X<J;X++)D.push(hJ(A[X],B));return D};Sq1.merge=function F(A,B){let D=Object.keys(B);for(let J of D){if(cW.indexOf(J)!==-1)continue;if(typeof A[J]==="undefined")A[J]=B[J];else if(Sq1.isObject(B[J]))F(A[J],B[J]);else A[J]=B[J]}};Sq1.mergeClone=function F(A,B){let D=Object.keys(B);for(let J of D){if(cW.indexOf(J)!==-1)continue;if(typeof A[J]==="undefined")A[J]=hJ(B[J]);else if(Sq1.isObject(B[J]))F(A[J],B[J]);else A[J]=hJ(B[J])}};Sq1.readPref=function F(A){switch(A){case"p":A="primary";break;case"pp":A="primaryPreferred";break;case"s":A="secondary";break;case"sp":A="secondaryPreferred";break;case"n":A="nearest";break}return A};Sq1.readConcern=function F(A){if(typeof A==="string"){switch(A){case"l":A="local";break;case"a":A="available";break;case"m":A="majority";break;case"lz":A="linearizable";break;case"s":A="snapshot";break}A={level:A}}return A};var jq1=Object.prototype.toString;Sq1.toString=function(F){return jq1.call(F)};var kq1=Sq1.isObject=function(F){return Sq1.toString(F)=="[object Object]"};Sq1.keys=Object.keys;Sq1.create=typeof Object.create=="function"?Object.create:Oq1;function Oq1(F){if(arguments.length>1)throw new Error("Adding properties is not supported");function A(){}return A.prototype=F,new A}Sq1.inherits=function(F,A){F.prototype=Sq1.create(A.prototype),F.prototype.constructor=F};Sq1.isArgumentsObject=function(F){return Object.prototype.toString.call(F)==="[object Arguments]"}});var Lv=K((KM1,Qv)=>{var R8=1000,w8=R8*60,I8=w8*60,j9=I8*24,mq1=j9*7,dq1=j9*365.25;Qv.exports=function(F,A){A=A||{};var B=typeof F;if(B==="string"&&F.length>0)return cq1(F);else if(B==="number"&&isFinite(F))return A.long?pq1(F):lq1(F);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(F))};function cq1(F){if(F=String(F),F.length>100)return;var A=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(F);if(!A)return;var B=parseFloat(A[1]),D=(A[2]||"ms").toLowerCase();switch(D){case"years":case"year":case"yrs":case"yr":case"y":return B*dq1;case"weeks":case"week":case"w":return B*mq1;case"days":case"day":case"d":return B*j9;case"hours":case"hour":case"hrs":case"hr":case"h":return B*I8;case"minutes":case"minute":case"mins":case"min":case"m":return B*w8;case"seconds":case"second":case"secs":case"sec":case"s":return B*R8;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return B;default:return}}function lq1(F){var A=Math.abs(F);if(A>=j9)return Math.round(F/j9)+"d";if(A>=I8)return Math.round(F/I8)+"h";if(A>=w8)return Math.round(F/w8)+"m";if(A>=R8)return Math.round(F/R8)+"s";return F+"ms"}function pq1(F){var A=Math.abs(F);if(A>=j9)return mJ(F,A,j9,"day");if(A>=I8)return mJ(F,A,I8,"hour");if(A>=w8)return mJ(F,A,w8,"minute");if(A>=R8)return mJ(F,A,R8,"second");return F+" ms"}function mJ(F,A,B,D){var J=A>=B*1.5;return Math.round(F/B)+" "+D+(J?"s":"")}});var lW=K((UM1,Vv)=>{function iq1(F){B.debug=B,B.default=B,B.coerce=$,B.disable=X,B.enable=J,B.enabled=Z,B.humanize=Lv(),B.destroy=G,Object.keys(F).forEach((E)=>{B[E]=F[E]}),B.names=[],B.skips=[],B.formatters={};function A(E){let H=0;for(let q=0;q<E.length;q++)H=(H<<5)-H+E.charCodeAt(q),H|=0;return B.colors[Math.abs(H)%B.colors.length]}B.selectColor=A;function B(E){let H,q=null,W,z;function C(...U){if(!C.enabled)return;let Q=C,L=Number(new Date),V=L-(H||L);if(Q.diff=V,Q.prev=H,Q.curr=L,H=L,U[0]=B.coerce(U[0]),typeof U[0]!=="string")U.unshift("%O");let w=0;U[0]=U[0].replace(/%([a-zA-Z%])/g,(T,M)=>{if(T==="%%")return"%";w++;let f=B.formatters[M];if(typeof f==="function"){let m=U[w];T=f.call(Q,m),U.splice(w,1),w--}return T}),B.formatArgs.call(Q,U),(Q.log||B.log).apply(Q,U)}if(C.namespace=E,C.useColors=B.useColors(),C.color=B.selectColor(E),C.extend=D,C.destroy=B.destroy,Object.defineProperty(C,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(q!==null)return q;if(W!==B.namespaces)W=B.namespaces,z=B.enabled(E);return z},set:(U)=>{q=U}}),typeof B.init==="function")B.init(C);return C}function D(E,H){let q=B(this.namespace+(typeof H==="undefined"?":":H)+E);return q.log=this.log,q}function J(E){B.save(E),B.namespaces=E,B.names=[],B.skips=[];let H,q=(typeof E==="string"?E:"").split(/[\s,]+/),W=q.length;for(H=0;H<W;H++){if(!q[H])continue;if(E=q[H].replace(/\*/g,".*?"),E[0]==="-")B.skips.push(new RegExp("^"+E.slice(1)+"$"));else B.names.push(new RegExp("^"+E+"$"))}}function X(){let E=[...B.names.map(Y),...B.skips.map(Y).map((H)=>"-"+H)].join(",");return B.enable(""),E}function Z(E){if(E[E.length-1]==="*")return!0;let H,q;for(H=0,q=B.skips.length;H<q;H++)if(B.skips[H].test(E))return!1;for(H=0,q=B.names.length;H<q;H++)if(B.names[H].test(E))return!0;return!1}function Y(E){return E.toString().substring(2,E.toString().length-2).replace(/\.\*\?$/,"*")}function $(E){if(E instanceof Error)return E.stack||E.message;return E}function G(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return B.enable(B.load()),B}Vv.exports=iq1});var wv=K((Rv,cJ)=>{Rv.formatArgs=sq1;Rv.save=aq1;Rv.load=rq1;Rv.useColors=nq1;Rv.storage=tq1();Rv.destroy=(()=>{let F=!1;return()=>{if(!F)F=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();Rv.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function nq1(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function sq1(F){if(F[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+F[0]+(this.useColors?"%c ":" ")+"+"+cJ.exports.humanize(this.diff),!this.useColors)return;let A="color: "+this.color;F.splice(1,0,A,"color: inherit");let B=0,D=0;F[0].replace(/%[a-zA-Z%]/g,(J)=>{if(J==="%%")return;if(B++,J==="%c")D=B}),F.splice(D,0,A)}Rv.log=console.debug||console.log||(()=>{});function aq1(F){try{if(F)Rv.storage.setItem("debug",F);else Rv.storage.removeItem("debug")}catch(A){}}function rq1(){let F;try{F=Rv.storage.getItem("debug")}catch(A){}if(!F&&typeof process!=="undefined"&&"env"in process)F=process.env.DEBUG;return F}function tq1(){try{return localStorage}catch(F){}}cJ.exports=lW()(Rv);var{formatters:oq1}=cJ.exports;oq1.j=function(F){try{return JSON.stringify(F)}catch(A){return"[UnexpectedJSONParseError]: "+A.message}}});var Mv=K((Nv,pJ)=>{var ZW1=import.meta.require("tty"),lJ=import.meta.require("util");Nv.init=WW1;Nv.log=EW1;Nv.formatArgs=$W1;Nv.save=HW1;Nv.load=qW1;Nv.useColors=YW1;Nv.destroy=lJ.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Nv.colors=[6,2,3,4,5,1];try{let F=(()=>{throw new Error("Cannot require module "+"supports-color");})();if(F&&(F.stderr||F).level>=2)Nv.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch(F){}Nv.inspectOpts=Object.keys(process.env).filter((F)=>{return/^debug_/i.test(F)}).reduce((F,A)=>{let B=A.substring(6).toLowerCase().replace(/_([a-z])/g,(J,X)=>{return X.toUpperCase()}),D=process.env[A];if(/^(yes|on|true|enabled)$/i.test(D))D=!0;else if(/^(no|off|false|disabled)$/i.test(D))D=!1;else if(D==="null")D=null;else D=Number(D);return F[B]=D,F},{});function YW1(){return"colors"in Nv.inspectOpts?Boolean(Nv.inspectOpts.colors):ZW1.isatty(process.stderr.fd)}function $W1(F){let{namespace:A,useColors:B}=this;if(B){let D=this.color,J="\x1B[3"+(D<8?D:"8;5;"+D),X=` ${J};1m${A} \x1B[0m`;F[0]=X+F[0].split(`
759
+ `).join(`
760
+ `+X),F.push(J+"m+"+pJ.exports.humanize(this.diff)+"\x1B[0m")}else F[0]=GW1()+A+" "+F[0]}function GW1(){if(Nv.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function EW1(...F){return process.stderr.write(lJ.format(...F)+`
761
+ `)}function HW1(F){if(F)process.env.DEBUG=F;else delete process.env.DEBUG}function qW1(){return process.env.DEBUG}function WW1(F){F.inspectOpts={};let A=Object.keys(Nv.inspectOpts);for(let B=0;B<A.length;B++)F.inspectOpts[A[B]]=Nv.inspectOpts[A[B]]}pJ.exports=lW()(Nv);var{formatters:Iv}=pJ.exports;Iv.o=function(F){return this.inspectOpts.colors=this.useColors,lJ.inspect(F,this.inspectOpts).split(`
762
+ `).map((A)=>A.trim()).join(" ")};Iv.O=function(F){return this.inspectOpts.colors=this.useColors,lJ.inspect(F,this.inspectOpts)}});var Tv=K((VM1,pW)=>{if(typeof process==="undefined"||process.type==="renderer"||!1||process.__nwjs)pW.exports=wv();else pW.exports=Mv()});var kv=K((jv)=>{var z0=jv;z0.distinct=function(F){if(F._fields&&Object.keys(F._fields).length>0)return"field selection and slice";let A=Object.keys(z0.distinct),B;return A.every(function(D){if(F.options[D])return B=D,!1;return!0}),B};z0.distinct.select=z0.distinct.slice=z0.distinct.sort=z0.distinct.limit=z0.distinct.skip=z0.distinct.batchSize=z0.distinct.hint=z0.distinct.tailable=!0;z0.findOneAndUpdate=z0.findOneAndRemove=function(F){let A=Object.keys(z0.findOneAndUpdate),B;return A.every(function(D){if(F.options[D])return B=D,!1;return!0}),B};z0.findOneAndUpdate.limit=z0.findOneAndUpdate.skip=z0.findOneAndUpdate.batchSize=z0.findOneAndUpdate.tailable=!0;z0.count=function(F){if(F._fields&&Object.keys(F._fields).length>0)return"field selection and slice";let A=Object.keys(z0.count),B;return A.every(function(D){if(F.options[D])return B=D,!1;return!0}),B};z0.count.slice=z0.count.batchSize=z0.count.tailable=!0});var nW=K((RW1,Ov)=>{RW1.isNode=typeof process!="undefined"&&typeof Ov=="object"&&typeof global=="object"&&typeof Buffer=="function"&&process.argv;RW1.isMongo=!RW1.isNode&&typeof printjson=="function"&&typeof ObjectId=="function"&&typeof rs=="function"&&typeof sh=="function";RW1.isBrowser=!RW1.isNode&&!RW1.isMongo&&typeof window!="undefined";RW1.type=RW1.isNode?"node":RW1.isMongo?"mongo":RW1.isBrowser?"browser":"unknown"});var yF=K((uv,xv)=>{var sW=["find","findOne","updateMany","updateOne","replaceOne","count","distinct","findOneAndDelete","findOneAndUpdate","aggregate","findCursor","deleteOne","deleteMany"];function aW(){}for(let F=0,A=sW.length;F<A;++F){let B=sW[F];aW.prototype[B]=IW1(B)}xv.exports=uv=aW;aW.methods=sW;function IW1(F){return function(){throw new Error("collection."+F+" not implemented")}}});var bv=K((_v,gv)=>{var NW1=yF();class fv extends NW1{constructor(F){super();this.collection=F,this.collectionName=F.collectionName}async find(F,A){return this.collection.find(F,A).toArray()}async findOne(F,A){return this.collection.findOne(F,A)}async count(F,A){return this.collection.count(F,A)}async distinct(F,A,B){return this.collection.distinct(F,A,B)}async updateMany(F,A,B){return this.collection.updateMany(F,A,B)}async updateOne(F,A,B){return this.collection.updateOne(F,A,B)}async replaceOne(F,A,B){return this.collection.replaceOne(F,A,B)}async deleteOne(F,A){return this.collection.deleteOne(F,A)}async deleteMany(F,A){return this.collection.deleteMany(F,A)}async findOneAndDelete(F,A){return this.collection.findOneAndDelete(F,A)}async findOneAndUpdate(F,A,B){return this.collection.findOneAndUpdate(F,A,B)}findCursor(F,A){return this.collection.find(F,A)}}gv.exports=_v=fv});var vv=K((wM1,yv)=>{var rW=nW();if(rW.type=="unknown")throw new Error("Unknown environment");yv.exports=rW.isNode?bv():rW.isMongo?yF():yF()});var Fz=K((mv,dv)=>{var PW1=import.meta.require("assert"),MW1=import.meta.require("util"),k1=Uv(),t3=Tv()("mquery");function h(F,A){if(!(this instanceof h))return new h(F,A);let B=this.constructor.prototype;if(this.op=B.op||void 0,this.options=Object.assign({},B.options),this._conditions=B._conditions?k1.clone(B._conditions):{},this._fields=B._fields?k1.clone(B._fields):void 0,this._updateDoc=B._updateDoc?k1.clone(B._updateDoc):void 0,this._path=B._path||void 0,this._distinctDoc=B._distinctDoc||void 0,this._collection=B._collection||void 0,this._traceFunction=B._traceFunction||void 0,A)this.setOptions(A);if(F)this.find(F)}var k9="$geoWithin";Object.defineProperty(h,"use$geoWithin",{get:function(){return k9=="$geoWithin"},set:function(F){if(F===!0)k9="$geoWithin";else k9="$within"}});h.prototype.toConstructor=function F(){function A(D,J){if(!(this instanceof A))return new A(D,J);h.call(this,D,J)}k1.inherits(A,h);let B=A.prototype;return B.options={},B.setOptions(this.options),B.op=this.op,B._conditions=k1.clone(this._conditions),B._fields=k1.clone(this._fields),B._updateDoc=k1.clone(this._updateDoc),B._path=this._path,B._distinctDoc=this._distinctDoc,B._collection=this._collection,B._traceFunction=this._traceFunction,A};h.prototype.setOptions=function(F){if(!(F&&k1.isObject(F)))return this;let A=k1.keys(F),B;for(let D=0;D<A.length;++D)if(B=A[D],typeof this[B]=="function"){let J=Array.isArray(F[B])?F[B]:[F[B]];this[B].apply(this,J)}else this.options[B]=F[B];return this};h.prototype.collection=function F(A){return this._collection=new h.Collection(A),this};h.prototype.collation=function(F){return this.options.collation=F,this};h.prototype.$where=function(F){return this._conditions.$where=F,this};h.prototype.where=function(){if(!arguments.length)return this;if(!this.op)this.op="find";let F=typeof arguments[0];if(F=="string"){if(this._path=arguments[0],arguments.length===2)this._conditions[this._path]=arguments[1];return this}if(F=="object"&&!Array.isArray(arguments[0]))return this.merge(arguments[0]);throw new TypeError("path must be a string or object")};h.prototype.equals=function F(A){this._ensurePath("equals");let B=this._path;return this._conditions[B]=A,this};h.prototype.eq=function F(A){this._ensurePath("eq");let B=this._path;return this._conditions[B]=A,this};h.prototype.or=function F(A){let B=this._conditions.$or||(this._conditions.$or=[]);if(!Array.isArray(A))A=[A];return B.push.apply(B,A),this};h.prototype.nor=function F(A){let B=this._conditions.$nor||(this._conditions.$nor=[]);if(!Array.isArray(A))A=[A];return B.push.apply(B,A),this};h.prototype.and=function F(A){let B=this._conditions.$and||(this._conditions.$and=[]);if(!Array.isArray(A))A=[A];return B.push.apply(B,A),this};/*!
763
+ * gt, gte, lt, lte, ne, in, nin, all, regex, size, maxDistance
764
+ *
765
+ * Thing.where('type').nin(array)
766
+ */"gt gte lt lte ne in nin all regex size maxDistance minDistance".split(" ").forEach(function(F){h.prototype[F]=function(){let A,B;if(arguments.length===1)this._ensurePath(F),B=arguments[0],A=this._path;else B=arguments[1],A=arguments[0];let D=this._conditions[A]===null||typeof this._conditions[A]==="object"?this._conditions[A]:this._conditions[A]={};return D["$"+F]=B,this}});h.prototype.mod=function(){let F,A;if(arguments.length===1)this._ensurePath("mod"),F=arguments[0],A=this._path;else if(arguments.length===2&&!Array.isArray(arguments[1]))this._ensurePath("mod"),F=[arguments[0],arguments[1]],A=this._path;else if(arguments.length===3)F=[arguments[1],arguments[2]],A=arguments[0];else F=arguments[1],A=arguments[0];let B=this._conditions[A]||(this._conditions[A]={});return B.$mod=F,this};h.prototype.exists=function(){let F,A;if(arguments.length===0)this._ensurePath("exists"),F=this._path,A=!0;else if(arguments.length===1)if(typeof arguments[0]==="boolean")this._ensurePath("exists"),F=this._path,A=arguments[0];else F=arguments[0],A=!0;else if(arguments.length===2)F=arguments[0],A=arguments[1];let B=this._conditions[F]||(this._conditions[F]={});return B.$exists=A,this};h.prototype.elemMatch=function(){if(arguments[0]==null)throw new TypeError("Invalid argument");let F,A,B;if(typeof arguments[0]==="function")this._ensurePath("elemMatch"),A=this._path,F=arguments[0];else if(k1.isObject(arguments[0]))this._ensurePath("elemMatch"),A=this._path,B=arguments[0];else if(typeof arguments[1]==="function")A=arguments[0],F=arguments[1];else if(arguments[1]&&k1.isObject(arguments[1]))A=arguments[0],B=arguments[1];else throw new TypeError("Invalid argument");if(F)B=new h,F(B),B=B._conditions;let D=this._conditions[A]||(this._conditions[A]={});return D.$elemMatch=B,this};h.prototype.within=function F(){if(this._ensurePath("within"),this._geoComparison=k9,arguments.length===0)return this;if(arguments.length===2)return this.box.apply(this,arguments);else if(2<arguments.length)return this.polygon.apply(this,arguments);let A=arguments[0];if(!A)throw new TypeError("Invalid argument");if(A.center)return this.circle(A);if(A.box)return this.box.apply(this,A.box);if(A.polygon)return this.polygon.apply(this,A.polygon);if(A.type&&A.coordinates)return this.geometry(A);throw new TypeError("Invalid argument")};h.prototype.box=function(){let F,A;if(arguments.length===3)F=arguments[0],A=[arguments[1],arguments[2]];else if(arguments.length===2)this._ensurePath("box"),F=this._path,A=[arguments[0],arguments[1]];else throw new TypeError("Invalid argument");let B=this._conditions[F]||(this._conditions[F]={});return B[this._geoComparison||k9]={$box:A},this};h.prototype.polygon=function(){let F,A;if(typeof arguments[0]=="string")F=Array.from(arguments),A=F.shift();else this._ensurePath("polygon"),A=this._path,F=Array.from(arguments);let B=this._conditions[A]||(this._conditions[A]={});return B[this._geoComparison||k9]={$polygon:F},this};h.prototype.circle=function(){let F,A;if(arguments.length===1)this._ensurePath("circle"),F=this._path,A=arguments[0];else if(arguments.length===2)F=arguments[0],A=arguments[1];else throw new TypeError("Invalid argument");if(!(("radius"in A)&&A.center))throw new Error("center and radius are required");let B=this._conditions[F]||(this._conditions[F]={}),D=A.spherical?"$centerSphere":"$center",J=this._geoComparison||k9;if(B[J]={},B[J][D]=[A.center,A.radius],"unique"in A)B[J].$uniqueDocs=!!A.unique;return this};h.prototype.near=function F(){let A,B;if(this._geoComparison="$near",arguments.length===0)return this;else if(arguments.length===1)this._ensurePath("near"),A=this._path,B=arguments[0];else if(arguments.length===2)A=arguments[0],B=arguments[1];else throw new TypeError("Invalid argument");if(!B.center)throw new Error("center is required");let D=this._conditions[A]||(this._conditions[A]={}),J=B.spherical?"$nearSphere":"$near";if(Array.isArray(B.center)){D[J]=B.center;let X="maxDistance"in B?B.maxDistance:null;if(X!=null)D.$maxDistance=X;if(B.minDistance!=null)D.$minDistance=B.minDistance}else{if(B.center.type!="Point"||!Array.isArray(B.center.coordinates))throw new Error(MW1.format("Invalid GeoJSON specified for %s",J));if(D[J]={$geometry:B.center},"maxDistance"in B)D[J].$maxDistance=B.maxDistance;if("minDistance"in B)D[J].$minDistance=B.minDistance}return this};h.prototype.intersects=function F(){if(this._ensurePath("intersects"),this._geoComparison="$geoIntersects",arguments.length===0)return this;let A=arguments[0];if(A!=null&&A.type&&A.coordinates)return this.geometry(A);throw new TypeError("Invalid argument")};h.prototype.geometry=function F(){if(!(this._geoComparison=="$within"||this._geoComparison=="$geoWithin"||this._geoComparison=="$near"||this._geoComparison=="$geoIntersects"))throw new Error("geometry() must come after `within()`, `intersects()`, or `near()");let A,B;if(arguments.length===1)this._ensurePath("geometry"),B=this._path,A=arguments[0];else throw new TypeError("Invalid argument");if(!(A.type&&Array.isArray(A.coordinates)))throw new TypeError("Invalid argument");let D=this._conditions[B]||(this._conditions[B]={});return D[this._geoComparison]={$geometry:A},this};h.prototype.select=function F(){let A=arguments[0];if(!A)return this;if(arguments.length!==1)throw new Error("Invalid select: select only takes 1 argument");this._validate("select");let B=this._fields||(this._fields={}),D=typeof A,J,X;if((D=="string"||k1.isArgumentsObject(A))&&typeof A.length=="number"||Array.isArray(A)){if(D=="string")A=A.split(/\s+/);for(J=0,X=A.length;J<X;++J){let Z=A[J];if(!Z)continue;let Y=Z[0]=="-"?0:1;if(Y===0)Z=Z.substring(1);B[Z]=Y}return this}if(k1.isObject(A)){let Z=k1.keys(A);for(J=0;J<Z.length;++J)B[Z[J]]=A[Z[J]];return this}throw new TypeError("Invalid select() argument. Must be string or object.")};h.prototype.slice=function(){if(arguments.length===0)return this;this._validate("slice");let F,A;if(arguments.length===1){let D=arguments[0];if(typeof D==="object"&&!Array.isArray(D)){let J=Object.keys(D),X=J.length;for(let Z=0;Z<X;++Z)this.slice(J[Z],D[J[Z]]);return this}this._ensurePath("slice"),F=this._path,A=arguments[0]}else if(arguments.length===2)if(typeof arguments[0]==="number")this._ensurePath("slice"),F=this._path,A=[arguments[0],arguments[1]];else F=arguments[0],A=arguments[1];else if(arguments.length===3)F=arguments[0],A=[arguments[1],arguments[2]];let B=this._fields||(this._fields={});return B[F]={$slice:A},this};h.prototype.sort=function(F){if(!F)return this;let A,B,D;this._validate("sort");let J=typeof F;if(Array.isArray(F)){B=F.length;for(A=0;A<F.length;++A){if(!Array.isArray(F[A]))throw new Error("Invalid sort() argument, must be array of arrays");TW1(this.options,F[A][0],F[A][1])}return this}if(arguments.length===1&&J=="string"){F=F.split(/\s+/),B=F.length;for(A=0;A<B;++A){if(D=F[A],!D)continue;let X=D[0]=="-"?-1:1;if(X===-1)D=D.substring(1);hv(this.options,D,X)}return this}if(k1.isObject(F)){let X=k1.keys(F);for(A=0;A<X.length;++A)D=X[A],hv(this.options,D,F[D]);return this}if(typeof Map!=="undefined"&&F instanceof Map)return jW1(this.options,F),this;throw new TypeError("Invalid sort() argument. Must be a string, object, or array.")};/*!
767
+ * @ignore
768
+ */var tW={1:1,"-1":-1,asc:1,ascending:1,desc:-1,descending:-1};function hv(F,A,B){if(Array.isArray(F.sort))throw new TypeError("Can't mix sort syntaxes. Use either array or object:\n- `.sort([['field', 1], ['test', -1]])`\n- `.sort({ field: 1, test: -1 })`");let D;if(B&&B.$meta){D=F.sort||(F.sort={}),D[A]={$meta:B.$meta};return}D=F.sort||(F.sort={});let J=String(B||1).toLowerCase();if(J=tW[J],!J)throw new TypeError("Invalid sort value: { "+A+": "+B+" }");D[A]=J}function TW1(F,A,B){if(F.sort=F.sort||[],!Array.isArray(F.sort))throw new TypeError("Can't mix sort syntaxes. Use either array or object:\n- `.sort([['field', 1], ['test', -1]])`\n- `.sort({ field: 1, test: -1 })`");let D=String(B||1).toLowerCase();if(D=tW[D],!D)throw new TypeError("Invalid sort value: [ "+A+", "+B+" ]");F.sort.push([A,D])}function jW1(F,A){if(F.sort=F.sort||new Map,!(F.sort instanceof Map))throw new TypeError("Can't mix sort syntaxes. Use either array or object or map consistently");A.forEach(function(B,D){let J=String(B||1).toLowerCase();if(J=tW[J],!J)throw new TypeError("Invalid sort value: < "+D+": "+B+" >");F.sort.set(D,J)})}/*!
769
+ * limit, skip, batchSize, comment
770
+ *
771
+ * Sets these associated options.
772
+ *
773
+ * query.comment('feed query');
774
+ */["limit","skip","batchSize","comment"].forEach(function(F){h.prototype[F]=function(A){return this._validate(F),this.options[F]=A,this}});h.prototype.maxTime=h.prototype.maxTimeMS=function(F){return this._validate("maxTime"),this.options.maxTimeMS=F,this};h.prototype.hint=function(){if(arguments.length===0)return this;this._validate("hint");let F=arguments[0];if(k1.isObject(F)){let A=this.options.hint||(this.options.hint={});for(let B in F)A[B]=F[B];return this}if(typeof F==="string")return this.options.hint=F,this;throw new TypeError("Invalid hint. "+F)};h.prototype.j=function F(A){return this.options.j=A,this};h.prototype.slaveOk=function(F){return this.options.slaveOk=arguments.length?!!F:!0,this};h.prototype.read=h.prototype.setReadPreference=function(F){if(arguments.length>1&&!h.prototype.read.deprecationWarningIssued)console.error("Deprecation warning: 'tags' argument is not supported anymore in Query.read() method. Please use mongodb.ReadPreference object instead."),h.prototype.read.deprecationWarningIssued=!0;return this.options.readPreference=k1.readPref(F),this};h.prototype.readConcern=h.prototype.r=function(F){return this.options.readConcern=k1.readConcern(F),this};h.prototype.tailable=function(){return this._validate("tailable"),this.options.tailable=arguments.length?!!arguments[0]:!0,this};h.prototype.writeConcern=h.prototype.w=function F(A){if(typeof A==="object"){if(typeof A.j!=="undefined")this.options.j=A.j;if(typeof A.w!=="undefined")this.options.w=A.w;if(typeof A.wtimeout!=="undefined")this.options.wtimeout=A.wtimeout}else this.options.w=A==="m"?"majority":A;return this};h.prototype.wtimeout=h.prototype.wTimeout=function F(A){return this.options.wtimeout=A,this};h.prototype.merge=function(F){if(!F)return this;if(!h.canMerge(F))throw new TypeError("Invalid argument. Expected instanceof mquery or plain object");if(F instanceof h){if(F._conditions)k1.merge(this._conditions,F._conditions);if(F._fields)this._fields||(this._fields={}),k1.merge(this._fields,F._fields);if(F.options)this.options||(this.options={}),k1.merge(this.options,F.options);if(F._updateDoc)this._updateDoc||(this._updateDoc={}),k1.mergeClone(this._updateDoc,F._updateDoc);if(F._distinctDoc)this._distinctDoc=F._distinctDoc;return this}return k1.merge(this._conditions,F),this};h.prototype.find=function(F){if(this.op="find",h.canMerge(F))this.merge(F);return this};h.prototype._find=async function F(){let A=this._conditions,B=this._optionsForExec();if(this.$useProjection)B.projection=this._fieldsForExec();else B.fields=this._fieldsForExec();return t3("_find",this._collection.collectionName,A,B),this._collection.find(A,B)};h.prototype.cursor=function F(A){if(this.op){if(this.op!=="find")throw new TypeError(".cursor only support .find method")}else this.find(A);let B=this._conditions,D=this._optionsForExec();if(this.$useProjection)D.projection=this._fieldsForExec();else D.fields=this._fieldsForExec();return t3("findCursor",this._collection.collectionName,B,D),this._collection.findCursor(B,D)};h.prototype.findOne=function(F){if(this.op="findOne",h.canMerge(F))this.merge(F);return this};h.prototype._findOne=async function F(){let A=this._conditions,B=this._optionsForExec();if(this.$useProjection)B.projection=this._fieldsForExec();else B.fields=this._fieldsForExec();return t3("findOne",this._collection.collectionName,A,B),this._collection.findOne(A,B)};h.prototype.count=function(F){if(this.op="count",this._validate(),h.canMerge(F))this.merge(F);return this};h.prototype._count=async function F(){let A=this._conditions,B=this._optionsForExec();return t3("count",this._collection.collectionName,A,B),this._collection.count(A,B)};h.prototype.distinct=function(F,A){if(this.op="distinct",this._validate(),!A&&typeof F==="string")A=F,F=void 0;if(typeof A=="string")this._distinctDoc=A;if(h.canMerge(F))this.merge(F);return this};h.prototype._distinct=async function F(){if(!this._distinctDoc)throw new Error("No value for `distinct` has been declared");let A=this._conditions,B=this._optionsForExec();return t3("distinct",this._collection.collectionName,A,B),this._collection.distinct(this._distinctDoc,A,B)};h.prototype.updateMany=function F(A,B,D){if(arguments.length===1)B=A,A=D=void 0;return oW(this,"updateMany",A,B,D)};h.prototype._updateMany=async function(){return eW(this,"updateMany")};h.prototype.updateOne=function F(A,B,D){if(arguments.length===1)B=A,A=D=void 0;return oW(this,"updateOne",A,B,D)};h.prototype._updateOne=async function(){return eW(this,"updateOne")};h.prototype.replaceOne=function F(A,B,D){if(arguments.length===1)B=A,A=D=void 0;return this.setOptions({overwrite:!0}),oW(this,"replaceOne",A,B,D)};h.prototype._replaceOne=async function(){return eW(this,"replaceOne")};/*!
775
+ * Internal helper for updateMany, updateOne
776
+ */function oW(F,A,B,D,J){if(F.op=A,h.canMerge(B))F.merge(B);if(D)F._mergeUpdate(D);if(k1.isObject(J))F.setOptions(J);return F}async function eW(F,A){let B=F._optionsForExec(),D=F._conditions,J=F._updateForExec();return t3("update",F._collection.collectionName,D,J,B),F._collection[A](D,J,B)}h.prototype.deleteOne=function(F){if(this.op="deleteOne",h.canMerge(F))this.merge(F);return this};h.prototype._deleteOne=async function(){let F=this._optionsForExec();delete F.justOne;let A=this._conditions;return t3("deleteOne",this._collection.collectionName,A,F),this._collection.deleteOne(A,F)};h.prototype.deleteMany=function(F){if(this.op="deleteMany",h.canMerge(F))this.merge(F);return this};h.prototype._deleteMany=async function(){let F=this._optionsForExec();delete F.justOne;let A=this._conditions;return t3("deleteOne",this._collection.collectionName,A,F),this._collection.deleteMany(A,F)};h.prototype.findOneAndUpdate=function(F,A,B){if(this.op="findOneAndUpdate",this._validate(),arguments.length===1)A=F,F=B=void 0;if(h.canMerge(F))this.merge(F);if(A)this._mergeUpdate(A);return B&&this.setOptions(B),this};h.prototype._findOneAndUpdate=async function(){let F=this._conditions,A=this._updateForExec(),B=this._optionsForExec();return this._collection.findOneAndUpdate(F,A,B)};h.prototype.findOneAndRemove=h.prototype.findOneAndDelete=function(F,A){if(this.op="findOneAndRemove",this._validate(),h.canMerge(F))this.merge(F);return A&&this.setOptions(A),this};h.prototype._findOneAndRemove=async function(){let F=this._optionsForExec(),A=this._conditions;return this._collection.findOneAndDelete(A,F)};h.prototype.setTraceFunction=function(F){return this._traceFunction=F,this};h.prototype.exec=async function F(A){if(typeof A==="string")this.op=A;PW1.ok(this.op,"Missing query type: (find, etc)");let B="_"+this.op;if(typeof this[B]!=="function")throw new TypeError(`this[${B}] is not a function`);return this[B]()};h.prototype.then=async function(F,A){return this.exec().then(F,A)};h.prototype.cursor=function(){if(this.op!="find")throw new Error("cursor() is only available for find");let F=this._conditions,A=this._optionsForExec();if(this.$useProjection)A.projection=this._fieldsForExec();else A.fields=this._fieldsForExec();return t3("cursor",this._collection.collectionName,F,A),this._collection.findCursor(F,A)};h.prototype.selected=function F(){return!!(this._fields&&Object.keys(this._fields).length>0)};h.prototype.selectedInclusively=function F(){if(!this._fields)return!1;let A=Object.keys(this._fields);if(A.length===0)return!1;for(let B=0;B<A.length;++B){let D=A[B];if(this._fields[D]===0)return!1;if(this._fields[D]&&typeof this._fields[D]==="object"&&this._fields[D].$meta)return!1}return!0};h.prototype.selectedExclusively=function F(){if(!this._fields)return!1;let A=Object.keys(this._fields);if(A.length===0)return!1;for(let B=0;B<A.length;++B){let D=A[B];if(this._fields[D]===0)return!0}return!1};h.prototype._mergeUpdate=function(F){if(!this._updateDoc)this._updateDoc={};if(F instanceof h){if(F._updateDoc)k1.mergeClone(this._updateDoc,F._updateDoc)}else k1.mergeClone(this._updateDoc,F)};h.prototype._optionsForExec=function(){return k1.clone(this.options)};h.prototype._fieldsForExec=function(){return k1.clone(this._fields)};h.prototype._updateForExec=function(){let F=k1.clone(this._updateDoc),A=k1.keys(F),B={};for(let D of A){if(this.options.overwrite){B[D]=F[D];continue}if(D[0]!=="$"){if(!B.$set)if(F.$set)B.$set=F.$set;else B.$set={};if(B.$set[D]=F[D],!~A.indexOf("$set"))A.push("$set")}else if(D==="$set"){if(!B.$set)B[D]=F[D]}else B[D]=F[D]}return this._compiledUpdate=B,B};h.prototype._ensurePath=function(F){if(!this._path){let A=F+"() must be used after where() when called with these arguments";throw new Error(A)}};/*!
777
+ * Permissions
778
+ */h.permissions=kv();h._isPermitted=function(F,A){let B=h.permissions[A];if(!B)return!0;return B[F]!==!0};h.prototype._validate=function(F){let A,B;if(F===void 0){if(B=h.permissions[this.op],typeof B!="function")return!0;A=B(this)}else if(!h._isPermitted(F,this.op))A=F;if(A)throw new Error(A+" cannot be used with "+this.op)};h.canMerge=function(F){return F instanceof h||k1.isObject(F)};h.setGlobalTraceFunction=function(F){h.traceFunction=F};/*!
779
+ * Exports.
780
+ */h.utils=k1;h.env=nW();h.Collection=vv();h.BaseCollection=yF();dv.exports=mv=h});var Az=K((IM1,cv)=>{cv.exports=function F(A,B){if(typeof A==="string")A=A.split(/\s+/);if(!Array.isArray(A)&&Object.prototype.toString.call(A)!=="[object Arguments]")return A;let J=A.length,X={};for(let Z=0;Z<J;++Z){let Y=A[Z];if(!Y)continue;let $=Y[0]=="-"?0:1;if(!B&&$===0)Y=Y.substring(1);X[Y]=$}return X}});var iv=K((NM1,pv)=>{pv.exports=function F(A,B){let D=Object.keys(A).map((J)=>Object.keys(A[J])).reduce((J,X)=>J.concat(X),[]);return B.filter((J)=>{return lv(J,D)})};function lv(F,A){let B=Object.keys(F)[0];if(B==="$and"||B==="$or"){if(!Array.isArray(F[B]))return!1;return F[B].find((X)=>lv(X,A))!=null}let D=B.indexOf("."),J=D===-1?B:B.slice(0,D);return A.find((X)=>X.includes("$["+J+"]"))!=null}});var nJ=K((PM1,nv)=>{/*!
781
+ * ignore
782
+ */nv.exports=function F(A){if(typeof A!=="object"||A===null)return!1;let B=Object.keys(A),D=B.length;for(let J=0;J<D;++J)if(B[J][0]==="$")return!0;return!1}});var Bz=K((MM1,sv)=>{var kW1=nJ(),{trustedSymbol:OW1}=p7();sv.exports=function F(A){if(A==null||typeof A!=="object")return A;if(Array.isArray(A)){for(let D of A)F(D);return A}let B=Object.keys(A);for(let D of B){let J=A[D];if(J!=null&&J[OW1])continue;if(D==="$and"||D==="$or"){F(J);continue}if(kW1(J)){let X=Object.keys(J);if(X.length===1&&X[0]==="$eq")continue;A[D]={$eq:A[D]}}}return A}});var rv=K((TM1,av)=>{av.exports=function F(A){if(A==null)return;let B=Object.keys(A);for(let D=0;D<B.length;++D)if(typeof A[B[D]]==="string")A[B[D]]=1}});var ev=K((jM1,ov)=>{var SW1=B8(),uW1=vJ();/*!
783
+ * ignore
784
+ */ov.exports=function F(A,B,D){if(D==null)return;let J=Object.keys(D);if(B=B||{},uW1(A))for(let X of J){if(!tv(B,X))A[X]=1;else if(B[X]===0)delete A[X];let Z=D[X]?.refPath;if(typeof Z==="string"){if(!tv(B,Z))A[Z]=1;else if(B[Z]===0)delete A[Z]}}else if(SW1(A))for(let X of J){if(B[X]==null)delete A[X];let Z=D[X]?.refPath;if(typeof Z==="string"&&B[Z]==null)delete A[Z]}};/*!
785
+ * ignore
786
+ */function tv(F,A){let B=A.split("."),D=B.length,J=B[0];for(let X=1;X<D;++X){if(F[J]!=null||F[J+".$"]!=null)return!0;J+="."+B[X]}return F[J]!=null||F[J+".$"]!=null}});var Jh=K((kM1,Dh)=>{/*!
787
+ * Module dependencies.
788
+ */var Fh=C9(),xW1=zF(),Ah=F8().flatten,Bh=F8().modifiedPaths;Dh.exports=function(F,A,B,D,J){let X=Object.keys(B||{}),Z={},Y={},$={},G={},E=X.length,H=!1,q={},W,z,C;for(C=0;C<E;++C)if(X[C].startsWith("$")){if(H=!0,X[C]==="$push"||X[C]==="$addToSet"){let y=Object.keys(B[X[C]]);for(let s=0;s<y.length;++s)if(W=B[X[C]][y[s]],W&&W.$each)G[y[s]]=(G[y[s]]||[]).concat(W.$each);else G[y[s]]=(G[y[s]]||[]).concat([W]);continue}Bh(B[X[C]],"",q);let O=Ah(B[X[C]],null,null,A),_=Object.keys(O),k=_.length;for(let y=0;y<k;++y){let s=xW1(_[y]);if(z=X[C],s.includes("$"))continue;if(z==="$set"||z==="$setOnInsert"||z==="$pull"||z==="$pullAll")Y[s]=O[_[y]],$[s]=z==="$pull"||z==="$pullAll";else if(z==="$unset")Y[s]=void 0;Z[s]=!0}}if(!H)Bh(B,"",q),Y=Ah(B,null,null,A),Z=Object.keys(Y);let U=Object.keys(Y),Q=U.length,L=[],V=[],w=[],j=F;function T(O,_){let k=A._getSchema(U[O]);if(k==null)return;if(k.instance==="Mixed"&&k.path!==U[O])return;if(_&&Array.isArray(_.$in))_.$in.forEach((y,s)=>{L.push(function(P1){k.doValidate(y,function(n0){if(n0)n0.path=U[s]+".$in."+s,V.push(n0);P1(null)},j,{updateValidator:!0})})});else{if($[U[O]]&&k.$isMongooseArray)return;if(k.$isMongooseDocumentArrayElement&&_!=null&&_.$__!=null)w.push(U[O]),L.push(function(y){k.doValidate(_,function(s){if(s)if(s.errors)for(let P1 of Object.keys(s.errors)){let n0=s.errors[P1];n0.path=U[O]+"."+P1,V.push(n0)}else s.path=U[O],V.push(s);return y(null)},j,{updateValidator:!0})});else L.push(function(y){for(let s of w)if(U[O].startsWith(s+"."))return y(null);k.doValidate(_,function(s){if(k.schema!=null&&k.schema.options.storeSubdocValidationError===!1&&s instanceof Fh)return y(null);if(s)s.path=U[O],V.push(s);y(null)},j,{updateValidator:!0})})}}for(C=0;C<Q;++C)T(C,Y[U[C]]);let M=Object.keys(G);for(let O of M){let _=A._getSchema(O);if(_&&_.$isMongooseDocumentArray)L.push(function(k){_.doValidate(G[O],m(O,V,k),D&&D.context==="query"?F:null)});else{_=A._getSchema(O+".0");for(let k of G[O])L.push(function(y){_.doValidate(k,m(O,V,y),D&&D.context==="query"?F:null,{updateValidator:!0})})}}if(J!=null){let O=L.length;if(O===0)return f(J);for(let _ of L)_(function(){if(--O<=0)f(J)});return}return function(O){let _=L.length;if(_===0)return f(O);for(let k of L)k(function(){if(--_<=0)f(O)})};function f(O){if(V.length){let _=new Fh(null);for(let k of V)_.addError(k.path,k);return O(_)}O(null)}function m(O,_,k){return function(y){if(y)y.path=O,_.push(y);k(null)}}}});var rJ=K((OM1,Uh)=>{/*!
789
+ * Module dependencies.
790
+ */var hF=Y2(),fW1=zD(),Jz=n7(),M2=z1(),u4=RD(),Xh=ry(),Zh=C9(),{applyGlobalMaxTimeMS:mF,applyGlobalDiskUse:dF}=hW(),_W1=Zq(),gW1=mW(),bW1=dW(),yW1=I9(),vW1=Ev(),aJ=UF(),hW1=TW(),c2=Z0(),mW1=M6(),cF=YF(),dW1=n6().internalToObjectOptions,cW1=B8(),lW1=vJ(),pW1=jD(),Yh=Wv(),Gh=D6(),X6=Fz(),iW1=Az(),nW1=iv(),sW1=Bz(),aW1=rv(),rW1=ev(),Eh=kW(),sJ=W9(),tW1=Jh(),vF=import.meta.require("util"),r1=X1(),oW1=aD().queryMiddlewareFunctions,eW1=new Set(["allowDiskUse","batchSize","collation","comment","explain","hint","j","lean","limit","maxTimeMS","populate","projection","read","select","skip","slice","sort","tailable","w","writeConcern","wtimeout"]);function v(F,A,B,D){if(!this._mongooseOptions)this._mongooseOptions={};A=A||{},this._transforms=[],this._hooks=new Jz,this._executionStack=null;let J=Object.keys(A);for(let Z of J)this._mongooseOptions[Z]=A[Z];if(D)this.mongooseCollection=D;if(B)this.model=B,this.schema=B.schema;if(this.model&&this.model._mapreduce)this.lean();if(X6.call(this,null,A),D)this.collection(D);if(F)this.find(F);this.options=this.options||{},this.$useProjection=!0;let X=this&&this.schema&&this.schema.options&&this.schema.options.collation||null;if(X!=null)this.options.collation=X}/*!
791
+ * inherit mquery
792
+ */v.prototype=new X6;v.prototype.constructor=v;v.prototype.count=void 0;v.prototype.findOneAndRemove=void 0;v.base=X6.prototype;/*!
793
+ * Overwrite mquery's `_distinct`, because Mongoose uses that name
794
+ * to store the field to apply distinct on.
795
+ */Object.defineProperty(v.prototype,"_distinct",{configurable:!0,writable:!0,enumerable:!0,value:void 0});v.use$geoWithin=X6.use$geoWithin;v.prototype.toConstructor=function F(){let A=this.model,B=this.mongooseCollection,D=function(Z,Y){if(!(this instanceof D))return new D(Z,Y);this._mongooseOptions=c2(J._mongooseOptions),v.call(this,Z,Y||null,A,B)};vF.inherits(D,A.Query);let J=D.prototype;J.options={};let X=Object.assign({},this.options);if(X.sort!=null)J.sort(X.sort),delete X.sort;return J.setOptions(X),J.op=this.op,J._validateOp(),J._conditions=c2(this._conditions),J._fields=c2(this._fields),J._update=c2(this._update,{flattenDecimals:!1}),J._path=this._path,J._distinct=this._distinct,J._collection=this._collection,J._mongooseOptions=this._mongooseOptions,D};v.prototype.clone=function(){let F=this.model,A=this.mongooseCollection,B=new this.model.Query({},{},F,A),D=Object.assign({},this.options);if(D.sort!=null)B.sort(D.sort),delete D.sort;return B.setOptions(D),B.op=this.op,B._validateOp(),B._conditions=c2(this._conditions),B._fields=c2(this._fields),B._update=c2(this._update,{flattenDecimals:!1}),B._path=this._path,B._distinct=this._distinct,B._collection=this._collection,B._mongooseOptions=this._mongooseOptions,B};v.prototype.slice=function(){if(arguments.length===0)return this;this._validate("slice");let F,A;if(arguments.length===1){let D=arguments[0];if(typeof D==="object"&&!Array.isArray(D)){let J=Object.keys(D),X=J.length;for(let Z=0;Z<X;++Z)this.slice(J[Z],D[J[Z]]);return this}this._ensurePath("slice"),F=this._path,A=arguments[0]}else if(arguments.length===2)if(typeof arguments[0]==="number")this._ensurePath("slice"),F=this._path,A=[arguments[0],arguments[1]];else F=arguments[0],A=arguments[1];else if(arguments.length===3)F=arguments[0],A=[arguments[1],arguments[2]];let B={};return B[F]={$slice:A},this.select(B),this};/*!
796
+ * ignore
797
+ */var Fz1=new Set(oW1);v.prototype._validateOp=function(){if(this.op!=null&&!Fz1.has(this.op))this.error(new Error('Query has invalid `op`: "'+this.op+'"'))};v.prototype.mod=function(){let F,A;if(arguments.length===1)this._ensurePath("mod"),F=arguments[0],A=this._path;else if(arguments.length===2&&!Array.isArray(arguments[1]))this._ensurePath("mod"),F=[arguments[0],arguments[1]],A=this._path;else if(arguments.length===3)F=[arguments[1],arguments[2]],A=arguments[0];else F=arguments[1],A=arguments[0];let B=this._conditions[A]||(this._conditions[A]={});return B.$mod=F,this};v.prototype.limit=function F(A){if(this._validate("limit"),typeof A==="string")try{A=aJ(A)}catch(B){throw new hF("Number",A,"limit")}return this.options.limit=A,this};v.prototype.skip=function F(A){if(this._validate("skip"),typeof A==="string")try{A=aJ(A)}catch(B){throw new hF("Number",A,"skip")}return this.options.skip=A,this};v.prototype.projection=function(F){if(arguments.length===0)return this._fields;return this._fields={},this._userProvidedFields={},this.select(F),this._fields};v.prototype.select=function F(){let A=arguments[0];if(!A)return this;if(arguments.length!==1)throw new Error("Invalid select: select only takes 1 argument");this._validate("select");let B=this._fields||(this._fields={}),D=this._userProvidedFields||(this._userProvidedFields={}),J=void 0;if(this.model!=null&&r1.hasUserDefinedProperty(this.model.db.options,"sanitizeProjection"))J=this.model.db.options.sanitizeProjection;else if(this.model!=null&&r1.hasUserDefinedProperty(this.model.base.options,"sanitizeProjection"))J=this.model.base.options.sanitizeProjection;else J=this._mongooseOptions.sanitizeProjection;function X(Z){return typeof Z==="string"&&J?Z=1:Z}if(A=iW1(A,!0),r1.isObject(A)){if(this.selectedInclusively())Object.entries(A).forEach(([Z,Y])=>{if(Y){if(B["-"+Z]!=null)delete B["-"+Z];B[Z]=D[Z]=X(Y)}else Object.keys(D).forEach(($)=>{if(Yh(Z,$))delete B[$],delete D[$]})});else if(this.selectedExclusively())Object.entries(A).forEach(([Z,Y])=>{if(!Y){if(B["+"+Z]!=null)delete B["+"+Z];B[Z]=D[Z]=X(Y)}else Object.keys(D).forEach(($)=>{if(Yh(Z,$))delete B[$],delete D[$]})});else{let Z=Object.keys(A);for(let Y=0;Y<Z.length;++Y){let $=A[Z[Y]],G=Z[Y];B[G]=X($),D[G]=X($)}}return this}throw new TypeError("Invalid select() argument. Must be string or object.")};v.prototype.schemaLevelProjections=function F(A){return this._mongooseOptions.schemaLevelProjections=A,this};v.prototype.sanitizeProjection=function F(A){return this._mongooseOptions.sanitizeProjection=A,this};v.prototype.read=function F(A,B){if(typeof A==="string")A=_W1(A),this.options.readPreference={mode:A,tags:B};else this.options.readPreference=A;return this};v.prototype.toString=function F(){if(this.op==="count"||this.op==="countDocuments"||this.op==="find"||this.op==="findOne"||this.op==="deleteMany"||this.op==="deleteOne"||this.op==="findOneAndDelete"||this.op==="remove")return`${this.model.modelName}.${this.op}(${vF.inspect(this._conditions)})`;if(this.op==="distinct")return`${this.model.modelName}.distinct('${this._distinct}', ${vF.inspect(this._conditions)})`;if(this.op==="findOneAndReplace"||this.op==="findOneAndUpdate"||this.op==="replaceOne"||this.op==="update"||this.op==="updateMany"||this.op==="updateOne")return`${this.model.modelName}.${this.op}(${vF.inspect(this._conditions)}, ${vF.inspect(this._update)})`;return`${this.model.modelName}.${this.op}()`};v.prototype.session=function F(A){if(A==null)delete this.options.session;return this.options.session=A,this};v.prototype.writeConcern=function F(A){if(A==null)return delete this.options.writeConcern,this;return this.options.writeConcern=A,this};v.prototype.w=function F(A){if(A==null)delete this.options.w;if(this.options.writeConcern!=null)this.options.writeConcern.w=A;else this.options.w=A;return this};v.prototype.j=function F(A){if(A==null)delete this.options.j;if(this.options.writeConcern!=null)this.options.writeConcern.j=A;else this.options.j=A;return this};v.prototype.wtimeout=function F(A){if(A==null)delete this.options.wtimeout;if(this.options.writeConcern!=null)this.options.writeConcern.wtimeout=A;else this.options.wtimeout=A;return this};v.prototype.getOptions=function(){return this.options};v.prototype.setOptions=function(F,A){if(A){if(this._mongooseOptions=F&&c2(F)||{},this.options=F||{},"populate"in F)this.populate(this._mongooseOptions);return this}if(F==null)return this;if(typeof F!=="object")throw new Error('Options must be an object, got "'+F+'"');if(F=Object.assign({},F),Array.isArray(F.populate)){let B=F.populate;delete F.populate;let D=B.length;for(let J=0;J<D;++J)this.populate(B[J])}if("setDefaultsOnInsert"in F)this._mongooseOptions.setDefaultsOnInsert=F.setDefaultsOnInsert,delete F.setDefaultsOnInsert;if("overwriteDiscriminatorKey"in F)this._mongooseOptions.overwriteDiscriminatorKey=F.overwriteDiscriminatorKey,delete F.overwriteDiscriminatorKey;if("overwriteImmutable"in F)this._mongooseOptions.overwriteImmutable=F.overwriteImmutable,delete F.overwriteImmutable;if("sanitizeProjection"in F){if(F.sanitizeProjection&&!this._mongooseOptions.sanitizeProjection)aW1(this._fields);this._mongooseOptions.sanitizeProjection=F.sanitizeProjection,delete F.sanitizeProjection}if("sanitizeFilter"in F)this._mongooseOptions.sanitizeFilter=F.sanitizeFilter,delete F.sanitizeFilter;if("timestamps"in F)this._mongooseOptions.timestamps=F.timestamps,delete F.timestamps;if("defaults"in F)this._mongooseOptions.defaults=F.defaults;if("translateAliases"in F)this._mongooseOptions.translateAliases=F.translateAliases,delete F.translateAliases;if("schemaLevelProjections"in F)this._mongooseOptions.schemaLevelProjections=F.schemaLevelProjections,delete F.schemaLevelProjections;if(F.lean==null&&this.schema&&"lean"in this.schema.options)this._mongooseOptions.lean=this.schema.options.lean;if(typeof F.limit==="string")try{F.limit=aJ(F.limit)}catch(B){throw new hF("Number",F.limit,"limit")}if(typeof F.skip==="string")try{F.skip=aJ(F.skip)}catch(B){throw new hF("Number",F.skip,"skip")}for(let B of Object.keys(F))if(eW1.has(B)){let D=Array.isArray(F[B])?F[B]:[F[B]];this[B].apply(this,D)}else this.options[B]=F[B];return this};v.prototype.explain=function F(A){if(arguments.length===0)this.options.explain=!0;else if(A===!1)delete this.options.explain;else this.options.explain=A;return this};v.prototype.allowDiskUse=function(F){if(arguments.length===0)this.options.allowDiskUse=!0;else if(F===!1)delete this.options.allowDiskUse;else this.options.allowDiskUse=F;return this};v.prototype.maxTimeMS=function(F){return this.options.maxTimeMS=F,this};v.prototype.getFilter=function(){return this._conditions};v.prototype.getQuery=function(){return this._conditions};v.prototype.setQuery=function(F){this._conditions=F};v.prototype.getUpdate=function(){return this._update};v.prototype.setUpdate=function(F){this._update=F};v.prototype._fieldsForExec=function(){if(this._fields==null)return null;if(Object.keys(this._fields).length===0)return null;return c2(this._fields)};v.prototype._updateForExec=function(){let F=c2(this._update,{transform:!1,depopulate:!0}),A=Object.keys(F),B=A.length,D={};while(B--){let J=A[B];if(J[0]!=="$"){if(!D.$set)if(F.$set)D.$set=F.$set;else D.$set={};if(D.$set[J]=F[J],A.splice(B,1),!~A.indexOf("$set"))A.push("$set")}else if(J==="$set"){if(!D.$set)D[J]=F[J]}else D[J]=F[J]}return D};v.prototype._optionsForExec=function(F){let A=c2(this.options);if(delete A.populate,F=F||this.model,!F)return A;gW1(F.schema,A),bW1(F.schema,A);let B=this.model?.db?.base.transactionAsyncLocalStorage?.getStore();if(!this.options.hasOwnProperty("session")&&B?.session!=null)A.session=B.session;let D=F&&F.schema&&F.schema.options&&F.schema.options.read;if(!("readPreference"in A)&&D)A.readPreference=D;if(A.upsert!==void 0)A.upsert=!!A.upsert;if(A.writeConcern){if(A.j)A.writeConcern.j=A.j,delete A.j;if(A.w)A.writeConcern.w=A.w,delete A.w;if(A.wtimeout)A.writeConcern.wtimeout=A.wtimeout,delete A.wtimeout}if(this._applyPaths(),this._fields!=null){this._fields=this._castFields(this._fields);let J=this._fieldsForExec();if(J!=null)A.projection=J}return A};v.prototype.lean=function(F){return this._mongooseOptions.lean=arguments.length?F:!0,this};v.prototype.set=function(F,A){if(typeof F==="object"){let B=Object.keys(F);for(let D of B)this.set(D,F[D]);return this}if(this._update=this._update||{},F in this._update)delete this._update[F];return this._update.$set=this._update.$set||{},this._update.$set[F]=A,this};v.prototype.get=function F(A){let B=this._update;if(B==null)return;let D=B.$set;if(D==null)return B[A];if(r1.hasUserDefinedProperty(B,A))return B[A];if(r1.hasUserDefinedProperty(D,A))return D[A];return};v.prototype.error=function F(A){if(arguments.length===0)return this._error;return this._error=A,this};v.prototype._unsetCastError=function F(){if(this._error==null||!(this._error instanceof hF))return;return this.error(null)};v.prototype.mongooseOptions=function(F){if(arguments.length>0)this._mongooseOptions=F;return this._mongooseOptions};v.prototype._castConditions=function(){let F=void 0;if(this.model?.db.options?.sanitizeFilter!=null)F=this.model.db.options.sanitizeFilter;else if(this.model?.base.options?.sanitizeFilter!=null)F=this.model.base.options.sanitizeFilter;else F=this._mongooseOptions.sanitizeFilter;if(F)sW1(this._conditions);try{this.cast(this.model),this._unsetCastError()}catch(A){this.error(A)}};/*!
798
+ * ignore
799
+ */function Hh(F){try{vW1(F)}catch(A){F.error(A)}}v.prototype._find=async function F(){if(this._applyTranslateAliases(),this._castConditions(),this.error()!=null)throw this.error();let A=this._mongooseOptions,B=this,D=B._userProvidedFields||{};mF(this.options,this.model.db.options,this.model.base.options),dF(this.options,this.model.db.options,this.model.base.options);let J=Object.assign({},{session:this&&this.options&&this.options.session||null,lean:A.lean||null}),X=this._optionsForExec(),Z=this._conditions,Y=X.projection,$=await this.mongooseCollection.find(Z,X);if(X.explain)return $.explain();let G=await $.toArray();if(G.length===0)return G;if(!A.populate){let H=B.schema.options.versionKey;if(A.lean&&A.lean.versionKey===!1&&H)G.forEach((q)=>{if(H in q)delete q[H]});return A.lean?Wh(B.model.schema,G,null,J):B._completeMany(G,Y,D,J)}let E=cF.preparePopulationOptionsMQ(B,A);if(A.lean)return B.model.populate(G,E);return G=await B._completeMany(G,Y,D,J),await this.model.populate(G,E),G};v.prototype.find=function(F){if(typeof F==="function"||typeof arguments[1]==="function")throw new M2("Query.prototype.find() no longer accepts a callback");if(this.op="find",X6.canMerge(F))this.merge(F),lF(this);else if(F!=null)this.error(new u4(F,"filter","find"));return this};v.prototype.merge=function(F){if(!F)return this;let A={overwrite:!0};if(F instanceof v){if(F._conditions){if(A.omit={},this._conditions&&this._conditions.$and&&F._conditions.$and)A.omit.$and=!0,this._conditions.$and=this._conditions.$and.concat(F._conditions.$and);if(this._conditions&&this._conditions.$or&&F._conditions.$or)A.omit.$or=!0,this._conditions.$or=this._conditions.$or.concat(F._conditions.$or);r1.merge(this._conditions,F._conditions,A)}if(F._fields)this._fields||(this._fields={}),r1.merge(this._fields,F._fields,A);if(F.options)this.options||(this.options={}),r1.merge(this.options,F.options,A);if(F._update)this._update||(this._update={}),r1.mergeClone(this._update,F._update);if(F._distinct)this._distinct=F._distinct;return r1.merge(this._mongooseOptions,F._mongooseOptions),this}else if(this.model!=null&&F instanceof this.model.base.Types.ObjectId)return r1.merge(this._conditions,{_id:F},A),this;else if(F&&F.$__)F=F.toObject(dW1);if(A.omit={},Array.isArray(F.$and)){if(A.omit.$and=!0,!this._conditions)this._conditions={};this._conditions.$and=(this._conditions.$and||[]).concat(F.$and.map((B)=>r1.isPOJO(B)?r1.merge({},B):B))}if(Array.isArray(F.$or)){if(A.omit.$or=!0,!this._conditions)this._conditions={};this._conditions.$or=(this._conditions.$or||[]).concat(F.$or.map((B)=>r1.isPOJO(B)?r1.merge({},B):B))}return r1.merge(this._conditions,F,A),this};v.prototype.collation=function(F){if(this.options==null)this.options={};return this.options.collation=F,this};v.prototype._completeOne=function(F,A,B,D){if(!F&&!this.options.includeResultMetadata)return D(null,null);let J=this.model,X=this._userProvidedFields||{},Z=this._mongooseOptions,Y=this.options;if(!Y.lean&&Z.lean)Y.lean=Z.lean;if(Y.explain)return D(null,F);if(!Z.populate){let G=this.schema.options.versionKey;if(Z.lean&&Z.lean.versionKey===!1&&G){if(G in F)delete F[G]}return Z.lean?Xz(J.schema,F,null,A,Y,D):$h(J,F,A,Y,B,X,null,D)}let $=cF.preparePopulationOptionsMQ(this,this._mongooseOptions);if(Z.lean)return J.populate(F,$).then((G)=>{Xz(J.schema,G,null,A,Y,D)},(G)=>{D(G)});$h(J,F,A,Y,B,X,[],(G,E)=>{if(G!=null)return D(G);J.populate(E,$).then((H)=>{D(null,H)},(H)=>{D(H)})})};v.prototype._completeMany=async function F(A,B,D,J){let X=this.model;return Promise.all(A.map((Z)=>new Promise((Y,$)=>{let G=Z;if(Z=cF.createModel(X,Z,B,D),J.session!=null)Z.$session(J.session);Z.$init(G,J,(E)=>{if(E!=null)return $(E);Y(Z)})})))};v.prototype._findOne=async function F(){if(this._applyTranslateAliases(),this._castConditions(),this.error())throw this.error();mF(this.options,this.model.db.options,this.model.base.options),dF(this.options,this.model.db.options,this.model.base.options);let A=this._optionsForExec(),B=await this.mongooseCollection.findOne(this._conditions,A);return new Promise((D,J)=>{this._completeOne(B,null,A.projection,(X,Z)=>{if(X)return J(X);D(Z)})})};v.prototype.findOne=function(F,A,B){if(typeof F==="function"||typeof A==="function"||typeof B==="function"||typeof arguments[3]==="function")throw new M2("Query.prototype.findOne() no longer accepts a callback");if(this.op="findOne",this._validateOp(),B)this.setOptions(B);if(A)this.select(A);if(X6.canMerge(F))this.merge(F),lF(this);else if(F!=null)this.error(new u4(F,"filter","findOne"));return this};v.prototype._countDocuments=async function F(){this._applyTranslateAliases();try{this.cast(this.model)}catch(D){this.error(D)}if(this.error())throw this.error();mF(this.options,this.model.db.options,this.model.base.options),dF(this.options,this.model.db.options,this.model.base.options);let A=this._optionsForExec(),B=this._conditions;return this.mongooseCollection.countDocuments(B,A)};/*!
800
+ * If `translateAliases` option is set, call `Model.translateAliases()`
801
+ * on the following query properties: filter, projection, update, distinct.
802
+ */v.prototype._applyTranslateAliases=function F(){let A=!1;if("translateAliases"in this._mongooseOptions)A=this._mongooseOptions.translateAliases;else if(this.model?.schema?._userProvidedOptions?.translateAliases!=null)A=this.model.schema._userProvidedOptions.translateAliases;else if(this.model?.base?.options?.translateAliases!=null)A=this.model.base.options.translateAliases;if(!A)return;if(this.model?.schema?.aliases&&Object.keys(this.model.schema.aliases).length>0){if(this.model.translateAliases(this._conditions,!0),this.model.translateAliases(this._fields,!0),this.model.translateAliases(this._update,!0),this._distinct!=null&&this.model.schema.aliases[this._distinct]!=null)this._distinct=this.model.schema.aliases[this._distinct]}};v.prototype._estimatedDocumentCount=async function F(){if(this.error())throw this.error();let A=this._optionsForExec();return this.mongooseCollection.estimatedDocumentCount(A)};v.prototype.estimatedDocumentCount=function(F){if(typeof F==="function"||typeof arguments[1]==="function")throw new M2("Query.prototype.estimatedDocumentCount() no longer accepts a callback");if(this.op="estimatedDocumentCount",this._validateOp(),F!=null)this.setOptions(F);return this};v.prototype.countDocuments=function(F,A){if(typeof F==="function"||typeof A==="function"||typeof arguments[2]==="function")throw new M2("Query.prototype.countDocuments() no longer accepts a callback");if(this.op="countDocuments",this._validateOp(),X6.canMerge(F))this.merge(F);if(A!=null)this.setOptions(A);return this};v.prototype.__distinct=async function F(){if(this._applyTranslateAliases(),this._castConditions(),this.error())throw this.error();mF(this.options,this.model.db.options,this.model.base.options),dF(this.options,this.model.db.options,this.model.base.options);let A=this._optionsForExec();return this.mongooseCollection.distinct(this._distinct,this._conditions,A)};v.prototype.distinct=function(F,A,B){if(typeof F==="function"||typeof A==="function"||typeof B==="function"||typeof arguments[3]==="function")throw new M2("Query.prototype.distinct() no longer accepts a callback");if(this.op="distinct",this._validateOp(),X6.canMerge(A))this.merge(A),lF(this);else if(A!=null)this.error(new u4(A,"filter","distinct"));if(F!=null)this._distinct=F;if(B!=null)this.setOptions(B);return this};v.prototype.sort=function(F,A){if(arguments.length>2)throw new Error("sort() takes at most 2 arguments");if(A!=null&&typeof A!=="object")throw new Error("sort() options argument must be an object or nullish");if(this.options.sort==null)this.options.sort={};if(A&&A.override)this.options.sort={};let B=this.options.sort;if(typeof F==="string"){let D=F.indexOf(" ")===-1?[F]:F.split(" ");for(let J of D){let X=J[0]=="-"?-1:1;if(X===-1)J=J.slice(1);if(sJ.has(J))continue;B[J]=X}}else if(Array.isArray(F))for(let D of F){if(!Array.isArray(D))throw new TypeError("Invalid sort() argument, must be array of arrays");let J=""+D[0];if(sJ.has(J))continue;B[J]=Dz(D[1],J)}else if(typeof F==="object"&&F!=null&&!(F instanceof Map))for(let D of Object.keys(F)){if(sJ.has(D))continue;B[D]=Dz(F[D],D)}else if(F instanceof Map)for(let D of F.keys()){if(D=""+D,sJ.has(D))continue;B[D]=Dz(F.get(D),D)}else if(F!=null)throw new TypeError("Invalid sort() argument. Must be a string, object, array, or map.");return this};/*!
803
+ * Convert sort values
804
+ */function Dz(F,A){if(F===1||F==="asc"||F==="ascending")return 1;if(F===-1||F==="desc"||F==="descending")return-1;if(F?.$meta!=null)return{$meta:F.$meta};throw new TypeError("Invalid sort value: { "+A+": "+F+" }")}v.prototype.deleteOne=function F(A,B){if(typeof A==="function"||typeof B==="function"||typeof arguments[2]==="function")throw new M2("Query.prototype.deleteOne() no longer accepts a callback");if(this.op="deleteOne",this.setOptions(B),X6.canMerge(A))this.merge(A),lF(this);else if(A!=null)this.error(new u4(A,"filter","deleteOne"));return this};v.prototype._deleteOne=async function F(){if(this._applyTranslateAliases(),this._castConditions(),this.error()!=null)throw this.error();let A=this._optionsForExec();return this.mongooseCollection.deleteOne(this._conditions,A)};v.prototype.deleteMany=function(F,A){if(typeof F==="function"||typeof A==="function"||typeof arguments[2]==="function")throw new M2("Query.prototype.deleteMany() no longer accepts a callback");if(this.setOptions(A),this.op="deleteMany",X6.canMerge(F))this.merge(F),lF(this);else if(F!=null)this.error(new u4(F,"filter","deleteMany"));return this};v.prototype._deleteMany=async function F(){if(this._applyTranslateAliases(),this._castConditions(),this.error()!=null)throw this.error();let A=this._optionsForExec();return this.mongooseCollection.deleteMany(this._conditions,A)};function $h(F,A,B,D,J,X,Z,Y){if(D.includeResultMetadata&&A==null)return $(null),null;cF.createModelAndInit(F,A,J,X,D,Z,$);function $(G,E){if(G)return Y(G);if(D.includeResultMetadata){if(A&&E){if(D.session!=null)E.$session(D.session);B.value=E}else B.value=null;return Y(null,B)}if(D.session!=null)E.$session(D.session);Y(null,E)}}function lF(F){if(!F||!F.model||!F.model.schema)return;let A=F.model.schema;if(A&&A.discriminatorMapping&&!A.discriminatorMapping.isRoot)F._conditions[A.discriminatorMapping.key]=A.discriminatorMapping.value}v.prototype.findOneAndUpdate=function(F,A,B){if(typeof F==="function"||typeof A==="function"||typeof B==="function"||typeof arguments[3]==="function")throw new M2("Query.prototype.findOneAndUpdate() no longer accepts a callback");switch(this.op="findOneAndUpdate",this._validateOp(),this._validate(),arguments.length){case 2:B=void 0;break;case 1:A=F,F=B=void 0;break}if(X6.canMerge(F))this.merge(F);else if(F!=null)this.error(new u4(F,"filter","findOneAndUpdate"));if(A)this._mergeUpdate(A);if(B=B?c2(B):{},B.projection)this.select(B.projection),delete B.projection;if(B.fields)this.select(B.fields),delete B.fields;let D=this&&this.model&&this.model.base&&this.model.base.options&&this.model.base.options.returnOriginal;if(B.new==null&&B.returnDocument==null&&B.returnOriginal==null&&D!=null)B.returnOriginal=D;return this.setOptions(B),this};v.prototype._findOneAndUpdate=async function F(){if(this._applyTranslateAliases(),this._castConditions(),Hh(this),this.error())throw this.error();if(mF(this.options,this.model.db.options,this.model.base.options),dF(this.options,this.model.db.options,this.model.base.options),"strict"in this.options)this._mongooseOptions.strict=this.options.strict;let A=this._optionsForExec(this.model);qh(A),this._update=this._castUpdate(this._update);let B=Object.assign({},A,{setDefaultsOnInsert:this._mongooseOptions.setDefaultsOnInsert});if(this._update=Eh(this._conditions,this.model.schema,this._update,B),!this._update||Object.keys(this._update).length===0)if(A.upsert){let Z=c2(this._update);delete Z._id,this._update={$set:Z}}else return this._executionStack=null,await this._findOne();else if(this._update instanceof Error)throw this._update;else if(this._update.$set&&Object.keys(this._update.$set).length===0)delete this._update.$set;if(Zz(this,"runValidators",!1))await this.validate(this._update,A,!1);if(this._update.toBSON)this._update=this._update.toBSON();let J=await this.mongooseCollection.findOneAndUpdate(this._conditions,this._update,A);for(let Z of this._transforms)J=Z(J);let X=!A.includeResultMetadata?J:J.value;return new Promise((Z,Y)=>{this._completeOne(X,J,A.projection,($,G)=>{if($)return Y($);Z(G)})})};v.prototype.findOneAndDelete=function(F,A){if(typeof F==="function"||typeof A==="function"||typeof arguments[2]==="function")throw new M2("Query.prototype.findOneAndDelete() no longer accepts a callback");if(this.op="findOneAndDelete",this._validateOp(),this._validate(),X6.canMerge(F))this.merge(F);return A&&this.setOptions(A),this};v.prototype._findOneAndDelete=async function F(){if(this._applyTranslateAliases(),this._castConditions(),this.error()!=null)throw this.error();let A=this.options.includeResultMetadata,B=this._conditions,D=this._optionsForExec(this.model),J=await this.mongooseCollection.findOneAndDelete(B,D);for(let Z of this._transforms)J=Z(J);let X=!A?J:J.value;return new Promise((Z,Y)=>{this._completeOne(X,J,D.projection,($,G)=>{if($)return Y($);Z(G)})})};v.prototype.findOneAndReplace=function(F,A,B){if(typeof F==="function"||typeof A==="function"||typeof B==="function"||typeof arguments[4]==="function")throw new M2("Query.prototype.findOneAndReplace() no longer accepts a callback");if(this.op="findOneAndReplace",this._validateOp(),this._validate(),X6.canMerge(F))this.merge(F);else if(F!=null)this.error(new u4(F,"filter","findOneAndReplace"));if(A!=null)this._mergeUpdate(A);B=B||{};let D=this&&this.model&&this.model.base&&this.model.base.options&&this.model.base.options.returnOriginal;if(B.new==null&&B.returnDocument==null&&B.returnOriginal==null&&D!=null)B.returnOriginal=D;return this.setOptions(B),this};v.prototype._findOneAndReplace=async function F(){if(this._applyTranslateAliases(),this._castConditions(),this.error()!=null)throw this.error();if("strict"in this.options)this._mongooseOptions.strict=this.options.strict,delete this.options.strict;let A=this._conditions,B=this._optionsForExec();qh(B);let D=this.options.includeResultMetadata,J={skipId:!0};if("strict"in this._mongooseOptions)J.strict=this._mongooseOptions.strict;let X=Zz(this,"runValidators",!1);try{let $=new this.model(this._update,null,J);if(X)await $.validate();else if($.$__.validationError)throw $.$__.validationError;this._update=$.toBSON()}catch($){if($ instanceof Zh)throw $;let G=new Zh;throw G.errors[$.path]=$,G}let Z=await this.mongooseCollection.findOneAndReplace(A,this._update,B);for(let $ of this._transforms)Z=$(Z);let Y=!D?Z:Z.value;return new Promise(($,G)=>{this._completeOne(Y,Z,B.projection,(E,H)=>{if(E)return G(E);$(H)})})};function qh(F){if("new"in F)F.returnDocument=F.new?"after":"before",delete F.new;if("returnOriginal"in F)F.returnDocument=F.returnOriginal?"before":"after",delete F.returnOriginal;if(typeof F.returnDocument==="string")F.returnOriginal=F.returnDocument==="before"}function Zz(F,A,B){let D=F._optionsForExec(F.model);if(A in D)return D[A];if(A in F.model.base.options)return F.model.base.options[A];return B}/*!
805
+ * ignore
806
+ */function Xz(F,A,B,D,J,X){if(J.lean&&typeof J.lean.transform==="function"){J.lean.transform(A);for(let Z=0;Z<F.childSchemas.length;Z++){let Y=B?B+"."+F.childSchemas[Z].model.path:F.childSchemas[Z].model.path,$=F.childSchemas[Z].schema,G=Gh.get(Y,A);if(G==null)continue;if(Array.isArray(G))for(let E=0;E<G.length;E++)J.lean.transform(G[E]);else J.lean.transform(G);Xz($,G,Y,D,J)}if(X)return X(null,A);else return}if(J.includeResultMetadata)return X(null,D);return X(null,A)}/*!
807
+ * ignore
808
+ */function Wh(F,A,B,D){if(D.lean&&typeof D.lean.transform==="function"){for(let J of A)D.lean.transform(J);for(let J=0;J<F.childSchemas.length;J++){let X=B?B+"."+F.childSchemas[J].model.path:F.childSchemas[J].model.path,Z=F.childSchemas[J].schema,Y=Gh.get(X,A);if(Y==null)continue;Y=Y.flat();for(let $=0;$<Y.length;$++)D.lean.transform(Y[$]);Wh(Z,Y,X,D)}}return A}v.prototype._mergeUpdate=function(F){if(!this._update)this._update=Array.isArray(F)?[]:{};if(F==null||typeof F==="object"&&Object.keys(F).length===0)return;if(F instanceof v){if(Array.isArray(this._update))throw new Error("Cannot mix array and object updates");if(F._update)r1.mergeClone(this._update,F._update)}else if(Array.isArray(F)){if(!Array.isArray(this._update))throw new Error("Cannot mix array and object updates");this._update=this._update.concat(F)}else{if(Array.isArray(this._update))throw new Error("Cannot mix array and object updates");r1.mergeClone(this._update,F)}};/*!
809
+ * ignore
810
+ */async function Yz(F){if(this._applyTranslateAliases(),this._castConditions(),Hh(this),this.error()!=null)throw this.error();let A=this._conditions,B=this._optionsForExec(this.model);this._update=c2(this._update,B);let D=F==="replaceOne";if(D)this._update=new this.model(this._update,null,!0);else{if(this._update=this._castUpdate(this._update),this._update==null||Object.keys(this._update).length===0)return{acknowledged:!1};let X=Object.assign({},B,{setDefaultsOnInsert:this._mongooseOptions.setDefaultsOnInsert});this._update=Eh(this._conditions,this.model.schema,this._update,X)}if(Array.isArray(B.arrayFilters))B.arrayFilters=nW1(this._update,B.arrayFilters);if(Zz(this,"runValidators",!1))await this.validate(this._update,B,D);if(this._update.toBSON)this._update=this._update.toBSON();return this.mongooseCollection[F](A,this._update,B)}v.prototype.validate=async function F(A,B,D){if(typeof arguments[3]==="function")throw new M2("Query.prototype.validate() no longer accepts a callback");if(await Ch(this,"validate"),D)await A.$validate();else await new Promise((J,X)=>{tW1(this,this.model.schema,A,B,(Z)=>{if(Z!=null)return X(Z);J()})});await zh(this,null,null,"validate")};v.prototype._updateMany=async function F(){return Yz.call(this,"updateMany")};v.prototype._updateOne=async function F(){return Yz.call(this,"updateOne")};v.prototype._replaceOne=async function F(){return Yz.call(this,"replaceOne")};v.prototype.updateMany=function(F,A,B,D){if(typeof B==="function")D=B,B=null;else if(typeof A==="function")D=A,A=F,F={},B=null;else if(typeof F==="function")D=F,F=void 0,A=void 0,B=void 0;else if(typeof F==="object"&&!A&&!B&&!D)A=F,F=void 0,B=void 0,D=void 0;return $z(this,"updateMany",F,A,B,D)};v.prototype.updateOne=function(F,A,B,D){if(typeof B==="function")D=B,B=null;else if(typeof A==="function")D=A,A=F,F={},B=null;else if(typeof F==="function")D=F,F=void 0,A=void 0,B=void 0;else if(typeof F==="object"&&!A&&!B&&!D)A=F,F=void 0,B=void 0,D=void 0;return $z(this,"updateOne",F,A,B,D)};v.prototype.replaceOne=function(F,A,B,D){if(typeof B==="function")D=B,B=null;else if(typeof A==="function")D=A,A=F,F={},B=null;else if(typeof F==="function")D=F,F=void 0,A=void 0,B=void 0;else if(typeof F==="object"&&!A&&!B&&!D)A=F,F=void 0,B=void 0,D=void 0;return $z(this,"replaceOne",F,A,B,D)};function $z(F,A,B,D,J,X){if(F.op=A,F._validateOp(),D=D||{},J!=null){if("strict"in J)F._mongooseOptions.strict=J.strict}if(!(B instanceof v)&&B!=null&&B.toString()!=="[object Object]")F.error(new u4(B,"filter",A));else F.merge(B);if(r1.isObject(J))F.setOptions(J);if(F._mergeUpdate(D),X)return F.exec(X),F;return F}v.prototype.transform=function(F){return this._transforms.push(F),this};v.prototype.orFail=function(F){return this.transform((A)=>{switch(this.op){case"find":if(A.length===0)throw P8(F,this);break;case"findOne":if(A==null)throw P8(F,this);break;case"replaceOne":case"updateMany":case"updateOne":if(A&&A.matchedCount===0)throw P8(F,this);break;case"findOneAndDelete":case"findOneAndUpdate":case"findOneAndReplace":if(this.options.includeResultMetadata&&A!=null&&A.value==null)throw P8(F,this);if(!this.options.includeResultMetadata&&A==null)throw P8(F,this);break;case"deleteMany":case"deleteOne":if(A.deletedCount===0)throw P8(F,this);break;default:break}return A}),this};function P8(F,A){if(typeof F==="function")F=F.call(A);if(F==null)F=new fW1(A.getQuery(),A.model.modelName);return F}v.prototype.isPathSelectedInclusive=function(F){return pW1(this._fields,F)};v.prototype.exec=async function F(A){if(typeof A==="function"||arguments.length>=2&&typeof arguments[1]==="function")throw new M2("Query.prototype.exec() no longer accepts a callback");if(typeof A==="string")this.op=A;if(this.op==null)throw new M2("Query must have `op` before executing");if(this.model==null)throw new M2("Query must have an associated model before executing");if(this._validateOp(),!this.op)return;if(this.options&&this.options.sort){if(Object.keys(this.options.sort).includes(""))throw new Error('Invalid field "" passed to sort()')}let B="_"+this.op;if(this.op==="distinct")B="__distinct";if(this._executionStack!=null){let Z=this.toString();if(Z.length>60)Z=Z.slice(0,60)+"...";let Y=new M2("Query was already executed: "+Z);throw Y.originalStack=this._executionStack,Y}else this._executionStack=new Error().stack;let D=null;try{await Bz1(this)}catch(Z){if(Z instanceof Jz.skipWrappedFunction)D=Z;else throw Z}let J,X=null;try{await Ch(this),J=D?D.args[0]:await this[B]();for(let Z of this._transforms)J=Z(J)}catch(Z){if(Z instanceof Jz.skipWrappedFunction)J=Z.args[0];else X=Z;X=this.model.schema._transformDuplicateKeyError(X)}return J=await zh(this,J,X),await Az1(this),J};/*!
811
+ * ignore
812
+ */function Az1(F){return new Promise((A,B)=>{F._hooks.execPost("exec",F,[],{},(D)=>{if(D)return B(D);A()})})}/*!
813
+ * ignore
814
+ */function zh(F,A,B,D){if(F._queryMiddleware==null){if(B!=null)throw B;return A}return new Promise((J,X)=>{let Z=B?{error:B}:{};F._queryMiddleware.execPost(D||F.op,F,[A],Z,(Y,$)=>{if(Y)return X(Y);J($)})})}/*!
815
+ * ignore
816
+ */function Bz1(F){return new Promise((A,B)=>{F._hooks.execPre("exec",F,[],(D)=>{if(D!=null)return B(D);A()})})}/*!
817
+ * ignore
818
+ */function Ch(F,A){if(F._queryMiddleware==null)return;return new Promise((B,D)=>{F._queryMiddleware.execPre(A||F.op,F,[],(J)=>{if(J!=null)return D(J);B()})})}v.prototype.then=function(F,A){return this.exec().then(F,A)};v.prototype.catch=function(F){return this.exec().then(null,F)};v.prototype.finally=function(F){return this.exec().finally(F)};v.prototype[Symbol.toStringTag]=function F(){return`Query { ${this.op} }`};v.prototype.pre=function(F){return this._hooks.pre("exec",F),this};v.prototype.post=function(F){return this._hooks.post("exec",F),this};v.prototype._castUpdate=function F(A){let B=this.schema,D=B.options.discriminatorKey,J=B._baseSchema?B._baseSchema:B;if(this._mongooseOptions.overwriteDiscriminatorKey&&A[D]!=null&&J.discriminators){let Z=Object.values(J.discriminators).find((Y)=>Y.discriminatorMapping.value===A[D]);if(Z!=null)B=Z}let X;if("upsert"in this.options)X=this.options.upsert;return hW1(B,A,{strict:this._mongooseOptions.strict,upsert:X,arrayFilters:this.options.arrayFilters,overwriteDiscriminatorKey:this._mongooseOptions.overwriteDiscriminatorKey,overwriteImmutable:this._mongooseOptions.overwriteImmutable},this,this._conditions)};v.prototype.populate=function(){let F=Array.from(arguments);if(!F.some(Boolean))return this;let A=r1.populate.apply(null,F);if(this.options!=null){let J=this.options.readConcern,X=this.options.readPreference;for(let Z of A){if(J!=null&&(Z&&Z.options&&Z.options.readConcern)==null)Z.options=Z.options||{},Z.options.readConcern=J;if(X!=null&&(Z&&Z.options&&Z.options.readPreference)==null)Z.options=Z.options||{},Z.options.readPreference=X}}let B=this._mongooseOptions;if(B.lean!=null){let J=B.lean;for(let X of A)if((X&&X.options&&X.options.lean)==null)X.options=X.options||{},X.options.lean=J}if(!r1.isObject(B.populate))B.populate={};let D=B.populate;for(let J of A){let X=J.path;if(D[X]&&D[X].populate&&J.populate)J.populate=D[X].populate.concat(J.populate);D[J.path]=J}return this};v.prototype.getPopulatedPaths=function F(){let A=this._mongooseOptions.populate||{},B=Object.keys(A);for(let D of Object.keys(A)){let J=A[D];if(!Array.isArray(J.populate))continue;Kh(B,J.populate,D+".")}return B};/*!
819
+ * ignore
820
+ */function Kh(F,A,B){for(let D of A){if(F.push(B+D.path),!Array.isArray(D.populate))continue;Kh(F,D.populate,B+D.path+".")}}v.prototype.cast=function(F,A){A||(A=this._conditions),F=F||this.model;let B=F.schema.options.discriminatorKey;if(A!=null&&A.hasOwnProperty(B))F=mW1(F.discriminators,A[B])||F;let D={upsert:this.options&&this.options.upsert};if(this.options){if("strict"in this.options)D.strict=this.options.strict;if("strictQuery"in this.options)D.strictQuery=this.options.strictQuery}if("sanitizeFilter"in this._mongooseOptions)D.sanitizeFilter=this._mongooseOptions.sanitizeFilter;try{return yW1(F.schema,A,D,this)}catch(J){if(typeof J.setModel==="function")J.setModel(F);throw J}};v.prototype._castFields=function F(A){let B,D,J,X,Z;if(A){J=Object.keys(A),D=[];for(let Y=0;Y<J.length;++Y)if(X=J[Y],A[X].$elemMatch)B||(B={}),B[X]=A[X],D.push(X)}if(B){try{Z=this.cast(this.model,B)}catch(Y){return Y}for(let Y=0;Y<D.length;++Y)X=D[Y],A[X]=Z[X]}return A};v.prototype._applyPaths=function F(){if(!this.model)return;this._fields=this._fields||{};let A=void 0;if(this.model!=null&&r1.hasUserDefinedProperty(this.model.db.options,"sanitizeProjection"))A=this.model.db.options.sanitizeProjection;else if(this.model!=null&&r1.hasUserDefinedProperty(this.model.base.options,"sanitizeProjection"))A=this.model.base.options.sanitizeProjection;else A=this._mongooseOptions.sanitizeProjection;if(this._mongooseOptions.schemaLevelProjections??!0)cF.applyPaths(this._fields,this.model.schema,A);let D=!0;if("selectPopulatedPaths"in this.model.base.options)D=this.model.base.options.selectPopulatedPaths;if("selectPopulatedPaths"in this.model.schema.options)D=this.model.schema.options.selectPopulatedPaths;if(D)rW1(this._fields,this._userProvidedFields,this._mongooseOptions.populate)};v.prototype.cursor=function F(A){if(A)this.setOptions(A);try{this.cast(this.model)}catch(B){return new Xh(this)._markError(B)}return new Xh(this)};v.prototype.tailable=function(F,A){if(F!=null&&typeof F.constructor==="function"&&F.constructor.name==="Object")A=F,F=!0;if(F===void 0)F=!0;if(A&&typeof A==="object")for(let B of Object.keys(A))if(B==="awaitData"||B==="awaitdata")this.options.awaitData=!!A[B];else this.options[B]=A[B];return this.options.tailable=arguments.length?!!F:!0,this};v.prototype.near=function(){let F=[],A=this._mongooseOptions.nearSphere;if(arguments.length===1)if(Array.isArray(arguments[0]))F.push({center:arguments[0],spherical:A});else if(typeof arguments[0]==="string")F.push(arguments[0]);else if(r1.isObject(arguments[0])){if(typeof arguments[0].spherical!=="boolean")arguments[0].spherical=A;F.push(arguments[0])}else throw new TypeError("invalid argument");else if(arguments.length===2)if(typeof arguments[0]==="number"&&typeof arguments[1]==="number")F.push({center:[arguments[0],arguments[1]],spherical:A});else if(typeof arguments[0]==="string"&&Array.isArray(arguments[1]))F.push(arguments[0]),F.push({center:arguments[1],spherical:A});else if(typeof arguments[0]==="string"&&r1.isObject(arguments[1])){if(F.push(arguments[0]),typeof arguments[1].spherical!=="boolean")arguments[1].spherical=A;F.push(arguments[1])}else throw new TypeError("invalid argument");else if(arguments.length===3)if(typeof arguments[0]==="string"&&typeof arguments[1]==="number"&&typeof arguments[2]==="number")F.push(arguments[0]),F.push({center:[arguments[1],arguments[2]],spherical:A});else throw new TypeError("invalid argument");else throw new TypeError("invalid argument");return v.base.near.apply(this,F)};v.prototype.nearSphere=function(){return this._mongooseOptions.nearSphere=!0,this.near.apply(this,arguments),this};if(Symbol.asyncIterator!=null)v.prototype[Symbol.asyncIterator]=function(){return this.cursor().transformNull()._transformForAsyncIterator()};v.prototype.box=function(F,A){if(!Array.isArray(F)&&r1.isObject(F))A=F.ur,F=F.ll;return v.base.box.call(this,F,A)};v.prototype.center=v.base.circle;v.prototype.centerSphere=function(){if(arguments[0]!=null&&typeof arguments[0].constructor==="function"&&arguments[0].constructor.name==="Object")arguments[0].spherical=!0;if(arguments[1]!=null&&typeof arguments[1].constructor==="function"&&arguments[1].constructor.name==="Object")arguments[1].spherical=!0;v.base.circle.apply(this,arguments)};v.prototype.selectedInclusively=function F(){return lW1(this._fields)};v.prototype.selectedExclusively=function F(){return cW1(this._fields)};v.prototype.model;/*!
821
+ * Export
822
+ */Uh.exports=v});var Rh=K((SM1,Vh)=>{/*!
823
+ * Module dependencies.
824
+ */var tJ=z1(),Lh=import.meta.require("stream").Readable,Dz1=bW(),Jz1=Z6(),Xz1=import.meta.require("util");function l2(F){Lh.call(this,{autoDestroy:!0,objectMode:!0}),this.cursor=null,this.agg=F,this._transforms=[];let A=F._model;delete F.options.cursor.useMongooseAggCursor,this._mongooseOptions={},Zz1(A,this,F)}Xz1.inherits(l2,Lh);/*!
825
+ * ignore
826
+ */function Zz1(F,A,B){if(!F.collection.buffer)F.hooks.execPre("aggregate",B,function(){if(typeof B.options?.cursor?.transform==="function")A._transforms.push(B.options.cursor.transform);A.cursor=F.collection.aggregate(B._pipeline,B.options||{}),A.emit("cursor",A.cursor)});else F.collection.emitter.once("queue",function(){F.hooks.execPre("aggregate",B,function(){if(typeof B.options?.cursor?.transform==="function")A._transforms.push(B.options.cursor.transform);A.cursor=F.collection.aggregate(B._pipeline,B.options||{}),A.emit("cursor",A.cursor)})})}l2.prototype._read=function(){let F=this;oJ(this,function(A,B){if(A)return F.emit("error",A);if(!B){F.push(null),F.cursor.close(function(D){if(D)return F.emit("error",D)});return}F.push(B)})};if(Symbol.asyncIterator!=null){let F="Mongoose does not support using async iterators with an existing aggregation cursor. See https://bit.ly/mongoose-async-iterate-aggregation";l2.prototype[Symbol.asyncIterator]=function(){throw new tJ(F)}}Object.defineProperty(l2.prototype,"map",{value:function(F){return this._transforms.push(F),this},enumerable:!0,configurable:!0,writable:!0});l2.prototype._markError=function(F){return this._error=F,this};l2.prototype.close=async function F(){if(typeof arguments[0]==="function")throw new tJ("AggregationCursor.prototype.close() no longer accepts a callback");try{await this.cursor.close()}catch(A){throw this.listeners("error").length>0&&this.emit("error",A),A}this.emit("close")};l2.prototype._destroy=function F(A,B){let D=null;if(!this.cursor)D=new Promise((J)=>{this.once("cursor",J)});else D=Promise.resolve();return D.then(()=>this.cursor.close()).then(()=>{this._closed=!0,B()}).catch((J)=>{B(J)}),this};l2.prototype.next=async function F(){if(typeof arguments[0]==="function")throw new tJ("AggregationCursor.prototype.next() no longer accepts a callback");return new Promise((A,B)=>{oJ(this,(D,J)=>{if(D!=null)return B(D);A(J)})})};l2.prototype.eachAsync=function(F,A){if(typeof arguments[2]==="function")throw new tJ("AggregationCursor.prototype.eachAsync() no longer accepts a callback");let B=this;if(typeof A==="function")A={};return A=A||{},Dz1(function(D){return oJ(B,D)},F,A)};if(Symbol.asyncIterator!=null)l2.prototype[Symbol.asyncIterator]=function(){return this.transformNull()._transformForAsyncIterator()};/*!
827
+ * ignore
828
+ */l2.prototype._transformForAsyncIterator=function(){if(this._transforms.indexOf(Qh)===-1)this.map(Qh);return this};/*!
829
+ * ignore
830
+ */l2.prototype.transformNull=function(F){if(arguments.length===0)F=!0;return this._mongooseOptions.transformNull=F,this};/*!
831
+ * ignore
832
+ */function Qh(F){return F==null?{done:!0}:{value:F,done:!1}}l2.prototype.addCursorFlag=function(F,A){let B=this;return Yz1(this,function(){B.cursor.addCursorFlag(F,A)}),this};/*!
833
+ * ignore
834
+ */function Yz1(F,A){if(F.cursor)return A();F.once("cursor",function(){A()})}function oJ(F,A){let B=A;if(F._transforms.length)B=function(D,J){if(D||J===null&&!F._mongooseOptions.transformNull)return A(D,J);A(D,F._transforms.reduce(function(X,Z){return Z(X)},J))};if(F._error)return Jz1(function(){B(F._error)});if(F.cursor)return F.cursor.next().then((D)=>{if(!D)return B(null,null);B(null,D)},(D)=>B(D));else F.once("cursor",function(){oJ(F,A)})}Vh.exports=l2});var Gz=K((uM1,wh)=>{wh.exports=function F(A,B,D){let J=B&&B.discriminatorMapping;if(D=D||"",J&&!J.isRoot){let X=A,Z=(D.length>0?D+".":D)+J.key,Y=J.value;if(X[0]!=null&&X[0].$match&&(X[0].$match[Z]===void 0||X[0].$match[Z]===Y))X[0].$match[Z]=Y;else if(X[0]!=null&&X[0].$geoNear)X[0].$geoNear.query=X[0].$geoNear.query||{},X[0].$geoNear.query[Z]=Y;else if(X[0]!=null&&X[0].$search)if(X[1]&&X[1].$match!=null)X[1].$match[Z]=X[1].$match[Z]||Y;else{let $={};$[Z]=Y,X.splice(1,0,{$match:$})}else{let $={};$[Z]=Y,X.unshift({$match:$})}}}});var Nh=K((xM1,Ih)=>{Ih.exports=function F(A){if(!Array.isArray(A))return;for(let B of A){if(B==null)continue;let D=B.$group||B.$bucket||B.$bucketAuto;if(D!=null)for(let X of Object.keys(D))$z1(D[X]);let J=Object.keys(B)[0];if(J&&typeof B[J]==="object"){let X=B[J];for(let Z of Object.keys(X))if(X[Z]!=null&&X[Z].$function!=null&&typeof X[Z].$function.body==="function")X[Z].$function.body=X[Z].$function.body.toString()}if(B.$facet!=null)for(let X of Object.keys(B.$facet))F(B.$facet[X])}};function $z1(F){if(F==null||F.$accumulator==null)return;for(let A of["init","accumulate","merge","finalize"])if(typeof F.$accumulator[A]==="function")F.$accumulator[A]=String(F.$accumulator[A])}});var qz=K((fM1,kh)=>{/*!
835
+ * Module dependencies
836
+ */var Th=Rh(),Ez=z1(),jh=rJ(),{applyGlobalMaxTimeMS:Gz1,applyGlobalDiskUse:Ez1}=hW(),Hz1=Z0(),qz1=I2(),Hz=Gz(),Wz1=Nh(),Ph=X1(),zz1=jh.prototype.read,Cz1=jh.prototype.readConcern,Mh=new Set(["$$DESCEND","$$PRUNE","$$KEEP"]);function Q1(F,A){if(this._pipeline=[],this._model=A,this.options={},arguments.length===1&&Array.isArray(F))this.append.apply(this,F)}Q1.prototype.options;Q1.prototype._optionsForExec=function(){let F=this.options||{},A=this.model()?.db?.base.transactionAsyncLocalStorage?.getStore();if(!F.hasOwnProperty("session")&&A?.session!=null)F.session=A.session;return F};Q1.prototype.model=function(F){if(arguments.length===0)return this._model;if(this._model=F,F.schema!=null){if(this.options.readPreference==null&&F.schema.options.read!=null)this.options.readPreference=F.schema.options.read;if(this.options.collation==null&&F.schema.options.collation!=null)this.options.collation=F.schema.options.collation}return F};Q1.prototype.append=function(){let F=arguments.length===1&&Array.isArray(arguments[0])?arguments[0]:[...arguments];if(!F.every(Kz1))throw new Error("Arguments must be aggregate pipeline operators");return this._pipeline=this._pipeline.concat(F),this};Q1.prototype.addFields=function(F){if(typeof F!=="object"||F===null||Array.isArray(F))throw new Error("Invalid addFields() argument. Must be an object");return this.append({$addFields:Object.assign({},F)})};Q1.prototype.project=function(F){let A={};if(typeof F==="object"&&!Array.isArray(F))Object.keys(F).forEach(function(B){A[B]=F[B]});else if(arguments.length===1&&typeof F==="string")F.split(/\s+/).forEach(function(B){if(!B)return;let D=B[0]==="-"?0:1;if(D===0)B=B.substring(1);A[B]=D});else throw new Error("Invalid project() argument. Must be string or object");return this.append({$project:A})};Q1.prototype.near=function(F){let A={};return A.$geoNear=F,this.append(A)};/*!
837
+ * define methods
838
+ */"group match skip limit out densify fill".split(" ").forEach(function(F){Q1.prototype[F]=function(A){let B={};return B["$"+F]=A,this.append(B)}});Q1.prototype.unwind=function(){let F=[...arguments],A=[];for(let B of F)if(B&&typeof B==="object")A.push({$unwind:B});else if(typeof B==="string")A.push({$unwind:B[0]==="$"?B:"$"+B});else throw new Error('Invalid arg "'+B+'" to unwind(), must be string or object');return this.append.apply(this,A)};Q1.prototype.replaceRoot=function(F){let A;if(typeof F==="string")A=F.startsWith("$")?F:"$"+F;else A=F;return this.append({$replaceRoot:{newRoot:A}})};Q1.prototype.count=function(F){return this.append({$count:F})};Q1.prototype.sortByCount=function(F){if(F&&typeof F==="object")return this.append({$sortByCount:F});else if(typeof F==="string")return this.append({$sortByCount:F[0]==="$"?F:"$"+F});else throw new TypeError('Invalid arg "'+F+'" to sortByCount(), must be string or object')};Q1.prototype.lookup=function(F){return this.append({$lookup:F})};Q1.prototype.graphLookup=function(F){let A={};if(F){if(!Ph.isObject(F))throw new TypeError("Invalid graphLookup() argument. Must be an object.");Ph.mergeClone(A,F);let B=A.startWith;if(B&&typeof B==="string")A.startWith=A.startWith.startsWith("$")?A.startWith:"$"+A.startWith}return this.append({$graphLookup:A})};Q1.prototype.sample=function(F){return this.append({$sample:{size:F}})};Q1.prototype.sort=function(F){let A={};if(qz1(F)==="Object"){let B=["desc","descending",-1];Object.keys(F).forEach(function(D){if(F[D]instanceof Object&&F[D].$meta){A[D]=F[D];return}A[D]=B.indexOf(F[D])===-1?1:-1})}else if(arguments.length===1&&typeof F==="string")F.split(/\s+/).forEach(function(B){if(!B)return;let D=B[0]==="-"?-1:1;if(D===-1)B=B.substring(1);A[B]=D});else throw new TypeError("Invalid sort() argument. Must be a string or object.");return this.append({$sort:A})};Q1.prototype.unionWith=function(F){return this.append({$unionWith:F})};Q1.prototype.read=function(F,A){return zz1.call(this,F,A),this};Q1.prototype.readConcern=function(F){return Cz1.call(this,F),this};Q1.prototype.redact=function(F,A,B){if(arguments.length===3){if(typeof A==="string"&&!Mh.has(A)||typeof B==="string"&&!Mh.has(B))throw new Error("If thenExpr or elseExpr is string, it must be either $$DESCEND, $$PRUNE or $$KEEP");F={$cond:{if:F,then:A,else:B}}}else if(arguments.length!==1)throw new TypeError("Invalid arguments");return this.append({$redact:F})};Q1.prototype.explain=async function F(A){if(typeof A==="function"||typeof arguments[1]==="function")throw new Ez("Aggregate.prototype.explain() no longer accepts a callback");let B=this._model;if(!this._pipeline.length)throw new Error("Aggregate has empty pipeline");Hz(this._pipeline,this._model.schema),await new Promise((Z,Y)=>{B.hooks.execPre("aggregate",this,($)=>{if($){let G={error:$};return B.hooks.execPost("aggregate",this,[null],G,(E)=>{Y(E)})}else Z()})});let D=B.collection.aggregate(this._pipeline,this.options);if(A==null)A=!0;let J=null;try{J=await D.explain(A)}catch(Z){await new Promise((Y,$)=>{let G={error:Z};B.hooks.execPost("aggregate",this,[null],G,(E)=>{if(E)return $(E);return Y()})})}let X={error:null};return await new Promise((Z,Y)=>{B.hooks.execPost("aggregate",this,[J],X,($)=>{if($)return Y($);return Z()})}),J};Q1.prototype.allowDiskUse=function(F){return this.options.allowDiskUse=F,this};Q1.prototype.hint=function(F){return this.options.hint=F,this};Q1.prototype.session=function(F){if(F==null)delete this.options.session;else this.options.session=F;return this};Q1.prototype.option=function(F){for(let A in F)this.options[A]=F[A];return this};Q1.prototype.cursor=function(F){return this._optionsForExec(),this.options.cursor=F||{},new Th(this)};Q1.prototype.collation=function(F){return this.options.collation=F,this};Q1.prototype.facet=function(F){return this.append({$facet:F})};Q1.prototype.search=function(F){return this.append({$search:F})};Q1.prototype.pipeline=function(){return this._pipeline};Q1.prototype.exec=async function F(){if(!this._model)throw new Error("Aggregate not bound to any Model");if(typeof arguments[0]==="function")throw new Ez("Aggregate.prototype.exec() no longer accepts a callback");let A=this._model,B=this._model.collection;if(Gz1(this.options,A.db.options,A.base.options),Ez1(this.options,A.db.options,A.base.options),this._optionsForExec(),this.options&&this.options.cursor)return new Th(this);if(Hz(this._pipeline,this._model.schema),Wz1(this._pipeline),await new Promise((Z,Y)=>{A.hooks.execPre("aggregate",this,($)=>{if($){let G={error:$};return A.hooks.execPost("aggregate",this,[null],G,(E)=>{Y(E)})}else Z()})}),!this._pipeline.length)throw new Ez("Aggregate has empty pipeline");let D=Hz1(this.options||{}),J;try{J=await(await B.aggregate(this._pipeline,D)).toArray()}catch(Z){await new Promise((Y,$)=>{let G={error:Z};A.hooks.execPost("aggregate",this,[null],G,(E)=>{if(E)return $(E);Y()})})}let X={error:null};return await new Promise((Z,Y)=>{A.hooks.execPost("aggregate",this,[J],X,($)=>{if($)return Y($);return Z()})}),J};Q1.prototype.then=function(F,A){return this.exec().then(F,A)};Q1.prototype.catch=function(F){return this.exec().then(null,F)};Q1.prototype.finally=function(F){return this.exec().finally(F)};if(Symbol.asyncIterator!=null)Q1.prototype[Symbol.asyncIterator]=function(){return this.cursor({useMongooseAggCursor:!0}).transformNull()._transformForAsyncIterator()};/*!
839
+ * Helpers
840
+ */function Kz1(F){if(typeof F!=="object"||F===null)return!1;let A=Object.keys(F);return A.length===1&&A[0][0]==="$"}Q1._prepareDiscriminatorPipeline=Hz;/*!
841
+ * Exports
842
+ */kh.exports=Q1});var Sh=K((_M1,Oh)=>{var Uz1=Z0();class Wz{constructor(F){if(F==null)return;Object.assign(this,Uz1(F))}}Wz.prototype.__subdocs=null;Oh.exports=Wz});var xh=K((gM1,uh)=>{uh.exports=function F(A,B){let D=Object.keys(B.paths),J=D.length;for(let X=0;X<J;++X){let Z="",Y=D[X],$=B.paths[Y],G=$.splitPath(),E=G.length,H=A;for(let q=0;q<E;++q){if(H==null)break;let W=G[q];if(Z+=(!Z.length?"":".")+W,q===E-1){if(typeof H[W]!=="undefined"){if($.$isSingleNested)F(H[W],$.caster.schema);else if($.$isMongooseDocumentArray&&Array.isArray(H[W]))H[W].forEach((C)=>F(C,$.schema));break}let z=$.getDefault(A,!1,{skipCast:!0});if(typeof z!=="undefined"){if(H[W]=z,$.$isSingleNested)F(z,$.caster.schema);else if($.$isMongooseDocumentArray&&Array.isArray(z))z.forEach((C)=>F(C,$.schema))}}else{if(H[W]==null)H[W]={};H=H[W]}}}}});var Cz=K((bM1,fh)=>{fh.exports=zz;function zz(F,A=new WeakSet,B=!1){if(A.has(F))return;A.add(F);for(let D of Object.keys(F.paths)){let J=F.paths[D];if(!J.schema)continue;if(zz(J.schema,A),!J.schema._applyDiscriminators)continue;if(J._appliedDiscriminators&&!B)continue;for(let X of J.schema._applyDiscriminators.keys()){let{schema:Z,options:Y}=J.schema._applyDiscriminators.get(X);zz(Z,A),J.discriminator(X,Z,B?{...Y,overwriteExisting:!0}:Y)}J._appliedDiscriminators=!0}}});var gh=K((yM1,_h)=>{var Qz1=W0(),Lz1=X1();_h.exports=function F(A,B){let D=Kz();function J(X,Z){Object.defineProperty(A.prototype,X,{get:function(){let Y={};for(let $ in Z.methods[X])Y[$]=Z.methods[X][$].bind(this);return Y},configurable:!0})}for(let X of Object.keys(B.methods)){let Z=B.methods[X];if(B.tree.hasOwnProperty(X))throw new Error('You have a method and a property in your schema both named "'+X+'"');if(typeof Z==="function"&&D.prototype[X]===Z){delete B.methods[X];continue}if(B.reserved[X]&&!Qz1(B,`methodOptions.${X}.suppressWarning`,!1))Lz1.warn(`mongoose: the method name "${X}" is used by mongoose internally, overwriting it may cause bugs. If you're sure you know what you're doing, you can suppress this error by using \`schema.method('${X}', fn, { suppressWarning: true })\`.`);if(typeof Z==="function")A.prototype[X]=Z;else J(X,B)}A.$appliedMethods=!0;for(let X of Object.keys(B.paths)){let Z=B.paths[X];if(Z.$isSingleNested&&!Z.caster.$appliedMethods)F(Z.caster,Z.schema);if(Z.$isMongooseDocumentArray&&!Z.Constructor.$appliedMethods)F(Z.Constructor,Z.schema)}}});var vh=K((vM1,yh)=>{var bh=WH(),Vz1=B8(),Rz1=vJ(),AX=X1().isPOJO;yh.exports=function F(A,B,D){if(B==null)return A;if(A==null)return A;let J=null;if(Rz1(B))J=!1;else if(Vz1(B))J=!0;if(J==null)return A;else if(J)return D=D||bh(B),eJ(A,B,D);else return D=D||bh(B),FX(A,B,D)};function eJ(F,A,B,D,J){if(F==null||typeof F!=="object")return F;if(Array.isArray(F))return F.map((Z)=>eJ(Z,A,B,D,J));let X={...F};D=J?D||{}:A;for(let Z of Object.keys(X)){let Y=J?J+"."+Z:Z;if(A.hasOwnProperty(Y)||D.hasOwnProperty(Z))if(AX(A[Y])||AX(D[Z]))X[Z]=eJ(X[Z],A,B,D[Z],Y);else delete X[Z];else if(B[Y])X[Z]=eJ(X[Z],A,B,D[Z],Y)}return X}function FX(F,A,B,D,J){if(F==null||typeof F!=="object")return F;if(Array.isArray(F))return F.map((Z)=>FX(Z,A,B,D,J));let X={...F};D=J?D||{}:A;for(let Z of Object.keys(X)){let Y=J?J+"."+Z:Z;if(A.hasOwnProperty(Y)||D.hasOwnProperty(Z)){if(AX(A[Y])||AX(D[Z]))X[Z]=FX(X[Z],A,B,D[Z],Y);continue}else if(B[Y])X[Z]=FX(X[Z],A,B,D[Z],Y);else delete X[Z]}return X}});var mh=K((hM1,hh)=>{hh.exports=function F(A){let B=!1;for(let D of Object.keys(A))if(A[D]==="text")B=!0;return B}});var ch=K((mM1,dh)=>{var wz1=mh();dh.exports=function F(A,B,D){if(wz1(A))return;if(D.hasOwnProperty("collation")&&!B.hasOwnProperty("collation"))B.collation=D.collation}});var ph=K((dM1,lh)=>{var Iz1=QD(),{queryMiddlewareFunctions:Nz1,aggregateMiddlewareFunctions:Pz1,modelMiddlewareFunctions:Mz1,documentMiddlewareFunctions:Tz1}=aD(),jz1=Array.from(new Set([...Nz1,...Pz1,...Mz1,...Tz1]));lh.exports=function F(A,B,D){let J={useErrorHandlers:!0,numCallbackParams:1};A.$__insertMany=B.createWrapper("insertMany",A.$__insertMany,A,J),B=B.filter((X)=>{if(jz1.indexOf(X.name)!==-1)return!!X.model;return X.model!==!1});for(let X of Object.keys(D))if(B.hasHooks(X)){let Z=A[X];A[X]=function(){let Y=arguments.length,$=Y>0?arguments[Y-1]:null,G=typeof $==="function"?$:null,E=Array.prototype.slice.call(arguments,0,G==null?Y:Y-1);return Iz1(G,(H)=>{B.execPre(X,A,E,function(q){if(q!=null)return H(q);let W=0,z=Z.apply(A,E.concat(C));if(z!=null&&typeof z.then==="function")z.then((U)=>C(null,U),(U)=>C(U));function C(U,Q){if(W++>0)return;if(U!=null)return H(U);B.execPost(X,A,[Q],function(L){if(L!=null)return H(L);H(null,Q)})}})},A.events)}}}});var nh=K((cM1,ih)=>{ih.exports=function F(A,B){for(let D in B.statics)A[D]=B.statics[D]}});var eh=K((lM1,oh)=>{var ah=sD(),kz1=D6();oh.exports=rh;function rh(F,A,B){if(A==null)return A;return Oz1(F,A,B),th(F,A,B)}function Oz1(F,A,B){for(let D of F.childSchemas){let J=D.model.path,X=D.schema;if(!J)continue;let Z=kz1.get(J,A);if(Z==null||Array.isArray(Z)&&Z.flat(1/0).length===0)continue;rh(X,Z,B)}}function th(F,A,B){if(A==null||typeof A!=="object")return;if(Array.isArray(A)){for(let Y of A)th(F,Y,B);return}if(F.discriminators&&Object.keys(F.discriminators).length>0)for(let Y of Object.keys(F.discriminators)){let $=F.discriminators[Y],G=$.discriminatorMapping.key,E=$.discriminatorMapping.value;if(A[G]==E){F=$;break}}let D=ah(F.options.timestamps,"createdAt"),J=ah(F.options.timestamps,"updatedAt"),X=B?.currentTime,Z=null;if(X!=null)Z=X();else if(F.base?.now)Z=F.base.now();else Z=new Date;if(D&&A[D]==null&&!B?.isUpdate)A[D]=Z;if(J)A[J]=Z}});var Bm=K((pM1,Am)=>{var Sz1=D6();Am.exports=Fm;function Fm(F,A,B){if(A==null)return A;let D=B,J=null;if(Array.isArray(B)){D=[],J=[];for(let X of B)if(X.length===1)J.push(X[0]);else D.push(X)}return uz1(F,A,D),Uz(F,A,J)}function uz1(F,A,B){let D=!1;for(let J of F.childSchemas){let X=J.model.path,Z=J.schema;if(!X)continue;let Y=Sz1.get(X,A);if(Y==null||Array.isArray(Y)&&Y.flat(1/0).length===0)continue;let $=null;if(Array.isArray(B)){$=[];for(let G of B)if(G[0]==X)$.push(G.slice(1));if($.length===0)continue}Fm(Z,Y,$),D=!0}if(B&&B.length&&!D)Uz(F,A,B)}function Uz(F,A,B){if(A==null||typeof A!=="object")return;if(Array.isArray(A)){for(let D of A)Uz(F,D,B);return}if(F.discriminators&&Object.keys(F.discriminators).length>0)for(let D of Object.keys(F.discriminators)){let J=F.discriminators[D],X=J.discriminatorMapping.key,Z=J.discriminatorMapping.value;if(A[X]==Z){F=J;break}}if(B==null)B=Object.keys(F.virtuals);for(let D of B){if(F.virtuals[D]==null)continue;let J=F.virtuals[D],X=Array.isArray(D)?D:D.indexOf(".")===-1?[D]:D.split("."),Z=A;for(let G=0;G<X.length-1;++G)Z[X[G]]=X[G]in Z?Z[X[G]]:{},Z=Z[X[G]];let Y=J.applyGetters(Z[X[X.length-1]],A);if(J.options&&(J.options.ref||J.options.refPath)&&Y===void 0)if(J.options.justOne)Y=null;else Y=[];Z[X[X.length-1]]=Y}}});var BX=K((iM1,Dm)=>{Dm.exports=function F(A){if(!(this instanceof F))return new F(A);return this.val=A,this}});var pF=K((nM1,Jm)=>{/*!
843
+ * ignore
844
+ */Jm.exports=new WeakMap});var $m=K((sM1,Ym)=>{var xz1=Z0(),Xm=pF(),fz1=t().modelSymbol,_z1=X1();Ym.exports=Zm;var DX=Symbol("mongoose#assignRawDocsToIdStructure#hasArray");function Zm(F,A,B,D,J){let X=[],Z=D.isVirtual&&D.justOne&&F.length>1?!1:D.sort&&F.length>1,Y=D.$nullIfNotFound,$,G,E;if(_z1.isMongooseArray(F))F=F.__array;let H=0,q=F.length;if(Z&&J&&D[DX]===void 0){D[DX]=!1;for(let W in B)if(Array.isArray(B[W])){D[DX]=!0;break}}for(H=0;H<q;++H){if(E=F[H],Array.isArray(E)){Zm(E,A,B,D,!0),X.push(E);continue}if(E===null&&Z===!1){X.push(E);continue}if(G=String(E),$=A[G],D.clone&&$!=null)if(D.lean){let W=Xm.get($);$=xz1($),Xm.set($,W)}else $=$.constructor.hydrate($._doc);if(J)if($)if(Z){let W=B[G];if(D[DX])X.push($);else X[W]=$}else X.push($);else if(E!=null&&E[fz1]!=null)X.push(E);else X.push(D.retainNullValues||Y?null:E);else X[H]=$||null}if(F.length=0,X.length)X.forEach(function(W,z){F[z]=W})}});var Lz=K((aM1,Gm)=>{Gm.exports=Qz;/*!
845
+ * ignore
846
+ */function Qz(F,A){if(F.virtuals[A])return{virtual:F.virtuals[A],path:void 0};let B=A.split("."),D="",J="";for(let X=0;X<B.length;++X){if(D+=(D.length>0?".":"")+B[X],F.virtuals[D]){if(X===B.length-1)return{virtual:F.virtuals[D],path:J};continue}if(F.nested[D])continue;if(F.paths[D]&&F.paths[D].schema){F=F.paths[D].schema;let Z=B.slice(X+1).join(".");if(F.virtuals[Z]){if(X===B.length-2)return{virtual:F.virtuals[Z],nestedSchemaPath:[J,D].filter((Y)=>!!Y).join(".")};continue}if(X+1<B.length&&F.discriminators)for(let Y of Object.keys(F.discriminators)){let $=Qz(F.discriminators[Y],Z);if($!=null){let G=[J,D,$.nestedSchemaPath].filter((E)=>!!E).join(".");return{virtual:$.virtual,nestedSchemaPath:G}}}J+=(J.length>0?".":"")+D,D="";continue}if(F.discriminators)for(let Z of Object.keys(F.discriminators)){let Y=Qz(F.discriminators[Z],A);if(Y)return Y}return null}}});var Hm=K((JX,Em)=>{(function(F,A){typeof JX==="object"&&typeof Em!=="undefined"?A(JX):typeof define==="function"&&define.amd?define(["exports"],A):(F=typeof globalThis!=="undefined"?globalThis:F||self,A(F.sift={}))})(JX,function(F){var A=function(R,I){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,u){P.__proto__=u}||function(P,u){for(var p in u)if(Object.prototype.hasOwnProperty.call(u,p))P[p]=u[p]},A(R,I)};function B(R,I){if(typeof I!=="function"&&I!==null)throw new TypeError("Class extends value "+String(I)+" is not a constructor or null");A(R,I);function P(){this.constructor=R}R.prototype=I===null?Object.create(I):(P.prototype=I.prototype,new P)}typeof SuppressedError==="function"&&SuppressedError;var D=function(R){var I="[object "+R+"]";return function(P){return J(P)===I}},J=function(R){return Object.prototype.toString.call(R)},X=function(R){if(R instanceof Date)return R.getTime();else if(Y(R))return R.map(X);else if(R&&typeof R.toJSON==="function")return R.toJSON();return R},Z=function(R){return R==null?null:R},Y=D("Array"),$=D("Object"),G=D("Function"),E=function(R,I){return R.hasOwnProperty(I)&&!G(R[I])},H=function(R){return R&&(R.constructor===Object||R.constructor===Array||R.constructor.toString()==="function Object() { [native code] }"||R.constructor.toString()==="function Array() { [native code] }")&&!R.toJSON},q=function(R,I){if(R==null&&R==I)return!0;if(R===I)return!0;if(Object.prototype.toString.call(R)!==Object.prototype.toString.call(I))return!1;if(Y(R)){if(R.length!==I.length)return!1;for(var P=0,u=R.length;P<u;P++)if(!q(R[P],I[P]))return!1;return!0}else if($(R)){if(Object.keys(R).length!==Object.keys(I).length)return!1;for(var p in R)if(!q(R[p],I[p]))return!1;return!0}return!1},W=function(R,I,P,u,p,o){var Z1=I[u];if(Y(R)&&isNaN(Number(Z1))&&!E(R,Z1)){for(var L1=0,a0=R.length;L1<a0;L1++)if(!W(R[L1],I,P,u,L1,R))return!1}if(u===I.length||R==null)return P(R,p,o,u===0,u===I.length);return W(R[Z1],I,P,u+1,Z1,R)},z=function(){function R(I,P,u,p){this.params=I,this.owneryQuery=P,this.options=u,this.name=p,this.init()}return R.prototype.init=function(){},R.prototype.reset=function(){this.done=!1,this.keep=!1},R}(),C=function(R){B(I,R);function I(P,u,p,o){var Z1=R.call(this,P,u,p)||this;return Z1.children=o,Z1}return I.prototype.reset=function(){this.keep=!1,this.done=!1;for(var P=0,u=this.children.length;P<u;P++)this.children[P].reset()},I.prototype.childrenNext=function(P,u,p,o,Z1){var L1=!0,a0=!0;for(var p2=0,t6=this.children.length;p2<t6;p2++){var _4=this.children[p2];if(!_4.done)_4.next(P,u,p,o,Z1);if(!_4.keep)a0=!1;if(_4.done){if(!_4.keep)break}else L1=!1}this.done=L1,this.keep=a0},I}(z),U=function(R){B(I,R);function I(P,u,p,o,Z1){var L1=R.call(this,P,u,p,o)||this;return L1.name=Z1,L1}return I}(C),Q=function(R){B(I,R);function I(){var P=R!==null&&R.apply(this,arguments)||this;return P.propop=!0,P}return I.prototype.next=function(P,u,p,o){this.childrenNext(P,u,p,o)},I}(C),L=function(R){B(I,R);function I(P,u,p,o,Z1){var L1=R.call(this,u,p,o,Z1)||this;return L1.keyPath=P,L1.propop=!0,L1._nextNestedValue=function(a0,p2,t6,_4,Hc){return L1.childrenNext(a0,p2,t6,_4,Hc),!L1.done},L1}return I.prototype.next=function(P,u,p){W(P,this.keyPath,this._nextNestedValue,0,u,p)},I}(C),V=function(R,I){if(R instanceof Function)return R;if(R instanceof RegExp)return function(u){var p=typeof u==="string"&&R.test(u);return R.lastIndex=0,p};var P=X(R);return function(u){return I(P,X(u))}},w=function(R){B(I,R);function I(){var P=R!==null&&R.apply(this,arguments)||this;return P.propop=!0,P}return I.prototype.init=function(){this._test=V(this.params,this.options.compare)},I.prototype.next=function(P,u,p){if(!Array.isArray(p)||p.hasOwnProperty(u)){if(this._test(P,u,p))this.done=!0,this.keep=!0}},I}(z),j=function(R,I,P){return new w(R,I,P)},T=function(R){return function(I,P,u,p){return R(I,P,u,p)}},M=function(R){return T(function(I,P,u,p){var o=typeof X(I),Z1=R(I);return new w(function(L1){var a0=Z(L1);return typeof X(a0)===o&&Z1(a0)},P,u,p)})},f=function(R,I,P,u){var p=u.operations[R];if(!p)m(R);return p(I,P,u,R)},m=function(R){throw new Error("Unsupported operation: ".concat(R))},O=function(R,I){for(var P in R)if(I.operations.hasOwnProperty(P)||P.charAt(0)==="$")return!0;return!1},_=function(R,I,P,u,p){if(O(I,p)){var o=y(I,P,p),Z1=o[0],L1=o[1];if(L1.length)throw new Error("Property queries must contain only operations, or exact objects.");return new L(R,I,u,p,Z1)}return new L(R,I,u,p,[new w(I,u,p)])},k=function(R,I,P){if(I===void 0)I=null;var u=P===void 0?{}:P,p=u.compare,o=u.operations,Z1={compare:p||q,operations:Object.assign({},o||{})},L1=y(R,null,Z1),a0=L1[0],p2=L1[1],t6=[];if(a0.length)t6.push(new L([],R,I,Z1,a0));if(t6.push.apply(t6,p2),t6.length===1)return t6[0];return new Q(R,I,Z1,t6)},y=function(R,I,P){var u=[],p=[];if(!H(R))return u.push(new w(R,R,P)),[u,p];for(var o in R)if(P.operations.hasOwnProperty(o)){var Z1=f(o,R[o],R,P);if(Z1){if(!Z1.propop&&I&&!P.operations[I])throw new Error("Malformed query. ".concat(o," cannot be matched against property."))}if(Z1!=null)u.push(Z1)}else if(o.charAt(0)==="$")m(o);else p.push(_(o.split("."),R[o],o,R,P));return[u,p]},s=function(R){return function(I,P,u){return R.reset(),R.next(I,P,u),R.keep}},P1=function(R,I){if(I===void 0)I={};return s(k(R,null,I))},n0=function(R){B(I,R);function I(){var P=R!==null&&R.apply(this,arguments)||this;return P.propop=!0,P}return I.prototype.init=function(){this._test=V(this.params,this.options.compare)},I.prototype.reset=function(){R.prototype.reset.call(this),this.keep=!0},I.prototype.next=function(P){if(this._test(P))this.done=!0,this.keep=!1},I}(z),b1=function(R){B(I,R);function I(){var P=R!==null&&R.apply(this,arguments)||this;return P.propop=!0,P}return I.prototype.init=function(){if(!this.params||typeof this.params!=="object")throw new Error("Malformed query. $elemMatch must by an object.");this._queryOperation=k(this.params,this.owneryQuery,this.options)},I.prototype.reset=function(){R.prototype.reset.call(this),this._queryOperation.reset()},I.prototype.next=function(P){if(Y(P)){for(var u=0,p=P.length;u<p;u++){this._queryOperation.reset();var o=P[u];this._queryOperation.next(o,u,P,!1),this.keep=this.keep||this._queryOperation.keep}this.done=!0}else this.done=!1,this.keep=!1},I}(z),f0=function(R){B(I,R);function I(){var P=R!==null&&R.apply(this,arguments)||this;return P.propop=!0,P}return I.prototype.init=function(){this._queryOperation=k(this.params,this.owneryQuery,this.options)},I.prototype.reset=function(){R.prototype.reset.call(this),this._queryOperation.reset()},I.prototype.next=function(P,u,p,o){this._queryOperation.next(P,u,p,o),this.done=this._queryOperation.done,this.keep=!this._queryOperation.keep},I}(z),W2=function(R){B(I,R);function I(){var P=R!==null&&R.apply(this,arguments)||this;return P.propop=!0,P}return I.prototype.init=function(){},I.prototype.next=function(P){if(Y(P)&&P.length===this.params)this.done=!0,this.keep=!0},I}(z),s0=function(R){if(R.length===0)throw new Error("$and/$or/$nor must be a nonempty array")},K3=function(R){B(I,R);function I(){var P=R!==null&&R.apply(this,arguments)||this;return P.propop=!1,P}return I.prototype.init=function(){var P=this;s0(this.params),this._ops=this.params.map(function(u){return k(u,null,P.options)})},I.prototype.reset=function(){this.done=!1,this.keep=!1;for(var P=0,u=this._ops.length;P<u;P++)this._ops[P].reset()},I.prototype.next=function(P,u,p){var o=!1,Z1=!1;for(var L1=0,a0=this._ops.length;L1<a0;L1++){var p2=this._ops[L1];if(p2.next(P,u,p),p2.keep){o=!0,Z1=p2.keep;break}}this.keep=Z1,this.done=o},I}(z),Jc=function(R){B(I,R);function I(){var P=R!==null&&R.apply(this,arguments)||this;return P.propop=!1,P}return I.prototype.next=function(P,u,p){R.prototype.next.call(this,P,u,p),this.keep=!this.keep},I}(K3),iz=function(R){B(I,R);function I(){var P=R!==null&&R.apply(this,arguments)||this;return P.propop=!0,P}return I.prototype.init=function(){var P=this,u=Array.isArray(this.params)?this.params:[this.params];this._testers=u.map(function(p){if(O(p,P.options))throw new Error("cannot nest $ under ".concat(P.name.toLowerCase()));return V(p,P.options.compare)})},I.prototype.next=function(P,u,p){var o=!1,Z1=!1;for(var L1=0,a0=this._testers.length;L1<a0;L1++){var p2=this._testers[L1];if(p2(P)){o=!0,Z1=!0;break}}this.keep=Z1,this.done=o},I}(z),Xc=function(R){B(I,R);function I(P,u,p,o){var Z1=R.call(this,P,u,p,o)||this;return Z1.propop=!0,Z1._in=new iz(P,u,p,o),Z1}return I.prototype.next=function(P,u,p,o){if(this._in.next(P,u,p),Y(p)&&!o){if(this._in.keep)this.keep=!1,this.done=!0;else if(u==p.length-1)this.keep=!0,this.done=!0}else this.keep=!this._in.keep,this.done=!0},I.prototype.reset=function(){R.prototype.reset.call(this),this._in.reset()},I}(z),Zc=function(R){B(I,R);function I(){var P=R!==null&&R.apply(this,arguments)||this;return P.propop=!0,P}return I.prototype.next=function(P,u,p,o,Z1){if(!Z1)this.done=!0,this.keep=!this.params;else if(p.hasOwnProperty(u)===this.params)this.done=!0,this.keep=!0},I}(z),Yc=function(R){B(I,R);function I(P,u,p,o){var Z1=R.call(this,P,u,p,P.map(function(L1){return k(L1,u,p)}),o)||this;return Z1.propop=!1,s0(P),Z1}return I.prototype.next=function(P,u,p,o){this.childrenNext(P,u,p,o)},I}(U),$c=function(R){B(I,R);function I(P,u,p,o){var Z1=R.call(this,P,u,p,P.map(function(L1){return k(L1,u,p)}),o)||this;return Z1.propop=!0,Z1}return I.prototype.next=function(P,u,p,o){this.childrenNext(P,u,p,o)},I}(U),nz=function(R,I,P){return new w(R,I,P)},sz=function(R,I,P,u){return new n0(R,I,P,u)},az=function(R,I,P,u){return new K3(R,I,P,u)},rz=function(R,I,P,u){return new Jc(R,I,P,u)},tz=function(R,I,P,u){return new b1(R,I,P,u)},oz=function(R,I,P,u){return new Xc(R,I,P,u)},ez=function(R,I,P,u){return new iz(R,I,P,u)},FC=M(function(R){return function(I){return I!=null&&I<R}}),AC=M(function(R){return function(I){return I===R||I<=R}}),BC=M(function(R){return function(I){return I!=null&&I>R}}),DC=M(function(R){return function(I){return I===R||I>=R}}),JC=function(R,I,P){var u=R[0],p=R[1];return new w(function(o){return X(o)%u===p},I,P)},XC=function(R,I,P,u){return new Zc(R,I,P,u)},ZC=function(R,I,P){return new w(new RegExp(R,I.$options),I,P)},YC=function(R,I,P,u){return new f0(R,I,P,u)},$C={number:function(R){return typeof R==="number"},string:function(R){return typeof R==="string"},bool:function(R){return typeof R==="boolean"},array:function(R){return Array.isArray(R)},null:function(R){return R===null},timestamp:function(R){return R instanceof Date}},GC=function(R,I,P){return new w(function(u){if(typeof R==="string"){if(!$C[R])throw new Error("Type alias does not exist");return $C[R](u)}return u!=null?u instanceof R||u.constructor===R:!1},I,P)},EC=function(R,I,P,u){return new Yc(R,I,P,u)},HC=function(R,I,P,u){return new $c(R,I,P,u)},qC=function(R,I,P){return new W2(R,I,P,"$size")},WC=function(){return null},zC=function(R,I,P){var u;if(G(R))u=R;else if(!process.env.CSP_ENABLED)u=new Function("obj","return "+R);else throw new Error('In CSP mode, sift does not support strings in "$where" condition');return new w(function(p){return u.bind(p)(p)},I,P)},Gc=Object.freeze({__proto__:null,$Size:W2,$all:HC,$and:EC,$elemMatch:tz,$eq:nz,$exists:XC,$gt:BC,$gte:DC,$in:ez,$lt:FC,$lte:AC,$mod:JC,$ne:sz,$nin:oz,$nor:rz,$not:YC,$options:WC,$or:az,$regex:ZC,$size:qC,$type:GC,$where:zC}),CC=function(R,I,P){var u=P===void 0?{}:P,p=u.compare,o=u.operations;return k(R,I,{compare:p,operations:Object.assign({},Gc,o||{})})},Ec=function(R,I){if(I===void 0)I={};var P=CC(R,null,I);return s(P)};F.$Size=W2,F.$all=HC,F.$and=EC,F.$elemMatch=tz,F.$eq=nz,F.$exists=XC,F.$gt=BC,F.$gte=DC,F.$in=ez,F.$lt=FC,F.$lte=AC,F.$mod=JC,F.$ne=sz,F.$nin=oz,F.$nor=rz,F.$not=YC,F.$options=WC,F.$or=az,F.$regex=ZC,F.$size=qC,F.$type=GC,F.$where=zC,F.EqualsOperation=w,F.createDefaultQueryOperation=CC,F.createEqualsOperation=j,F.createOperationTester=s,F.createQueryOperation=k,F.createQueryTester=P1,F.default=Ec,Object.defineProperty(F,"__esModule",{value:!0})})});var Wm=K((rM1,Vz)=>{var qm=Hm();Vz.exports=qm.default;Object.assign(Vz.exports,qm)});var Lm=K((tM1,Qm)=>{var gz1=tD(),bz1=BX(),yz1=$m(),XX=W0(),vz1=Lz(),Um=pF(),zm=iD(),hz1=QH(),Rz=D6(),Cm=Wm().default,ZX=X1(),{populateModelSymbol:mz1}=t();Qm.exports=function F(A){let B=Object.assign({},XX(A,"allOptions.options.options"),XX(A,"allOptions.options")),D=Object.assign({},A.options,B,{justOne:A.justOne,isVirtual:A.isVirtual});D.$nullIfNotFound=A.isVirtual;let J=A.populatedModel,X=[].concat(A.rawIds);A.allIds=[].concat(A.allIds),yz1(A.rawIds,A.rawDocs,A.rawOrder,D);let{docs:Z,rawIds:Y,options:$}=A,G=A.count&&A.isVirtual,E,H=0;function q(W){if(++H,G)return W;if(W instanceof bz1)return W.val;if(W===void 0)return W;let z=A.allIds[E];if(A.path.endsWith(".$*"))return iF(W,$,D,z);if(A.justOne===!0&&Array.isArray(W)){let C=[];for(let U of W){let Q=Um.get(U);if(Q==null||Q===J)C.push(U)}while(W.length>C.length)Array.prototype.pop.apply(W,[]);for(let U=0;U<C.length;++U)W[U]=C[U];return iF(W[0],$,D,z)}else if(A.justOne===!1&&!Array.isArray(W))return iF([W],$,D,z);else if(A.justOne===!0&&!Array.isArray(W)&&Array.isArray(z))return iF(W,$,D,W==null?W:z[H-1]);return iF(W,$,D,z)}for(E=0;E<Z.length;++E){H=0;let W=A.path.endsWith(".$*")?A.path.slice(0,-3):A.path,z=Rz.get(W,Z[E],zm);if(z==null&&!vz1(A.originalModel.schema,W))continue;let C;if(G)C=dz1(Y[E]);else if(Array.isArray(A.match))C=Array.isArray(Y[E])?Y[E].filter((j)=>j==null||Cm(A.match[E])(j)):[Y[E]].filter((j)=>j==null||Cm(A.match[E])(j))[0];else C=Y[E];let U=A.originalModel.schema,Q=XX(Z[E],"$__",null)!=null,L=Q?z instanceof Map:ZX.isPOJO(z);if(L=L&&XX(U._getSchema(W),"$isSchemaMap"),!A.isVirtual&&L){let j=z instanceof Map?Array.from(z.keys()):Object.keys(z);C=C.reduce((T,M,f)=>{return T.set(j[f],M),T},new Map)}if(Q&&Array.isArray(C)){for(let j of C)if(j!=null&&j.$__!=null)j.$__.parent=Z[E]}else if(Q&&C!=null&&C.$__!=null)C.$__.parent=Z[E];if(A.isVirtual&&Q){if(Z[E].$populated(W,A.justOne?X[0]:X,A.allOptions),Array.isArray(C))C=C.map((j)=>j==null?void 0:j);Rz.set(W,C,Z[E],void 0,q,!1);continue}let V=W.split("."),w=Z[E];for(let j=0;j<V.length-1;++j){if(Array.isArray(w)&&!ZX.isArrayIndex(V[j]))break;if(V[j]==="$*")break;if(w[V[j]]==null){let T=V.slice(0,j+1).join("."),M=U._getSchema(T);if(C==null&&M!=null&&M.$isMongooseArray)break;w[V[j]]={}}if(w=w[V[j]],typeof w!=="object")break}if(Z[E].$__){if(A.allOptions.options[mz1]=A.allOptions.model,Z[E].$populated(W,A.unpopulatedValues[E],A.allOptions.options),C!=null&&C.$__!=null)C.$__.wasPopulated={value:A.unpopulatedValues[E]};if(C instanceof Map&&!C.$isMongooseMap)C=new gz1(C,W,Z[E],Z[E].schema.path(W).$__schemaType)}if(Rz.set(W,C,Z[E],zm,q,!1),Z[E].$__)hz1(Z[E],[A.allOptions.options])}};function dz1(F){if(Array.isArray(F)){if(F.some((A)=>Array.isArray(A)||A===null))return F.map((A)=>{if(A==null)return 0;if(Array.isArray(A))return A.filter((B)=>B!=null).length;return 1});return F.filter((A)=>A!=null).length}return F==null?0:1}function iF(F,A,B,D){let J=typeof B.transform==="function",X=J?B.transform:(Z)=>Z;if(Array.isArray(F)){let Z=[],Y=F.length;for(let E=0;E<Y;++E){let H=F[E],q=Array.isArray(D)?D[E]:D;if(!wz(H)&&(!B.retainNullValues||H!=null)&&!J)continue;else if(!B.retainNullValues&&H==null)continue;else if(J)H=X(wz(H)?H:null,q);if(Km(H,A),Z.push(H),A.originalLimit&&Z.length>=A.originalLimit)break}let $=Z.length;while(F.length>$)Array.prototype.pop.apply(F,[]);let G=0;if(ZX.isMongooseArray(F))for(G=0;G<$;++G)F.set(G,Z[G],!0);else for(G=0;G<$;++G)F[G]=Z[G];return F}if(wz(F)||ZX.isPOJO(F))return Km(F,A),X(F,D);if(F instanceof Map)return F;if(B.justOne===!1)return[];return F==null?X(F,D):X(null,D)}function Km(F,A){if(F!=null&&A.excludeId)if(typeof F.$__setValue==="function")delete F._doc._id;else delete F._id}function wz(F){if(F==null)return!1;return Array.isArray(F)||F.$isMongooseMap||F.$__!=null||Um.has(F)}});var Im=K((oM1,wm)=>{var cz1=BX(),lz1=VH(),{trusted:YX}=p7(),Vm=nJ();wm.exports=function F(A,B,D,J,X){let Z=pz1(B);if(D.size===1){let Y=Array.from(D)[0],$=J.schema.path(Y);if(Y!=="_id"||!Z._id)A=Rm(A,$,X),Z[Y]=YX({$in:A});else if(Y==="_id"&&Z._id){let E=Vm(Z[Y])?Z[Y]:{$eq:Z[Y]};Z[Y]={...YX({$in:A}),...E}}let G=lz1(Y);for(let E=0;E<G.length-1;++E){let H=G[E];if(Z[H]!=null&&Z[H].$elemMatch!=null){Z[H].$elemMatch[Y.slice(H.length+1)]=YX({$in:A}),delete Z[Y];break}}}else{let Y=[];if(Array.isArray(Z.$or))Z.$and=[{$or:Z.$or},{$or:Y}],delete Z.$or;else Z.$or=Y;for(let $ of D)if($!=="_id"||!Z._id){let G=J.schema.path($);A=Rm(A,G,X),Y.push({[$]:{$in:A}})}else if($==="_id"&&Z._id){let G=Vm(Z[$])?Z[$]:{$eq:Z[$]};Z[$]={...YX({$in:A}),...G}}}return Z};function Rm(F,A,B){if(F=F.filter((D)=>!(D instanceof cz1)),!B)return F;return F.filter((D)=>{try{return A.cast(D),!0}catch(J){return!1}})}function pz1(F){if(Array.isArray(F)){if(F.length>1)return{$or:[].concat(F.map((A)=>Object.assign({},A)))};return Object.assign({},F[0])}return Object.assign({},F)}});var Tm=K((eM1,Mm)=>{/*!
847
+ * ignore
848
+ */var Nm=Q9(),iz1=W0(),nz1=M6(),Pm=pF(),M8=D6(),sz1=t().populateModelSymbol;Mm.exports=function F(A,B,D,J){let X=B.path(J),Z=D;if(X)return X;let Y=B.discriminatorMapping&&B.discriminatorMapping.key;if(Y&&A!=null){if(D!=null&&D[Y]!=null){let E=nz1(A.discriminators,D[Y]);B=E?E.schema:B}else if(A.discriminators!=null)return Object.keys(A.discriminators).reduce((E,H)=>{let q=A.discriminators[H];return E.concat(F(q,q.schema,null,J))},[])}function $(E,H,q,W){let z=E.length+1,C,U;while(z--){if(U=E.slice(0,z).join("."),C=H.path(U),C==null)continue;if(C.caster){if(C.caster instanceof Nm)return C.caster;let V=null;if(C.schema!=null&&C.schema.discriminators!=null){let w=C.schema.discriminators,j=U+"."+C.schema.options.discriminatorKey,T=q?M8.get(j,q)||[]:[];V=Object.keys(w).reduce(function(M,f){let m=w[f].discriminatorMapping.value;if(D==null||T.indexOf(f)!==-1||T.indexOf(m)!==-1)M.push(w[f]);return M},[])}if(z!==E.length&&C.schema){let w;if(E[z]==="$"){if(z+1===E.length)return C;if(w=$(E.slice(z+1),H,q?M8.get(U,q):null,W.concat(E.slice(0,z))),w)w.$parentSchemaDocArray=w.$parentSchemaDocArray||(C.schema.$isSingleNested?null:C);return w}if(V!=null&&V.length>0){w=[];for(let j of V){let T=$(E.slice(z),j,q?M8.get(U,q):null,W.concat(E.slice(0,z)));if(T!=null){if(T.$parentSchemaDocArray=T.$parentSchemaDocArray||(C.schema.$isSingleNested?null:C),T.$parentSchemaDocArray)w.$parentSchemaDocArray=T.$parentSchemaDocArray;w.push(T)}}return w}else{if(w=$(E.slice(z),C.schema,q?M8.get(U,q):null,W.concat(E.slice(0,z))),w)w.$parentSchemaDocArray=w.$parentSchemaDocArray||(C.schema.$isSingleNested?null:C);return w}}else if(z!==E.length&&C.$isMongooseArray&&C.casterConstructor.$isMongooseArray){let w=C;while(w.$isMongooseArray&&!w.$isMongooseDocumentArray)w=w.casterConstructor;let j=$(E.slice(z),w.schema,null,W.concat(E.slice(0,z)));if(j!=null)return j;if(w.schema.discriminators){let T=[];for(let M of Object.keys(w.schema.discriminators)){let f=w.schema.discriminators[M]||w.schema,m=$(E.slice(z),f,null,W.concat(E.slice(0,z)));if(m!=null)T.push(m)}if(T.length>0)return T}}}else if(C.$isSchemaMap&&C.$__schemaType instanceof Nm)return C.$__schemaType;let Q=W.concat([U]).join(".");if(Z!=null&&Z.$__&&Z.$populated(Q)&&z<E.length){let V=D.$__.populated[Q].options[sz1];if(V!=null)return $(E.slice(z),V.schema,q?M8.get(U,q):null,W.concat(E.slice(0,z)))}let L=iz1(Z,U);if(L!=null){let V=Array.isArray(L)&&L.length>0?Pm.get(L[0]):Pm.get(L),w=V!=null?V.schema:null;if(w!=null){let j=$(E.slice(z),w,q?M8.get(U,q):null,W.concat(E.slice(0,z)));if(j!=null)return j.$parentSchemaDocArray=j.$parentSchemaDocArray||(w.$isSingleNested?null:w),j}}return C}}let G=J.split(".");for(let E=0;E<G.length;++E)if(G[E]==="$")G[E]="0";return $(G,B,D,[])}});var xm=K((FT1,um)=>{var T8=_2(),az1=BX(),rz1=Z0(),O6=W0(),tz1=M6(),oz1=I2(),jm=Tm(),ez1=Lz(),nF=iD(),O9=D6(),$X=Bq(),q2=X1(),Pz=t().modelSymbol,Iz=t().populateModelSymbol,Mz=U9().schemaMixedSymbol,FC1=JH();um.exports=function F(A,B,D){let J,X=B.length,Z=[],Y=D.model&&D.model.modelName||D.model,$,G,E,H={},q=A.schema;if(D._localModel!=null&&D._localModel.schema.nested[D.path])return[];let W=ez1(A.schema,D.path);if((W==null?null:W.virtual)!=null)return AC1(A,B,D,W);let C=jm(A,q,null,D.path);if(C=Array.isArray(C)?C:[C].filter((L)=>L!=null),!(D.strictPopulate===!1||D.options?.strictPopulate===!1)&&C.length===0&&D._localModel!=null)return new FC1(D._fullPath||D.path);for(let L=0;L<X;L++){J=B[L];let V=null;if(J.$__!=null&&J.populated(D.path)){if((D.forceRepopulate!=null?D.forceRepopulate:J.constructor.base.options.forceRepopulate)===!1)continue}let w=J!=null&&J.$__!=null?J.$__schema:q;if($=jm(A,w,J,D.path),$!=null&&$.$isMongooseDocumentArray&&$.options.ref==null&&$.options.refPath==null)continue;if($&&$.$parentSchemaDocArray&&O6(D,"options.sort")!=null)return new T8("Cannot populate with `sort` on path "+D.path+" because it is a subproperty of a document array");E=null;let T=!1,M=null,f=null,m=null;if($!=null&&$.instance==="Embedded"){if($.options.ref){let b1={localField:D.path+"._id",foreignField:"_id",justOne:!0},f0=Q(J,$,Y,A),W2=O9.get(D.path,J),s0=O9.get("_id",W2);Tz(A,Z,H,f0.modelNames,D,b1,s0,J,f,W2)}continue}if(Array.isArray($)){let b1=$;for(let f0 of b1){let W2,s0;try{s0=Q(J,f0,Y,A),W2=s0.modelNames,T=T||s0.isRefPath,M=M||s0.refPath,V=s0.justOne}catch(K3){return K3}if(T&&!s0.isRefPath)continue;if(!W2)continue;E=E||[];for(let K3 of W2)if(E.indexOf(K3)===-1)E.push(K3)}}else{try{let b1=Q(J,$,Y,A);if(E=b1.modelNames,T=b1.isRefPath,M=M||b1.refPath,V=b1.justOne,f=O6($,"options.populate",null),T)m=E,E=Array.from(new Set(E))}catch(b1){return b1}if(!E)continue}let O={},_=D.path,k="_id";if("justOne"in D&&D.justOne!==void 0)V=D.justOne;else if($&&!$[Mz]){if(D.path.endsWith("."+$.path)||D.path===$.path)V=Array.isArray($)?$.every((b1)=>!b1.$isMongooseArray):!$.$isMongooseArray}if(!E)continue;O.isVirtual=!1,O.justOne=V,O.localField=_,O.foreignField=k;let y=Om(J,_,A,D,null,$),s=String(q2.getValue(k,J));D._docs[s]=Array.isArray(y)?y.slice():y;let P1=O6(D,"match",null),n0=typeof P1==="function";if(n0)P1=P1.call(J,J);if(Array.isArray(P1)){for(let b1 of P1)if(b1!=null&&b1.$where)throw new T8("Cannot use $where filter with populate() match")}else if(P1!=null&&P1.$where!=null)throw new T8("Cannot use $where filter with populate() match");if(O.match=P1,O.hasMatchFunction=n0,O.isRefPath=T,O.modelNamesInOrder=m,T)E=BC1(J,q,O,D,M,y)||E;try{Tz(A,Z,H,E,D,O,y,J,f)}catch(b1){return b1}}return Z;function Q(L,V,w,j){let T,M=!1,f=null,m=V;if(V&&V.instance==="Array")V=V.caster;if(V&&V.$isSchemaMap)V=V.$__schemaType;let O=V&&V.options&&V.options.ref;if(G=V&&V.options&&V.options.refPath,V!=null&&V[Mz]&&!O&&!G&&!w)return{modelNames:null};if(w)T=[w];else if(G!=null){if(typeof G==="function"){let _=D.path.slice(0,D.path.length-V.path.length-1),k=O9.get(_,L,nF),y=Array.isArray(k)?q2.array.flatten(k):k?[k]:[];T=new Set;for(let s of y)G=G.call(s,s,D.path),$X(G,L,D.path,q,D._queryProjection).forEach((P1)=>T.add(P1));T=Array.from(T)}else T=$X(G,L,D.path,q,D._queryProjection);M=!0}else{let _,k,y,s,P1=j,n0=j.schema.options.discriminatorKey;if(!V&&n0&&(s=q2.getValue(n0,L))){let b1=tz1(j.discriminators,s)||j;if(b1!=null)P1=b1;else try{P1=jz(j.db,s)}catch(f0){return f0}if(y=P1.schema._getSchema(D.path),y&&y.caster)y=y.caster}else y=V;if(m&&m.path.endsWith(".$*"))f=!m.$isMongooseArray&&!m._arrayPath;else if(y!=null)f=!y.$isMongooseArray&&!y._arrayPath;if((_=O6(y,"options.ref"))!=null)if(y!=null&&typeof _==="function"&&D.path.endsWith("."+y.path)){T=new Set;let b1=D.path.slice(0,D.path.length-y.path.length-1),f0=O9.get(b1,L,nF),W2=Array.isArray(f0)?q2.array.flatten(f0):f0?[f0]:[];for(let s0 of W2)T.add(Nz(_,s0));if(W2.length===0)T=[Nz(_,L)];else T=Array.from(T)}else _=Nz(_,L),T=[_];else if((y=O6(V,"options.refPath"))!=null)if(M=!0,typeof k==="function"){let b1=D.path.slice(0,D.path.length-y.path.length-1),f0=O9.get(b1,L,nF),W2=Array.isArray(f0)?q2.array.flatten(f0):f0?[f0]:[];T=new Set;for(let s0 of W2)k=k.call(s0,s0,D.path),$X(k,L,D.path,q,D._queryProjection).forEach((K3)=>T.add(K3));T=Array.from(T)}else T=$X(k,L,D.path,q,D._queryProjection)}if(!T)if(D._localModel==null)T=[j.modelName];else return{modelNames:T,justOne:f,isRefPath:M,refPath:G};if(!Array.isArray(T))T=[T];return{modelNames:T,justOne:f,isRefPath:M,refPath:G}}};/*!
849
+ * ignore
850
+ */function AC1(F,A,B,D){let J=[],X={},Z=D.virtual;for(let Y of A){let $=null,G={},E,H=D.nestedSchemaPath?D.nestedSchemaPath+".":"";if(typeof B.localField==="string")E=B.localField;else if(typeof Z.options.localField==="function")E=H+Z.options.localField.call(Y,Y);else if(Array.isArray(Z.options.localField))E=Z.options.localField.map((L)=>H+L);else E=H+Z.options.localField;if(G.count=Z.options.count,Z.options.skip!=null&&!B.hasOwnProperty("skip"))B.skip=Z.options.skip;if(Z.options.limit!=null&&!B.hasOwnProperty("limit"))B.limit=Z.options.limit;if(Z.options.perDocumentLimit!=null&&!B.hasOwnProperty("perDocumentLimit"))B.perDocumentLimit=Z.options.perDocumentLimit;let q=Z.options.foreignField;if(!E||!q)return new T8(`Cannot populate virtual \`${B.path}\` on model \`${F.modelName}\`, because options \`localField\` and / or \`foreignField\` are missing`);if(typeof E==="function")E=E.call(Y,Y);if(typeof q==="function")q=q.call(Y,Y);G.isRefPath=!1;let W=null;if("justOne"in B&&B.justOne!==void 0)W=B.justOne;if($=Z._getModelNamesForPopulate(Y),Z.options.refPath)W=!!Z.options.justOne,G.isRefPath=!0;else if(Z.options.ref)W=!!Z.options.justOne;G.isVirtual=!0,G.virtual=Z,G.justOne=W;let z=O6(G,"virtual.options.match",null)||O6(G,"virtual.options.options.match",null),C=O6(B,"match",null)||z,U=typeof C==="function";if(U)C=C.call(Y,Y,G.virtual);if(Array.isArray(E)&&Array.isArray(q)&&E.length===q.length){C=Object.assign({},C);for(let L=1;L<E.length;++L)C[q[L]]=Sm(O9.get(E[L],Y,nF),F.schema),U=!0;E=E[0],q=q[0]}if(G.localField=E,G.foreignField=q,G.match=C,G.hasMatchFunction=U,Array.isArray(C)){for(let L of C)if(L!=null&&L.$where)throw new T8("Cannot use $where filter with populate() match")}else if(C!=null&&C.$where!=null)throw new T8("Cannot use $where filter with populate() match");let Q=Om(Y,E,F,B,Z);try{Tz(F,J,X,$,B,G,Q,Y)}catch(L){return L}}return J}/*!
851
+ * ignore
852
+ */function Tz(F,A,B,D,J,X,Z,Y,$,G){let E=J.connection!=null?J.connection:F.db;if(G=G===void 0?Z:G,Array.isArray(G))G=q2.cloneArrays(G);if(D==null)return;let H=q2.array.flatten(D),q=H.length;while(q--){let W=H[q];if(W==null)continue;let z;if(J.model&&J.model[Pz])z=J.model;else if(W[Pz])z=W,W=z.modelName;else try{z=jz(E,W)}catch(L){if(Z!==void 0)throw L;z=null}let C=Z,U=X.modelNamesInOrder?X.modelNamesInOrder:D;if(X.isRefPath&&Array.isArray(Z)&&Z.length===U.length)C=km(Z,U,W);let Q=J.perDocumentLimit==null?O6(J,"options.perDocumentLimit",null):J.perDocumentLimit;if(!B[W]||Q!=null){let L={model:z};if(X.isVirtual&&O6(X.virtual,"options.options"))L.options=rz1(X.virtual.options.options);else if($!=null)L.options=Object.assign({},$);q2.merge(L,J),J[Iz]=z,L[Iz]=z,B[W]={model:z,options:L,match:X.hasMatchFunction?[X.match]:X.match,docs:[Y],ids:[C],allIds:[Z],unpopulatedValues:[G],localField:new Set([X.localField]),foreignField:new Set([X.foreignField]),justOne:X.justOne,isVirtual:X.isVirtual,virtual:X.virtual,count:X.count,[Iz]:z},A.push(B[W])}else if(B[W].localField.add(X.localField),B[W].foreignField.add(X.foreignField),B[W].docs.push(Y),B[W].ids.push(C),B[W].allIds.push(Z),B[W].unpopulatedValues.push(G),X.hasMatchFunction)B[W].match.push(X.match)}}function jz(F,A){if(F.models[A]==null&&F._parent!=null)return jz(F._parent,A);return F.model(A)}function km(F,A,B){if(!Array.isArray(A))return A===B?Array.isArray(F)?q2.array.flatten(F):[F]:[];if(Array.isArray(F)&&Array.isArray(A))return F.flatMap((D,J)=>km(D,A[J],B));return[]}/*!
853
+ * ignore
854
+ */function Nz(F,A){if(typeof F==="function"&&!F[Pz])return F.call(A,A);return F}/*!
855
+ * ignore
856
+ */function Om(F,A,B,D,J,X){let Z=B.schema._getPathType(A),Y=Z==="real"?B.schema.path(A):Z.schema,$=Y&&Y.getters?Y.getters:[];A=Y!=null&&Y.instance==="Embedded"?A+"._id":A;let G=O6(D,"options",{}),E="getters"in G?G.getters:O6(J,"options.getters",!1);if($.length!==0&&E){let H=F.$__!=null?F:B.hydrate(F),q=q2.getValue(A,F);if(Array.isArray(q)){let W=q2.getValue(A.split(".").slice(0,-1),H);return q.map((z,C)=>Y.applyGetters(z,W[C]))}else return Y.applyGetters(q,H)}else return Sm(O9.get(A,F,nF),X)}function Sm(F,A){if(F!=null&&F.$__!=null)return F._doc._id;if(F!=null&&F._id!=null&&(A==null||!A.$isSchemaMap))return F._id;if(Array.isArray(F)){let B=F.__array!=null?F.__array:F;for(let D=0;D<B.length;++D)if(B[D]!=null&&B[D].$__!=null)B[D]=B[D]._doc._id;if(q2.isMongooseArray(F)&&F.$schema())return F.$schema()._castForPopulate(F,F.$parent());return[].concat(F)}if(oz1(F)==="Object"&&(A==null||A[Mz]==null)){let B=[];for(let D of Object.keys(F))B.push(F[D]);return B}if(F instanceof Map)return Array.from(F.values());return F}/*!
857
+ * ignore
858
+ */function BC1(F,A,B,D,J,X){if(!B.isRefPath||J==null)return;let Z=J.split("."),Y="",$=void 0;for(let G=0;G<Z.length;++G){let E=Z[G];Y=Y+(Y.length===0?"":".")+E;let H=A.path(Y);if(H!=null&&H.$isMongooseArray&&H.caster.discriminators!=null&&Object.keys(H.caster.discriminators).length!==0){let q=q2.getValue(Y,F),W=D.path.substring(Y.length+1),z=H.caster.schema.options.discriminatorKey;$=[];for(let C of q){let U=q2.getValue(z,C),Q=H.caster.discriminators[U],L=Q&&Q.schema;if(L==null)continue;let V=L.path(W);if(V==null||V.options.refPath==null){let j=q2.getValue(B.localField.substring(Y.length+1),C);X.forEach((T,M)=>{if(T===j)X[M]=az1(T)});continue}let w=q2.getValue(Z.slice(G+1).join("."),C);$.push(w)}}}return $}});var _m=K((AT1,fm)=>{var DC1=W0();fm.exports=function F(A){if(Array.isArray(A)){let D=Object.keys(A[0]);return D.length===1&&D[0]==="_id"&&A[0]._id!=="hashed"}if(typeof A!=="object")return!1;let B=DC1(A,"key",{});return Object.keys(B).length===1&&B.hasOwnProperty("_id")}});var ym=K((BT1,bm)=>{var GX=W0(),gm=X1();bm.exports=function F(A,B,D){if(D.textIndexVersion!=null){delete D.key._fts,delete D.key._ftsx;let Y={...D.weights,...D.key};if(Object.keys(Y).length!==Object.keys(A).length)return!1;for(let $ of Object.keys(Y)){if(!($ in A))return!1;let G=Y[$];if(G!==GX(B,"weights."+$)&&!(G===1&&GX(B,"weights."+$)==null))return!1}if(B.default_language!==D.default_language)return D.default_language==="english"&&B.default_language==null;return!0}let J=["unique","partialFilterExpression","sparse","expireAfterSeconds","collation"];for(let Y of J){if(!(Y in B)&&!(Y in D))continue;if(Y==="collation"){if(B[Y]==null||D[Y]==null)return B[Y]==null&&D[Y]==null;let $=Object.keys(B.collation),G=B.collation,E=D.collation;for(let H of $)if(GX(G,H)!==GX(E,H))return!1}else if(!gm.deepEqual(B[Y],D[Y]))return!1}let X=Object.keys(A),Z=Object.keys(D.key);if(X.length!==Z.length)return!1;for(let Y=0;Y<X.length;++Y){if(X[Y]!==Z[Y])return!1;if(!gm.deepEqual(A[X[Y]],D.key[Z[Y]]))return!1}return!0}});var hm=K((DT1,vm)=>{vm.exports=function F(A,B){if(B.timeseries==null)return!1;let{timeField:D,metaField:J}=B.timeseries;if(typeof D!=="string"||typeof J!=="string")return!1;return Object.keys(A.key).length===2&&A.key[D]===1&&A.key[J]===1}});var lm=K((JT1,cm)=>{var JC1=nJ();function XC1(F,A){return dm({baseModelName:F.baseModelName,discriminatorMapping:F.schema.discriminatorMapping,indexes:A,indexesType:"schema"})}function ZC1(F,A){return dm({baseModelName:F.baseModelName,discriminatorMapping:F.schema.discriminatorMapping,indexes:A,indexesType:"db"})}cm.exports={getRelatedSchemaIndexes:XC1,getRelatedDBIndexes:ZC1};function dm({baseModelName:F,discriminatorMapping:A,indexes:B,indexesType:D}){let J=A&&A.key,X=A&&A.value;if(!J)return B;if(Boolean(F))return B.filter((Y)=>{let $=mm(Y,D);return $&&$[J]===X});return B.filter((Y)=>{let $=mm(Y,D);return!$||!$[J]||JC1($[J])&&!("$eq"in $[J])})}function mm(F,A){if(A==="schema"){let B=F[1];return B&&B.partialFilterExpression}return F.partialFilterExpression}});var im=K((XT1,pm)=>{pm.exports=YC1;/*!
859
+ * ignore
860
+ */function YC1(F,A,B){let D=0,J=0,X=null;if(A<=0)throw new Error("Limit must be positive");if(F.length===0)return B(null,[]);for(let G=0;G<F.length&&G<A;++G)Z();function Z(){F[J+D]($(J+D)),++D}let Y=[];function $(G){return(E,H)=>{if(--D,++J,X!=null)return;if(E!=null)return X=E,B(X);if(Y[G]=H,J===F.length)return B(null,Y);else if(J+D<F.length)Z()}}}});var sm=K((ZT1,nm)=>{nm.exports=function F(A,B,D){if(B==null)return;for(let J=0;J<B.length;++J)if(Array.isArray(B[J]))F(A,B[J],D+"."+J);else A.push(D+"."+J)}});var em=K((YT1,om)=>{var am=W0(),rm=D6(),tm=Az();/*!
861
+ * ignore
862
+ */om.exports=function F(A,B,D){let J=tm(am(B,"select",null),!0)||tm(am(B,"options.select",null),!0);if(J==null)return;for(let X of A){if(!J.hasOwnProperty("-"+X))continue;for(let Z of D)if(Z.$__!=null)rm.unset(X,Z._doc);else rm.unset(X,Z)}}});var Ad=K(($T1,Fd)=>{/*!
863
+ * Module dependencies.
864
+ */var $C1=z1();class kz extends $C1{constructor(F,A,B){let D=B?.matchedCount??0,J=B?.insertedCount??0,X=A.map((Y)=>Y._id).join(", ");if(X.length>100)X=X.slice(0,100)+"...";let Z=A.length-D-J;super(`${F}.bulkSave() was not able to update ${Z} of the given documents due to incorrect version or optimistic concurrency, document ids: ${X}`);this.modelName=F,this.documents=A,this.bulkWriteResult=B,this.numDocumentsNotUpdated=Z}}Object.defineProperty(kz.prototype,"name",{value:"MongooseBulkSaveIncompleteError"});/*!
865
+ * exports
866
+ */Fd.exports=kz});var Kz=K((Vd,Rd)=>{/*!
867
+ * Module dependencies.
868
+ */var GC1=qz(),EC1=yE(),C3=y2(),HC1=zD(),Oz=import.meta.require("events").EventEmitter,fz=n7(),{MongoBulkWriteError:qC1}=G9(),qX=WW(),E1=_2(),WC1=RD(),zC1=rE(),EX=rJ(),CC1=Sh(),Sz=J8(),uz=C9(),Gd=iE(),Bd=sE(),KC1=wD(),UC1=xh(),QC1=Cz(),LC1=rD(),Ed=gh(),VC1=vh(),RC1=mW(),Hd=ch(),wC1=ph(),qd=nh(),IC1=eh(),Wd=dW(),NC1=Bm(),PC1=Lm(),MC1=OW(),o3=Z0(),TC1=Im(),zd=jW(),Dd=UW(),Cd=MD(),jC1=UJ(),xz=fq(),aF=W0(),kC1=I2(),HX=M6(),OC1=xm(),rF=Z6(),_z=n6().internalToObjectOptions,gz=_m(),Kd=ym(),SC1=hm(),{getRelatedDBIndexes:uC1,getRelatedSchemaIndexes:xC1}=lm(),bz=Jq(),fC1=jD(),_C1=pF(),gC1=im(),bC1=Gz(),Ud=sm(),yC1=em(),vC1=wW(),Jd=u9(),Xd=import.meta.require("util"),t1=X1(),hC1=LH(),mC1=Ad(),tF=Symbol("mongoose#Model#collection"),oF=Symbol("mongoose#Model#db"),Qd=t().modelSymbol,sF=Symbol("mongoose#Model#subclassed"),{VERSION_INC:WX,VERSION_WHERE:Zd,VERSION_ALL:dC1}=C3,cC1=Object.assign({},_z,{bson:!0});function d(F,A,B){if(A instanceof Sz)throw new TypeError("2nd argument to `Model` constructor must be a POJO or string, **not** a schema. Make sure you're calling `mongoose.model()`, not `mongoose.Model()`.");if(typeof F==="string")throw new TypeError("First argument to `Model` constructor must be an object, **not** a string. Make sure you're calling `mongoose.model()`, not `mongoose.Model()`.");C3.call(this,F,A,B)}Object.setPrototypeOf(d.prototype,C3.prototype);d.prototype.$isMongooseModelPrototype=!0;d.prototype.db;d.prototype.collection;d.prototype.$__collection;d.prototype.modelName;d.prototype.$where;d.prototype.baseModelName;d.events;d._middleware;/*!
869
+ * ignore
870
+ */function Ld(F,A){if(F.$where==null)return;for(let B of Object.keys(F.$where))A[B]=F.$where[B]}/*!
871
+ * ignore
872
+ */d.prototype.$__handleSave=function(F,A){let B={};if(Wd(this.$__schema,F),typeof F.writeConcern!=="undefined"){if(B.writeConcern={},"w"in F.writeConcern)B.writeConcern.w=F.writeConcern.w;if("j"in F.writeConcern)B.writeConcern.j=F.writeConcern.j;if("wtimeout"in F.writeConcern)B.writeConcern.wtimeout=F.writeConcern.wtimeout}else{if("w"in F)B.w=F.w;if("j"in F)B.j=F.j;if("wtimeout"in F)B.wtimeout=F.wtimeout}if("checkKeys"in F)B.checkKeys=F.checkKeys;let D=this.$session(),J=this[oF].base.transactionAsyncLocalStorage?.getStore();if(D!=null)B.session=D;else if(!F.hasOwnProperty("session")&&J?.session!=null)B.session=J.session;if(this.$isNew){let Y=this.toObject(cC1);if((Y||{})._id===void 0){rF(function(){A(new E1("document must have an _id before saving"))});return}this.$__version(!0,Y),this[tF].insertOne(Y,B).then(($)=>A(null,$),($)=>{j8(this,!0),A($,null)}),this.$__reset(),j8(this,!1),this.$__.inserting=!0;return}this.$__.inserting=!1;let X=this.$__delta();if(F.pathsToSave)for(let Y in X[1].$set)if(F.pathsToSave.includes(Y))continue;else if(F.pathsToSave.some(($)=>Y.slice(0,$.length)===$&&Y.charAt($.length)==="."))continue;else delete X[1].$set[Y];if(X){if(X instanceof E1){A(X);return}let Y=this.$__where(X[0]);if(Y instanceof E1){A(Y);return}Ld(this,Y);let $=X[1];if(this.$__schema.options.minimize)for(let G of Object.values($)){if(G==null)continue;for(let E of Object.keys(G)){if(G[E]==null||typeof G[E]!=="object")continue;if(!t1.isPOJO(G[E]))continue;if(hC1(G[E]),Object.keys(G[E]).length===0)delete G[E],$.$unset=$.$unset||{},$.$unset[E]=1}}this[tF].updateOne(Y,$,B).then((G)=>{G.$where=Y,A(null,G)},(G)=>{this.$__undoReset(),A(G)})}else{Z.call(this);return}this.$__.modifiedPaths=this.modifiedPaths(),this.$__reset(),j8(this,!1);function Z(){let Y=Object.assign({},F,B),$=this.$__where(),G=this.$__schema.options.optimisticConcurrency;if(G&&!Array.isArray(G)){let E=this.$__schema.options.versionKey,H=this.$__getValue(E);if(H!=null)$[E]=H}RC1(this.$__schema,Y),this.constructor.collection.findOne($,Y).then((E)=>{A(null,{$where:$,matchedCount:!E?0:1})}).catch(A)}};/*!
873
+ * ignore
874
+ */d.prototype.$__save=function(F,A){this.$__handleSave(F,(B,D)=>{if(B)return B=this.$__schema._transformDuplicateKeyError(B),this.$__schema.s.hooks.execPost("save:error",this,[this],{error:B},(Y)=>{A(Y,this)});let J=0;if((F!=null?F.writeConcern!=null?F.writeConcern.w:F.w:0)!==0){if(D!=null)if(Array.isArray(D))J=D.length;else if(D.matchedCount!=null)J=D.matchedCount;else J=D;if(this.$__.version&&!this.$__.inserting){let Y=WX===(WX&this.$__.version);this.$__.version=void 0;let $=this.$__schema.options.versionKey,G=this.$__getValue($)||0;if(J<=0){this.$__undoReset();let E=this.$__.$versionError||new Gd(this,G,this.$__.modifiedPaths);return A(E)}if(Y)this.$__setValue($,G+1)}if(D!=null&&J<=0)return this.$__undoReset(),B=new HC1(D.$where,this.constructor.modelName,J,D),this.$__schema.s.hooks.execPost("save:error",this,[this],{error:B},($)=>{A($,this)})}this.$__.saving=void 0,this.$__.savedState={},this.$emit("save",this,J),this.constructor.emit("save",this,J),A(null,this)})};/*!
875
+ * ignore
876
+ */function lC1(F,A){let B=F.$__schema.options.versionKey;if(!B)return null;let D=F.$__getValue(B)||0;return new Gd(F,D,A)}d.prototype.save=async function F(A){if(typeof A==="function"||typeof arguments[1]==="function")throw new E1("Model.prototype.save() no longer accepts a callback");let B;if(this.$op="save",this.$__.saving)B=new Bd(this);else this.$__.saving=new Bd(this);if(A=new CC1(A),A.hasOwnProperty("session"))this.$session(A.session);if(this.$__.timestamps!=null)A.timestamps=this.$__.timestamps;if(this.$__.$versionError=lC1(this,this.modifiedPaths()),B)throw this.$__handleReject(B),B;return this.$__.saveOptions=A,await new Promise((D,J)=>{this.$__save(A,(X)=>{if(this.$__.saving=null,this.$__.saveOptions=null,this.$__.$versionError=null,this.$op=null,X!=null)return this.$__handleReject(X),J(X);D()})}),this};d.prototype.$save=d.prototype.save;d.prototype.$__version=function(F,A){let B=this.$__schema.options.versionKey;if(F===!0){if(B)vC1(A,B,0),this.$__setValue(B,0);return}if(B===!1)return;if(!this.$__isSelected(B))return;if(Zd===(Zd&this.$__.version)){let D=this.$__getValue(B);if(D!=null)F[B]=D}if(WX===(WX&this.$__.version))if(aF(A.$set,B,null)!=null)++A.$set[B];else A.$inc=A.$inc||{},A.$inc[B]=1};d.prototype.increment=function F(){return this.$__.version=dC1,this};d.prototype.$__where=function F(A){if(A||(A={}),!A._id)A._id=this._doc._id;if(this._doc._id===void 0)return new E1("No _id found on document!");return A};d.prototype.deleteOne=function F(A){if(typeof A==="function"||typeof arguments[1]==="function")throw new E1("Model.prototype.deleteOne() no longer accepts a callback");if(!A)A={};if(A.hasOwnProperty("session"))this.$session(A.session);let B=this,D=this.$__where();if(D instanceof Error)throw D;let J=B.constructor.deleteOne(D,A);if(this.$session()!=null){if(!("session"in J.options))J.options.session=this.$session()}return J.pre(function X(Z){B.constructor._middleware.execPre("deleteOne",B,[B],Z)}),J.pre(function X(Z){xz(B.$getAllSubdocs(),(Y,$)=>{Y.constructor._middleware.execPre("deleteOne",Y,[Y],$)},Z)}),J.pre(function X(Z){if(B.$__.isDeleted)return Z(fz.skipWrappedFunction());return Z()}),J.post(function X(Z){xz(B.$getAllSubdocs(),(Y,$)=>{Y.constructor._middleware.execPost("deleteOne",Y,[Y],{},$)},Z)}),J.post(function X(Z){B.constructor._middleware.execPost("deleteOne",B,[B],{},Z)}),J};d.prototype.$model=function F(A){if(arguments.length===0)return this.constructor;return this[oF].model(A)};d.prototype.model=d.prototype.$model;d.exists=function F(A,B){if(W1(this,"exists"),typeof arguments[2]==="function")throw new E1("Model.exists() no longer accepts a callback");return this.findOne(A).select({_id:1}).lean().setOptions(B)};d.discriminator=function(F,A,B){let D;if(typeof F==="function"){if(D=F,F=t1.getFunctionName(D),!(D.prototype instanceof d))throw new E1("The provided class "+F+" must extend Model")}B=B||{};let J=t1.isPOJO(B)?B.value:B,X=typeof B.clone==="boolean"?B.clone:!0,Z=typeof B.mergePlugins==="boolean"?B.mergePlugins:!0,Y=typeof B.overwriteModels==="boolean"?B.overwriteModels:!1;if(W1(this,"discriminator"),t1.isObject(A)&&!A.instanceOfSchema)A=new Sz(A);if(A instanceof Sz&&X)A=A.clone();if(A=jC1(this,F,A,J,Z,B.mergeHooks,Y),this.db.models[F]&&!A.options.overwriteModels&&!Y)throw new zC1(F);A.$isRootDiscriminator=!0,A.$globalPluginsApplied=!0,D=this.db.model(D||F,A,this.$__collection.name),this.discriminators[F]=D;let $=this.discriminators[F];if(Object.setPrototypeOf($.prototype,this.prototype),Object.defineProperty($,"baseModelName",{value:this.modelName,configurable:!0,writable:!1}),Ed($,A),qd($,A),this[sF]!=null)for(let G of this[sF])G.discriminators=G.discriminators||{},G.discriminators[F]=D.__subclass(D.db,A,G.collection.name);return $};function W1(F,A){if(F==null||F===global)throw new E1("`Model."+A+"()` cannot run without a model as `this`. Make sure you are calling `MyModel."+A+"()` where `MyModel` is a Mongoose model.");else if(F[Qd]==null)throw new E1("`Model."+A+"()` cannot run without a model as `this`. Make sure you are not calling `new Model."+A+"()`")}/*!
877
+ * Give the constructor the ability to emit events.
878
+ */for(let F in Oz.prototype)d[F]=Oz.prototype[F];d.init=function F(){if(W1(this,"init"),typeof arguments[0]==="function")throw new E1("Model.init() no longer accepts a callback");if(this.schema.emit("init",this),this.$init!=null)return this.$init;let A=this.db,B=async()=>{if(!t1.getOption("autoIndex",this.schema.options,A.config,A.base.options))return;return await this.ensureIndexes({_automatic:!0})},D=async()=>{if(!t1.getOption("autoSearchIndex",this.schema.options,A.config,A.base.options))return;let $=[];for(let G of this.schema._searchIndexes)$.push(await this.createSearchIndex(G));return $},J=async()=>{if((A.readyState===Jd.connecting||A.readyState===Jd.disconnected)&&A._shouldBufferCommands())await new Promise(($)=>{A._queue.push({fn:$})});if(!t1.getOption("autoCreate",this.schema.options,A.config,A.base.options))return;return await this.createCollection()};this.$init=J().then(()=>B()).then(()=>D());let X=this.$init.catch,Z=this;return this.$init.catch=function(){return Z.$caught=!0,X.apply(Z.$init,arguments)},this.$init};d.createCollection=async function F(A){if(W1(this,"createCollection"),typeof arguments[0]==="function"||typeof arguments[1]==="function")throw new E1("Model.createCollection() no longer accepts a callback");let B=await new Promise(($,G)=>{this.hooks.execPre("createCollection",this,[A],(E)=>{if(E!=null){if(E instanceof fz.skipWrappedFunction)return $(!0);return G(E)}$()})}),D=this&&this.schema&&this.schema.options&&this.schema.options.collectionOptions;if(D!=null)A=Object.assign({},D,A);let J=this&&this.schema&&this.schema.options&&this.schema.options.collation;if(J!=null)A=Object.assign({collation:J},A);let X=this&&this.schema&&this.schema.options&&this.schema.options.capped;if(X!=null){if(typeof X==="number")A=Object.assign({capped:!0,size:X},A);else if(typeof X==="object")A=Object.assign({capped:!0},X,A)}let Z=this&&this.schema&&this.schema.options&&this.schema.options.timeseries;if(Z!=null){if(A=Object.assign({timeseries:Z},A),A.expireAfterSeconds!=null);else if(A.expires!=null)t1.expires(A);else if(this.schema.options.expireAfterSeconds!=null)A.expireAfterSeconds=this.schema.options.expireAfterSeconds;else if(this.schema.options.expires!=null)A.expires=this.schema.options.expires,t1.expires(A)}let Y=this&&this.schema&&this.schema.options&&this.schema.options.clusteredIndex;if(Y!=null)A=Object.assign({clusteredIndex:{...Y,unique:!0}},A);try{if(!B)await this.db.createCollection(this.$__collection.collectionName,A)}catch($){if($!=null&&($.name!=="MongoServerError"||$.code!==48))await new Promise((G,E)=>{let H={error:$};this.hooks.execPost("createCollection",this,[null],H,(q)=>{if(q!=null)return E(q);G()})})}return await new Promise(($,G)=>{this.hooks.execPost("createCollection",this,[this.$__collection],(E)=>{if(E!=null)return G(E);$()})}),this.$__collection};d.syncIndexes=async function F(A){if(W1(this,"syncIndexes"),typeof arguments[0]==="function"||typeof arguments[1]==="function")throw new E1("Model.syncIndexes() no longer accepts a callback");let B=this;try{await B.createCollection()}catch(X){if(X!=null&&(X.name!=="MongoServerError"||X.code!==48))throw X}let D=await B.diffIndexes(),J=await B.cleanIndexes({...A,toDrop:D.toDrop});return await B.createIndexes({...A,toCreate:D.toCreate}),J};d.createSearchIndex=async function F(A){return W1(this,"createSearchIndex"),await this.$__collection.createSearchIndex(A)};d.updateSearchIndex=async function F(A,B){return W1(this,"updateSearchIndex"),await this.$__collection.updateSearchIndex(A,B)};d.dropSearchIndex=async function F(A){return W1(this,"dropSearchIndex"),await this.$__collection.dropSearchIndex(A)};d.listSearchIndexes=async function F(A){return W1(this,"listSearchIndexes"),await(await this.$__collection.listSearchIndexes(A)).toArray()};d.diffIndexes=async function F(){if(typeof arguments[0]==="function"||typeof arguments[1]==="function")throw new E1("Model.syncIndexes() no longer accepts a callback");let A=this,B=await A.listIndexes().catch((Y)=>{if(Y.codeName=="NamespaceNotFound")return;throw Y});if(B===void 0)B=[];B=uC1(A,B);let D=A.schema,J=xC1(A,D.indexes()),X=iC1(D,J,B),Z=pC1(D,J,B,X);return{toDrop:X,toCreate:Z}};function pC1(F,A,B,D){let J=[];for(let[X,Z]of A){let Y=!1,$=bz(F,o3(Z));for(let G of B){if(gz(G))continue;if(Kd(X,$,G)&&!D.includes(G.name)){Y=!0;break}}if(!Y)J.push(X)}return J}function iC1(F,A,B){let D=[];for(let J of B){let X=!1;if(gz(J))continue;if(SC1(J,F.options))continue;for(let[Z,Y]of A){let $=bz(F,o3(Y));if(Hd(Z,$,F.options),Kd(Z,$,J)){X=!0;break}}if(X)continue;D.push(J.name)}return D}d.cleanIndexes=async function F(A){if(W1(this,"cleanIndexes"),typeof arguments[0]==="function"||typeof arguments[1]==="function")throw new E1("Model.cleanIndexes() no longer accepts a callback");let B=this;if(Array.isArray(A&&A.toDrop))return await Yd(A.toDrop,B,A);let D=await B.diffIndexes();return await Yd(D.toDrop,B,A)};async function Yd(F,A,B){if(F.length===0)return[];let D=A.$__collection;if(B&&B.hideIndexes)await Promise.all(F.map((J)=>{return A.db.db.command({collMod:D.collectionName,index:{name:J,hidden:!0}})}));else await Promise.all(F.map((J)=>D.dropIndex(J)));return F}d.listIndexes=async function F(){if(W1(this,"listIndexes"),typeof arguments[0]==="function")throw new E1("Model.listIndexes() no longer accepts a callback");if(this.$__collection.buffer)await new Promise((A)=>{this.$__collection.addQueue(A)});return this.$__collection.listIndexes().toArray()};d.ensureIndexes=async function F(A){if(W1(this,"ensureIndexes"),typeof arguments[0]==="function"||typeof arguments[1]==="function")throw new E1("Model.ensureIndexes() no longer accepts a callback");await new Promise((B,D)=>{nC1(this,A,(J)=>{if(J!=null)return D(J);B()})})};d.createIndexes=async function F(A){if(W1(this,"createIndexes"),typeof arguments[0]==="function"||typeof arguments[1]==="function")throw new E1("Model.createIndexes() no longer accepts a callback");return this.ensureIndexes(A)};/*!
879
+ * ignore
880
+ */function nC1(F,A,B){let D=F.schema.indexes(),J;A=A||{};let X=function(H){if(H&&!F.$caught)F.emit("error",H);F.emit("index",H||J),B&&B(H||J)};for(let H of D)if(gz(H))t1.warn('mongoose: Cannot specify a custom index on `_id` for model name "'+F.modelName+'", MongoDB does not allow overwriting the default `_id` index. See https://bit.ly/mongodb-id-index');if(!D.length){rF(function(){X()});return}let Z=function(H,q,W,z){F.emit("index-single-done",H,q,W,z)},Y=function(H,q){F.emit("index-single-start",H,q)},$=F.schema._baseSchema,G=$?$.indexes():[];rF(function(){if(A._automatic&&!F.collection.collection)F.collection.addQueue(E,[]);else E()});function E(){if(A._automatic){if(F.schema.options.autoIndex===!1||F.schema.options.autoIndex==null&&F.db.config.autoIndex===!1)return X()}let H=D.shift();if(!H)return X();if(A._automatic&&H[1]._autoIndex===!1)return E();if(G.find((C)=>t1.deepEqual(C,H)))return E();let q=o3(H[0]),W=o3(H[1]);if(delete W._autoIndex,bz(F.schema,W),Wd(F.schema,W),Hd(q,W,F.schema.options),Y(q,A),"background"in A)W.background=A.background;if("toCreate"in A){if(A.toCreate.length===0)return X()}let z=null;try{z=F.collection.createIndex(q,W)}catch(C){if(!J)J=C;if(!F.$caught)F.emit("error",C);Z(C,q,W),E();return}z.then((C)=>{Z(null,q,W,C),E()},(C)=>{if(!J)J=C;if(!F.$caught)F.emit("error",C);Z(C,q,W),E()})}}d.schema;d.db;d.collection;d.$__collection;d.base;d.discriminators;d.translateAliases=function F(A,B){W1(this,"translateAliases");let D=(J,X)=>{let Z,Y=[],$=J.split("."),G=this.schema;for(let H in $){let q=$[H];if(G&&G.aliases[q]){if(Z=G.aliases[q],B&&Z in A)throw new E1(`Provided object has both field "${q}" and its alias "${Z}"`);Y.push(Z)}else Z=q,Y.push(q);if(G&&G.paths[Z])G=G.paths[Z].schema;else G=null}let E=Y.join(".");if(A instanceof Map)A.set(E,X);else A[E]=X;if(E!==J)if(A instanceof Map)A.delete(J);else delete A[J];return A};if(typeof A==="object"){if(A instanceof Map)for(let J of new Map(A))A=D(J[0],J[1]);else for(let J of Object.keys(A))if(A=D(J,A[J]),J[0]==="$")if(Array.isArray(A[J]))for(let X in A[J])A[J][X]=this.translateAliases(A[J][X]);else this.translateAliases(A[J]);return A}else return A};d.deleteOne=function F(A,B){if(W1(this,"deleteOne"),typeof arguments[0]==="function"||typeof arguments[1]==="function"||typeof arguments[2]==="function")throw new E1("Model.prototype.deleteOne() no longer accepts a callback");let D=new this.Query({},{},this,this.$__collection);return D.setOptions(B),D.deleteOne(A)};d.deleteMany=function F(A,B){if(W1(this,"deleteMany"),typeof arguments[0]==="function"||typeof arguments[1]==="function"||typeof arguments[2]==="function")throw new E1("Model.deleteMany() no longer accepts a callback");let D=new this.Query({},{},this,this.$__collection);return D.setOptions(B),D.deleteMany(A)};d.find=function F(A,B,D){if(W1(this,"find"),typeof arguments[0]==="function"||typeof arguments[1]==="function"||typeof arguments[2]==="function"||typeof arguments[3]==="function")throw new E1("Model.find() no longer accepts a callback");let J=new this.Query({},{},this,this.$__collection);return J.select(B),J.setOptions(D),J.find(A)};d.findById=function F(A,B,D){if(W1(this,"findById"),typeof arguments[0]==="function"||typeof arguments[1]==="function"||typeof arguments[2]==="function")throw new E1("Model.findById() no longer accepts a callback");if(typeof A==="undefined")A=null;return this.findOne({_id:A},B,D)};d.findOne=function F(A,B,D){if(W1(this,"findOne"),typeof arguments[0]==="function"||typeof arguments[1]==="function"||typeof arguments[2]==="function")throw new E1("Model.findOne() no longer accepts a callback");let J=new this.Query({},{},this,this.$__collection);return J.select(B),J.setOptions(D),J.findOne(A)};d.estimatedDocumentCount=function F(A){return W1(this,"estimatedDocumentCount"),new this.Query({},{},this,this.$__collection).estimatedDocumentCount(A)};d.countDocuments=function F(A,B){if(W1(this,"countDocuments"),typeof arguments[0]==="function"||typeof arguments[1]==="function"||typeof arguments[2]==="function")throw new E1("Model.countDocuments() no longer accepts a callback");let D=new this.Query({},{},this,this.$__collection);if(B!=null)D.setOptions(B);return D.countDocuments(A)};d.distinct=function F(A,B,D){if(W1(this,"distinct"),typeof arguments[0]==="function"||typeof arguments[1]==="function"||typeof arguments[2]==="function")throw new E1("Model.distinct() no longer accepts a callback");let J=new this.Query({},{},this,this.$__collection);if(D!=null)J.setOptions(D);return J.distinct(A,B)};d.where=function F(A,B){W1(this,"where");let D=new this.Query({},{},this,this.$__collection).find({});return D.where.apply(D,arguments)};d.$where=function F(){W1(this,"$where");let A=new this.Query({},{},this,this.$__collection).find({});return A.$where.apply(A,arguments)};d.findOneAndUpdate=function(F,A,B){if(W1(this,"findOneAndUpdate"),typeof arguments[0]==="function"||typeof arguments[1]==="function"||typeof arguments[2]==="function"||typeof arguments[3]==="function")throw new E1("Model.findOneAndUpdate() no longer accepts a callback");if(arguments.length===1)A=F,F=null,B=null;let D;if(B)D=B.fields||B.projection;A=o3(A,{depopulate:!0,_isNested:!0}),zd(A,B,this.schema.options.versionKey);let J=new this.Query({},{},this,this.$__collection);return J.select(D),J.findOneAndUpdate(F,A,B)};d.findByIdAndUpdate=function(F,A,B){if(W1(this,"findByIdAndUpdate"),typeof arguments[0]==="function"||typeof arguments[1]==="function"||typeof arguments[2]==="function"||typeof arguments[3]==="function")throw new E1("Model.findByIdAndUpdate() no longer accepts a callback");if(F instanceof C3)F=F._doc._id;return this.findOneAndUpdate.call(this,{_id:F},A,B)};d.findOneAndDelete=function(F,A){if(W1(this,"findOneAndDelete"),typeof arguments[0]==="function"||typeof arguments[1]==="function"||typeof arguments[2]==="function")throw new E1("Model.findOneAndDelete() no longer accepts a callback");let B;if(A)B=A.select,A.select=void 0;let D=new this.Query({},{},this,this.$__collection);return D.select(B),D.findOneAndDelete(F,A)};d.findByIdAndDelete=function(F,A){if(W1(this,"findByIdAndDelete"),typeof arguments[0]==="function"||typeof arguments[1]==="function"||typeof arguments[2]==="function")throw new E1("Model.findByIdAndDelete() no longer accepts a callback");return this.findOneAndDelete({_id:F},A)};d.findOneAndReplace=function(F,A,B){if(W1(this,"findOneAndReplace"),typeof arguments[0]==="function"||typeof arguments[1]==="function"||typeof arguments[2]==="function"||typeof arguments[3]==="function")throw new E1("Model.findOneAndReplace() no longer accepts a callback");let D;if(B)D=B.select,B.select=void 0;let J=new this.Query({},{},this,this.$__collection);return J.select(D),J.findOneAndReplace(F,A,B)};d.create=async function F(A,B){if(typeof B==="function"||typeof arguments[2]==="function")throw new E1("Model.create() no longer accepts a callback");W1(this,"create");let D,J=this.schema.options.discriminatorKey;if(Array.isArray(A))D=A,B=B!=null&&typeof B==="object"?B:{};else{let Y=arguments[arguments.length-1];if(B={},typeof Y==="function"||typeof B==="function"||typeof arguments[2]==="function")throw new E1("Model.create() no longer accepts a callback");else if(D=[...arguments],D.length>1&&!Y)D.pop();if(D.length===2&&D[0]!=null&&D[1]!=null&&D[0].session==null&&Y&&kC1(Y.session)==="ClientSession"&&!this.schema.path("session"))t1.warn("WARNING: to pass a `session` to `Model.create()` in Mongoose, you **must** pass an array as the first argument. See: https://mongoosejs.com/docs/api/model.html#Model.create()")}if(D.length===0)return Array.isArray(A)?[]:null;let X=[],Z=typeof B.aggregateErrors==="boolean"?!B.aggregateErrors:!0;if(delete B.aggregateErrors,B.ordered){for(let Y=0;Y<D.length;Y++)try{let $=D[Y],G=this.discriminators&&$[J]!=null?this.discriminators[$[J]]||HX(this.discriminators,$[J]):this;if(G==null)throw new E1(`Discriminator "${$[J]}" not found for model "${this.modelName}"`);let E=$;if(!(E instanceof G))E=new G(E);await E.$save(B),X.push(E)}catch($){if(!Z)X.push($);else throw $}return X}else if(!Z)X=await Promise.allSettled(D.map(async(Y)=>{let $=this.discriminators&&Y[J]!=null?this.discriminators[Y[J]]||HX(this.discriminators,Y[J]):this;if($==null)throw new E1(`Discriminator "${Y[J]}" not found for model "${this.modelName}"`);let G=Y;if(!(G instanceof $))G=new $(G);return await G.$save(B),G})),X=X.map((Y)=>Y.status==="fulfilled"?Y.value:Y.reason);else{let Y=null;if(X=await Promise.all(D.map(async($)=>{let G=this.discriminators&&$[J]!=null?this.discriminators[$[J]]||HX(this.discriminators,$[J]):this;if(G==null)throw new E1(`Discriminator "${$[J]}" not found for model "${this.modelName}"`);try{let E=$;if(!(E instanceof G))E=new G(E);return await E.$save(B),E}catch(E){if(!Y)Y=E}})),Y)throw Y}if(!Array.isArray(A)&&D.length===1)return X[0];return X};d.watch=function(F,A){W1(this,"watch");let B=(D)=>{if(F=F||[],bC1(F,this.schema,"fullDocument"),this.$__collection.buffer)this.$__collection.addQueue(()=>{if(this.closed)return;let J=this.$__collection.watch(F,A);D(null,J)});else{let J=this.$__collection.watch(F,A);D(null,J)}};return A=A||{},A.model=this,new EC1(B,F,A)};d.startSession=function(){return W1(this,"startSession"),this.db.startSession.apply(this.db,arguments)};d.insertMany=async function F(A,B){if(W1(this,"insertMany"),typeof B==="function"||typeof arguments[2]==="function")throw new E1("Model.insertMany() no longer accepts a callback");return new Promise((D,J)=>{this.$__insertMany(A,B,(X,Z)=>{if(X!=null)return J(X);D(Z)})})};d.$__insertMany=function(F,A,B){let D=this;if(typeof A==="function")B=A,A=null;B=B||t1.noop,A=A||{};let J=A.limit||1000,X=!!A.rawResult,Z=typeof A.ordered==="boolean"?A.ordered:!0,Y=typeof A.throwOnValidationError==="boolean"?A.throwOnValidationError:!1,$=!!A.lean,G=this.db.base.transactionAsyncLocalStorage?.getStore();if((!A||!A.hasOwnProperty("session"))&&G?.session!=null)A={...A,session:G.session};if(!Array.isArray(F))F=[F];let E=[],H=new Map,q=Z?null:new Array(F.length),W=F.map((z,C)=>(U)=>{if($)return rF(()=>U(null,z));let Q=!1;if(!(z instanceof D)){if(z!=null&&typeof z!=="object")return U(new WC1(z,"arr."+C,"insertMany"));try{z=new D(z),Q=!0}catch(L){return U(L)}}if(A.session!=null)z.$session(A.session);if($)return rF(()=>U(null,z));z.$validate(Q?{_skipParallelValidateCheck:!0}:null).then(()=>{U(null,z)},(L)=>{if(Z===!1)return E.push(L),H.set(L,C),q[C]=L,U(null,null);U(L)})});gC1(W,J,function(z,C){if(z){B(z,null);return}let U=new Map,Q=new Map;for(let w=0;w<C.length;++w)U.set(C[w],w);let L=C.filter(function(w){return w!=null});for(let w=0;w<L.length;++w)Q.set(w,U.get(L[w]));if(E.length>0)E.sort((w,j)=>{return H.get(w)-H.get(j)});if(L.length===0){if(Y)return B(new qX(E,q,null,"insertMany"));if(X)return B(null,{acknowledged:!0,insertedCount:0,insertedIds:{},mongoose:{validationErrors:E}});B(null,[]);return}let V=$?L:L.map(function(w){if(w.$__schema.options.versionKey)w[w.$__schema.options.versionKey]=0;if((!A||A.timestamps!==!1)&&w.initializeTimestamps&&(!w.$__||w.$__.timestamps!==!1))w.initializeTimestamps();if(w.$__hasOnlyPrimitiveValues())return w.$__toObjectShallow();return w.toObject(_z)});D.$__collection.insertMany(V,A).then((w)=>{if(!$)for(let j of L)j.$__reset(),j8(j,!1);if(Z===!1&&Y&&E.length>0){for(let j=0;j<q.length;++j)if(q[j]===void 0)q[j]=C[j];return B(new qX(E,q,w,"insertMany"))}if(X){if(Z===!1){for(let j=0;j<q.length;++j)if(q[j]===void 0)q[j]=C[j];w.mongoose={validationErrors:E,results:q}}return B(null,w)}if(A.populate!=null)return D.populate(L,A.populate).then((j)=>{B(null,j)},(j)=>{if(j!=null)j.insertedDocs=L;throw j});B(null,L)},(w)=>{if(w.writeErrors==null&&(w.result&&w.result.result&&w.result.result.writeErrors)!=null)w.writeErrors=w.result.result.writeErrors;let j=w&&w.writeErrors,T=new Set((w&&w.writeErrors||[]).map((f)=>f.index));if(w.writeErrors!=null)for(let f=0;f<w.writeErrors.length;++f){let m=Q.get(w.writeErrors[f].index);if(w.writeErrors[f]={...w.writeErrors[f],index:m},!Z)q[m]=w.writeErrors[f]}if(!Z){for(let f=0;f<q.length;++f)if(q[f]===void 0)q[f]=C[f];w.results=q}let M=-1;if(w.insertedDocs=L.filter((f,m)=>{let O=!j||T.has(m);if(Z){if(M>-1)return m<M;if(O)M=m}return!O}).map(function f(m){if($)return m;return m.$__reset(),j8(m,!1),m}),X&&Z===!1)w.mongoose={validationErrors:E,results:q};B(w,null)})})};/*!
881
+ * ignore
882
+ */function j8(F,A){F.$isNew=A,F.$emit("isNew",A),F.constructor.emit("isNew",A);let B=F.$getAllSubdocs({useCache:!0});for(let D of B)D.$isNew=A,D.$emit("isNew",A)}d.bulkWrite=async function F(A,B){if(W1(this,"bulkWrite"),typeof B==="function"||typeof arguments[2]==="function")throw new E1("Model.bulkWrite() no longer accepts a callback");B=B||{};let D=await new Promise(($,G)=>{this.hooks.execPre("bulkWrite",this,[A,B],(E)=>{if(E!=null){if(E instanceof fz.skipWrappedFunction)return $(E);return G(E)}$()})});if(D)return D.args[0];let J=B.ordered==null?!0:B.ordered;if(A.length===0)return Dd();let X=A.map(($)=>MC1(this,$,B)),Z=this.db.base.transactionAsyncLocalStorage?.getStore();if((!B||!B.hasOwnProperty("session"))&&Z?.session!=null)B={...B,session:Z.session};let Y=null;if(J){await new Promise(($,G)=>{xz(X,(E,H)=>E(H),(E)=>{if(E)return G(E);$()})});try{Y=await this.$__collection.bulkWrite(A,B)}catch($){await new Promise((G,E)=>{let H={error:$};this.hooks.execPost("bulkWrite",this,[null],H,(q)=>{if(q!=null)return E(q);G()})})}}else{let $=X.length,G=[],E=[],H=[];await new Promise((z)=>{for(let C=0;C<X.length;++C)X[C]((U)=>{if(U==null)G.push(C);else E.push({index:C,error:U}),H[C]=U;if(--$<=0)z()})}),E=E.sort((z,C)=>z.index-C.index).map((z)=>z.error);let q=G;if(G=G.sort().map((z)=>A[z]),G.length===0){if(B.throwOnValidationError&&E.length)throw new qX(E,H,Y,"bulkWrite");return Dd()}let W;if([Y,W]=await this.$__collection.bulkWrite(G,B).then((z)=>[z,null]).catch((z)=>[null,z]),W){if(E.length>0)W.mongoose=W.mongoose||{},W.mongoose.validationErrors=E;await new Promise((z,C)=>{let U={error:W};this.hooks.execPost("bulkWrite",this,[null],U,(Q)=>{if(Q!=null)return C(Q);z()})})}for(let z=0;z<q.length;++z)H[q[z]]=null;if(E.length>0)if(B.throwOnValidationError)throw new qX(E,H,Y,"bulkWrite");else Y.mongoose=Y.mongoose||{},Y.mongoose.validationErrors=E,Y.mongoose.results=H}return await new Promise(($,G)=>{this.hooks.execPost("bulkWrite",this,[Y],(E)=>{if(E!=null)return G(E);$()})}),Y};d.bulkSave=async function F(A,B){if(B=B||{},B.timestamps!=null)for(let G of A)G.$__.saveOptions=G.$__.saveOptions||{},G.$__.saveOptions.timestamps=B.timestamps;else for(let G of A)if(G.$__.timestamps!=null)G.$__.saveOptions=G.$__.saveOptions||{},G.$__.saveOptions.timestamps=G.$__.timestamps;await Promise.all(A.map(sC1));let D=this.buildBulkWriteOperations(A,{skipValidation:!0,timestamps:B.timestamps}),{bulkWriteResult:J,bulkWriteError:X}=await this.bulkWrite(D,B).then((G)=>({bulkWriteResult:G,bulkWriteError:null}),(G)=>({bulkWriteResult:null,bulkWriteError:G}));if(X!=null&&!(X instanceof qC1))throw X;let Z=J?.matchedCount??0,Y=J?.insertedCount??0;if(D.length>0&&Z+Y<D.length&&!X)throw new mC1(this.modelName,A,J);let $=[];for(let G=0;G<A.length;G++){let E=A[G];if((X&&X.writeErrors.find((q)=>{return(q.err.op._id||q.err.op.q._id).toString()===E._doc._id.toString()}))==null)$.push(E)}if(await Promise.all($.map((G)=>aC1(G))),X&&X.writeErrors&&X.writeErrors.length)throw X;return J};function sC1(F){return new Promise((A,B)=>{F.schema.s.hooks.execPre("save",F,(D)=>{if(D){B(D);return}A()})})}function aC1(F){return new Promise((A,B)=>{if(F.$isNew)j8(F,!1);F.$__reset(),F.schema.s.hooks.execPost("save",F,[F],{},(D)=>{if(D){B(D);return}A()})})}d.applyDefaults=function F(A){if(A==null)return A;if(A.$__!=null){KC1(A,A.$__.fields,A.$__.exclude);for(let B of A.$getAllSubdocs())F(B,B.$__.fields,B.$__.exclude);return A}return UC1(A,this.schema),A};d.applyVirtuals=function F(A,B){if(A==null)return A;if(A.$__!=null)return A;return NC1(this.schema,A,B),A};d.applyTimestamps=function F(A,B){if(A==null)return A;if(A.$__!=null)return A;return IC1(this.schema,A,B),A};d.castObject=function F(A,B){B=B||{};let D={},J=this.schema,X=J.options.discriminatorKey;if(J.discriminators!=null&&A!=null&&A[X]!=null)J=Cd(J,A[X])||J;let Z=Object.keys(J.paths);for(let $ of Z){let G=J.path($);if(!G||!G.$isMongooseArray)continue;let E=aF(A,$);Ud(Z,E,$)}let Y=null;for(let $ of Z){let G=J.path($);if(G==null)continue;let E=aF(A,$,void 0);if(E==null)continue;let H=$.indexOf(".")===-1?[$]:$.split("."),q=D;for(let W=0;W<H.length-1;++W){if(q[H[W]]==null)q[H[W]]=isNaN(H[W+1])?{}:[];q=q[H[W]]}if(G.$isMongooseDocumentArray)continue;if(G.$isSingleNested||G.$isMongooseDocumentArrayElement){try{E=d.castObject.call(G.caster,E)}catch(W){if(!B.ignoreCastErrors)Y=Y||new uz,Y.addError($,W);continue}q[H[H.length-1]]=E;continue}try{E=G.cast(E),q[H[H.length-1]]=E}catch(W){if(!B.ignoreCastErrors)Y=Y||new uz,Y.addError($,W);continue}}if(Y!=null)throw Y;return D};d.buildBulkWriteOperations=function F(A,B){if(!Array.isArray(A))throw new Error(`bulkSave expects an array of documents to be passed, received \`${A}\` instead`);X();let D=this.schema.options.discriminatorKey;return A.reduce((Z,Y,$)=>{if(!B.skipValidation){if(!(Y instanceof C3))throw new Error(`documents.${$} was not a mongoose document, documents must be an array of mongoose documents (instanceof mongoose.Document).`);let q=Y.validateSync();if(q)throw q}if(Y.isNew){let q={insertOne:{document:Y}};return t1.injectTimestampsOption(q.insertOne,B.timestamps),Z.push(q),Z}let E=Y.$__delta();if(E!=null&&!t1.isEmptyObject(E[0])){let q=Y.$__where(E[0]),W=E[1];Ld(Y,q);let z=this.schema.options.shardKey;if(z){let U=Object.keys(z),Q=U.length;for(let L=0;L<Q;++L)q[U[L]]=Y[U[L]]}if(Y[D]!=null&&!(D in q))q[D]=Y[D];Y.$__version(q,E);let C={updateOne:{filter:q,update:W}};return t1.injectTimestampsOption(C.updateOne,B.timestamps),Z.push(C),Z}return Z},[]);function X(){if(B=B||{},B.skipValidation==null)B.skipValidation=!1}};d.hydrate=function(F,A,B){if(W1(this,"hydrate"),A!=null){if(F!=null&&F.$__!=null)F=F.toObject(_z);F=VC1(F,A)}let D=YF().createModel(this,F,A);return D.$init(F,B),D};d.updateMany=function F(A,B,D){return W1(this,"updateMany"),yz(this,"updateMany",A,B,D)};d.updateOne=function F(A,B,D){return W1(this,"updateOne"),yz(this,"updateOne",A,B,D)};d.replaceOne=function F(A,B,D){W1(this,"replaceOne");let J=this&&this.schema&&this.schema.options&&this.schema.options.versionKey||null;if(J&&!B[J])B[J]=0;return yz(this,"replaceOne",A,B,D)};function yz(F,A,B,D,J){let X=new F.Query({},{},F,F.collection);if(B instanceof C3)B=B.toObject();else B=o3(B);J=typeof J==="function"?J:o3(J);let Z=F&&F.schema&&F.schema.options&&F.schema.options.versionKey||null;return zd(D,J,Z),X[A](B,D,J)}d.aggregate=function F(A,B){if(W1(this,"aggregate"),typeof B==="function"||typeof arguments[2]==="function")throw new E1("Model.aggregate() no longer accepts a callback");let D=new GC1(A||[]);if(D.model(this),B!=null)D.option(B);return D};d.validate=async function F(A,B,D){if(arguments.length<3||arguments.length===3&&typeof arguments[2]==="function")D=A;if(typeof D==="function"||typeof arguments[3]==="function")throw new E1("Model.validate() no longer accepts a callback");let J=this.schema,X=J.options.discriminatorKey;if(J.discriminators!=null&&A!=null&&A[X]!=null)J=Cd(J,A[X])||J;let Z=Object.keys(J.paths);if(B!=null){let G=typeof B==="string"?new Set(B.split(" ")):Array.isArray(B)?new Set(B):new Set(Z);Z=Z.filter((E)=>{if(B.pathsToSkip){if(Array.isArray(B.pathsToSkip)){if(B.pathsToSkip.find((W)=>W==E))return!1}else if(typeof B.pathsToSkip=="string"){if(B.pathsToSkip.includes(E))return!1}}let H=E.split("."),q=H[0];for(let W of H){if(G.has(q))return!0;q+="."+W}return G.has(E)})}for(let G of Z){let E=J.path(G);if(!E||!E.$isMongooseArray||E.$isMongooseDocumentArray)continue;let H=aF(A,G);Ud(Z,H,G)}let Y=null;Z=new Set(Z);try{A=this.castObject(A)}catch(G){Y=G;for(let E of Object.keys(Y.errors||{}))Z.delete(E)}let $=Z.size;return new Promise((G,E)=>{for(let q of Z){let W=J.path(q);if(W==null){H();continue}let z=q.indexOf(".")===-1?[q]:q.split("."),C=A;for(let Q=0;Q<z.length-1;++Q)C=C[z[Q]];let U=aF(A,q,void 0);W.doValidate(U,(Q)=>{if(Q)Y=Y||new uz,Y.addError(q,Q);H()},D,{path:q})}function H(){if(--$<=0)if(Y)E(Y);else G(A)}})};d.populate=async function F(A,B){if(W1(this,"populate"),typeof B==="function"||typeof arguments[2]==="function")throw new E1("Model.populate() no longer accepts a callback");if(B=t1.populate(B),B.length===0)return A;let D=[];for(let J of B)D.push(oC1(this,A,J));return await Promise.all(D),A};/*!
883
+ * Populates `docs` for a single `populateOptions` instance.
884
+ */var rC1=/\s?-_id\s?/,tC1=/\s?-_id\s?/g;async function oC1(F,A,B){if(B.strictPopulate==null){if(B._localModel!=null&&B._localModel.schema._userProvidedOptions.strictPopulate!=null)B.strictPopulate=B._localModel.schema._userProvidedOptions.strictPopulate;else if(B._localModel!=null&&F.base.options.strictPopulate!=null)B.strictPopulate=F.base.options.strictPopulate;else if(F.base.options.strictPopulate!=null)B.strictPopulate=F.base.options.strictPopulate}if(!Array.isArray(A))A=[A];if(A.length===0||A.every(t1.isNullOrUndefined))return;let D=OC1(F,A,B);if(D instanceof E1)throw D;let J=D.length,X=[];function Z(E){return E!==void 0}let Y=!1,$=[];for(let E=0;E<J;++E){let H=D[E],q=H.options.select,W=t1.array.flatten(H.ids,Z);W=t1.array.unique(W);let z={};if(z.sort=H&&H.options&&H.options.options&&H.options.options.sort||void 0,z.excludeId=rC1.test(q)||q&&q._id===0,H.options&&H.options.options&&H.options.options.lean&&H.options.options.lean.transform)H.options.options._leanTransform=H.options.options.lean.transform,H.options.options.lean=!0;if(W.length===0||W.every(t1.isNullOrUndefined)){$d(F,[],H,z);continue}if(Y=!0,typeof B.foreignField==="string")H.foreignField.clear(),H.foreignField.add(B.foreignField);let C=TC1(W,H.match,H.foreignField,H.model,H.options.skipInvalidIds);if(z.excludeId)if(typeof q==="string")q=q.replace(tC1," ");else if(Array.isArray(q))q=q.filter((U)=>U!=="-_id");else q={...q},delete q._id;if(H.options.options&&H.options.options.limit!=null)z.originalLimit=H.options.options.limit;else if(H.options.limit!=null)z.originalLimit=H.options.limit;$.push([H,C,q,z])}if(!Y){if(D.length!==0)return;if(B.populate!=null){let E=t1.populate(B.populate).map((H)=>Object.assign({},H,{path:B.path+"."+H.path}));return F.populate(A,E)}return}let G=[];for(let E of $)G.push(eC1.apply(null,E).then((H)=>{X=X.concat(H)}));await Promise.all(G);for(let E of $){let H=E[0],q=E[3];for(let W of X)H.options._childDocs.push(W);$d(F,X,H,q)}for(let E of $)yC1(E[0].foreignField,E[0].options,X);for(let E of $){let H=E[0];if(H.options&&H.options.options&&H.options.options._leanTransform)for(let q of X)H.options.options._leanTransform(q)}}/*!
885
+ * ignore
886
+ */function eC1(F,A,B){let D=o3(F.options.populate),J=Object.assign({skip:F.options.skip,limit:F.options.limit,perDocumentLimit:F.options.perDocumentLimit},F.options.options);if(F.count)delete J.skip;if(J.perDocumentLimit!=null)J.limit=J.perDocumentLimit,delete J.perDocumentLimit;else if(J.limit!=null)J.limit=J.limit*F.ids.length;let X=F.model.find(A,B,J);for(let Z of F.foreignField)if(Z!=="_id"&&X.selectedInclusively()&&!fC1(X._fields,Z))X.select(Z);if(F.count)for(let Z of F.foreignField)X.select(Z);if(D){if(F.model.baseModelName!=null)if(Array.isArray(D))D.forEach((Y)=>{Y.strictPopulate=!1});else if(typeof D==="string")D={path:D,strictPopulate:!1};else D.strictPopulate=!1;let Z=F.options._fullPath||F.options.path;if(Array.isArray(D))for(let Y of D)Y._fullPath=Z+"."+Y.path;else if(typeof D==="object")D._fullPath=Z+"."+D.path;X.populate(D)}return X.exec().then((Z)=>{for(let Y of Z)_C1.set(Y,F.model);return Z})}/*!
887
+ * ignore
888
+ */function $d(F,A,B,D){let{options:J,isVirtual:X,justOne:Z}=B,Y,$=J&&J.options&&J.options.lean||!1,G=A.length,E={},H={},q,W,z=o3(B.allIds);for(let C=0;C<G;C++){if(W=A[C],W==null)continue;for(let U of B.foreignField){if(Y=t1.getValue(U,W),Array.isArray(Y)){Y=t1.array.unique(t1.array.flatten(Y));for(let Q of Y){if(Q instanceof C3)Q=Q._doc._id;if(q=String(Q),H[q])if(Array.isArray(H[q]))H[q].push(W),E[q].push(C);else H[q]=[H[q],W],E[q]=[E[q],C];else if(X&&!Z)H[q]=[W],E[q]=[C];else H[q]=W,E[q]=C}}else{if(Y instanceof C3)Y=Y._doc._id;if(q=String(Y),H[q]){if(Array.isArray(H[q]))H[q].push(W),E[q].push(C);else if(X||H[q].constructor!==W.constructor||(H[q]instanceof C3?String(H[q]._doc._id):String(H[q]._id))!==(W instanceof C3?String(W._doc._id):String(W._id)))H[q]=[H[q],W],E[q]=[E[q],C]}else H[q]=W,E[q]=C}if(!$)W.$__.wasPopulated=W.$__.wasPopulated||{value:Y}}}PC1({originalModel:F,rawIds:B.isVirtual?z:B.allIds,allIds:z,unpopulatedValues:B.unpopulatedValues,foreignField:B.foreignField,rawDocs:H,rawOrder:E,docs:B.docs,path:J.path,options:D,justOne:B.justOne,isVirtual:B.isVirtual,allOptions:B,populatedModel:B.model,lean:$,virtual:B.virtual,count:B.count,match:B.match})}d.compile=function F(A,B,D,J,X){if(B.options.versionKey!==!1&&!B.paths[B.options.versionKey]){let H={};H[B.options.versionKey]=Number,B.add(H)}let Y;if(typeof A==="function"&&A.prototype instanceof d)Y=A,A=Y.name,B.loadClass(Y,!1),Y.prototype.$isMongooseModelPrototype=!0;else Y=function H(q,W,z){if(H.hooks.execPreSync("createModel",q),!(this instanceof H))return new H(q,W,z);let C=H.schema.options.discriminatorKey;if(H.discriminators==null||q==null||q[C]==null){d.call(this,q,W,z);return}let U=H.discriminators[q[C]]||HX(H.discriminators,q[C]);if(U!=null)return new U(q,W,z);d.call(this,q,W,z)};if(Y.hooks=B.s.hooks.clone(),Y.base=X,Y.modelName=A,!(Y.prototype instanceof d))Object.setPrototypeOf(Y,d),Object.setPrototypeOf(Y.prototype,d.prototype);Y.model=function H(q){return this.db.model(q)},Y.db=J,Y.prototype.db=J,Y.prototype[oF]=J,Y.discriminators=Y.prototype.discriminators=void 0,Y[Qd]=!0,Y.events=new Oz,B._preCompile();let G={schemaUserProvidedOptions:B._userProvidedOptions||{},capped:B.options.capped,Promise:Y.base.Promise,modelName:A};if(B.options.autoCreate!==void 0)G.autoCreate=B.options.autoCreate;let E=J.collection(D,G);return Y.prototype.collection=E,Y.prototype.$collection=E,Y.prototype[tF]=E,Y.prototype.$__setSchema(B),Ed(Y,B),qd(Y,B),LC1(Y,B),wC1(Y,B.s.hooks,B.statics),Y.schema=Y.prototype.$__schema,Y.collection=E,Y.$__collection=E,Y.Query=function(){EX.apply(this,arguments)},Object.setPrototypeOf(Y.Query.prototype,EX.prototype),Y.Query.base=EX.base,Y.Query.prototype.constructor=EX,Y._applyQueryMiddleware(),FK1(Y,B.query),Y};d.$__updateConnection=function F(A){this.db=A,this.prototype.db=A,this.prototype[oF]=A;let B=A.collection(this.collection.collectionName,this.collection.opts);this.prototype.collection=B,this.prototype.$collection=B,this.prototype[tF]=B,this.collection=B,this.$__collection=B};function FK1(F,A){for(let B in A)F.Query.prototype[B]=A[B]}d.__subclass=function F(A,B,D){let J=this,X=function E(H,q,W){if(!(this instanceof E))return new E(H,q,W);J.call(this,H,q,W)};if(Object.setPrototypeOf(X,J),Object.setPrototypeOf(X.prototype,J.prototype),X.db=A,X.prototype.db=A,X.prototype[oF]=A,J[sF]=J[sF]||[],J[sF].push(X),J.discriminators!=null){X.discriminators={};for(let E of Object.keys(J.discriminators))X.discriminators[E]=J.discriminators[E].__subclass(J.db,J.discriminators[E].schema,D)}let Z=B&&typeof B!=="string"?B:J.prototype.$__schema,Y=Z.options||{},$=Z._userProvidedOptions||{};if(!D)D=J.prototype.$__schema.get("collection")||t1.toCollectionName(J.modelName,this.base.pluralize());let G={schemaUserProvidedOptions:$,capped:Z&&Y.capped};return X.prototype.collection=A.collection(D,G),X.prototype.$collection=X.prototype.collection,X.prototype[tF]=X.prototype.collection,X.collection=X.prototype.collection,X.$__collection=X.collection,X.init().catch(()=>{}),X};d.recompileSchema=function F(){if(this.prototype.$__setSchema(this.schema),this.schema._applyDiscriminators!=null)for(let A of this.schema._applyDiscriminators.keys())this.discriminator(A,this.schema._applyDiscriminators.get(A));delete this.schema._defaultToObjectOptionsMap,QC1(this.schema,new WeakSet,!0)};d.inspect=function(){return`Model { ${this.modelName} }`};d.namespace=function F(){return this.db.name+"."+this.collection.collectionName};if(Xd.inspect.custom)d[Xd.inspect.custom]=d.inspect;/*!
889
+ * Applies query middleware from this model's schema to this model's
890
+ * Query constructor.
891
+ */d._applyQueryMiddleware=function F(){let A=this.Query,B=this.schema.s.hooks.filter((D)=>{let J=AK1(D);if(D.name==="validate")return!!J.query;if(D.name==="deleteOne"||D.name==="updateOne")return!!J.query||Object.keys(J).length===0;if(D.query!=null||D.document!=null)return!!D.query;return!0});A.prototype._queryMiddleware=B};function AK1(F){let A={};if(F.hasOwnProperty("query"))A.query=F.query;if(F.hasOwnProperty("document"))A.document=F.document;return A}/*!
892
+ * Module exports.
893
+ */Rd.exports=Vd=d});var Id=K((eF,wd)=>{wd.exports=JK1;eF.pluralization=[[/human$/gi,"humans"],[/(m)an$/gi,"$1en"],[/(pe)rson$/gi,"$1ople"],[/(child)$/gi,"$1ren"],[/^(ox)$/gi,"$1en"],[/(ax|test)is$/gi,"$1es"],[/(octop|vir)us$/gi,"$1i"],[/(alias|status)$/gi,"$1es"],[/(bu)s$/gi,"$1ses"],[/(buffal|tomat|potat)o$/gi,"$1oes"],[/([ti])um$/gi,"$1a"],[/sis$/gi,"ses"],[/(?:([^f])fe|([lr])f)$/gi,"$1$2ves"],[/(hive)$/gi,"$1s"],[/([^aeiouy]|qu)y$/gi,"$1ies"],[/(x|ch|ss|sh)$/gi,"$1es"],[/(matr|vert|ind)ix|ex$/gi,"$1ices"],[/([m|l])ouse$/gi,"$1ice"],[/(kn|w|l)ife$/gi,"$1ives"],[/(quiz)$/gi,"$1zes"],[/^goose$/i,"geese"],[/s$/gi,"s"],[/([^a-z])$/,"$1"],[/$/gi,"s"]];var BK1=eF.pluralization;eF.uncountables=["advice","energy","excretion","digestion","cooperation","health","justice","labour","machinery","equipment","information","pollution","sewage","paper","money","species","series","rain","rice","fish","sheep","moose","deer","news","expertise","status","media"];var DK1=eF.uncountables;function JK1(F){let A;if(F=F.toLowerCase(),!~DK1.indexOf(F)){if(A=BK1.filter(function(B){return F.match(B[0])}),A[0])return F.replace(A[0][0],A[0][1])}return F}});var kd=K((GT1,jd)=>{/*!
894
+ * Module requirements
895
+ */var Md=z1(),Nd=import.meta.require("util"),Pd=cE();class x4 extends Md{constructor(){super("");this.errors={}}toString(){return Pd(this)}inspect(){return Object.assign(new Error(this.message),this)}addError(F,A){if(A instanceof x4){let{errors:B}=A;for(let D of Object.keys(B))this.addError(D,B[D]);return}this.errors[F]=A,this.message=Pd(this)}}if(Nd.inspect.custom)x4.prototype[Nd.inspect.custom]=x4.prototype.inspect;Object.defineProperty(x4.prototype,"toJSON",{enumerable:!1,writable:!1,configurable:!0,value:function(){return Object.assign({},this,{name:this.name,message:this.message})}});Object.defineProperty(x4.prototype,"name",{value:"SetOptionError"});class Td extends Md{constructor(F){super(`"${F}" is not a valid option to set`)}}x4.SetOptionInnerError=Td;/*!
896
+ * Module exports
897
+ */jd.exports=x4});var Sd=K(()=>{var Od=X1();if(typeof jest!=="undefined"&&!process.env.SUPPRESS_JEST_WARNINGS){if(typeof window!=="undefined")Od.warn("Mongoose: looks like you're trying to test a Mongoose app with Jest's default jsdom test environment. Please make sure you read Mongoose's docs on configuring Jest to test Node.js apps: https://mongoosejs.com/docs/jest.html. Set the SUPPRESS_JEST_WARNINGS to true to hide this warning.");if(setTimeout.clock!=null&&typeof setTimeout.clock.Date==="function")Od.warn("Mongoose: looks like you're trying to test a Mongoose app with Jest's mock timers enabled. Please make sure you read Mongoose's docs on configuring Jest to test Node.js apps: https://mongoosejs.com/docs/jest.html. Set the SUPPRESS_JEST_WARNINGS to true to hide this warning.")}});var bd=K((_d,gd)=>{/*!
898
+ * Module dependencies.
899
+ */var ud=y2(),xd=import.meta.require("events").EventEmitter,fd=_2(),XK1=J8(),ZK1=b3(),YK1=fd.ValidationError,$K1=rD(),GK1=I4();function S6(F,A,B,D,J){if(!(this instanceof S6))return new S6(F,A,B,D,J);if(GK1(A)&&!A.instanceOfSchema)A=new XK1(A);if(A=this.schema||A,!this.schema&&A.options._id){if(F=F||{},F._id===void 0)F._id=new ZK1}if(!A)throw new fd.MissingSchemaError;this.$__setSchema(A),ud.call(this,F,B,D,J),$K1(this,A,{decorateDoc:!0});for(let X in A.methods)this[X]=A.methods[X];for(let X in A.statics)this[X]=A.statics[X]}/*!
900
+ * Inherit from the NodeJS document
901
+ */S6.prototype=Object.create(ud.prototype);S6.prototype.constructor=S6;/*!
902
+ * ignore
903
+ */S6.events=new xd;/*!
904
+ * Browser doc exposes the event emitter API
905
+ */S6.$emitter=new xd;["on","once","emit","listeners","removeListener","setMaxListeners","removeAllListeners","addListener"].forEach(function(F){S6[F]=function(){return S6.$emitter[F].apply(S6.$emitter,arguments)}});/*!
906
+ * Module exports.
907
+ */S6.ValidationError=YK1;gd.exports=_d=S6});var vd=K((qT1,vz)=>{/*!
908
+ * Module dependencies.
909
+ */var EK1=y2(),HK1=bd(),yd=!1;vz.exports=function F(){if(yd)return HK1;return EK1};/*!
910
+ * ignore
911
+ */vz.exports.setBrowser=function(F){yd=F}});var ad=K((nd,sd)=>{/*!
912
+ * Module dependencies.
913
+ */var qK1=y2(),WK1=import.meta.require("events").EventEmitter,md=n7(),e3=J8(),zK1=P0(),FA=VF(),CK1=nD(),CX=u9(),hd=by(),KK1=Y8(),UK1=rJ(),dd=Kz(),QK1=CW(),LK1=yq(),cd=uJ(),VK1=Id(),hz=X1(),RK1=xW(),wK1=I9(),IK1=qz(),NK1=p7().trusted,PK1=Bz(),MK1=l0(),k8=z1(),zX=kd(),TK1=Cz(),ld=Symbol.for("mongoose:default"),pd=Symbol("mongoose:defaultConnection");Sd();var jK1=/^[0-9A-Fa-f]{24}$/,{AsyncLocalStorage:id}=import.meta.require("async_hooks");function n(F){if(this.connections=[],this.nextConnectionId=0,this.models={},this.events=new WK1,this.__driver=cd.get(),this.options=Object.assign({pluralization:!0,autoIndex:!0,autoCreate:!0,autoSearchIndex:!1},F),(hz.getOption("createInitialConnection",this.options)??!0)&&this.__driver!=null)mz(this);if(this.options.pluralization)this._pluralize=VK1;if(!F||!F[ld]){let B=this;this.Schema=function(){return this.base=B,e3.apply(this,arguments)},this.Schema.prototype=Object.create(e3.prototype),Object.assign(this.Schema,e3),this.Schema.base=this,this.Schema.Types=Object.assign({},e3.Types)}else for(let B of["Schema","model"])this[B]=n.prototype[B];if(this.Schema.prototype.base=this,F?.transactionAsyncLocalStorage)this.transactionAsyncLocalStorage=new id;Object.defineProperty(this,"plugins",{configurable:!1,enumerable:!0,writable:!1,value:Object.values(LK1).map((B)=>[B,{deduplicate:!0}])})}n.prototype.cast=wK1;n.prototype.STATES=CX;n.prototype.ConnectionStates=CX;n.prototype.driver=cd;n.prototype.setDriver=function F(A){let B=this instanceof n?this:T2;if(B.__driver===A)return B;if(B.connections&&B.connections.find((Z)=>Z.readyState!==CX.disconnected))throw new k8("Cannot modify Mongoose driver if a connection is already open. Call `mongoose.disconnect()` before modifying the driver");if(B.__driver=A,Array.isArray(A.plugins)){for(let Z of A.plugins)if(typeof Z==="function")B.plugin(Z)}let J=A.Connection,X=B.connections[0];if(B.connections=[new J(B)],B.connections[0].models=B.models,X==null)return B;for(let Z of Object.values(B.models)){if(Z.db!==X)continue;Z.$__updateConnection(B.connections[0])}return B};n.prototype.set=function F(A,B){let D=this instanceof n?this:T2;if(arguments.length===1&&typeof A!=="object"){if(hd.indexOf(A)===-1){let Z=new zX;throw Z.addError(A,new zX.SetOptionInnerError(A)),Z}return D.options[A]}let J={};if(arguments.length===2)J={[A]:B};if(arguments.length===1&&typeof A==="object")J=A;let X=void 0;for(let[Z,Y]of Object.entries(J)){if(hd.indexOf(Z)===-1){if(!X)X=new zX;X.addError(Z,new zX.SetOptionInnerError(Z));continue}if(D.options[Z]=Y,Z==="objectIdGetter")if(Y)Object.defineProperty(D.Types.ObjectId.prototype,"_id",{enumerable:!1,configurable:!0,get:function(){return this}});else delete D.Types.ObjectId.prototype._id;else if(Z==="transactionAsyncLocalStorage"){if(Y&&!D.transactionAsyncLocalStorage)D.transactionAsyncLocalStorage=new id;else if(!Y&&D.transactionAsyncLocalStorage)delete D.transactionAsyncLocalStorage}else if(Z==="createInitialConnection"){if(Y&&!D.connection)mz(D);else if(Y===!1&&D.connection&&D.connection[pd]){if(D.connection.readyState===CX.disconnected&&Object.keys(D.connection.models).length===0)D.connections.shift()}}}if(X)throw X;return D};n.prototype.get=n.prototype.set;n.prototype.createConnection=function F(A,B){let D=this instanceof n?this:T2,X=new D.__driver.Connection(D);if(D.connections.push(X),D.nextConnectionId++,D.events.emit("createConnection",X),arguments.length>0)X.openUri(A,{...B,_fireAndForget:!0});return X};n.prototype.connect=async function F(A,B){if(typeof B==="function"||arguments.length>=3&&typeof arguments[2]==="function")throw new k8("Mongoose.prototype.connect() no longer accepts a callback");let D=this instanceof n?this:T2;if(D.connection==null)mz(D);return D.connection.openUri(A,B).then(()=>D)};n.prototype.disconnect=async function F(){if(arguments.length>=1&&typeof arguments[0]==="function")throw new k8("Mongoose.prototype.disconnect() no longer accepts a callback");let A=this instanceof n?this:T2;if(A.connections.length<=0)return;await Promise.all(A.connections.map((D)=>D.close()))};n.prototype.startSession=function F(){let A=this instanceof n?this:T2;return A.connection.startSession.apply(A.connection,arguments)};n.prototype.pluralize=function F(A){let B=this instanceof n?this:T2;if(arguments.length>0)B._pluralize=A;return B._pluralize};n.prototype.model=function F(A,B,D,J){let X=this instanceof n?this:T2;if(typeof B==="string")D=B,B=!1;if(arguments.length===1){let G=X.models[A];if(!G)throw new X.Error.MissingSchemaError(A);return G}if(hz.isObject(B)&&!(B instanceof e3))B=new e3(B);if(B&&!(B instanceof e3))throw new X.Error("The 2nd parameter to `mongoose.model()` should be a schema or a POJO");J=J||{};let Z=B;if(B){if(X.get("cloneSchemas"))B=B.clone();X._applyPlugins(B)}let Y=X.options.hasOwnProperty("overwriteModels")?X.options.overwriteModels:J.overwriteModels;if(X.models.hasOwnProperty(A)&&J.cache!==!1&&Y!==!0){if(Z&&Z.instanceOfSchema&&Z!==X.models[A].schema)throw new X.Error.OverwriteModelError(A);if(D&&D!==X.models[A].collection.name){let G=X.models[A];return B=G.prototype.schema,G.__subclass(X.connection,B,D)}return X.models[A]}if(B==null)throw new X.Error.MissingSchemaError(A);let $=X._model(A,B,D,J);return X.connection.models[A]=$,X.models[A]=$,$};/*!
914
+ * ignore
915
+ */n.prototype._model=function F(A,B,D,J){let X=this instanceof n?this:T2,Z;if(typeof A==="function"){if(Z=A,A=Z.name,!(Z.prototype instanceof dd))throw new X.Error("The provided class "+A+" must extend Model")}if(B){if(X.get("cloneSchemas"))B=B.clone();X._applyPlugins(B)}if(B==null||!("pluralization"in B.options))B.options.pluralization=X.options.pluralization;if(!D)D=B.get("collection")||hz.toCollectionName(A,X.pluralize());TK1(B);let Y=J.connection||X.connection;if(Z=X.Model.compile(Z||A,B,D,Y,X),Z.init().catch(function $(){}),Y.emit("model",Z),B._applyDiscriminators!=null)for(let $ of B._applyDiscriminators.keys()){let{schema:G,options:E}=B._applyDiscriminators.get($);Z.discriminator($,G,E)}return Z};n.prototype.deleteModel=function F(A){let B=this instanceof n?this:T2;return B.connection.deleteModel(A),delete B.models[A],B};n.prototype.modelNames=function F(){let A=this instanceof n?this:T2;return Object.keys(A.models)};n.prototype._applyPlugins=function F(A,B){let D=this instanceof n?this:T2;B=B||{},B.applyPluginsToDiscriminators=D.options&&D.options.applyPluginsToDiscriminators||!1,B.applyPluginsToChildSchemas=typeof(D.options&&D.options.applyPluginsToChildSchemas)==="boolean"?D.options.applyPluginsToChildSchemas:!0,QK1(A,D.plugins,B,"$globalPluginsApplied")};n.prototype.plugin=function F(A,B){let D=this instanceof n?this:T2;return D.plugins.push([A,B]),D};n.prototype.__defineGetter__("connection",function(){return this.connections[0]});n.prototype.__defineSetter__("connection",function(F){if(F instanceof this.__driver.Connection)this.connections[0]=F,this.models=F.models});n.prototype.connections;n.prototype.nextConnectionId;n.prototype.Aggregate=IK1;Object.defineProperty(n.prototype,"Collection",{get:function(){return this.__driver.Collection},set:function(F){this.__driver.Collection=F}});Object.defineProperty(n.prototype,"Connection",{get:function(){return this.__driver.Connection},set:function(F){if(F===this.__driver.Connection)return;this.__driver.Connection=F}});n.prototype.version=RK1.version;n.prototype.Mongoose=n;n.prototype.Schema=e3;n.prototype.SchemaType=zK1;n.prototype.SchemaTypes=e3.Types;n.prototype.VirtualType=CK1;n.prototype.Types=KK1;n.prototype.Query=UK1;n.prototype.Model=dd;n.prototype.Document=qK1;n.prototype.DocumentProvider=vd();n.prototype.ObjectId=FA.ObjectId;n.prototype.isValidObjectId=function F(A){return(this instanceof n?this:T2).Types.ObjectId.isValid(A)};n.prototype.isObjectIdOrHexString=function F(A){return MK1(A,"ObjectId")||typeof A==="string"&&jK1.test(A)};n.prototype.syncIndexes=function F(A){return(this instanceof n?this:T2).connection.syncIndexes(A)};n.prototype.Decimal128=FA.Decimal128;n.prototype.Mixed=FA.Mixed;n.prototype.Date=FA.Date;n.prototype.Number=FA.Number;n.prototype.Error=k8;n.prototype.MongooseError=k8;n.prototype.now=function F(){return new Date};n.prototype.CastError=k8.CastError;n.prototype.SchemaTypeOptions=B6();n.prototype.mquery=Fz();n.prototype.sanitizeFilter=PK1;n.prototype.trusted=NK1;n.prototype.skipMiddlewareFunction=md.skipWrappedFunction;n.prototype.overwriteMiddlewareResult=md.overwriteResult;n.prototype.omitUndefined=Wq();/*!
916
+ * Create a new default connection (`mongoose.connection`) for a Mongoose instance.
917
+ * No-op if there is already a default connection.
918
+ */function mz(F){if(F.connection)return;let A=F.createConnection();A[pd]=!0,A.models=F.models}var T2=sd.exports=nd=new n({[ld]:!0})});var od=K((WT1,td)=>{/*!
919
+ * Module dependencies.
920
+ */var rd=_y();uJ().set(rd);var dz=ad();dz.setDriver(rd);dz.Mongoose.prototype.mongo=G9();td.exports=dz});var AA=K((zT1,B1)=>{var D1=od();B1.exports=D1;B1.exports.default=D1;B1.exports.mongoose=D1;B1.exports.cast=D1.cast;B1.exports.STATES=D1.STATES;B1.exports.setDriver=D1.setDriver;B1.exports.set=D1.set;B1.exports.get=D1.get;B1.exports.createConnection=D1.createConnection;B1.exports.connect=D1.connect;B1.exports.disconnect=D1.disconnect;B1.exports.startSession=D1.startSession;B1.exports.pluralize=D1.pluralize;B1.exports.model=D1.model;B1.exports.deleteModel=D1.deleteModel;B1.exports.modelNames=D1.modelNames;B1.exports.plugin=D1.plugin;B1.exports.connections=D1.connections;B1.exports.version=D1.version;B1.exports.Aggregate=D1.Aggregate;B1.exports.Mongoose=D1.Mongoose;B1.exports.Schema=D1.Schema;B1.exports.SchemaType=D1.SchemaType;B1.exports.SchemaTypes=D1.SchemaTypes;B1.exports.VirtualType=D1.VirtualType;B1.exports.Types=D1.Types;B1.exports.Query=D1.Query;B1.exports.Model=D1.Model;B1.exports.Document=D1.Document;B1.exports.ObjectId=D1.ObjectId;B1.exports.isValidObjectId=D1.isValidObjectId;B1.exports.isObjectIdOrHexString=D1.isObjectIdOrHexString;B1.exports.syncIndexes=D1.syncIndexes;B1.exports.Decimal128=D1.Decimal128;B1.exports.Mixed=D1.Mixed;B1.exports.Date=D1.Date;B1.exports.Number=D1.Number;B1.exports.Error=D1.Error;B1.exports.MongooseError=D1.MongooseError;B1.exports.now=D1.now;B1.exports.CastError=D1.CastError;B1.exports.SchemaTypeOptions=D1.SchemaTypeOptions;B1.exports.mongo=D1.mongo;B1.exports.mquery=D1.mquery;B1.exports.sanitizeFilter=D1.sanitizeFilter;B1.exports.trusted=D1.trusted;B1.exports.skipMiddlewareFunction=D1.skipMiddlewareFunction;B1.exports.overwriteMiddlewareResult=D1.overwriteMiddlewareResult});var KX=JA(AA(),1);class ed{async connect(F){if(!F)throw new Error("DB URI is not valid.");console.log("Connecting to database..."),await KX.default.connect(F).catch((A)=>console.error("Unable to connect to the database:",A)),KX.default.connection.on("open",()=>{console.log("Database connection is ready.")}),KX.default.connection.on("error",(A)=>{console.error("Database connection error:",A)})}}var O8=JA(AA(),1);class S9{static transformSchemaToJSON(F,A){A.id=A._id,delete A._id,delete A.__v}}var Fc=new O8.Schema({owner:{type:O8.Schema.Types.ObjectId,ref:"user",required:!0,index:!0},parent:{type:O8.Schema.Types.ObjectId,ref:"category",required:!1,index:!0,sparse:!0},nickname:{type:String,required:!0,trim:!0},type:{type:Number,required:!0,index:!0},email:{type:String,lowercase:!0,required:!1,trim:!0},disabled:{type:Boolean,required:!1},deviceAuth:{required:!0,type:{accountId:{type:String,required:!0,unique:!0,lowercase:!0,trim:!0},deviceId:{type:String,required:!0,lowercase:!0,trim:!0},secret:{type:String,required:!0,trim:!0}}}});Fc.set("toJSON",{transform:S9.transformSchemaToJSON});var kK1=O8.model("bot",Fc);var OK1;((F)=>{F[F.Public=0]="Public",F[F.Private=1]="Private"})(OK1||={});var SK1;((F)=>{F[F.Offline=0]="Offline",F[F.Booting=1]="Booting",F[F.Available=2]="Available",F[F.Busy=3]="Busy",F[F.Disconnected=4]="Disconnected"})(SK1||={});var uK1;((F)=>{F[F.Neutral=0]="Neutral",F[F.Success=1]="Success",F[F.Info=2]="Info",F[F.Warn=3]="Warn",F[F.Error=4]="Error"})(uK1||={});var cz;((F)=>{F.Win="WIN",F.Mac="MAC",F.Psn="PSN",F.Xbl="XBL",F.Swt="SWT",F.Ios="IOS",F.And="AND",F.Ps5="PS5",F.Xsx="XSX"})(cz||={});var lz;((F)=>{F[F.Public=0]="Public",F[F.Private=1]="Private"})(lz||={});var BA;((F)=>{F[F.Equals=0]="Equals",F[F.Includes=1]="Includes",F[F.StartsWith=2]="StartsWith",F[F.EndsWith=3]="EndsWith"})(BA||={});var f4;((F)=>{F[F.ChatBan=0]="ChatBan",F[F.Kick=1]="Kick",F[F.Block=2]="Block",F[F.RemoveFriend=3]="RemoveFriend",F[F.AddFriend=4]="AddFriend",F[F.Promote=5]="Promote",F[F.Copy=6]="Copy",F[F.Mimic=7]="Mimic",F[F.Hide=8]="Hide",F[F.Show=9]="Show",F[F.Blacklist=10]="Blacklist",F[F.Whitelist=11]="Whitelist"})(f4||={});var xK1;((F)=>{F[F.RequiredParam=0]="RequiredParam",F[F.OptionalParam=1]="OptionalParam",F[F.RequiredSelect=2]="RequiredSelect",F[F.OptionalSelect=3]="OptionalSelect",F[F.RequiredNumericParam=4]="RequiredNumericParam",F[F.OptionalNumericParam=5]="OptionalNumericParam"})(xK1||={});var Ac;((F)=>{F.GenericUnknown="net.fnlb.errors.generic.unknown",F.GenericInternalError="net.fnlb.errors.generic.internal_error",F.GenericValidationFailed="net.fnlb.errors.generic.validation_failed",F.GenericParseFailed="net.fnlb.errors.generic.parse_failed",F.GenericNotFound="net.fnlb.errors.generic.not_found",F.CommonInvalidRequest="net.fnlb.errors.common.invalid_request",F.CommonUnableToProcessRequest="net.fnlb.errors.common.unable_to_process_request",F.CommonInvalidFieldsLength="net.fnlb.errors.common.invalid_body_fields_length",F.CommonRateLimitExceeded="net.fnlb.errors.common.rate_limit_exceeded",F.CommonUnableToSaveToDatabase="net.fnlb.errors.common.unable_to_save_to_database",F.AuthInvalidToken="net.fnlb.errors.auth.invalid_token",F.AuthInvalidAPIToken="net.fnlb.errors.auth.invalid_api_token",F.AuthInvalidCaptchaToken="net.fnlb.errors.auth.invalid_captcha_token",F.AuthUnauthorized="net.fnlb.errors.auth.unauthorized",F.AuthForbidden="net.fnlb.errors.auth.forbidden",F.AuthUserBanned="net.fnlb.errors.auth.user_banned",F.Oauth2InvalidCode="net.fnlb.errors.oauth2.invalid_code",F.Oauth2InvalidScope="net.fnlb.errors.oauth2.invalid_scope",F.Oauth2TokenInvalid="net.fnlb.errors.oauth2.token_invalid",F.Oauth2UnableToFetchUser="net.fnlb.errors.oauth2.unable_to_fetch_user",F.Oauth2UnableToFetchConnections="net.fnlb.errors.oauth2.unable_to_fetch_connections",F.Oauth2UserWithoutConnection="net.fnlb.errors.oauth2.user_without_connection",F.Oauth2ConnectionNotVerified="net.fnlb.errors.oauth2.connection_not_verified",F.ReleaseNotFound="net.fnlb.errors.release.no_release_found",F.ReleaseVersionAlreadyExists="net.fnlb.errors.release.version_already_exists"})(Ac||={});var Bc;((F)=>{F.LoginInvalidCredentials="net.fnlb.errors.login.invalid_credentials",F.LoginInvalidEmail="net.fnlb.errors.login.invalid_email",F.LoginInvalidOrUsedEmail="net.fnlb.errors.login.invalid_or_used_email",F.AuthPasswordConfirmationInvalid="net.fnlb.errors.auth.invalid_password_confirmation"})(Bc||={});var LT1={...Ac,...Bc},fK1;((F)=>{F.Username="username",F.Email="email",F.Password="password",F.Shared="shared"})(fK1||={});var _K1;((F)=>{F.General="general",F.Input="input"})(_K1||={});var UX;((F)=>{F.Default="en",F.De="de",F.Es="es",F.Fr="fr",F.It="it",F.Pl="pl",F.Pt="pt",F.Tr="tr"})(UX||={});var DA=JA(AA(),1);var Dc=new DA.Schema({owner:{type:DA.Schema.Types.ObjectId,ref:"user",required:!0,index:!0},name:{type:String,required:!0,trim:!0},disabled:{type:Boolean,required:!1},config:{replyLangs:{type:[String],enum:Object.values(UX)},searchLangs:{type:[String],enum:Object.values(UX)},platform:{type:[String],enum:Object.values(cz)},privacy:{type:String,enum:Object.values(lz)},prefixes:{type:[String]},extraOwners:{type:[String]},admins:{type:[String]},whitelistUsers:{type:[String]},blacklistUsers:{type:[String]},excludedAutoAddFriends:{type:[String]},otherBots:{type:[String]},statusText:{type:[String]},statusInterval:{type:[Number]},level:{type:[Number]},bpLevel:{type:[Number]},disableMatchmakingChecks:{type:[Boolean]},disableJoinMessages:{type:[Boolean]},inviteTimeout:{type:Number},maxBotsPerLobby:{type:Number},maxBotsPerLobbyWithOwner:{type:Number},maxBotsPerLobbyWithAdmin:{type:Number},maxBotsPerLobbyWithWhitelistUser:{type:Number},allowMatchmaking:{type:Boolean},acceptFriendRequests:{type:Boolean},sendFriendRequestOnJoinParty:{type:Boolean},sendFriendRequestOnMemberJoinParty:{type:Boolean},runCommandsWithoutPrefix:{type:Boolean},setCosmeticsWithoutCommands:{type:Boolean},usernameTriggers:{type:[{triggers:{type:[String]},detectionMethods:{type:[Number],enum:Object.values(BA)},actions:{type:[Number],enum:Object.values(f4)},messages:{type:[String]}}]},messageContentTriggers:{type:[{triggers:{type:[String]},detectionMethods:{type:[Number],enum:Object.values(BA)},actions:{type:[Number],enum:Object.values(f4)},messages:{type:[String]}}]},cosmeticTriggers:{type:[{triggers:{type:[String]},detectionMethods:{type:[Number],enum:Object.values(BA)},actions:{type:[Number],enum:Object.values(f4)},messages:{type:[String]}}]},addFriendTrigger:{type:[{actions:{type:[Number],enum:Object.values(f4)},messages:{type:[String]}}]},memberJoinTrigger:{type:[{actions:{type:[Number],enum:Object.values(f4)},messages:{type:[String]}}]},changeCosmeticTrigger:{type:[{actions:{type:[Number],enum:Object.values(f4)},messages:{type:[String]}}]},onlyOwnerCommands:{type:[String]},onlyAdminCommands:{type:[String]},onlyWhitelistUsersCommands:{type:[String]},onlyFriendsCommands:{type:[String]},onlyPartyMembersCommands:{type:[String]},onlyWhisperCommands:{type:[String]},startOutfit:{type:[String]},startOutfitVariants:{type:[[[Number]]]},startBackpack:{type:[String]},startBackpackVariants:{type:[[[Number]]]},startPickaxe:{type:[String]},startPickaxeVariants:{type:[[[Number]]]},startBanner:{type:[String]},joinOutfit:{type:[String]},joinOutfitVariants:{type:[[[Number]]]},joinBackpack:{type:[String]},joinBackpackVariants:{type:[[[Number]]]},joinPickaxe:{type:[String]},joinPickaxeVariants:{type:[[[Number]]]},joinEmote:{type:[String]},joinEmoji:{type:[String]},joinBanner:{type:[String]},memberJoinOutfit:{type:[String]},memberJoinOutfitVariants:{type:[[[Number]]]},memberJoinBackpack:{type:[String]},memberJoinBackpackVariants:{type:[[[Number]]]},memberJoinPickaxe:{type:[String]},memberJoinPickaxeVariants:{type:[[[Number]]]},memberJoinEmote:{type:[String]},memberJoinEmoji:{type:[String]},memberJoinBanner:{type:[String]}}});Dc.set("toJSON",{transform:S9.transformSchemaToJSON});var gK1=DA.model("category",Dc);var QX=JA(AA(),1);var pz=new QX.Schema({token:{type:String,required:!0,unique:!1},username:{type:String,required:!0,trim:!0},email:{type:String,index:!0,required:!0,unique:!0,lowercase:!0,trim:!0},password:{type:String,required:!0},apiToken:{type:String,required:!0,unique:!1,trim:!0},connections:{discord:{id:{type:String,index:!0,unique:!0,sparse:!0},username:{type:String}},epic:{id:{type:String,index:!0,unique:!0,sparse:!0},username:{type:String}}}},{statics:{async verifyPassword(F,A){return Bun.password.verify(F,A)},async findByToken(F,A){let B=await this.findById(F);if(!B?.token||B.token!==A)return null;return B},async findByAPIToken(F,A){let B=await this.findById(F);if(!B?.apiToken||B.apiToken!==A)return null;return B}}});pz.pre("save",async function(F){if(!this.isModified("password"))return F();try{return this.password=await Bun.password.hash(this.password,{algorithm:process.env.SAVE_ACCOUNT_ALGORITHM||"argon2id",timeCost:parseInt(process.env.SAVE_ACCOUNT_TIME_COST||"3"),cost:parseInt(process.env.SAVE_ACCOUNT_ALGORITHM_COST||"12")}),F()}catch(A){return F(A)}});pz.set("toJSON",{transform:S9.transformSchemaToJSON});var bK1=QX.model("user",pz);export{bK1 as UserModel,ed as DatabaseClient,gK1 as CategoryModel,kK1 as BotModel};