@stacksjs/whois 0.64.6 → 0.66.0
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/constants.d.ts +3 -0
- package/dist/index.d.ts +88 -0
- package/dist/index.js +161 -2
- package/dist/index.js.map +96 -6
- package/dist/types.d.ts +93 -0
- package/dist/utils.d.ts +7 -0
- package/package.json +9 -12
- package/src/constants.ts +325 -0
- package/src/index.ts +69 -171
- package/src/types.ts +97 -0
- package/src/utils.ts +22 -0
- package/src/parameters.ts +0 -4
- package/src/servers.ts +0 -318
- package/src/test.ts +0 -5
package/dist/index.js
CHANGED
|
@@ -1,5 +1,164 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var t1=Object.create;var{getPrototypeOf:e1,defineProperty:X9,getOwnPropertyNames:w8}=Object;var J8=Object.prototype.hasOwnProperty;var Q8=(w,J,X)=>{X=w!=null?t1(e1(w)):{};const Y=J||!w||!w.__esModule?X9(X,"default",{value:w,enumerable:!0}):X;for(let Z of w8(w))if(!J8.call(Y,Z))X9(Y,Z,{get:()=>w[Z],enumerable:!0});return Y};var R=(w,J)=>()=>(J||w((J={exports:{}}).exports,J),J.exports);var G9=R((h9)=>{function $8(w){if(!K9.Buffer.isEncoding(w))throw new Error(Kw.INVALID_ENCODING)}function Z9(w){return typeof w==="number"&&isFinite(w)&&Z8(w)}function W9(w,J){if(typeof w==="number"){if(!Z9(w)||w<0)throw new Error(J?Kw.INVALID_OFFSET:Kw.INVALID_LENGTH)}else throw new Error(J?Kw.INVALID_OFFSET_NON_NUMBER:Kw.INVALID_LENGTH_NON_NUMBER)}function Y8(w){W9(w,!1)}function X8(w){W9(w,!0)}function K8(w,J){if(w<0||w>J.length)throw new Error(Kw.INVALID_TARGET_OFFSET)}function Z8(w){return typeof w==="number"&&isFinite(w)&&Math.floor(w)===w}function W8(w){if(typeof BigInt==="undefined")throw new Error("Platform does not support JS BigInt type.");if(typeof K9.Buffer.prototype[w]==="undefined")throw new Error(`Platform does not support Buffer.prototype.${w}.`)}Object.defineProperty(h9,"__esModule",{value:!0});var K9=import.meta.require("buffer"),Kw={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};h9.ERRORS=Kw;h9.checkEncoding=$8;h9.isFiniteInteger=Z9;h9.checkLengthValue=Y8;h9.checkOffsetValue=X8;h9.checkTargetOffset=K8;h9.bigIntAndBufferInt64Check=W8});var U9=R((F9)=>{Object.defineProperty(F9,"__esModule",{value:!0});var P=G9(),q9=4096,O8="utf8";class xw{constructor(w){if(this.length=0,this._encoding=O8,this._writeOffset=0,this._readOffset=0,xw.isSmartBufferOptions(w)){if(w.encoding)P.checkEncoding(w.encoding),this._encoding=w.encoding;if(w.size)if(P.isFiniteInteger(w.size)&&w.size>0)this._buff=Buffer.allocUnsafe(w.size);else throw new Error(P.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(w.buff)if(Buffer.isBuffer(w.buff))this._buff=w.buff,this.length=w.buff.length;else throw new Error(P.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(q9)}else{if(typeof w!=="undefined")throw new Error(P.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(q9)}}static fromSize(w,J){return new this({size:w,encoding:J})}static fromBuffer(w,J){return new this({buff:w,encoding:J})}static fromOptions(w){return new this(w)}static isSmartBufferOptions(w){const J=w;return J&&(J.encoding!==void 0||J.size!==void 0||J.buff!==void 0)}readInt8(w){return this._readNumberValue(Buffer.prototype.readInt8,1,w)}readInt16BE(w){return this._readNumberValue(Buffer.prototype.readInt16BE,2,w)}readInt16LE(w){return this._readNumberValue(Buffer.prototype.readInt16LE,2,w)}readInt32BE(w){return this._readNumberValue(Buffer.prototype.readInt32BE,4,w)}readInt32LE(w){return this._readNumberValue(Buffer.prototype.readInt32LE,4,w)}readBigInt64BE(w){return P.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,w)}readBigInt64LE(w){return P.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,w)}writeInt8(w,J){return this._writeNumberValue(Buffer.prototype.writeInt8,1,w,J),this}insertInt8(w,J){return this._insertNumberValue(Buffer.prototype.writeInt8,1,w,J)}writeInt16BE(w,J){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,w,J)}insertInt16BE(w,J){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,w,J)}writeInt16LE(w,J){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,w,J)}insertInt16LE(w,J){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,w,J)}writeInt32BE(w,J){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,w,J)}insertInt32BE(w,J){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,w,J)}writeInt32LE(w,J){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,w,J)}insertInt32LE(w,J){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,w,J)}writeBigInt64BE(w,J){return P.bigIntAndBufferInt64Check("writeBigInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,w,J)}insertBigInt64BE(w,J){return P.bigIntAndBufferInt64Check("writeBigInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,w,J)}writeBigInt64LE(w,J){return P.bigIntAndBufferInt64Check("writeBigInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,w,J)}insertBigInt64LE(w,J){return P.bigIntAndBufferInt64Check("writeBigInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,w,J)}readUInt8(w){return this._readNumberValue(Buffer.prototype.readUInt8,1,w)}readUInt16BE(w){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,w)}readUInt16LE(w){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,w)}readUInt32BE(w){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,w)}readUInt32LE(w){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,w)}readBigUInt64BE(w){return P.bigIntAndBufferInt64Check("readBigUInt64BE"),this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,w)}readBigUInt64LE(w){return P.bigIntAndBufferInt64Check("readBigUInt64LE"),this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,w)}writeUInt8(w,J){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,w,J)}insertUInt8(w,J){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,w,J)}writeUInt16BE(w,J){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,w,J)}insertUInt16BE(w,J){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,w,J)}writeUInt16LE(w,J){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,w,J)}insertUInt16LE(w,J){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,w,J)}writeUInt32BE(w,J){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,w,J)}insertUInt32BE(w,J){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,w,J)}writeUInt32LE(w,J){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,w,J)}insertUInt32LE(w,J){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,w,J)}writeBigUInt64BE(w,J){return P.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,w,J)}insertBigUInt64BE(w,J){return P.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,w,J)}writeBigUInt64LE(w,J){return P.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,w,J)}insertBigUInt64LE(w,J){return P.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,w,J)}readFloatBE(w){return this._readNumberValue(Buffer.prototype.readFloatBE,4,w)}readFloatLE(w){return this._readNumberValue(Buffer.prototype.readFloatLE,4,w)}writeFloatBE(w,J){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,w,J)}insertFloatBE(w,J){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,w,J)}writeFloatLE(w,J){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,w,J)}insertFloatLE(w,J){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,w,J)}readDoubleBE(w){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,w)}readDoubleLE(w){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,w)}writeDoubleBE(w,J){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,w,J)}insertDoubleBE(w,J){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,w,J)}writeDoubleLE(w,J){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,w,J)}insertDoubleLE(w,J){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,w,J)}readString(w,J){let X;if(typeof w==="number")P.checkLengthValue(w),X=Math.min(w,this.length-this._readOffset);else J=w,X=this.length-this._readOffset;if(typeof J!=="undefined")P.checkEncoding(J);const Y=this._buff.slice(this._readOffset,this._readOffset+X).toString(J||this._encoding);return this._readOffset+=X,Y}insertString(w,J,X){return P.checkOffsetValue(J),this._handleString(w,!0,J,X)}writeString(w,J,X){return this._handleString(w,!1,J,X)}readStringNT(w){if(typeof w!=="undefined")P.checkEncoding(w);let J=this.length;for(let Y=this._readOffset;Y<this.length;Y++)if(this._buff[Y]===0){J=Y;break}const X=this._buff.slice(this._readOffset,J);return this._readOffset=J+1,X.toString(w||this._encoding)}insertStringNT(w,J,X){return P.checkOffsetValue(J),this.insertString(w,J,X),this.insertUInt8(0,J+w.length),this}writeStringNT(w,J,X){return this.writeString(w,J,X),this.writeUInt8(0,typeof J==="number"?J+w.length:this.writeOffset),this}readBuffer(w){if(typeof w!=="undefined")P.checkLengthValue(w);const J=typeof w==="number"?w:this.length,X=Math.min(this.length,this._readOffset+J),Y=this._buff.slice(this._readOffset,X);return this._readOffset=X,Y}insertBuffer(w,J){return P.checkOffsetValue(J),this._handleBuffer(w,!0,J)}writeBuffer(w,J){return this._handleBuffer(w,!1,J)}readBufferNT(){let w=this.length;for(let X=this._readOffset;X<this.length;X++)if(this._buff[X]===0){w=X;break}const J=this._buff.slice(this._readOffset,w);return this._readOffset=w+1,J}insertBufferNT(w,J){return P.checkOffsetValue(J),this.insertBuffer(w,J),this.insertUInt8(0,J+w.length),this}writeBufferNT(w,J){if(typeof J!=="undefined")P.checkOffsetValue(J);return this.writeBuffer(w,J),this.writeUInt8(0,typeof J==="number"?J+w.length:this._writeOffset),this}clear(){return this._writeOffset=0,this._readOffset=0,this.length=0,this}remaining(){return this.length-this._readOffset}get readOffset(){return this._readOffset}set readOffset(w){P.checkOffsetValue(w),P.checkTargetOffset(w,this),this._readOffset=w}get writeOffset(){return this._writeOffset}set writeOffset(w){P.checkOffsetValue(w),P.checkTargetOffset(w,this),this._writeOffset=w}get encoding(){return this._encoding}set encoding(w){P.checkEncoding(w),this._encoding=w}get internalBuffer(){return this._buff}toBuffer(){return this._buff.slice(0,this.length)}toString(w){const J=typeof w==="string"?w:this._encoding;return P.checkEncoding(J),this._buff.toString(J,0,this.length)}destroy(){return this.clear(),this}_handleString(w,J,X,Y){let Z=this._writeOffset,h=this._encoding;if(typeof X==="number")Z=X;else if(typeof X==="string")P.checkEncoding(X),h=X;if(typeof Y==="string")P.checkEncoding(Y),h=Y;const z=Buffer.byteLength(w,h);if(J)this.ensureInsertable(z,Z);else this._ensureWriteable(z,Z);if(this._buff.write(w,Z,z,h),J)this._writeOffset+=z;else if(typeof X==="number")this._writeOffset=Math.max(this._writeOffset,Z+z);else this._writeOffset+=z;return this}_handleBuffer(w,J,X){const Y=typeof X==="number"?X:this._writeOffset;if(J)this.ensureInsertable(w.length,Y);else this._ensureWriteable(w.length,Y);if(w.copy(this._buff,Y),J)this._writeOffset+=w.length;else if(typeof X==="number")this._writeOffset=Math.max(this._writeOffset,Y+w.length);else this._writeOffset+=w.length;return this}ensureReadable(w,J){let X=this._readOffset;if(typeof J!=="undefined")P.checkOffsetValue(J),X=J;if(X<0||X+w>this.length)throw new Error(P.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(w,J){if(P.checkOffsetValue(J),this._ensureCapacity(this.length+w),J<this.length)this._buff.copy(this._buff,J+w,J,this._buff.length);if(J+w>this.length)this.length=J+w;else this.length+=w}_ensureWriteable(w,J){const X=typeof J==="number"?J:this._writeOffset;if(this._ensureCapacity(X+w),X+w>this.length)this.length=X+w}_ensureCapacity(w){const J=this._buff.length;if(w>J){let X=this._buff,Y=J*3/2+1;if(Y<w)Y=w;this._buff=Buffer.allocUnsafe(Y),X.copy(this._buff,0,0,J)}}_readNumberValue(w,J,X){this.ensureReadable(J,X);const Y=w.call(this._buff,typeof X==="number"?X:this._readOffset);if(typeof X==="undefined")this._readOffset+=J;return Y}_insertNumberValue(w,J,X,Y){return P.checkOffsetValue(Y),this.ensureInsertable(J,Y),w.call(this._buff,X,Y),this._writeOffset+=J,this}_writeNumberValue(w,J,X,Y){if(typeof Y==="number"){if(Y<0)throw new Error(P.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);P.checkOffsetValue(Y)}const Z=typeof Y==="number"?Y:this._writeOffset;if(this._ensureWriteable(J,Z),w.call(this._buff,X,Z),typeof Y==="number")this._writeOffset=Math.max(this._writeOffset,Z+J);else this._writeOffset+=J;return this}}F9.SmartBuffer=xw});var mw=R((P9)=>{Object.defineProperty(P9,"__esModule",{value:!0});P9.SOCKS5_NO_ACCEPTABLE_AUTH=P9.SOCKS5_CUSTOM_AUTH_END=P9.SOCKS5_CUSTOM_AUTH_START=P9.SOCKS_INCOMING_PACKET_SIZES=P9.SocksClientState=P9.Socks5Response=P9.Socks5HostType=P9.Socks5Auth=P9.Socks4Response=P9.SocksCommand=P9.ERRORS=P9.DEFAULT_TIMEOUT=void 0;var E8=30000;P9.DEFAULT_TIMEOUT=E8;var H8={InvalidSocksCommand:"An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",InvalidSocksCommandForOperation:"An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",InvalidSocksCommandChain:"An invalid SOCKS command was provided. Chaining currently only supports the connect command.",InvalidSocksClientOptionsDestination:"An invalid destination host was provided.",InvalidSocksClientOptionsExistingSocket:"An invalid existing socket was provided. This should be an instance of stream.Duplex.",InvalidSocksClientOptionsProxy:"Invalid SOCKS proxy details were provided.",InvalidSocksClientOptionsTimeout:"An invalid timeout value was provided. Please enter a value above 0 (in ms).",InvalidSocksClientOptionsProxiesLength:"At least two socks proxies must be provided for chaining.",InvalidSocksClientOptionsCustomAuthRange:"Custom auth must be a value between 0x80 and 0xFE.",InvalidSocksClientOptionsCustomAuthOptions:"When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",NegotiationError:"Negotiation error",SocketClosed:"Socket closed",ProxyConnectionTimedOut:"Proxy connection timed out",InternalError:"SocksClient internal error (this should not happen)",InvalidSocks4HandshakeResponse:"Received invalid Socks4 handshake response",Socks4ProxyRejectedConnection:"Socks4 Proxy rejected connection",InvalidSocks4IncomingConnectionResponse:"Socks4 invalid incoming connection response",Socks4ProxyRejectedIncomingBoundConnection:"Socks4 Proxy rejected incoming bound connection",InvalidSocks5InitialHandshakeResponse:"Received invalid Socks5 initial handshake response",InvalidSocks5IntiailHandshakeSocksVersion:"Received invalid Socks5 initial handshake (invalid socks version)",InvalidSocks5InitialHandshakeNoAcceptedAuthType:"Received invalid Socks5 initial handshake (no accepted authentication type)",InvalidSocks5InitialHandshakeUnknownAuthType:"Received invalid Socks5 initial handshake (unknown authentication type)",Socks5AuthenticationFailed:"Socks5 Authentication failed",InvalidSocks5FinalHandshake:"Received invalid Socks5 final handshake response",InvalidSocks5FinalHandshakeRejected:"Socks5 proxy rejected connection",InvalidSocks5IncomingConnectionResponse:"Received invalid Socks5 incoming connection response",Socks5ProxyRejectedIncomingBoundConnection:"Socks5 Proxy rejected incoming bound connection"};P9.ERRORS=H8;var P8={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:(w)=>w+7,Socks4Response:8};P9.SOCKS_INCOMING_PACKET_SIZES=P8;var z9;(function(w){w[w.connect=1]="connect",w[w.bind=2]="bind",w[w.associate=3]="associate"})(z9||(P9.SocksCommand=z9={}));var N9;(function(w){w[w.Granted=90]="Granted",w[w.Failed=91]="Failed",w[w.Rejected=92]="Rejected",w[w.RejectedIdent=93]="RejectedIdent"})(N9||(P9.Socks4Response=N9={}));var O9;(function(w){w[w.NoAuth=0]="NoAuth",w[w.GSSApi=1]="GSSApi",w[w.UserPass=2]="UserPass"})(O9||(P9.Socks5Auth=O9={}));var D8=128;P9.SOCKS5_CUSTOM_AUTH_START=D8;var M8=254;P9.SOCKS5_CUSTOM_AUTH_END=M8;var T8=255;P9.SOCKS5_NO_ACCEPTABLE_AUTH=T8;var V9;(function(w){w[w.Granted=0]="Granted",w[w.Failure=1]="Failure",w[w.NotAllowed=2]="NotAllowed",w[w.NetworkUnreachable=3]="NetworkUnreachable",w[w.HostUnreachable=4]="HostUnreachable",w[w.ConnectionRefused=5]="ConnectionRefused",w[w.TTLExpired=6]="TTLExpired",w[w.CommandNotSupported=7]="CommandNotSupported",w[w.AddressNotSupported=8]="AddressNotSupported"})(V9||(P9.Socks5Response=V9={}));var E9;(function(w){w[w.IPv4=1]="IPv4",w[w.Hostname=3]="Hostname",w[w.IPv6=4]="IPv6"})(E9||(P9.Socks5HostType=E9={}));var H9;(function(w){w[w.Created=0]="Created",w[w.Connecting=1]="Connecting",w[w.Connected=2]="Connected",w[w.SentInitialHandshake=3]="SentInitialHandshake",w[w.ReceivedInitialHandshakeResponse=4]="ReceivedInitialHandshakeResponse",w[w.SentAuthentication=5]="SentAuthentication",w[w.ReceivedAuthenticationResponse=6]="ReceivedAuthenticationResponse",w[w.SentFinalHandshake=7]="SentFinalHandshake",w[w.ReceivedFinalResponse=8]="ReceivedFinalResponse",w[w.BoundWaitingForConnection=9]="BoundWaitingForConnection",w[w.Established=10]="Established",w[w.Disconnected=11]="Disconnected",w[w.Error=99]="Error"})(H9||(P9.SocksClientState=H9={}))});var cw=R((T9)=>{function b8(w){for(let J=w.length-1;J>0;J--){const X=Math.floor(Math.random()*(J+1));[w[J],w[X]]=[w[X],w[J]]}}Object.defineProperty(T9,"__esModule",{value:!0});T9.shuffleArray=T9.SocksClientError=void 0;class M9 extends Error{constructor(w,J){super(w);this.options=J}}T9.SocksClientError=M9;T9.shuffleArray=b8});var _w=R((A9)=>{function m8(w){if(this.subnetMask<w.subnetMask)return!1;if(this.mask(w.subnetMask)===w.mask())return!0;return!1}function c8(w){return function(){if(this.addressMinusSuffix!==this.correctForm())return!1;if(this.subnetMask===w&&!this.parsedSubnet)return!0;return this.parsedSubnet===String(this.subnetMask)}}Object.defineProperty(A9,"__esModule",{value:!0});A9.isCorrect=A9.isInSubnet=void 0;A9.isInSubnet=m8;A9.isCorrect=c8});var gw=R((R9)=>{Object.defineProperty(R9,"__esModule",{value:!0});R9.RE_SUBNET_STRING=R9.RE_ADDRESS=R9.GROUPS=R9.BITS=void 0;R9.BITS=32;R9.GROUPS=4;R9.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g;R9.RE_SUBNET_STRING=/\/\d{1,2}$/});var Tw=R((I9)=>{Object.defineProperty(I9,"__esModule",{value:!0});I9.AddressError=void 0;class B9 extends Error{constructor(w,J){super(w);if(this.name="AddressError",J!==null)this.parseMessage=J}}I9.AddressError=B9});var uw=R((Lw,v9)=>{(function(){var w,J=244837814094590,X=(J&16777215)==15715070;function Y(Q,$,K){if(Q!=null)if(typeof Q=="number")this.fromNumber(Q,$,K);else if($==null&&typeof Q!="string")this.fromString(Q,256);else this.fromString(Q,$)}function Z(){return new Y(null)}function h(Q,$,K,W,G,F){while(--F>=0){var N=$*this[Q++]+K[W]+G;G=Math.floor(N/67108864),K[W++]=N&67108863}return G}function z(Q,$,K,W,G,F){var N=$&32767,O=$>>15;while(--F>=0){var C=this[Q]&32767,B=this[Q++]>>15,f=O*C+B*N;C=N*C+((f&32767)<<15)+K[W]+(G&1073741823),G=(C>>>30)+(f>>>15)+O*B+(G>>>30),K[W++]=C&1073741823}return G}function V(Q,$,K,W,G,F){var N=$&16383,O=$>>14;while(--F>=0){var C=this[Q]&16383,B=this[Q++]>>14,f=O*C+B*N;C=N*C+((f&16383)<<14)+K[W]+G,G=(C>>28)+(f>>14)+O*B,K[W++]=C&268435455}return G}var E=typeof navigator!=="undefined";if(E&&X&&navigator.appName=="Microsoft Internet Explorer")Y.prototype.am=z,w=30;else if(E&&X&&navigator.appName!="Netscape")Y.prototype.am=h,w=26;else Y.prototype.am=V,w=28;Y.prototype.DB=w,Y.prototype.DM=(1<<w)-1,Y.prototype.DV=1<<w;var L=52;Y.prototype.FV=Math.pow(2,L),Y.prototype.F1=L-w,Y.prototype.F2=2*w-L;var q="0123456789abcdefghijklmnopqrstuvwxyz",T=new Array,D,M;D="0".charCodeAt(0);for(M=0;M<=9;++M)T[D++]=M;D="a".charCodeAt(0);for(M=10;M<36;++M)T[D++]=M;D="A".charCodeAt(0);for(M=10;M<36;++M)T[D++]=M;function H(Q){return q.charAt(Q)}function Qw(Q,$){var K=T[Q.charCodeAt($)];return K==null?-1:K}function zw(Q){for(var $=this.t-1;$>=0;--$)Q[$]=this[$];Q.t=this.t,Q.s=this.s}function Nw(Q){if(this.t=1,this.s=Q<0?-1:0,Q>0)this[0]=Q;else if(Q<-1)this[0]=Q+this.DV;else this.t=0}function l(Q){var $=Z();return $.fromInt(Q),$}function e(Q,$){var K;if($==16)K=4;else if($==8)K=3;else if($==256)K=8;else if($==2)K=1;else if($==32)K=5;else if($==4)K=2;else{this.fromRadix(Q,$);return}this.t=0,this.s=0;var W=Q.length,G=!1,F=0;while(--W>=0){var N=K==8?Q[W]&255:Qw(Q,W);if(N<0){if(Q.charAt(W)=="-")G=!0;continue}if(G=!1,F==0)this[this.t++]=N;else if(F+K>this.DB)this[this.t-1]|=(N&(1<<this.DB-F)-1)<<F,this[this.t++]=N>>this.DB-F;else this[this.t-1]|=N<<F;if(F+=K,F>=this.DB)F-=this.DB}if(K==8&&(Q[0]&128)!=0){if(this.s=-1,F>0)this[this.t-1]|=(1<<this.DB-F)-1<<F}if(this.clamp(),G)Y.ZERO.subTo(this,this)}function U0(){var Q=this.s&this.DM;while(this.t>0&&this[this.t-1]==Q)--this.t}function z0(Q){if(this.s<0)return"-"+this.negate().toString(Q);var $;if(Q==16)$=4;else if(Q==8)$=3;else if(Q==2)$=1;else if(Q==32)$=5;else if(Q==4)$=2;else return this.toRadix(Q);var K=(1<<$)-1,W,G=!1,F="",N=this.t,O=this.DB-N*this.DB%$;if(N-- >0){if(O<this.DB&&(W=this[N]>>O)>0)G=!0,F=H(W);while(N>=0){if(O<$)W=(this[N]&(1<<O)-1)<<$-O,W|=this[--N]>>(O+=this.DB-$);else if(W=this[N]>>(O-=$)&K,O<=0)O+=this.DB,--N;if(W>0)G=!0;if(G)F+=H(W)}}return G?F:"0"}function N0(){var Q=Z();return Y.ZERO.subTo(this,Q),Q}function O0(){return this.s<0?this.negate():this}function V0(Q){var $=this.s-Q.s;if($!=0)return $;var K=this.t;if($=K-Q.t,$!=0)return this.s<0?-$:$;while(--K>=0)if(($=this[K]-Q[K])!=0)return $;return 0}function Hw(Q){var $=1,K;if((K=Q>>>16)!=0)Q=K,$+=16;if((K=Q>>8)!=0)Q=K,$+=8;if((K=Q>>4)!=0)Q=K,$+=4;if((K=Q>>2)!=0)Q=K,$+=2;if((K=Q>>1)!=0)Q=K,$+=1;return $}function E0(){if(this.t<=0)return 0;return this.DB*(this.t-1)+Hw(this[this.t-1]^this.s&this.DM)}function H0(Q,$){var K;for(K=this.t-1;K>=0;--K)$[K+Q]=this[K];for(K=Q-1;K>=0;--K)$[K]=0;$.t=this.t+Q,$.s=this.s}function P0(Q,$){for(var K=Q;K<this.t;++K)$[K-Q]=this[K];$.t=Math.max(this.t-Q,0),$.s=this.s}function D0(Q,$){var K=Q%this.DB,W=this.DB-K,G=(1<<W)-1,F=Math.floor(Q/this.DB),N=this.s<<K&this.DM,O;for(O=this.t-1;O>=0;--O)$[O+F+1]=this[O]>>W|N,N=(this[O]&G)<<K;for(O=F-1;O>=0;--O)$[O]=0;$[F]=N,$.t=this.t+F+1,$.s=this.s,$.clamp()}function M0(Q,$){$.s=this.s;var K=Math.floor(Q/this.DB);if(K>=this.t){$.t=0;return}var W=Q%this.DB,G=this.DB-W,F=(1<<W)-1;$[0]=this[K]>>W;for(var N=K+1;N<this.t;++N)$[N-K-1]|=(this[N]&F)<<G,$[N-K]=this[N]>>W;if(W>0)$[this.t-K-1]|=(this.s&F)<<G;$.t=this.t-K,$.clamp()}function T0(Q,$){var K=0,W=0,G=Math.min(Q.t,this.t);while(K<G)W+=this[K]-Q[K],$[K++]=W&this.DM,W>>=this.DB;if(Q.t<this.t){W-=Q.s;while(K<this.t)W+=this[K],$[K++]=W&this.DM,W>>=this.DB;W+=this.s}else{W+=this.s;while(K<Q.t)W-=Q[K],$[K++]=W&this.DM,W>>=this.DB;W-=Q.s}if($.s=W<0?-1:0,W<-1)$[K++]=this.DV+W;else if(W>0)$[K++]=W;$.t=K,$.clamp()}function L0(Q,$){var K=this.abs(),W=Q.abs(),G=K.t;$.t=G+W.t;while(--G>=0)$[G]=0;for(G=0;G<W.t;++G)$[G+K.t]=K.am(0,W[G],$,G,0,K.t);if($.s=0,$.clamp(),this.s!=Q.s)Y.ZERO.subTo($,$)}function A0(Q){var $=this.abs(),K=Q.t=2*$.t;while(--K>=0)Q[K]=0;for(K=0;K<$.t-1;++K){var W=$.am(K,$[K],Q,2*K,0,1);if((Q[K+$.t]+=$.am(K+1,2*$[K],Q,2*K+1,W,$.t-K-1))>=$.DV)Q[K+$.t]-=$.DV,Q[K+$.t+1]=1}if(Q.t>0)Q[Q.t-1]+=$.am(K,$[K],Q,2*K,0,1);Q.s=0,Q.clamp()}function C0(Q,$,K){var W=Q.abs();if(W.t<=0)return;var G=this.abs();if(G.t<W.t){if($!=null)$.fromInt(0);if(K!=null)this.copyTo(K);return}if(K==null)K=Z();var F=Z(),N=this.s,O=Q.s,C=this.DB-Hw(W[W.t-1]);if(C>0)W.lShiftTo(C,F),G.lShiftTo(C,K);else W.copyTo(F),G.copyTo(K);var B=F.t,f=F[B-1];if(f==0)return;var g=f*(1<<this.F1)+(B>1?F[B-2]>>this.F2:0),s=this.FV/g,Dw=(1<<this.F1)/g,p=1<<this.F2,n=K.t,Mw=n-B,ww=$==null?Z():$;if(F.dlShiftTo(Mw,ww),K.compareTo(ww)>=0)K[K.t++]=1,K.subTo(ww,K);Y.ONE.dlShiftTo(B,ww),ww.subTo(F,F);while(F.t<B)F[F.t++]=0;while(--Mw>=0){var bw=K[--n]==f?this.DM:Math.floor(K[n]*s+(K[n-1]+p)*Dw);if((K[n]+=F.am(0,bw,K,Mw,0,B))<bw){F.dlShiftTo(Mw,ww),K.subTo(ww,K);while(K[n]<--bw)K.subTo(ww,K)}}if($!=null){if(K.drShiftTo(B,$),N!=O)Y.ZERO.subTo($,$)}if(K.t=B,K.clamp(),C>0)K.rShiftTo(C,K);if(N<0)Y.ZERO.subTo(K,K)}function R0(Q){var $=Z();if(this.abs().divRemTo(Q,null,$),this.s<0&&$.compareTo(Y.ZERO)>0)Q.subTo($,$);return $}function $w(Q){this.m=Q}function j0(Q){if(Q.s<0||Q.compareTo(this.m)>=0)return Q.mod(this.m);else return Q}function B0(Q){return Q}function I0(Q){Q.divRemTo(this.m,null,Q)}function y0(Q,$,K){Q.multiplyTo($,K),this.reduce(K)}function v0(Q,$){Q.squareTo($),this.reduce($)}$w.prototype.convert=j0,$w.prototype.revert=B0,$w.prototype.reduce=I0,$w.prototype.mulTo=y0,$w.prototype.sqrTo=v0;function S0(){if(this.t<1)return 0;var Q=this[0];if((Q&1)==0)return 0;var $=Q&3;return $=$*(2-(Q&15)*$)&15,$=$*(2-(Q&255)*$)&255,$=$*(2-((Q&65535)*$&65535))&65535,$=$*(2-Q*$%this.DV)%this.DV,$>0?this.DV-$:-$}function Yw(Q){this.m=Q,this.mp=Q.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<Q.DB-15)-1,this.mt2=2*Q.t}function k0(Q){var $=Z();if(Q.abs().dlShiftTo(this.m.t,$),$.divRemTo(this.m,null,$),Q.s<0&&$.compareTo(Y.ZERO)>0)this.m.subTo($,$);return $}function b0(Q){var $=Z();return Q.copyTo($),this.reduce($),$}function x0(Q){while(Q.t<=this.mt2)Q[Q.t++]=0;for(var $=0;$<this.m.t;++$){var K=Q[$]&32767,W=K*this.mpl+((K*this.mph+(Q[$]>>15)*this.mpl&this.um)<<15)&Q.DM;K=$+this.m.t,Q[K]+=this.m.am(0,W,Q,$,0,this.m.t);while(Q[K]>=Q.DV)Q[K]-=Q.DV,Q[++K]++}if(Q.clamp(),Q.drShiftTo(this.m.t,Q),Q.compareTo(this.m)>=0)Q.subTo(this.m,Q)}function m0(Q,$){Q.squareTo($),this.reduce($)}function c0(Q,$,K){Q.multiplyTo($,K),this.reduce(K)}Yw.prototype.convert=k0,Yw.prototype.revert=b0,Yw.prototype.reduce=x0,Yw.prototype.mulTo=c0,Yw.prototype.sqrTo=m0;function _0(){return(this.t>0?this[0]&1:this.s)==0}function g0(Q,$){if(Q>4294967295||Q<1)return Y.ONE;var K=Z(),W=Z(),G=$.convert(this),F=Hw(Q)-1;G.copyTo(K);while(--F>=0)if($.sqrTo(K,W),(Q&1<<F)>0)$.mulTo(W,G,K);else{var N=K;K=W,W=N}return $.revert(K)}function u0(Q,$){var K;if(Q<256||$.isEven())K=new $w($);else K=new Yw($);return this.exp(Q,K)}Y.prototype.copyTo=zw,Y.prototype.fromInt=Nw,Y.prototype.fromString=e,Y.prototype.clamp=U0,Y.prototype.dlShiftTo=H0,Y.prototype.drShiftTo=P0,Y.prototype.lShiftTo=D0,Y.prototype.rShiftTo=M0,Y.prototype.subTo=T0,Y.prototype.multiplyTo=L0,Y.prototype.squareTo=A0,Y.prototype.divRemTo=C0,Y.prototype.invDigit=S0,Y.prototype.isEven=_0,Y.prototype.exp=g0,Y.prototype.toString=z0,Y.prototype.negate=N0,Y.prototype.abs=O0,Y.prototype.compareTo=V0,Y.prototype.bitLength=E0,Y.prototype.mod=R0,Y.prototype.modPowInt=u0,Y.ZERO=l(0),Y.ONE=l(1);function l0(){var Q=Z();return this.copyTo(Q),Q}function f0(){if(this.s<0){if(this.t==1)return this[0]-this.DV;else if(this.t==0)return-1}else if(this.t==1)return this[0];else if(this.t==0)return 0;return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function d0(){return this.t==0?this.s:this[0]<<24>>24}function i0(){return this.t==0?this.s:this[0]<<16>>16}function p0(Q){return Math.floor(Math.LN2*this.DB/Math.log(Q))}function n0(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this[0]<=0)return 0;else return 1}function a0(Q){if(Q==null)Q=10;if(this.signum()==0||Q<2||Q>36)return"0";var $=this.chunkSize(Q),K=Math.pow(Q,$),W=l(K),G=Z(),F=Z(),N="";this.divRemTo(W,G,F);while(G.signum()>0)N=(K+F.intValue()).toString(Q).substr(1)+N,G.divRemTo(W,G,F);return F.intValue().toString(Q)+N}function o0(Q,$){if(this.fromInt(0),$==null)$=10;var K=this.chunkSize($),W=Math.pow($,K),G=!1,F=0,N=0;for(var O=0;O<Q.length;++O){var C=Qw(Q,O);if(C<0){if(Q.charAt(O)=="-"&&this.signum()==0)G=!0;continue}if(N=$*N+C,++F>=K)this.dMultiply(W),this.dAddOffset(N,0),F=0,N=0}if(F>0)this.dMultiply(Math.pow($,F)),this.dAddOffset(N,0);if(G)Y.ZERO.subTo(this,this)}function r0(Q,$,K){if(typeof $=="number")if(Q<2)this.fromInt(1);else{if(this.fromNumber(Q,K),!this.testBit(Q-1))this.bitwiseTo(Y.ONE.shiftLeft(Q-1),yw,this);if(this.isEven())this.dAddOffset(1,0);while(!this.isProbablePrime($))if(this.dAddOffset(2,0),this.bitLength()>Q)this.subTo(Y.ONE.shiftLeft(Q-1),this)}else{var W=new Array,G=Q&7;if(W.length=(Q>>3)+1,$.nextBytes(W),G>0)W[0]&=(1<<G)-1;else W[0]=0;this.fromString(W,256)}}function s0(){var Q=this.t,$=new Array;$[0]=this.s;var K=this.DB-Q*this.DB%8,W,G=0;if(Q-- >0){if(K<this.DB&&(W=this[Q]>>K)!=(this.s&this.DM)>>K)$[G++]=W|this.s<<this.DB-K;while(Q>=0){if(K<8)W=(this[Q]&(1<<K)-1)<<8-K,W|=this[--Q]>>(K+=this.DB-8);else if(W=this[Q]>>(K-=8)&255,K<=0)K+=this.DB,--Q;if((W&128)!=0)W|=-256;if(G==0&&(this.s&128)!=(W&128))++G;if(G>0||W!=this.s)$[G++]=W}}return $}function t0(Q){return this.compareTo(Q)==0}function e0(Q){return this.compareTo(Q)<0?this:Q}function w1(Q){return this.compareTo(Q)>0?this:Q}function J1(Q,$,K){var W,G,F=Math.min(Q.t,this.t);for(W=0;W<F;++W)K[W]=$(this[W],Q[W]);if(Q.t<this.t){G=Q.s&this.DM;for(W=F;W<this.t;++W)K[W]=$(this[W],G);K.t=this.t}else{G=this.s&this.DM;for(W=F;W<Q.t;++W)K[W]=$(G,Q[W]);K.t=Q.t}K.s=$(this.s,Q.s),K.clamp()}function Q1(Q,$){return Q&$}function $1(Q){var $=Z();return this.bitwiseTo(Q,Q1,$),$}function yw(Q,$){return Q|$}function Y1(Q){var $=Z();return this.bitwiseTo(Q,yw,$),$}function ew(Q,$){return Q^$}function X1(Q){var $=Z();return this.bitwiseTo(Q,ew,$),$}function w9(Q,$){return Q&~$}function K1(Q){var $=Z();return this.bitwiseTo(Q,w9,$),$}function Z1(){var Q=Z();for(var $=0;$<this.t;++$)Q[$]=this.DM&~this[$];return Q.t=this.t,Q.s=~this.s,Q}function W1(Q){var $=Z();if(Q<0)this.rShiftTo(-Q,$);else this.lShiftTo(Q,$);return $}function h1(Q){var $=Z();if(Q<0)this.lShiftTo(-Q,$);else this.rShiftTo(Q,$);return $}function G1(Q){if(Q==0)return-1;var $=0;if((Q&65535)==0)Q>>=16,$+=16;if((Q&255)==0)Q>>=8,$+=8;if((Q&15)==0)Q>>=4,$+=4;if((Q&3)==0)Q>>=2,$+=2;if((Q&1)==0)++$;return $}function q1(){for(var Q=0;Q<this.t;++Q)if(this[Q]!=0)return Q*this.DB+G1(this[Q]);if(this.s<0)return this.t*this.DB;return-1}function F1(Q){var $=0;while(Q!=0)Q&=Q-1,++$;return $}function U1(){var Q=0,$=this.s&this.DM;for(var K=0;K<this.t;++K)Q+=F1(this[K]^$);return Q}function z1(Q){var $=Math.floor(Q/this.DB);if($>=this.t)return this.s!=0;return(this[$]&1<<Q%this.DB)!=0}function N1(Q,$){var K=Y.ONE.shiftLeft(Q);return this.bitwiseTo(K,$,K),K}function O1(Q){return this.changeBit(Q,yw)}function V1(Q){return this.changeBit(Q,w9)}function E1(Q){return this.changeBit(Q,ew)}function H1(Q,$){var K=0,W=0,G=Math.min(Q.t,this.t);while(K<G)W+=this[K]+Q[K],$[K++]=W&this.DM,W>>=this.DB;if(Q.t<this.t){W+=Q.s;while(K<this.t)W+=this[K],$[K++]=W&this.DM,W>>=this.DB;W+=this.s}else{W+=this.s;while(K<Q.t)W+=Q[K],$[K++]=W&this.DM,W>>=this.DB;W+=Q.s}if($.s=W<0?-1:0,W>0)$[K++]=W;else if(W<-1)$[K++]=this.DV+W;$.t=K,$.clamp()}function P1(Q){var $=Z();return this.addTo(Q,$),$}function D1(Q){var $=Z();return this.subTo(Q,$),$}function M1(Q){var $=Z();return this.multiplyTo(Q,$),$}function T1(){var Q=Z();return this.squareTo(Q),Q}function L1(Q){var $=Z();return this.divRemTo(Q,$,null),$}function A1(Q){var $=Z();return this.divRemTo(Q,null,$),$}function C1(Q){var $=Z(),K=Z();return this.divRemTo(Q,$,K),new Array($,K)}function R1(Q){this[this.t]=this.am(0,Q-1,this,0,0,this.t),++this.t,this.clamp()}function j1(Q,$){if(Q==0)return;while(this.t<=$)this[this.t++]=0;this[$]+=Q;while(this[$]>=this.DV){if(this[$]-=this.DV,++$>=this.t)this[this.t++]=0;++this[$]}}function Ow(){}function J9(Q){return Q}function B1(Q,$,K){Q.multiplyTo($,K)}function I1(Q,$){Q.squareTo($)}Ow.prototype.convert=J9,Ow.prototype.revert=J9,Ow.prototype.mulTo=B1,Ow.prototype.sqrTo=I1;function y1(Q){return this.exp(Q,new Ow)}function v1(Q,$,K){var W=Math.min(this.t+Q.t,$);K.s=0,K.t=W;while(W>0)K[--W]=0;var G;for(G=K.t-this.t;W<G;++W)K[W+this.t]=this.am(0,Q[W],K,W,0,this.t);for(G=Math.min(Q.t,$);W<G;++W)this.am(0,Q[W],K,W,0,$-W);K.clamp()}function S1(Q,$,K){--$;var W=K.t=this.t+Q.t-$;K.s=0;while(--W>=0)K[W]=0;for(W=Math.max($-this.t,0);W<Q.t;++W)K[this.t+W-$]=this.am($-W,Q[W],K,0,0,this.t+W-$);K.clamp(),K.drShiftTo(1,K)}function Xw(Q){this.r2=Z(),this.q3=Z(),Y.ONE.dlShiftTo(2*Q.t,this.r2),this.mu=this.r2.divide(Q),this.m=Q}function k1(Q){if(Q.s<0||Q.t>2*this.m.t)return Q.mod(this.m);else if(Q.compareTo(this.m)<0)return Q;else{var $=Z();return Q.copyTo($),this.reduce($),$}}function b1(Q){return Q}function x1(Q){if(Q.drShiftTo(this.m.t-1,this.r2),Q.t>this.m.t+1)Q.t=this.m.t+1,Q.clamp();this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(Q.compareTo(this.r2)<0)Q.dAddOffset(1,this.m.t+1);Q.subTo(this.r2,Q);while(Q.compareTo(this.m)>=0)Q.subTo(this.m,Q)}function m1(Q,$){Q.squareTo($),this.reduce($)}function c1(Q,$,K){Q.multiplyTo($,K),this.reduce(K)}Xw.prototype.convert=k1,Xw.prototype.revert=b1,Xw.prototype.reduce=x1,Xw.prototype.mulTo=c1,Xw.prototype.sqrTo=m1;function _1(Q,$){var K=Q.bitLength(),W,G=l(1),F;if(K<=0)return G;else if(K<18)W=1;else if(K<48)W=3;else if(K<144)W=4;else if(K<768)W=5;else W=6;if(K<8)F=new $w($);else if($.isEven())F=new Xw($);else F=new Yw($);var N=new Array,O=3,C=W-1,B=(1<<W)-1;if(N[1]=F.convert(this),W>1){var f=Z();F.sqrTo(N[1],f);while(O<=B)N[O]=Z(),F.mulTo(f,N[O-2],N[O]),O+=2}var g=Q.t-1,s,Dw=!0,p=Z(),n;K=Hw(Q[g])-1;while(g>=0){if(K>=C)s=Q[g]>>K-C&B;else if(s=(Q[g]&(1<<K+1)-1)<<C-K,g>0)s|=Q[g-1]>>this.DB+K-C;O=W;while((s&1)==0)s>>=1,--O;if((K-=O)<0)K+=this.DB,--g;if(Dw)N[s].copyTo(G),Dw=!1;else{while(O>1)F.sqrTo(G,p),F.sqrTo(p,G),O-=2;if(O>0)F.sqrTo(G,p);else n=G,G=p,p=n;F.mulTo(p,N[s],G)}while(g>=0&&(Q[g]&1<<K)==0)if(F.sqrTo(G,p),n=G,G=p,p=n,--K<0)K=this.DB-1,--g}return F.revert(G)}function g1(Q){var $=this.s<0?this.negate():this.clone(),K=Q.s<0?Q.negate():Q.clone();if($.compareTo(K)<0){var W=$;$=K,K=W}var G=$.getLowestSetBit(),F=K.getLowestSetBit();if(F<0)return $;if(G<F)F=G;if(F>0)$.rShiftTo(F,$),K.rShiftTo(F,K);while($.signum()>0){if((G=$.getLowestSetBit())>0)$.rShiftTo(G,$);if((G=K.getLowestSetBit())>0)K.rShiftTo(G,K);if($.compareTo(K)>=0)$.subTo(K,$),$.rShiftTo(1,$);else K.subTo($,K),K.rShiftTo(1,K)}if(F>0)K.lShiftTo(F,K);return K}function u1(Q){if(Q<=0)return 0;var $=this.DV%Q,K=this.s<0?Q-1:0;if(this.t>0)if($==0)K=this[0]%Q;else for(var W=this.t-1;W>=0;--W)K=($*K+this[W])%Q;return K}function l1(Q){var $=Q.isEven();if(this.isEven()&&$||Q.signum()==0)return Y.ZERO;var K=Q.clone(),W=this.clone(),G=l(1),F=l(0),N=l(0),O=l(1);while(K.signum()!=0){while(K.isEven()){if(K.rShiftTo(1,K),$){if(!G.isEven()||!F.isEven())G.addTo(this,G),F.subTo(Q,F);G.rShiftTo(1,G)}else if(!F.isEven())F.subTo(Q,F);F.rShiftTo(1,F)}while(W.isEven()){if(W.rShiftTo(1,W),$){if(!N.isEven()||!O.isEven())N.addTo(this,N),O.subTo(Q,O);N.rShiftTo(1,N)}else if(!O.isEven())O.subTo(Q,O);O.rShiftTo(1,O)}if(K.compareTo(W)>=0){if(K.subTo(W,K),$)G.subTo(N,G);F.subTo(O,F)}else{if(W.subTo(K,W),$)N.subTo(G,N);O.subTo(F,O)}}if(W.compareTo(Y.ONE)!=0)return Y.ZERO;if(O.compareTo(Q)>=0)return O.subtract(Q);if(O.signum()<0)O.addTo(Q,O);else return O;if(O.signum()<0)return O.add(Q);else return O}var k=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],f1=67108864/k[k.length-1];function d1(Q){var $,K=this.abs();if(K.t==1&&K[0]<=k[k.length-1]){for($=0;$<k.length;++$)if(K[0]==k[$])return!0;return!1}if(K.isEven())return!1;$=1;while($<k.length){var W=k[$],G=$+1;while(G<k.length&&W<f1)W*=k[G++];W=K.modInt(W);while($<G)if(W%k[$++]==0)return!1}return K.millerRabin(Q)}function i1(Q){var $=this.subtract(Y.ONE),K=$.getLowestSetBit();if(K<=0)return!1;var W=$.shiftRight(K);if(Q=Q+1>>1,Q>k.length)Q=k.length;var G=Z();for(var F=0;F<Q;++F){G.fromInt(k[Math.floor(Math.random()*k.length)]);var N=G.modPow(W,this);if(N.compareTo(Y.ONE)!=0&&N.compareTo($)!=0){var O=1;while(O++<K&&N.compareTo($)!=0)if(N=N.modPowInt(2,this),N.compareTo(Y.ONE)==0)return!1;if(N.compareTo($)!=0)return!1}}return!0}Y.prototype.chunkSize=p0,Y.prototype.toRadix=a0,Y.prototype.fromRadix=o0,Y.prototype.fromNumber=r0,Y.prototype.bitwiseTo=J1,Y.prototype.changeBit=N1,Y.prototype.addTo=H1,Y.prototype.dMultiply=R1,Y.prototype.dAddOffset=j1,Y.prototype.multiplyLowerTo=v1,Y.prototype.multiplyUpperTo=S1,Y.prototype.modInt=u1,Y.prototype.millerRabin=i1,Y.prototype.clone=l0,Y.prototype.intValue=f0,Y.prototype.byteValue=d0,Y.prototype.shortValue=i0,Y.prototype.signum=n0,Y.prototype.toByteArray=s0,Y.prototype.equals=t0,Y.prototype.min=e0,Y.prototype.max=w1,Y.prototype.and=$1,Y.prototype.or=Y1,Y.prototype.xor=X1,Y.prototype.andNot=K1,Y.prototype.not=Z1,Y.prototype.shiftLeft=W1,Y.prototype.shiftRight=h1,Y.prototype.getLowestSetBit=q1,Y.prototype.bitCount=U1,Y.prototype.testBit=z1,Y.prototype.setBit=O1,Y.prototype.clearBit=V1,Y.prototype.flipBit=E1,Y.prototype.add=P1,Y.prototype.subtract=D1,Y.prototype.multiply=M1,Y.prototype.divide=L1,Y.prototype.remainder=A1,Y.prototype.divideAndRemainder=C1,Y.prototype.modPow=_1,Y.prototype.modInverse=l1,Y.prototype.pow=y1,Y.prototype.gcd=g1,Y.prototype.isProbablePrime=d1,Y.prototype.square=T1,Y.prototype.Barrett=Xw;var Pw,_,j;function p1(Q){if(_[j++]^=Q&255,_[j++]^=Q>>8&255,_[j++]^=Q>>16&255,_[j++]^=Q>>24&255,j>=kw)j-=kw}function Q9(){p1(new Date().getTime())}if(_==null){_=new Array,j=0;var i;if(typeof window!=="undefined"&&window.crypto){if(window.crypto.getRandomValues){var $9=new Uint8Array(32);window.crypto.getRandomValues($9);for(i=0;i<32;++i)_[j++]=$9[i]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var Y9=window.crypto.random(32);for(i=0;i<Y9.length;++i)_[j++]=Y9.charCodeAt(i)&255}}while(j<kw)i=Math.floor(65536*Math.random()),_[j++]=i>>>8,_[j++]=i&255;j=0,Q9()}function n1(){if(Pw==null){Q9(),Pw=s1(),Pw.init(_);for(j=0;j<_.length;++j)_[j]=0;j=0}return Pw.next()}function a1(Q){var $;for($=0;$<Q.length;++$)Q[$]=n1()}function vw(){}vw.prototype.nextBytes=a1;function Sw(){this.i=0,this.j=0,this.S=new Array}function o1(Q){var $,K,W;for($=0;$<256;++$)this.S[$]=$;K=0;for($=0;$<256;++$)K=K+this.S[$]+Q[$%Q.length]&255,W=this.S[$],this.S[$]=this.S[K],this.S[K]=W;this.i=0,this.j=0}function r1(){var Q;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,Q=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=Q,this.S[Q+this.S[this.i]&255]}Sw.prototype.init=o1,Sw.prototype.next=r1;function s1(){return new Sw}var kw=256;if(typeof Lw!=="undefined")Lw=v9.exports={default:Y,BigInteger:Y,SecureRandom:vw};else this.jsbn={BigInteger:Y,SecureRandom:vw}}).call(Lw)});var Vw=R((S9)=>{(function(){var w={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function J(z){return Y(h(z),arguments)}function X(z,V){return J.apply(null,[z].concat(V||[]))}function Y(z,V){var E=1,L=z.length,q,T="",D,M,H,Qw,zw,Nw,l,e;for(D=0;D<L;D++)if(typeof z[D]==="string")T+=z[D];else if(typeof z[D]==="object"){if(H=z[D],H.keys){q=V[E];for(M=0;M<H.keys.length;M++){if(q==null)throw new Error(J('[sprintf] Cannot access property "%s" of undefined value "%s"',H.keys[M],H.keys[M-1]));q=q[H.keys[M]]}}else if(H.param_no)q=V[H.param_no];else q=V[E++];if(w.not_type.test(H.type)&&w.not_primitive.test(H.type)&&q instanceof Function)q=q();if(w.numeric_arg.test(H.type)&&(typeof q!=="number"&&isNaN(q)))throw new TypeError(J("[sprintf] expecting number but found %T",q));if(w.number.test(H.type))l=q>=0;switch(H.type){case"b":q=parseInt(q,10).toString(2);break;case"c":q=String.fromCharCode(parseInt(q,10));break;case"d":case"i":q=parseInt(q,10);break;case"j":q=JSON.stringify(q,null,H.width?parseInt(H.width):0);break;case"e":q=H.precision?parseFloat(q).toExponential(H.precision):parseFloat(q).toExponential();break;case"f":q=H.precision?parseFloat(q).toFixed(H.precision):parseFloat(q);break;case"g":q=H.precision?String(Number(q.toPrecision(H.precision))):parseFloat(q);break;case"o":q=(parseInt(q,10)>>>0).toString(8);break;case"s":q=String(q),q=H.precision?q.substring(0,H.precision):q;break;case"t":q=String(!!q),q=H.precision?q.substring(0,H.precision):q;break;case"T":q=Object.prototype.toString.call(q).slice(8,-1).toLowerCase(),q=H.precision?q.substring(0,H.precision):q;break;case"u":q=parseInt(q,10)>>>0;break;case"v":q=q.valueOf(),q=H.precision?q.substring(0,H.precision):q;break;case"x":q=(parseInt(q,10)>>>0).toString(16);break;case"X":q=(parseInt(q,10)>>>0).toString(16).toUpperCase();break}if(w.json.test(H.type))T+=q;else{if(w.number.test(H.type)&&(!l||H.sign))e=l?"+":"-",q=q.toString().replace(w.sign,"");else e="";zw=H.pad_char?H.pad_char==="0"?"0":H.pad_char.charAt(1):" ",Nw=H.width-(e+q).length,Qw=H.width?Nw>0?zw.repeat(Nw):"":"",T+=H.align?e+q+Qw:zw==="0"?e+Qw+q:Qw+e+q}}return T}var Z=Object.create(null);function h(z){if(Z[z])return Z[z];var V=z,E,L=[],q=0;while(V){if((E=w.text.exec(V))!==null)L.push(E[0]);else if((E=w.modulo.exec(V))!==null)L.push("%");else if((E=w.placeholder.exec(V))!==null){if(E[2]){q|=1;var T=[],D=E[2],M=[];if((M=w.key.exec(D))!==null){T.push(M[1]);while((D=D.substring(M[0].length))!=="")if((M=w.key_access.exec(D))!==null)T.push(M[1]);else if((M=w.index_access.exec(D))!==null)T.push(M[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key")}else throw new SyntaxError("[sprintf] failed to parse named argument key");E[2]=T}else q|=2;if(q===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");L.push({placeholder:E[0],param_no:E[1],keys:E[2],sign:E[3],pad_char:E[4],align:E[5],width:E[6],precision:E[7],type:E[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");V=V.substring(E[0].length)}return Z[z]=L}if(typeof S9!=="undefined")S9.sprintf=J,S9.vsprintf=X;if(typeof window!=="undefined"){if(window.sprintf=J,window.vsprintf=X,typeof define==="function"&&define.amd)define(function(){return{sprintf:J,vsprintf:X}})}})()});var lw=R((o)=>{var f8=o&&o.__createBinding||(Object.create?function(w,J,X,Y){if(Y===void 0)Y=X;var Z=Object.getOwnPropertyDescriptor(J,X);if(!Z||("get"in Z?!J.__esModule:Z.writable||Z.configurable))Z={enumerable:!0,get:function(){return J[X]}};Object.defineProperty(w,Y,Z)}:function(w,J,X,Y){if(Y===void 0)Y=X;w[Y]=J[X]}),d8=o&&o.__setModuleDefault||(Object.create?function(w,J){Object.defineProperty(w,"default",{enumerable:!0,value:J})}:function(w,J){w.default=J}),x9=o&&o.__importStar||function(w){if(w&&w.__esModule)return w;var J={};if(w!=null){for(var X in w)if(X!=="default"&&Object.prototype.hasOwnProperty.call(w,X))f8(J,w,X)}return d8(J,w),J};Object.defineProperty(o,"__esModule",{value:!0});o.Address4=void 0;var k9=x9(_w()),a=x9(gw()),b9=Tw(),Ew=uw(),Gw=Vw();class d{constructor(w){this.groups=a.GROUPS,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=k9.isCorrect(a.BITS),this.isInSubnet=k9.isInSubnet,this.address=w;const J=a.RE_SUBNET_STRING.exec(w);if(J){if(this.parsedSubnet=J[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,this.subnetMask<0||this.subnetMask>a.BITS)throw new b9.AddressError("Invalid subnet mask.");w=w.replace(a.RE_SUBNET_STRING,"")}this.addressMinusSuffix=w,this.parsedAddress=this.parse(w)}static isValid(w){try{return new d(w),!0}catch(J){return!1}}parse(w){const J=w.split(".");if(!w.match(a.RE_ADDRESS))throw new b9.AddressError("Invalid IPv4 address.");return J}correctForm(){return this.parsedAddress.map((w)=>parseInt(w,10)).join(".")}static fromHex(w){const J=w.replace(/:/g,"").padStart(8,"0"),X=[];let Y;for(Y=0;Y<8;Y+=2){const Z=J.slice(Y,Y+2);X.push(parseInt(Z,16))}return new d(X.join("."))}static fromInteger(w){return d.fromHex(w.toString(16))}static fromArpa(w){const X=w.replace(/(\.in-addr\.arpa)?\.$/,"").split(".").reverse().join(".");return new d(X)}toHex(){return this.parsedAddress.map((w)=>Gw.sprintf("%02x",parseInt(w,10))).join(":")}toArray(){return this.parsedAddress.map((w)=>parseInt(w,10))}toGroup6(){const w=[];let J;for(J=0;J<a.GROUPS;J+=2){const X=Gw.sprintf("%02x%02x",parseInt(this.parsedAddress[J],10),parseInt(this.parsedAddress[J+1],10));w.push(Gw.sprintf("%x",parseInt(X,16)))}return w.join(":")}bigInteger(){return new Ew.BigInteger(this.parsedAddress.map((w)=>Gw.sprintf("%02x",parseInt(w,10))).join(""),16)}_startAddress(){return new Ew.BigInteger(this.mask()+"0".repeat(a.BITS-this.subnetMask),2)}startAddress(){return d.fromBigInteger(this._startAddress())}startAddressExclusive(){const w=new Ew.BigInteger("1");return d.fromBigInteger(this._startAddress().add(w))}_endAddress(){return new Ew.BigInteger(this.mask()+"1".repeat(a.BITS-this.subnetMask),2)}endAddress(){return d.fromBigInteger(this._endAddress())}endAddressExclusive(){const w=new Ew.BigInteger("1");return d.fromBigInteger(this._endAddress().subtract(w))}static fromBigInteger(w){return d.fromInteger(parseInt(w.toString(),10))}mask(w){if(w===void 0)w=this.subnetMask;return this.getBitsBase2(0,w)}getBitsBase2(w,J){return this.binaryZeroPad().slice(w,J)}reverseForm(w){if(!w)w={};const J=this.correctForm().split(".").reverse().join(".");if(w.omitSuffix)return J;return Gw.sprintf("%s.in-addr.arpa.",J)}isMulticast(){return this.isInSubnet(new d("224.0.0.0/4"))}binaryZeroPad(){return this.bigInteger().toString(2).padStart(a.BITS,"0")}groupForV6(){const w=this.parsedAddress;return this.address.replace(a.RE_ADDRESS,Gw.sprintf('<span class="hover-group group-v4 group-6">%s</span>.<span class="hover-group group-v4 group-7">%s</span>',w.slice(0,2).join("."),w.slice(2,4).join(".")))}}o.Address4=d});var fw=R((m9)=>{Object.defineProperty(m9,"__esModule",{value:!0});m9.RE_URL_WITH_PORT=m9.RE_URL=m9.RE_ZONE_STRING=m9.RE_SUBNET_STRING=m9.RE_BAD_ADDRESS=m9.RE_BAD_CHARACTERS=m9.TYPES=m9.SCOPES=m9.GROUPS=m9.BITS=void 0;m9.BITS=128;m9.GROUPS=8;m9.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"};m9.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"};m9.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi;m9.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi;m9.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/;m9.RE_ZONE_STRING=/%.*$/;m9.RE_URL=new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/);m9.RE_URL_WITH_PORT=new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/)});var dw=R((l9)=>{function g9(w){return w.replace(/(0+)/g,'<span class="zero">$1</span>')}function wJ(w,J=0){return w.split("").map((Y,Z)=>_9.sprintf('<span class="digit value-%s position-%d">%s</span>',Y,Z+J,g9(Y))).join("")}function u9(w){return w.replace(/^(0+)/,'<span class="zero">$1</span>')}function JJ(w){return w.split(":").map((X)=>u9(X)).join(":")}function QJ(w,J=0){return w.split(":").map((Y,Z)=>{if(/group-v4/.test(Y))return Y;return _9.sprintf('<span class="hover-group group-%d">%s</span>',Z+J,u9(Y))})}Object.defineProperty(l9,"__esModule",{value:!0});l9.simpleGroup=l9.spanLeadingZeroes=l9.spanAll=l9.spanAllZeroes=void 0;var _9=Vw();l9.spanAllZeroes=g9;l9.spanAll=wJ;l9.spanLeadingZeroes=JJ;l9.simpleGroup=QJ});var d9=R((I)=>{function Cw(w){return qw.sprintf("(%s)",w.join("|"))}function Aw(w){if(w.length<4)return qw.sprintf("0{0,%d}%s",4-w.length,w);return w}function GJ(w){const J=[];w.forEach((Y,Z)=>{if(parseInt(Y,16)===0)J.push(Z)});const X=J.map((Y)=>w.map((Z,h)=>{if(h===Y){const z=h===0||h===hJ.GROUPS-1?":":"";return Cw([Aw(Z),z])}return Aw(Z)}).join(":"));return X.push(w.map(Aw).join(":")),Cw(X)}function qJ(w,J,X){const Y=J?"":":",Z=X?"":":",h=[];if(!J&&!X)h.push("::");if(J&&X)h.push("");if(X&&!J||!X&&J)h.push(":");h.push(qw.sprintf("%s(:0{1,4}){1,%d}",Y,w-1)),h.push(qw.sprintf("(0{1,4}:){1,%d}%s",w-1,Z)),h.push(qw.sprintf("(0{1,4}:){%d}0{1,4}",w-1));for(let z=1;z<w-1;z++)for(let V=1;V<w-z;V++)h.push(qw.sprintf("(0{1,4}:){%d}:(0{1,4}:){%d}0{1,4}",V,w-V-z-1));return Cw(h)}var KJ=I&&I.__createBinding||(Object.create?function(w,J,X,Y){if(Y===void 0)Y=X;var Z=Object.getOwnPropertyDescriptor(J,X);if(!Z||("get"in Z?!J.__esModule:Z.writable||Z.configurable))Z={enumerable:!0,get:function(){return J[X]}};Object.defineProperty(w,Y,Z)}:function(w,J,X,Y){if(Y===void 0)Y=X;w[Y]=J[X]}),ZJ=I&&I.__setModuleDefault||(Object.create?function(w,J){Object.defineProperty(w,"default",{enumerable:!0,value:J})}:function(w,J){w.default=J}),WJ=I&&I.__importStar||function(w){if(w&&w.__esModule)return w;var J={};if(w!=null){for(var X in w)if(X!=="default"&&Object.prototype.hasOwnProperty.call(w,X))KJ(J,w,X)}return ZJ(J,w),J};Object.defineProperty(I,"__esModule",{value:!0});I.possibleElisions=I.simpleRegularExpression=I.ADDRESS_BOUNDARY=I.padGroup=I.groupPossibilities=void 0;var hJ=WJ(fw()),qw=Vw();I.groupPossibilities=Cw;I.padGroup=Aw;I.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]";I.simpleRegularExpression=GJ;I.possibleElisions=qJ});var a9=R((r)=>{function Rw(w){if(!w)throw new Error("Assertion failed.")}function zJ(w){const J=/(\d+)(\d{3})/;while(J.test(w))w=w.replace(J,"$1,$2");return w}function NJ(w){return w=w.replace(/^(0{1,})([1-9]+)$/,'<span class="parse-error">$1</span>$2'),w=w.replace(/^(0{1,})(0)$/,'<span class="parse-error">$1</span>$2'),w}function OJ(w,J){const X=[],Y=[];let Z;for(Z=0;Z<w.length;Z++)if(Z<J[0])X.push(w[Z]);else if(Z>J[1])Y.push(w[Z]);return X.concat(["compact"]).concat(Y)}function p9(w){return x.sprintf("%04x",parseInt(w,16))}function n9(w){return w&255}var FJ=r&&r.__createBinding||(Object.create?function(w,J,X,Y){if(Y===void 0)Y=X;var Z=Object.getOwnPropertyDescriptor(J,X);if(!Z||("get"in Z?!J.__esModule:Z.writable||Z.configurable))Z={enumerable:!0,get:function(){return J[X]}};Object.defineProperty(w,Y,Z)}:function(w,J,X,Y){if(Y===void 0)Y=X;w[Y]=J[X]}),UJ=r&&r.__setModuleDefault||(Object.create?function(w,J){Object.defineProperty(w,"default",{enumerable:!0,value:J})}:function(w,J){w.default=J}),jw=r&&r.__importStar||function(w){if(w&&w.__esModule)return w;var J={};if(w!=null){for(var X in w)if(X!=="default"&&Object.prototype.hasOwnProperty.call(w,X))FJ(J,w,X)}return UJ(J,w),J};Object.defineProperty(r,"__esModule",{value:!0});r.Address6=void 0;var i9=jw(_w()),iw=jw(gw()),A=jw(fw()),pw=jw(dw()),Zw=lw(),Ww=d9(),t=Tw(),b=uw(),x=Vw();class y{constructor(w,J){if(this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=i9.isInSubnet,this.isCorrect=i9.isCorrect(A.BITS),J===void 0)this.groups=A.GROUPS;else this.groups=J;this.address=w;const X=A.RE_SUBNET_STRING.exec(w);if(X){if(this.parsedSubnet=X[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>A.BITS)throw new t.AddressError("Invalid subnet mask.");w=w.replace(A.RE_SUBNET_STRING,"")}else if(/\//.test(w))throw new t.AddressError("Invalid subnet mask.");const Y=A.RE_ZONE_STRING.exec(w);if(Y)this.zone=Y[0],w=w.replace(A.RE_ZONE_STRING,"");this.addressMinusSuffix=w,this.parsedAddress=this.parse(this.addressMinusSuffix)}static isValid(w){try{return new y(w),!0}catch(J){return!1}}static fromBigInteger(w){const J=w.toString(16).padStart(32,"0"),X=[];let Y;for(Y=0;Y<A.GROUPS;Y++)X.push(J.slice(Y*4,(Y+1)*4));return new y(X.join(":"))}static fromURL(w){let J,X=null,Y;if(w.indexOf("[")!==-1&&w.indexOf("]:")!==-1){if(Y=A.RE_URL_WITH_PORT.exec(w),Y===null)return{error:"failed to parse address with port",address:null,port:null};J=Y[1],X=Y[2]}else if(w.indexOf("/")!==-1){if(w=w.replace(/^[a-z0-9]+:\/\//,""),Y=A.RE_URL.exec(w),Y===null)return{error:"failed to parse address from URL",address:null,port:null};J=Y[1]}else J=w;if(X){if(X=parseInt(X,10),X<0||X>65536)X=null}else X=null;return{address:new y(J),port:X}}static fromAddress4(w){const J=new Zw.Address4(w),X=A.BITS-(iw.BITS-J.subnetMask);return new y(`::ffff:${J.correctForm()}/${X}`)}static fromArpa(w){let J=w.replace(/(\.ip6\.arpa)?\.$/,"");const X=7;if(J.length!==63)throw new t.AddressError("Invalid 'ip6.arpa' form.");const Y=J.split(".").reverse();for(let Z=X;Z>0;Z--){const h=Z*4;Y.splice(h,0,":")}return J=Y.join(""),new y(J)}microsoftTranscription(){return x.sprintf("%s.ipv6-literal.net",this.correctForm().replace(/:/g,"-"))}mask(w=this.subnetMask){return this.getBitsBase2(0,w)}possibleSubnets(w=128){const J=A.BITS-this.subnetMask,X=Math.abs(w-A.BITS),Y=J-X;if(Y<0)return"0";return zJ(new b.BigInteger("2",10).pow(Y).toString(10))}_startAddress(){return new b.BigInteger(this.mask()+"0".repeat(A.BITS-this.subnetMask),2)}startAddress(){return y.fromBigInteger(this._startAddress())}startAddressExclusive(){const w=new b.BigInteger("1");return y.fromBigInteger(this._startAddress().add(w))}_endAddress(){return new b.BigInteger(this.mask()+"1".repeat(A.BITS-this.subnetMask),2)}endAddress(){return y.fromBigInteger(this._endAddress())}endAddressExclusive(){const w=new b.BigInteger("1");return y.fromBigInteger(this._endAddress().subtract(w))}getScope(){let w=A.SCOPES[this.getBits(12,16).intValue()];if(this.getType()==="Global unicast"&&w!=="Link local")w="Global";return w||"Unknown"}getType(){for(let w of Object.keys(A.TYPES))if(this.isInSubnet(new y(w)))return A.TYPES[w];return"Global unicast"}getBits(w,J){return new b.BigInteger(this.getBitsBase2(w,J),2)}getBitsBase2(w,J){return this.binaryZeroPad().slice(w,J)}getBitsBase16(w,J){const X=J-w;if(X%4!==0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(w,J).toString(16).padStart(X/4,"0")}getBitsPastSubnet(){return this.getBitsBase2(this.subnetMask,A.BITS)}reverseForm(w){if(!w)w={};const J=Math.floor(this.subnetMask/4),X=this.canonicalForm().replace(/:/g,"").split("").slice(0,J).reverse().join(".");if(J>0){if(w.omitSuffix)return X;return x.sprintf("%s.ip6.arpa.",X)}if(w.omitSuffix)return"";return"ip6.arpa."}correctForm(){let w,J=[],X=0;const Y=[];for(w=0;w<this.parsedAddress.length;w++){const z=parseInt(this.parsedAddress[w],16);if(z===0)X++;if(z!==0&&X>0){if(X>1)Y.push([w-X,w-1]);X=0}}if(X>1)Y.push([this.parsedAddress.length-X,this.parsedAddress.length-1]);const Z=Y.map((z)=>z[1]-z[0]+1);if(Y.length>0){const z=Z.indexOf(Math.max(...Z));J=OJ(this.parsedAddress,Y[z])}else J=this.parsedAddress;for(w=0;w<J.length;w++)if(J[w]!=="compact")J[w]=parseInt(J[w],16).toString(16);let h=J.join(":");return h=h.replace(/^compact$/,"::"),h=h.replace(/^compact|compact$/,":"),h=h.replace(/compact/,""),h}binaryZeroPad(){return this.bigInteger().toString(2).padStart(A.BITS,"0")}parse4in6(w){const J=w.split(":"),Y=J.slice(-1)[0].match(iw.RE_ADDRESS);if(Y){this.parsedAddress4=Y[0],this.address4=new Zw.Address4(this.parsedAddress4);for(let Z=0;Z<this.address4.groups;Z++)if(/^0[0-9]+/.test(this.address4.parsedAddress[Z]))throw new t.AddressError("IPv4 addresses can't have leading zeroes.",w.replace(iw.RE_ADDRESS,this.address4.parsedAddress.map(NJ).join(".")));this.v4=!0,J[J.length-1]=this.address4.toGroup6(),w=J.join(":")}return w}parse(w){w=this.parse4in6(w);const J=w.match(A.RE_BAD_CHARACTERS);if(J)throw new t.AddressError(x.sprintf("Bad character%s detected in address: %s",J.length>1?"s":"",J.join("")),w.replace(A.RE_BAD_CHARACTERS,'<span class="parse-error">$1</span>'));const X=w.match(A.RE_BAD_ADDRESS);if(X)throw new t.AddressError(x.sprintf("Address failed regex: %s",X.join("")),w.replace(A.RE_BAD_ADDRESS,'<span class="parse-error">$1</span>'));let Y=[];const Z=w.split("::");if(Z.length===2){let h=Z[0].split(":"),z=Z[1].split(":");if(h.length===1&&h[0]==="")h=[];if(z.length===1&&z[0]==="")z=[];const V=this.groups-(h.length+z.length);if(!V)throw new t.AddressError("Error parsing groups");this.elidedGroups=V,this.elisionBegin=h.length,this.elisionEnd=h.length+this.elidedGroups,Y=Y.concat(h);for(let E=0;E<V;E++)Y.push("0");Y=Y.concat(z)}else if(Z.length===1)Y=w.split(":"),this.elidedGroups=0;else throw new t.AddressError("Too many :: groups found");if(Y=Y.map((h)=>x.sprintf("%x",parseInt(h,16))),Y.length!==this.groups)throw new t.AddressError("Incorrect number of groups found");return Y}canonicalForm(){return this.parsedAddress.map(p9).join(":")}decimal(){return this.parsedAddress.map((w)=>x.sprintf("%05d",parseInt(w,16))).join(":")}bigInteger(){return new b.BigInteger(this.parsedAddress.map(p9).join(""),16)}to4(){const w=this.binaryZeroPad().split("");return Zw.Address4.fromHex(new b.BigInteger(w.slice(96,128).join(""),2).toString(16))}to4in6(){const w=this.to4(),X=new y(this.parsedAddress.slice(0,6).join(":"),6).correctForm();let Y="";if(!/:$/.test(X))Y=":";return X+Y+w.address}inspectTeredo(){const w=this.getBitsBase16(0,32),J=this.getBits(80,96).xor(new b.BigInteger("ffff",16)).toString(),X=Zw.Address4.fromHex(this.getBitsBase16(32,64)),Y=Zw.Address4.fromHex(this.getBits(96,128).xor(new b.BigInteger("ffffffff",16)).toString(16)),Z=this.getBits(64,80),h=this.getBitsBase2(64,80),z=Z.testBit(15),V=Z.testBit(14),E=Z.testBit(8),L=Z.testBit(9),q=new b.BigInteger(h.slice(2,6)+h.slice(8,16),2).toString(10);return{prefix:x.sprintf("%s:%s",w.slice(0,4),w.slice(4,8)),server4:X.address,client4:Y.address,flags:h,coneNat:z,microsoft:{reserved:V,universalLocal:L,groupIndividual:E,nonce:q},udpPort:J}}inspect6to4(){const w=this.getBitsBase16(0,16),J=Zw.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:x.sprintf("%s",w.slice(0,4)),gateway:J.address}}to6to4(){if(!this.is4())return null;const w=["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":");return new y(w)}toByteArray(){const w=this.bigInteger().toByteArray();if(w.length===17&&w[0]===0)return w.slice(1);return w}toUnsignedByteArray(){return this.toByteArray().map(n9)}static fromByteArray(w){return this.fromUnsignedByteArray(w.map(n9))}static fromUnsignedByteArray(w){const J=new b.BigInteger("256",10);let X=new b.BigInteger("0",10),Y=new b.BigInteger("1",10);for(let Z=w.length-1;Z>=0;Z--)X=X.add(Y.multiply(new b.BigInteger(w[Z].toString(10),10))),Y=Y.multiply(J);return y.fromBigInteger(X)}isCanonical(){return this.addressMinusSuffix===this.canonicalForm()}isLinkLocal(){if(this.getBitsBase2(0,64)==="1111111010000000000000000000000000000000000000000000000000000000")return!0;return!1}isMulticast(){return this.getType()==="Multicast"}is4(){return this.v4}isTeredo(){return this.isInSubnet(new y("2001::/32"))}is6to4(){return this.isInSubnet(new y("2002::/16"))}isLoopback(){return this.getType()==="Loopback"}href(w){if(w===void 0)w="";else w=x.sprintf(":%s",w);return x.sprintf("http://[%s]%s/",this.correctForm(),w)}link(w){if(!w)w={};if(w.className===void 0)w.className="";if(w.prefix===void 0)w.prefix="/#address=";if(w.v4===void 0)w.v4=!1;let J=this.correctForm;if(w.v4)J=this.to4in6;if(w.className)return x.sprintf('<a href="%1$s%2$s" class="%3$s">%2$s</a>',w.prefix,J.call(this),w.className);return x.sprintf('<a href="%1$s%2$s">%2$s</a>',w.prefix,J.call(this))}group(){if(this.elidedGroups===0)return pw.simpleGroup(this.address).join(":");Rw(typeof this.elidedGroups==="number"),Rw(typeof this.elisionBegin==="number");const w=[],[J,X]=this.address.split("::");if(J.length)w.push(...pw.simpleGroup(J));else w.push("");const Y=["hover-group"];for(let Z=this.elisionBegin;Z<this.elisionBegin+this.elidedGroups;Z++)Y.push(x.sprintf("group-%d",Z));if(w.push(x.sprintf('<span class="%s"></span>',Y.join(" "))),X.length)w.push(...pw.simpleGroup(X,this.elisionEnd));else w.push("");if(this.is4())Rw(this.address4 instanceof Zw.Address4),w.pop(),w.push(this.address4.groupForV6());return w.join(":")}regularExpressionString(w=!1){let J=[];const X=new y(this.correctForm());if(X.elidedGroups===0)J.push(Ww.simpleRegularExpression(X.parsedAddress));else if(X.elidedGroups===A.GROUPS)J.push(Ww.possibleElisions(A.GROUPS));else{const Y=X.address.split("::");if(Y[0].length)J.push(Ww.simpleRegularExpression(Y[0].split(":")));if(Rw(typeof X.elidedGroups==="number"),J.push(Ww.possibleElisions(X.elidedGroups,Y[0].length!==0,Y[1].length!==0)),Y[1].length)J.push(Ww.simpleRegularExpression(Y[1].split(":")));J=[J.join(":")]}if(!w)J=["(?=^|",Ww.ADDRESS_BOUNDARY,"|[^\\w\\:])(",...J,")(?=[^\\w\\:]|",Ww.ADDRESS_BOUNDARY,"|$)"];return J.join("")}regularExpression(w=!1){return new RegExp(this.regularExpressionString(w),"i")}}r.Address6=y});var nw=R((S)=>{var VJ=S&&S.__createBinding||(Object.create?function(w,J,X,Y){if(Y===void 0)Y=X;var Z=Object.getOwnPropertyDescriptor(J,X);if(!Z||("get"in Z?!J.__esModule:Z.writable||Z.configurable))Z={enumerable:!0,get:function(){return J[X]}};Object.defineProperty(w,Y,Z)}:function(w,J,X,Y){if(Y===void 0)Y=X;w[Y]=J[X]}),EJ=S&&S.__setModuleDefault||(Object.create?function(w,J){Object.defineProperty(w,"default",{enumerable:!0,value:J})}:function(w,J){w.default=J}),HJ=S&&S.__importStar||function(w){if(w&&w.__esModule)return w;var J={};if(w!=null){for(var X in w)if(X!=="default"&&Object.prototype.hasOwnProperty.call(w,X))VJ(J,w,X)}return EJ(J,w),J};Object.defineProperty(S,"__esModule",{value:!0});S.v6=S.AddressError=S.Address6=S.Address4=void 0;var PJ=lw();Object.defineProperty(S,"Address4",{enumerable:!0,get:function(){return PJ.Address4}});var DJ=a9();Object.defineProperty(S,"Address6",{enumerable:!0,get:function(){return DJ.Address6}});var MJ=Tw();Object.defineProperty(S,"AddressError",{enumerable:!0,get:function(){return MJ.AddressError}});var TJ=HJ(dw());S.v6={helpers:TJ}});var Q0=R((w0)=>{function AJ(w,J=["connect","bind","associate"]){if(!v.SocksCommand[w.command])throw new m.SocksClientError(v.ERRORS.InvalidSocksCommand,w);if(J.indexOf(w.command)===-1)throw new m.SocksClientError(v.ERRORS.InvalidSocksCommandForOperation,w);if(!s9(w.destination))throw new m.SocksClientError(v.ERRORS.InvalidSocksClientOptionsDestination,w);if(!t9(w.proxy))throw new m.SocksClientError(v.ERRORS.InvalidSocksClientOptionsProxy,w);if(r9(w.proxy,w),w.timeout&&!e9(w.timeout))throw new m.SocksClientError(v.ERRORS.InvalidSocksClientOptionsTimeout,w);if(w.existing_socket&&!(w.existing_socket instanceof LJ.Duplex))throw new m.SocksClientError(v.ERRORS.InvalidSocksClientOptionsExistingSocket,w)}function CJ(w){if(w.command!=="connect")throw new m.SocksClientError(v.ERRORS.InvalidSocksCommandChain,w);if(!s9(w.destination))throw new m.SocksClientError(v.ERRORS.InvalidSocksClientOptionsDestination,w);if(!(w.proxies&&Array.isArray(w.proxies)&&w.proxies.length>=2))throw new m.SocksClientError(v.ERRORS.InvalidSocksClientOptionsProxiesLength,w);if(w.proxies.forEach((J)=>{if(!t9(J))throw new m.SocksClientError(v.ERRORS.InvalidSocksClientOptionsProxy,w);r9(J,w)}),w.timeout&&!e9(w.timeout))throw new m.SocksClientError(v.ERRORS.InvalidSocksClientOptionsTimeout,w)}function r9(w,J){if(w.custom_auth_method!==void 0){if(w.custom_auth_method<v.SOCKS5_CUSTOM_AUTH_START||w.custom_auth_method>v.SOCKS5_CUSTOM_AUTH_END)throw new m.SocksClientError(v.ERRORS.InvalidSocksClientOptionsCustomAuthRange,J);if(w.custom_auth_request_handler===void 0||typeof w.custom_auth_request_handler!=="function")throw new m.SocksClientError(v.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,J);if(w.custom_auth_response_size===void 0)throw new m.SocksClientError(v.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,J);if(w.custom_auth_response_handler===void 0||typeof w.custom_auth_response_handler!=="function")throw new m.SocksClientError(v.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,J)}}function s9(w){return w&&typeof w.host==="string"&&typeof w.port==="number"&&w.port>=0&&w.port<=65535}function t9(w){return w&&(typeof w.host==="string"||typeof w.ipaddress==="string")&&typeof w.port==="number"&&w.port>=0&&w.port<=65535&&(w.type===4||w.type===5)}function e9(w){return typeof w==="number"&&w>0}function RJ(w){return new aw.Address4(w).toArray().reduce((X,Y)=>(X<<8)+Y,0)}function jJ(w){const J=w>>>24&255,X=w>>>16&255,Y=w>>>8&255,Z=w&255;return[J,X,Y,Z].join(".")}function BJ(w){if(o9.isIPv4(w)){const J=new aw.Address4(w);return Buffer.from(J.toArray())}else if(o9.isIPv6(w)){const J=new aw.Address6(w);return Buffer.from(J.canonicalForm().split(":").map((X)=>X.padStart(4,"0")).join(""),"hex")}else throw new Error("Invalid IP address format")}Object.defineProperty(w0,"__esModule",{value:!0});w0.ipToBuffer=w0.int32ToIpv4=w0.ipv4ToInt32=w0.validateSocksClientChainOptions=w0.validateSocksClientOptions=void 0;var m=cw(),v=mw(),LJ=import.meta.require("stream"),aw=nw(),o9=import.meta.require("net");w0.validateSocksClientOptions=AJ;w0.validateSocksClientChainOptions=CJ;w0.ipv4ToInt32=RJ;w0.int32ToIpv4=jJ;w0.ipToBuffer=BJ});var K0=R((Y0)=>{Object.defineProperty(Y0,"__esModule",{value:!0});Y0.ReceiveBuffer=void 0;class $0{constructor(w=4096){this.buffer=Buffer.allocUnsafe(w),this.offset=0,this.originalSize=w}get length(){return this.offset}append(w){if(!Buffer.isBuffer(w))throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");if(this.offset+w.length>=this.buffer.length){const J=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+w.length)),J.copy(this.buffer)}return w.copy(this.buffer,this.offset),this.offset+=w.length}peek(w){if(w>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");return this.buffer.slice(0,w)}get(w){if(w>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");const J=Buffer.allocUnsafe(w);return this.buffer.slice(0,w).copy(J),this.buffer.copyWithin(0,w,w+this.offset-w),this.offset-=w,J}}Y0.ReceiveBuffer=$0});var Z0=R((Jw)=>{var Fw=Jw&&Jw.__awaiter||function(w,J,X,Y){function Z(h){return h instanceof X?h:new X(function(z){z(h)})}return new(X||(X=Promise))(function(h,z){function V(q){try{L(Y.next(q))}catch(T){z(T)}}function E(q){try{L(Y.throw(q))}catch(T){z(T)}}function L(q){q.done?h(q.value):Z(q.value).then(V,E)}L((Y=Y.apply(w,J||[])).next())})};Object.defineProperty(Jw,"__esModule",{value:!0});Jw.SocksClientError=Jw.SocksClient=void 0;var kJ=import.meta.require("events"),Uw=import.meta.require("net"),c=U9(),U=mw(),u=Q0(),bJ=K0(),rw=cw();Object.defineProperty(Jw,"SocksClientError",{enumerable:!0,get:function(){return rw.SocksClientError}});var ow=nw();class Bw extends kJ.EventEmitter{constructor(w){super();this.options=Object.assign({},w),u.validateSocksClientOptions(w),this.setState(U.SocksClientState.Created)}static createConnection(w,J){return new Promise((X,Y)=>{try{u.validateSocksClientOptions(w,["connect"])}catch(h){if(typeof J==="function")return J(h),X(h);else return Y(h)}const Z=new Bw(w);Z.connect(w.existing_socket),Z.once("established",(h)=>{if(Z.removeAllListeners(),typeof J==="function")J(null,h),X(h);else X(h)}),Z.once("error",(h)=>{if(Z.removeAllListeners(),typeof J==="function")J(h),X(h);else Y(h)})})}static createConnectionChain(w,J){return new Promise((X,Y)=>Fw(this,void 0,void 0,function*(){try{u.validateSocksClientChainOptions(w)}catch(Z){if(typeof J==="function")return J(Z),X(Z);else return Y(Z)}if(w.randomizeChain)rw.shuffleArray(w.proxies);try{let Z;for(let h=0;h<w.proxies.length;h++){const z=w.proxies[h],V=h===w.proxies.length-1?w.destination:{host:w.proxies[h+1].host||w.proxies[h+1].ipaddress,port:w.proxies[h+1].port},E=yield Bw.createConnection({command:"connect",proxy:z,destination:V,existing_socket:Z});Z=Z||E.socket}if(typeof J==="function")J(null,{socket:Z}),X({socket:Z});else X({socket:Z})}catch(Z){if(typeof J==="function")J(Z),X(Z);else Y(Z)}}))}static createUDPFrame(w){const J=new c.SmartBuffer;if(J.writeUInt16BE(0),J.writeUInt8(w.frameNumber||0),Uw.isIPv4(w.remoteHost.host))J.writeUInt8(U.Socks5HostType.IPv4),J.writeUInt32BE(u.ipv4ToInt32(w.remoteHost.host));else if(Uw.isIPv6(w.remoteHost.host))J.writeUInt8(U.Socks5HostType.IPv6),J.writeBuffer(u.ipToBuffer(w.remoteHost.host));else J.writeUInt8(U.Socks5HostType.Hostname),J.writeUInt8(Buffer.byteLength(w.remoteHost.host)),J.writeString(w.remoteHost.host);return J.writeUInt16BE(w.remoteHost.port),J.writeBuffer(w.data),J.toBuffer()}static parseUDPFrame(w){const J=c.SmartBuffer.fromBuffer(w);J.readOffset=2;const X=J.readUInt8(),Y=J.readUInt8();let Z;if(Y===U.Socks5HostType.IPv4)Z=u.int32ToIpv4(J.readUInt32BE());else if(Y===U.Socks5HostType.IPv6)Z=ow.Address6.fromByteArray(Array.from(J.readBuffer(16))).canonicalForm();else Z=J.readString(J.readUInt8());const h=J.readUInt16BE();return{frameNumber:X,remoteHost:{host:Z,port:h},data:J.readBuffer()}}setState(w){if(this.state!==U.SocksClientState.Error)this.state=w}connect(w){this.onDataReceived=(X)=>this.onDataReceivedHandler(X),this.onClose=()=>this.onCloseHandler(),this.onError=(X)=>this.onErrorHandler(X),this.onConnect=()=>this.onConnectHandler();const J=setTimeout(()=>this.onEstablishedTimeout(),this.options.timeout||U.DEFAULT_TIMEOUT);if(J.unref&&typeof J.unref==="function")J.unref();if(w)this.socket=w;else this.socket=new Uw.Socket;if(this.socket.once("close",this.onClose),this.socket.once("error",this.onError),this.socket.once("connect",this.onConnect),this.socket.on("data",this.onDataReceived),this.setState(U.SocksClientState.Connecting),this.receiveBuffer=new bJ.ReceiveBuffer,w)this.socket.emit("connect");else if(this.socket.connect(this.getSocketOptions()),this.options.set_tcp_nodelay!==void 0&&this.options.set_tcp_nodelay!==null)this.socket.setNoDelay(!!this.options.set_tcp_nodelay);this.prependOnceListener("established",(X)=>{setImmediate(()=>{if(this.receiveBuffer.length>0){const Y=this.receiveBuffer.get(this.receiveBuffer.length);X.socket.emit("data",Y)}X.socket.resume()})})}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){if(this.state!==U.SocksClientState.Established&&this.state!==U.SocksClientState.BoundWaitingForConnection)this.closeSocket(U.ERRORS.ProxyConnectionTimedOut)}onConnectHandler(){if(this.setState(U.SocksClientState.Connected),this.options.proxy.type===4)this.sendSocks4InitialHandshake();else this.sendSocks5InitialHandshake();this.setState(U.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(w){this.receiveBuffer.append(w),this.processData()}processData(){while(this.state!==U.SocksClientState.Established&&this.state!==U.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize)if(this.state===U.SocksClientState.SentInitialHandshake)if(this.options.proxy.type===4)this.handleSocks4FinalHandshakeResponse();else this.handleInitialSocks5HandshakeResponse();else if(this.state===U.SocksClientState.SentAuthentication)this.handleInitialSocks5AuthenticationHandshakeResponse();else if(this.state===U.SocksClientState.SentFinalHandshake)this.handleSocks5FinalHandshakeResponse();else if(this.state===U.SocksClientState.BoundWaitingForConnection)if(this.options.proxy.type===4)this.handleSocks4IncomingConnectionResponse();else this.handleSocks5IncomingConnectionResponse();else{this.closeSocket(U.ERRORS.InternalError);break}}onCloseHandler(){this.closeSocket(U.ERRORS.SocketClosed)}onErrorHandler(w){this.closeSocket(w.message)}removeInternalSocketHandlers(){this.socket.pause(),this.socket.removeListener("data",this.onDataReceived),this.socket.removeListener("close",this.onClose),this.socket.removeListener("error",this.onError),this.socket.removeListener("connect",this.onConnect)}closeSocket(w){if(this.state!==U.SocksClientState.Error)this.setState(U.SocksClientState.Error),this.socket.destroy(),this.removeInternalSocketHandlers(),this.emit("error",new rw.SocksClientError(w,this.options))}sendSocks4InitialHandshake(){const w=this.options.proxy.userId||"",J=new c.SmartBuffer;if(J.writeUInt8(4),J.writeUInt8(U.SocksCommand[this.options.command]),J.writeUInt16BE(this.options.destination.port),Uw.isIPv4(this.options.destination.host))J.writeBuffer(u.ipToBuffer(this.options.destination.host)),J.writeStringNT(w);else J.writeUInt8(0),J.writeUInt8(0),J.writeUInt8(0),J.writeUInt8(1),J.writeStringNT(w),J.writeStringNT(this.options.destination.host);this.nextRequiredPacketBufferSize=U.SOCKS_INCOMING_PACKET_SIZES.Socks4Response,this.socket.write(J.toBuffer())}handleSocks4FinalHandshakeResponse(){const w=this.receiveBuffer.get(8);if(w[1]!==U.Socks4Response.Granted)this.closeSocket(`${U.ERRORS.Socks4ProxyRejectedConnection} - (${U.Socks4Response[w[1]]})`);else if(U.SocksCommand[this.options.command]===U.SocksCommand.bind){const J=c.SmartBuffer.fromBuffer(w);J.readOffset=2;const X={port:J.readUInt16BE(),host:u.int32ToIpv4(J.readUInt32BE())};if(X.host==="0.0.0.0")X.host=this.options.proxy.ipaddress;this.setState(U.SocksClientState.BoundWaitingForConnection),this.emit("bound",{remoteHost:X,socket:this.socket})}else this.setState(U.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{socket:this.socket})}handleSocks4IncomingConnectionResponse(){const w=this.receiveBuffer.get(8);if(w[1]!==U.Socks4Response.Granted)this.closeSocket(`${U.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${U.Socks4Response[w[1]]})`);else{const J=c.SmartBuffer.fromBuffer(w);J.readOffset=2;const X={port:J.readUInt16BE(),host:u.int32ToIpv4(J.readUInt32BE())};this.setState(U.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:X,socket:this.socket})}}sendSocks5InitialHandshake(){const w=new c.SmartBuffer,J=[U.Socks5Auth.NoAuth];if(this.options.proxy.userId||this.options.proxy.password)J.push(U.Socks5Auth.UserPass);if(this.options.proxy.custom_auth_method!==void 0)J.push(this.options.proxy.custom_auth_method);w.writeUInt8(5),w.writeUInt8(J.length);for(let X of J)w.writeUInt8(X);this.nextRequiredPacketBufferSize=U.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse,this.socket.write(w.toBuffer()),this.setState(U.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){const w=this.receiveBuffer.get(2);if(w[0]!==5)this.closeSocket(U.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion);else if(w[1]===U.SOCKS5_NO_ACCEPTABLE_AUTH)this.closeSocket(U.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType);else if(w[1]===U.Socks5Auth.NoAuth)this.socks5ChosenAuthType=U.Socks5Auth.NoAuth,this.sendSocks5CommandRequest();else if(w[1]===U.Socks5Auth.UserPass)this.socks5ChosenAuthType=U.Socks5Auth.UserPass,this.sendSocks5UserPassAuthentication();else if(w[1]===this.options.proxy.custom_auth_method)this.socks5ChosenAuthType=this.options.proxy.custom_auth_method,this.sendSocks5CustomAuthentication();else this.closeSocket(U.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}sendSocks5UserPassAuthentication(){const w=this.options.proxy.userId||"",J=this.options.proxy.password||"",X=new c.SmartBuffer;X.writeUInt8(1),X.writeUInt8(Buffer.byteLength(w)),X.writeString(w),X.writeUInt8(Buffer.byteLength(J)),X.writeString(J),this.nextRequiredPacketBufferSize=U.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse,this.socket.write(X.toBuffer()),this.setState(U.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return Fw(this,void 0,void 0,function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size,this.socket.write(yield this.options.proxy.custom_auth_request_handler()),this.setState(U.SocksClientState.SentAuthentication)})}handleSocks5CustomAuthHandshakeResponse(w){return Fw(this,void 0,void 0,function*(){return yield this.options.proxy.custom_auth_response_handler(w)})}handleSocks5AuthenticationNoAuthHandshakeResponse(w){return Fw(this,void 0,void 0,function*(){return w[1]===0})}handleSocks5AuthenticationUserPassHandshakeResponse(w){return Fw(this,void 0,void 0,function*(){return w[1]===0})}handleInitialSocks5AuthenticationHandshakeResponse(){return Fw(this,void 0,void 0,function*(){this.setState(U.SocksClientState.ReceivedAuthenticationResponse);let w=!1;if(this.socks5ChosenAuthType===U.Socks5Auth.NoAuth)w=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2));else if(this.socks5ChosenAuthType===U.Socks5Auth.UserPass)w=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2));else if(this.socks5ChosenAuthType===this.options.proxy.custom_auth_method)w=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size));if(!w)this.closeSocket(U.ERRORS.Socks5AuthenticationFailed);else this.sendSocks5CommandRequest()})}sendSocks5CommandRequest(){const w=new c.SmartBuffer;if(w.writeUInt8(5),w.writeUInt8(U.SocksCommand[this.options.command]),w.writeUInt8(0),Uw.isIPv4(this.options.destination.host))w.writeUInt8(U.Socks5HostType.IPv4),w.writeBuffer(u.ipToBuffer(this.options.destination.host));else if(Uw.isIPv6(this.options.destination.host))w.writeUInt8(U.Socks5HostType.IPv6),w.writeBuffer(u.ipToBuffer(this.options.destination.host));else w.writeUInt8(U.Socks5HostType.Hostname),w.writeUInt8(this.options.destination.host.length),w.writeString(this.options.destination.host);w.writeUInt16BE(this.options.destination.port),this.nextRequiredPacketBufferSize=U.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.socket.write(w.toBuffer()),this.setState(U.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){const w=this.receiveBuffer.peek(5);if(w[0]!==5||w[1]!==U.Socks5Response.Granted)this.closeSocket(`${U.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${U.Socks5Response[w[1]]}`);else{const J=w[3];let X,Y;if(J===U.Socks5HostType.IPv4){const Z=U.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<Z){this.nextRequiredPacketBufferSize=Z;return}if(Y=c.SmartBuffer.fromBuffer(this.receiveBuffer.get(Z).slice(4)),X={host:u.int32ToIpv4(Y.readUInt32BE()),port:Y.readUInt16BE()},X.host==="0.0.0.0")X.host=this.options.proxy.ipaddress}else if(J===U.Socks5HostType.Hostname){const Z=w[4],h=U.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(Z);if(this.receiveBuffer.length<h){this.nextRequiredPacketBufferSize=h;return}Y=c.SmartBuffer.fromBuffer(this.receiveBuffer.get(h).slice(5)),X={host:Y.readString(Z),port:Y.readUInt16BE()}}else if(J===U.Socks5HostType.IPv6){const Z=U.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<Z){this.nextRequiredPacketBufferSize=Z;return}Y=c.SmartBuffer.fromBuffer(this.receiveBuffer.get(Z).slice(4)),X={host:ow.Address6.fromByteArray(Array.from(Y.readBuffer(16))).canonicalForm(),port:Y.readUInt16BE()}}if(this.setState(U.SocksClientState.ReceivedFinalResponse),U.SocksCommand[this.options.command]===U.SocksCommand.connect)this.setState(U.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:X,socket:this.socket});else if(U.SocksCommand[this.options.command]===U.SocksCommand.bind)this.setState(U.SocksClientState.BoundWaitingForConnection),this.nextRequiredPacketBufferSize=U.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.emit("bound",{remoteHost:X,socket:this.socket});else if(U.SocksCommand[this.options.command]===U.SocksCommand.associate)this.setState(U.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:X,socket:this.socket})}}handleSocks5IncomingConnectionResponse(){const w=this.receiveBuffer.peek(5);if(w[0]!==5||w[1]!==U.Socks5Response.Granted)this.closeSocket(`${U.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${U.Socks5Response[w[1]]}`);else{const J=w[3];let X,Y;if(J===U.Socks5HostType.IPv4){const Z=U.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<Z){this.nextRequiredPacketBufferSize=Z;return}if(Y=c.SmartBuffer.fromBuffer(this.receiveBuffer.get(Z).slice(4)),X={host:u.int32ToIpv4(Y.readUInt32BE()),port:Y.readUInt16BE()},X.host==="0.0.0.0")X.host=this.options.proxy.ipaddress}else if(J===U.Socks5HostType.Hostname){const Z=w[4],h=U.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(Z);if(this.receiveBuffer.length<h){this.nextRequiredPacketBufferSize=h;return}Y=c.SmartBuffer.fromBuffer(this.receiveBuffer.get(h).slice(5)),X={host:Y.readString(Z),port:Y.readUInt16BE()}}else if(J===U.Socks5HostType.IPv6){const Z=U.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<Z){this.nextRequiredPacketBufferSize=Z;return}Y=c.SmartBuffer.fromBuffer(this.receiveBuffer.get(Z).slice(4)),X={host:ow.Address6.fromByteArray(Array.from(Y.readBuffer(16))).canonicalForm(),port:Y.readUInt16BE()}}this.setState(U.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:X,socket:this.socket})}}get socksClientOptions(){return Object.assign({},this.options)}}Jw.SocksClient=Bw});var W0=R((hw)=>{var xJ=hw&&hw.__createBinding||(Object.create?function(w,J,X,Y){if(Y===void 0)Y=X;var Z=Object.getOwnPropertyDescriptor(J,X);if(!Z||("get"in Z?!J.__esModule:Z.writable||Z.configurable))Z={enumerable:!0,get:function(){return J[X]}};Object.defineProperty(w,Y,Z)}:function(w,J,X,Y){if(Y===void 0)Y=X;w[Y]=J[X]}),mJ=hw&&hw.__exportStar||function(w,J){for(var X in w)if(X!=="default"&&!Object.prototype.hasOwnProperty.call(J,X))xJ(J,w,X)};Object.defineProperty(hw,"__esModule",{value:!0});mJ(Z0(),hw)});var q0=Q8(W0(),1);import cJ from"net";import _J from"node-fetch";var h0={"whois.denic.de":"-T dn,ace","whois.nic.fr":"-V Md5.2"};var sw={"br.com":"whois.centralnic.net","cn.com":"whois.centralnic.net","de.com":"whois.centralnic.net","eu.com":"whois.centralnic.net","gb.com":"whois.centralnic.net","gb.net":"whois.centralnic.net","gr.com":"whois.centralnic.net","hu.com":"whois.centralnic.net","in.net":"whois.centralnic.net","no.com":"whois.centralnic.net","qc.com":"whois.centralnic.net","ru.com":"whois.centralnic.net","sa.com":"whois.centralnic.net","se.com":"whois.centralnic.net","se.net":"whois.centralnic.net","uk.com":"whois.centralnic.net","uk.net":"whois.centralnic.net","us.com":"whois.centralnic.net","uy.com":"whois.centralnic.net","za.com":"whois.centralnic.net","jpn.com":"whois.centralnic.ne","web.com":"whois.centralnic.ne",com:"whois.verisign-grs.com","za.net":"whois.za.net",net:"whois.verisign-grs.com","eu.org":"whois.eu.org","za.org":"whois.za.org",org:"whois.pir.org","llyw.cymru":"whois.nic.llyw.cymru","gov.scot":"whois.nic.gov.scot","gov.wales":"whois.nic.gov.wales",edu:"whois.educause.edu",gov:"whois.dotgov.gov",int:"whois.iana.org","e164.arpa":"whois.ripe.net",arpa:"whois.iana.org",aero:"whois.aero",asia:"whois.nic.asia",biz:"whois.nic.biz",cat:"whois.nic.cat",coop:"whois.nic.coop",info:"whois.afilias.net",jobs:"whois.nic.jobs",mobi:"whois.afilias.net",museum:"whois.nic.museum",name:"whois.nic.name",post:"whois.dotpostregistry.net",pro:"whois.nic.pro",tel:"whois.nic.tel",travel:"whois.nic.travel",xxx:"whois.nic.xxx",ac:"whois.nic.ac",ae:"whois.aeda.net.ae",af:"whois.nic.af",ag:"whois.nic.ag",ai:"whois.nic.ai",am:"whois.amnic.net",ar:"whois.nic.ar",as:"whois.nic.as","priv.at":"whois.nic.priv.at",at:"whois.nic.at",au:"whois.auda.org.au",aw:"whois.nic.aw",ax:"whois.ax",be:"whois.dns.be",bf:"whois.registre.bf",bg:"whois.register.bg",bh:"whois.nic.bh",bi:"whois1.nic.bi",bj:"whois.nic.bj",bm:"whois.afilias-srs.net",bn:"whois.bnnic.bn",bo:"whois.nic.bo",br:"whois.registro.br",by:"whois.cctld.by",bw:"whois.nic.net.bw",bz:"whois.afilias-grs.info","co.ca":"whois.co.ca",ca:"whois.cira.ca",cc:"ccwhois.verisign-grs.com",cd:"whois.nic.cd",ch:"whois.nic.ch",ci:"whois.nic.ci",cl:"whois.nic.cl",cm:"whois.netcom.cm","edu.cn":"whois.edu.cn",cn:"whois.cnnic.cn","uk.co":"whois.uk.co",co:"whois.nic.co",cr:"whois.nic.cr",cx:"whois.nic.cx",cz:"whois.nic.cz",de:"whois.denic.de",dk:"whois.dk-hostmaster.dk",dm:"whois.dmdomains.dm",do:"whois.nic.do",dz:"whois.nic.dz",ec:"whois.nic.ec",ee:"whois.tld.ee",eu:"whois.eu",fi:"whois.fi",fj:"www.whois.fj",fm:"whois.nic.fm",fo:"whois.nic.fo",fr:"whois.nic.fr",gd:"whois.nic.gd",ge:"whois.nic.ge",gf:"whois.mediaserv.net",gg:"whois.gg",gh:"whois.nic.gh",gi:"whois2.afilias-grs.net",gl:"whois.nic.gl",gp:"whois.nic.gp",gq:"whois.dominio.gq",gs:"whois.nic.gs",gy:"whois.registry.gy",hk:"whois.hkirc.hk",hm:"whois.registry.hm",hn:"whois.nic.hn",hr:"whois.dns.hr",ht:"whois.nic.ht",hu:"whois.nic.hu",id:"whois.id",ie:"whois.weare.ie",il:"whois.isoc.org.il",im:"whois.nic.im",in:"whois.registry.in",io:"whois.nic.io",iq:"whois.cmc.iq",ir:"whois.nic.ir",is:"whois.isnic.is",it:"whois.nic.it",je:"whois.je",jp:"whois.jprs.jp",ke:"whois.kenic.or.ke",kg:"whois.kg",ki:"whois.nic.ki",kn:"whois.nic.kn",kr:"whois.kr",kw:"whois.nic.kw",ky:"whois.kyregistry.ky",kz:"whois.nic.kz",la:"whois.nic.la",lb:"whois.lbdr.org.lb",lc:"whois2.afilias-grs.net",li:"whois.nic.li",lk:"whois.nic.lk",ls:"whois.nic.ls",lt:"whois.domreg.lt",lu:"whois.dns.lu",lv:"whois.nic.lv",ly:"whois.nic.ly",ma:"whois.registre.ma",md:"whois.nic.md",me:"whois.nic.me",mg:"whois.nic.mg",mk:"whois.marnet.mk",ml:"whois.dot.ml",mm:"whois.registry.gov.mm",mn:"whois.nic.mn",mq:"whois.mediaserv.net",mr:"whois.nic.mr",ms:"whois.nic.ms",mt:"whois.nic.org.mt",mu:"whois.nic.mu",mw:"whois.nic.mw",mx:"whois.mx",my:"whois.mynic.my",mz:"whois.nic.mz",na:"whois.na-nic.com.na",nc:"whois.nc",nf:"whois.nic.nf",ng:"whois.nic.net.ng",nl:"whois.domain-registry.nl",no:"whois.norid.no",nu:"whois.iis.nu",nz:"whois.irs.net.nz",om:"whois.registry.om",pe:"kero.yachay.pe",pf:"whois.registry.pf",pk:"whois.pknic.net.pk","co.pl":"whois.co.pl",pl:"whois.dns.pl",pm:"whois.nic.pm",pr:"whois.afilias-srs.net",ps:"whois.pnina.ps",pt:"whois.dns.pt",pw:"whois.nic.pw",qa:"whois.registry.qa",re:"whois.nic.re",ro:"whois.rotld.ro",rs:"whois.rnids.rs","ac.ru":"whois.free.net","edu.ru":"whois.informika.ru","com.ru":"whois.flexireg.net","msk.ru":"whois.flexireg.net","net.ru":"whois.nic.net.ru","nov.ru":"whois.flexireg.net","org.ru":"whois.nic.net.ru","pp.ru":"whois.nic.net.ru","spb.ru":"whois.flexireg.net",ru:"whois.tcinet.ru",rw:"whois.ricta.org.rw",sa:"whois.nic.net.sa",sb:"whois.nic.net.sb",sc:"whois2.afilias-grs.net",sd:"whois.sdnic.sd",se:"whois.iis.se",sg:"whois.sgnic.sg",sh:"whois.nic.sh",si:"whois.register.si",sk:"whois.sk-nic.sk",sl:"whois.nic.sl",sm:"whois.nic.sm",sn:"whois.nic.sn",so:"whois.nic.so",ss:"whois.nic.ss",st:"whois.nic.st","msk.su":"whois.flexireg.net","nov.su":"whois.flexireg.net","spb.su":"whois.flexireg.net",su:"whois.tcinet.ru",sx:"whois.sx",sy:"whois.tld.sy",tc:"whois.nic.tc",td:"whois.nic.td",tf:"whois.nic.tf",tg:"whois.nic.tg",th:"whois.thnic.co.th",tk:"whois.dot.tk",tl:"whois.nic.tl",tm:"whois.nic.tm",tn:"whois.ati.tn",to:"whois.tonic.to",tr:"whois.trabis.gov.tr",tv:"whois.nic.tv",tw:"whois.twnic.net.tw",tz:"whois.tznic.or.tz","biz.ua":"whois.biz.ua","co.ua":"whois.co.ua","pp.ua":"whois.pp.ua",ua:"whois.ua",ug:"whois.co.ug","ac.uk":"whois.nic.ac.uk","gov.uk":"whois.gov.uk",uk:"whois.nic.uk","fed.us":"whois.nic.gov",us:"whois.nic.us",uy:"whois.nic.org.uy",uz:"whois.cctld.uz",vc:"whois2.afilias-grs.net",ve:"whois.nic.ve",vg:"whois.nic.vg",vu:"whois.dnrs.vu",wf:"whois.nic.wf",ws:"whois.website.ws",yt:"whois.nic.yt","ac.za":"whois.ac.za","co.za":"whois.registry.net.za","gov.za":"whois.gov.za","net.za":"net-whois.registry.net.za","org.za":"org-whois.registry.net.za","web.za":"web-whois.registry.net.za",zm:"whois.zicta.zm","xn--2scrj9c":"whois.registry.in","xn--3e0b707e":"whois.kr","xn--3hcrj9c":"whois.registry.in","xn--45br5cyl":"whois.registry.in","xn--45brj9c":"whois.registry.in","xn--4dbrk0ce":"whois.isoc.org.il","xn--80ao21a":"whois.nic.kz","xn--90a3ac":"whois.rnids.rs","xn--90ae":"whois.imena.bg","xn--90ais":"whois.cctld.by","xn--clchc0ea0b2g2a9gcd":"whois.sgnic.sg","xn--d1alf":"whois.marnet.mk","xn--e1a4c":"whois.eu","xn--fiqs8s":"cwhois.cnnic.cn","xn--fiqz9s":"cwhois.cnnic.cn","xn--fpcrj9c3d":"whois.registry.in","xn--fzc2c9e2c":"whois.nic.lk","xn--gecrj9c":"whois.registry.in","xn--h2breg3eve":"whois.registry.in","xn--h2brj9c8c":"whois.registry.in","xn--h2brj9c":"whois.registry.in","xn--j1amh":"whois.dotukr.com","xn--j6w193g":"whois.hkirc.hk","xn--kprw13d":"whois.twnic.net.tw","xn--kpry57d":"whois.twnic.net.tw","xn--lgbbat1ad8j":"whois.nic.dz","xn--mgb9awbf":"whois.registry.om","xn--mgba3a4f16a":"whois.nic.ir","xn--mgbaam7a8h":"whois.aeda.net.ae","xn--mgbah1a3hjkrd":"whois.nic.mr","xn--mgbbh1a71e":"whois.registry.in","xn--mgbbh1a":"whois.registry.in","xn--mgberp4a5d4ar":"whois.nic.net.sa","xn--mgbgu82a":"whois.registry.in","xn--mgbtx2b":"whois.cmc.iq","xn--mgbx4cd0ab":"whois.mynic.my","xn--node":"whois.itdc.ge","xn--o3cw4h":"whois.thnic.co.th","xn--ogbpf8fl":"whois.tld.sy","xn--p1ai":"whois.tcinet.ru","xn--pgbs0dh":"whois.ati.tn","xn--q7ce6a":"whois.nic.la","xn--qxa6a":"whois.eu","xn--rvc1e0am3e":"whois.registry.in","xn--s9brj9c":"whois.registry.in","xn--wgbh1c":"whois.dotmasr.eg","xn--wgbl6a":"whois.registry.qa","xn--xkc2al3hye2a":"whois.nic.lk","xn--xkc2dl3a5ee0h":"whois.registry.in","xn--y9a3aq":"whois.amnic.net","xn--yfro4i67o":"whois.sgnic.sg","xn--ygbi2ammx":"whois.pnina.ps"};async function uJ(w){const J=gJ+w;try{const X=await _J(J);if(X.ok){const Z=(await X.text()).match(/whois:\s+(.*)\s+/);if(Z?.[1])return Z[1]}}catch(X){console.error("Error in getting WhoIs server data from IANA",X)}return""}function F0(w){if(Array.isArray(w))return w.slice();if(typeof w==="object"&&w!==null){const J={};for(let X in w)if(Object.prototype.hasOwnProperty.call(w,X))J[X]=F0(w[X]);return J}return w}function lJ(w){return sw[w]}function G0(w){let J=null,X=w;while(!0){const Z=X.split(".");if(Z.length<2)break;const h=Z.slice(1).join(".");if(sw[h]){J=h;break}X=h}if(J)return J;console.debug("TLD is not found in server list. Returning last element after split as TLD!");const Y=w.split(".");return Y[Y.length-1]}function fJ(w){return h0[w]}async function iJ(w,J,X,Y,Z,h){const z=new TextDecoder(Z),V=new TextEncoder;if(!h){const L=new cJ.Socket;return new Promise((q,T)=>{try{L.connect({port:Y,host:X},()=>{if(J!=="")L.write(V.encode(`${J} ${w}\r\n`));else L.write(V.encode(`${w}\r\n`))}),L.on("data",(D)=>{q(z.decode(D))}),L.on("error",(D)=>{T(D)})}catch(D){T(D)}})}const E={proxy:{host:h.ip,port:h.port,type:h.type===1?5:4},command:"connect",destination:{host:X,port:Y}};if(h.username&&h.password)E.proxy.userId=h.username,E.proxy.password=h.password;return new Promise((L,q)=>{q0.SocksClient.createConnection(E,(T,D)=>{if(T)q(T);else{if(!D)q(new Error("No socket info received!"));if(J!=="")D?.socket.write(V.encode(`${J} ${w}\r\n`));else D?.socket.write(V.encode(`${w}\r\n`));D?.socket.on("data",(M)=>{L(z.decode(M))}),D?.socket.resume()}})})}async function tw(w,J=!1,X=null){let Y,Z=43,h="",z,V="utf-8";if(!X)Y=G0(w),z=null;else Y=X.tld?X.tld:G0(w),V=X.encoding?X.encoding:"utf-8",z=X.proxy?X.proxy:null,h=X.server?X.server:"",Z=X.serverPort?X.serverPort:43;if(h===""){let q=lJ(Y);if(!q){if(console.debug(`No WhoIs server found for TLD: ${Y}! Attempting IANA WhoIs database for server!`),q=await uJ(Y),!q)return console.debug("WhoIs server could not be found!"),{_raw:"",parsedData:null};console.debug(`WhoIs sever found for ${Y}: ${h}`)}h=q}const L=fJ(h)||"";try{const q=await iJ(w,L,h,Z,V,z);if(!J){const D=Iw.parseData(q,null);return{_raw:q,parsedData:D}}let T=null;if(X?.parseData)T=F0(X.parseData);try{const D=Iw.parseData(q,T);return{_raw:q,parsedData:D}}catch(D){return console.error("Error in parsing WhoIs data!",D),{_raw:q,parsedData:null}}}catch(q){return{_raw:"",parsedData:null}}}function HQ(w,J=null){return tw(w,!0,J)}async function PQ(w,J=!1,X=1,Y=!1,Z=null){let h=[];if(J){if(X>w.length)X=w.length;for(let z=0;z<w.length;z+=X){const V=w.slice(z,z+X);h=await Promise.all(V.map(async(E)=>{return await tw(E,Y,Z)}))}}else for(let z=0;z<w.length;z++){const V=await tw(w[z],Y,Z);h.push(V)}return h}var gJ="https://www.iana.org/whois?q=",dJ;((X)=>{X[X.SOCKS4=0]="SOCKS4";X[X.SOCKS5=1]="SOCKS5"})(dJ||={});class Iw{static iterParse(w,J){let X="",Y=null,Z="";for(let h=0;h<w.length;h++){const z=w[h];if(z==="\n"||Z===":"&&z===" "){if(X.trim()in J)Y=X.trim();else if(Y!==null){const V=X.trim();if(V!==""){const E=J[Y];if(Array.isArray(E))E.push(V);else J[Y]=V;Y=null}}X=""}else if(z!==":")X=X+z;if(Z=z,X==="Record maintained by"||X===">>>")break}return J}static parseData(w,J){if(!J)J={"Domain Name":"","Creation Date":"","Updated Date":"","Registry Expiry Date":"","Domain Status":[],Registrar:""};return J=Iw.iterParse(w,J),J}}export{tw as whois,iJ as tcpWhois,HQ as lookup,PQ as batchWhois,Iw as WhoIsParser,dJ as ProxyType};
|
|
2
|
+
var b7=Object.create;var{getPrototypeOf:P7,defineProperty:P8,getOwnPropertyNames:v7}=Object;var m7=Object.prototype.hasOwnProperty;var l=(D,u,F)=>{F=D!=null?b7(P7(D)):{};const E=u||!D||!D.__esModule?P8(F,"default",{value:D,enumerable:!0}):F;for(let $ of v7(D))if(!m7.call(E,$))P8(E,$,{get:()=>D[$],enumerable:!0});return E};var g=(D,u)=>()=>(u||D((u={exports:{}}).exports,u),u.exports);var c3=(D,u)=>{for(var F in u)P8(D,F,{get:u[F],enumerable:!0,configurable:!0,set:(E)=>u[F]=()=>E})};var F0=(D,u)=>()=>(D&&(u=D(D=0)),u);var s3=g((f8,d8)=>{(function(D,u){if(typeof f8==="object"&&typeof d8==="object")d8.exports=u();else if(typeof define==="function"&&define.amd)define(function(){return u()});else D.pluralize=u()})(f8,function(){var D=[],u=[],F={},E={},$={};function B(A){if(typeof A==="string")return new RegExp("^"+A+"$","i");return A}function C(A,Q){if(A===Q)return Q;if(A===A.toLowerCase())return Q.toLowerCase();if(A===A.toUpperCase())return Q.toUpperCase();if(A[0]===A[0].toUpperCase())return Q.charAt(0).toUpperCase()+Q.substr(1).toLowerCase();return Q.toLowerCase()}function J(A,Q){return A.replace(/\$(\d{1,2})/g,function(y,v){return Q[v]||""})}function X(A,Q){return A.replace(Q[0],function(y,v){var m=J(Q[1],arguments);if(y==="")return C(A[v-1],m);return C(y,m)})}function M(A,Q,y){if(!A.length||F.hasOwnProperty(A))return Q;var v=y.length;while(v--){var m=y[v];if(m[0].test(Q))return X(Q,m)}return Q}function W(A,Q,y){return function(v){var m=v.toLowerCase();if(Q.hasOwnProperty(m))return C(v,m);if(A.hasOwnProperty(m))return C(v,A[m]);return M(m,v,y)}}function H(A,Q,y,v){return function(m){var i=m.toLowerCase();if(Q.hasOwnProperty(i))return!0;if(A.hasOwnProperty(i))return!1;return M(i,i,y)===i}}function q(A,Q,y){var v=Q===1?q.singular(A):q.plural(A);return(y?Q+" ":"")+v}return q.plural=W($,E,D),q.isPlural=H($,E,D),q.singular=W(E,$,u),q.isSingular=H(E,$,u),q.addPluralRule=function(A,Q){D.push([B(A),Q])},q.addSingularRule=function(A,Q){u.push([B(A),Q])},q.addUncountableRule=function(A){if(typeof A==="string"){F[A.toLowerCase()]=!0;return}q.addPluralRule(A,"$0"),q.addSingularRule(A,"$0")},q.addIrregularRule=function(A,Q){Q=Q.toLowerCase(),A=A.toLowerCase(),$[A]=Q,E[Q]=A},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(A){return q.addIrregularRule(A[0],A[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(A){return q.addPluralRule(A[0],A[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(A){return q.addSingularRule(A[0],A[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[e\u00E9]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(q.addUncountableRule),q})});var a3=g((n8,r8)=>{(function(D,u,F){if(typeof n8==="object")r8.exports=F(),r8.exports.default=F();else if(typeof define==="function"&&define.amd)define(F);else u[D]=F()})("slugify",n8,function(){var D=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E'","\u0538":"Y'","\u0539":"T'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C'","\u053F":"K","\u0540":"H","\u0541":"D'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P'","\u0554":"Q'","\u0555":"O''","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"'","\u2019":"'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}`),u=JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');function F(E,$){if(typeof E!=="string")throw new Error("slugify: string argument expected");$=typeof $==="string"?{replacement:$}:$||{};var B=u[$.locale]||{},C=$.replacement===void 0?"-":$.replacement,J=$.trim===void 0?!0:$.trim,X=E.normalize().split("").reduce(function(M,W){var H=B[W];if(H===void 0)H=D[W];if(H===void 0)H=W;if(H===C)H=" ";return M+H.replace($.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");if($.strict)X=X.replace(/[^A-Za-z0-9\s]/g,"");if(J)X=X.trim();if(X=X.replace(/\s+/g,C),$.lower)X=X.toLowerCase();return X}return F.extend=function(E){Object.assign(D,E)},F})});var BD=g((I0,t8)=>{function i8(D){return i8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},i8(D)}function JE(D){var u=typeof D==="string"||D instanceof String;if(!u){var F=i8(D);if(D===null)F="null";else if(F==="object")F=D.constructor.name;throw new TypeError("Expected a string but received a ".concat(F))}}Object.defineProperty(I0,"__esModule",{value:!0});I0.default=JE;t8.exports=I0.default;t8.exports.default=I0.default});var x0=g((S0,a8)=>{function WE(D){return D&&D.__esModule?D:{default:D}}function s8(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(XE.default(D),u=String(u),!u)return s8(D,4)||s8(D,6);if(u==="4")return QE.test(D);if(u==="6")return ME.test(D);return!1}Object.defineProperty(S0,"__esModule",{value:!0});S0.default=s8;var XE=WE(BD()),e3="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",Hu="(".concat(e3,"[.]){3}").concat(e3),QE=new RegExp("^".concat(Hu,"$")),JD="(?:[0-9a-fA-F]{1,4})",ME=new RegExp("^("+"(?:".concat(JD,":){7}(?:").concat(JD,"|:)|")+"(?:".concat(JD,":){6}(?:").concat(Hu,"|:").concat(JD,"|:)|")+"(?:".concat(JD,":){5}(?::").concat(Hu,"|(:").concat(JD,"){1,2}|:)|")+"(?:".concat(JD,":){4}(?:(:").concat(JD,"){0,1}:").concat(Hu,"|(:").concat(JD,"){1,3}|:)|")+"(?:".concat(JD,":){3}(?:(:").concat(JD,"){0,2}:").concat(Hu,"|(:").concat(JD,"){1,4}|:)|")+"(?:".concat(JD,":){2}(?:(:").concat(JD,"){0,3}:").concat(Hu,"|(:").concat(JD,"){1,5}|:)|")+"(?:".concat(JD,":){1}(?:(:").concat(JD,"){0,4}:").concat(Hu,"|(:").concat(JD,"){1,6}|:)|")+"(?::((?::".concat(JD,"){0,5}:").concat(Hu,"|(?::").concat(JD,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");a8.exports=S0.default;a8.exports.default=S0.default});var zu=g((j0,o8)=>{function GE(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=arguments.length>1?arguments[1]:void 0;for(var F in u)if(typeof D[F]==="undefined")D[F]=u[F];return D}Object.defineProperty(j0,"__esModule",{value:!0});j0.default=GE;o8.exports=j0.default;o8.exports.default=j0.default});var u1=g((R0,e8)=>{function D1(D){return D&&D.__esModule?D:{default:D}}function TE(D,u){HE.default(D),u=zE.default(u,VE);var F=D.length;if(u.urlSafe)return OE.test(D);if(F%4!==0||UE.test(D))return!1;var E=D.indexOf("=");return E===-1||E===F-1||E===F-2&&D[F-1]==="="}Object.defineProperty(R0,"__esModule",{value:!0});R0.default=TE;var HE=D1(BD()),zE=D1(zu()),UE=/[^A-Z0-9+\/=]/i,OE=/^[A-Z0-9_\-]*$/i,VE={urlSafe:!1};e8.exports=R0.default;e8.exports.default=R0.default});var C1=g((y0,D2)=>{function F1(D){return D&&D.__esModule?D:{default:D}}function SE(D){NE.default(D);var u=D.split("."),F=u.length;if(F!==3)return!1;return u.reduce(function(E,$){return E&&IE.default($,{urlSafe:!0})},!0)}Object.defineProperty(y0,"__esModule",{value:!0});y0.default=SE;var NE=F1(BD()),IE=F1(u1());D2.exports=y0.default;D2.exports.default=y0.default});var F2=g((k0,u2)=>{function E1(D){return D&&D.__esModule?D:{default:D}}function kE(D,u){if(jE.default(D),u=RE.default(u,yE),u.allow_trailing_dot&&D[D.length-1]===".")D=D.substring(0,D.length-1);if(u.allow_wildcard===!0&&D.indexOf("*.")===0)D=D.substring(2);var F=D.split("."),E=F[F.length-1];if(u.require_tld){if(F.length<2)return!1;if(!u.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(E))return!1;if(/\s/.test(E))return!1}if(!u.allow_numeric_tld&&/^\d+$/.test(E))return!1;return F.every(function($){if($.length>63&&!u.ignore_max_length)return!1;if(!/^[a-z_\u00a1-\uffff0-9-]+$/i.test($))return!1;if(/[\uff01-\uff5e]/.test($))return!1;if(/^-|-$/.test($))return!1;if(!u.allow_underscores&&/_/.test($))return!1;return!0})}Object.defineProperty(k0,"__esModule",{value:!0});k0.default=kE;var jE=E1(BD()),RE=E1(zu()),yE={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};u2.exports=k0.default;u2.exports.default=k0.default});var Y1=g((g0,C2)=>{function h0(D){return D&&D.__esModule?D:{default:D}}function PE(D,u){return fE(D)||cE(D,u)||mE(D,u)||vE()}function vE(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function mE(D,u){if(!D)return;if(typeof D==="string")return B1(D,u);var F=Object.prototype.toString.call(D).slice(8,-1);if(F==="Object"&&D.constructor)F=D.constructor.name;if(F==="Map"||F==="Set")return Array.from(D);if(F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F))return B1(D,u)}function B1(D,u){if(u==null||u>D.length)u=D.length;for(var F=0,E=new Array(u);F<u;F++)E[F]=D[F];return E}function cE(D,u){var F=D==null?null:typeof Symbol!="undefined"&&D[Symbol.iterator]||D["@@iterator"];if(F!=null){var E,$,B,C,J=[],X=!0,M=!1;try{if(B=(F=F.call(D)).next,u===0){if(Object(F)!==F)return;X=!1}else for(;!(X=(E=B.call(F)).done)&&(J.push(E.value),J.length!==u);X=!0);}catch(W){M=!0,$=W}finally{try{if(!X&&F.return!=null&&(C=F.return(),Object(C)!==C))return}finally{if(M)throw $}}return J}}function fE(D){if(Array.isArray(D))return D}function rE(D){return Object.prototype.toString.call(D)==="[object RegExp]"}function w1(D,u){for(var F=0;F<u.length;F++){var E=u[F];if(D===E||rE(E)&&E.test(D))return!0}return!1}function pE(D,u){if(gE.default(D),!D||/[\s<>]/.test(D))return!1;if(D.indexOf("mailto:")===0)return!1;if(u=bE.default(u,dE),u.validate_length&&D.length>=2083)return!1;if(!u.allow_fragments&&D.includes("#"))return!1;if(!u.allow_query_components&&(D.includes("?")||D.includes("&")))return!1;var F,E,$,B,C,J,X,M;if(X=D.split("#"),D=X.shift(),X=D.split("?"),D=X.shift(),X=D.split("://"),X.length>1){if(F=X.shift().toLowerCase(),u.require_valid_protocol&&u.protocols.indexOf(F)===-1)return!1}else if(u.require_protocol)return!1;else if(D.slice(0,2)==="//"){if(!u.allow_protocol_relative_urls)return!1;X[0]=D.slice(2)}if(D=X.join("://"),D==="")return!1;if(X=D.split("/"),D=X.shift(),D===""&&!u.require_host)return!0;if(X=D.split("@"),X.length>1){if(u.disallow_auth)return!1;if(X[0]==="")return!1;if(E=X.shift(),E.indexOf(":")>=0&&E.split(":").length>2)return!1;var W=E.split(":"),H=PE(W,2),q=H[0],A=H[1];if(q===""&&A==="")return!1}B=X.join("@"),J=null,M=null;var Q=B.match(nE);if(Q)$="",M=Q[1],J=Q[2]||null;else if(X=B.split(":"),$=X.shift(),X.length)J=X.join(":");if(J!==null&&J.length>0){if(C=parseInt(J,10),!/^[0-9]+$/.test(J)||C<=0||C>65535)return!1}else if(u.require_port)return!1;if(u.host_whitelist)return w1($,u.host_whitelist);if($===""&&!u.require_host)return!0;if(!$1.default($)&&!_E.default($,u)&&(!M||!$1.default(M,6)))return!1;if($=$||M,u.host_blacklist&&w1($,u.host_blacklist))return!1;return!0}Object.defineProperty(g0,"__esModule",{value:!0});g0.default=pE;var gE=h0(BD()),_E=h0(F2()),$1=h0(x0()),bE=h0(zu()),dE={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0},nE=/^\[([^\]]+)\](?::([0-9]+))?$/;C2.exports=g0.default;C2.exports.default=g0.default});var Z1=g((_0,E2)=>{function tE(D){return D&&D.__esModule?D:{default:D}}function aE(D){return iE.default(D),sE.test(D)}Object.defineProperty(_0,"__esModule",{value:!0});_0.default=aE;var iE=tE(BD()),sE=/^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;E2.exports=_0.default;E2.exports.default=_0.default});var X1=g((J1)=>{function D5(D){return D&&D.__esModule?D:{default:D}}function u5(D){var u=D.filter(function(F){return!(F in b0)});if(u.length>0)return!1;return!0}function F5(D,u){var F=D.replace(/[\s\-]+/gi,"").toUpperCase(),E=F.slice(0,2).toUpperCase(),$=E in b0;if(u.whitelist){if(!u5(u.whitelist))return!1;var B=u.whitelist.includes(E);if(!B)return!1}if(u.blacklist){var C=u.blacklist.includes(E);if(C)return!1}return $&&b0[E].test(F)}function C5(D){var u=D.replace(/[^A-Z0-9]+/gi,"").toUpperCase(),F=u.slice(4)+u.slice(0,4),E=F.replace(/[A-Z]/g,function(B){return B.charCodeAt(0)-55}),$=E.match(/\d{1,7}/g).reduce(function(B,C){return Number(B+C)%97},"");return $===1}function E5(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return eE.default(D),F5(D,u)&&C5(D)}Object.defineProperty(J1,"__esModule",{value:!0});J1.default=E5;J1.locales=void 0;var eE=D5(BD()),b0={AD:/^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/,AE:/^(AE[0-9]{2})\d{3}\d{16}$/,AL:/^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/,AT:/^(AT[0-9]{2})\d{16}$/,AZ:/^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/,BA:/^(BA[0-9]{2})\d{16}$/,BE:/^(BE[0-9]{2})\d{12}$/,BG:/^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/,BH:/^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/,BR:/^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/,BY:/^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/,CH:/^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/,CR:/^(CR[0-9]{2})\d{18}$/,CY:/^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/,CZ:/^(CZ[0-9]{2})\d{20}$/,DE:/^(DE[0-9]{2})\d{18}$/,DK:/^(DK[0-9]{2})\d{14}$/,DO:/^(DO[0-9]{2})[A-Z]{4}\d{20}$/,DZ:/^(DZ\d{24})$/,EE:/^(EE[0-9]{2})\d{16}$/,EG:/^(EG[0-9]{2})\d{25}$/,ES:/^(ES[0-9]{2})\d{20}$/,FI:/^(FI[0-9]{2})\d{14}$/,FO:/^(FO[0-9]{2})\d{14}$/,FR:/^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,GB:/^(GB[0-9]{2})[A-Z]{4}\d{14}$/,GE:/^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/,GI:/^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/,GL:/^(GL[0-9]{2})\d{14}$/,GR:/^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/,GT:/^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,HR:/^(HR[0-9]{2})\d{17}$/,HU:/^(HU[0-9]{2})\d{24}$/,IE:/^(IE[0-9]{2})[A-Z0-9]{4}\d{14}$/,IL:/^(IL[0-9]{2})\d{19}$/,IQ:/^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,IR:/^(IR[0-9]{2})0\d{2}0\d{18}$/,IS:/^(IS[0-9]{2})\d{22}$/,IT:/^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,JO:/^(JO[0-9]{2})[A-Z]{4}\d{22}$/,KW:/^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/,KZ:/^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/,LB:/^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/,LC:/^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/,LI:/^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/,LT:/^(LT[0-9]{2})\d{16}$/,LU:/^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/,LV:/^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/,MA:/^(MA[0-9]{26})$/,MC:/^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,MD:/^(MD[0-9]{2})[A-Z0-9]{20}$/,ME:/^(ME[0-9]{2})\d{18}$/,MK:/^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/,MR:/^(MR[0-9]{2})\d{23}$/,MT:/^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/,MU:/^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/,MZ:/^(MZ[0-9]{2})\d{21}$/,NL:/^(NL[0-9]{2})[A-Z]{4}\d{10}$/,NO:/^(NO[0-9]{2})\d{11}$/,PK:/^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/,PL:/^(PL[0-9]{2})\d{24}$/,PS:/^(PS[0-9]{2})[A-Z0-9]{4}\d{21}$/,PT:/^(PT[0-9]{2})\d{21}$/,QA:/^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,RO:/^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/,RS:/^(RS[0-9]{2})\d{18}$/,SA:/^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/,SC:/^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/,SE:/^(SE[0-9]{2})\d{20}$/,SI:/^(SI[0-9]{2})\d{15}$/,SK:/^(SK[0-9]{2})\d{20}$/,SM:/^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,SV:/^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/,TL:/^(TL[0-9]{2})\d{19}$/,TN:/^(TN[0-9]{2})\d{20}$/,TR:/^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/,UA:/^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/,VA:/^(VA[0-9]{2})\d{18}$/,VG:/^(VG[0-9]{2})[A-Z0-9]{4}\d{16}$/,XK:/^(XK[0-9]{2})\d{16}$/},oW=J1.locales=Object.keys(b0)});var W1=g((P0,$2)=>{function w5(D){return D&&D.__esModule?D:{default:D}}function Z5(D,u){B5.default(D);var F=Y5[![void 0,null].includes(u)?u:"all"];return!!F&&F.test(D)}Object.defineProperty(P0,"__esModule",{value:!0});P0.default=Z5;var B5=w5(BD()),Y5={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};$2.exports=P0.default;$2.exports.default=P0.default});var Q1=g((v0,B2)=>{function X5(D){return D&&D.__esModule?D:{default:D}}function Q5(D){return K5.default(D),W5.test(D)}Object.defineProperty(v0,"__esModule",{value:!0});v0.default=Q5;var K5=X5(BD()),W5=/^[\x00-\x7F]+$/;B2.exports=v0.default;B2.exports.default=v0.default});var M1=g((m0,Y2)=>{function G5(D){return D&&D.__esModule?D:{default:D}}function w2(D){return w2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},w2(D)}function q5(D,u){A5.default(D);var F,E;if(w2(u)==="object")F=u.min||0,E=u.max;else F=arguments[1],E=arguments[2];var $=encodeURI(D).split(/%..|./).length-1;return $>=F&&(typeof E==="undefined"||$<=E)}Object.defineProperty(m0,"__esModule",{value:!0});m0.default=q5;var A5=G5(BD());Y2.exports=m0.default;Y2.exports.default=m0.default});var G1=g((c0,J2)=>{function C0(D){return D&&D.__esModule?D:{default:D}}function R5(D){var u=D.replace(/^"(.+)"$/,"$1");if(!u.trim())return!1;var F=/[\.";<>]/.test(u);if(F){if(u===D)return!1;var E=u.split('"').length===u.split('\\"').length;if(!E)return!1}return!0}function y5(D,u){if(z5.default(D),u=O5.default(u,V5),u.require_display_name||u.allow_display_name){var F=D.match(T5);if(F){var E=F[1];if(D=D.replace(E,"").replace(/(^<|>$)/g,""),E.endsWith(" "))E=E.slice(0,-1);if(!R5(E))return!1}else if(u.require_display_name)return!1}if(!u.ignore_max_length&&D.length>j5)return!1;var $=D.split("@"),B=$.pop(),C=B.toLowerCase();if(u.host_blacklist.includes(C))return!1;if(u.host_whitelist.length>0&&!u.host_whitelist.includes(C))return!1;var J=$.join("@");if(u.domain_specific_validation&&(C==="gmail.com"||C==="googlemail.com")){J=J.toLowerCase();var X=J.split("+")[0];if(!Z2.default(X.replace(/\./g,""),{min:6,max:30}))return!1;var M=X.split(".");for(var W=0;W<M.length;W++)if(!N5.test(M[W]))return!1}if(u.ignore_max_length===!1&&(!Z2.default(J,{max:64})||!Z2.default(B,{max:254})))return!1;if(!U5.default(B,{require_tld:u.require_tld,ignore_max_length:u.ignore_max_length,allow_underscores:u.allow_underscores})){if(!u.allow_ip_domain)return!1;if(!A1.default(B)){if(!B.startsWith("[")||!B.endsWith("]"))return!1;var H=B.slice(1,-1);if(H.length===0||!A1.default(H))return!1}}if(J[0]==='"')return J=J.slice(1,J.length-1),u.allow_utf8_local_part?x5.test(J):I5.test(J);var q=u.allow_utf8_local_part?S5:L5,A=J.split(".");for(var Q=0;Q<A.length;Q++)if(!q.test(A[Q]))return!1;if(u.blacklisted_chars){if(J.search(new RegExp("[".concat(u.blacklisted_chars,"]+"),"g"))!==-1)return!1}return!0}Object.defineProperty(c0,"__esModule",{value:!0});c0.default=y5;var z5=C0(BD()),Z2=C0(M1()),U5=C0(F2()),A1=C0(x0()),O5=C0(zu()),V5={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},T5=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,L5=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,N5=/^[a-z\d]+$/,I5=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,S5=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,x5=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,j5=254;J2.exports=c0.default;J2.exports.default=c0.default});var t0=g((T1)=>{Object.defineProperty(T1,"__esModule",{value:!0});T1.farsiLocales=T1.englishLocales=T1.dotDecimal=T1.decimal=T1.commaDecimal=T1.bengaliLocales=T1.arabicLocales=T1.alphanumeric=T1.alpha=void 0;var _D=T1.alpha={"en-US":/^[A-Z]+$/i,"az-AZ":/^[A-VXYZ\u00C7\u018F\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"bg-BG":/^[\u0410-\u042F]+$/i,"cs-CZ":/^[A-Z\u00C1\u010C\u010E\u00C9\u011A\u00CD\u0147\u00D3\u0158\u0160\u0164\u00DA\u016E\u00DD\u017D]+$/i,"da-DK":/^[A-Z\u00C6\u00D8\u00C5]+$/i,"de-DE":/^[A-Z\u00C4\u00D6\u00DC\u00DF]+$/i,"el-GR":/^[\u0391-\u03CE]+$/i,"es-ES":/^[A-Z\u00C1\u00C9\u00CD\u00D1\u00D3\u00DA\u00DC]+$/i,"fa-IR":/^[\u0627\u0628\u067E\u062A\u062B\u062C\u0686\u062D\u062E\u062F\u0630\u0631\u0632\u0698\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u06A9\u06AF\u0644\u0645\u0646\u0648\u0647\u06CC]+$/i,"fi-FI":/^[A-Z\u00C5\u00C4\u00D6]+$/i,"fr-FR":/^[A-Z\u00C0\u00C2\u00C6\u00C7\u00C9\u00C8\u00CA\u00CB\u00CF\u00CE\u00D4\u0152\u00D9\u00DB\u00DC\u0178]+$/i,"it-IT":/^[A-Z\u00C0\u00C9\u00C8\u00CC\u00CE\u00D3\u00D2\u00D9]+$/i,"ja-JP":/^[\u3041-\u3093\u30A1-\u30F6\uFF66-\uFF9F\u4E00-\u9FA0\u30FC\u30FB\u3002\u3001]+$/i,"nb-NO":/^[A-Z\u00C6\u00D8\u00C5]+$/i,"nl-NL":/^[A-Z\u00C1\u00C9\u00CB\u00CF\u00D3\u00D6\u00DC\u00DA]+$/i,"nn-NO":/^[A-Z\u00C6\u00D8\u00C5]+$/i,"hu-HU":/^[A-Z\u00C1\u00C9\u00CD\u00D3\u00D6\u0150\u00DA\u00DC\u0170]+$/i,"pl-PL":/^[A-Z\u0104\u0106\u0118\u015A\u0141\u0143\u00D3\u017B\u0179]+$/i,"pt-PT":/^[A-Z\u00C3\u00C1\u00C0\u00C2\u00C4\u00C7\u00C9\u00CA\u00CB\u00CD\u00CF\u00D5\u00D3\u00D4\u00D6\u00DA\u00DC]+$/i,"ru-RU":/^[\u0410-\u042F\u0401]+$/i,"kk-KZ":/^[\u0410-\u042F\u0401\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[A-Z\u010C\u0106\u0110\u0160\u017D]+$/i,"sk-SK":/^[A-Z\u00C1\u010C\u010E\u00C9\u00CD\u0147\u00D3\u0160\u0164\u00DA\u00DD\u017D\u0139\u0154\u013D\u00C4\u00D4]+$/i,"sr-RS@latin":/^[A-Z\u010C\u0106\u017D\u0160\u0110]+$/i,"sr-RS":/^[\u0410-\u042F\u0402\u0408\u0409\u040A\u040B\u040F]+$/i,"sv-SE":/^[A-Z\u00C5\u00C4\u00D6]+$/i,"th-TH":/^[\u0E01-\u0E50\s]+$/i,"tr-TR":/^[A-Z\u00C7\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"uk-UA":/^[\u0410-\u0429\u042C\u042E\u042F\u0404I\u0407\u0490\u0456]+$/i,"vi-VN":/^[A-Z\u00C0\u00C1\u1EA0\u1EA2\u00C3\u00C2\u1EA6\u1EA4\u1EAC\u1EA8\u1EAA\u0102\u1EB0\u1EAE\u1EB6\u1EB2\u1EB4\u0110\u00C8\u00C9\u1EB8\u1EBA\u1EBC\u00CA\u1EC0\u1EBE\u1EC6\u1EC2\u1EC4\u00CC\u00CD\u1ECA\u1EC8\u0128\u00D2\u00D3\u1ECC\u1ECE\u00D5\u00D4\u1ED2\u1ED0\u1ED8\u1ED4\u1ED6\u01A0\u1EDC\u1EDA\u1EE2\u1EDE\u1EE0\u00D9\u00DA\u1EE4\u1EE6\u0168\u01AF\u1EEA\u1EE8\u1EF0\u1EEC\u1EEE\u1EF2\u00DD\u1EF4\u1EF6\u1EF8]+$/i,"ko-KR":/^[\u3131-\u314E\u314F-\u3163\uAC00-\uD7A3]*$/,"ku-IQ":/^[\u0626\u0627\u0628\u067E\u062A\u062C\u0686\u062D\u062E\u062F\u0631\u0695\u0632\u0698\u0633\u0634\u0639\u063A\u0641\u06A4\u0642\u06A9\u06AF\u0644\u06B5\u0645\u0646\u0648\u06C6\u06BE\u06D5\u06CC\u06CE\u064A\u0637\u0624\u062B\u0622\u0625\u0623\u0643\u0636\u0635\u0629\u0638\u0630]+$/i,ar:/^[\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\u0670]+$/,he:/^[\u05D0-\u05EA]+$/,fa:/^['\u0622\u0627\u0621\u0623\u0624\u0626\u0628\u067E\u062A\u062B\u062C\u0686\u062D\u062E\u062F\u0630\u0631\u0632\u0698\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u06A9\u06AF\u0644\u0645\u0646\u0648\u0647\u0629\u06CC']+$/i,bn:/^['\u0980\u0981\u0982\u0983\u0985\u0986\u0987\u0988\u0989\u098A\u098B\u098C\u098F\u0990\u0993\u0994\u0995\u0996\u0997\u0998\u0999\u099A\u099B\u099C\u099D\u099E\u099F\u09A0\u09A1\u09A2\u09A3\u09A4\u09A5\u09A6\u09A7\u09A8\u09AA\u09AB\u09AC\u09AD\u09AE\u09AF\u09B0\u09B2\u09B6\u09B7\u09B8\u09B9\u09BC\u09BD\u09BE\u09BF\u09C0\u09C1\u09C2\u09C3\u09C4\u09C7\u09C8\u09CB\u09CC\u09CD\u09CE\u09D7\u09DC\u09DD\u09DF\u09E0\u09E1\u09E2\u09E3\u09F0\u09F1\u09F2\u09F3\u09F4\u09F5\u09F6\u09F7\u09F8\u09F9\u09FA\u09FB']+$/,eo:/^[ABC\u0108D-G\u011CH\u0124IJ\u0134K-PRS\u015CTU\u016CVZ]+$/i,"hi-IN":/^[\u0900-\u0961]+[\u0972-\u097F]*$/i,"si-LK":/^[\u0D80-\u0DFF]+$/},bD=T1.alphanumeric={"en-US":/^[0-9A-Z]+$/i,"az-AZ":/^[0-9A-VXYZ\u00C7\u018F\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"bg-BG":/^[0-9\u0410-\u042F]+$/i,"cs-CZ":/^[0-9A-Z\u00C1\u010C\u010E\u00C9\u011A\u00CD\u0147\u00D3\u0158\u0160\u0164\u00DA\u016E\u00DD\u017D]+$/i,"da-DK":/^[0-9A-Z\u00C6\u00D8\u00C5]+$/i,"de-DE":/^[0-9A-Z\u00C4\u00D6\u00DC\u00DF]+$/i,"el-GR":/^[0-9\u0391-\u03C9]+$/i,"es-ES":/^[0-9A-Z\u00C1\u00C9\u00CD\u00D1\u00D3\u00DA\u00DC]+$/i,"fi-FI":/^[0-9A-Z\u00C5\u00C4\u00D6]+$/i,"fr-FR":/^[0-9A-Z\u00C0\u00C2\u00C6\u00C7\u00C9\u00C8\u00CA\u00CB\u00CF\u00CE\u00D4\u0152\u00D9\u00DB\u00DC\u0178]+$/i,"it-IT":/^[0-9A-Z\u00C0\u00C9\u00C8\u00CC\u00CE\u00D3\u00D2\u00D9]+$/i,"ja-JP":/^[0-9\uFF10-\uFF19\u3041-\u3093\u30A1-\u30F6\uFF66-\uFF9F\u4E00-\u9FA0\u30FC\u30FB\u3002\u3001]+$/i,"hu-HU":/^[0-9A-Z\u00C1\u00C9\u00CD\u00D3\u00D6\u0150\u00DA\u00DC\u0170]+$/i,"nb-NO":/^[0-9A-Z\u00C6\u00D8\u00C5]+$/i,"nl-NL":/^[0-9A-Z\u00C1\u00C9\u00CB\u00CF\u00D3\u00D6\u00DC\u00DA]+$/i,"nn-NO":/^[0-9A-Z\u00C6\u00D8\u00C5]+$/i,"pl-PL":/^[0-9A-Z\u0104\u0106\u0118\u015A\u0141\u0143\u00D3\u017B\u0179]+$/i,"pt-PT":/^[0-9A-Z\u00C3\u00C1\u00C0\u00C2\u00C4\u00C7\u00C9\u00CA\u00CB\u00CD\u00CF\u00D5\u00D3\u00D4\u00D6\u00DA\u00DC]+$/i,"ru-RU":/^[0-9\u0410-\u042F\u0401]+$/i,"kk-KZ":/^[0-9\u0410-\u042F\u0401\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[0-9A-Z\u010C\u0106\u0110\u0160\u017D]+$/i,"sk-SK":/^[0-9A-Z\u00C1\u010C\u010E\u00C9\u00CD\u0147\u00D3\u0160\u0164\u00DA\u00DD\u017D\u0139\u0154\u013D\u00C4\u00D4]+$/i,"sr-RS@latin":/^[0-9A-Z\u010C\u0106\u017D\u0160\u0110]+$/i,"sr-RS":/^[0-9\u0410-\u042F\u0402\u0408\u0409\u040A\u040B\u040F]+$/i,"sv-SE":/^[0-9A-Z\u00C5\u00C4\u00D6]+$/i,"th-TH":/^[\u0E01-\u0E59\s]+$/i,"tr-TR":/^[0-9A-Z\u00C7\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"uk-UA":/^[0-9\u0410-\u0429\u042C\u042E\u042F\u0404I\u0407\u0490\u0456]+$/i,"ko-KR":/^[0-9\u3131-\u314E\u314F-\u3163\uAC00-\uD7A3]*$/,"ku-IQ":/^[\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u06690-9\u0626\u0627\u0628\u067E\u062A\u062C\u0686\u062D\u062E\u062F\u0631\u0695\u0632\u0698\u0633\u0634\u0639\u063A\u0641\u06A4\u0642\u06A9\u06AF\u0644\u06B5\u0645\u0646\u0648\u06C6\u06BE\u06D5\u06CC\u06CE\u064A\u0637\u0624\u062B\u0622\u0625\u0623\u0643\u0636\u0635\u0629\u0638\u0630]+$/i,"vi-VN":/^[0-9A-Z\u00C0\u00C1\u1EA0\u1EA2\u00C3\u00C2\u1EA6\u1EA4\u1EAC\u1EA8\u1EAA\u0102\u1EB0\u1EAE\u1EB6\u1EB2\u1EB4\u0110\u00C8\u00C9\u1EB8\u1EBA\u1EBC\u00CA\u1EC0\u1EBE\u1EC6\u1EC2\u1EC4\u00CC\u00CD\u1ECA\u1EC8\u0128\u00D2\u00D3\u1ECC\u1ECE\u00D5\u00D4\u1ED2\u1ED0\u1ED8\u1ED4\u1ED6\u01A0\u1EDC\u1EDA\u1EE2\u1EDE\u1EE0\u00D9\u00DA\u1EE4\u1EE6\u0168\u01AF\u1EEA\u1EE8\u1EF0\u1EEC\u1EEE\u1EF2\u00DD\u1EF4\u1EF6\u1EF8]+$/i,ar:/^[\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u06690-9\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\u0670]+$/,he:/^[0-9\u05D0-\u05EA]+$/,fa:/^['0-9\u0622\u0627\u0621\u0623\u0624\u0626\u0628\u067E\u062A\u062B\u062C\u0686\u062D\u062E\u062F\u0630\u0631\u0632\u0698\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u06A9\u06AF\u0644\u0645\u0646\u0648\u0647\u0629\u06CC\u06F1\u06F2\u06F3\u06F4\u06F5\u06F6\u06F7\u06F8\u06F9\u06F0']+$/i,bn:/^['\u0980\u0981\u0982\u0983\u0985\u0986\u0987\u0988\u0989\u098A\u098B\u098C\u098F\u0990\u0993\u0994\u0995\u0996\u0997\u0998\u0999\u099A\u099B\u099C\u099D\u099E\u099F\u09A0\u09A1\u09A2\u09A3\u09A4\u09A5\u09A6\u09A7\u09A8\u09AA\u09AB\u09AC\u09AD\u09AE\u09AF\u09B0\u09B2\u09B6\u09B7\u09B8\u09B9\u09BC\u09BD\u09BE\u09BF\u09C0\u09C1\u09C2\u09C3\u09C4\u09C7\u09C8\u09CB\u09CC\u09CD\u09CE\u09D7\u09DC\u09DD\u09DF\u09E0\u09E1\u09E2\u09E3\u09E6\u09E7\u09E8\u09E9\u09EA\u09EB\u09EC\u09ED\u09EE\u09EF\u09F0\u09F1\u09F2\u09F3\u09F4\u09F5\u09F6\u09F7\u09F8\u09F9\u09FA\u09FB']+$/,eo:/^[0-9ABC\u0108D-G\u011CH\u0124IJ\u0134K-PRS\u015CTU\u016CVZ]+$/i,"hi-IN":/^[\u0900-\u0963]+[\u0966-\u097F]*$/i,"si-LK":/^[0-9\u0D80-\u0DFF]+$/},jD=T1.decimal={"en-US":".",ar:"\u066B"},q1=T1.englishLocales=["AU","GB","HK","IN","NZ","ZA","ZM"];for(f0=0;f0<q1.length;f0++)E0="en-".concat(q1[f0]),_D[E0]=_D["en-US"],bD[E0]=bD["en-US"],jD[E0]=jD["en-US"];var E0,f0,H1=T1.arabicLocales=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"];for(d0=0;d0<H1.length;d0++)$0="ar-".concat(H1[d0]),_D[$0]=_D.ar,bD[$0]=bD.ar,jD[$0]=jD.ar;var $0,d0,z1=T1.farsiLocales=["IR","AF"];for(r0=0;r0<z1.length;r0++)n0="fa-".concat(z1[r0]),bD[n0]=bD.fa,jD[n0]=jD.ar;var n0,r0,U1=T1.bengaliLocales=["BD","IN"];for(p0=0;p0<U1.length;p0++)B0="bn-".concat(U1[p0]),_D[B0]=_D.bn,bD[B0]=bD.bn,jD[B0]=jD["en-US"];var B0,p0,O1=T1.dotDecimal=["ar-EG","ar-LB","ar-LY"],V1=T1.commaDecimal=["bg-BG","cs-CZ","da-DK","de-DE","el-GR","en-ZM","eo","es-ES","fr-CA","fr-FR","id-ID","it-IT","ku-IQ","hi-IN","hu-HU","nb-NO","nn-NO","nl-NL","pl-PL","pt-PT","ru-RU","kk-KZ","si-LK","sl-SI","sr-RS@latin","sr-RS","sv-SE","tr-TR","uk-UA","vi-VN"];for(l0=0;l0<O1.length;l0++)jD[O1[l0]]=jD["en-US"];var l0;for(i0=0;i0<V1.length;i0++)jD[V1[i0]]=",";var i0;_D["fr-CA"]=_D["fr-FR"];bD["fr-CA"]=bD["fr-FR"];_D["pt-BR"]=_D["pt-PT"];bD["pt-BR"]=bD["pt-PT"];jD["pt-BR"]=jD["pt-PT"];_D["pl-Pl"]=_D["pl-PL"];bD["pl-Pl"]=bD["pl-PL"];jD["pl-Pl"]=jD["pl-PL"];_D["fa-AF"]=_D.fa});var S1=g((N1)=>{function d5(D){return D&&D.__esModule?D:{default:D}}function n5(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};f5.default(D);var E=D,$=F.ignore;if($)if($ instanceof RegExp)E=E.replace($,"");else if(typeof $==="string")E=E.replace(new RegExp("[".concat($.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(u in K2.alpha)return K2.alpha[u].test(E);throw new Error("Invalid locale '".concat(u,"'"))}Object.defineProperty(N1,"__esModule",{value:!0});N1.default=n5;N1.locales=void 0;var f5=d5(BD()),K2=t0(),uQ=N1.locales=Object.keys(K2.alpha)});var j1=g((s0,X2)=>{function x1(D){return D&&D.__esModule?D:{default:D}}function e5(D,u){if(p5.default(D),u=l5.default(u,o5),!D.includes(","))return!1;var F=D.split(",");if(F[0].startsWith("(")&&!F[1].endsWith(")")||F[1].endsWith(")")&&!F[0].startsWith("("))return!1;if(u.checkDMS)return s5.test(F[0])&&a5.test(F[1]);return i5.test(F[0])&&t5.test(F[1])}Object.defineProperty(s0,"__esModule",{value:!0});s0.default=e5;var p5=x1(BD()),l5=x1(zu()),i5=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,t5=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/,s5=/^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i,a5=/^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i,o5={checkDMS:!1};X2.exports=s0.default;X2.exports.default=s0.default});var y1=g((a0,W2)=>{Object.defineProperty(a0,"__esModule",{value:!0});a0.default=void 0;var u$=function D(u,F){return u.some(function(E){return F===E})},CQ=a0.default=u$;W2.exports=a0.default;W2.exports.default=a0.default});var h1=g((o0,M2)=>{function Q2(D){return D&&D.__esModule?D:{default:D}}function $$(D){var u=new RegExp("^[-+]?([0-9]+)?(\\".concat(k1.decimal[D.locale],"[0-9]{").concat(D.decimal_digits,"})").concat(D.force_decimal?"":"?","$"));return u}function Y$(D,u){if(C$.default(D),u=F$.default(u,B$),u.locale in k1.decimal)return!E$.default(w$,D.replace(/ /g,""))&&$$(u).test(D);throw new Error("Invalid locale '".concat(u.locale,"'"))}Object.defineProperty(o0,"__esModule",{value:!0});o0.default=Y$;var F$=Q2(zu()),C$=Q2(BD()),E$=Q2(y1()),k1=t0(),B$={force_decimal:!1,decimal_digits:"1,",locale:"en-US"},w$=["","-","+"];M2.exports=o0.default;M2.exports.default=o0.default});var g1=g((e0,A2)=>{function K$(D){return D&&D.__esModule?D:{default:D}}function W$(D){return J$.default(D),X$.test(D)}Object.defineProperty(e0,"__esModule",{value:!0});e0.default=W$;var J$=K$(BD()),X$=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;A2.exports=e0.default;A2.exports.default=e0.default});var _1=g((D8,G2)=>{function A$(D){return D&&D.__esModule?D:{default:D}}function G$(D){M$.default(D);var u=D.replace(/[- ]+/g,""),F=0,E,$,B;for(var C=u.length-1;C>=0;C--){if(E=u.substring(C,C+1),$=parseInt(E,10),B)if($*=2,$>=10)F+=$%10+1;else F+=$;else F+=$;B=!B}return!!(F%10===0?u:!1)}Object.defineProperty(D8,"__esModule",{value:!0});D8.default=G$;var M$=A$(BD());G2.exports=D8.default;G2.exports.default=D8.default});var P1=g((u8,q2)=>{function b1(D){return D&&D.__esModule?D:{default:D}}function O$(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};H$.default(D);var F=u.provider,E=D.replace(/[- ]+/g,"");if(F&&F.toLowerCase()in _u){if(!_u[F.toLowerCase()].test(E))return!1}else if(F&&!(F.toLowerCase()in _u))throw new Error("".concat(F," is not a valid credit card provider."));else if(!U$.some(function($){return $.test(E)}))return!1;return z$.default(D)}Object.defineProperty(u8,"__esModule",{value:!0});u8.default=O$;var H$=b1(BD()),z$=b1(_1()),_u={amex:/^3[47][0-9]{13}$/,dinersclub:/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,discover:/^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,jcb:/^(?:2131|1800|35\d{3})\d{11}$/,mastercard:/^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,unionpay:/^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,visa:/^(?:4[0-9]{12})(?:[0-9]{3,6})?$/},U$=function(){var D=[];for(var u in _u)if(_u.hasOwnProperty(u))D.push(_u[u]);return D}();q2.exports=u8.default;q2.exports.default=u8.default});var c1=g((v1)=>{function L$(D){return D&&D.__esModule?D:{default:D}}function N$(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};T$.default(D);var E=D,$=F.ignore;if($)if($ instanceof RegExp)E=E.replace($,"");else if(typeof $==="string")E=E.replace(new RegExp("[".concat($.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(u in H2.alphanumeric)return H2.alphanumeric[u].test(E);throw new Error("Invalid locale '".concat(u,"'"))}Object.defineProperty(v1,"__esModule",{value:!0});v1.default=N$;v1.locales=void 0;var T$=L$(BD()),H2=t0(),EQ=v1.locales=Object.keys(H2.alphanumeric)});var d1=g((F8,z2)=>{function x$(D){return D&&D.__esModule?D:{default:D}}function j$(D,u){S$.default(D);var F=D.replace(/\s/g,"").toUpperCase();return u.toUpperCase()in f1&&f1[u].test(F)}Object.defineProperty(F8,"__esModule",{value:!0});F8.default=j$;var S$=x$(BD()),f1={AM:/^[A-Z]{2}\d{7}$/,AR:/^[A-Z]{3}\d{6}$/,AT:/^[A-Z]\d{7}$/,AU:/^[A-Z]\d{7}$/,AZ:/^[A-Z]{1}\d{8}$/,BE:/^[A-Z]{2}\d{6}$/,BG:/^\d{9}$/,BR:/^[A-Z]{2}\d{6}$/,BY:/^[A-Z]{2}\d{7}$/,CA:/^[A-Z]{2}\d{6}$/,CH:/^[A-Z]\d{7}$/,CN:/^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/,CY:/^[A-Z](\d{6}|\d{8})$/,CZ:/^\d{8}$/,DE:/^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,DK:/^\d{9}$/,DZ:/^\d{9}$/,EE:/^([A-Z]\d{7}|[A-Z]{2}\d{7})$/,ES:/^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/,FI:/^[A-Z]{2}\d{7}$/,FR:/^\d{2}[A-Z]{2}\d{5}$/,GB:/^\d{9}$/,GR:/^[A-Z]{2}\d{7}$/,HR:/^\d{9}$/,HU:/^[A-Z]{2}(\d{6}|\d{7})$/,IE:/^[A-Z0-9]{2}\d{7}$/,IN:/^[A-Z]{1}-?\d{7}$/,ID:/^[A-C]\d{7}$/,IR:/^[A-Z]\d{8}$/,IS:/^(A)\d{7}$/,IT:/^[A-Z0-9]{2}\d{7}$/,JM:/^[Aa]\d{7}$/,JP:/^[A-Z]{2}\d{7}$/,KR:/^[MS]\d{8}$/,KZ:/^[a-zA-Z]\d{7}$/,LI:/^[a-zA-Z]\d{5}$/,LT:/^[A-Z0-9]{8}$/,LU:/^[A-Z0-9]{8}$/,LV:/^[A-Z0-9]{2}\d{7}$/,LY:/^[A-Z0-9]{8}$/,MT:/^\d{7}$/,MZ:/^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/,MY:/^[AHK]\d{8}$/,MX:/^\d{10,11}$/,NL:/^[A-Z]{2}[A-Z0-9]{6}\d$/,NZ:/^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/,PH:/^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/,PK:/^[A-Z]{2}\d{7}$/,PL:/^[A-Z]{2}\d{7}$/,PT:/^[A-Z]\d{6}$/,RO:/^\d{8,9}$/,RU:/^\d{9}$/,SE:/^\d{8}$/,SL:/^(P)[A-Z]\d{7}$/,SK:/^[0-9A-Z]\d{7}$/,TH:/^[A-Z]{1,2}\d{6,7}$/,TR:/^[A-Z]\d{8}$/,UA:/^[A-Z]{2}\d{6}$/,US:/^\d{9}$/,ZA:/^[TAMD]\d{8}$/};z2.exports=F8.default;z2.exports.default=F8.default});var O2=g((r1)=>{function k$(D){return D&&D.__esModule?D:{default:D}}function h$(D,u){if(y$.default(D),u in bu)return bu[u].test(D);else if(u==="any"){for(var F in bu)if(bu.hasOwnProperty(F)){var E=bu[F];if(E.test(D))return!0}return!1}throw new Error("Invalid locale '".concat(u,"'"))}Object.defineProperty(r1,"__esModule",{value:!0});r1.default=h$;r1.locales=void 0;var y$=k$(BD()),n1=/^\d{3}$/,fD=/^\d{4}$/,RD=/^\d{5}$/,U2=/^\d{6}$/,bu={AD:/^AD\d{3}$/,AT:fD,AU:fD,AZ:/^AZ\d{4}$/,BA:/^([7-8]\d{4}$)/,BE:fD,BG:fD,BR:/^\d{5}-\d{3}$/,BY:/^2[1-4]\d{4}$/,CA:/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,CH:fD,CN:/^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/,CZ:/^\d{3}\s?\d{2}$/,DE:RD,DK:fD,DO:RD,DZ:RD,EE:RD,ES:/^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/,FI:RD,FR:/^\d{2}\s?\d{3}$/,GB:/^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,GR:/^\d{3}\s?\d{2}$/,HR:/^([1-5]\d{4}$)/,HT:/^HT\d{4}$/,HU:fD,ID:RD,IE:/^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i,IL:/^(\d{5}|\d{7})$/,IN:/^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,IR:/^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/,IS:n1,IT:RD,JP:/^\d{3}\-\d{4}$/,KE:RD,KR:/^(\d{5}|\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\-\d{5}$/,LU:fD,LV:/^LV\-\d{4}$/,LK:RD,MG:n1,MX:RD,MT:/^[A-Za-z]{3}\s{0,1}\d{4}$/,MY:RD,NL:/^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i,NO:fD,NP:/^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,NZ:fD,PL:/^\d{2}\-\d{3}$/,PR:/^00[679]\d{2}([ -]\d{4})?$/,PT:/^\d{4}\-\d{3}?$/,RO:U2,RU:U2,SA:RD,SE:/^[1-9]\d{2}\s?\d{2}$/,SG:U2,SI:fD,SK:/^\d{3}\s?\d{2}$/,TH:RD,TN:fD,TW:/^\d{3}(\d{2})?$/,UA:RD,US:/^\d{5}(-\d{4})?$/,ZA:fD,ZM:RD},BQ=r1.locales=Object.keys(bu)});var V2=g((l1)=>{function b$(D){return D&&D.__esModule?D:{default:D}}function P$(D,u,F){if(_$.default(D),F&&F.strictMode&&!D.startsWith("+"))return!1;if(Array.isArray(u))return u.some(function(B){if(CD.hasOwnProperty(B)){var C=CD[B];if(C.test(D))return!0}return!1});else if(u in CD)return CD[u].test(D);else if(!u||u==="any"){for(var E in CD)if(CD.hasOwnProperty(E)){var $=CD[E];if($.test(D))return!0}return!1}throw new Error("Invalid locale '".concat(u,"'"))}Object.defineProperty(l1,"__esModule",{value:!0});l1.default=P$;l1.locales=void 0;var _$=b$(BD()),CD={"am-AM":/^(\+?374|0)(33|4[134]|55|77|88|9[13-689])\d{6}$/,"ar-AE":/^((\+?971)|0)?5[024568]\d{7}$/,"ar-BH":/^(\+?973)?(3|6)\d{7}$/,"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-LB":/^(\+?961)?((3|81)\d{6}|7\d{7})$/,"ar-EG":/^((\+?20)|0)?1[0125]\d{8}$/,"ar-IQ":/^(\+?964|0)?7[0-9]\d{8}$/,"ar-JO":/^(\+?962|0)?7[789]\d{7}$/,"ar-KW":/^(\+?965)([569]\d{7}|41\d{6})$/,"ar-LY":/^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/,"ar-MA":/^(?:(?:\+|00)212|0)[5-7]\d{8}$/,"ar-OM":/^((\+|00)968)?(9[1-9])\d{6}$/,"ar-PS":/^(\+?970|0)5[6|9](\d{7})$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"ar-SD":/^((\+?249)|0)?(9[012369]|1[012])\d{7}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-TN":/^(\+?216)?[2459]\d{7}$/,"az-AZ":/^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/,"bs-BA":/^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/,"be-BY":/^(\+?375)?(24|25|29|33|44)\d{7}$/,"bg-BG":/^(\+?359|0)?8[789]\d{7}$/,"bn-BD":/^(\+?880|0)1[13456789][0-9]{8}$/,"ca-AD":/^(\+376)?[346]\d{5}$/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"da-DK":/^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,"de-DE":/^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/,"de-AT":/^(\+43|0)\d{1,4}\d{3,12}$/,"de-CH":/^(\+41|0)([1-9])\d{1,9}$/,"de-LU":/^(\+352)?((6\d1)\d{6})$/,"dv-MV":/^(\+?960)?(7[2-9]|9[1-9])\d{5}$/,"el-GR":/^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/,"el-CY":/^(\+?357?)?(9(9|6)\d{6})$/,"en-AI":/^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-AG":/^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/,"en-BM":/^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/,"en-BS":/^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/,"en-GB":/^(\+?44|0)7\d{9}$/,"en-GG":/^(\+?44|0)1481\d{6}$/,"en-GH":/^(\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\d{7}$/,"en-GY":/^(\+592|0)6\d{6}$/,"en-HK":/^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,"en-MO":/^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,"en-IE":/^(\+?353|0)8[356789]\d{7}$/,"en-IN":/^(\+?91|0)?[6789]\d{9}$/,"en-JM":/^(\+?876)?\d{7}$/,"en-KE":/^(\+?254|0)(7|1)\d{8}$/,"fr-CF":/^(\+?236| ?)(70|75|77|72|21|22)\d{6}$/,"en-SS":/^(\+?211|0)(9[1257])\d{7}$/,"en-KI":/^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,"en-KN":/^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/,"en-LS":/^(\+?266)(22|28|57|58|59|27|52)\d{6}$/,"en-MT":/^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,"en-MU":/^(\+?230|0)?\d{8}$/,"en-MW":/^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$/,"en-NA":/^(\+?264|0)(6|8)\d{7}$/,"en-NG":/^(\+?234|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)[28]\d{7,9}$/,"en-PG":/^(\+?675|0)?(7\d|8[18])\d{6}$/,"en-PK":/^((00|\+)?92|0)3[0-6]\d{8}$/,"en-PH":/^(09|\+639)\d{9}$/,"en-RW":/^(\+?250|0)?[7]\d{8}$/,"en-SG":/^(\+65)?[3689]\d{7}$/,"en-SL":/^(\+?232|0)\d{8}$/,"en-TZ":/^(\+?255|0)?[67]\d{8}$/,"en-UG":/^(\+?256|0)?[7]\d{8}$/,"en-US":/^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?09[567]\d{7}$/,"en-ZW":/^(\+263)[0-9]{9}$/,"en-BW":/^(\+?267)?(7[1-8]{1})\d{6}$/,"es-AR":/^\+?549(11|[2368]\d)\d{8}$/,"es-BO":/^(\+?591)?(6|7)\d{7}$/,"es-CO":/^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/,"es-CL":/^(\+?56|0)[2-9]\d{1}\d{7}$/,"es-CR":/^(\+506)?[2-8]\d{7}$/,"es-CU":/^(\+53|0053)?5\d{7}$/,"es-DO":/^(\+?1)?8[024]9\d{7}$/,"es-HN":/^(\+?504)?[9|8|3|2]\d{7}$/,"es-EC":/^(\+?593|0)([2-7]|9[2-9])\d{7}$/,"es-ES":/^(\+?34)?[6|7]\d{8}$/,"es-PE":/^(\+?51)?9\d{8}$/,"es-MX":/^(\+?52)?(1|01)?\d{10,11}$/,"es-NI":/^(\+?505)\d{7,8}$/,"es-PA":/^(\+?507)\d{7,8}$/,"es-PY":/^(\+?595|0)9[9876]\d{7}$/,"es-SV":/^(\+?503)?[67]\d{7}$/,"es-UY":/^(\+598|0)9[1-9][\d]{6}$/,"es-VE":/^(\+?58)?(2|4)\d{9}$/,"et-EE":/^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,"fa-IR":/^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,"fi-FI":/^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/,"fj-FJ":/^(\+?679)?\s?\d{3}\s?\d{4}$/,"fo-FO":/^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"fr-BF":/^(\+226|0)[67]\d{7}$/,"fr-BJ":/^(\+229)\d{8}$/,"fr-CD":/^(\+?243|0)?(8|9)\d{8}$/,"fr-CM":/^(\+?237)6[0-9]{8}$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"fr-GF":/^(\+?594|0|00594)[67]\d{8}$/,"fr-GP":/^(\+?590|0|00590)[67]\d{8}$/,"fr-MQ":/^(\+?596|0|00596)[67]\d{8}$/,"fr-PF":/^(\+?689)?8[789]\d{6}$/,"fr-RE":/^(\+?262|0|00262)[67]\d{8}$/,"fr-WF":/^(\+681)?\d{6}$/,"he-IL":/^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,"hu-HU":/^(\+?36|06)(20|30|31|50|70)\d{7}$/,"id-ID":/^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,"ir-IR":/^(\+98|0)?9\d{9}$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"it-SM":/^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,"ja-JP":/^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,"ka-GE":/^(\+?995)?(79\d{7}|5\d{8})$/,"kk-KZ":/^(\+?7|8)?7\d{9}$/,"kl-GL":/^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"ko-KR":/^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,"ky-KG":/^(\+?7\s?\+?7|0)\s?\d{2}\s?\d{3}\s?\d{4}$/,"lt-LT":/^(\+370|8)\d{8}$/,"lv-LV":/^(\+?371)2\d{7}$/,"mg-MG":/^((\+?261|0)(2|3)\d)?\d{7}$/,"mn-MN":/^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$/,"my-MM":/^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,"ms-MY":/^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/,"mz-MZ":/^(\+?258)?8[234567]\d{7}$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"ne-NP":/^(\+?977)?9[78]\d{8}$/,"nl-BE":/^(\+?32|0)4\d{8}$/,"nl-NL":/^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/,"nl-AW":/^(\+)?297(56|59|64|73|74|99)\d{5}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"pt-AO":/^(\+244)\d{9}$/,"ro-MD":/^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/,"ro-RO":/^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"si-LK":/^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,"sl-SI":/^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,"sk-SK":/^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"so-SO":/^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$/,"sq-AL":/^(\+355|0)6[789]\d{6}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"sv-SE":/^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/,"tg-TJ":/^(\+?992)?[5][5]\d{7}$/,"th-TH":/^(\+66|66|0)\d{9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"tk-TM":/^(\+993|993|8)\d{8}$/,"uk-UA":/^(\+?38|8)?0\d{9}$/,"uz-UZ":/^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,"vi-VN":/^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,"zh-CN":/^((\+|00)86)?(1[3-9]|9[28])\d{9}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/,"dz-BT":/^(\+?975|0)?(17|16|77|02)\d{6}$/,"ar-YE":/^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/,"ar-EH":/^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/,"fa-AF":/^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/};CD["en-CA"]=CD["en-US"];CD["fr-CA"]=CD["en-CA"];CD["fr-BE"]=CD["nl-BE"];CD["zh-HK"]=CD["en-HK"];CD["zh-MO"]=CD["en-MO"];CD["ga-IE"]=CD["en-IE"];CD["fr-CH"]=CD["de-CH"];CD["it-CH"]=CD["fr-CH"];var YQ=l1.locales=Object.keys(CD)});var x2=g((I2,S2)=>{(function(D,u){typeof I2=="object"&&typeof S2!="undefined"?S2.exports=u():typeof define=="function"&&define.amd?define(u):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs=u()})(I2,function(){var D=1000,u=60000,F=3600000,E="millisecond",$="second",B="minute",C="hour",J="day",X="week",M="month",W="quarter",H="year",q="date",A="Invalid Date",Q=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var L=["th","st","nd","rd"],V=k%100;return"["+k+(L[(V-20)%10]||L[V]||L[0])+"]"}},m=function(k,L,V){var j=String(k);return!j||j.length>=L?k:""+Array(L+1-j.length).join(V)+k},i={s:m,z:function(k){var L=-k.utcOffset(),V=Math.abs(L),j=Math.floor(V/60),N=V%60;return(L<=0?"+":"-")+m(j,2,"0")+":"+m(N,2,"0")},m:function k(L,V){if(L.date()<V.date())return-k(V,L);var j=12*(V.year()-L.year())+(V.month()-L.month()),N=L.clone().add(j,M),b=V-N<0,P=L.clone().add(j+(b?-1:1),M);return+(-(j+(V-N)/(b?N-P:P-N))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M,y:H,w:X,d:J,D:q,h:C,m:B,s:$,ms:E,Q:W}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},FD="en",ID={};ID[FD]=v;var nD="$isDayjsObject",SD=function(k){return k instanceof UD||!(!k||!k[nD])},VD=function k(L,V,j){var N;if(!L)return FD;if(typeof L=="string"){var b=L.toLowerCase();ID[b]&&(N=b),V&&(ID[b]=V,N=b);var P=L.split("-");if(!N&&P.length>1)return k(P[0])}else{var f=L.name;ID[f]=L,N=f}return!j&&N&&(FD=N),N||!j&&FD},t=function(k,L){if(SD(k))return k.clone();var V=typeof L=="object"?L:{};return V.date=k,V.args=arguments,new UD(V)},c=i;c.l=VD,c.i=SD,c.w=function(k,L){return t(k,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var UD=function(){function k(V){this.$L=VD(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[nD]=!0}var L=k.prototype;return L.parse=function(V){this.$d=function(j){var{date:N,utc:b}=j;if(N===null)return new Date(NaN);if(c.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var P=N.match(Q);if(P){var f=P[2]-1||0,p=(P[7]||"0").substring(0,3);return b?new Date(Date.UTC(P[1],f,P[3]||1,P[4]||0,P[5]||0,P[6]||0,p)):new Date(P[1],f,P[3]||1,P[4]||0,P[5]||0,P[6]||0,p)}}return new Date(N)}(V),this.init()},L.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},L.$utils=function(){return c},L.isValid=function(){return this.$d.toString()!==A},L.isSame=function(V,j){var N=t(V);return this.startOf(j)<=N&&N<=this.endOf(j)},L.isAfter=function(V,j){return t(V)<this.startOf(j)},L.isBefore=function(V,j){return this.endOf(j)<t(V)},L.$g=function(V,j,N){return c.u(V)?this[j]:this.set(N,V)},L.unix=function(){return Math.floor(this.valueOf()/1000)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(V,j){var N=this,b=!!c.u(j)||j,P=c.p(V),f=function(WD,KD){var gD=c.w(N.$u?Date.UTC(N.$y,KD,WD):new Date(N.$y,KD,WD),N);return b?gD:gD.endOf(J)},p=function(WD,KD){return c.w(N.toDate()[WD].apply(N.toDate("s"),(b?[0,0,0,0]:[23,59,59,999]).slice(KD)),N)},o=this.$W,ZD=this.$M,LD=this.$D,Eu="set"+(this.$u?"UTC":"");switch(P){case H:return b?f(1,0):f(31,11);case M:return b?f(1,ZD):f(0,ZD+1);case X:var tD=this.$locale().weekStart||0,Ku=(o<tD?o+7:o)-tD;return f(b?LD-Ku:LD+(6-Ku),ZD);case J:case q:return p(Eu+"Hours",0);case C:return p(Eu+"Minutes",1);case B:return p(Eu+"Seconds",2);case $:return p(Eu+"Milliseconds",3);default:return this.clone()}},L.endOf=function(V){return this.startOf(V,!1)},L.$set=function(V,j){var N,b=c.p(V),P="set"+(this.$u?"UTC":""),f=(N={},N[J]=P+"Date",N[q]=P+"Date",N[M]=P+"Month",N[H]=P+"FullYear",N[C]=P+"Hours",N[B]=P+"Minutes",N[$]=P+"Seconds",N[E]=P+"Milliseconds",N)[b],p=b===J?this.$D+(j-this.$W):j;if(b===M||b===H){var o=this.clone().set(q,1);o.$d[f](p),o.init(),this.$d=o.set(q,Math.min(this.$D,o.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},L.set=function(V,j){return this.clone().$set(V,j)},L.get=function(V){return this[c.p(V)]()},L.add=function(V,j){var N,b=this;V=Number(V);var P=c.p(j),f=function(ZD){var LD=t(b);return c.w(LD.date(LD.date()+Math.round(ZD*V)),b)};if(P===M)return this.set(M,this.$M+V);if(P===H)return this.set(H,this.$y+V);if(P===J)return f(1);if(P===X)return f(7);var p=(N={},N[B]=u,N[C]=F,N[$]=D,N)[P]||1,o=this.$d.getTime()+V*p;return c.w(o,this)},L.subtract=function(V,j){return this.add(-1*V,j)},L.format=function(V){var j=this,N=this.$locale();if(!this.isValid())return N.invalidDate||A;var b=V||"YYYY-MM-DDTHH:mm:ssZ",P=c.z(this),f=this.$H,p=this.$m,o=this.$M,ZD=N.weekdays,LD=N.months,Eu=N.meridiem,tD=function(KD,gD,sD,$u){return KD&&(KD[gD]||KD(j,b))||sD[gD].slice(0,$u)},Ku=function(KD){return c.s(f%12||12,KD,"0")},WD=Eu||function(KD,gD,sD){var $u=KD<12?"AM":"PM";return sD?$u.toLowerCase():$u};return b.replace(y,function(KD,gD){return gD||function(sD){switch(sD){case"YY":return String(j.$y).slice(-2);case"YYYY":return c.s(j.$y,4,"0");case"M":return o+1;case"MM":return c.s(o+1,2,"0");case"MMM":return tD(N.monthsShort,o,LD,3);case"MMMM":return tD(LD,o);case"D":return j.$D;case"DD":return c.s(j.$D,2,"0");case"d":return String(j.$W);case"dd":return tD(N.weekdaysMin,j.$W,ZD,2);case"ddd":return tD(N.weekdaysShort,j.$W,ZD,3);case"dddd":return ZD[j.$W];case"H":return String(f);case"HH":return c.s(f,2,"0");case"h":return Ku(1);case"hh":return Ku(2);case"a":return WD(f,p,!0);case"A":return WD(f,p,!1);case"m":return String(p);case"mm":return c.s(p,2,"0");case"s":return String(j.$s);case"ss":return c.s(j.$s,2,"0");case"SSS":return c.s(j.$ms,3,"0");case"Z":return P}return null}(KD)||P.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(V,j,N){var b,P=this,f=c.p(j),p=t(V),o=(p.utcOffset()-this.utcOffset())*u,ZD=this-p,LD=function(){return c.m(P,p)};switch(f){case H:b=LD()/12;break;case M:b=LD();break;case W:b=LD()/3;break;case X:b=(ZD-o)/604800000;break;case J:b=(ZD-o)/86400000;break;case C:b=ZD/F;break;case B:b=ZD/u;break;case $:b=ZD/D;break;default:b=ZD}return N?b:c.a(b)},L.daysInMonth=function(){return this.endOf(M).$D},L.$locale=function(){return ID[this.$L]},L.locale=function(V,j){if(!V)return this.$L;var N=this.clone(),b=VD(V,j,!0);return b&&(N.$L=b),N},L.clone=function(){return c.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},k}(),TD=UD.prototype;return t.prototype=TD,[["$ms",E],["$s",$],["$m",B],["$H",C],["$W",J],["$M",M],["$y",H],["$D",q]].forEach(function(k){TD[k[1]]=function(L){return this.$g(L,k[0],k[1])}}),t.extend=function(k,L){return k.$i||(k(L,UD,t),k.$i=!0),t},t.locale=VD,t.isDayjs=SD,t.unix=function(k){return t(1000*k)},t.en=ID[FD],t.Ls=ID,t.p={},t})});var HF=g((j2,R2)=>{(function(D,u){typeof j2=="object"&&typeof R2!="undefined"?R2.exports=u():typeof define=="function"&&define.amd?define(u):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs_plugin_isSameOrAfter=u()})(j2,function(){return function(D,u){u.prototype.isSameOrAfter=function(F,E){return this.isSame(F,E)||this.isAfter(F,E)}}})});var zF=g((y2,k2)=>{(function(D,u){typeof y2=="object"&&typeof k2!="undefined"?k2.exports=u():typeof define=="function"&&define.amd?define(u):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs_plugin_isSameOrBefore=u()})(y2,function(){return function(D,u){u.prototype.isSameOrBefore=function(F,E){return this.isSame(F,E)||this.isBefore(F,E)}}})});var UF=g((h2,g2)=>{(function(D,u){typeof h2=="object"&&typeof g2!="undefined"?g2.exports=u():typeof define=="function"&&define.amd?define(u):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs_plugin_customParseFormat=u()})(h2,function(){var D={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},u=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,F=/\d/,E=/\d\d/,$=/\d\d?/,B=/\d*[^-_:/,()\s\d]+/,C={},J=function(Q){return(Q=+Q)+(Q>68?1900:2000)},X=function(Q){return function(y){this[Q]=+y}},M=[/[+-]\d\d:?(\d\d)?|Z/,function(Q){(this.zone||(this.zone={})).offset=function(y){if(!y)return 0;if(y==="Z")return 0;var v=y.match(/([+-]|\d\d)/g),m=60*v[1]+(+v[2]||0);return m===0?0:v[0]==="+"?-m:m}(Q)}],W=function(Q){var y=C[Q];return y&&(y.indexOf?y:y.s.concat(y.f))},H=function(Q,y){var v,m=C.meridiem;if(m){for(var i=1;i<=24;i+=1)if(Q.indexOf(m(i,0,y))>-1){v=i>12;break}}else v=Q===(y?"pm":"PM");return v},q={A:[B,function(Q){this.afternoon=H(Q,!1)}],a:[B,function(Q){this.afternoon=H(Q,!0)}],Q:[F,function(Q){this.month=3*(Q-1)+1}],S:[F,function(Q){this.milliseconds=100*+Q}],SS:[E,function(Q){this.milliseconds=10*+Q}],SSS:[/\d{3}/,function(Q){this.milliseconds=+Q}],s:[$,X("seconds")],ss:[$,X("seconds")],m:[$,X("minutes")],mm:[$,X("minutes")],H:[$,X("hours")],h:[$,X("hours")],HH:[$,X("hours")],hh:[$,X("hours")],D:[$,X("day")],DD:[E,X("day")],Do:[B,function(Q){var y=C.ordinal,v=Q.match(/\d+/);if(this.day=v[0],y)for(var m=1;m<=31;m+=1)y(m).replace(/\[|\]/g,"")===Q&&(this.day=m)}],w:[$,X("week")],ww:[E,X("week")],M:[$,X("month")],MM:[E,X("month")],MMM:[B,function(Q){var y=W("months"),v=(W("monthsShort")||y.map(function(m){return m.slice(0,3)})).indexOf(Q)+1;if(v<1)throw new Error;this.month=v%12||v}],MMMM:[B,function(Q){var y=W("months").indexOf(Q)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,X("year")],YY:[E,function(Q){this.year=J(Q)}],YYYY:[/\d{4}/,X("year")],Z:M,ZZ:M};function A(Q){var y,v;y=Q,v=C&&C.formats;for(var m=(Q=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,c,UD){var TD=UD&&UD.toUpperCase();return c||v[UD]||D[UD]||v[TD].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(k,L,V){return L||V.slice(1)})})).match(u),i=m.length,FD=0;FD<i;FD+=1){var ID=m[FD],nD=q[ID],SD=nD&&nD[0],VD=nD&&nD[1];m[FD]=VD?{regex:SD,parser:VD}:ID.replace(/^\[|\]$/g,"")}return function(t){for(var c={},UD=0,TD=0;UD<i;UD+=1){var k=m[UD];if(typeof k=="string")TD+=k.length;else{var{regex:L,parser:V}=k,j=t.slice(TD),N=L.exec(j)[0];V.call(c,N),t=t.replace(N,"")}}return function(b){var P=b.afternoon;if(P!==void 0){var f=b.hours;P?f<12&&(b.hours+=12):f===12&&(b.hours=0),delete b.afternoon}}(c),c}}return function(Q,y,v){v.p.customParseFormat=!0,Q&&Q.parseTwoDigitYear&&(J=Q.parseTwoDigitYear);var m=y.prototype,i=m.parse;m.parse=function(FD){var{date:ID,utc:nD,args:SD}=FD;this.$u=nD;var VD=SD[1];if(typeof VD=="string"){var t=SD[2]===!0,c=SD[3]===!0,UD=t||c,TD=SD[2];c&&(TD=SD[2]),C=this.$locale(),!t&&TD&&(C=v.Ls[TD]),this.$d=function(j,N,b,P){try{if(["x","X"].indexOf(N)>-1)return new Date((N==="X"?1000:1)*j);var f=A(N)(j),p=f.year,o=f.month,ZD=f.day,LD=f.hours,Eu=f.minutes,tD=f.seconds,Ku=f.milliseconds,WD=f.zone,KD=f.week,gD=new Date,sD=ZD||(p||o?1:gD.getDate()),$u=p||gD.getFullYear(),hu=0;p&&!o||(hu=o>0?o-1:gD.getMonth());var gu,au=LD||0,ou=Eu||0,eu=tD||0,D0=Ku||0;return WD?new Date(Date.UTC($u,hu,sD,au,ou,eu,D0+60*WD.offset*1000)):b?new Date(Date.UTC($u,hu,sD,au,ou,eu,D0)):(gu=new Date($u,hu,sD,au,ou,eu,D0),KD&&(gu=P(gu).week(KD).toDate()),gu)}catch(h3){return new Date("")}}(ID,VD,nD,v),this.init(),TD&&TD!==!0&&(this.$L=this.locale(TD).$L),UD&&ID!=this.format(VD)&&(this.$d=new Date("")),C={}}else if(VD instanceof Array)for(var k=VD.length,L=1;L<=k;L+=1){SD[1]=VD[L-1];var V=v.apply(this,SD);if(V.isValid()){this.$d=V.$d,this.$L=V.$L,this.init();break}L===k&&(this.$d=new Date(""))}else i.call(this,FD)}}})});var OF=g((E8,P2)=>{function o$(D){return D&&D.__esModule?D:{default:D}}function e$(D){return a$.default(D),D.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/\//g,"/").replace(/\\/g,"\").replace(/`/g,"`")}Object.defineProperty(E8,"__esModule",{value:!0});E8.default=e$;var a$=o$(BD());P2.exports=E8.default;P2.exports.default=E8.default});var VF=g(($8,v2)=>{function FB(D){return D&&D.__esModule?D:{default:D}}function YB(D){if(D.length>1)return D;return""}function ZB(D,u){u=uB.default(u,CB);var F=D.split("@"),E=F.pop(),$=F.join("@"),B=[$,E];if(B[1]=B[1].toLowerCase(),B[1]==="gmail.com"||B[1]==="googlemail.com"){if(u.gmail_remove_subaddress)B[0]=B[0].split("+")[0];if(u.gmail_remove_dots)B[0]=B[0].replace(/\.+/g,YB);if(!B[0].length)return!1;if(u.all_lowercase||u.gmail_lowercase)B[0]=B[0].toLowerCase();B[1]=u.gmail_convert_googlemaildotcom?"gmail.com":B[1]}else if(EB.indexOf(B[1])>=0){if(u.icloud_remove_subaddress)B[0]=B[0].split("+")[0];if(!B[0].length)return!1;if(u.all_lowercase||u.icloud_lowercase)B[0]=B[0].toLowerCase()}else if($B.indexOf(B[1])>=0){if(u.outlookdotcom_remove_subaddress)B[0]=B[0].split("+")[0];if(!B[0].length)return!1;if(u.all_lowercase||u.outlookdotcom_lowercase)B[0]=B[0].toLowerCase()}else if(BB.indexOf(B[1])>=0){if(u.yahoo_remove_subaddress){var C=B[0].split("-");B[0]=C.length>1?C.slice(0,-1).join("-"):C[0]}if(!B[0].length)return!1;if(u.all_lowercase||u.yahoo_lowercase)B[0]=B[0].toLowerCase()}else if(wB.indexOf(B[1])>=0){if(u.all_lowercase||u.yandex_lowercase)B[0]=B[0].toLowerCase();B[1]="yandex.ru"}else if(u.all_lowercase)B[0]=B[0].toLowerCase();return B.join("@")}Object.defineProperty($8,"__esModule",{value:!0});$8.default=ZB;var uB=FB(zu()),CB={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,yandex_lowercase:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},EB=["icloud.com","me.com"],$B=["hotmail.at","hotmail.be","hotmail.ca","hotmail.cl","hotmail.co.il","hotmail.co.nz","hotmail.co.th","hotmail.co.uk","hotmail.com","hotmail.com.ar","hotmail.com.au","hotmail.com.br","hotmail.com.gr","hotmail.com.mx","hotmail.com.pe","hotmail.com.tr","hotmail.com.vn","hotmail.cz","hotmail.de","hotmail.dk","hotmail.es","hotmail.fr","hotmail.hu","hotmail.id","hotmail.ie","hotmail.in","hotmail.it","hotmail.jp","hotmail.kr","hotmail.lv","hotmail.my","hotmail.ph","hotmail.pt","hotmail.sa","hotmail.sg","hotmail.sk","live.be","live.co.uk","live.com","live.com.ar","live.com.mx","live.de","live.es","live.eu","live.fr","live.it","live.nl","msn.com","outlook.at","outlook.be","outlook.cl","outlook.co.il","outlook.co.nz","outlook.co.th","outlook.com","outlook.com.ar","outlook.com.au","outlook.com.br","outlook.com.gr","outlook.com.pe","outlook.com.tr","outlook.com.vn","outlook.cz","outlook.de","outlook.dk","outlook.es","outlook.fr","outlook.hu","outlook.id","outlook.ie","outlook.in","outlook.it","outlook.jp","outlook.kr","outlook.lv","outlook.my","outlook.ph","outlook.pt","outlook.sa","outlook.sg","outlook.sk","passport.com"],BB=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"],wB=["yandex.ru","yandex.ua","yandex.kz","yandex.com","yandex.by","ya.ru"];v2.exports=$8.default;v2.exports.default=$8.default});function p2(D){return D!==null&&typeof D==="object"}function s2(D,u,F=".",E){if(!p2(u))return s2(D,{},F,E);const $=Object.assign({},u);for(let B in D){if(B==="__proto__"||B==="constructor")continue;const C=D[B];if(C===null||C===void 0)continue;if(E&&E($,B,C,F))continue;if(Array.isArray(C)&&Array.isArray($[B]))$[B]=[...C,...$[B]];else if(p2(C)&&p2($[B]))$[B]=s2(C,$[B],(F?`${F}.`:"")+B.toString(),E);else $[B]=C}return $}function qY(D){return(...u)=>u.reduce((F,E)=>s2(F,E,"",D),{})}function zY(D){return Object.prototype.toString.call(D)==="[object Object]"}function UY(D){if(!zY(D))return!1;if(!D.message&&!D.args)return!1;if(D.stack)return!1;return!0}function i2(D,u={},F=3){if(D===void 0)return F;if(typeof D==="number")return D;if(u[D]&&u[D].level!==void 0)return u[D].level;return F}function n9(D={}){return new GD(D)}class GD{constructor(D={}){const u=D.types||t2;this.options=HY({...D,defaults:{...D.defaults},level:i2(D.level,u),reporters:[...D.reporters||[]]},{types:t2,throttle:1000,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(let F in u){const E={type:F,...this.options.defaults,...u[F]};this[F]=this._wrapLogFn(E),this[F].raw=this._wrapLogFn(E,!0)}if(this.options.mockFn)this.mockTypes();this._lastLog={}}get level(){return this.options.level}set level(D){this.options.level=i2(D,this.options.types,this.options.level)}prompt(D,u){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(D,u)}create(D){const u=new GD({...this.options,...D});if(this._mockFn)u.mockTypes(this._mockFn);return u}withDefaults(D){return this.create({...this.options,defaults:{...this.options.defaults,...D}})}withTag(D){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+D:D})}addReporter(D){return this.options.reporters.push(D),this}removeReporter(D){if(D){const u=this.options.reporters.indexOf(D);if(u>=0)return this.options.reporters.splice(u,1)}else this.options.reporters.splice(0);return this}setReporters(D){return this.options.reporters=Array.isArray(D)?D:[D],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(let D in this.options.types){if(!console["__"+D])console["__"+D]=console[D];console[D]=this[D].raw}}restoreConsole(){for(let D in this.options.types)if(console["__"+D])console[D]=console["__"+D],delete console["__"+D]}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(D,u){if(!D)return;if(!D.__write)D.__write=D.write;D.write=(F)=>{this[u].raw(String(F).trim())}}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(D){if(!D)return;if(D.__write)D.write=D.__write,delete D.__write}pauseLogs(){l2=!0}resumeLogs(){l2=!1;const D=d9.splice(0);for(let u of D)u[0]._logFn(u[1],u[2])}mockTypes(D){const u=D||this.options.mockFn;if(this._mockFn=u,typeof u!=="function")return;for(let F in this.options.types)this[F]=u(F,this.options.types[F])||this[F],this[F].raw=this[F]}_wrapLogFn(D,u){return(...F)=>{if(l2){d9.push([this,D,F,u]);return}return this._logFn(D,F,u)}}_logFn(D,u,F){if((D.level||0)>this.level)return!1;const E={date:new Date,args:[],...D,level:i2(D.level,this.options.types)};if(!F&&u.length===1&&UY(u[0]))Object.assign(E,u[0]);else E.args=[...u];if(E.message)E.args.unshift(E.message),delete E.message;if(E.additional){if(!Array.isArray(E.additional))E.additional=E.additional.split("\n");E.args.push("\n"+E.additional.join("\n")),delete E.additional}E.type=typeof E.type==="string"?E.type.toLowerCase():"log",E.tag=typeof E.tag==="string"?E.tag:"";const $=(C=!1)=>{const J=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&J>0){const X=[...this._lastLog.object.args];if(J>1)X.push(`(repeated ${J} times)`);this._log({...this._lastLog.object,args:X}),this._lastLog.count=1}if(C)this._lastLog.object=E,this._log(E)};clearTimeout(this._lastLog.timeout);const B=this._lastLog.time&&E.date?E.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=E.date,B<this.options.throttle)try{const C=JSON.stringify([E.type,E.tag,E.args]),J=this._lastLog.serialized===C;if(this._lastLog.serialized=C,J){if(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin){this._lastLog.timeout=setTimeout($,this.options.throttle);return}}}catch{}$(!0)}_log(D){for(let u of this.options.reporters)u.log(D,{options:this.options})}}var AD,t2,HY,l2=!1,d9;var W8=F0(()=>{AD={silent:Number.NEGATIVE_INFINITY,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},t2={silent:{level:-1},fatal:{level:AD.fatal},error:{level:AD.error},warn:{level:AD.warn},log:{level:AD.log},info:{level:AD.info},success:{level:AD.success},fail:{level:AD.fail},ready:{level:AD.info},start:{level:AD.info},box:{level:AD.info},debug:{level:AD.debug},trace:{level:AD.trace},verbose:{level:AD.verbose}},HY=qY(),d9=[];GD.prototype.add=GD.prototype.addReporter;GD.prototype.remove=GD.prototype.removeReporter;GD.prototype.clear=GD.prototype.removeReporter;GD.prototype.withScope=GD.prototype.withTag;GD.prototype.mock=GD.prototype.mockTypes;GD.prototype.pause=GD.prototype.pauseLogs;GD.prototype.resume=GD.prototype.resumeLogs});import{formatWithOptions as OY}from"util";import{sep as VY}from"path";function o2(D){const u=process.cwd()+VY;return D.split("\n").splice(1).map((E)=>E.trim().replace("file://","").replace(u,""))}function TY(D,u){return(u.__write||u.write).call(u,D)}class Q8{formatStack(D,u){return" "+o2(D).join("\n ")}formatArgs(D,u){const F=D.map((E)=>{if(E&&typeof E.stack==="string")return E.message+"\n"+this.formatStack(E.stack,u);return E});return OY(u,...F)}formatDate(D,u){return u.date?D.toLocaleTimeString():""}filterAndJoin(D){return D.filter(Boolean).join(" ")}formatLogObj(D,u){const F=this.formatArgs(D.args,u);if(D.type==="box")return"\n"+[a2(D.tag),D.title&&D.title,...F.split("\n")].filter(Boolean).map((E)=>" > "+E).join("\n")+"\n";return this.filterAndJoin([a2(D.type),a2(D.tag),F])}log(D,u){const F=this.formatLogObj(D,{columns:u.options.stdout.columns||0,...u.options.formatOptions});return TY(F+"\n",D.level<2?u.options.stderr||process.stderr:u.options.stdout||process.stdout)}}var a2=(D)=>D?`[${D}]`:"";var M8=()=>{};import*as A8 from"tty";function t9(D,u,F,E,$=u.slice(0,Math.max(0,D))+E,B=u.slice(Math.max(0,D+F.length)),C=B.indexOf(F)){return $+(C<0?B:t9(C,B,F,E))}function yY(D,u,F,E,$){return D<0?F+u+E:F+t9(D,u,E,$)+E}function kY(D,u,F=D,E=D.length+1){return($)=>$||!($===""||$===void 0)?yY((""+$).indexOf(u,E),$,D,u,F):""}function d(D,u,F){return kY(`\x1B[${D}m`,`\x1B[${u}m`,F)}function hY(D=RY){return D?r9:Object.fromEntries(Object.keys(r9).map((u)=>[u,String]))}function gY(D,u="reset"){return z[D]||z[u]}function ru(D){return D.replace(new RegExp(_Y,"g"),"")}function s9(D,u={}){const F={...u,style:{...bY,...u.style}},E=D.split("\n"),$=[],B=gY(F.style.borderColor),C={...typeof F.style.borderStyle==="string"?p9[F.style.borderStyle]||p9.solid:F.style.borderStyle};if(B)for(let A in C)C[A]=B(C[A]);const J=F.style.padding%2===0?F.style.padding:F.style.padding+1,X=E.length+J,M=Math.max(...E.map((A)=>A.length))+J,W=M+J,H=F.style.marginLeft>0?" ".repeat(F.style.marginLeft):"";if(F.style.marginTop>0)$.push("".repeat(F.style.marginTop));if(F.title){const A=C.h.repeat(Math.floor((M-ru(F.title).length)/2)),Q=C.h.repeat(M-ru(F.title).length-ru(A).length+J);$.push(`${H}${C.tl}${A}${F.title}${Q}${C.tr}`)}else $.push(`${H}${C.tl}${C.h.repeat(W)}${C.tr}`);const q=F.style.valign==="center"?Math.floor((X-E.length)/2):F.style.valign==="top"?X-E.length-J:X-E.length;for(let A=0;A<X;A++)if(A<q||A>=q+E.length)$.push(`${H}${C.v}${" ".repeat(W)}${C.v}`);else{const Q=E[A-q],y=" ".repeat(J),v=" ".repeat(M-ru(Q).length);$.push(`${H}${C.v}${y}${Q}${v}${C.v}`)}if($.push(`${H}${C.bl}${C.h.repeat(W)}${C.br}`),F.style.marginBottom>0)$.push("".repeat(F.style.marginBottom));return $.join("\n")}var Vu,l9,LY,NY,IY,SY,i9,xY,jY,RY,r9,z,_Y,p9,bY;var G8=F0(()=>{({env:Vu={},argv:l9=[],platform:LY=""}=typeof process==="undefined"?{}:process),NY="NO_COLOR"in Vu||l9.includes("--no-color"),IY="FORCE_COLOR"in Vu||l9.includes("--color"),SY=LY==="win32",i9=Vu.TERM==="dumb",xY=A8&&A8.isatty&&A8.isatty(1)&&Vu.TERM&&!i9,jY="CI"in Vu&&(("GITHUB_ACTIONS"in Vu)||("GITLAB_CI"in Vu)||("CIRCLECI"in Vu)),RY=!NY&&(IY||SY&&!i9||xY||jY),r9={reset:d(0,0),bold:d(1,22,"\x1B[22m\x1B[1m"),dim:d(2,22,"\x1B[22m\x1B[2m"),italic:d(3,23),underline:d(4,24),inverse:d(7,27),hidden:d(8,28),strikethrough:d(9,29),black:d(30,39),red:d(31,39),green:d(32,39),yellow:d(33,39),blue:d(34,39),magenta:d(35,39),cyan:d(36,39),white:d(37,39),gray:d(90,39),bgBlack:d(40,49),bgRed:d(41,49),bgGreen:d(42,49),bgYellow:d(43,49),bgBlue:d(44,49),bgMagenta:d(45,49),bgCyan:d(46,49),bgWhite:d(47,49),blackBright:d(90,39),redBright:d(91,39),greenBright:d(92,39),yellowBright:d(93,39),blueBright:d(94,39),magentaBright:d(95,39),cyanBright:d(96,39),whiteBright:d(97,39),bgBlackBright:d(100,49),bgRedBright:d(101,49),bgGreenBright:d(102,49),bgYellowBright:d(103,49),bgBlueBright:d(104,49),bgMagentaBright:d(105,49),bgCyanBright:d(106,49),bgWhiteBright:d(107,49)},z=hY(),_Y=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),p9={solid:{tl:"\u250C",tr:"\u2510",bl:"\u2514",br:"\u2518",h:"\u2500",v:"\u2502"},double:{tl:"\u2554",tr:"\u2557",bl:"\u255A",br:"\u255D",h:"\u2550",v:"\u2551"},doubleSingle:{tl:"\u2553",tr:"\u2556",bl:"\u2559",br:"\u255C",h:"\u2500",v:"\u2551"},doubleSingleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2551"},singleThick:{tl:"\u250F",tr:"\u2513",bl:"\u2517",br:"\u251B",h:"\u2501",v:"\u2503"},singleDouble:{tl:"\u2552",tr:"\u2555",bl:"\u2558",br:"\u255B",h:"\u2550",v:"\u2502"},singleDoubleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2550",v:"\u2502"},rounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2502"}},bY={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1}});var MC={};c3(MC,{prompt:()=>UZ});import{stdin as PY,stdout as vY}from"process";import a9 from"readline";import{WriteStream as mY}from"tty";import cY from"tty";function iY({onlyFirst:D=!1}={}){const u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,D?void 0:"g")}function YC(D){if(typeof D!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(iY(),"")}function W0(D,u={}){if(typeof D!="string"||D.length===0||(u={ambiguousIsNarrow:!0,...u},D=YC(D),D.length===0))return 0;D=D.replace(aY()," ");const F=u.ambiguousIsNarrow?1:2;let E=0;for(let $ of D){const B=$.codePointAt(0);if(B<=31||B>=127&&B<=159||B>=768&&B<=879)continue;switch(sY.eastAsianWidth($)){case"F":case"W":E+=2;break;case"A":E+=F;break;default:E+=1}}return E}function DZ(){const D=new Map;for(let[u,F]of Object.entries($D)){for(let[E,$]of Object.entries(F))$D[E]={open:`\x1B[${$[0]}m`,close:`\x1B[${$[1]}m`},F[E]=$D[E],D.set($[0],$[1]);Object.defineProperty($D,u,{value:F,enumerable:!1})}return Object.defineProperty($D,"codes",{value:D,enumerable:!1}),$D.color.close="\x1B[39m",$D.bgColor.close="\x1B[49m",$D.color.ansi=o9(),$D.color.ansi256=e9(),$D.color.ansi16m=DC(),$D.bgColor.ansi=o9(D3),$D.bgColor.ansi256=e9(D3),$D.bgColor.ansi16m=DC(D3),Object.defineProperties($D,{rgbToAnsi256:{value:(u,F,E)=>u===F&&F===E?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(F/255*5)+Math.round(E/255*5),enumerable:!1},hexToRgb:{value:(u)=>{const F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!F)return[0,0,0];let[E]=F;E.length===3&&(E=[...E].map((B)=>B+B).join(""));const $=Number.parseInt(E,16);return[$>>16&255,$>>8&255,$&255]},enumerable:!1},hexToAnsi256:{value:(u)=>$D.rgbToAnsi256(...$D.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:(u)=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let F,E,$;if(u>=232)F=((u-232)*10+8)/255,E=F,$=F;else{u-=16;const J=u%36;F=Math.floor(u/36)/5,E=Math.floor(J/6)/5,$=J%6/5}const B=Math.max(F,E,$)*2;if(B===0)return 30;let C=30+(Math.round($)<<2|Math.round(E)<<1|Math.round(F));return B===2&&(C+=60),C},enumerable:!1},rgbToAnsi:{value:(u,F,E)=>$D.ansi256ToAnsi($D.rgbToAnsi256(u,F,E)),enumerable:!1},hexToAnsi:{value:(u)=>$D.ansi256ToAnsi($D.hexToAnsi256(u)),enumerable:!1}}),$D}function CC(D,u,F){return String(D).normalize().replace(/\r\n/g,`
|
|
3
|
+
`).split(`
|
|
4
|
+
`).map((E)=>BZ(E,u,F)).join(`
|
|
5
|
+
`)}function wZ(D,u){if(D===u)return;const F=D.split(`
|
|
6
|
+
`),E=u.split(`
|
|
7
|
+
`),$=[];for(let B=0;B<Math.max(F.length,E.length);B++)F[B]!==E[B]&&$.push(B);return $}function q8(D,u){D.isTTY&&D.setRawMode(u)}async function UZ(D,u={}){if(!u.type||u.type==="text")return await GZ({message:D,defaultValue:u.default,placeholder:u.placeholder,initialValue:u.initial});if(u.type==="confirm")return await qZ({message:D,initialValue:u.initial});if(u.type==="select")return await HZ({message:D,options:u.options.map((F)=>typeof F==="string"?{value:F,label:F}:F)});if(u.type==="multiselect")return await zZ({message:D,options:u.options.map((F)=>typeof F==="string"?{value:F,label:F}:F),required:u.required});throw new Error(`Unknown prompt type: ${u.type}`)}class Q0{constructor({render:D,input:u=PY,output:F=vY,...E},$=!0){this._track=!1,this._cursor=0,this.state="initial",this.error="",this.subscribers=new Map,this._prevFrame="",this.opts=E,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=D.bind(this),this._track=$,this.input=u,this.output=F}prompt(){const D=new mY(0);return D._write=(u,F,E)=>{this._track&&(this.value=this.rl.line.replace(/\t/g,""),this._cursor=this.rl.cursor,this.emit("value",this.value)),E()},this.input.pipe(D),this.rl=a9.createInterface({input:this.input,output:D,tabSize:2,prompt:"",escapeCodeTimeout:50}),a9.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),q8(this.input,!0),this.output.on("resize",this.render),this.render(),new Promise((u,F)=>{this.once("submit",()=>{this.output.write(uu.cursor.show),this.output.off("resize",this.render),q8(this.input,!1),u(this.value)}),this.once("cancel",()=>{this.output.write(uu.cursor.show),this.output.off("resize",this.render),q8(this.input,!1),u(YZ)})})}on(D,u){const F=this.subscribers.get(D)??[];F.push({cb:u}),this.subscribers.set(D,F)}once(D,u){const F=this.subscribers.get(D)??[];F.push({cb:u,once:!0}),this.subscribers.set(D,F)}emit(D,...u){const F=this.subscribers.get(D)??[],E=[];for(let $ of F)$.cb(...u),$.once&&E.push(()=>F.splice(F.indexOf($),1));for(let $ of E)$()}unsubscribe(){this.subscribers.clear()}onKeypress(D,u){if(this.state==="error"&&(this.state="active"),u?.name&&!this._track&&EC.has(u.name)&&this.emit("cursor",EC.get(u.name)),u?.name&&ZZ.has(u.name)&&this.emit("cursor",u.name),D&&(D.toLowerCase()==="y"||D.toLowerCase()==="n")&&this.emit("confirm",D.toLowerCase()==="y"),D&&this.emit("key",D.toLowerCase()),u?.name==="return"){if(this.opts.validate){const F=this.opts.validate(this.value);F&&(this.error=F,this.state="error",this.rl.write(this.value))}this.state!=="error"&&(this.state="submit")}D===""&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
|
|
8
|
+
`),q8(this.input,!1),this.rl.close(),this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){const D=CC(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
9
|
+
`).length-1;this.output.write(uu.cursor.move(-999,D*-1))}render(){const D=CC(this._render(this)??"",process.stdout.columns,{hard:!0});if(D!==this._prevFrame){if(this.state==="initial")this.output.write(uu.cursor.hide);else{const u=wZ(this._prevFrame,D);if(this.restoreCursor(),u&&u?.length===1){const F=u[0];this.output.write(uu.cursor.move(0,F)),this.output.write(uu.erase.lines(1));const E=D.split(`
|
|
10
|
+
`);this.output.write(E[F]),this._prevFrame=D,this.output.write(uu.cursor.move(0,E.length-F-1));return}else if(u&&u?.length>1){const F=u[0];this.output.write(uu.cursor.move(0,F)),this.output.write(uu.erase.down());const E=D.split(`
|
|
11
|
+
`).slice(F);this.output.write(E.join(`
|
|
12
|
+
`)),this._prevFrame=D;return}this.output.write(uu.erase.down())}this.output.write(D),this.state==="initial"&&(this.state="active"),this._prevFrame=D}}}var F3="\x1B",YD,fY="\x07",C3,dY,nY,uu,w3,rY,pY,ED=(D,u,F=D)=>(E)=>{let $=""+E,B=$.indexOf(u,D.length);return~B?D+BC($,u,F,B)+u:D+$+u},BC=(D,u,F,E)=>{let $=D.substring(0,E)+F,B=D.substring(E+u.length),C=B.indexOf(u);return~C?$+BC(B,u,F,C):$+B},wC=(D=pY)=>({isColorSupported:D,reset:D?(u)=>`\x1B[0m${u}\x1B[0m`:String,bold:D?ED("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:D?ED("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:D?ED("\x1B[3m","\x1B[23m"):String,underline:D?ED("\x1B[4m","\x1B[24m"):String,inverse:D?ED("\x1B[7m","\x1B[27m"):String,hidden:D?ED("\x1B[8m","\x1B[28m"):String,strikethrough:D?ED("\x1B[9m","\x1B[29m"):String,black:D?ED("\x1B[30m","\x1B[39m"):String,red:D?ED("\x1B[31m","\x1B[39m"):String,green:D?ED("\x1B[32m","\x1B[39m"):String,yellow:D?ED("\x1B[33m","\x1B[39m"):String,blue:D?ED("\x1B[34m","\x1B[39m"):String,magenta:D?ED("\x1B[35m","\x1B[39m"):String,cyan:D?ED("\x1B[36m","\x1B[39m"):String,white:D?ED("\x1B[37m","\x1B[39m"):String,gray:D?ED("\x1B[90m","\x1B[39m"):String,bgBlack:D?ED("\x1B[40m","\x1B[49m"):String,bgRed:D?ED("\x1B[41m","\x1B[49m"):String,bgGreen:D?ED("\x1B[42m","\x1B[49m"):String,bgYellow:D?ED("\x1B[43m","\x1B[49m"):String,bgBlue:D?ED("\x1B[44m","\x1B[49m"):String,bgMagenta:D?ED("\x1B[45m","\x1B[49m"):String,bgCyan:D?ED("\x1B[46m","\x1B[49m"):String,bgWhite:D?ED("\x1B[47m","\x1B[49m"):String}),lY,e2,E3,tY,sY,aY=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},D3=10,o9=(D=0)=>(u)=>`\x1B[${u+D}m`,e9=(D=0)=>(u)=>`\x1B[${38+D};5;${u}m`,DC=(D=0)=>(u,F,E)=>`\x1B[${38+D};2;${u};${F};${E}m`,$D,oY,eY,uZ,H8,FZ=39,Y3="\x07",ZC="[",CZ="]",JC="m",Z3,uC=(D)=>`${H8.values().next().value}${ZC}${D}${JC}`,FC=(D)=>`${H8.values().next().value}${Z3}${D}${Y3}`,EZ=(D)=>D.split(" ").map((u)=>W0(u)),u3=(D,u,F)=>{const E=[...u];let $=!1,B=!1,C=W0(YC(D[D.length-1]));for(let[J,X]of E.entries()){const M=W0(X);if(C+M<=F?D[D.length-1]+=X:(D.push(X),C=0),H8.has(X)&&($=!0,B=E.slice(J+1).join("").startsWith(Z3)),$){B?X===Y3&&($=!1,B=!1):X===JC&&($=!1);continue}C+=M,C===F&&J<E.length-1&&(D.push(""),C=0)}!C&&D[D.length-1].length>0&&D.length>1&&(D[D.length-2]+=D.pop())},$Z=(D)=>{const u=D.split(" ");let F=u.length;for(;F>0&&!(W0(u[F-1])>0);)F--;return F===u.length?D:u.slice(0,F).join(" ")+u.slice(F).join("")},BZ=(D,u,F={})=>{if(F.trim!==!1&&D.trim()==="")return"";let E="",$,B;const C=EZ(D);let J=[""];for(let[M,W]of D.split(" ").entries()){F.trim!==!1&&(J[J.length-1]=J[J.length-1].trimStart());let H=W0(J[J.length-1]);if(M!==0&&(H>=u&&(F.wordWrap===!1||F.trim===!1)&&(J.push(""),H=0),(H>0||F.trim===!1)&&(J[J.length-1]+=" ",H++)),F.hard&&C[M]>u){const q=u-H,A=1+Math.floor((C[M]-q-1)/u);Math.floor((C[M]-1)/u)<A&&J.push(""),u3(J,W,u);continue}if(H+C[M]>u&&H>0&&C[M]>0){if(F.wordWrap===!1&&H<u){u3(J,W,u);continue}J.push("")}if(H+C[M]>u&&F.wordWrap===!1){u3(J,W,u);continue}J[J.length-1]+=W}F.trim!==!1&&(J=J.map((M)=>$Z(M)));const X=[...J.join(`
|
|
13
|
+
`)];for(let[M,W]of X.entries()){if(E+=W,H8.has(W)){const{groups:q}=new RegExp(`(?:\\${ZC}(?<code>\\d+)m|\\${Z3}(?<uri>.*)${Y3})`).exec(X.slice(M).join(""))||{groups:{}};if(q.code!==void 0){const A=Number.parseFloat(q.code);$=A===FZ?void 0:A}else q.uri!==void 0&&(B=q.uri.length===0?void 0:q.uri)}const H=uZ.codes.get(Number($));X[M+1]===`
|
|
14
|
+
`?(B&&(E+=FC("")),$&&H&&(E+=uC(H))):W===`
|
|
15
|
+
`&&($&&H&&(E+=uC($)),B&&(E+=FC(B)))}return E},YZ,EC,ZZ,KC,XC,WC,QC,JZ,Mu=(D,u)=>JZ?D:u,KZ,XZ,WZ,QZ,uD="",pu="",$3,B3,MZ,$C,AZ,z8=(D)=>{switch(D){case"initial":case"active":return z.cyan(KZ);case"cancel":return z.red(XZ);case"error":return z.yellow(WZ);case"submit":return z.green(QZ)}},GZ=(D)=>{return new QC({validate:D.validate,placeholder:D.placeholder,defaultValue:D.defaultValue,initialValue:D.initialValue,render(){const u=`${z.gray(uD)}
|
|
16
|
+
${z8(this.state)} ${D.message}
|
|
17
|
+
`,F=D.placeholder?z.inverse(D.placeholder[0])+z.dim(D.placeholder.slice(1)):z.inverse(z.hidden("_")),E=this.value?this.valueWithCursor:F;switch(this.state){case"error":return`${u.trim()}
|
|
18
|
+
${z.yellow(uD)} ${E}
|
|
19
|
+
${z.yellow(pu)} ${z.yellow(this.error)}
|
|
20
|
+
`;case"submit":return`${u}${z.gray(uD)} ${z.dim(this.value||D.placeholder)}`;case"cancel":return`${u}${z.gray(uD)} ${z.strikethrough(z.dim(this.value??""))}${this.value?.trim()?"\n"+z.gray(uD):""}`;default:return`${u}${z.cyan(uD)} ${E}
|
|
21
|
+
${z.cyan(pu)}
|
|
22
|
+
`}}}).prompt()},qZ=(D)=>{const u=D.active??"Yes",F=D.inactive??"No";return new KC({active:u,inactive:F,initialValue:D.initialValue??!0,render(){const E=`${z.gray(uD)}
|
|
23
|
+
${z8(this.state)} ${D.message}
|
|
24
|
+
`,$=this.value?u:F;switch(this.state){case"submit":return`${E}${z.gray(uD)} ${z.dim($)}`;case"cancel":return`${E}${z.gray(uD)} ${z.strikethrough(z.dim($))}
|
|
25
|
+
${z.gray(uD)}`;default:return`${E}${z.cyan(uD)} ${this.value?`${z.green($3)} ${u}`:`${z.dim(B3)} ${z.dim(u)}`} ${z.dim("/")} ${this.value?`${z.dim(B3)} ${z.dim(F)}`:`${z.green($3)} ${F}`}
|
|
26
|
+
${z.cyan(pu)}
|
|
27
|
+
`}}}).prompt()},HZ=(D)=>{const u=(F,E)=>{const $=F.label??String(F.value);switch(E){case"active":return`${z.green($3)} ${$} ${F.hint?z.dim(`(${F.hint})`):""}`;case"selected":return`${z.dim($)}`;case"cancelled":return`${z.strikethrough(z.dim($))}`}return`${z.dim(B3)} ${z.dim($)}`};return new WC({options:D.options,initialValue:D.initialValue,render(){const F=`${z.gray(uD)}
|
|
28
|
+
${z8(this.state)} ${D.message}
|
|
29
|
+
`;switch(this.state){case"submit":return`${F}${z.gray(uD)} ${u(this.options[this.cursor],"selected")}`;case"cancel":return`${F}${z.gray(uD)} ${u(this.options[this.cursor],"cancelled")}
|
|
30
|
+
${z.gray(uD)}`;default:return`${F}${z.cyan(uD)} ${this.options.map((E,$)=>u(E,$===this.cursor?"active":"inactive")).join(`
|
|
31
|
+
${z.cyan(uD)} `)}
|
|
32
|
+
${z.cyan(pu)}
|
|
33
|
+
`}}}).prompt()},zZ=(D)=>{const u=(F,E)=>{const $=F.label??String(F.value);switch(E){case"active":return`${z.cyan(MZ)} ${$} ${F.hint?z.dim(`(${F.hint})`):""}`;case"selected":return`${z.green($C)} ${z.dim($)}`;case"cancelled":return`${z.strikethrough(z.dim($))}`;case"active-selected":return`${z.green($C)} ${$} ${F.hint?z.dim(`(${F.hint})`):""}`;case"submitted":return`${z.dim($)}`}return`${z.dim(AZ)} ${z.dim($)}`};return new XC({options:D.options,initialValues:D.initialValues,required:D.required??!0,cursorAt:D.cursorAt,validate(F){if(this.required&&F.length===0)return`Please select at least one option.
|
|
34
|
+
${z.reset(z.dim(`Press ${z.gray(z.bgWhite(z.inverse(" space ")))} to select, ${z.gray(z.bgWhite(z.inverse(" enter ")))} to submit`))}`},render(){const F=`${z.gray(uD)}
|
|
35
|
+
${z8(this.state)} ${D.message}
|
|
36
|
+
`;switch(this.state){case"submit":return`${F}${z.gray(uD)} ${this.options.filter(({value:E})=>this.value.includes(E)).map((E)=>u(E,"submitted")).join(z.dim(", "))||z.dim("none")}`;case"cancel":{const E=this.options.filter(({value:$})=>this.value.includes($)).map(($)=>u($,"cancelled")).join(z.dim(", "));return`${F}${z.gray(uD)} ${E.trim()?`${E}
|
|
37
|
+
${z.gray(uD)}`:""}`}case"error":{const E=this.error.split("\n").map(($,B)=>B===0?`${z.yellow(pu)} ${z.yellow($)}`:` ${$}`).join("\n");return F+z.yellow(uD)+" "+this.options.map(($,B)=>{const C=this.value.includes($.value),J=B===this.cursor;if(J&&C)return u($,"active-selected");if(C)return u($,"selected");return u($,J?"active":"inactive")}).join(`
|
|
38
|
+
${z.yellow(uD)} `)+"\n"+E+"\n"}default:return`${F}${z.cyan(uD)} ${this.options.map((E,$)=>{const B=this.value.includes(E.value),C=$===this.cursor;if(C&&B)return u(E,"active-selected");if(B)return u(E,"selected");return u(E,C?"active":"inactive")}).join(`
|
|
39
|
+
${z.cyan(uD)} `)}
|
|
40
|
+
${z.cyan(pu)}
|
|
41
|
+
`}}}).prompt()};var AC=F0(()=>{X3();G8();W8();M8();YD=`${F3}[`,C3={to(D,u){if(!u)return`${YD}${D+1}G`;return`${YD}${u+1};${D+1}H`},move(D,u){let F="";if(D<0)F+=`${YD}${-D}D`;else if(D>0)F+=`${YD}${D}C`;if(u<0)F+=`${YD}${-u}A`;else if(u>0)F+=`${YD}${u}B`;return F},up:(D=1)=>`${YD}${D}A`,down:(D=1)=>`${YD}${D}B`,forward:(D=1)=>`${YD}${D}C`,backward:(D=1)=>`${YD}${D}D`,nextLine:(D=1)=>`${YD}E`.repeat(D),prevLine:(D=1)=>`${YD}F`.repeat(D),left:`${YD}G`,hide:`${YD}?25l`,show:`${YD}?25h`,save:`${F3}7`,restore:`${F3}8`},dY={up:(D=1)=>`${YD}S`.repeat(D),down:(D=1)=>`${YD}T`.repeat(D)},nY={screen:`${YD}2J`,up:(D=1)=>`${YD}1J`.repeat(D),down:(D=1)=>`${YD}J`.repeat(D),line:`${YD}2K`,lineEnd:`${YD}K`,lineStart:`${YD}1K`,lines(D){let u="";for(let F=0;F<D;F++)u+=this.line+(F<D-1?C3.up():"");if(D)u+=C3.left;return u}},uu={cursor:C3,scroll:dY,erase:nY,beep:fY},w3={exports:{}},rY=cY,pY=!(("NO_COLOR"in process.env)||process.argv.includes("--no-color"))&&(("FORCE_COLOR"in process.env)||process.argv.includes("--color")||process.platform==="win32"||rY.isatty(1)&&process.env.TERM!=="dumb"||("CI"in process.env));w3.exports=wC();w3.exports.createColors=wC;lY=w3.exports,e2=J3(lY),E3={},tY={get exports(){return E3},set exports(D){E3=D}};(function(D){var u={};D.exports=u,u.eastAsianWidth=function(E){var $=E.charCodeAt(0),B=E.length==2?E.charCodeAt(1):0,C=$;return 55296<=$&&$<=56319&&56320<=B&&B<=57343&&($&=1023,B&=1023,C=$<<10|B,C+=65536),C==12288||65281<=C&&C<=65376||65504<=C&&C<=65510?"F":C==8361||65377<=C&&C<=65470||65474<=C&&C<=65479||65482<=C&&C<=65487||65490<=C&&C<=65495||65498<=C&&C<=65500||65512<=C&&C<=65518?"H":4352<=C&&C<=4447||4515<=C&&C<=4519||4602<=C&&C<=4607||9001<=C&&C<=9002||11904<=C&&C<=11929||11931<=C&&C<=12019||12032<=C&&C<=12245||12272<=C&&C<=12283||12289<=C&&C<=12350||12353<=C&&C<=12438||12441<=C&&C<=12543||12549<=C&&C<=12589||12593<=C&&C<=12686||12688<=C&&C<=12730||12736<=C&&C<=12771||12784<=C&&C<=12830||12832<=C&&C<=12871||12880<=C&&C<=13054||13056<=C&&C<=19903||19968<=C&&C<=42124||42128<=C&&C<=42182||43360<=C&&C<=43388||44032<=C&&C<=55203||55216<=C&&C<=55238||55243<=C&&C<=55291||63744<=C&&C<=64255||65040<=C&&C<=65049||65072<=C&&C<=65106||65108<=C&&C<=65126||65128<=C&&C<=65131||110592<=C&&C<=110593||127488<=C&&C<=127490||127504<=C&&C<=127546||127552<=C&&C<=127560||127568<=C&&C<=127569||131072<=C&&C<=194367||177984<=C&&C<=196605||196608<=C&&C<=262141?"W":32<=C&&C<=126||162<=C&&C<=163||165<=C&&C<=166||C==172||C==175||10214<=C&&C<=10221||10629<=C&&C<=10630?"Na":C==161||C==164||167<=C&&C<=168||C==170||173<=C&&C<=174||176<=C&&C<=180||182<=C&&C<=186||188<=C&&C<=191||C==198||C==208||215<=C&&C<=216||222<=C&&C<=225||C==230||232<=C&&C<=234||236<=C&&C<=237||C==240||242<=C&&C<=243||247<=C&&C<=250||C==252||C==254||C==257||C==273||C==275||C==283||294<=C&&C<=295||C==299||305<=C&&C<=307||C==312||319<=C&&C<=322||C==324||328<=C&&C<=331||C==333||338<=C&&C<=339||358<=C&&C<=359||C==363||C==462||C==464||C==466||C==468||C==470||C==472||C==474||C==476||C==593||C==609||C==708||C==711||713<=C&&C<=715||C==717||C==720||728<=C&&C<=731||C==733||C==735||768<=C&&C<=879||913<=C&&C<=929||931<=C&&C<=937||945<=C&&C<=961||963<=C&&C<=969||C==1025||1040<=C&&C<=1103||C==1105||C==8208||8211<=C&&C<=8214||8216<=C&&C<=8217||8220<=C&&C<=8221||8224<=C&&C<=8226||8228<=C&&C<=8231||C==8240||8242<=C&&C<=8243||C==8245||C==8251||C==8254||C==8308||C==8319||8321<=C&&C<=8324||C==8364||C==8451||C==8453||C==8457||C==8467||C==8470||8481<=C&&C<=8482||C==8486||C==8491||8531<=C&&C<=8532||8539<=C&&C<=8542||8544<=C&&C<=8555||8560<=C&&C<=8569||C==8585||8592<=C&&C<=8601||8632<=C&&C<=8633||C==8658||C==8660||C==8679||C==8704||8706<=C&&C<=8707||8711<=C&&C<=8712||C==8715||C==8719||C==8721||C==8725||C==8730||8733<=C&&C<=8736||C==8739||C==8741||8743<=C&&C<=8748||C==8750||8756<=C&&C<=8759||8764<=C&&C<=8765||C==8776||C==8780||C==8786||8800<=C&&C<=8801||8804<=C&&C<=8807||8810<=C&&C<=8811||8814<=C&&C<=8815||8834<=C&&C<=8835||8838<=C&&C<=8839||C==8853||C==8857||C==8869||C==8895||C==8978||9312<=C&&C<=9449||9451<=C&&C<=9547||9552<=C&&C<=9587||9600<=C&&C<=9615||9618<=C&&C<=9621||9632<=C&&C<=9633||9635<=C&&C<=9641||9650<=C&&C<=9651||9654<=C&&C<=9655||9660<=C&&C<=9661||9664<=C&&C<=9665||9670<=C&&C<=9672||C==9675||9678<=C&&C<=9681||9698<=C&&C<=9701||C==9711||9733<=C&&C<=9734||C==9737||9742<=C&&C<=9743||9748<=C&&C<=9749||C==9756||C==9758||C==9792||C==9794||9824<=C&&C<=9825||9827<=C&&C<=9829||9831<=C&&C<=9834||9836<=C&&C<=9837||C==9839||9886<=C&&C<=9887||9918<=C&&C<=9919||9924<=C&&C<=9933||9935<=C&&C<=9953||C==9955||9960<=C&&C<=9983||C==10045||C==10071||10102<=C&&C<=10111||11093<=C&&C<=11097||12872<=C&&C<=12879||57344<=C&&C<=63743||65024<=C&&C<=65039||C==65533||127232<=C&&C<=127242||127248<=C&&C<=127277||127280<=C&&C<=127337||127344<=C&&C<=127386||917760<=C&&C<=917999||983040<=C&&C<=1048573||1048576<=C&&C<=1114109?"A":"N"},u.characterLength=function(E){var $=this.eastAsianWidth(E);return $=="F"||$=="W"||$=="A"?2:1};function F(E){return E.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function(E){for(var $=F(E),B=0,C=0;C<$.length;C++)B=B+this.characterLength($[C]);return B},u.slice=function(E,$,B){textLen=u.length(E),$=$||0,B=B||1,$<0&&($=textLen+$),B<0&&(B=textLen+B);for(var C="",J=0,X=F(E),M=0;M<X.length;M++){var W=X[M],H=u.length(W);if(J>=$-(H==2?1:0))if(J+H<=B)C+=W;else break;J+=H}return C}})(tY);sY=E3,$D={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys($D.modifier);oY=Object.keys($D.color),eY=Object.keys($D.bgColor);[...oY];uZ=DZ(),H8=new Set(["\x1B","\x9B"]),Z3=`${CZ}8;;`,YZ=Symbol("clack:cancel"),EC=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),ZZ=new Set(["up","down","left","right","space","enter"]);KC=class KC extends Q0{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(D){super(D,!1),this.value=!!D.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",(u)=>{this.output.write(uu.cursor.move(0,-1)),this.value=u,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};XC=class XC extends Q0{constructor(D){super(D,!1),this.cursor=0,this.options=D.options,this.value=[...D.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:u})=>u===D.cursorAt),0),this.on("key",(u)=>{u==="a"&&this.toggleAll()}),this.on("cursor",(u)=>{switch(u){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){const D=this.value.length===this.options.length;this.value=D?[]:this.options.map((u)=>u.value)}toggleValue(){const D=this.value.includes(this._value);this.value=D?this.value.filter((u)=>u!==this._value):[...this.value,this._value]}};WC=class WC extends Q0{constructor(D){super(D,!1),this.cursor=0,this.options=D.options,this.cursor=this.options.findIndex(({value:u})=>u===D.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",(u)=>{switch(u){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}};QC=class QC extends Q0{constructor(D){super(D),this.valueWithCursor="",this.on("finalize",()=>{this.value||(this.value=D.defaultValue),this.valueWithCursor=this.value}),this.on("value",()=>{if(this.cursor>=this.value.length)this.valueWithCursor=`${this.value}${e2.inverse(e2.hidden("_"))}`;else{const u=this.value.slice(0,this.cursor),F=this.value.slice(this.cursor);this.valueWithCursor=`${u}${e2.inverse(F[0])}${F.slice(1)}`}})}get cursor(){return this._cursor}};JZ=K3(),KZ=Mu("\u276F",">"),XZ=Mu("\u25A0","x"),WZ=Mu("\u25B2","x"),QZ=Mu("\u2714","\u221A"),$3=Mu("\u25CF",">"),B3=Mu("\u25CB"," "),MZ=Mu("\u25FB","[\u2022]"),$C=Mu("\u25FC","[+]"),AZ=Mu("\u25FB","[ ]")});import Fu from"process";function VZ(D){for(let u of OZ){const F=u[1]||u[0];if(D[F])return{name:u[0].toLowerCase(),...u[2]}}if(D.SHELL&&D.SHELL==="/bin/jsh")return{name:"stackblitz",ci:!1};return{name:"",ci:!1}}function A0(D){return D?D!=="false":!1}function IZ({onlyFirst:D=!1}={}){const u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,D?void 0:"g")}function xZ(D){if(typeof D!=="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(SZ,"")}function J3(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}function kZ(D,u){if(typeof D!=="string"||D.length===0)return 0;if(u={ambiguousIsNarrow:!0,countAnsiEscapeCodes:!1,...u},!u.countAnsiEscapeCodes)D=xZ(D);if(D.length===0)return 0;const F=u.ambiguousIsNarrow?1:2;let E=0;for(let{segment:$}of new Intl.Segmenter().segment(D)){const B=$.codePointAt(0);if(B<=31||B>=127&&B<=159)continue;if(B>=768&&B<=879)continue;if(yZ().test($)){E+=2;continue}switch(RZ.eastAsianWidth($)){case"F":case"W":{E+=2;break}case"A":{E+=F;break}default:E+=1}}return E}function K3(){if(Fu.platform!=="win32")return Fu.env.TERM!=="linux";return Boolean(Fu.env.CI)||Boolean(Fu.env.WT_SESSION)||Boolean(Fu.env.TERMINUS_SUBLIME)||Fu.env.ConEmuTask==="{cmd::Cmder}"||Fu.env.TERM_PROGRAM==="Terminus-Sublime"||Fu.env.TERM_PROGRAM==="vscode"||Fu.env.TERM==="xterm-256color"||Fu.env.TERM==="alacritty"||Fu.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}function qC(D){if(!Intl.Segmenter)return ru(D).length;return kZ(D)}function U8(D){return D.replace(/`([^`]+)`/gm,(u,F)=>z.cyan(F)).replace(/\s+_([^_]+)_\s+/gm,(u,F)=>` ${z.underline(F)} `)}function bZ(D="white"){return z[D]||z.white}function PZ(D="bgWhite"){return z[`bg${D[0].toUpperCase()}${D.slice(1)}`]||z.bgWhite}function V8(D={}){let u=vZ();if(process.env.CONSOLA_LEVEL)u=Number.parseInt(process.env.CONSOLA_LEVEL)??u;return n9({level:u,defaults:{level:u},stdout:process.stdout,stderr:process.stderr,prompt:(...E)=>Promise.resolve().then(() => (AC(),MC)).then(($)=>$.prompt(...E)),reporters:D.reporters||[D.fancy??!(zC||W3)?new OC:new Q8],...D})}function vZ(){if(NZ)return AD.debug;if(W3)return AD.warn;return AD.info}var OZ,O8,M0,HC,TZ,zC,LZ,NZ,W3,SZ,UC,jZ,RZ,yZ=()=>{return/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g},hZ,gZ,_Z,Yu=(D,u)=>_Z?D:u,GC,OC,Q3;var X3=F0(()=>{W8();M8();G8();OZ=[["APPVEYOR"],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"]],O8=typeof process!=="undefined"?process:{},M0=O8.env||{},HC=VZ(M0),TZ=typeof process!=="undefined"&&process.env&&"development"||"";O8.platform;HC.name;zC=A0(M0.CI)||HC.ci!==!1,LZ=A0(O8.stdout&&O8.stdout.isTTY),NZ=A0(M0.DEBUG),W3=TZ==="test"||A0(M0.TEST);A0(M0.MINIMAL);SZ=IZ(),UC={exports:{}};(function(D){var u={};D.exports=u,u.eastAsianWidth=function(E){var $=E.charCodeAt(0),B=E.length==2?E.charCodeAt(1):0,C=$;if(55296<=$&&$<=56319&&(56320<=B&&B<=57343))$&=1023,B&=1023,C=$<<10|B,C+=65536;if(C==12288||65281<=C&&C<=65376||65504<=C&&C<=65510)return"F";if(C==8361||65377<=C&&C<=65470||65474<=C&&C<=65479||65482<=C&&C<=65487||65490<=C&&C<=65495||65498<=C&&C<=65500||65512<=C&&C<=65518)return"H";if(4352<=C&&C<=4447||4515<=C&&C<=4519||4602<=C&&C<=4607||9001<=C&&C<=9002||11904<=C&&C<=11929||11931<=C&&C<=12019||12032<=C&&C<=12245||12272<=C&&C<=12283||12289<=C&&C<=12350||12353<=C&&C<=12438||12441<=C&&C<=12543||12549<=C&&C<=12589||12593<=C&&C<=12686||12688<=C&&C<=12730||12736<=C&&C<=12771||12784<=C&&C<=12830||12832<=C&&C<=12871||12880<=C&&C<=13054||13056<=C&&C<=19903||19968<=C&&C<=42124||42128<=C&&C<=42182||43360<=C&&C<=43388||44032<=C&&C<=55203||55216<=C&&C<=55238||55243<=C&&C<=55291||63744<=C&&C<=64255||65040<=C&&C<=65049||65072<=C&&C<=65106||65108<=C&&C<=65126||65128<=C&&C<=65131||110592<=C&&C<=110593||127488<=C&&C<=127490||127504<=C&&C<=127546||127552<=C&&C<=127560||127568<=C&&C<=127569||131072<=C&&C<=194367||177984<=C&&C<=196605||196608<=C&&C<=262141)return"W";if(32<=C&&C<=126||162<=C&&C<=163||165<=C&&C<=166||C==172||C==175||10214<=C&&C<=10221||10629<=C&&C<=10630)return"Na";if(C==161||C==164||167<=C&&C<=168||C==170||173<=C&&C<=174||176<=C&&C<=180||182<=C&&C<=186||188<=C&&C<=191||C==198||C==208||215<=C&&C<=216||222<=C&&C<=225||C==230||232<=C&&C<=234||236<=C&&C<=237||C==240||242<=C&&C<=243||247<=C&&C<=250||C==252||C==254||C==257||C==273||C==275||C==283||294<=C&&C<=295||C==299||305<=C&&C<=307||C==312||319<=C&&C<=322||C==324||328<=C&&C<=331||C==333||338<=C&&C<=339||358<=C&&C<=359||C==363||C==462||C==464||C==466||C==468||C==470||C==472||C==474||C==476||C==593||C==609||C==708||C==711||713<=C&&C<=715||C==717||C==720||728<=C&&C<=731||C==733||C==735||768<=C&&C<=879||913<=C&&C<=929||931<=C&&C<=937||945<=C&&C<=961||963<=C&&C<=969||C==1025||1040<=C&&C<=1103||C==1105||C==8208||8211<=C&&C<=8214||8216<=C&&C<=8217||8220<=C&&C<=8221||8224<=C&&C<=8226||8228<=C&&C<=8231||C==8240||8242<=C&&C<=8243||C==8245||C==8251||C==8254||C==8308||C==8319||8321<=C&&C<=8324||C==8364||C==8451||C==8453||C==8457||C==8467||C==8470||8481<=C&&C<=8482||C==8486||C==8491||8531<=C&&C<=8532||8539<=C&&C<=8542||8544<=C&&C<=8555||8560<=C&&C<=8569||C==8585||8592<=C&&C<=8601||8632<=C&&C<=8633||C==8658||C==8660||C==8679||C==8704||8706<=C&&C<=8707||8711<=C&&C<=8712||C==8715||C==8719||C==8721||C==8725||C==8730||8733<=C&&C<=8736||C==8739||C==8741||8743<=C&&C<=8748||C==8750||8756<=C&&C<=8759||8764<=C&&C<=8765||C==8776||C==8780||C==8786||8800<=C&&C<=8801||8804<=C&&C<=8807||8810<=C&&C<=8811||8814<=C&&C<=8815||8834<=C&&C<=8835||8838<=C&&C<=8839||C==8853||C==8857||C==8869||C==8895||C==8978||9312<=C&&C<=9449||9451<=C&&C<=9547||9552<=C&&C<=9587||9600<=C&&C<=9615||9618<=C&&C<=9621||9632<=C&&C<=9633||9635<=C&&C<=9641||9650<=C&&C<=9651||9654<=C&&C<=9655||9660<=C&&C<=9661||9664<=C&&C<=9665||9670<=C&&C<=9672||C==9675||9678<=C&&C<=9681||9698<=C&&C<=9701||C==9711||9733<=C&&C<=9734||C==9737||9742<=C&&C<=9743||9748<=C&&C<=9749||C==9756||C==9758||C==9792||C==9794||9824<=C&&C<=9825||9827<=C&&C<=9829||9831<=C&&C<=9834||9836<=C&&C<=9837||C==9839||9886<=C&&C<=9887||9918<=C&&C<=9919||9924<=C&&C<=9933||9935<=C&&C<=9953||C==9955||9960<=C&&C<=9983||C==10045||C==10071||10102<=C&&C<=10111||11093<=C&&C<=11097||12872<=C&&C<=12879||57344<=C&&C<=63743||65024<=C&&C<=65039||C==65533||127232<=C&&C<=127242||127248<=C&&C<=127277||127280<=C&&C<=127337||127344<=C&&C<=127386||917760<=C&&C<=917999||983040<=C&&C<=1048573||1048576<=C&&C<=1114109)return"A";return"N"},u.characterLength=function(E){var $=this.eastAsianWidth(E);if($=="F"||$=="W"||$=="A")return 2;else return 1};function F(E){return E.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function(E){var $=F(E),B=0;for(var C=0;C<$.length;C++)B=B+this.characterLength($[C]);return B},u.slice=function(E,$,B){if(textLen=u.length(E),$=$?$:0,B=B?B:1,$<0)$=textLen+$;if(B<0)B=textLen+B;var C="",J=0,X=F(E);for(var M=0;M<X.length;M++){var W=X[M],H=u.length(W);if(J>=$-(H==2?1:0))if(J+H<=B)C+=W;else break;J+=H}return C}})(UC);jZ=UC.exports,RZ=J3(jZ),hZ={info:"cyan",fail:"red",success:"green",ready:"green",start:"magenta"},gZ={0:"red",1:"yellow"},_Z=K3(),GC={error:Yu("\u2716","\xD7"),fatal:Yu("\u2716","\xD7"),ready:Yu("\u2714","\u221A"),warn:Yu("\u26A0","\u203C"),info:Yu("\u2139","i"),success:Yu("\u2714","\u221A"),debug:Yu("\u2699","D"),trace:Yu("\u2192","\u2192"),fail:Yu("\u2716","\xD7"),start:Yu("\u25D0","o"),log:""};OC=class OC extends Q8{formatStack(D){return"\n"+o2(D).map((u)=>" "+u.replace(/^at +/,(F)=>z.gray(F)).replace(/\((.+)\)/,(F,E)=>`(${z.cyan(E)})`)).join("\n")}formatType(D,u,F){const E=hZ[D.type]||gZ[D.level]||"gray";if(u)return PZ(E)(z.black(` ${D.type.toUpperCase()} `));const $=typeof GC[D.type]==="string"?GC[D.type]:D.icon||D.type;return $?bZ(E)($):""}formatLogObj(D,u){const[F,...E]=this.formatArgs(D.args,u).split("\n");if(D.type==="box")return s9(U8(F+(E.length>0?"\n"+E.join("\n"):"")),{title:D.title?U8(D.title):void 0,style:D.style});const $=this.formatDate(D.date,u),B=$&&z.gray($),C=D.badge??D.level<2,J=this.formatType(D,C,u),X=D.tag?z.gray(D.tag):"";let M;const W=this.filterAndJoin([J,U8(F)]),H=this.filterAndJoin(u.columns?[X,B]:[X]),q=(u.columns||0)-qC(W)-qC(H)-2;if(M=q>0&&(u.columns||0)>=80?W+" ".repeat(q)+H:(H?`${z.gray(`[${H}]`)} `:"")+W,M+=U8(E.length>0?"\n"+E.join("\n"):""),D.type==="trace"){const A=new Error("Trace: "+D.message);M+=this.formatStack(A.stack||"")}return C?"\n"+M+"\n":M}};Q3=V8()});var IC=g((NC)=>{function fZ(D){if(!VC.Buffer.isEncoding(D))throw new Error(ju.INVALID_ENCODING)}function TC(D){return typeof D==="number"&&isFinite(D)&&pZ(D)}function LC(D,u){if(typeof D==="number"){if(!TC(D)||D<0)throw new Error(u?ju.INVALID_OFFSET:ju.INVALID_LENGTH)}else throw new Error(u?ju.INVALID_OFFSET_NON_NUMBER:ju.INVALID_LENGTH_NON_NUMBER)}function dZ(D){LC(D,!1)}function nZ(D){LC(D,!0)}function rZ(D,u){if(D<0||D>u.length)throw new Error(ju.INVALID_TARGET_OFFSET)}function pZ(D){return typeof D==="number"&&isFinite(D)&&Math.floor(D)===D}function lZ(D){if(typeof BigInt==="undefined")throw new Error("Platform does not support JS BigInt type.");if(typeof VC.Buffer.prototype[D]==="undefined")throw new Error(`Platform does not support Buffer.prototype.${D}.`)}Object.defineProperty(NC,"__esModule",{value:!0});var VC=import.meta.require("buffer"),ju={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};NC.ERRORS=ju;NC.checkEncoding=fZ;NC.isFiniteInteger=TC;NC.checkLengthValue=dZ;NC.checkOffsetValue=nZ;NC.checkTargetOffset=rZ;NC.bigIntAndBufferInt64Check=lZ});var jC=g((xC)=>{Object.defineProperty(xC,"__esModule",{value:!0});var n=IC(),SC=4096,uJ="utf8";class M3{constructor(D){if(this.length=0,this._encoding=uJ,this._writeOffset=0,this._readOffset=0,M3.isSmartBufferOptions(D)){if(D.encoding)n.checkEncoding(D.encoding),this._encoding=D.encoding;if(D.size)if(n.isFiniteInteger(D.size)&&D.size>0)this._buff=Buffer.allocUnsafe(D.size);else throw new Error(n.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(D.buff)if(Buffer.isBuffer(D.buff))this._buff=D.buff,this.length=D.buff.length;else throw new Error(n.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(SC)}else{if(typeof D!=="undefined")throw new Error(n.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(SC)}}static fromSize(D,u){return new this({size:D,encoding:u})}static fromBuffer(D,u){return new this({buff:D,encoding:u})}static fromOptions(D){return new this(D)}static isSmartBufferOptions(D){const u=D;return u&&(u.encoding!==void 0||u.size!==void 0||u.buff!==void 0)}readInt8(D){return this._readNumberValue(Buffer.prototype.readInt8,1,D)}readInt16BE(D){return this._readNumberValue(Buffer.prototype.readInt16BE,2,D)}readInt16LE(D){return this._readNumberValue(Buffer.prototype.readInt16LE,2,D)}readInt32BE(D){return this._readNumberValue(Buffer.prototype.readInt32BE,4,D)}readInt32LE(D){return this._readNumberValue(Buffer.prototype.readInt32LE,4,D)}readBigInt64BE(D){return n.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,D)}readBigInt64LE(D){return n.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,D)}writeInt8(D,u){return this._writeNumberValue(Buffer.prototype.writeInt8,1,D,u),this}insertInt8(D,u){return this._insertNumberValue(Buffer.prototype.writeInt8,1,D,u)}writeInt16BE(D,u){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,D,u)}insertInt16BE(D,u){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,D,u)}writeInt16LE(D,u){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,D,u)}insertInt16LE(D,u){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,D,u)}writeInt32BE(D,u){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,D,u)}insertInt32BE(D,u){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,D,u)}writeInt32LE(D,u){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,D,u)}insertInt32LE(D,u){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,D,u)}writeBigInt64BE(D,u){return n.bigIntAndBufferInt64Check("writeBigInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,D,u)}insertBigInt64BE(D,u){return n.bigIntAndBufferInt64Check("writeBigInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,D,u)}writeBigInt64LE(D,u){return n.bigIntAndBufferInt64Check("writeBigInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,D,u)}insertBigInt64LE(D,u){return n.bigIntAndBufferInt64Check("writeBigInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,D,u)}readUInt8(D){return this._readNumberValue(Buffer.prototype.readUInt8,1,D)}readUInt16BE(D){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,D)}readUInt16LE(D){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,D)}readUInt32BE(D){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,D)}readUInt32LE(D){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,D)}readBigUInt64BE(D){return n.bigIntAndBufferInt64Check("readBigUInt64BE"),this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,D)}readBigUInt64LE(D){return n.bigIntAndBufferInt64Check("readBigUInt64LE"),this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,D)}writeUInt8(D,u){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,D,u)}insertUInt8(D,u){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,D,u)}writeUInt16BE(D,u){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,D,u)}insertUInt16BE(D,u){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,D,u)}writeUInt16LE(D,u){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,D,u)}insertUInt16LE(D,u){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,D,u)}writeUInt32BE(D,u){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,D,u)}insertUInt32BE(D,u){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,D,u)}writeUInt32LE(D,u){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,D,u)}insertUInt32LE(D,u){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,D,u)}writeBigUInt64BE(D,u){return n.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,D,u)}insertBigUInt64BE(D,u){return n.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,D,u)}writeBigUInt64LE(D,u){return n.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,D,u)}insertBigUInt64LE(D,u){return n.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,D,u)}readFloatBE(D){return this._readNumberValue(Buffer.prototype.readFloatBE,4,D)}readFloatLE(D){return this._readNumberValue(Buffer.prototype.readFloatLE,4,D)}writeFloatBE(D,u){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,D,u)}insertFloatBE(D,u){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,D,u)}writeFloatLE(D,u){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,D,u)}insertFloatLE(D,u){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,D,u)}readDoubleBE(D){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,D)}readDoubleLE(D){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,D)}writeDoubleBE(D,u){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,D,u)}insertDoubleBE(D,u){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,D,u)}writeDoubleLE(D,u){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,D,u)}insertDoubleLE(D,u){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,D,u)}readString(D,u){let F;if(typeof D==="number")n.checkLengthValue(D),F=Math.min(D,this.length-this._readOffset);else u=D,F=this.length-this._readOffset;if(typeof u!=="undefined")n.checkEncoding(u);const E=this._buff.slice(this._readOffset,this._readOffset+F).toString(u||this._encoding);return this._readOffset+=F,E}insertString(D,u,F){return n.checkOffsetValue(u),this._handleString(D,!0,u,F)}writeString(D,u,F){return this._handleString(D,!1,u,F)}readStringNT(D){if(typeof D!=="undefined")n.checkEncoding(D);let u=this.length;for(let E=this._readOffset;E<this.length;E++)if(this._buff[E]===0){u=E;break}const F=this._buff.slice(this._readOffset,u);return this._readOffset=u+1,F.toString(D||this._encoding)}insertStringNT(D,u,F){return n.checkOffsetValue(u),this.insertString(D,u,F),this.insertUInt8(0,u+D.length),this}writeStringNT(D,u,F){return this.writeString(D,u,F),this.writeUInt8(0,typeof u==="number"?u+D.length:this.writeOffset),this}readBuffer(D){if(typeof D!=="undefined")n.checkLengthValue(D);const u=typeof D==="number"?D:this.length,F=Math.min(this.length,this._readOffset+u),E=this._buff.slice(this._readOffset,F);return this._readOffset=F,E}insertBuffer(D,u){return n.checkOffsetValue(u),this._handleBuffer(D,!0,u)}writeBuffer(D,u){return this._handleBuffer(D,!1,u)}readBufferNT(){let D=this.length;for(let F=this._readOffset;F<this.length;F++)if(this._buff[F]===0){D=F;break}const u=this._buff.slice(this._readOffset,D);return this._readOffset=D+1,u}insertBufferNT(D,u){return n.checkOffsetValue(u),this.insertBuffer(D,u),this.insertUInt8(0,u+D.length),this}writeBufferNT(D,u){if(typeof u!=="undefined")n.checkOffsetValue(u);return this.writeBuffer(D,u),this.writeUInt8(0,typeof u==="number"?u+D.length:this._writeOffset),this}clear(){return this._writeOffset=0,this._readOffset=0,this.length=0,this}remaining(){return this.length-this._readOffset}get readOffset(){return this._readOffset}set readOffset(D){n.checkOffsetValue(D),n.checkTargetOffset(D,this),this._readOffset=D}get writeOffset(){return this._writeOffset}set writeOffset(D){n.checkOffsetValue(D),n.checkTargetOffset(D,this),this._writeOffset=D}get encoding(){return this._encoding}set encoding(D){n.checkEncoding(D),this._encoding=D}get internalBuffer(){return this._buff}toBuffer(){return this._buff.slice(0,this.length)}toString(D){const u=typeof D==="string"?D:this._encoding;return n.checkEncoding(u),this._buff.toString(u,0,this.length)}destroy(){return this.clear(),this}_handleString(D,u,F,E){let $=this._writeOffset,B=this._encoding;if(typeof F==="number")$=F;else if(typeof F==="string")n.checkEncoding(F),B=F;if(typeof E==="string")n.checkEncoding(E),B=E;const C=Buffer.byteLength(D,B);if(u)this.ensureInsertable(C,$);else this._ensureWriteable(C,$);if(this._buff.write(D,$,C,B),u)this._writeOffset+=C;else if(typeof F==="number")this._writeOffset=Math.max(this._writeOffset,$+C);else this._writeOffset+=C;return this}_handleBuffer(D,u,F){const E=typeof F==="number"?F:this._writeOffset;if(u)this.ensureInsertable(D.length,E);else this._ensureWriteable(D.length,E);if(D.copy(this._buff,E),u)this._writeOffset+=D.length;else if(typeof F==="number")this._writeOffset=Math.max(this._writeOffset,E+D.length);else this._writeOffset+=D.length;return this}ensureReadable(D,u){let F=this._readOffset;if(typeof u!=="undefined")n.checkOffsetValue(u),F=u;if(F<0||F+D>this.length)throw new Error(n.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(D,u){if(n.checkOffsetValue(u),this._ensureCapacity(this.length+D),u<this.length)this._buff.copy(this._buff,u+D,u,this._buff.length);if(u+D>this.length)this.length=u+D;else this.length+=D}_ensureWriteable(D,u){const F=typeof u==="number"?u:this._writeOffset;if(this._ensureCapacity(F+D),F+D>this.length)this.length=F+D}_ensureCapacity(D){const u=this._buff.length;if(D>u){let F=this._buff,E=u*3/2+1;if(E<D)E=D;this._buff=Buffer.allocUnsafe(E),F.copy(this._buff,0,0,u)}}_readNumberValue(D,u,F){this.ensureReadable(u,F);const E=D.call(this._buff,typeof F==="number"?F:this._readOffset);if(typeof F==="undefined")this._readOffset+=u;return E}_insertNumberValue(D,u,F,E){return n.checkOffsetValue(E),this.ensureInsertable(u,E),D.call(this._buff,F,E),this._writeOffset+=u,this}_writeNumberValue(D,u,F,E){if(typeof E==="number"){if(E<0)throw new Error(n.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);n.checkOffsetValue(E)}const $=typeof E==="number"?E:this._writeOffset;if(this._ensureWriteable(u,$),D.call(this._buff,F,$),typeof E==="number")this._writeOffset=Math.max(this._writeOffset,$+u);else this._writeOffset+=u;return this}}xC.SmartBuffer=M3});var A3=g((bC)=>{Object.defineProperty(bC,"__esModule",{value:!0});bC.SOCKS5_NO_ACCEPTABLE_AUTH=bC.SOCKS5_CUSTOM_AUTH_END=bC.SOCKS5_CUSTOM_AUTH_START=bC.SOCKS_INCOMING_PACKET_SIZES=bC.SocksClientState=bC.Socks5Response=bC.Socks5HostType=bC.Socks5Auth=bC.Socks4Response=bC.SocksCommand=bC.ERRORS=bC.DEFAULT_TIMEOUT=void 0;var CJ=30000;bC.DEFAULT_TIMEOUT=CJ;var EJ={InvalidSocksCommand:"An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",InvalidSocksCommandForOperation:"An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",InvalidSocksCommandChain:"An invalid SOCKS command was provided. Chaining currently only supports the connect command.",InvalidSocksClientOptionsDestination:"An invalid destination host was provided.",InvalidSocksClientOptionsExistingSocket:"An invalid existing socket was provided. This should be an instance of stream.Duplex.",InvalidSocksClientOptionsProxy:"Invalid SOCKS proxy details were provided.",InvalidSocksClientOptionsTimeout:"An invalid timeout value was provided. Please enter a value above 0 (in ms).",InvalidSocksClientOptionsProxiesLength:"At least two socks proxies must be provided for chaining.",InvalidSocksClientOptionsCustomAuthRange:"Custom auth must be a value between 0x80 and 0xFE.",InvalidSocksClientOptionsCustomAuthOptions:"When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",NegotiationError:"Negotiation error",SocketClosed:"Socket closed",ProxyConnectionTimedOut:"Proxy connection timed out",InternalError:"SocksClient internal error (this should not happen)",InvalidSocks4HandshakeResponse:"Received invalid Socks4 handshake response",Socks4ProxyRejectedConnection:"Socks4 Proxy rejected connection",InvalidSocks4IncomingConnectionResponse:"Socks4 invalid incoming connection response",Socks4ProxyRejectedIncomingBoundConnection:"Socks4 Proxy rejected incoming bound connection",InvalidSocks5InitialHandshakeResponse:"Received invalid Socks5 initial handshake response",InvalidSocks5IntiailHandshakeSocksVersion:"Received invalid Socks5 initial handshake (invalid socks version)",InvalidSocks5InitialHandshakeNoAcceptedAuthType:"Received invalid Socks5 initial handshake (no accepted authentication type)",InvalidSocks5InitialHandshakeUnknownAuthType:"Received invalid Socks5 initial handshake (unknown authentication type)",Socks5AuthenticationFailed:"Socks5 Authentication failed",InvalidSocks5FinalHandshake:"Received invalid Socks5 final handshake response",InvalidSocks5FinalHandshakeRejected:"Socks5 proxy rejected connection",InvalidSocks5IncomingConnectionResponse:"Received invalid Socks5 incoming connection response",Socks5ProxyRejectedIncomingBoundConnection:"Socks5 Proxy rejected incoming bound connection"};bC.ERRORS=EJ;var $J={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:(D)=>D+7,Socks4Response:8};bC.SOCKS_INCOMING_PACKET_SIZES=$J;var RC;(function(D){D[D.connect=1]="connect",D[D.bind=2]="bind",D[D.associate=3]="associate"})(RC||(bC.SocksCommand=RC={}));var yC;(function(D){D[D.Granted=90]="Granted",D[D.Failed=91]="Failed",D[D.Rejected=92]="Rejected",D[D.RejectedIdent=93]="RejectedIdent"})(yC||(bC.Socks4Response=yC={}));var kC;(function(D){D[D.NoAuth=0]="NoAuth",D[D.GSSApi=1]="GSSApi",D[D.UserPass=2]="UserPass"})(kC||(bC.Socks5Auth=kC={}));var BJ=128;bC.SOCKS5_CUSTOM_AUTH_START=BJ;var wJ=254;bC.SOCKS5_CUSTOM_AUTH_END=wJ;var YJ=255;bC.SOCKS5_NO_ACCEPTABLE_AUTH=YJ;var hC;(function(D){D[D.Granted=0]="Granted",D[D.Failure=1]="Failure",D[D.NotAllowed=2]="NotAllowed",D[D.NetworkUnreachable=3]="NetworkUnreachable",D[D.HostUnreachable=4]="HostUnreachable",D[D.ConnectionRefused=5]="ConnectionRefused",D[D.TTLExpired=6]="TTLExpired",D[D.CommandNotSupported=7]="CommandNotSupported",D[D.AddressNotSupported=8]="AddressNotSupported"})(hC||(bC.Socks5Response=hC={}));var gC;(function(D){D[D.IPv4=1]="IPv4",D[D.Hostname=3]="Hostname",D[D.IPv6=4]="IPv6"})(gC||(bC.Socks5HostType=gC={}));var _C;(function(D){D[D.Created=0]="Created",D[D.Connecting=1]="Connecting",D[D.Connected=2]="Connected",D[D.SentInitialHandshake=3]="SentInitialHandshake",D[D.ReceivedInitialHandshakeResponse=4]="ReceivedInitialHandshakeResponse",D[D.SentAuthentication=5]="SentAuthentication",D[D.ReceivedAuthenticationResponse=6]="ReceivedAuthenticationResponse",D[D.SentFinalHandshake=7]="SentFinalHandshake",D[D.ReceivedFinalResponse=8]="ReceivedFinalResponse",D[D.BoundWaitingForConnection=9]="BoundWaitingForConnection",D[D.Established=10]="Established",D[D.Disconnected=11]="Disconnected",D[D.Error=99]="Error"})(_C||(bC.SocksClientState=_C={}))});var G3=g((mC)=>{function zJ(D){for(let u=D.length-1;u>0;u--){const F=Math.floor(Math.random()*(u+1));[D[u],D[F]]=[D[F],D[u]]}}Object.defineProperty(mC,"__esModule",{value:!0});mC.shuffleArray=mC.SocksClientError=void 0;class vC extends Error{constructor(D,u){super(D);this.options=u}}mC.SocksClientError=vC;mC.shuffleArray=zJ});var q3=g((fC)=>{function OJ(D){if(this.subnetMask<D.subnetMask)return!1;if(this.mask(D.subnetMask)===D.mask())return!0;return!1}function VJ(D){return function(){if(this.addressMinusSuffix!==this.correctForm())return!1;if(this.subnetMask===D&&!this.parsedSubnet)return!0;return this.parsedSubnet===String(this.subnetMask)}}Object.defineProperty(fC,"__esModule",{value:!0});fC.isCorrect=fC.isInSubnet=void 0;fC.isInSubnet=OJ;fC.isCorrect=VJ});var H3=g((nC)=>{Object.defineProperty(nC,"__esModule",{value:!0});nC.RE_SUBNET_STRING=nC.RE_ADDRESS=nC.GROUPS=nC.BITS=void 0;nC.BITS=32;nC.GROUPS=4;nC.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g;nC.RE_SUBNET_STRING=/\/\d{1,2}$/});var L8=g((lC)=>{Object.defineProperty(lC,"__esModule",{value:!0});lC.AddressError=void 0;class pC extends Error{constructor(D,u){super(D);if(this.name="AddressError",u!==null)this.parseMessage=u}}lC.AddressError=pC});var z3=g((N8,tC)=>{(function(){var D,u=244837814094590,F=(u&16777215)==15715070;function E(w,Y,Z){if(w!=null)if(typeof w=="number")this.fromNumber(w,Y,Z);else if(Y==null&&typeof w!="string")this.fromString(w,256);else this.fromString(w,Y)}function $(){return new E(null)}function B(w,Y,Z,K,G,U){while(--U>=0){var I=Y*this[w++]+Z[K]+G;G=Math.floor(I/67108864),Z[K++]=I&67108863}return G}function C(w,Y,Z,K,G,U){var I=Y&32767,x=Y>>15;while(--U>=0){var e=this[w]&32767,MD=this[w++]>>15,rD=x*e+MD*I;e=I*e+((rD&32767)<<15)+Z[K]+(G&1073741823),G=(e>>>30)+(rD>>>15)+x*MD+(G>>>30),Z[K++]=e&1073741823}return G}function J(w,Y,Z,K,G,U){var I=Y&16383,x=Y>>14;while(--U>=0){var e=this[w]&16383,MD=this[w++]>>14,rD=x*e+MD*I;e=I*e+((rD&16383)<<14)+Z[K]+G,G=(e>>28)+(rD>>14)+x*MD,Z[K++]=e&268435455}return G}var X=typeof navigator!=="undefined";if(X&&F&&navigator.appName=="Microsoft Internet Explorer")E.prototype.am=C,D=30;else if(X&&F&&navigator.appName!="Netscape")E.prototype.am=B,D=26;else E.prototype.am=J,D=28;E.prototype.DB=D,E.prototype.DM=(1<<D)-1,E.prototype.DV=1<<D;var M=52;E.prototype.FV=Math.pow(2,M),E.prototype.F1=M-D,E.prototype.F2=2*D-M;var W="0123456789abcdefghijklmnopqrstuvwxyz",H=new Array,q,A;q="0".charCodeAt(0);for(A=0;A<=9;++A)H[q++]=A;q="a".charCodeAt(0);for(A=10;A<36;++A)H[q++]=A;q="A".charCodeAt(0);for(A=10;A<36;++A)H[q++]=A;function Q(w){return W.charAt(w)}function y(w,Y){var Z=H[w.charCodeAt(Y)];return Z==null?-1:Z}function v(w){for(var Y=this.t-1;Y>=0;--Y)w[Y]=this[Y];w.t=this.t,w.s=this.s}function m(w){if(this.t=1,this.s=w<0?-1:0,w>0)this[0]=w;else if(w<-1)this[0]=w+this.DV;else this.t=0}function i(w){var Y=$();return Y.fromInt(w),Y}function FD(w,Y){var Z;if(Y==16)Z=4;else if(Y==8)Z=3;else if(Y==256)Z=8;else if(Y==2)Z=1;else if(Y==32)Z=5;else if(Y==4)Z=2;else{this.fromRadix(w,Y);return}this.t=0,this.s=0;var K=w.length,G=!1,U=0;while(--K>=0){var I=Z==8?w[K]&255:y(w,K);if(I<0){if(w.charAt(K)=="-")G=!0;continue}if(G=!1,U==0)this[this.t++]=I;else if(U+Z>this.DB)this[this.t-1]|=(I&(1<<this.DB-U)-1)<<U,this[this.t++]=I>>this.DB-U;else this[this.t-1]|=I<<U;if(U+=Z,U>=this.DB)U-=this.DB}if(Z==8&&(w[0]&128)!=0){if(this.s=-1,U>0)this[this.t-1]|=(1<<this.DB-U)-1<<U}if(this.clamp(),G)E.ZERO.subTo(this,this)}function ID(){var w=this.s&this.DM;while(this.t>0&&this[this.t-1]==w)--this.t}function nD(w){if(this.s<0)return"-"+this.negate().toString(w);var Y;if(w==16)Y=4;else if(w==8)Y=3;else if(w==2)Y=1;else if(w==32)Y=5;else if(w==4)Y=2;else return this.toRadix(w);var Z=(1<<Y)-1,K,G=!1,U="",I=this.t,x=this.DB-I*this.DB%Y;if(I-- >0){if(x<this.DB&&(K=this[I]>>x)>0)G=!0,U=Q(K);while(I>=0){if(x<Y)K=(this[I]&(1<<x)-1)<<Y-x,K|=this[--I]>>(x+=this.DB-Y);else if(K=this[I]>>(x-=Y)&Z,x<=0)x+=this.DB,--I;if(K>0)G=!0;if(G)U+=Q(K)}}return G?U:"0"}function SD(){var w=$();return E.ZERO.subTo(this,w),w}function VD(){return this.s<0?this.negate():this}function t(w){var Y=this.s-w.s;if(Y!=0)return Y;var Z=this.t;if(Y=Z-w.t,Y!=0)return this.s<0?-Y:Y;while(--Z>=0)if((Y=this[Z]-w[Z])!=0)return Y;return 0}function c(w){var Y=1,Z;if((Z=w>>>16)!=0)w=Z,Y+=16;if((Z=w>>8)!=0)w=Z,Y+=8;if((Z=w>>4)!=0)w=Z,Y+=4;if((Z=w>>2)!=0)w=Z,Y+=2;if((Z=w>>1)!=0)w=Z,Y+=1;return Y}function UD(){if(this.t<=0)return 0;return this.DB*(this.t-1)+c(this[this.t-1]^this.s&this.DM)}function TD(w,Y){var Z;for(Z=this.t-1;Z>=0;--Z)Y[Z+w]=this[Z];for(Z=w-1;Z>=0;--Z)Y[Z]=0;Y.t=this.t+w,Y.s=this.s}function k(w,Y){for(var Z=w;Z<this.t;++Z)Y[Z-w]=this[Z];Y.t=Math.max(this.t-w,0),Y.s=this.s}function L(w,Y){var Z=w%this.DB,K=this.DB-Z,G=(1<<K)-1,U=Math.floor(w/this.DB),I=this.s<<Z&this.DM,x;for(x=this.t-1;x>=0;--x)Y[x+U+1]=this[x]>>K|I,I=(this[x]&G)<<Z;for(x=U-1;x>=0;--x)Y[x]=0;Y[U]=I,Y.t=this.t+U+1,Y.s=this.s,Y.clamp()}function V(w,Y){Y.s=this.s;var Z=Math.floor(w/this.DB);if(Z>=this.t){Y.t=0;return}var K=w%this.DB,G=this.DB-K,U=(1<<K)-1;Y[0]=this[Z]>>K;for(var I=Z+1;I<this.t;++I)Y[I-Z-1]|=(this[I]&U)<<G,Y[I-Z]=this[I]>>K;if(K>0)Y[this.t-Z-1]|=(this.s&U)<<G;Y.t=this.t-Z,Y.clamp()}function j(w,Y){var Z=0,K=0,G=Math.min(w.t,this.t);while(Z<G)K+=this[Z]-w[Z],Y[Z++]=K&this.DM,K>>=this.DB;if(w.t<this.t){K-=w.s;while(Z<this.t)K+=this[Z],Y[Z++]=K&this.DM,K>>=this.DB;K+=this.s}else{K+=this.s;while(Z<w.t)K-=w[Z],Y[Z++]=K&this.DM,K>>=this.DB;K-=w.s}if(Y.s=K<0?-1:0,K<-1)Y[Z++]=this.DV+K;else if(K>0)Y[Z++]=K;Y.t=Z,Y.clamp()}function N(w,Y){var Z=this.abs(),K=w.abs(),G=Z.t;Y.t=G+K.t;while(--G>=0)Y[G]=0;for(G=0;G<K.t;++G)Y[G+Z.t]=Z.am(0,K[G],Y,G,0,Z.t);if(Y.s=0,Y.clamp(),this.s!=w.s)E.ZERO.subTo(Y,Y)}function b(w){var Y=this.abs(),Z=w.t=2*Y.t;while(--Z>=0)w[Z]=0;for(Z=0;Z<Y.t-1;++Z){var K=Y.am(Z,Y[Z],w,2*Z,0,1);if((w[Z+Y.t]+=Y.am(Z+1,2*Y[Z],w,2*Z+1,K,Y.t-Z-1))>=Y.DV)w[Z+Y.t]-=Y.DV,w[Z+Y.t+1]=1}if(w.t>0)w[w.t-1]+=Y.am(Z,Y[Z],w,2*Z,0,1);w.s=0,w.clamp()}function P(w,Y,Z){var K=w.abs();if(K.t<=0)return;var G=this.abs();if(G.t<K.t){if(Y!=null)Y.fromInt(0);if(Z!=null)this.copyTo(Z);return}if(Z==null)Z=$();var U=$(),I=this.s,x=w.s,e=this.DB-c(K[K.t-1]);if(e>0)K.lShiftTo(e,U),G.lShiftTo(e,Z);else K.copyTo(U),G.copyTo(Z);var MD=U.t,rD=U[MD-1];if(rD==0)return;var cD=rD*(1<<this.F1)+(MD>1?U[MD-2]>>this.F2:0),Xu=this.FV/cD,O0=(1<<this.F1)/cD,oD=1<<this.F2,eD=Z.t,V0=eD-MD,Gu=Y==null?$():Y;if(U.dlShiftTo(V0,Gu),Z.compareTo(Gu)>=0)Z[Z.t++]=1,Z.subTo(Gu,Z);E.ONE.dlShiftTo(MD,Gu),Gu.subTo(U,U);while(U.t<MD)U[U.t++]=0;while(--V0>=0){var b8=Z[--eD]==rD?this.DM:Math.floor(Z[eD]*Xu+(Z[eD-1]+oD)*O0);if((Z[eD]+=U.am(0,b8,Z,V0,0,MD))<b8){U.dlShiftTo(V0,Gu),Z.subTo(Gu,Z);while(Z[eD]<--b8)Z.subTo(Gu,Z)}}if(Y!=null){if(Z.drShiftTo(MD,Y),I!=x)E.ZERO.subTo(Y,Y)}if(Z.t=MD,Z.clamp(),e>0)Z.rShiftTo(e,Z);if(I<0)E.ZERO.subTo(Z,Z)}function f(w){var Y=$();if(this.abs().divRemTo(w,null,Y),this.s<0&&Y.compareTo(E.ZERO)>0)w.subTo(Y,Y);return Y}function p(w){this.m=w}function o(w){if(w.s<0||w.compareTo(this.m)>=0)return w.mod(this.m);else return w}function ZD(w){return w}function LD(w){w.divRemTo(this.m,null,w)}function Eu(w,Y,Z){w.multiplyTo(Y,Z),this.reduce(Z)}function tD(w,Y){w.squareTo(Y),this.reduce(Y)}p.prototype.convert=o,p.prototype.revert=ZD,p.prototype.reduce=LD,p.prototype.mulTo=Eu,p.prototype.sqrTo=tD;function Ku(){if(this.t<1)return 0;var w=this[0];if((w&1)==0)return 0;var Y=w&3;return Y=Y*(2-(w&15)*Y)&15,Y=Y*(2-(w&255)*Y)&255,Y=Y*(2-((w&65535)*Y&65535))&65535,Y=Y*(2-w*Y%this.DV)%this.DV,Y>0?this.DV-Y:-Y}function WD(w){this.m=w,this.mp=w.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<w.DB-15)-1,this.mt2=2*w.t}function KD(w){var Y=$();if(w.abs().dlShiftTo(this.m.t,Y),Y.divRemTo(this.m,null,Y),w.s<0&&Y.compareTo(E.ZERO)>0)this.m.subTo(Y,Y);return Y}function gD(w){var Y=$();return w.copyTo(Y),this.reduce(Y),Y}function sD(w){while(w.t<=this.mt2)w[w.t++]=0;for(var Y=0;Y<this.m.t;++Y){var Z=w[Y]&32767,K=Z*this.mpl+((Z*this.mph+(w[Y]>>15)*this.mpl&this.um)<<15)&w.DM;Z=Y+this.m.t,w[Z]+=this.m.am(0,K,w,Y,0,this.m.t);while(w[Z]>=w.DV)w[Z]-=w.DV,w[++Z]++}if(w.clamp(),w.drShiftTo(this.m.t,w),w.compareTo(this.m)>=0)w.subTo(this.m,w)}function $u(w,Y){w.squareTo(Y),this.reduce(Y)}function hu(w,Y,Z){w.multiplyTo(Y,Z),this.reduce(Z)}WD.prototype.convert=KD,WD.prototype.revert=gD,WD.prototype.reduce=sD,WD.prototype.mulTo=hu,WD.prototype.sqrTo=$u;function gu(){return(this.t>0?this[0]&1:this.s)==0}function au(w,Y){if(w>4294967295||w<1)return E.ONE;var Z=$(),K=$(),G=Y.convert(this),U=c(w)-1;G.copyTo(Z);while(--U>=0)if(Y.sqrTo(Z,K),(w&1<<U)>0)Y.mulTo(K,G,Z);else{var I=Z;Z=K,K=I}return Y.revert(Z)}function ou(w,Y){var Z;if(w<256||Y.isEven())Z=new p(Y);else Z=new WD(Y);return this.exp(w,Z)}E.prototype.copyTo=v,E.prototype.fromInt=m,E.prototype.fromString=FD,E.prototype.clamp=ID,E.prototype.dlShiftTo=TD,E.prototype.drShiftTo=k,E.prototype.lShiftTo=L,E.prototype.rShiftTo=V,E.prototype.subTo=j,E.prototype.multiplyTo=N,E.prototype.squareTo=b,E.prototype.divRemTo=P,E.prototype.invDigit=Ku,E.prototype.isEven=gu,E.prototype.exp=au,E.prototype.toString=nD,E.prototype.negate=SD,E.prototype.abs=VD,E.prototype.compareTo=t,E.prototype.bitLength=UD,E.prototype.mod=f,E.prototype.modPowInt=ou,E.ZERO=i(0),E.ONE=i(1);function eu(){var w=$();return this.copyTo(w),w}function D0(){if(this.s<0){if(this.t==1)return this[0]-this.DV;else if(this.t==0)return-1}else if(this.t==1)return this[0];else if(this.t==0)return 0;return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function h3(){return this.t==0?this.s:this[0]<<24>>24}function j4(){return this.t==0?this.s:this[0]<<16>>16}function R4(w){return Math.floor(Math.LN2*this.DB/Math.log(w))}function y4(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this[0]<=0)return 0;else return 1}function k4(w){if(w==null)w=10;if(this.signum()==0||w<2||w>36)return"0";var Y=this.chunkSize(w),Z=Math.pow(w,Y),K=i(Z),G=$(),U=$(),I="";this.divRemTo(K,G,U);while(G.signum()>0)I=(Z+U.intValue()).toString(w).substr(1)+I,G.divRemTo(K,G,U);return U.intValue().toString(w)+I}function h4(w,Y){if(this.fromInt(0),Y==null)Y=10;var Z=this.chunkSize(Y),K=Math.pow(Y,Z),G=!1,U=0,I=0;for(var x=0;x<w.length;++x){var e=y(w,x);if(e<0){if(w.charAt(x)=="-"&&this.signum()==0)G=!0;continue}if(I=Y*I+e,++U>=Z)this.dMultiply(K),this.dAddOffset(I,0),U=0,I=0}if(U>0)this.dMultiply(Math.pow(Y,U)),this.dAddOffset(I,0);if(G)E.ZERO.subTo(this,this)}function g4(w,Y,Z){if(typeof Y=="number")if(w<2)this.fromInt(1);else{if(this.fromNumber(w,Z),!this.testBit(w-1))this.bitwiseTo(E.ONE.shiftLeft(w-1),k8,this);if(this.isEven())this.dAddOffset(1,0);while(!this.isProbablePrime(Y))if(this.dAddOffset(2,0),this.bitLength()>w)this.subTo(E.ONE.shiftLeft(w-1),this)}else{var K=new Array,G=w&7;if(K.length=(w>>3)+1,Y.nextBytes(K),G>0)K[0]&=(1<<G)-1;else K[0]=0;this.fromString(K,256)}}function _4(){var w=this.t,Y=new Array;Y[0]=this.s;var Z=this.DB-w*this.DB%8,K,G=0;if(w-- >0){if(Z<this.DB&&(K=this[w]>>Z)!=(this.s&this.DM)>>Z)Y[G++]=K|this.s<<this.DB-Z;while(w>=0){if(Z<8)K=(this[w]&(1<<Z)-1)<<8-Z,K|=this[--w]>>(Z+=this.DB-8);else if(K=this[w]>>(Z-=8)&255,Z<=0)Z+=this.DB,--w;if((K&128)!=0)K|=-256;if(G==0&&(this.s&128)!=(K&128))++G;if(G>0||K!=this.s)Y[G++]=K}}return Y}function b4(w){return this.compareTo(w)==0}function P4(w){return this.compareTo(w)<0?this:w}function v4(w){return this.compareTo(w)>0?this:w}function m4(w,Y,Z){var K,G,U=Math.min(w.t,this.t);for(K=0;K<U;++K)Z[K]=Y(this[K],w[K]);if(w.t<this.t){G=w.s&this.DM;for(K=U;K<this.t;++K)Z[K]=Y(this[K],G);Z.t=this.t}else{G=this.s&this.DM;for(K=U;K<w.t;++K)Z[K]=Y(G,w[K]);Z.t=w.t}Z.s=Y(this.s,w.s),Z.clamp()}function c4(w,Y){return w&Y}function f4(w){var Y=$();return this.bitwiseTo(w,c4,Y),Y}function k8(w,Y){return w|Y}function d4(w){var Y=$();return this.bitwiseTo(w,k8,Y),Y}function g3(w,Y){return w^Y}function n4(w){var Y=$();return this.bitwiseTo(w,g3,Y),Y}function _3(w,Y){return w&~Y}function r4(w){var Y=$();return this.bitwiseTo(w,_3,Y),Y}function p4(){var w=$();for(var Y=0;Y<this.t;++Y)w[Y]=this.DM&~this[Y];return w.t=this.t,w.s=~this.s,w}function l4(w){var Y=$();if(w<0)this.rShiftTo(-w,Y);else this.lShiftTo(w,Y);return Y}function i4(w){var Y=$();if(w<0)this.lShiftTo(-w,Y);else this.rShiftTo(w,Y);return Y}function t4(w){if(w==0)return-1;var Y=0;if((w&65535)==0)w>>=16,Y+=16;if((w&255)==0)w>>=8,Y+=8;if((w&15)==0)w>>=4,Y+=4;if((w&3)==0)w>>=2,Y+=2;if((w&1)==0)++Y;return Y}function s4(){for(var w=0;w<this.t;++w)if(this[w]!=0)return w*this.DB+t4(this[w]);if(this.s<0)return this.t*this.DB;return-1}function a4(w){var Y=0;while(w!=0)w&=w-1,++Y;return Y}function o4(){var w=0,Y=this.s&this.DM;for(var Z=0;Z<this.t;++Z)w+=a4(this[Z]^Y);return w}function e4(w){var Y=Math.floor(w/this.DB);if(Y>=this.t)return this.s!=0;return(this[Y]&1<<w%this.DB)!=0}function D7(w,Y){var Z=E.ONE.shiftLeft(w);return this.bitwiseTo(Z,Y,Z),Z}function u7(w){return this.changeBit(w,k8)}function F7(w){return this.changeBit(w,_3)}function C7(w){return this.changeBit(w,g3)}function E7(w,Y){var Z=0,K=0,G=Math.min(w.t,this.t);while(Z<G)K+=this[Z]+w[Z],Y[Z++]=K&this.DM,K>>=this.DB;if(w.t<this.t){K+=w.s;while(Z<this.t)K+=this[Z],Y[Z++]=K&this.DM,K>>=this.DB;K+=this.s}else{K+=this.s;while(Z<w.t)K+=w[Z],Y[Z++]=K&this.DM,K>>=this.DB;K+=w.s}if(Y.s=K<0?-1:0,K>0)Y[Z++]=K;else if(K<-1)Y[Z++]=this.DV+K;Y.t=Z,Y.clamp()}function $7(w){var Y=$();return this.addTo(w,Y),Y}function B7(w){var Y=$();return this.subTo(w,Y),Y}function w7(w){var Y=$();return this.multiplyTo(w,Y),Y}function Y7(){var w=$();return this.squareTo(w),w}function Z7(w){var Y=$();return this.divRemTo(w,Y,null),Y}function J7(w){var Y=$();return this.divRemTo(w,null,Y),Y}function K7(w){var Y=$(),Z=$();return this.divRemTo(w,Y,Z),new Array(Y,Z)}function X7(w){this[this.t]=this.am(0,w-1,this,0,0,this.t),++this.t,this.clamp()}function W7(w,Y){if(w==0)return;while(this.t<=Y)this[this.t++]=0;this[Y]+=w;while(this[Y]>=this.DV){if(this[Y]-=this.DV,++Y>=this.t)this[this.t++]=0;++this[Y]}}function u0(){}function b3(w){return w}function Q7(w,Y,Z){w.multiplyTo(Y,Z)}function M7(w,Y){w.squareTo(Y)}u0.prototype.convert=b3,u0.prototype.revert=b3,u0.prototype.mulTo=Q7,u0.prototype.sqrTo=M7;function A7(w){return this.exp(w,new u0)}function G7(w,Y,Z){var K=Math.min(this.t+w.t,Y);Z.s=0,Z.t=K;while(K>0)Z[--K]=0;var G;for(G=Z.t-this.t;K<G;++K)Z[K+this.t]=this.am(0,w[K],Z,K,0,this.t);for(G=Math.min(w.t,Y);K<G;++K)this.am(0,w[K],Z,K,0,Y-K);Z.clamp()}function q7(w,Y,Z){--Y;var K=Z.t=this.t+w.t-Y;Z.s=0;while(--K>=0)Z[K]=0;for(K=Math.max(Y-this.t,0);K<w.t;++K)Z[this.t+K-Y]=this.am(Y-K,w[K],Z,0,0,this.t+K-Y);Z.clamp(),Z.drShiftTo(1,Z)}function Lu(w){this.r2=$(),this.q3=$(),E.ONE.dlShiftTo(2*w.t,this.r2),this.mu=this.r2.divide(w),this.m=w}function H7(w){if(w.s<0||w.t>2*this.m.t)return w.mod(this.m);else if(w.compareTo(this.m)<0)return w;else{var Y=$();return w.copyTo(Y),this.reduce(Y),Y}}function z7(w){return w}function U7(w){if(w.drShiftTo(this.m.t-1,this.r2),w.t>this.m.t+1)w.t=this.m.t+1,w.clamp();this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(w.compareTo(this.r2)<0)w.dAddOffset(1,this.m.t+1);w.subTo(this.r2,w);while(w.compareTo(this.m)>=0)w.subTo(this.m,w)}function O7(w,Y){w.squareTo(Y),this.reduce(Y)}function V7(w,Y,Z){w.multiplyTo(Y,Z),this.reduce(Z)}Lu.prototype.convert=H7,Lu.prototype.revert=z7,Lu.prototype.reduce=U7,Lu.prototype.mulTo=V7,Lu.prototype.sqrTo=O7;function T7(w,Y){var Z=w.bitLength(),K,G=i(1),U;if(Z<=0)return G;else if(Z<18)K=1;else if(Z<48)K=3;else if(Z<144)K=4;else if(Z<768)K=5;else K=6;if(Z<8)U=new p(Y);else if(Y.isEven())U=new Lu(Y);else U=new WD(Y);var I=new Array,x=3,e=K-1,MD=(1<<K)-1;if(I[1]=U.convert(this),K>1){var rD=$();U.sqrTo(I[1],rD);while(x<=MD)I[x]=$(),U.mulTo(rD,I[x-2],I[x]),x+=2}var cD=w.t-1,Xu,O0=!0,oD=$(),eD;Z=c(w[cD])-1;while(cD>=0){if(Z>=e)Xu=w[cD]>>Z-e&MD;else if(Xu=(w[cD]&(1<<Z+1)-1)<<e-Z,cD>0)Xu|=w[cD-1]>>this.DB+Z-e;x=K;while((Xu&1)==0)Xu>>=1,--x;if((Z-=x)<0)Z+=this.DB,--cD;if(O0)I[Xu].copyTo(G),O0=!1;else{while(x>1)U.sqrTo(G,oD),U.sqrTo(oD,G),x-=2;if(x>0)U.sqrTo(G,oD);else eD=G,G=oD,oD=eD;U.mulTo(oD,I[Xu],G)}while(cD>=0&&(w[cD]&1<<Z)==0)if(U.sqrTo(G,oD),eD=G,G=oD,oD=eD,--Z<0)Z=this.DB-1,--cD}return U.revert(G)}function L7(w){var Y=this.s<0?this.negate():this.clone(),Z=w.s<0?w.negate():w.clone();if(Y.compareTo(Z)<0){var K=Y;Y=Z,Z=K}var G=Y.getLowestSetBit(),U=Z.getLowestSetBit();if(U<0)return Y;if(G<U)U=G;if(U>0)Y.rShiftTo(U,Y),Z.rShiftTo(U,Z);while(Y.signum()>0){if((G=Y.getLowestSetBit())>0)Y.rShiftTo(G,Y);if((G=Z.getLowestSetBit())>0)Z.rShiftTo(G,Z);if(Y.compareTo(Z)>=0)Y.subTo(Z,Y),Y.rShiftTo(1,Y);else Z.subTo(Y,Z),Z.rShiftTo(1,Z)}if(U>0)Z.lShiftTo(U,Z);return Z}function N7(w){if(w<=0)return 0;var Y=this.DV%w,Z=this.s<0?w-1:0;if(this.t>0)if(Y==0)Z=this[0]%w;else for(var K=this.t-1;K>=0;--K)Z=(Y*Z+this[K])%w;return Z}function I7(w){var Y=w.isEven();if(this.isEven()&&Y||w.signum()==0)return E.ZERO;var Z=w.clone(),K=this.clone(),G=i(1),U=i(0),I=i(0),x=i(1);while(Z.signum()!=0){while(Z.isEven()){if(Z.rShiftTo(1,Z),Y){if(!G.isEven()||!U.isEven())G.addTo(this,G),U.subTo(w,U);G.rShiftTo(1,G)}else if(!U.isEven())U.subTo(w,U);U.rShiftTo(1,U)}while(K.isEven()){if(K.rShiftTo(1,K),Y){if(!I.isEven()||!x.isEven())I.addTo(this,I),x.subTo(w,x);I.rShiftTo(1,I)}else if(!x.isEven())x.subTo(w,x);x.rShiftTo(1,x)}if(Z.compareTo(K)>=0){if(Z.subTo(K,Z),Y)G.subTo(I,G);U.subTo(x,U)}else{if(K.subTo(Z,K),Y)I.subTo(G,I);x.subTo(U,x)}}if(K.compareTo(E.ONE)!=0)return E.ZERO;if(x.compareTo(w)>=0)return x.subtract(w);if(x.signum()<0)x.addTo(w,x);else return x;if(x.signum()<0)return x.add(w);else return x}var xD=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],S7=67108864/xD[xD.length-1];function x7(w){var Y,Z=this.abs();if(Z.t==1&&Z[0]<=xD[xD.length-1]){for(Y=0;Y<xD.length;++Y)if(Z[0]==xD[Y])return!0;return!1}if(Z.isEven())return!1;Y=1;while(Y<xD.length){var K=xD[Y],G=Y+1;while(G<xD.length&&K<S7)K*=xD[G++];K=Z.modInt(K);while(Y<G)if(K%xD[Y++]==0)return!1}return Z.millerRabin(w)}function j7(w){var Y=this.subtract(E.ONE),Z=Y.getLowestSetBit();if(Z<=0)return!1;var K=Y.shiftRight(Z);if(w=w+1>>1,w>xD.length)w=xD.length;var G=$();for(var U=0;U<w;++U){G.fromInt(xD[Math.floor(Math.random()*xD.length)]);var I=G.modPow(K,this);if(I.compareTo(E.ONE)!=0&&I.compareTo(Y)!=0){var x=1;while(x++<Z&&I.compareTo(Y)!=0)if(I=I.modPowInt(2,this),I.compareTo(E.ONE)==0)return!1;if(I.compareTo(Y)!=0)return!1}}return!0}E.prototype.chunkSize=R4,E.prototype.toRadix=k4,E.prototype.fromRadix=h4,E.prototype.fromNumber=g4,E.prototype.bitwiseTo=m4,E.prototype.changeBit=D7,E.prototype.addTo=E7,E.prototype.dMultiply=X7,E.prototype.dAddOffset=W7,E.prototype.multiplyLowerTo=G7,E.prototype.multiplyUpperTo=q7,E.prototype.modInt=N7,E.prototype.millerRabin=j7,E.prototype.clone=eu,E.prototype.intValue=D0,E.prototype.byteValue=h3,E.prototype.shortValue=j4,E.prototype.signum=y4,E.prototype.toByteArray=_4,E.prototype.equals=b4,E.prototype.min=P4,E.prototype.max=v4,E.prototype.and=f4,E.prototype.or=d4,E.prototype.xor=n4,E.prototype.andNot=r4,E.prototype.not=p4,E.prototype.shiftLeft=l4,E.prototype.shiftRight=i4,E.prototype.getLowestSetBit=s4,E.prototype.bitCount=o4,E.prototype.testBit=e4,E.prototype.setBit=u7,E.prototype.clearBit=F7,E.prototype.flipBit=C7,E.prototype.add=$7,E.prototype.subtract=B7,E.prototype.multiply=w7,E.prototype.divide=Z7,E.prototype.remainder=J7,E.prototype.divideAndRemainder=K7,E.prototype.modPow=T7,E.prototype.modInverse=I7,E.prototype.pow=A7,E.prototype.gcd=L7,E.prototype.isProbablePrime=x7,E.prototype.square=Y7,E.prototype.Barrett=Lu;var U0,mD,QD;function R7(w){if(mD[QD++]^=w&255,mD[QD++]^=w>>8&255,mD[QD++]^=w>>16&255,mD[QD++]^=w>>24&255,QD>=_8)QD-=_8}function P3(){R7(new Date().getTime())}if(mD==null){mD=new Array,QD=0;var aD;if(typeof window!=="undefined"&&window.crypto){if(window.crypto.getRandomValues){var v3=new Uint8Array(32);window.crypto.getRandomValues(v3);for(aD=0;aD<32;++aD)mD[QD++]=v3[aD]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var m3=window.crypto.random(32);for(aD=0;aD<m3.length;++aD)mD[QD++]=m3.charCodeAt(aD)&255}}while(QD<_8)aD=Math.floor(65536*Math.random()),mD[QD++]=aD>>>8,mD[QD++]=aD&255;QD=0,P3()}function y7(){if(U0==null){P3(),U0=_7(),U0.init(mD);for(QD=0;QD<mD.length;++QD)mD[QD]=0;QD=0}return U0.next()}function k7(w){var Y;for(Y=0;Y<w.length;++Y)w[Y]=y7()}function h8(){}h8.prototype.nextBytes=k7;function g8(){this.i=0,this.j=0,this.S=new Array}function h7(w){var Y,Z,K;for(Y=0;Y<256;++Y)this.S[Y]=Y;Z=0;for(Y=0;Y<256;++Y)Z=Z+this.S[Y]+w[Y%w.length]&255,K=this.S[Y],this.S[Y]=this.S[Z],this.S[Z]=K;this.i=0,this.j=0}function g7(){var w;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,w=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=w,this.S[w+this.S[this.i]&255]}g8.prototype.init=h7,g8.prototype.next=g7;function _7(){return new g8}var _8=256;if(typeof N8!=="undefined")N8=tC.exports={default:E,BigInteger:E,SecureRandom:h8};else this.jsbn={BigInteger:E,SecureRandom:h8}}).call(N8)});var H0=g((sC)=>{(function(){var D={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function u(C){return E(B(C),arguments)}function F(C,J){return u.apply(null,[C].concat(J||[]))}function E(C,J){var X=1,M=C.length,W,H="",q,A,Q,y,v,m,i,FD;for(q=0;q<M;q++)if(typeof C[q]==="string")H+=C[q];else if(typeof C[q]==="object"){if(Q=C[q],Q.keys){W=J[X];for(A=0;A<Q.keys.length;A++){if(W==null)throw new Error(u('[sprintf] Cannot access property "%s" of undefined value "%s"',Q.keys[A],Q.keys[A-1]));W=W[Q.keys[A]]}}else if(Q.param_no)W=J[Q.param_no];else W=J[X++];if(D.not_type.test(Q.type)&&D.not_primitive.test(Q.type)&&W instanceof Function)W=W();if(D.numeric_arg.test(Q.type)&&(typeof W!=="number"&&isNaN(W)))throw new TypeError(u("[sprintf] expecting number but found %T",W));if(D.number.test(Q.type))i=W>=0;switch(Q.type){case"b":W=parseInt(W,10).toString(2);break;case"c":W=String.fromCharCode(parseInt(W,10));break;case"d":case"i":W=parseInt(W,10);break;case"j":W=JSON.stringify(W,null,Q.width?parseInt(Q.width):0);break;case"e":W=Q.precision?parseFloat(W).toExponential(Q.precision):parseFloat(W).toExponential();break;case"f":W=Q.precision?parseFloat(W).toFixed(Q.precision):parseFloat(W);break;case"g":W=Q.precision?String(Number(W.toPrecision(Q.precision))):parseFloat(W);break;case"o":W=(parseInt(W,10)>>>0).toString(8);break;case"s":W=String(W),W=Q.precision?W.substring(0,Q.precision):W;break;case"t":W=String(!!W),W=Q.precision?W.substring(0,Q.precision):W;break;case"T":W=Object.prototype.toString.call(W).slice(8,-1).toLowerCase(),W=Q.precision?W.substring(0,Q.precision):W;break;case"u":W=parseInt(W,10)>>>0;break;case"v":W=W.valueOf(),W=Q.precision?W.substring(0,Q.precision):W;break;case"x":W=(parseInt(W,10)>>>0).toString(16);break;case"X":W=(parseInt(W,10)>>>0).toString(16).toUpperCase();break}if(D.json.test(Q.type))H+=W;else{if(D.number.test(Q.type)&&(!i||Q.sign))FD=i?"+":"-",W=W.toString().replace(D.sign,"");else FD="";v=Q.pad_char?Q.pad_char==="0"?"0":Q.pad_char.charAt(1):" ",m=Q.width-(FD+W).length,y=Q.width?m>0?v.repeat(m):"":"",H+=Q.align?FD+W+y:v==="0"?FD+y+W:y+FD+W}}return H}var $=Object.create(null);function B(C){if($[C])return $[C];var J=C,X,M=[],W=0;while(J){if((X=D.text.exec(J))!==null)M.push(X[0]);else if((X=D.modulo.exec(J))!==null)M.push("%");else if((X=D.placeholder.exec(J))!==null){if(X[2]){W|=1;var H=[],q=X[2],A=[];if((A=D.key.exec(q))!==null){H.push(A[1]);while((q=q.substring(A[0].length))!=="")if((A=D.key_access.exec(q))!==null)H.push(A[1]);else if((A=D.index_access.exec(q))!==null)H.push(A[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key")}else throw new SyntaxError("[sprintf] failed to parse named argument key");X[2]=H}else W|=2;if(W===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");M.push({placeholder:X[0],param_no:X[1],keys:X[2],sign:X[3],pad_char:X[4],align:X[5],width:X[6],precision:X[7],type:X[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");J=J.substring(X[0].length)}return $[C]=M}if(typeof sC!=="undefined")sC.sprintf=u,sC.vsprintf=F;if(typeof window!=="undefined"){if(window.sprintf=u,window.vsprintf=F,typeof define==="function"&&define.amd)define(function(){return{sprintf:u,vsprintf:F}})}})()});var U3=g((Zu)=>{var SJ=Zu&&Zu.__createBinding||(Object.create?function(D,u,F,E){if(E===void 0)E=F;var $=Object.getOwnPropertyDescriptor(u,F);if(!$||("get"in $?!u.__esModule:$.writable||$.configurable))$={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,E,$)}:function(D,u,F,E){if(E===void 0)E=F;D[E]=u[F]}),xJ=Zu&&Zu.__setModuleDefault||(Object.create?function(D,u){Object.defineProperty(D,"default",{enumerable:!0,value:u})}:function(D,u){D.default=u}),eC=Zu&&Zu.__importStar||function(D){if(D&&D.__esModule)return D;var u={};if(D!=null){for(var F in D)if(F!=="default"&&Object.prototype.hasOwnProperty.call(D,F))SJ(u,D,F)}return xJ(u,D),u};Object.defineProperty(Zu,"__esModule",{value:!0});Zu.Address4=void 0;var aC=eC(q3()),Cu=eC(H3()),oC=L8(),z0=z3(),lu=H0();class iD{constructor(D){this.groups=Cu.GROUPS,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=aC.isCorrect(Cu.BITS),this.isInSubnet=aC.isInSubnet,this.address=D;const u=Cu.RE_SUBNET_STRING.exec(D);if(u){if(this.parsedSubnet=u[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,this.subnetMask<0||this.subnetMask>Cu.BITS)throw new oC.AddressError("Invalid subnet mask.");D=D.replace(Cu.RE_SUBNET_STRING,"")}this.addressMinusSuffix=D,this.parsedAddress=this.parse(D)}static isValid(D){try{return new iD(D),!0}catch(u){return!1}}parse(D){const u=D.split(".");if(!D.match(Cu.RE_ADDRESS))throw new oC.AddressError("Invalid IPv4 address.");return u}correctForm(){return this.parsedAddress.map((D)=>parseInt(D,10)).join(".")}static fromHex(D){const u=D.replace(/:/g,"").padStart(8,"0"),F=[];let E;for(E=0;E<8;E+=2){const $=u.slice(E,E+2);F.push(parseInt($,16))}return new iD(F.join("."))}static fromInteger(D){return iD.fromHex(D.toString(16))}static fromArpa(D){const F=D.replace(/(\.in-addr\.arpa)?\.$/,"").split(".").reverse().join(".");return new iD(F)}toHex(){return this.parsedAddress.map((D)=>lu.sprintf("%02x",parseInt(D,10))).join(":")}toArray(){return this.parsedAddress.map((D)=>parseInt(D,10))}toGroup6(){const D=[];let u;for(u=0;u<Cu.GROUPS;u+=2){const F=lu.sprintf("%02x%02x",parseInt(this.parsedAddress[u],10),parseInt(this.parsedAddress[u+1],10));D.push(lu.sprintf("%x",parseInt(F,16)))}return D.join(":")}bigInteger(){return new z0.BigInteger(this.parsedAddress.map((D)=>lu.sprintf("%02x",parseInt(D,10))).join(""),16)}_startAddress(){return new z0.BigInteger(this.mask()+"0".repeat(Cu.BITS-this.subnetMask),2)}startAddress(){return iD.fromBigInteger(this._startAddress())}startAddressExclusive(){const D=new z0.BigInteger("1");return iD.fromBigInteger(this._startAddress().add(D))}_endAddress(){return new z0.BigInteger(this.mask()+"1".repeat(Cu.BITS-this.subnetMask),2)}endAddress(){return iD.fromBigInteger(this._endAddress())}endAddressExclusive(){const D=new z0.BigInteger("1");return iD.fromBigInteger(this._endAddress().subtract(D))}static fromBigInteger(D){return iD.fromInteger(parseInt(D.toString(),10))}mask(D){if(D===void 0)D=this.subnetMask;return this.getBitsBase2(0,D)}getBitsBase2(D,u){return this.binaryZeroPad().slice(D,u)}reverseForm(D){if(!D)D={};const u=this.correctForm().split(".").reverse().join(".");if(D.omitSuffix)return u;return lu.sprintf("%s.in-addr.arpa.",u)}isMulticast(){return this.isInSubnet(new iD("224.0.0.0/4"))}binaryZeroPad(){return this.bigInteger().toString(2).padStart(Cu.BITS,"0")}groupForV6(){const D=this.parsedAddress;return this.address.replace(Cu.RE_ADDRESS,lu.sprintf('<span class="hover-group group-v4 group-6">%s</span>.<span class="hover-group group-v4 group-7">%s</span>',D.slice(0,2).join("."),D.slice(2,4).join(".")))}}Zu.Address4=iD});var O3=g((D4)=>{Object.defineProperty(D4,"__esModule",{value:!0});D4.RE_URL_WITH_PORT=D4.RE_URL=D4.RE_ZONE_STRING=D4.RE_SUBNET_STRING=D4.RE_BAD_ADDRESS=D4.RE_BAD_CHARACTERS=D4.TYPES=D4.SCOPES=D4.GROUPS=D4.BITS=void 0;D4.BITS=128;D4.GROUPS=8;D4.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"};D4.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"};D4.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi;D4.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi;D4.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/;D4.RE_ZONE_STRING=/%.*$/;D4.RE_URL=new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/);D4.RE_URL_WITH_PORT=new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/)});var V3=g(($4)=>{function C4(D){return D.replace(/(0+)/g,'<span class="zero">$1</span>')}function vJ(D,u=0){return D.split("").map((E,$)=>F4.sprintf('<span class="digit value-%s position-%d">%s</span>',E,$+u,C4(E))).join("")}function E4(D){return D.replace(/^(0+)/,'<span class="zero">$1</span>')}function mJ(D){return D.split(":").map((F)=>E4(F)).join(":")}function cJ(D,u=0){return D.split(":").map((E,$)=>{if(/group-v4/.test(E))return E;return F4.sprintf('<span class="hover-group group-%d">%s</span>',$+u,E4(E))})}Object.defineProperty($4,"__esModule",{value:!0});$4.simpleGroup=$4.spanLeadingZeroes=$4.spanAll=$4.spanAllZeroes=void 0;var F4=H0();$4.spanAllZeroes=C4;$4.spanAll=vJ;$4.spanLeadingZeroes=mJ;$4.simpleGroup=cJ});var w4=g((qD)=>{function S8(D){return iu.sprintf("(%s)",D.join("|"))}function I8(D){if(D.length<4)return iu.sprintf("0{0,%d}%s",4-D.length,D);return D}function tJ(D){const u=[];D.forEach((E,$)=>{if(parseInt(E,16)===0)u.push($)});const F=u.map((E)=>D.map(($,B)=>{if(B===E){const C=B===0||B===iJ.GROUPS-1?":":"";return S8([I8($),C])}return I8($)}).join(":"));return F.push(D.map(I8).join(":")),S8(F)}function sJ(D,u,F){const E=u?"":":",$=F?"":":",B=[];if(!u&&!F)B.push("::");if(u&&F)B.push("");if(F&&!u||!F&&u)B.push(":");B.push(iu.sprintf("%s(:0{1,4}){1,%d}",E,D-1)),B.push(iu.sprintf("(0{1,4}:){1,%d}%s",D-1,$)),B.push(iu.sprintf("(0{1,4}:){%d}0{1,4}",D-1));for(let C=1;C<D-1;C++)for(let J=1;J<D-C;J++)B.push(iu.sprintf("(0{1,4}:){%d}:(0{1,4}:){%d}0{1,4}",J,D-J-C-1));return S8(B)}var rJ=qD&&qD.__createBinding||(Object.create?function(D,u,F,E){if(E===void 0)E=F;var $=Object.getOwnPropertyDescriptor(u,F);if(!$||("get"in $?!u.__esModule:$.writable||$.configurable))$={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,E,$)}:function(D,u,F,E){if(E===void 0)E=F;D[E]=u[F]}),pJ=qD&&qD.__setModuleDefault||(Object.create?function(D,u){Object.defineProperty(D,"default",{enumerable:!0,value:u})}:function(D,u){D.default=u}),lJ=qD&&qD.__importStar||function(D){if(D&&D.__esModule)return D;var u={};if(D!=null){for(var F in D)if(F!=="default"&&Object.prototype.hasOwnProperty.call(D,F))rJ(u,D,F)}return pJ(u,D),u};Object.defineProperty(qD,"__esModule",{value:!0});qD.possibleElisions=qD.simpleRegularExpression=qD.ADDRESS_BOUNDARY=qD.padGroup=qD.groupPossibilities=void 0;var iJ=lJ(O3()),iu=H0();qD.groupPossibilities=S8;qD.padGroup=I8;qD.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]";qD.simpleRegularExpression=tJ;qD.possibleElisions=sJ});var K4=g((Ju)=>{function x8(D){if(!D)throw new Error("Assertion failed.")}function eJ(D){const u=/(\d+)(\d{3})/;while(u.test(D))D=D.replace(u,"$1,$2");return D}function DK(D){return D=D.replace(/^(0{1,})([1-9]+)$/,'<span class="parse-error">$1</span>$2'),D=D.replace(/^(0{1,})(0)$/,'<span class="parse-error">$1</span>$2'),D}function uK(D,u){const F=[],E=[];let $;for($=0;$<D.length;$++)if($<u[0])F.push(D[$]);else if($>u[1])E.push(D[$]);return F.concat(["compact"]).concat(E)}function Z4(D){return kD.sprintf("%04x",parseInt(D,16))}function J4(D){return D&255}var aJ=Ju&&Ju.__createBinding||(Object.create?function(D,u,F,E){if(E===void 0)E=F;var $=Object.getOwnPropertyDescriptor(u,F);if(!$||("get"in $?!u.__esModule:$.writable||$.configurable))$={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,E,$)}:function(D,u,F,E){if(E===void 0)E=F;D[E]=u[F]}),oJ=Ju&&Ju.__setModuleDefault||(Object.create?function(D,u){Object.defineProperty(D,"default",{enumerable:!0,value:u})}:function(D,u){D.default=u}),j8=Ju&&Ju.__importStar||function(D){if(D&&D.__esModule)return D;var u={};if(D!=null){for(var F in D)if(F!=="default"&&Object.prototype.hasOwnProperty.call(D,F))aJ(u,D,F)}return oJ(u,D),u};Object.defineProperty(Ju,"__esModule",{value:!0});Ju.Address6=void 0;var Y4=j8(q3()),T3=j8(H3()),a=j8(O3()),L3=j8(V3()),Ru=U3(),yu=w4(),Au=L8(),yD=z3(),kD=H0();class HD{constructor(D,u){if(this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=Y4.isInSubnet,this.isCorrect=Y4.isCorrect(a.BITS),u===void 0)this.groups=a.GROUPS;else this.groups=u;this.address=D;const F=a.RE_SUBNET_STRING.exec(D);if(F){if(this.parsedSubnet=F[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>a.BITS)throw new Au.AddressError("Invalid subnet mask.");D=D.replace(a.RE_SUBNET_STRING,"")}else if(/\//.test(D))throw new Au.AddressError("Invalid subnet mask.");const E=a.RE_ZONE_STRING.exec(D);if(E)this.zone=E[0],D=D.replace(a.RE_ZONE_STRING,"");this.addressMinusSuffix=D,this.parsedAddress=this.parse(this.addressMinusSuffix)}static isValid(D){try{return new HD(D),!0}catch(u){return!1}}static fromBigInteger(D){const u=D.toString(16).padStart(32,"0"),F=[];let E;for(E=0;E<a.GROUPS;E++)F.push(u.slice(E*4,(E+1)*4));return new HD(F.join(":"))}static fromURL(D){let u,F=null,E;if(D.indexOf("[")!==-1&&D.indexOf("]:")!==-1){if(E=a.RE_URL_WITH_PORT.exec(D),E===null)return{error:"failed to parse address with port",address:null,port:null};u=E[1],F=E[2]}else if(D.indexOf("/")!==-1){if(D=D.replace(/^[a-z0-9]+:\/\//,""),E=a.RE_URL.exec(D),E===null)return{error:"failed to parse address from URL",address:null,port:null};u=E[1]}else u=D;if(F){if(F=parseInt(F,10),F<0||F>65536)F=null}else F=null;return{address:new HD(u),port:F}}static fromAddress4(D){const u=new Ru.Address4(D),F=a.BITS-(T3.BITS-u.subnetMask);return new HD(`::ffff:${u.correctForm()}/${F}`)}static fromArpa(D){let u=D.replace(/(\.ip6\.arpa)?\.$/,"");const F=7;if(u.length!==63)throw new Au.AddressError("Invalid 'ip6.arpa' form.");const E=u.split(".").reverse();for(let $=F;$>0;$--){const B=$*4;E.splice(B,0,":")}return u=E.join(""),new HD(u)}microsoftTranscription(){return kD.sprintf("%s.ipv6-literal.net",this.correctForm().replace(/:/g,"-"))}mask(D=this.subnetMask){return this.getBitsBase2(0,D)}possibleSubnets(D=128){const u=a.BITS-this.subnetMask,F=Math.abs(D-a.BITS),E=u-F;if(E<0)return"0";return eJ(new yD.BigInteger("2",10).pow(E).toString(10))}_startAddress(){return new yD.BigInteger(this.mask()+"0".repeat(a.BITS-this.subnetMask),2)}startAddress(){return HD.fromBigInteger(this._startAddress())}startAddressExclusive(){const D=new yD.BigInteger("1");return HD.fromBigInteger(this._startAddress().add(D))}_endAddress(){return new yD.BigInteger(this.mask()+"1".repeat(a.BITS-this.subnetMask),2)}endAddress(){return HD.fromBigInteger(this._endAddress())}endAddressExclusive(){const D=new yD.BigInteger("1");return HD.fromBigInteger(this._endAddress().subtract(D))}getScope(){let D=a.SCOPES[this.getBits(12,16).intValue()];if(this.getType()==="Global unicast"&&D!=="Link local")D="Global";return D||"Unknown"}getType(){for(let D of Object.keys(a.TYPES))if(this.isInSubnet(new HD(D)))return a.TYPES[D];return"Global unicast"}getBits(D,u){return new yD.BigInteger(this.getBitsBase2(D,u),2)}getBitsBase2(D,u){return this.binaryZeroPad().slice(D,u)}getBitsBase16(D,u){const F=u-D;if(F%4!==0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(D,u).toString(16).padStart(F/4,"0")}getBitsPastSubnet(){return this.getBitsBase2(this.subnetMask,a.BITS)}reverseForm(D){if(!D)D={};const u=Math.floor(this.subnetMask/4),F=this.canonicalForm().replace(/:/g,"").split("").slice(0,u).reverse().join(".");if(u>0){if(D.omitSuffix)return F;return kD.sprintf("%s.ip6.arpa.",F)}if(D.omitSuffix)return"";return"ip6.arpa."}correctForm(){let D,u=[],F=0;const E=[];for(D=0;D<this.parsedAddress.length;D++){const C=parseInt(this.parsedAddress[D],16);if(C===0)F++;if(C!==0&&F>0){if(F>1)E.push([D-F,D-1]);F=0}}if(F>1)E.push([this.parsedAddress.length-F,this.parsedAddress.length-1]);const $=E.map((C)=>C[1]-C[0]+1);if(E.length>0){const C=$.indexOf(Math.max(...$));u=uK(this.parsedAddress,E[C])}else u=this.parsedAddress;for(D=0;D<u.length;D++)if(u[D]!=="compact")u[D]=parseInt(u[D],16).toString(16);let B=u.join(":");return B=B.replace(/^compact$/,"::"),B=B.replace(/^compact|compact$/,":"),B=B.replace(/compact/,""),B}binaryZeroPad(){return this.bigInteger().toString(2).padStart(a.BITS,"0")}parse4in6(D){const u=D.split(":"),E=u.slice(-1)[0].match(T3.RE_ADDRESS);if(E){this.parsedAddress4=E[0],this.address4=new Ru.Address4(this.parsedAddress4);for(let $=0;$<this.address4.groups;$++)if(/^0[0-9]+/.test(this.address4.parsedAddress[$]))throw new Au.AddressError("IPv4 addresses can't have leading zeroes.",D.replace(T3.RE_ADDRESS,this.address4.parsedAddress.map(DK).join(".")));this.v4=!0,u[u.length-1]=this.address4.toGroup6(),D=u.join(":")}return D}parse(D){D=this.parse4in6(D);const u=D.match(a.RE_BAD_CHARACTERS);if(u)throw new Au.AddressError(kD.sprintf("Bad character%s detected in address: %s",u.length>1?"s":"",u.join("")),D.replace(a.RE_BAD_CHARACTERS,'<span class="parse-error">$1</span>'));const F=D.match(a.RE_BAD_ADDRESS);if(F)throw new Au.AddressError(kD.sprintf("Address failed regex: %s",F.join("")),D.replace(a.RE_BAD_ADDRESS,'<span class="parse-error">$1</span>'));let E=[];const $=D.split("::");if($.length===2){let B=$[0].split(":"),C=$[1].split(":");if(B.length===1&&B[0]==="")B=[];if(C.length===1&&C[0]==="")C=[];const J=this.groups-(B.length+C.length);if(!J)throw new Au.AddressError("Error parsing groups");this.elidedGroups=J,this.elisionBegin=B.length,this.elisionEnd=B.length+this.elidedGroups,E=E.concat(B);for(let X=0;X<J;X++)E.push("0");E=E.concat(C)}else if($.length===1)E=D.split(":"),this.elidedGroups=0;else throw new Au.AddressError("Too many :: groups found");if(E=E.map((B)=>kD.sprintf("%x",parseInt(B,16))),E.length!==this.groups)throw new Au.AddressError("Incorrect number of groups found");return E}canonicalForm(){return this.parsedAddress.map(Z4).join(":")}decimal(){return this.parsedAddress.map((D)=>kD.sprintf("%05d",parseInt(D,16))).join(":")}bigInteger(){return new yD.BigInteger(this.parsedAddress.map(Z4).join(""),16)}to4(){const D=this.binaryZeroPad().split("");return Ru.Address4.fromHex(new yD.BigInteger(D.slice(96,128).join(""),2).toString(16))}to4in6(){const D=this.to4(),F=new HD(this.parsedAddress.slice(0,6).join(":"),6).correctForm();let E="";if(!/:$/.test(F))E=":";return F+E+D.address}inspectTeredo(){const D=this.getBitsBase16(0,32),u=this.getBits(80,96).xor(new yD.BigInteger("ffff",16)).toString(),F=Ru.Address4.fromHex(this.getBitsBase16(32,64)),E=Ru.Address4.fromHex(this.getBits(96,128).xor(new yD.BigInteger("ffffffff",16)).toString(16)),$=this.getBits(64,80),B=this.getBitsBase2(64,80),C=$.testBit(15),J=$.testBit(14),X=$.testBit(8),M=$.testBit(9),W=new yD.BigInteger(B.slice(2,6)+B.slice(8,16),2).toString(10);return{prefix:kD.sprintf("%s:%s",D.slice(0,4),D.slice(4,8)),server4:F.address,client4:E.address,flags:B,coneNat:C,microsoft:{reserved:J,universalLocal:M,groupIndividual:X,nonce:W},udpPort:u}}inspect6to4(){const D=this.getBitsBase16(0,16),u=Ru.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:kD.sprintf("%s",D.slice(0,4)),gateway:u.address}}to6to4(){if(!this.is4())return null;const D=["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":");return new HD(D)}toByteArray(){const D=this.bigInteger().toByteArray();if(D.length===17&&D[0]===0)return D.slice(1);return D}toUnsignedByteArray(){return this.toByteArray().map(J4)}static fromByteArray(D){return this.fromUnsignedByteArray(D.map(J4))}static fromUnsignedByteArray(D){const u=new yD.BigInteger("256",10);let F=new yD.BigInteger("0",10),E=new yD.BigInteger("1",10);for(let $=D.length-1;$>=0;$--)F=F.add(E.multiply(new yD.BigInteger(D[$].toString(10),10))),E=E.multiply(u);return HD.fromBigInteger(F)}isCanonical(){return this.addressMinusSuffix===this.canonicalForm()}isLinkLocal(){if(this.getBitsBase2(0,64)==="1111111010000000000000000000000000000000000000000000000000000000")return!0;return!1}isMulticast(){return this.getType()==="Multicast"}is4(){return this.v4}isTeredo(){return this.isInSubnet(new HD("2001::/32"))}is6to4(){return this.isInSubnet(new HD("2002::/16"))}isLoopback(){return this.getType()==="Loopback"}href(D){if(D===void 0)D="";else D=kD.sprintf(":%s",D);return kD.sprintf("http://[%s]%s/",this.correctForm(),D)}link(D){if(!D)D={};if(D.className===void 0)D.className="";if(D.prefix===void 0)D.prefix="/#address=";if(D.v4===void 0)D.v4=!1;let u=this.correctForm;if(D.v4)u=this.to4in6;if(D.className)return kD.sprintf('<a href="%1$s%2$s" class="%3$s">%2$s</a>',D.prefix,u.call(this),D.className);return kD.sprintf('<a href="%1$s%2$s">%2$s</a>',D.prefix,u.call(this))}group(){if(this.elidedGroups===0)return L3.simpleGroup(this.address).join(":");x8(typeof this.elidedGroups==="number"),x8(typeof this.elisionBegin==="number");const D=[],[u,F]=this.address.split("::");if(u.length)D.push(...L3.simpleGroup(u));else D.push("");const E=["hover-group"];for(let $=this.elisionBegin;$<this.elisionBegin+this.elidedGroups;$++)E.push(kD.sprintf("group-%d",$));if(D.push(kD.sprintf('<span class="%s"></span>',E.join(" "))),F.length)D.push(...L3.simpleGroup(F,this.elisionEnd));else D.push("");if(this.is4())x8(this.address4 instanceof Ru.Address4),D.pop(),D.push(this.address4.groupForV6());return D.join(":")}regularExpressionString(D=!1){let u=[];const F=new HD(this.correctForm());if(F.elidedGroups===0)u.push(yu.simpleRegularExpression(F.parsedAddress));else if(F.elidedGroups===a.GROUPS)u.push(yu.possibleElisions(a.GROUPS));else{const E=F.address.split("::");if(E[0].length)u.push(yu.simpleRegularExpression(E[0].split(":")));if(x8(typeof F.elidedGroups==="number"),u.push(yu.possibleElisions(F.elidedGroups,E[0].length!==0,E[1].length!==0)),E[1].length)u.push(yu.simpleRegularExpression(E[1].split(":")));u=[u.join(":")]}if(!D)u=["(?=^|",yu.ADDRESS_BOUNDARY,"|[^\\w\\:])(",...u,")(?=[^\\w\\:]|",yu.ADDRESS_BOUNDARY,"|$)"];return u.join("")}regularExpression(D=!1){return new RegExp(this.regularExpressionString(D),"i")}}Ju.Address6=HD});var N3=g((ND)=>{var FK=ND&&ND.__createBinding||(Object.create?function(D,u,F,E){if(E===void 0)E=F;var $=Object.getOwnPropertyDescriptor(u,F);if(!$||("get"in $?!u.__esModule:$.writable||$.configurable))$={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,E,$)}:function(D,u,F,E){if(E===void 0)E=F;D[E]=u[F]}),CK=ND&&ND.__setModuleDefault||(Object.create?function(D,u){Object.defineProperty(D,"default",{enumerable:!0,value:u})}:function(D,u){D.default=u}),EK=ND&&ND.__importStar||function(D){if(D&&D.__esModule)return D;var u={};if(D!=null){for(var F in D)if(F!=="default"&&Object.prototype.hasOwnProperty.call(D,F))FK(u,D,F)}return CK(u,D),u};Object.defineProperty(ND,"__esModule",{value:!0});ND.v6=ND.AddressError=ND.Address6=ND.Address4=void 0;var $K=U3();Object.defineProperty(ND,"Address4",{enumerable:!0,get:function(){return $K.Address4}});var BK=K4();Object.defineProperty(ND,"Address6",{enumerable:!0,get:function(){return BK.Address6}});var wK=L8();Object.defineProperty(ND,"AddressError",{enumerable:!0,get:function(){return wK.AddressError}});var YK=EK(V3());ND.v6={helpers:YK}});var H4=g((G4)=>{function JK(D,u=["connect","bind","associate"]){if(!zD.SocksCommand[D.command])throw new hD.SocksClientError(zD.ERRORS.InvalidSocksCommand,D);if(u.indexOf(D.command)===-1)throw new hD.SocksClientError(zD.ERRORS.InvalidSocksCommandForOperation,D);if(!Q4(D.destination))throw new hD.SocksClientError(zD.ERRORS.InvalidSocksClientOptionsDestination,D);if(!M4(D.proxy))throw new hD.SocksClientError(zD.ERRORS.InvalidSocksClientOptionsProxy,D);if(W4(D.proxy,D),D.timeout&&!A4(D.timeout))throw new hD.SocksClientError(zD.ERRORS.InvalidSocksClientOptionsTimeout,D);if(D.existing_socket&&!(D.existing_socket instanceof ZK.Duplex))throw new hD.SocksClientError(zD.ERRORS.InvalidSocksClientOptionsExistingSocket,D)}function KK(D){if(D.command!=="connect")throw new hD.SocksClientError(zD.ERRORS.InvalidSocksCommandChain,D);if(!Q4(D.destination))throw new hD.SocksClientError(zD.ERRORS.InvalidSocksClientOptionsDestination,D);if(!(D.proxies&&Array.isArray(D.proxies)&&D.proxies.length>=2))throw new hD.SocksClientError(zD.ERRORS.InvalidSocksClientOptionsProxiesLength,D);if(D.proxies.forEach((u)=>{if(!M4(u))throw new hD.SocksClientError(zD.ERRORS.InvalidSocksClientOptionsProxy,D);W4(u,D)}),D.timeout&&!A4(D.timeout))throw new hD.SocksClientError(zD.ERRORS.InvalidSocksClientOptionsTimeout,D)}function W4(D,u){if(D.custom_auth_method!==void 0){if(D.custom_auth_method<zD.SOCKS5_CUSTOM_AUTH_START||D.custom_auth_method>zD.SOCKS5_CUSTOM_AUTH_END)throw new hD.SocksClientError(zD.ERRORS.InvalidSocksClientOptionsCustomAuthRange,u);if(D.custom_auth_request_handler===void 0||typeof D.custom_auth_request_handler!=="function")throw new hD.SocksClientError(zD.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,u);if(D.custom_auth_response_size===void 0)throw new hD.SocksClientError(zD.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,u);if(D.custom_auth_response_handler===void 0||typeof D.custom_auth_response_handler!=="function")throw new hD.SocksClientError(zD.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,u)}}function Q4(D){return D&&typeof D.host==="string"&&typeof D.port==="number"&&D.port>=0&&D.port<=65535}function M4(D){return D&&(typeof D.host==="string"||typeof D.ipaddress==="string")&&typeof D.port==="number"&&D.port>=0&&D.port<=65535&&(D.type===4||D.type===5)}function A4(D){return typeof D==="number"&&D>0}function XK(D){return new I3.Address4(D).toArray().reduce((F,E)=>(F<<8)+E,0)}function WK(D){const u=D>>>24&255,F=D>>>16&255,E=D>>>8&255,$=D&255;return[u,F,E,$].join(".")}function QK(D){if(X4.isIPv4(D)){const u=new I3.Address4(D);return Buffer.from(u.toArray())}else if(X4.isIPv6(D)){const u=new I3.Address6(D);return Buffer.from(u.canonicalForm().split(":").map((F)=>F.padStart(4,"0")).join(""),"hex")}else throw new Error("Invalid IP address format")}Object.defineProperty(G4,"__esModule",{value:!0});G4.ipToBuffer=G4.int32ToIpv4=G4.ipv4ToInt32=G4.validateSocksClientChainOptions=G4.validateSocksClientOptions=void 0;var hD=G3(),zD=A3(),ZK=import.meta.require("stream"),I3=N3(),X4=import.meta.require("net");G4.validateSocksClientOptions=JK;G4.validateSocksClientChainOptions=KK;G4.ipv4ToInt32=XK;G4.int32ToIpv4=WK;G4.ipToBuffer=QK});var V4=g((U4)=>{Object.defineProperty(U4,"__esModule",{value:!0});U4.ReceiveBuffer=void 0;class z4{constructor(D=4096){this.buffer=Buffer.allocUnsafe(D),this.offset=0,this.originalSize=D}get length(){return this.offset}append(D){if(!Buffer.isBuffer(D))throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");if(this.offset+D.length>=this.buffer.length){const u=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+D.length)),u.copy(this.buffer)}return D.copy(this.buffer,this.offset),this.offset+=D.length}peek(D){if(D>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");return this.buffer.slice(0,D)}get(D){if(D>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");const u=Buffer.allocUnsafe(D);return this.buffer.slice(0,D).copy(u),this.buffer.copyWithin(0,D,D+this.offset-D),this.offset-=D,u}}U4.ReceiveBuffer=z4});var T4=g((Tu)=>{var tu=Tu&&Tu.__awaiter||function(D,u,F,E){function $(B){return B instanceof F?B:new F(function(C){C(B)})}return new(F||(F=Promise))(function(B,C){function J(W){try{M(E.next(W))}catch(H){C(H)}}function X(W){try{M(E.throw(W))}catch(H){C(H)}}function M(W){W.done?B(W.value):$(W.value).then(J,X)}M((E=E.apply(D,u||[])).next())})};Object.defineProperty(Tu,"__esModule",{value:!0});Tu.SocksClientError=Tu.SocksClient=void 0;var HK=import.meta.require("events"),su=import.meta.require("net"),vD=jC(),O=A3(),dD=H4(),zK=V4(),x3=G3();Object.defineProperty(Tu,"SocksClientError",{enumerable:!0,get:function(){return x3.SocksClientError}});var S3=N3();class R8 extends HK.EventEmitter{constructor(D){super();this.options=Object.assign({},D),dD.validateSocksClientOptions(D),this.setState(O.SocksClientState.Created)}static createConnection(D,u){return new Promise((F,E)=>{try{dD.validateSocksClientOptions(D,["connect"])}catch(B){if(typeof u==="function")return u(B),F(B);else return E(B)}const $=new R8(D);$.connect(D.existing_socket),$.once("established",(B)=>{if($.removeAllListeners(),typeof u==="function")u(null,B),F(B);else F(B)}),$.once("error",(B)=>{if($.removeAllListeners(),typeof u==="function")u(B),F(B);else E(B)})})}static createConnectionChain(D,u){return new Promise((F,E)=>tu(this,void 0,void 0,function*(){try{dD.validateSocksClientChainOptions(D)}catch($){if(typeof u==="function")return u($),F($);else return E($)}if(D.randomizeChain)x3.shuffleArray(D.proxies);try{let $;for(let B=0;B<D.proxies.length;B++){const C=D.proxies[B],J=B===D.proxies.length-1?D.destination:{host:D.proxies[B+1].host||D.proxies[B+1].ipaddress,port:D.proxies[B+1].port},X=yield R8.createConnection({command:"connect",proxy:C,destination:J,existing_socket:$});$=$||X.socket}if(typeof u==="function")u(null,{socket:$}),F({socket:$});else F({socket:$})}catch($){if(typeof u==="function")u($),F($);else E($)}}))}static createUDPFrame(D){const u=new vD.SmartBuffer;if(u.writeUInt16BE(0),u.writeUInt8(D.frameNumber||0),su.isIPv4(D.remoteHost.host))u.writeUInt8(O.Socks5HostType.IPv4),u.writeUInt32BE(dD.ipv4ToInt32(D.remoteHost.host));else if(su.isIPv6(D.remoteHost.host))u.writeUInt8(O.Socks5HostType.IPv6),u.writeBuffer(dD.ipToBuffer(D.remoteHost.host));else u.writeUInt8(O.Socks5HostType.Hostname),u.writeUInt8(Buffer.byteLength(D.remoteHost.host)),u.writeString(D.remoteHost.host);return u.writeUInt16BE(D.remoteHost.port),u.writeBuffer(D.data),u.toBuffer()}static parseUDPFrame(D){const u=vD.SmartBuffer.fromBuffer(D);u.readOffset=2;const F=u.readUInt8(),E=u.readUInt8();let $;if(E===O.Socks5HostType.IPv4)$=dD.int32ToIpv4(u.readUInt32BE());else if(E===O.Socks5HostType.IPv6)$=S3.Address6.fromByteArray(Array.from(u.readBuffer(16))).canonicalForm();else $=u.readString(u.readUInt8());const B=u.readUInt16BE();return{frameNumber:F,remoteHost:{host:$,port:B},data:u.readBuffer()}}setState(D){if(this.state!==O.SocksClientState.Error)this.state=D}connect(D){this.onDataReceived=(F)=>this.onDataReceivedHandler(F),this.onClose=()=>this.onCloseHandler(),this.onError=(F)=>this.onErrorHandler(F),this.onConnect=()=>this.onConnectHandler();const u=setTimeout(()=>this.onEstablishedTimeout(),this.options.timeout||O.DEFAULT_TIMEOUT);if(u.unref&&typeof u.unref==="function")u.unref();if(D)this.socket=D;else this.socket=new su.Socket;if(this.socket.once("close",this.onClose),this.socket.once("error",this.onError),this.socket.once("connect",this.onConnect),this.socket.on("data",this.onDataReceived),this.setState(O.SocksClientState.Connecting),this.receiveBuffer=new zK.ReceiveBuffer,D)this.socket.emit("connect");else if(this.socket.connect(this.getSocketOptions()),this.options.set_tcp_nodelay!==void 0&&this.options.set_tcp_nodelay!==null)this.socket.setNoDelay(!!this.options.set_tcp_nodelay);this.prependOnceListener("established",(F)=>{setImmediate(()=>{if(this.receiveBuffer.length>0){const E=this.receiveBuffer.get(this.receiveBuffer.length);F.socket.emit("data",E)}F.socket.resume()})})}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){if(this.state!==O.SocksClientState.Established&&this.state!==O.SocksClientState.BoundWaitingForConnection)this.closeSocket(O.ERRORS.ProxyConnectionTimedOut)}onConnectHandler(){if(this.setState(O.SocksClientState.Connected),this.options.proxy.type===4)this.sendSocks4InitialHandshake();else this.sendSocks5InitialHandshake();this.setState(O.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(D){this.receiveBuffer.append(D),this.processData()}processData(){while(this.state!==O.SocksClientState.Established&&this.state!==O.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize)if(this.state===O.SocksClientState.SentInitialHandshake)if(this.options.proxy.type===4)this.handleSocks4FinalHandshakeResponse();else this.handleInitialSocks5HandshakeResponse();else if(this.state===O.SocksClientState.SentAuthentication)this.handleInitialSocks5AuthenticationHandshakeResponse();else if(this.state===O.SocksClientState.SentFinalHandshake)this.handleSocks5FinalHandshakeResponse();else if(this.state===O.SocksClientState.BoundWaitingForConnection)if(this.options.proxy.type===4)this.handleSocks4IncomingConnectionResponse();else this.handleSocks5IncomingConnectionResponse();else{this.closeSocket(O.ERRORS.InternalError);break}}onCloseHandler(){this.closeSocket(O.ERRORS.SocketClosed)}onErrorHandler(D){this.closeSocket(D.message)}removeInternalSocketHandlers(){this.socket.pause(),this.socket.removeListener("data",this.onDataReceived),this.socket.removeListener("close",this.onClose),this.socket.removeListener("error",this.onError),this.socket.removeListener("connect",this.onConnect)}closeSocket(D){if(this.state!==O.SocksClientState.Error)this.setState(O.SocksClientState.Error),this.socket.destroy(),this.removeInternalSocketHandlers(),this.emit("error",new x3.SocksClientError(D,this.options))}sendSocks4InitialHandshake(){const D=this.options.proxy.userId||"",u=new vD.SmartBuffer;if(u.writeUInt8(4),u.writeUInt8(O.SocksCommand[this.options.command]),u.writeUInt16BE(this.options.destination.port),su.isIPv4(this.options.destination.host))u.writeBuffer(dD.ipToBuffer(this.options.destination.host)),u.writeStringNT(D);else u.writeUInt8(0),u.writeUInt8(0),u.writeUInt8(0),u.writeUInt8(1),u.writeStringNT(D),u.writeStringNT(this.options.destination.host);this.nextRequiredPacketBufferSize=O.SOCKS_INCOMING_PACKET_SIZES.Socks4Response,this.socket.write(u.toBuffer())}handleSocks4FinalHandshakeResponse(){const D=this.receiveBuffer.get(8);if(D[1]!==O.Socks4Response.Granted)this.closeSocket(`${O.ERRORS.Socks4ProxyRejectedConnection} - (${O.Socks4Response[D[1]]})`);else if(O.SocksCommand[this.options.command]===O.SocksCommand.bind){const u=vD.SmartBuffer.fromBuffer(D);u.readOffset=2;const F={port:u.readUInt16BE(),host:dD.int32ToIpv4(u.readUInt32BE())};if(F.host==="0.0.0.0")F.host=this.options.proxy.ipaddress;this.setState(O.SocksClientState.BoundWaitingForConnection),this.emit("bound",{remoteHost:F,socket:this.socket})}else this.setState(O.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{socket:this.socket})}handleSocks4IncomingConnectionResponse(){const D=this.receiveBuffer.get(8);if(D[1]!==O.Socks4Response.Granted)this.closeSocket(`${O.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${O.Socks4Response[D[1]]})`);else{const u=vD.SmartBuffer.fromBuffer(D);u.readOffset=2;const F={port:u.readUInt16BE(),host:dD.int32ToIpv4(u.readUInt32BE())};this.setState(O.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:F,socket:this.socket})}}sendSocks5InitialHandshake(){const D=new vD.SmartBuffer,u=[O.Socks5Auth.NoAuth];if(this.options.proxy.userId||this.options.proxy.password)u.push(O.Socks5Auth.UserPass);if(this.options.proxy.custom_auth_method!==void 0)u.push(this.options.proxy.custom_auth_method);D.writeUInt8(5),D.writeUInt8(u.length);for(let F of u)D.writeUInt8(F);this.nextRequiredPacketBufferSize=O.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse,this.socket.write(D.toBuffer()),this.setState(O.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){const D=this.receiveBuffer.get(2);if(D[0]!==5)this.closeSocket(O.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion);else if(D[1]===O.SOCKS5_NO_ACCEPTABLE_AUTH)this.closeSocket(O.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType);else if(D[1]===O.Socks5Auth.NoAuth)this.socks5ChosenAuthType=O.Socks5Auth.NoAuth,this.sendSocks5CommandRequest();else if(D[1]===O.Socks5Auth.UserPass)this.socks5ChosenAuthType=O.Socks5Auth.UserPass,this.sendSocks5UserPassAuthentication();else if(D[1]===this.options.proxy.custom_auth_method)this.socks5ChosenAuthType=this.options.proxy.custom_auth_method,this.sendSocks5CustomAuthentication();else this.closeSocket(O.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}sendSocks5UserPassAuthentication(){const D=this.options.proxy.userId||"",u=this.options.proxy.password||"",F=new vD.SmartBuffer;F.writeUInt8(1),F.writeUInt8(Buffer.byteLength(D)),F.writeString(D),F.writeUInt8(Buffer.byteLength(u)),F.writeString(u),this.nextRequiredPacketBufferSize=O.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse,this.socket.write(F.toBuffer()),this.setState(O.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return tu(this,void 0,void 0,function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size,this.socket.write(yield this.options.proxy.custom_auth_request_handler()),this.setState(O.SocksClientState.SentAuthentication)})}handleSocks5CustomAuthHandshakeResponse(D){return tu(this,void 0,void 0,function*(){return yield this.options.proxy.custom_auth_response_handler(D)})}handleSocks5AuthenticationNoAuthHandshakeResponse(D){return tu(this,void 0,void 0,function*(){return D[1]===0})}handleSocks5AuthenticationUserPassHandshakeResponse(D){return tu(this,void 0,void 0,function*(){return D[1]===0})}handleInitialSocks5AuthenticationHandshakeResponse(){return tu(this,void 0,void 0,function*(){this.setState(O.SocksClientState.ReceivedAuthenticationResponse);let D=!1;if(this.socks5ChosenAuthType===O.Socks5Auth.NoAuth)D=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2));else if(this.socks5ChosenAuthType===O.Socks5Auth.UserPass)D=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2));else if(this.socks5ChosenAuthType===this.options.proxy.custom_auth_method)D=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size));if(!D)this.closeSocket(O.ERRORS.Socks5AuthenticationFailed);else this.sendSocks5CommandRequest()})}sendSocks5CommandRequest(){const D=new vD.SmartBuffer;if(D.writeUInt8(5),D.writeUInt8(O.SocksCommand[this.options.command]),D.writeUInt8(0),su.isIPv4(this.options.destination.host))D.writeUInt8(O.Socks5HostType.IPv4),D.writeBuffer(dD.ipToBuffer(this.options.destination.host));else if(su.isIPv6(this.options.destination.host))D.writeUInt8(O.Socks5HostType.IPv6),D.writeBuffer(dD.ipToBuffer(this.options.destination.host));else D.writeUInt8(O.Socks5HostType.Hostname),D.writeUInt8(this.options.destination.host.length),D.writeString(this.options.destination.host);D.writeUInt16BE(this.options.destination.port),this.nextRequiredPacketBufferSize=O.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.socket.write(D.toBuffer()),this.setState(O.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){const D=this.receiveBuffer.peek(5);if(D[0]!==5||D[1]!==O.Socks5Response.Granted)this.closeSocket(`${O.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${O.Socks5Response[D[1]]}`);else{const u=D[3];let F,E;if(u===O.Socks5HostType.IPv4){const $=O.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<$){this.nextRequiredPacketBufferSize=$;return}if(E=vD.SmartBuffer.fromBuffer(this.receiveBuffer.get($).slice(4)),F={host:dD.int32ToIpv4(E.readUInt32BE()),port:E.readUInt16BE()},F.host==="0.0.0.0")F.host=this.options.proxy.ipaddress}else if(u===O.Socks5HostType.Hostname){const $=D[4],B=O.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname($);if(this.receiveBuffer.length<B){this.nextRequiredPacketBufferSize=B;return}E=vD.SmartBuffer.fromBuffer(this.receiveBuffer.get(B).slice(5)),F={host:E.readString($),port:E.readUInt16BE()}}else if(u===O.Socks5HostType.IPv6){const $=O.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<$){this.nextRequiredPacketBufferSize=$;return}E=vD.SmartBuffer.fromBuffer(this.receiveBuffer.get($).slice(4)),F={host:S3.Address6.fromByteArray(Array.from(E.readBuffer(16))).canonicalForm(),port:E.readUInt16BE()}}if(this.setState(O.SocksClientState.ReceivedFinalResponse),O.SocksCommand[this.options.command]===O.SocksCommand.connect)this.setState(O.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:F,socket:this.socket});else if(O.SocksCommand[this.options.command]===O.SocksCommand.bind)this.setState(O.SocksClientState.BoundWaitingForConnection),this.nextRequiredPacketBufferSize=O.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.emit("bound",{remoteHost:F,socket:this.socket});else if(O.SocksCommand[this.options.command]===O.SocksCommand.associate)this.setState(O.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:F,socket:this.socket})}}handleSocks5IncomingConnectionResponse(){const D=this.receiveBuffer.peek(5);if(D[0]!==5||D[1]!==O.Socks5Response.Granted)this.closeSocket(`${O.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${O.Socks5Response[D[1]]}`);else{const u=D[3];let F,E;if(u===O.Socks5HostType.IPv4){const $=O.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<$){this.nextRequiredPacketBufferSize=$;return}if(E=vD.SmartBuffer.fromBuffer(this.receiveBuffer.get($).slice(4)),F={host:dD.int32ToIpv4(E.readUInt32BE()),port:E.readUInt16BE()},F.host==="0.0.0.0")F.host=this.options.proxy.ipaddress}else if(u===O.Socks5HostType.Hostname){const $=D[4],B=O.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname($);if(this.receiveBuffer.length<B){this.nextRequiredPacketBufferSize=B;return}E=vD.SmartBuffer.fromBuffer(this.receiveBuffer.get(B).slice(5)),F={host:E.readString($),port:E.readUInt16BE()}}else if(u===O.Socks5HostType.IPv6){const $=O.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<$){this.nextRequiredPacketBufferSize=$;return}E=vD.SmartBuffer.fromBuffer(this.receiveBuffer.get($).slice(4)),F={host:S3.Address6.fromByteArray(Array.from(E.readBuffer(16))).canonicalForm(),port:E.readUInt16BE()}}this.setState(O.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:F,socket:this.socket})}}get socksClientOptions(){return Object.assign({},this.options)}}Tu.SocksClient=R8});var j3=g((ku)=>{var UK=ku&&ku.__createBinding||(Object.create?function(D,u,F,E){if(E===void 0)E=F;var $=Object.getOwnPropertyDescriptor(u,F);if(!$||("get"in $?!u.__esModule:$.writable||$.configurable))$={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,E,$)}:function(D,u,F,E){if(E===void 0)E=F;D[E]=u[F]}),OK=ku&&ku.__exportStar||function(D,u){for(var F in D)if(F!=="default"&&!Object.prototype.hasOwnProperty.call(u,F))UK(u,D,F)};Object.defineProperty(ku,"__esModule",{value:!0});OK(T4(),ku)});import VK from"net";import T8 from"process";import{buddyOptions as mZ,stripAnsi as G0}from"@stacksjs/cli";import{access as $Y,appendFile as _9,mkdir as b9}from"fs/promises";import{dirname as BY}from"path";import wY from"process";import{italic as g9,stripAnsi as YY}from"@stacksjs/cli";var wD={};c3(wD,{ui:()=>FY,team:()=>uY,storage:()=>DY,services:()=>ew,security:()=>aw,searchEngine:()=>ow,queue:()=>sw,ports:()=>tw,payment:()=>iw,overrides:()=>n2,notification:()=>lw,logging:()=>pw,localUrl:()=>$w,library:()=>rw,hashing:()=>nw,git:()=>dw,errors:()=>fw,email:()=>cw,docs:()=>mw,dns:()=>vw,determineAppEnv:()=>CY,defineUi:()=>jw,defineStorage:()=>xw,defineStacksConfig:()=>Bw,defineSms:()=>Sw,defineServices:()=>Iw,defineSecurity:()=>Nw,defineSearchEngine:()=>Lw,defineQueue:()=>Tw,definePayment:()=>Vw,defineNotification:()=>Ow,defineModel:()=>Rw,defineLibrary:()=>Uw,defineJob:()=>Xw,defineHashing:()=>zw,defineGit:()=>Hw,defineEvents:()=>yw,defineEmailConfig:()=>Gw,defineEmail:()=>qw,defineDns:()=>Aw,defineDependencies:()=>Mw,defineDatabase:()=>Qw,defineCronJob:()=>Ww,defineCli:()=>Kw,defineChat:()=>Jw,defineCdn:()=>Zw,defineCache:()=>Yw,defineApp:()=>ww,defaults:()=>m8,database:()=>Pw,config:()=>s,cloud:()=>_w,cli:()=>bw,cache:()=>gw,app:()=>Su,analytics:()=>hw,ai:()=>kw});import{basename as yK,delimiter as kK,dirname as n3,extname as hK,isAbsolute as gK,join as _K,normalize as bK,parse as PK,relative as c7,resolve as f3,sep as vK,toNamespacedPath as mK}from"path";import d3 from"process";import{runCommandSync as dK}from"@stacksjs/cli";function r3(D){return T0(`database/${D||""}`)}function f7(D){return T0(`app/${D||""}`)}function p3(D){return f7(`Commands/${D||""}`)}function v8(D){return L0(`logs/${D||""}`)}function T0(D="",u){let F=d3.cwd();while(F.includes("storage"))F=f3(F,"..");const E=f3(F,D);if(u?.relative)return c7(d3.cwd(),E);return E}function L0(D){return T0(`storage/${D||""}`)}var n7={ai:{deploy:!1,models:["amazon.titan-embed-text-v1","amazon.titan-text-express-v1","amazon.titan-embed-image-v1","amazon.titan-image-generator-v1","anthropic.claude-v1","anthropic.claude-v2","anthropic.claude-v2:1","anthropic.claude-instant-v1","meta.llama2-13b-chat-v1","meta.llama2-70b-chat-v1"]},analytics:{driver:void 0},app:{name:"Stacks",description:"A Stacks application.",env:"local",url:"stacks.localhost",debug:!0,key:"",timezone:"UTC",locale:"en",fallbackLocale:"en",cipher:"AES-256-CBC",docMode:!1,redirectUrls:[],maintenanceMode:!1},cli:{name:"My Custom CLI",command:"my-custom-cli",description:"Stacks is a full-stack framework for TypeScript.",source:p3(),deploy:!1},cache:{driver:"redis",prefix:"stx",ttl:3600,drivers:{redis:{connection:"default",host:"localhost",port:6379,username:"",password:""}}},cloud:{type:"serverless",driver:"aws",storage:{},environments:["production","staging","development"],firewall:{enabled:!0,countryCodes:[],ipAddresses:[],queryString:[],httpHeaders:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0},cdn:{allowedMethods:"GET_HEAD",cachedMethods:"GET_HEAD",minTtl:0,defaultTtl:86400,maxTtl:31536000,compress:!0,priceClass:"PriceClass_All",originShieldRegion:"us-east-1",cookieBehavior:"none",allowList:{cookies:[],headers:[],queryStrings:[]},realtimeLogs:{enabled:!0,samplingRate:2}},fileSystem:!1},database:{default:"sqlite",connections:{sqlite:{database:r3("stacks.sqlite"),prefix:""}},migrations:"migrations",migrationLocks:"migration_locks"},dns:{driver:"aws",a:[],aaaa:[],cname:[],mx:[],txt:[]},docs:{lang:"en-US",title:"Stacks",description:"Rapid application, cloud & library framework.",lastUpdated:!0,deploy:!1,themeConfig:{editLink:{pattern:"https://github.com/stacksjs/stacks/edit/main/docs/docs/:path",text:"Edit this page on GitHub"},footer:{message:"Released under the MIT License.",copyright:"Copyright \xA9 2024-present Stacks.js, Inc."}}},email:{from:{name:"Stacks",address:"no-reply@stacksjs.org"},mailboxes:[],server:{scan:!0}},errors:{messages:{string:"The {{ field }} field must be a string",email:"The {{ field }} field must be a valid email address",regex:"The {{ field }} field format is invalid",url:"The {{ field }} field must be a valid URL",activeUrl:"The {{ field }} field must be a valid URL",alpha:"The {{ field }} field must contain only letters",alphaNumeric:"The {{ field }} field must contain only letters and numbers",minLength:"The {{ field }} field must have at least {{ min }} characters",maxLength:"The {{ field }} field must not be greater than {{ max }} characters",fixedLength:"The {{ field }} field must be {{ size }} characters long",confirmed:"The {{ field }} field and {{ otherField }} field must be the same",endsWith:"The {{ field }} field must end with {{ substring }}",startsWith:"The {{ field }} field must start with {{ substring }}",sameAs:"The {{ field }} field and {{ otherField }} field must be the same",notSameAs:"The {{ field }} field and {{ otherField }} field must be different",in:"The selected {{ field }} is invalid",notIn:"The selected {{ field }} is invalid",ipAddress:"The {{ field }} field must be a valid IP address",uuid:"The {{ field }} field must be a valid UUID",ascii:"The {{ field }} field must only contain ASCII characters",creditCard:"The {{ field }} field must be a valid {{ providersList }} card number",hexCode:"The {{ field }} field must be a valid hex color code",iban:"The {{ field }} field must be a valid IBAN number",jwt:"The {{ field }} field must be a valid JWT token",coordinates:"The {{ field }} field must contain latitude and longitude coordinates",mobile:"The {{ field }} field must be a valid mobile phone number",passport:"The {{ field }} field must be a valid passport number",postalCode:"The {{ field }} field must be a valid postal code",boolean:"The value must be a boolean",number:"The {{ field }} field must be a number",min:"The {{ field }} field must be at least {{ min }}",max:"The {{ field }} field must not be greater than {{ max }}",range:"The {{ field }} field must be between {{ min }} and {{ max }}",positive:"The {{ field }} field must be positive",negative:"The {{ field }} field must be negative",decimal:"The {{ field }} field must have {{ digits }} decimal places",withoutDecimals:"The {{ field }} field must not have decimal places",date:"The {{ field }} field must be a datetime value","date.equals":"The {{ field }} field must be a date equal to {{ expectedValue }}","date.after":"The {{ field }} field must be a date after {{ expectedValue }}","date.before":"The {{ field }} field must be a date before {{ expectedValue }}","date.afterOrEqual":"The {{ field }} field must be a date after or equal to {{ expectedValue }}","date.beforeOrEqual":"The {{ field }} field must be a date before or equal to {{ expectedValue }}","date.sameAs":"The {{ field }} field and {{ otherField }} field must be the same","date.notSameAs":"The {{ field }} field and {{ otherField }} field must be different","date.afterField":"The {{ field }} field must be a date after {{ otherField }}",accepted:"The {{ field }} field must be accepted",enum:"The selected {{ field }} is invalid",literal:"The {{ field }} field must be {{ expectedValue }}",object:"The {{ field }} field must be an object",record:"The {{ field }} field must be an object","record.minLength":"The {{ field }} field must have at least {{ min }} items","record.maxLength":"The {{ field }} field must not have more than {{ max }} items","record.fixedLength":"The {{ field }} field must contain {{ size }} items",array:"The {{ field }} field must be an array","array.minLength":"The {{ field }} field must have at least {{ min }} items","array.maxLength":"The {{ field }} field must not have more than {{ max }} items","array.fixedLength":"The {{ field }} field must contain {{ size }} items",notEmpty:"The {{ field }} field must not be empty",distinct:"The {{ field }} field has duplicate values",tuple:"The {{ field }} field must be an array",union:"Invalid value provided for {{ field }} field",unionGroup:"Invalid value provided for {{ field }} field",unionOfTypes:"Invalid value provided for {{ field }} field"}},git:{hooks:{"pre-commit":"lint-staged"},scopes:["","ci","deps","dx","release","docs","test","core","actions","arrays","auth","build","cache","cli","cloud","collections","config","database","datetime","docs","errors","git","lint","x-ray","modules","notifications","objects","path","realtime","router","buddy","security","server","storage","strings","tests","types","ui","utils"],messages:{type:"Select the type of change that you\u2019re committing:",scope:"Select the SCOPE of this change (optional):",customScope:"Select the SCOPE of this change:",subject:"Write a SHORT, IMPERATIVE tense description of the change:\n",body:'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',breaking:'List any BREAKING CHANGES (optional). Use "|" to break new line:\n',footerPrefixesSelect:"Select the ISSUES type of the change list by this change (optional):",customFooterPrefixes:"Input ISSUES prefix:",footer:"List any ISSUES by this change. E.g.: #31, #34:\n",confirmCommit:"Are you sure you want to proceed with the commit above?"},types:[{value:"feat",name:"feat: \u2728 A new feature",emoji:":sparkles:"},{value:"fix",name:"fix: \uD83D\uDC1B A bug fix",emoji:":bug:"},{value:"docs",name:"docs: \uD83D\uDCDD Documentation only changes",emoji:":memo:"},{value:"style",name:"style: \uD83D\uDC84 Changes that do not affect the meaning of the code",emoji:":lipstick:"},{value:"refactor",name:"refactor: \u267B\uFE0F A code change that neither fixes a bug nor adds a feature",emoji:":recycle:"},{value:"perf",name:"perf: \u26A1\uFE0F A code change that improves performance",emoji:":zap:"},{value:"test",name:"test: \u2705 Adding missing tests or adjusting existing tests",emoji:":white_check_mark:"},{value:"build",name:"build: \uD83D\uDCE6\uFE0F Changes that affect the build system or external dependencies",emoji:":package:"},{value:"ci",name:"ci: \uD83C\uDFA1 Changes to our CI configuration files and scripts",emoji:":ferris_wheel:"},{value:"chore",name:"chore: \uD83D\uDD28 Other changes that don\u2019t modify src or test files",emoji:":hammer:"},{value:"revert",name:"revert: \u23EA\uFE0F Reverts a previous commit",emoji:":rewind:"}]},hashing:{driver:"argon2",bcrypt:{rounds:10,cost:4},argon2:{memory:65536,time:1}},library:{name:"hello-world",owner:"@stacksjs",repository:"stacksjs/stacks",license:"MIT",author:"Chris Breuer",contributors:["Chris Breuer <chris@stacksjs.org>"],defaultLanguage:"en",vueComponents:{name:"hello-world-vue",description:"Your Vue component library description",keywords:["component","library","vue","vite","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},webComponents:{name:"hello-world-elements",description:"Your framework agnostic web component library description.",keywords:["custom-elements","web-components","library","framework-agnostic","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},functions:{name:"hello-world-fx",description:"Your function library description.",keywords:["functions","composables","library","typescript","javascript"],shouldGenerateSourcemap:!1,files:["counter","dark"]}},logging:{logsPath:"storage/logs/stacks.log",deploymentsPath:"storage/logs/deployments.log"},notification:{default:"email"},payment:{driver:"stripe"},ports:{frontend:3000,backend:3001,admin:3002,library:3003,desktop:3004,email:3005,docs:3006,inspect:3007,api:3008,systemTray:3009,database:3010},queue:{default:"sync",connections:{sync:{driver:"sync"},database:{driver:"database",table:"jobs",queue:"default",retry_after:90},redis:{driver:"redis",connection:"default",queue:"default",retry_after:90},sqs:{driver:"sqs",key:"",secret:"",prefix:"",suffix:"",queue:"default",region:"us-east-1"}}},searchEngine:{driver:"opensearch"},security:{firewall:{enabled:!0,countryCodes:[],ipAddresses:[],queryString:[],httpHeaders:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0}},services:{aws:{accountId:"",appId:"",apiKey:"",region:"us-east-1"},algolia:{appId:"",apiKey:""},meilisearch:{appId:"",apiKey:""},stripe:{appId:"",apiKey:""}},storage:{driver:"s3"},team:{name:"Stacks",members:{"Chris Breuer":"chris@stacksjs.org"}},ui:{shortcuts:[["btn","inline-flex items-center px-4 py-2 ml-2 border border-transparent shadow-sm text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"]],safelist:"prose prose-sm m-auto text-left",trigger:":stx:",classPrefix:"stx-",reset:"tailwind",icons:["heroicons"],fonts:{email:{title:"Mona",text:"Hubot"},desktop:{title:"Mona",text:"Hubot"},mobile:{title:"Mona",text:"Hubot"},web:{title:"Mona",text:"Hubot"}}}},m8=n7;var l3={default:"meta.llama2-70b-chat-v1",models:["amazon.titan-text-express-v1","amazon.titan-text-lite-v1","meta.llama2-70b-chat-v1"],deploy:!0};var i3={driver:"fathom",drivers:{googleAnalytics:{trackingId:"UA-XXXXXXXXX-X"},fathom:{siteId:"WOLZMJDL"}}};import uw from"process";var r7=new Set([".","!","?"]),sK=new Set([...r7,":",'"',"'","\u201D"]);var qu=l(s3(),1);var $E=l(a3(),1);function p8(D){return typeof D==="string"}var T={required:"The {{ field }} field must be defined",string:"The {{ field }} field must be a string",email:"The {{ field }} field must be a valid email address",mobile:"The {{ field }} field must be a valid mobile phone number",creditCard:"The {{ field }} field must be a valid {{ providersList }} card number",passport:"The {{ field }} field must be a valid passport number",postalCode:"The {{ field }} field must be a valid postal code",regex:"The {{ field }} field format is invalid",ascii:"The {{ field }} field must only contain ASCII characters",iban:"The {{ field }} field must be a valid IBAN number",jwt:"The {{ field }} field must be a valid JWT token",coordinates:"The {{ field }} field must contain latitude and longitude coordinates",url:"The {{ field }} field must be a valid URL",activeUrl:"The {{ field }} field must be a valid URL",alpha:"The {{ field }} field must contain only letters",alphaNumeric:"The {{ field }} field must contain only letters and numbers",minLength:"The {{ field }} field must have at least {{ min }} characters",maxLength:"The {{ field }} field must not be greater than {{ max }} characters",fixedLength:"The {{ field }} field must be {{ size }} characters long",confirmed:"The {{ field }} field and {{ otherField }} field must be the same",endsWith:"The {{ field }} field must end with {{ substring }}",startsWith:"The {{ field }} field must start with {{ substring }}",sameAs:"The {{ field }} field and {{ otherField }} field must be the same",notSameAs:"The {{ field }} field and {{ otherField }} field must be different",in:"The selected {{ field }} is invalid",notIn:"The selected {{ field }} is invalid",ipAddress:"The {{ field }} field must be a valid IP address",uuid:"The {{ field }} field must be a valid UUID",hexCode:"The {{ field }} field must be a valid hex color code",boolean:"The value must be a boolean",number:"The {{ field }} field must be a number","number.in":"The selected {{ field }} is not in {{ values }}",min:"The {{ field }} field must be at least {{ min }}",max:"The {{ field }} field must not be greater than {{ max }}",range:"The {{ field }} field must be between {{ min }} and {{ max }}",positive:"The {{ field }} field must be positive",negative:"The {{ field }} field must be negative",decimal:"The {{ field }} field must have {{ digits }} decimal places",withoutDecimals:"The {{ field }} field must be an integer",accepted:"The {{ field }} field must be accepted",enum:"The selected {{ field }} is invalid",literal:"The {{ field }} field must be {{ expectedValue }}",object:"The {{ field }} field must be an object",array:"The {{ field }} field must be an array","array.minLength":"The {{ field }} field must have at least {{ min }} items","array.maxLength":"The {{ field }} field must not have more than {{ max }} items","array.fixedLength":"The {{ field }} field must contain {{ size }} items",notEmpty:"The {{ field }} field must not be empty",distinct:"The {{ field }} field has duplicate values",record:"The {{ field }} field must be an object","record.minLength":"The {{ field }} field must have at least {{ min }} items","record.maxLength":"The {{ field }} field must not have more than {{ max }} items","record.fixedLength":"The {{ field }} field must contain {{ size }} items",tuple:"The {{ field }} field must be an array",union:"Invalid value provided for {{ field }} field",unionGroup:"Invalid value provided for {{ field }} field",unionOfTypes:"Invalid value provided for {{ field }} field",date:"The {{ field }} field must be a datetime value","date.equals":"The {{ field }} field must be a date equal to {{ expectedValue }}","date.after":"The {{ field }} field must be a date after {{ expectedValue }}","date.before":"The {{ field }} field must be a date before {{ expectedValue }}","date.afterOrEqual":"The {{ field }} field must be a date after or equal to {{ expectedValue }}","date.beforeOrEqual":"The {{ field }} field must be a date before or equal to {{ expectedValue }}","date.sameAs":"The {{ field }} field and {{ otherField }} field must be the same","date.notSameAs":"The {{ field }} field and {{ otherField }} field must be different","date.afterField":"The {{ field }} field must be a date after {{ otherField }}","date.afterOrSameAs":"The {{ field }} field must be a date after or same as {{ otherField }}","date.beforeField":"The {{ field }} field must be a date before {{ otherField }}","date.beforeOrSameAs":"The {{ field }} field must be a date before or same as {{ otherField }}","date.weekend":"The {{ field }} field is not a weekend","date.weekday":"The {{ field }} field is not a weekday"},o3={"":"data"};var ZE=Object.defineProperty,N0=(D,u)=>{for(var F in u)ZE(D,F,{get:u[F],enumerable:!0})};function l8(D,u,F,E,$){for(u=u.split?u.split("."):u,E=0;E<u.length;E++)D=D?D[u[E]]:$;return D===$?F:D}var s1=l(x0(),1),a1=l(C1(),1),o1=l(Y1(),1),e1=l(Z1(),1),DF=l(X1(),1),uF=l(W1(),1),FF=l(Q1(),1),CF=l(G1(),1),EF=l(S1(),1),$F=l(j1(),1),BF=l(h1(),1),wF=l(g1(),1),YF=l(P1(),1),ZF=l(c1(),1),JF=l(d1(),1),KF=l(O2(),1),XF=l(V2(),1),WF=l(V2(),1),QF=l(O2(),1),w0=class{#D;#u;constructor(D,u){this.#D=D,this.#u=u||{}}#F(D,u){if(!D.includes("{{"))return D;return D.replace(/(\\)?{{(.*?)}}/g,(F,E,$)=>{const B=$.trim().split(".");let C=u;while(B.length){if(C===null||typeof C!=="object")return;const J=B.shift();C=Object.hasOwn(C,J)?C[J]:void 0}return C})}getMessage(D,u,F,E){const $=this.#u[F.name]||F.name,B=this.#D[`${F.getFieldPath()}.${u}`];if(B)return this.#F(B,{field:$,...E});const C=this.#D[`${F.wildCardPath}.${u}`];if(C)return this.#F(C,{field:$,...E});const J=this.#D[u];if(J)return this.#F(J,{field:$,...E});return this.#F(D,{field:$,...E})}toJSON(){return{messages:this.#D,fields:this.#u}}},C8={};N0(C8,{E_VALIDATION_ERROR:()=>t1});var T2=class extends Error{constructor(D,u){super("Validation failure",u);this.messages=D;const F=this.constructor;Error.captureStackTrace(this,F)}status=422;code="E_VALIDATION_ERROR";get[Symbol.toStringTag](){return this.constructor.name}toString(){return`${this.name} [${this.code}]: ${this.message}`}},t1=T2,L2=class{hasErrors=!1;errors=[];report(D,u,F,E){const $={message:D,rule:u,field:F.getFieldPath()};if(E)$.meta=E;if(F.isArrayMember)$.index=F.name;this.hasErrors=!0,this.errors.push($)}createError(){return new t1(this.errors)}},m$=["1",1,"true",!0,"on"],c$=["0",0,"false",!1],_={exists(D){return D!==null&&D!==void 0},isMissing(D){return!this.exists(D)},isTrue(D){return m$.includes(D)},isFalse(D){return c$.includes(D)},isString(D){return typeof D==="string"},isObject(D){return!!(D&&typeof D==="object"&&!Array.isArray(D))},hasKeys(D,u){for(let F of u)if(F in D===!1)return!1;return!0},isArray(D){return Array.isArray(D)},isNumeric(D){return!Number.isNaN(Number(D))},asNumber(D){return D===null?Number.NaN:Number(D)},asBoolean(D){if(this.isTrue(D))return!0;if(this.isFalse(D))return!1;return null},isEmail:CF.default.default,isURL:o1.default.default,isAlpha:EF.default.default,isAlphaNumeric:ZF.default.default,isIP:s1.default.default,isUUID:uF.default.default,isAscii:FF.default.default,isCreditCard:YF.default.default,isIBAN:DF.default.default,isJWT:a1.default.default,isLatLong:$F.default.default,isMobilePhone:XF.default.default,isPassportNumber:JF.default.default,isPostalCode:KF.default.default,isSlug:e1.default.default,isDecimal:BF.default.default,mobileLocales:WF.locales,postalCountryCodes:QF.locales,passportCountryCodes:["AM","AR","AT","AU","AZ","BE","BG","BR","BY","CA","CH","CY","CZ","DE","DK","DZ","ES","FI","FR","GB","GR","HR","HU","IE","IN","ID","IR","IS","IT","JM","JP","KR","KZ","LI","LT","LU","LV","LY","MT","MZ","MY","MX","NL","NZ","PH","PK","PL","PT","RO","RU","SE","SL","SK","TH","TR","UA","US"],isHexColor:(D)=>{if(!D.startsWith("#"))return!1;return wF.default.default(D)},isActiveURL:async(D)=>{const{resolve4:u,resolve6:F}=await import("dns/promises");try{const{hostname:E}=new URL(D);if((await F(E)).length)return!0;else return(await u(E)).length>0}catch{return!1}},isDistinct:(D,u)=>{const F=new Set;if(!u){for(let $ of D)if(_.exists($))if(F.has($))return!1;else F.add($);return!0}const E=Array.isArray(u)?u:[u];for(let $ of D)if(_.isObject($)&&_.hasKeys($,E)){const B=E.map((C)=>$[C]).join("_");if(F.has(B))return!1;else F.add(B)}return!0},getNestedValue(D,u){if(D.indexOf(".")>-1)return l8(u.data,D);return u.parent[D]}};function S(D,u){const F={validator:D,isAsync:u?.isAsync||D.constructor.name==="AsyncFunction",implicit:u?.implicit??!1};return function(...E){return{rule:F,options:E[0]}}}var Pu=class{static macro(D,u){this.prototype[D]=u}static getter(D,u,F=!1){Object.defineProperty(this.prototype,D,{get(){const E=u.call(this);if(F)Object.defineProperty(this,D,{configurable:!1,enumerable:!1,value:E,writable:!1});return E},configurable:!0,enumerable:!1})}};var f$=/[\p{Lu}]/u,d$=/[\p{Ll}]/u,MF=/^[\p{Lu}](?![\p{Lu}])/gu,qF=/([\p{Alpha}\p{N}_]|$)/u,N2=/[_.\- ]+/,n$=new RegExp("^"+N2.source),AF=new RegExp(N2.source+qF.source,"gu"),GF=new RegExp("\\d+"+qF.source,"gu"),r$=(D,u,F,E)=>{let $=!1,B=!1,C=!1,J=!1;for(let X=0;X<D.length;X++){const M=D[X];if(J=X>2?D[X-3]==="-":!0,$&&f$.test(M))D=D.slice(0,X)+"-"+D.slice(X),$=!1,C=B,B=!0,X++;else if(B&&C&&d$.test(M)&&(!J||E))D=D.slice(0,X-1)+"-"+D.slice(X-1),C=B,B=!1,$=!0;else $=u(M)===M&&F(M)!==M,C=B,B=F(M)===M&&u(M)!==M}return D},p$=(D,u)=>{return MF.lastIndex=0,D.replaceAll(MF,(F)=>u(F))},l$=(D,u)=>{return AF.lastIndex=0,GF.lastIndex=0,D.replaceAll(GF,(F,E,$)=>["_","-"].includes(D.charAt($+F.length))?F:u(F)).replaceAll(AF,(F,E)=>u(E))};function OD(D,u){if(!(typeof D==="string"||Array.isArray(D)))throw new TypeError("Expected the input to be `string | string[]`");if(u={pascalCase:!1,preserveConsecutiveUppercase:!1,...u},Array.isArray(D))D=D.map((B)=>B.trim()).filter((B)=>B.length).join("-");else D=D.trim();if(D.length===0)return"";const F=u.locale===!1?(B)=>B.toLowerCase():(B)=>B.toLocaleLowerCase(u.locale),E=u.locale===!1?(B)=>B.toUpperCase():(B)=>B.toLocaleUpperCase(u.locale);if(D.length===1){if(N2.test(D))return"";return u.pascalCase?E(D):F(D)}if(D!==F(D))D=r$(D,F,E,u.preserveConsecutiveUppercase);if(D=D.replace(n$,""),D=u.preserveConsecutiveUppercase?p$(D,F):F(D),u.pascalCase)D=E(D.charAt(0))+D.slice(1);return l$(D,E)}var s6=l(x2(),1),DD=l(x2(),1),a6=l(HF(),1),o6=l(zF(),1),e6=l(UF(),1);function f2(D){return new D9(D)}var _2=(D,u)=>u.some((F)=>F instanceof RegExp?F.test(D):F===D),i$=new Set(["https:","http:","file:"]),t$=(D)=>{try{const{protocol:u}=new URL(D);return u.endsWith(":")&&!u.includes(".")&&!i$.has(u)}catch{return!1}},s$=(D,{stripHash:u})=>{const F=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(D);if(!F)throw new Error(`Invalid URL: ${D}`);let{type:E,data:$,hash:B}=F.groups;const C=E.split(";");B=u?"":B;let J=!1;if(C[C.length-1]==="base64")C.pop(),J=!0;const X=C.shift()?.toLowerCase()??"",W=[...C.map((H)=>{let[q,A=""]=H.split("=").map((Q)=>Q.trim());if(q==="charset"){if(A=A.toLowerCase(),A==="us-ascii")return""}return`${q}${A?`=${A}`:""}`}).filter(Boolean)];if(J)W.push("base64");if(W.length>0||X&&X!=="text/plain")W.unshift(X);return`data:${W.join(";")},${J?$.trim():$}${B?`#${B}`:""}`};function b2(D,u){if(u={defaultProtocol:"http",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,...u},typeof u.defaultProtocol==="string"&&!u.defaultProtocol.endsWith(":"))u.defaultProtocol=`${u.defaultProtocol}:`;if(D=D.trim(),/^data:/i.test(D))return s$(D,u);if(t$(D))return D;const F=D.startsWith("//");if(!(!F&&/^\.*\//.test(D)))D=D.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,u.defaultProtocol);const $=new URL(D);if(u.forceHttp&&u.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(u.forceHttp&&$.protocol==="https:")$.protocol="http:";if(u.forceHttps&&$.protocol==="http:")$.protocol="https:";if(u.stripAuthentication)$.username="",$.password="";if(u.stripHash)$.hash="";else if(u.stripTextFragment)$.hash=$.hash.replace(/#?:~:text.*?$/i,"");if($.pathname){const C=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let J=0,X="";for(;;){const W=C.exec($.pathname);if(!W)break;const H=W[0],q=W.index,A=$.pathname.slice(J,q);X+=A.replace(/\/{2,}/g,"/"),X+=H,J=q+H.length}const M=$.pathname.slice(J,$.pathname.length);X+=M.replace(/\/{2,}/g,"/"),$.pathname=X}if($.pathname)try{$.pathname=decodeURI($.pathname)}catch{}if(u.removeDirectoryIndex===!0)u.removeDirectoryIndex=[/^index\.[a-z]+$/];if(Array.isArray(u.removeDirectoryIndex)&&u.removeDirectoryIndex.length>0){let C=$.pathname.split("/");const J=C[C.length-1];if(_2(J,u.removeDirectoryIndex))C=C.slice(0,-1),$.pathname=C.slice(1).join("/")+"/"}if($.hostname){if($.hostname=$.hostname.replace(/\.$/,""),u.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test($.hostname))$.hostname=$.hostname.replace(/^www\./,"")}if(Array.isArray(u.removeQueryParameters)){for(let C of[...$.searchParams.keys()])if(_2(C,u.removeQueryParameters))$.searchParams.delete(C)}if(!Array.isArray(u.keepQueryParameters)&&u.removeQueryParameters===!0)$.search="";if(Array.isArray(u.keepQueryParameters)&&u.keepQueryParameters.length>0){for(let C of[...$.searchParams.keys()])if(!_2(C,u.keepQueryParameters))$.searchParams.delete(C)}if(u.sortQueryParameters){$.searchParams.sort();try{$.search=decodeURIComponent($.search)}catch{}}if(u.removeTrailingSlash)$.pathname=$.pathname.replace(/\/$/,"");if(u.removeExplicitPort&&$.port)$.port="";const B=D;if(D=$.toString(),!u.removeSingleSlash&&$.pathname==="/"&&!B.endsWith("/")&&$.hash==="")D=D.replace(/\/$/,"");if((u.removeTrailingSlash||$.pathname==="/")&&$.hash===""&&u.removeSingleSlash)D=D.replace(/\/$/,"");if(F&&!u.normalizeProtocol)D=D.replace(/^http:\/\//,"//");if(u.stripProtocol)D=D.replace(/^(?:https?:)?\/\//,"");return D}var B9=l(OF(),1),w9=l(VF(),1);function d2(D){return new lB(D)}function XB({parseFnRefId:D,variableName:u,wildCardPath:F,isArrayMember:E,valueExpression:$,parentExpression:B,fieldNameExpression:C,parentValueExpression:J}){const X=D?`refs['${D}'](${$}, {
|
|
42
|
+
data: root,
|
|
43
|
+
meta: meta,
|
|
44
|
+
parent: ${J}
|
|
45
|
+
})`:$;let M="";if(B==="root"||B==="root_item")M=C;else if(C!=="''")M=`${B}.getFieldPath() + '.' + ${C}`;return`const ${u} = defineValue(${X}, {
|
|
46
|
+
data: root,
|
|
47
|
+
meta: meta,
|
|
48
|
+
name: ${C},
|
|
49
|
+
wildCardPath: '${F}',
|
|
50
|
+
getFieldPath() {
|
|
51
|
+
return ${M};
|
|
52
|
+
},
|
|
53
|
+
mutate: defineValue,
|
|
54
|
+
report: report,
|
|
55
|
+
isValid: true,
|
|
56
|
+
parent: ${J},
|
|
57
|
+
isArrayMember: ${E},
|
|
58
|
+
});`}function TF({variableName:D,guardedCodeSnippet:u}){return`if (ensureIsArray(${D})) {
|
|
59
|
+
${u}
|
|
60
|
+
}`}function B8({variableName:D,bail:u,guardedCodeSnippet:F}){if(!u)return F;return`if (${D}.isValid) {
|
|
61
|
+
${F}
|
|
62
|
+
}`}function Y0({allowNull:D,conditional:u,variableName:F,outputExpression:E,transformFnRefId:$}){if(!D)return"";return`${u||"if"}(${F}.value === null) {
|
|
63
|
+
${E} = ${$?`refs['${$}'](null, ${F});`:"null;"}
|
|
64
|
+
}`}function WB(D,u){const[F,E]=D;if(F&&E)return`if (${F} && ${E}) {
|
|
65
|
+
${u}
|
|
66
|
+
}`;if(F)return`if (${F}) {
|
|
67
|
+
${u}
|
|
68
|
+
}`;if(E)return`if (${E}) {
|
|
69
|
+
${u}
|
|
70
|
+
}`;return u}function QB({isAsync:D,implicit:u,ruleFnId:F},E,$,B){const C=`refs['${F}']`,J=`${C}.validator(${E}.value, ${C}.options, ${E});`,X=$?`${E}.isValid`:"",M=u||B?"":`${E}.isDefined`;return WB([X,M],D?`await ${J}`:`${J}`)}function Z0({bail:D,validations:u,variableName:F,dropMissingCheck:E}){return`${u.map(($)=>QB($,F,D,E)).join("\n")}`}function LF({variableName:D,outputExpression:u,outputValueExpression:F}){return`const ${D}_out = ${F};
|
|
71
|
+
${u} = ${D}_out;`}function J0({allowNull:D,isOptional:u,variableName:F}){if(u===!1)if(D===!1)return`ensureExists(${F});`;else return`ensureIsDefined(${F});`;return""}function AB({variableName:D,loopCodeSnippet:u,startingIndex:F}){return F=F||0,`const ${D}_items_size = ${D}.value.length;
|
|
72
|
+
for (let ${D}_i = ${F}; ${D}_i < ${D}_items_size; ${D}_i++) {
|
|
73
|
+
${u}
|
|
74
|
+
}`}function qB({parseFnRefId:D,variableName:u}){if(D)return`${u}.value = refs['${D}'](${u}.value);`;return""}function NF({variableName:D,conditionalFnRefId:u}){return`else {
|
|
75
|
+
refs['${u}'](${D}.value, ${D});
|
|
76
|
+
}`}function IF({conditional:D,variableName:u,conditionalFnRefId:F,guardedCodeSnippet:E}){return`${D}(refs['${F}'](${u}.value, ${u})) {
|
|
77
|
+
${E}
|
|
78
|
+
}`}function zB({variableName:D,loopCodeSnippet:u}){return`const ${D}_keys = Object.keys(${D}.value);
|
|
79
|
+
const ${D}_keys_size = ${D}_keys.length;
|
|
80
|
+
for (let ${D}_key_i = 0; ${D}_key_i < ${D}_keys_size; ${D}_key_i++) {
|
|
81
|
+
const ${D}_i = ${D}_keys[${D}_key_i];
|
|
82
|
+
${u}
|
|
83
|
+
}`}function SF({variableName:D,guardedCodeSnippet:u}){return`if (ensureIsObject(${D})) {
|
|
84
|
+
${u}
|
|
85
|
+
}`}function xF({variableName:D,outputExpression:u,outputValueExpression:F}){return`const ${D}_out = ${F};
|
|
86
|
+
${u} = ${D}_out;`}function OB(D){return`[${D.map((u)=>`"${u}"`).join(", ")}]`}function VB({variableName:D,fieldsToIgnore:u,allowUnknownProperties:F}){if(!F)return"";const E=OB(u);return`moveProperties(${D}.value, ${D}_out, ${E});`}function LB(D){return{parentExpression:D.variableName,parentValueExpression:D.variableName,fieldNameExpression:"''",fieldPathExpression:"''",wildCardPath:"",variableName:`${D.variableName}_item`,valueExpression:"root",outputExpression:D.outputExpression,isArrayMember:!1}}function NB({variableName:D,outputExpression:u,transformFnRefId:F}){const E=F?`refs['${F}'](${D}.value, ${D})`:`${D}.value`;return`if (${D}.isDefined && ${D}.isValid) {
|
|
87
|
+
${u} = ${E};
|
|
88
|
+
}`}function SB(D){const u=D.wildCardPath!==""?`${D.wildCardPath}.*`:"*";return{parentExpression:D.variableName,parentValueExpression:`${D.variableName}.value`,fieldNameExpression:`${D.variableName}_i`,fieldPathExpression:u,wildCardPath:u,variableName:`${D.variableName}_item`,valueExpression:`${D.variableName}.value[${D.variableName}_i]`,outputExpression:`${D.variableName}_out[${D.variableName}_i]`,isArrayMember:!0}}function xB(D,u){const F=u.wildCardPath!==""?`${u.wildCardPath}.${D.fieldName}`:D.fieldName;return{parentExpression:u.variableName,parentValueExpression:`${u.variableName}.value`,fieldNameExpression:`${D.fieldName}`,fieldPathExpression:F,wildCardPath:F,variableName:`${u.variableName}_item_${D.fieldName}`,valueExpression:`${u.variableName}.value[${D.fieldName}]`,outputExpression:`${u.variableName}_out[${D.propertyName}]`,isArrayMember:!0}}function jB(){return`if(errorReporter.hasErrors) {
|
|
89
|
+
throw errorReporter.createError();
|
|
90
|
+
}`}function RB(D,u,F){const E=F.wildCardPath!==""?`${F.wildCardPath}.${D.fieldName}`:D.fieldName;return{parentExpression:F.variableName,parentValueExpression:`${F.variableName}.value`,fieldNameExpression:`'${D.fieldName}'`,fieldPathExpression:E,wildCardPath:E,variableName:`${D.propertyName}_${u}`,valueExpression:`${F.variableName}.value['${D.fieldName}']`,outputExpression:`${F.variableName}_out['${D.propertyName}']`,isArrayMember:!1}}function yB(D){const u=D.wildCardPath!==""?`${D.wildCardPath}.*`:"*";return{parentExpression:D.variableName,parentValueExpression:`${D.variableName}.value`,fieldNameExpression:`${D.variableName}_i`,fieldPathExpression:u,wildCardPath:u,variableName:`${D.variableName}_item`,valueExpression:`${D.variableName}.value[${D.variableName}_i]`,outputExpression:`${D.variableName}_out[${D.variableName}_i]`,isArrayMember:!1}}function kB(D){return`function report(message, rule, field, args) {
|
|
91
|
+
field.isValid = false;
|
|
92
|
+
errorReporter.report(messagesProvider.getMessage(message, rule, field, args), rule, field, args);
|
|
93
|
+
};
|
|
94
|
+
function defineValue(value, field) {
|
|
95
|
+
${D.convertEmptyStringsToNull?"if (value === '') { value = null; }":""}
|
|
96
|
+
field.value = value;
|
|
97
|
+
field.isDefined = value !== undefined && value !== null;
|
|
98
|
+
return field;
|
|
99
|
+
};
|
|
100
|
+
function ensureExists(field) {
|
|
101
|
+
if (field.value === undefined || field.value === null) {
|
|
102
|
+
field.report(REQUIRED, 'required', field);
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
return true;
|
|
106
|
+
};
|
|
107
|
+
function ensureIsDefined(field) {
|
|
108
|
+
if (field.value === undefined) {
|
|
109
|
+
field.report(REQUIRED, 'required', field);
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
return true;
|
|
113
|
+
};
|
|
114
|
+
function ensureIsObject(field) {
|
|
115
|
+
if (!field.isDefined) {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
if (typeof field.value == 'object' && !Array.isArray(field.value)) {
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
field.report(NOT_AN_OBJECT, 'object', field);
|
|
122
|
+
return false;
|
|
123
|
+
};
|
|
124
|
+
function ensureIsArray(field) {
|
|
125
|
+
if (!field.isDefined) {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
if (Array.isArray(field.value)) {
|
|
129
|
+
return true;
|
|
130
|
+
}
|
|
131
|
+
field.report(NOT_AN_ARRAY, 'array', field);
|
|
132
|
+
return false;
|
|
133
|
+
};
|
|
134
|
+
function copyProperties(val) {
|
|
135
|
+
let k, out, tmp;
|
|
3
136
|
|
|
4
|
-
|
|
137
|
+
if (Array.isArray(val)) {
|
|
138
|
+
out = Array((k = val.length))
|
|
139
|
+
while (k--) out[k] = (tmp = val[k]) && typeof tmp == 'object' ? copyProperties(tmp) : tmp
|
|
140
|
+
return out
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (Object.prototype.toString.call(val) === '[object Object]') {
|
|
144
|
+
out = {} // null
|
|
145
|
+
for (k in val) {
|
|
146
|
+
out[k] = (tmp = val[k]) && typeof tmp == 'object' ? copyProperties(tmp) : tmp
|
|
147
|
+
}
|
|
148
|
+
return out
|
|
149
|
+
}
|
|
150
|
+
return val
|
|
151
|
+
};
|
|
152
|
+
function moveProperties(source, destination, ignoreKeys) {
|
|
153
|
+
for (let key in source) {
|
|
154
|
+
if (!ignoreKeys.includes(key)) {
|
|
155
|
+
const value = source[key]
|
|
156
|
+
destination[key] = copyProperties(value)
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
};`}function hB(D){return`const REQUIRED = '${D.required}';
|
|
160
|
+
const NOT_AN_OBJECT = '${D.object}';
|
|
161
|
+
const NOT_AN_ARRAY = '${D.array}';`}function RF(){let D=0;const u={};return{toJSON(){return u},track(F){D++;const E=`ref://${D}`;return u[E]=F,E},trackValidation(F){return this.track(F)},trackParser(F){return this.track(F)},trackTransformer(F){return this.track(F)},trackConditional(F){return this.track(F)}}}var KB=class D{#D="";newLine="\n";writeStatement(u){this.#D=`${this.#D}${this.newLine}${u}`}child(){return new D}toString(){return this.#D}flush(){this.#D=""}},vu=class{#D;#u;field;constructor(D,u,F,E){if(this.#u=E,this.#D=D,this.#u)this.field=this.#u;else u.variablesCounter++,this.field=u.createFieldFor(D,F)}defineField(D){if(!this.#u)D.writeStatement(XB({fieldNameExpression:this.field.fieldNameExpression,isArrayMember:this.field.isArrayMember,parentExpression:this.field.parentExpression,parentValueExpression:this.field.parentValueExpression,valueExpression:this.field.valueExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath,parseFnRefId:"parseFnId"in this.#D?this.#D.parseFnId:void 0}))}},MB=class extends vu{#D;#u;#F;constructor(D,u,F,E,$){super(D,F,E,$);this.#D=D,this.#u=u,this.#F=F}#C(){const D=this.#u.child(),u={type:"tuple",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#D.properties.forEach((F)=>{this.#F.compileNode(F,D,u)}),D.toString()}compile(){this.defineField(this.#u),this.#u.writeStatement(J0({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName}));const D=B8({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${LF({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:this.#D.allowUnknownProperties?`copyProperties(${this.field.variableName}.value)`:"[]"})}${this.#C()}`}),u=TF({variableName:this.field.variableName,guardedCodeSnippet:`${Z0({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!0})}${this.#u.newLine}${D}`});this.#u.writeStatement(`${u}${this.#u.newLine}${Y0({allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}},GB=class extends vu{#D;#u;#F;constructor(D,u,F,E,$){super(D,F,E,$);this.#D=D,this.#u=u,this.#F=F}#C(){const D=this.#u.child();this.#F.compileNode(this.#D.each,D,{type:"array",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath});const u=this.#u.child();return u.writeStatement(AB({variableName:this.field.variableName,startingIndex:0,loopCodeSnippet:D.toString()})),D.flush(),u.toString()}compile(){this.defineField(this.#u),this.#u.writeStatement(J0({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName}));const D=B8({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${LF({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"[]"})}${this.#u.newLine}${this.#C()}`}),u=TF({variableName:this.field.variableName,guardedCodeSnippet:`${Z0({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!0})}${this.#u.newLine}${D}`});this.#u.writeStatement(`${u}${this.#u.newLine}${Y0({allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}},HB=class extends vu{#D;#u;#F;#C;constructor(D,u,F,E,$){super(D,F,E,$);this.#u=D,this.#F=u,this.#C=E,this.#D=F}#E(){const D=this.#F.child();if(this.#u.conditions.forEach((u,F)=>{const E=this.#F.child();if("parseFnId"in u.schema)E.writeStatement(qB({parseFnRefId:u.schema.parseFnId,variableName:this.field.variableName}));this.#D.compileNode(u.schema,E,this.#C,this.field),D.writeStatement(IF({conditional:F===0?"if":"else if",variableName:this.field.variableName,conditionalFnRefId:u.conditionalFnRefId,guardedCodeSnippet:E.toString()})),E.flush()}),this.#u.elseConditionalFnRefId&&this.#u.conditions.length)D.writeStatement(NF({variableName:this.field.variableName,conditionalFnRefId:this.#u.elseConditionalFnRefId}));return D.toString()}compile(){this.defineField(this.#F),this.#F.writeStatement(this.#E())}},UB=class extends vu{#D;#u;#F;constructor(D,u,F,E,$){super(D,F,E,$);this.#D=D,this.#u=u,this.#F=F}#C(){const D=this.#u.child(),u=this.#u.child();return this.#F.compileNode(this.#D.each,u,{type:"record",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath}),D.writeStatement(zB({variableName:this.field.variableName,loopCodeSnippet:u.toString()})),u.flush(),D.toString()}compile(){this.defineField(this.#u),this.#u.writeStatement(J0({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName}));const D=B8({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${xF({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"{}"})}${this.#C()}`}),u=SF({variableName:this.field.variableName,guardedCodeSnippet:`${Z0({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!0})}${this.#u.newLine}${D}`});this.#u.writeStatement(`${u}${this.#u.newLine}${Y0({allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}},TB=class extends vu{#D;#u;#F;constructor(D,u,F,E,$){super(D,F,E,$);this.#D=D,this.#u=u,this.#F=F}#C(D){let u=D.properties.map((E)=>E.fieldName);const F=D.groups.flatMap((E)=>this.#E(E));return u.concat(F)}#E(D){return D.conditions.flatMap((u)=>{return this.#C(u.schema)})}#$(){const D=this.#u.child(),u={type:"object",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#D.properties.forEach((F)=>this.#F.compileNode(F,D,u)),D.toString()}#B(){const D=this.#u.child(),u={type:"object",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#D.groups.forEach((F)=>this.#w(F,D,u)),D.toString()}#w(D,u,F){if(D.conditions.forEach((E,$)=>{const B=u.child();E.schema.properties.forEach((C)=>{this.#F.compileNode(C,B,F)}),E.schema.groups.forEach((C)=>{this.#w(C,B,F)}),u.writeStatement(IF({variableName:this.field.variableName,conditional:$===0?"if":"else if",conditionalFnRefId:E.conditionalFnRefId,guardedCodeSnippet:B.toString()}))}),D.elseConditionalFnRefId&&D.conditions.length)u.writeStatement(NF({variableName:this.field.variableName,conditionalFnRefId:D.elseConditionalFnRefId}))}compile(){this.defineField(this.#u),this.#u.writeStatement(J0({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName}));const D=B8({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${xF({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"{}"})}${this.#u.newLine}${this.#$()}${this.#u.newLine}${this.#B()}${this.#u.newLine}${VB({variableName:this.field.variableName,allowUnknownProperties:this.#D.allowUnknownProperties,fieldsToIgnore:this.#D.allowUnknownProperties?this.#C(this.#D):[]})}`}),u=SF({variableName:this.field.variableName,guardedCodeSnippet:`${Z0({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!0})}${D}`});this.#u.writeStatement(`${u}${this.#u.newLine}${Y0({variableName:this.field.variableName,allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,conditional:"else if"})}`)}},IB=class extends vu{#D;#u;constructor(D,u,F,E,$){super(D,F,E,$);this.#D=D,this.#u=u}compile(){this.defineField(this.#u),this.#u.writeStatement(J0({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName})),this.#u.writeStatement(Z0({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!1})),this.#u.writeStatement(`${NB({variableName:this.field.variableName,outputExpression:this.field.outputExpression,transformFnRefId:this.#D.transformFnId})}${this.#u.newLine}${Y0({variableName:this.field.variableName,allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,transformFnRefId:this.#D.transformFnId,conditional:"else if"})}`)}},gB=Object.getPrototypeOf(async function(){}).constructor,jF=class{variablesCounter=0;#D;#u;#F=new KB;constructor(D,u){this.#D=D,this.#u=u||{convertEmptyStringsToNull:!1}}#C(){this.#F.writeStatement(hB({required:"value is required",object:"value is not a valid object",array:"value is not a valid array",...this.#u.messages})),this.#F.writeStatement(kB(this.#u)),this.#F.writeStatement("let out;")}#E(){this.#F.writeStatement(jB()),this.#F.writeStatement("return out;")}#$(){this.compileNode(this.#D.schema,this.#F,{type:"root",variableName:"root",outputExpression:"out",fieldPathExpression:"out",wildCardPath:""})}#B(){return new gB("root","meta","refs","messagesProvider","errorReporter",this.#F.toString())}createFieldFor(D,u){switch(u.type){case"array":return SB(u);case"root":return LB(u);case"object":return RB(D,this.variablesCounter,u);case"tuple":return xB(D,u);case"record":return yB(u)}}compileNode(D,u,F,E){switch(D.type){case"literal":return new IB(D,u,this,F,E).compile();case"array":return new GB(D,u,this,F,E).compile();case"record":return new UB(D,u,this,F,E).compile();case"object":return new TB(D,u,this,F,E).compile();case"tuple":return new MB(D,u,this,F,E).compile();case"union":return new HB(D,u,this,F,E).compile()}}compile(){this.#C(),this.#$(),this.#E();const D=this.#B();return this.variablesCounter=0,this.#F.flush(),D}};var i6={};N0(i6,{COTYPE:()=>PB,IS_OF_TYPE:()=>pD,ITYPE:()=>_B,OTYPE:()=>bB,PARSE:()=>r,UNIQUE_NAME:()=>PD,VALIDATION:()=>Nu});var PD=Symbol.for("schema_name"),pD=Symbol.for("is_of_type"),r=Symbol.for("parse"),_B=Symbol.for("opaque_input_type"),bB=Symbol.for("opaque_type"),PB=Symbol.for("camelcase_opaque_type"),Nu=Symbol.for("to_validation"),mu=S((D,u,F)=>{const E=u(F);if(!F.isDefined&&E)F.report(T.required,"required",F)},{implicit:!0}),Y8=class extends Pu{optional(D){return new mB(this,D)}nullable(){return new vB(this)}transform(D){return new cB(D,this)}},vB=class D extends Y8{#D;constructor(u){super();this.#D=u}clone(){return new D(this.#D.clone())}[r](u,F,E){const $=this.#D[r](u,F,E);return $.allowNull=!0,$}},mB=class D extends Y8{#D;validations;constructor(u,F){super();this.#D=u,this.validations=F||[]}cloneValidations(){return this.validations.map((u)=>{return{options:u.options,rule:u.rule}})}compileValidations(u){return this.validations.map((F)=>{return{ruleFnId:u.track({validator:F.rule.validator,options:F.options}),implicit:F.rule.implicit,isAsync:F.rule.isAsync}})}use(u){return this.validations.push(Nu in u?u[Nu]():u),this}requiredWhen(u,F,E){if(typeof u==="function")return this.use(mu(u));let $;switch(F){case"=":$=(B)=>B===E;break;case"!=":$=(B)=>B!==E;break;case"in":$=(B)=>E.includes(B);break;case"notIn":$=(B)=>!E.includes(B);break;case">":$=(B)=>B>E;break;case"<":$=(B)=>B<E;break;case">=":$=(B)=>B>=E;break;case"<=":$=(B)=>B<=E}return this.use(mu((B)=>{const C=_.getNestedValue(u,B);return $(C)}))}requiredIfExists(u){const F=Array.isArray(u)?u:[u];return this.use(mu((E)=>{return F.every(($)=>_.exists(_.getNestedValue($,E)))}))}requiredIfAnyExists(u){return this.use(mu((F)=>{return u.some((E)=>_.exists(_.getNestedValue(E,F)))}))}requiredIfMissing(u){const F=Array.isArray(u)?u:[u];return this.use(mu((E)=>{return F.every(($)=>_.isMissing(_.getNestedValue($,E)))}))}requiredIfAnyMissing(u){return this.use(mu((F)=>{return u.some((E)=>_.isMissing(_.getNestedValue(E,F)))}))}clone(){return new D(this.#D.clone(),this.cloneValidations())}[r](u,F,E){const $=this.#D[r](u,F,E);return $.isOptional=!0,$.validations=$.validations.concat(this.compileValidations(F)),$}},cB=class D extends Y8{#D;#u;constructor(u,F){super();this.#u=u,this.#D=F}clone(){return new D(this.#u,this.#D.clone())}[r](u,F,E){const $=this.#D[r](u,F,E);return $.transformFnId=F.trackTransformer(this.#u),$}},Bu=class extends Y8{options;validations;constructor(D,u){super();this.options={bail:!0,allowNull:!1,isOptional:!1,...D},this.validations=u||[]}cloneValidations(){return this.validations.map((D)=>{return{options:D.options,rule:D.rule}})}cloneOptions(){return{...this.options}}compileValidations(D){return this.validations.map((u)=>{return{ruleFnId:D.track({validator:u.rule.validator,options:u.options}),implicit:u.rule.implicit,isAsync:u.rule.isAsync}})}parse(D){return this.options.parse=D,this}use(D){return this.validations.push(Nu in D?D[Nu]():D),this}bail(D){return this.options.bail=D,this}[r](D,u,F){return{type:"literal",fieldName:D,propertyName:F.toCamelCase?OD(D):D,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,parseFnId:this.options.parse?u.trackParser(this.options.parse):void 0,validations:this.compileValidations(u)}}},t6=class D extends Bu{constructor(u,F){super(u,F)}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},w8=S((D,u,F)=>{const E=typeof u.choices==="function"?u.choices(F):u.choices;if(!E.includes(D))F.report(T.enum,"enum",F,{choices:E})}),cu=class D extends Bu{static rules={enum:w8};#D;getChoices(){return this.#D}constructor(u,F,E){super(F,E||[w8({choices:u})]);this.#D=u}clone(){return new D(this.#D,this.cloneOptions(),this.cloneValidations())}},Iu=["YYYY-MM-DD","YYYY-MM-DD HH:mm:ss"];DD.default.extend(e6.default);DD.default.extend(a6.default);DD.default.extend(o6.default);var fB=S((D,u,F)=>{if(typeof D!=="string"&&typeof D!=="number"){F.report(T.date,"date",F);return}let E=!1,$=u.formats||Iu;if(Array.isArray($))$=[...$],E=$.includes("x");else if(typeof $!=="string")$={...$},E=$.format==="x";const B=E?_.asNumber(D):D,C=E&&!Number.isNaN(B)?DD.default(B):DD.default(D,$,!0);if(!C.isValid()){F.report(T.date,"date",F);return}F.meta.$value=C,F.meta.$formats=$,F.mutate(C.toDate(),F)}),yF=S((D,u,F)=>{if(!F.meta.$value)return;const E=u.compare||"day",$=u.format||Iu,B=F.meta.$value,C=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,J=DD.default(C,$,!0);if(!J.isValid())throw new Error(`Invalid datetime value "${C}" value provided to the equals rule`);if(!B.isSame(J,E))F.report(T["date.equals"],"date.equals",F,{expectedValue:C,compare:E})}),kF=S((D,u,F)=>{if(!F.meta.$value)return;const E=u.compare||"day",$=u.format||Iu,B=F.meta.$value,C=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,J=C==="today"?DD.default():C==="tomorrow"?DD.default().add(1,"day"):DD.default(C,$,!0);if(!J.isValid())throw new Error(`Invalid datetime value "${C}" value provided to the after rule`);if(!B.isAfter(J,E))F.report(T["date.after"],"date.after",F,{expectedValue:C,compare:E})}),hF=S((D,u,F)=>{if(!F.meta.$value)return;const E=u.compare||"day",$=u.format||Iu,B=F.meta.$value,C=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,J=C==="today"?DD.default():C==="tomorrow"?DD.default().add(1,"day"):DD.default(C,$,!0);if(!J.isValid())throw new Error(`Invalid datetime value "${C}" value provided to the afterOrEqual rule`);if(!B.isSameOrAfter(J,E))F.report(T["date.afterOrEqual"],"date.afterOrEqual",F,{expectedValue:C,compare:E})}),gF=S((D,u,F)=>{if(!F.meta.$value)return;const E=u.compare||"day",$=u.format||Iu,B=F.meta.$value,C=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,J=C==="today"?DD.default():C==="yesterday"?DD.default().subtract(1,"day"):DD.default(C,$,!0);if(!J.isValid())throw new Error(`Invalid datetime value "${C}" value provided to the before rule`);if(!B.isBefore(J,E))F.report(T["date.before"],"date.before",F,{expectedValue:C,compare:E})}),_F=S((D,u,F)=>{if(!F.meta.$value)return;const E=u.compare||"day",$=u.format||Iu,B=F.meta.$value,C=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,J=C==="today"?DD.default():C==="yesterday"?DD.default().subtract(1,"day"):DD.default(C,$,!0);if(!J.isValid())throw new Error(`Invalid datetime value "${C}" value provided to the beforeOrEqual rule`);if(!B.isSameOrBefore(J,E))F.report(T["date.beforeOrEqual"],"date.beforeOrEqual",F,{expectedValue:C,compare:E})}),bF=S((D,u,F)=>{if(!F.meta.$value)return;const E=u.compare||"day",$=F.meta.$value,B=u.format||F.meta.$formats,C=_.getNestedValue(u.otherField,F),J=DD.default(C,B,!0);if(!J.isValid())return;if(!$.isSame(J,E))F.report(T["date.sameAs"],"date.sameAs",F,{otherField:u.otherField,expectedValue:C,compare:E})}),PF=S((D,u,F)=>{if(!F.meta.$value)return;const E=u.compare||"day",$=F.meta.$value,B=u.format||F.meta.$formats,C=_.getNestedValue(u.otherField,F),J=DD.default(C,B,!0);if(!J.isValid())return;if($.isSame(J,E))F.report(T["date.notSameAs"],"date.notSameAs",F,{otherField:u.otherField,expectedValue:C,compare:E})}),vF=S((D,u,F)=>{if(!F.meta.$value)return;const E=u.compare||"day",$=F.meta.$value,B=u.format||F.meta.$formats,C=_.getNestedValue(u.otherField,F),J=DD.default(C,B,!0);if(!J.isValid())return;if(!$.isAfter(J,E))F.report(T["date.afterField"],"date.afterField",F,{otherField:u.otherField,expectedValue:C,compare:E})}),mF=S((D,u,F)=>{if(!F.meta.$value)return;const E=u.compare||"day",$=F.meta.$value,B=u.format||F.meta.$formats,C=_.getNestedValue(u.otherField,F),J=DD.default(C,B,!0);if(!J.isValid())return;if(!$.isSameOrAfter(J,E))F.report(T["date.afterOrSameAs"],"date.afterOrSameAs",F,{otherField:u.otherField,expectedValue:C,compare:E})}),cF=S((D,u,F)=>{if(!F.meta.$value)return;const E=u.compare||"day",$=F.meta.$value,B=u.format||F.meta.$formats,C=_.getNestedValue(u.otherField,F),J=DD.default(C,B,!0);if(!J.isValid())return;if(!$.isBefore(J,E))F.report(T["date.beforeField"],"date.beforeField",F,{otherField:u.otherField,expectedValue:C,compare:E})}),fF=S((D,u,F)=>{if(!F.meta.$value)return;const E=u.compare||"day",$=F.meta.$value,B=u.format||F.meta.$formats,C=_.getNestedValue(u.otherField,F),J=DD.default(C,B,!0);if(!J.isValid())return;if(!$.isSameOrBefore(J,E))F.report(T["date.beforeOrSameAs"],"date.beforeOrSameAs",F,{otherField:u.otherField,expectedValue:C,compare:E})}),dF=S((D,u,F)=>{if(!F.meta.$value)return;const $=F.meta.$value.day();if($!==0&&$!==6)F.report(T["date.weekend"],"date.weekend",F)}),nF=S((D,u,F)=>{if(!F.meta.$value)return;const $=F.meta.$value.day();if($===0||$===6)F.report(T["date.weekday"],"date.weekday",F)}),c2=class D extends Bu{static rules={equals:yF,after:kF,afterOrEqual:hF,before:gF,beforeOrEqual:_F,sameAs:bF,notSameAs:PF,afterField:vF,afterOrSameAs:mF,beforeField:cF,beforeOrSameAs:fF,weekend:dF,weekday:nF};[PD]="vine.date";[pD]=(u)=>{if(typeof u!=="string")return!1;return s6.default(u,this.options.formats||Iu,!0).isValid()};constructor(u,F){super(u,F||[fB(u||{})])}equals(u,F){return this.use(yF({expectedValue:u,...F}))}after(u,F){return this.use(kF({expectedValue:u,...F}))}afterOrEqual(u,F){return this.use(hF({expectedValue:u,...F}))}before(u,F){return this.use(gF({expectedValue:u,...F}))}beforeOrEqual(u,F){return this.use(_F({expectedValue:u,...F}))}sameAs(u,F){return this.use(bF({otherField:u,...F}))}notSameAs(u,F){return this.use(PF({otherField:u,...F}))}afterField(u,F){return this.use(vF({otherField:u,...F}))}afterOrSameAs(u,F){return this.use(mF({otherField:u,...F}))}beforeField(u,F){return this.use(cF({otherField:u,...F}))}beforeOrSameAs(u,F){return this.use(fF({otherField:u,...F}))}weekend(){return this.use(dF())}weekday(){return this.use(nF())}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},D9=class D{#D;#u=(u,F)=>{F.report(T.union,"union",F)};constructor(u){this.#D=u}otherwise(u){return this.#u=u,this}clone(){const u=new D(this.#D);return u.otherwise(this.#u),u}[r](u,F,E){return{type:"union",fieldName:u,propertyName:E.toCamelCase?OD(u):u,elseConditionalFnRefId:F.trackConditional(this.#u),conditions:this.#D.map(($)=>$[r](u,F,E))}}},u9=class{#D;#u;constructor(D,u){this.#D=u,this.#u=D}[r](D,u,F){return{conditionalFnRefId:u.trackConditional(this.#u),schema:this.#D[r](D,u,F)}}};f2.if=function D(u,F){return new u9(u,F)};f2.else=function D(u){return new u9(()=>!0,u)};var K0=class extends Pu{optional(){return new nB(this)}nullable(){return new dB(this)}},dB=class D extends K0{#D;constructor(u){super();this.#D=u}clone(){return new D(this.#D.clone())}[r](u,F,E){const $=this.#D[r](u,F,E);if($.type!=="union")$.allowNull=!0;return $}},nB=class D extends K0{#D;constructor(u){super();this.#D=u}clone(){return new D(this.#D.clone())}[r](u,F,E){const $=this.#D[r](u,F,E);if($.type!=="union")$.isOptional=!0;return $}},X0=class extends K0{options;validations;constructor(D,u){super();this.options=D||{bail:!0,allowNull:!1,isOptional:!1},this.validations=u||[]}cloneValidations(){return this.validations.map((D)=>{return{options:D.options,rule:D.rule}})}cloneOptions(){return{...this.options}}compileValidations(D){return this.validations.map((u)=>{return{ruleFnId:D.track({validator:u.rule.validator,options:u.options}),implicit:u.rule.implicit,isAsync:u.rule.isAsync}})}parse(D){return this.options.parse=D,this}use(D){return this.validations.push(Nu in D?D[Nu]():D),this}bail(D){return this.options.bail=D,this}},F9=class D extends X0{#D;#u=!1;[PD]="vine.array";[pD]=(u)=>{return Array.isArray(u)};constructor(u,F,E){super(F,E);this.#D=u}allowUnknownProperties(){return this.#u=!0,this}clone(){const u=new D(this.#D.map((F)=>F.clone()),this.cloneOptions(),this.cloneValidations());if(this.#u)u.allowUnknownProperties();return u}[r](u,F,E){return{type:"tuple",fieldName:u,propertyName:E.toCamelCase?OD(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,allowUnknownProperties:this.#u,parseFnId:this.options.parse?F.trackParser(this.options.parse):void 0,validations:this.compileValidations(F),properties:this.#D.map(($,B)=>$[r](String(B),F,E))}}},rF=S((D,u,F)=>{if(!F.isValid)return;if(D.length<u.min)F.report(T["array.minLength"],"array.minLength",F,u)}),pF=S((D,u,F)=>{if(!F.isValid)return;if(D.length>u.max)F.report(T["array.maxLength"],"array.maxLength",F,u)}),lF=S((D,u,F)=>{if(!F.isValid)return;if(D.length!==u.size)F.report(T["array.fixedLength"],"array.fixedLength",F,u)}),iF=S((D,u,F)=>{if(!F.isValid)return;if(D.length<=0)F.report(T.notEmpty,"notEmpty",F)}),tF=S((D,u,F)=>{if(!F.isValid)return;if(!_.isDistinct(D,u.fields))F.report(T.distinct,"distinct",F,u)}),sF=S((D,u,F)=>{if(!F.isValid)return;F.mutate(D.filter((E)=>_.exists(E)&&E!==""),F)}),C9=class D extends X0{static rules={compact:sF,notEmpty:iF,distinct:tF,minLength:rF,maxLength:pF,fixedLength:lF};#D;[PD]="vine.array";[pD]=(u)=>{return Array.isArray(u)};constructor(u,F,E){super(F,E);this.#D=u}minLength(u){return this.use(rF({min:u}))}maxLength(u){return this.use(pF({max:u}))}fixedLength(u){return this.use(lF({size:u}))}notEmpty(){return this.use(iF())}distinct(u){return this.use(tF({fields:u}))}compact(){return this.use(sF())}clone(){return new D(this.#D.clone(),this.cloneOptions(),this.cloneValidations())}[r](u,F,E){return{type:"array",fieldName:u,propertyName:E.toCamelCase?OD(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,each:this.#D[r]("*",F,E),parseFnId:this.options.parse?F.trackParser(this.options.parse):void 0,validations:this.compileValidations(F)}}},rB=class D extends K0{#D;[PD]="types.object";[pD]=(u)=>{return u!==null&&typeof u==="object"&&!Array.isArray(u)};constructor(u){super();this.#D=u}clone(){return new D(this.#D.clone())}[r](u,F,E){return E.toCamelCase=!0,this.#D[r](u,F,E)}},E9=class D extends X0{#D;#u=[];#F=!1;[PD]="vine.object";[pD]=(u)=>{return u!==null&&typeof u==="object"&&!Array.isArray(u)};constructor(u,F,E){super(F,E);this.#D=u}getProperties(){return Object.keys(this.#D).reduce((u,F)=>{return u[F]=this.#D[F].clone(),u},{})}allowUnknownProperties(){return this.#F=!0,this}merge(u){return this.#u.push(u),this}clone(){const u=new D(this.getProperties(),this.cloneOptions(),this.cloneValidations());if(this.#u.forEach((F)=>u.merge(F)),this.#F)u.allowUnknownProperties();return u}toCamelCase(){return new rB(this)}[r](u,F,E){return{type:"object",fieldName:u,propertyName:E.toCamelCase?OD(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,parseFnId:this.options.parse?F.trackParser(this.options.parse):void 0,allowUnknownProperties:this.#F,validations:this.compileValidations(F),properties:Object.keys(this.#D).map(($)=>{return this.#D[$][r]($,F,E)}),groups:this.#u.map(($)=>{return $[r](F,E)})}}},aF=S((D,u,F)=>{if(!F.isValid)return;if(Object.keys(D).length<u.min)F.report(T["record.minLength"],"record.minLength",F,u)}),oF=S((D,u,F)=>{if(!F.isValid)return;if(Object.keys(D).length>u.max)F.report(T["record.maxLength"],"record.maxLength",F,u)}),eF=S((D,u,F)=>{if(!F.isValid)return;if(Object.keys(D).length!==u.size)F.report(T["record.fixedLength"],"record.fixedLength",F,u)}),D6=S((D,u,F)=>{if(!F.isValid)return;u(Object.keys(D),F)}),$9=class D extends X0{static rules={maxLength:oF,minLength:aF,fixedLength:eF,validateKeys:D6};#D;[PD]="vine.object";[pD]=(u)=>{return u!==null&&typeof u==="object"&&!Array.isArray(u)};constructor(u,F,E){super(F,E);this.#D=u}minLength(u){return this.use(aF({min:u}))}maxLength(u){return this.use(oF({max:u}))}fixedLength(u){return this.use(eF({size:u}))}validateKeys(...u){return this.use(D6(...u))}clone(){return new D(this.#D.clone(),this.cloneOptions(),this.cloneValidations())}[r](u,F,E){return{type:"record",fieldName:u,propertyName:E.toCamelCase?OD(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,each:this.#D[r]("*",F,E),parseFnId:this.options.parse?F.trackParser(this.options.parse):void 0,validations:this.compileValidations(F)}}},u6=S((D,u,F)=>{if(typeof D!=="string")F.report(T.string,"string",F)}),F6=S((D,u,F)=>{if(!F.isValid)return;if(!_.isEmail(D,u))F.report(T.email,"email",F)}),C6=S((D,u,F)=>{if(!F.isValid)return;const E=u&&typeof u==="function"?u(F):u,$=E?.locale||"any";if(!_.isMobilePhone(D,$,E))F.report(T.mobile,"mobile",F)}),E6=S((D,u,F)=>{if(!F.isValid)return;if(!_.isIP(D,u?.version))F.report(T.ipAddress,"ipAddress",F)}),$6=S((D,u,F)=>{if(!F.isValid)return;if(!u.test(D))F.report(T.regex,"regex",F)}),B6=S((D,u,F)=>{if(!F.isValid)return;if(!_.isHexColor(D))F.report(T.hexCode,"hexCode",F)}),w6=S((D,u,F)=>{if(!F.isValid)return;if(!_.isURL(D,u))F.report(T.url,"url",F)}),Y6=S(async(D,u,F)=>{if(!F.isValid)return;if(!await _.isActiveURL(D))F.report(T.activeUrl,"activeUrl",F)}),Z6=S((D,u,F)=>{if(!F.isValid)return;let E="a-zA-Z";if(u){if(u.allowSpaces)E+="\\s";if(u.allowDashes)E+="-";if(u.allowUnderscores)E+="_"}if(!new RegExp(`^[${E}]+\$`).test(D))F.report(T.alpha,"alpha",F)}),J6=S((D,u,F)=>{if(!F.isValid)return;let E="a-zA-Z0-9";if(u){if(u.allowSpaces)E+="\\s";if(u.allowDashes)E+="-";if(u.allowUnderscores)E+="_"}if(!new RegExp(`^[${E}]+\$`).test(D))F.report(T.alphaNumeric,"alphaNumeric",F)}),K6=S((D,u,F)=>{if(!F.isValid)return;if(D.length<u.min)F.report(T.minLength,"minLength",F,u)}),X6=S((D,u,F)=>{if(!F.isValid)return;if(D.length>u.max)F.report(T.maxLength,"maxLength",F,u)}),W6=S((D,u,F)=>{if(!F.isValid)return;if(D.length!==u.size)F.report(T.fixedLength,"fixedLength",F,u)}),Q6=S((D,u,F)=>{if(!F.isValid)return;if(!D.endsWith(u.substring))F.report(T.endsWith,"endsWith",F,u)}),M6=S((D,u,F)=>{if(!F.isValid)return;if(!D.startsWith(u.substring))F.report(T.startsWith,"startsWith",F,u)}),A6=S((D,u,F)=>{if(!F.isValid)return;if(_.getNestedValue(u.otherField,F)!==D){F.report(T.sameAs,"sameAs",F,u);return}}),G6=S((D,u,F)=>{if(!F.isValid)return;if(_.getNestedValue(u.otherField,F)===D){F.report(T.notSameAs,"notSameAs",F,u);return}}),q6=S((D,u,F)=>{if(!F.isValid)return;const E=u?.confirmationField||`${F.name}_confirmation`;if(F.parent[E]!==D){F.report(T.confirmed,"confirmed",F,{otherField:E});return}}),H6=S((D,u,F)=>{if(!F.isValid)return;F.mutate(D.trim(),F)}),z6=S((D,u,F)=>{if(!F.isValid)return;F.mutate(w9.default.default(D,u),F)}),U6=S((D,u,F)=>{if(!F.isValid)return;F.mutate(D.toLocaleUpperCase(u),F)}),O6=S((D,u,F)=>{if(!F.isValid)return;F.mutate(D.toLocaleLowerCase(u),F)}),V6=S((D,u,F)=>{if(!F.isValid)return;F.mutate(OD(D),F)}),T6=S((D,u,F)=>{if(!F.isValid)return;F.mutate(B9.default.default(D),F)}),L6=S((D,u,F)=>{if(!F.isValid)return;F.mutate(b2(D,u),F)}),N6=S((D,u,F)=>{if(!F.isValid)return;if(!(typeof u.choices==="function"?u.choices(F):u.choices).includes(D)){F.report(T.in,"in",F,u);return}}),I6=S((D,u,F)=>{if(!F.isValid)return;if((typeof u.list==="function"?u.list(F):u.list).includes(D)){F.report(T.notIn,"notIn",F,u);return}}),S6=S((D,u,F)=>{if(!F.isValid)return;const E=u?typeof u==="function"?u(F)?.provider||[]:u.provider:[];if(!E.length){if(!_.isCreditCard(D))F.report(T.creditCard,"creditCard",F,{providersList:"credit"})}else if(!E.find((B)=>_.isCreditCard(D,{provider:B})))F.report(T.creditCard,"creditCard",F,{providers:E,providersList:E.join("/")})}),x6=S((D,u,F)=>{if(!F.isValid)return;const E=typeof u==="function"?u(F).countryCode:u.countryCode;if(!E.find((B)=>_.isPassportNumber(D,B)))F.report(T.passport,"passport",F,{countryCodes:E})}),j6=S((D,u,F)=>{if(!F.isValid)return;const E=u?typeof u==="function"?u(F)?.countryCode||[]:u.countryCode:[];if(!E.length){if(!_.isPostalCode(D,"any"))F.report(T.postalCode,"postalCode",F)}else if(!E.find((B)=>_.isPostalCode(D,B)))F.report(T.postalCode,"postalCode",F,{countryCodes:E})}),R6=S((D,u,F)=>{if(!F.isValid)return;if(!u||!u.version){if(!_.isUUID(D))F.report(T.uuid,"uuid",F)}else if(!u.version.find(($)=>_.isUUID(D,$)))F.report(T.uuid,"uuid",F,u)}),y6=S((D,u,F)=>{if(!F.isValid)return;if(!_.isAscii(D))F.report(T.ascii,"ascii",F)}),k6=S((D,u,F)=>{if(!F.isValid)return;if(!_.isIBAN(D))F.report(T.iban,"iban",F)}),h6=S((D,u,F)=>{if(!F.isValid)return;if(!_.isJWT(D))F.report(T.jwt,"jwt",F)}),g6=S((D,u,F)=>{if(!F.isValid)return;if(!_.isLatLong(D))F.report(T.coordinates,"coordinates",F)}),Z8=class D extends Bu{static rules={in:N6,jwt:h6,url:w6,iban:k6,uuid:R6,trim:H6,email:F6,alpha:Z6,ascii:y6,notIn:I6,regex:$6,escape:T6,sameAs:A6,mobile:C6,string:u6,hexCode:B6,passport:x6,endsWith:Q6,confirmed:q6,activeUrl:Y6,minLength:K6,notSameAs:G6,maxLength:X6,ipAddress:E6,creditCard:S6,postalCode:j6,startsWith:M6,toUpperCase:U6,toLowerCase:O6,toCamelCase:V6,fixedLength:W6,coordinates:g6,normalizeUrl:L6,alphaNumeric:J6,normalizeEmail:z6};[PD]="vine.string";[pD]=(u)=>{return typeof u==="string"};constructor(u,F){super(u,F||[u6()])}url(...u){return this.use(w6(...u))}activeUrl(){return this.use(Y6())}email(...u){return this.use(F6(...u))}mobile(...u){return this.use(C6(...u))}ipAddress(u){return this.use(E6(u?{version:u}:void 0))}hexCode(){return this.use(B6())}regex(u){return this.use($6(u))}alpha(u){return this.use(Z6(u))}alphaNumeric(u){return this.use(J6(u))}minLength(u){return this.use(K6({min:u}))}maxLength(u){return this.use(X6({max:u}))}fixedLength(u){return this.use(W6({size:u}))}confirmed(u){return this.use(q6(u))}trim(){return this.use(H6())}normalizeEmail(u){return this.use(z6(u))}toUpperCase(){return this.use(U6())}toLowerCase(){return this.use(O6())}toCamelCase(){return this.use(V6())}escape(){return this.use(T6())}normalizeUrl(...u){return this.use(L6(...u))}startsWith(u){return this.use(M6({substring:u}))}endsWith(u){return this.use(Q6({substring:u}))}sameAs(u){return this.use(A6({otherField:u}))}notSameAs(u){return this.use(G6({otherField:u}))}in(u){return this.use(N6({choices:u}))}notIn(u){return this.use(I6({list:u}))}creditCard(...u){return this.use(S6(...u))}passport(...u){return this.use(x6(...u))}postalCode(...u){return this.use(j6(...u))}uuid(...u){return this.use(R6(...u))}ascii(){return this.use(y6())}iban(){return this.use(k6())}jwt(){return this.use(h6())}coordinates(){return this.use(g6())}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},_6=S((D,u,F)=>{const E=u.strict?D:_.asNumber(D);if(typeof E!=="number"||Number.isNaN(E)||E===Number.POSITIVE_INFINITY||E===Number.NEGATIVE_INFINITY){F.report(T.number,"number",F);return}F.mutate(E,F)}),b6=S((D,u,F)=>{if(!F.isValid)return;if(D<u.min)F.report(T.min,"min",F,u)}),P6=S((D,u,F)=>{if(!F.isValid)return;if(D>u.max)F.report(T.max,"max",F,u)}),v6=S((D,u,F)=>{if(!F.isValid)return;if(D<u.min||D>u.max)F.report(T.range,"range",F,u)}),m6=S((D,u,F)=>{if(!F.isValid)return;if(D<0)F.report(T.positive,"positive",F)}),c6=S((D,u,F)=>{if(!F.isValid)return;if(D>=0)F.report(T.negative,"negative",F)}),f6=S((D,u,F)=>{if(!F.isValid)return;if(!_.isDecimal(String(D),{force_decimal:u.range[0]!==0,decimal_digits:u.range.join(",")}))F.report(T.decimal,"decimal",F,{digits:u.range.join("-")})}),d6=S((D,u,F)=>{if(!F.isValid)return;if(!Number.isInteger(D))F.report(T.withoutDecimals,"withoutDecimals",F)}),n6=S((D,u,F)=>{if(!F.isValid)return;if(!u.values.includes(D))F.report(T["number.in"],"in",F,u)}),fu=class D extends Bu{static rules={in:n6,max:P6,min:b6,range:v6,number:_6,decimal:f6,negative:c6,positive:m6,withoutDecimals:d6};[PD]="vine.number";[pD]=(u)=>{const F=_.asNumber(u);return!Number.isNaN(F)};constructor(u,F){super(u,F||[_6(u||{})])}min(u){return this.use(b6({min:u}))}max(u){return this.use(P6({max:u}))}range(u){return this.use(v6({min:u[0],max:u[1]}))}positive(){return this.use(m6())}negative(){return this.use(c6())}decimal(u){return this.use(f6({range:Array.isArray(u)?u:[u]}))}withoutDecimals(){return this.use(d6())}clone(){return new D(this.cloneOptions(),this.cloneValidations())}in(u){return this.use(n6({values:u}))}},r6=S((D,u,F)=>{const E=u.strict===!0?D:_.asBoolean(D);if(typeof E!=="boolean"){F.report(T.boolean,"boolean",F);return}F.mutate(E,F)}),du=class D extends Bu{static rules={boolean:r6};[PD]="vine.boolean";[pD]=(u)=>{return typeof(this.options.strict===!0?u:_.asBoolean(u))==="boolean"};constructor(u,F){super(u,F||[r6(u||{})])}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},p6=S((D,u,F)=>{let E=D;if(typeof u.expectedValue==="boolean")E=_.asBoolean(D);else if(typeof u.expectedValue==="number")E=_.asNumber(D);if(E!==u.expectedValue){F.report(T.literal,"literal",F,u);return}F.mutate(E,F)}),Y9=class D extends Bu{static rules={equals:p6};#D;constructor(u,F,E){super(F,E||[p6({expectedValue:u})]);this.#D=u}clone(){return new D(this.#D,this.cloneOptions(),this.cloneValidations())}},pB=["on","1","yes","true",!0,1],l6=S((D,u,F)=>{if(!pB.includes(D))F.report(T.accepted,"accepted",F)}),Z9=class D extends Bu{static rules={accepted:l6};constructor(u,F){super(u,F||[l6()])}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},lB=class D{#D;#u=(u,F)=>{F.report(T.unionGroup,"unionGroup",F)};constructor(u){this.#D=u}clone(){const u=new D(this.#D);return u.otherwise(this.#u),u}otherwise(u){return this.#u=u,this}[r](u,F){return{type:"group",elseConditionalFnRefId:u.trackConditional(this.#u),conditions:this.#D.map((E)=>E[r](u,F))}}},J9=class{#D;#u;constructor(D,u){this.#D=u,this.#u=D}[r](D,u){return{schema:{type:"sub_object",properties:Object.keys(this.#D).map((F)=>{return this.#D[F][r](F,D,u)}),groups:[]},conditionalFnRefId:D.trackConditional(this.#u)}}};d2.if=function D(u,F){return new J9(u,F)};d2.else=function D(u){return new J9(()=>!0,u)};var iB=class D extends Bu{static rules={enum:w8};#D;constructor(u,F,E){super(F,E||[w8({choices:Object.values(u)})]);this.#D=u}clone(){return new D(this.#D,this.cloneOptions(),this.cloneValidations())}},tB=class D{#D;#u=(u,F)=>{F.report(T.unionOfTypes,"unionOfTypes",F)};constructor(u){this.#D=u}otherwise(u){return this.#u=u,this}clone(){const u=new D(this.#D);return u.otherwise(this.#u),u}[r](u,F,E){return{type:"union",fieldName:u,propertyName:E.toCamelCase?OD(u):u,elseConditionalFnRefId:F.trackConditional(this.#u),conditions:this.#D.map(($)=>{return{conditionalFnRefId:F.trackConditional((B,C)=>{return $[pD](B,C)}),schema:$[r](u,F,E)}})}}},sB=class extends Pu{group=d2;union=f2;string(){return new Z8}boolean(D){return new du(D)}accepted(){return new Z9}number(D){return new fu(D)}date(D){return new c2(D)}literal(D){return new Y9(D)}object(D){return new E9(D)}array(D){return new C9(D)}tuple(D){return new F9(D)}record(D){return new $9(D)}enum(D){if(Array.isArray(D)||typeof D==="function")return new cu(D);return new iB(D)}any(){return new t6}unionOfTypes(D){const u=new Set;return D.forEach((F)=>{if(!F[pD]||!F[PD])throw new Error(`Cannot use "${F.constructor.name}". The schema type is not compatible for use with "vine.unionOfTypes"`);if(u.has(F[PD]))throw new Error(`Cannot use duplicate schema "${F[PD]}". "vine.unionOfTypes" needs distinct schema types only`);u.add(F[PD])}),u.clear(),new tB(D)}},aB={required:T.required,array:T.array,object:T.object},m2=class{#D;messagesProvider;errorReporter;#u(D){const u=RF();return{compilerNode:{type:"root",schema:D[r]("",u,{toCamelCase:!1})},refs:u.toJSON()}}constructor(D,u){const{compilerNode:F,refs:E}=this.#u(D);this.#D={schema:F,refs:E};const $=u.metaDataValidator,B=new jF(F,{convertEmptyStringsToNull:u.convertEmptyStringsToNull,messages:aB}).compile();if(this.errorReporter=u.errorReporter,this.messagesProvider=u.messagesProvider,$)this.validate=(C,J)=>{let X=J??{};const M=X.meta??{},W=X.errorReporter??this.errorReporter,H=X.messagesProvider??this.messagesProvider;return $(M),B(C,M,E,H,W())};else this.validate=(C,J)=>{let X=J??{};const M=X.meta??{},W=X.errorReporter??this.errorReporter,H=X.messagesProvider??this.messagesProvider;return B(C,M,E,H,W())}}async tryValidate(D,...[u]){try{return[null,await this.validate(D,u)]}catch(F){if(F instanceof T2)return[F,null];throw F}}toJSON(){const{schema:D,refs:u}=this.#D;return{schema:structuredClone(D),refs:u}}},K9=class extends sB{messagesProvider=new w0(T,o3);errorReporter=()=>new L2;convertEmptyStringsToNull=!1;helpers=_;createRule=S;compile(D){return new m2(D,{convertEmptyStringsToNull:this.convertEmptyStringsToNull,messagesProvider:this.messagesProvider,errorReporter:this.errorReporter})}withMetaData(D){return{compile:(u)=>{return new m2(u,{convertEmptyStringsToNull:this.convertEmptyStringsToNull,messagesProvider:this.messagesProvider,errorReporter:this.errorReporter,metaDataValidator:D})}}}validate(D){return this.compile(D.schema).validate(D.data,D)}tryValidate(D){return this.compile(D.schema).tryValidate(D.data,D)}},oB=new K9,R=oB;function Cw(){return typeof Bun!=="undefined"?Bun.env:uw.env}var X9={APP_NAME:R.string(),APP_ENV:R.enum(["local","dev","stage","prod"]),APP_KEY:R.string(),APP_URL:R.string(),PORT:R.number(),PORT_BACKEND:R.number(),PORT_ADMIN:R.number(),PORT_LIBRARY:R.number(),PORT_DESKTOP:R.number(),PORT_EMAIL:R.number(),PORT_DOCS:R.number(),PORT_INSPECT:R.number(),PORT_API:R.number(),PORT_SYSTEM_TRAY:R.number(),APP_MAINTENANCE:R.boolean(),DEBUG:R.boolean(),API_PREFIX:R.string(),DOCS_PREFIX:R.string(),DB_CONNECTION:R.enum(["mysql","sqlite","postgres"]),DB_HOST:R.string(),DB_PORT:R.number(),DB_DATABASE:R.string(),DB_USERNAME:R.string(),DB_PASSWORD:R.string(),AWS_ACCOUNT_ID:R.string(),AWS_ACCESS_KEY_ID:R.string(),AWS_SECRET_ACCESS_KEY:R.string(),AWS_DEFAULT_REGION:R.string(),AWS_DEFAULT_PASSWORD:R.string(),MAIL_MAILER:R.enum(["ses","sendmail","log","smtp"]),MAIL_HOST:R.string(),MAIL_PORT:R.number(),MAIL_USERNAME:R.string(),MAIL_PASSWORD:R.string(),MAIL_ENCRYPTION:R.string(),MAIL_FROM_NAME:R.string(),MAIL_FROM_ADDRESS:R.string(),SEARCH_ENGINE_DRIVER:R.enum(["meilisearch","algolia","typesense"]),MEILISEARCH_HOST:R.string(),MEILISEARCH_KEY:R.string(),FRONTEND_APP_ENV:R.enum(["development","staging","production"]),FRONTEND_APP_URL:R.string()};var eB={APP_ENV:["local","dev","development","staging","prod","production"],DB_CONNECTION:["mysql","sqlite","postgres","dynamodb"],MAIL_MAILER:["smtp","mailgun","ses","postmark","sendmail","log"],SEARCH_ENGINE_DRIVER:["opensearch"],FRONTEND_APP_ENV:["development","staging","production"]},Dw=Object.entries(X9).reduce((D,[u,F])=>{let E;switch(typeof F){case"string":E=R.string();break;case"number":E=R.number();break;case"boolean":E=R.boolean();break;default:if(Array.isArray(F)){E=R.enum(F);break}if(typeof F==="object"){const B=Symbol.for("schema_name"),C=F[B];if(C==="vine.string"){E=R.string();break}if(C==="vine.number"){E=R.number();break}if(C==="vine.boolean"){E=R.boolean();break}if(!C){E=R.enum(eB.APP_ENV);break}console.error("Unknown env value type",typeof F)}throw new Error(`Invalid env value for ${u}`)}const $=u;return D[$]=E,D},{}),jM=R.object(Dw);var Fw={get:(D,u)=>{const F=D[u];if(typeof F==="string"&&/^\d+$/.test(F)&&u!=="AWS_ACCOUNT_ID")return Number(F);if(typeof F==="string"&&/^true|false$/.test(F))return F==="true";if(F instanceof cu)return D[u];if(F instanceof du)return!!D[u];if(F instanceof fu)return Number(D[u]);return F}},h=new Proxy(Cw(),Fw);var W9={name:h.APP_NAME??"Stacks",description:"Stacks is a full-stack framework for building modern web applications.",env:h.APP_ENV??"local",url:h.APP_URL??"stacks.localhost",redirectUrls:["stacksjs.com"],debug:h.DEBUG??!1,key:h.APP_KEY,maintenanceMode:h.APP_MAINTENANCE??!1,docMode:!1,timezone:"America/Los_Angeles",locale:"en",fallbackLocale:"en",cipher:"aes-256-cbc"};var Q9={driver:"dynamodb",prefix:"stacks",ttl:3600,drivers:{dynamodb:{key:h.AWS_ACCESS_KEY_ID||"",secret:h.AWS_SECRET_ACCESS_KEY||"",region:h.AWS_DEFAULT_REGION||"us-east-1",table:"cache",endpoint:""},memcached:{persistent_id:"",sasl:["",""],options:{},servers:[{host:"127.0.0.1",port:11211,weight:100}]},redis:{connection:"cache",host:"127.0.0.1",port:6379,password:"",username:"stacks"}}};var M9={name:"My Custom CLI",command:"custom-cli",description:"This is an example command to illustrate how to create your own commands. Check out `../app/commands` for more.",deploy:!0};var J8={firewall:{enabled:!0,countryCodes:["RU","IR"],ipAddresses:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0,queryString:[],httpHeaders:[]}};var A9={type:"serverless",driver:"aws",firewall:J8.firewall,environments:["production","staging","development"],storage:{},api:{prefix:h.API_PREFIX||"api",description:"My awesome Stacks API",deploy:!0,memorySize:512,prewarm:10,timeout:30},cdn:{compress:!0,allowedMethods:"ALL",cachedMethods:"GET_HEAD",originShieldRegion:"us-east-1",minTtl:0,defaultTtl:86400,maxTtl:31536000,cookieBehavior:"none",allowList:{cookies:[],headers:[],queryStrings:[]},realtimeLogs:{enabled:!0,samplingRate:1}},fileSystem:!0};var G9={default:h.DB_CONNECTION||"sqlite",connections:{sqlite:{database:h.DB_DATABASE||"database/stacks.sqlite",prefix:""},dynamodb:{key:h.AWS_ACCESS_KEY_ID||"",secret:h.AWS_SECRET_ACCESS_KEY||"",region:h.AWS_DEFAULT_REGION||"us-east-1",prefix:h.DB_DATABASE||"stacks",endpoint:"http://localhost",port:h.DB_PORT||8000},mysql:{name:h.DB_DATABASE||"stacks",host:h.DB_HOST||"127.0.0.1",port:h.DB_PORT||3306,username:h.DB_USERNAME||"root",password:h.DB_PASSWORD||"",prefix:""},postgres:{name:h.DB_DATABASE||"stacks",host:h.DB_HOST||"127.0.0.1",port:h.DB_PORT||3306,username:h.DB_USERNAME||"",password:h.DB_PASSWORD||"",prefix:""}},migrations:"migrations",migrationLocks:"migration_locks"};var q9={a:[{name:h.APP_URL||"",address:"10.0.0.1",ttl:300},{name:"www",address:"@",ttl:300}],aaaa:[],cname:[],mx:[],txt:[],nameservers:[]};var H9={from:{name:h.MAIL_FROM_NAME||"Stacks",address:h.MAIL_FROM_ADDRESS||"no-reply@stacksjs.org"},mailboxes:["chris@stacksjs.org","blake@stacksjs.org","glenn@stacksjs.org"],url:h.APP_URL||"http://localhost:3000",charset:"UTF-8",server:{scan:!0}};var z9={messages:{string:"The {{ field }} field must be a string",email:"The {{ field }} field must be a valid email address",regex:"The {{ field }} field format is invalid",url:"The {{ field }} field must be a valid URL",activeUrl:"The {{ field }} field must be a valid URL",alpha:"The {{ field }} field must contain only letters",alphaNumeric:"The {{ field }} field must contain only letters and numbers",minLength:"The {{ field }} field must have at least {{ min }} characters",maxLength:"The {{ field }} field must not be greater than {{ max }} characters",fixedLength:"The {{ field }} field must be {{ size }} characters long",confirmed:"The {{ field }} field and {{ otherField }} field must be the same",endsWith:"The {{ field }} field must end with {{ substring }}",startsWith:"The {{ field }} field must start with {{ substring }}",sameAs:"The {{ field }} field and {{ otherField }} field must be the same",notSameAs:"The {{ field }} field and {{ otherField }} field must be different",in:"The selected {{ field }} is invalid",notIn:"The selected {{ field }} is invalid",ipAddress:"The {{ field }} field must be a valid IP address",uuid:"The {{ field }} field must be a valid UUID",ascii:"The {{ field }} field must only contain ASCII characters",creditCard:"The {{ field }} field must be a valid {{ providersList }} card number",hexCode:"The {{ field }} field must be a valid hex color code",iban:"The {{ field }} field must be a valid IBAN number",jwt:"The {{ field }} field must be a valid JWT token",coordinates:"The {{ field }} field must contain latitude and longitude coordinates",mobile:"The {{ field }} field must be a valid mobile phone number",passport:"The {{ field }} field must be a valid passport number",postalCode:"The {{ field }} field must be a valid postal code",boolean:"The value must be a boolean",number:"The {{ field }} field must be a number",min:"The {{ field }} field must be at least {{ min }}",max:"The {{ field }} field must not be greater than {{ max }}",range:"The {{ field }} field must be between {{ min }} and {{ max }}",positive:"The {{ field }} field must be positive",negative:"The {{ field }} field must be negative",decimal:"The {{ field }} field must have {{ digits }} decimal places",withoutDecimals:"The {{ field }} field must not have decimal places",date:"The {{ field }} field must be a datetime value","date.equals":"The {{ field }} field must be a date equal to {{ expectedValue }}","date.after":"The {{ field }} field must be a date after {{ expectedValue }}","date.before":"The {{ field }} field must be a date before {{ expectedValue }}","date.afterOrEqual":"The {{ field }} field must be a date after or equal to {{ expectedValue }}","date.beforeOrEqual":"The {{ field }} field must be a date before or equal to {{ expectedValue }}","date.sameAs":"The {{ field }} field and {{ otherField }} field must be the same","date.notSameAs":"The {{ field }} field and {{ otherField }} field must be different","date.afterField":"The {{ field }} field must be a date after {{ otherField }}",accepted:"The {{ field }} field must be accepted",enum:"The selected {{ field }} is invalid",literal:"The {{ field }} field must be {{ expectedValue }}",object:"The {{ field }} field must be an object",record:"The {{ field }} field must be an object","record.minLength":"The {{ field }} field must have at least {{ min }} items","record.maxLength":"The {{ field }} field must not have more than {{ max }} items","record.fixedLength":"The {{ field }} field must contain {{ size }} items",array:"The {{ field }} field must be an array","array.minLength":"The {{ field }} field must have at least {{ min }} items","array.maxLength":"The {{ field }} field must not have more than {{ max }} items","array.fixedLength":"The {{ field }} field must contain {{ size }} items",notEmpty:"The {{ field }} field must not be empty",distinct:"The {{ field }} field has duplicate values",tuple:"The {{ field }} field must be an array",union:"Invalid value provided for {{ field }} field",unionGroup:"Invalid value provided for {{ field }} field",unionOfTypes:"Invalid value provided for {{ field }} field"}};var U9={hooks:{"pre-commit":"lint-staged"},scopes:["","ci","deps","dx","release","docs","test","core","actions","arrays","auth","build","cache","cli","cloud","collections","config","database","datetime","docs","errors","git","lint","x-ray","modules","notifications","objects","path","realtime","router","buddy","security","server","storage","strings","tests","types","ui","utils"],messages:{type:"Select the type of change that you\u2019re committing:",scope:"Select the SCOPE of this change (optional):",customScope:"Select the SCOPE of this change:",subject:"Write a SHORT, IMPERATIVE tense description of the change:\n",body:'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',breaking:'List any BREAKING CHANGES (optional). Use "|" to break new line:\n',footerPrefixesSelect:"Select the ISSUES type of the change list by this change (optional):",customFooterPrefixes:"Input ISSUES prefix:",footer:"List any ISSUES by this change. E.g.: #31, #34:\n",confirmCommit:"Are you sure you want to proceed with the commit above?"},types:[{value:"feat",name:"feat: \u2728 A new feature",emoji:":sparkles:"},{value:"fix",name:"fix: \uD83D\uDC1B A bug fix",emoji:":bug:"},{value:"docs",name:"docs: \uD83D\uDCDD Documentation only changes",emoji:":memo:"},{value:"style",name:"style: \uD83D\uDC84 Changes that do not affect the meaning of the code",emoji:":lipstick:"},{value:"refactor",name:"refactor: \u267B\uFE0F A code change that neither fixes a bug nor adds a feature",emoji:":recycle:"},{value:"perf",name:"perf: \u26A1\uFE0F A code change that improves performance",emoji:":zap:"},{value:"test",name:"test: \u2705 Adding missing tests or adjusting existing tests",emoji:":white_check_mark:"},{value:"build",name:"build: \uD83D\uDCE6\uFE0F Changes that affect the build system or external dependencies",emoji:":package:"},{value:"ci",name:"ci: \uD83C\uDFA1 Changes to our CI configuration files and scripts",emoji:":ferris_wheel:"},{value:"chore",name:"chore: \uD83D\uDD28 Other changes that don\u2019t modify src or test files",emoji:":hammer:"},{value:"revert",name:"revert: \u23EA\uFE0F Reverts a previous commit",emoji:":rewind:"}]};var O9={driver:"argon2",bcrypt:{rounds:10,cost:4},argon2:{memory:65536,threads:1,time:1}};var V9={name:"hello-world",owner:"@stacksjs",repository:"stacksjs/stacks",license:"MIT",author:"Chris Breuer",contributors:["Chris Breuer <chris@stacksjs.org>"],defaultLanguage:"en",releaseable:!0,vueComponents:{name:"hello-world-vue",description:"Your Vue component library description",keywords:["component","library","vue","vite","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},webComponents:{name:"hello-world-elements",description:"Your framework agnostic web component library description.",keywords:["custom-elements","web-components","library","framework-agnostic","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},functions:{name:"hello-world-fx",description:"Your function library description.",keywords:["functions","composables","library","typescript","javascript"],shouldGenerateSourcemap:!1,files:["counter","dark"]}};var T9={logsPath:L0("logs/stacks.log"),deploymentsPath:L0("logs/deployments.log")};var L9={default:"email"};var N9={driver:"stripe"};var I9={frontend:h.PORT??3000,backend:h.PORT_BACKEND??3001,admin:h.PORT_ADMIN??3002,library:h.PORT_LIBRARY??3003,desktop:h.PORT_DESKTOP??3004,email:h.PORT_EMAIL??3005,docs:h.PORT_DOCS??3006,inspect:h.PORT_INSPECT??3007,api:h.PORT_API??3008,systemTray:h.PORT_SYSTEM_TRAY??3009,database:3010};var S9={default:"sync",connections:{sync:{driver:"sync"},sqs:{driver:"sqs",key:"",secret:"",prefix:"",suffix:"",queue:"default",region:"us-east-1"}}};var x9={driver:"opensearch"};var j9={aws:{accountId:h.AWS_ACCOUNT_ID||"",appId:h.AWS_ACCESS_KEY_ID||"",apiKey:h.AWS_SECRET_ACCESS_KEY||"",region:h.AWS_DEFAULT_REGION||"us-east-1"},algolia:{appId:"",apiKey:""},meilisearch:{appId:"",apiKey:""},lemonSqueezy:{appId:"",apiKey:""},stripe:{appId:"",apiKey:""}};var R9={driver:"s3"};var y9={name:"Stacks",members:{chris:"chris@stacksjs.org",blake:"blake@stacksjs.org",zoltan:"zoltan@stacksjs.org",freddy:"freddy@stacksjs.org",glenn:"glenn@stacksjs.org",dorell:"dorell@stacksjs.org",avery:"avery@stacksjs.org",adelino:"adelino@stacksjs.org"}};var k9={shortcuts:[["btn","inline-flex items-center px-4 py-2 ml-2 border border-transparent shadow-sm text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"]],safelist:"prose prose-sm m-auto text-left",trigger:":stx:",classPrefix:"stx-",reset:"tailwind",icons:["heroicons"],fonts:{email:{title:"Mona",text:"Hubot"},desktop:{title:"Mona",text:"Hubot"},mobile:{title:"Mona",text:"Hubot"},web:{title:"Mona",text:"Hubot"}},theme:{colors:{veryCool:"#0000ff",brand:{primary:"hsl(var(--hue, 217) 78% 51%)"}}}};var Ew={ai:l3,analytics:i3,app:W9,cache:Q9,cli:M9,cloud:A9,database:G9,dns:q9,email:H9,errors:z9,git:U9,hashing:O9,library:V9,logging:T9,notification:L9,queue:S9,payment:N9,ports:I9,searchEngine:x9,security:J8,services:j9,storage:R9,team:y9,ui:k9},n2=Ew;async function h9(D){if(!D?.port)D={port:3000};return console.log("Creating local tunnel",D.port),"localTunnel"}async function Qu(D){return await h9({port:D})}async function $w({domain:D=wD.app.url||"stacks",type:u="frontend",localhost:F=!1,https:E=void 0,network:$=void 0}={}){let B=D.replace(/\.[^.]+$/,".localhost");switch(u){case"frontend":if($)return await Qu(wD.ports?.frontend||3000);if(F)return`http://localhost:${wD.ports?.frontend}`;break;case"backend":if($)return await Qu(wD.ports?.backend||3001);if(F)return`http://localhost:${wD.ports?.backend}`;B=`api.${B}`;break;case"admin":if($)return await Qu(wD.ports?.admin||3002);if(F)return`http://localhost:${wD.ports?.admin}`;B=`admin.${B}`;break;case"library":if($)return await Qu(wD.ports?.library||3003);if(F)return`http://localhost:${wD.ports?.library}`;B=`libs.${B}`;break;case"email":if($)return await Qu(wD.ports?.email||3005);if(F)return`http://localhost:${wD.ports?.email}`;B=`email.${B}`;break;case"desktop":if($)return await Qu(wD.ports?.desktop||3004);if(F)return`http://localhost:${wD.ports?.desktop}`;B=`desktop.${B}`;break;case"docs":if($)return await Qu(wD.ports?.docs||3006);if(F)return`http://localhost:${wD.ports?.docs}`;B=`docs.${B}`;break;case"inspect":if($)return await Qu(wD.ports?.inspect||3007);if(F)return`http://localhost:${wD.ports?.inspect}`;B=`inspect.${B}`;break;default:if(F)return`http://localhost:${wD.ports?.frontend}`}if(E)return`https://${B}`;return`http://${B}`}function Bw(D){return D}function ww(D){return D}function Yw(D){return D}function Zw(D){return D}function Jw(D){return D}function Kw(D){return D}function Xw(D){return D}function Ww(D){return D}function Qw(D){return D}function Mw(D){return D}function Aw(D){return D}function Gw(D){return D}function qw(D){return D}function Hw(D){return D}function zw(D){return D}function Uw(D){return D}function Ow(D){return D}function Vw(D){return D}function Tw(D){return D}function Lw(D){return D}function Nw(D){return D}function Iw(D){return D}function Sw(D){return D}function xw(D){return D}function jw(D){return D}function Rw(D){return D}function yw(D){return D}function CY(){if(Su.env==="local")return"dev";if(Su.env==="development")return"dev";if(Su.env==="staging")return"stage";if(Su.env==="production")return"prod";if(!Su.env)throw new Error("Couldn\'t determine app environment");return Su.env}var s={...m8,...n2},kw=s.ai,hw=s.analytics,Su=s.app,gw=s.cache,_w=s.cloud,bw=s.cli,Pw=s.database,vw=s.dns,mw=s.docs,cw=s.email,fw=s.errors,dw=s.git,nw=s.hashing,rw=s.library,pw=s.logging,lw=s.notification,iw=s.payment,tw=s.ports,sw=s.queue,aw=s.security,ow=s.searchEngine,ew=s.services,DY=s.storage,uY=s.team,FY=s.ui;function P9(D,u){let F;if(p8(D))F=D;else if(D instanceof Error)F=D.message;else if(u instanceof Error)F=u.message;else F=String(D);return Uu(`ERROR: ${YY(F)}`),r2.handle(D,u)}async function Uu(D,u){const F=`[${new Date().toISOString()}] ${D}\n`;try{const E=u?.logFile??wD.logging.logsPath??"storage/logs/stacks.log";try{await $Y(E)}catch{console.log("Creating log file directory...",E),await b9(BY(E),{recursive:!0})}await _9(E,F)}catch(E){console.error("Failed to write to log file:",E)}}class r2{static isTestEnvironment=!1;static shouldExitProcess=!0;static handle(D,u){if(this.shouldExitProcess=u?.shouldExit!==!1,u?.silent!==!0)this.writeErrorToConsole(D);let F;if(u?.message)F=u.message;else if(D instanceof Error)F=D.message;else if(typeof D==="string")F=D;else F=JSON.stringify(D);const E=new Error(F);if(D instanceof Error)Object.assign(E,D);return this.writeErrorToFile(E).catch(($)=>console.error($)),E}static handleError(D,u){return this.handle(D,u),D}static async writeErrorToFile(D){if(!(D instanceof Error)){console.error("Error is not an instance of Error:",D);return}const u=`[${new Date().toISOString()}] ${D.name}: ${D.message}\n`,F=v8("stacks.log")??v8("errors.log");try{await b9(n3(F),{recursive:!0}),await _9(F,u)}catch(E){console.error("Failed to write to error file:",E)}}static writeErrorToConsole(D){console.error(D);const u=typeof D==="string"?D:D instanceof Error?D.message:JSON.stringify(D);if(u.includes("bunx --bun cdk destroy")||u===`Failed to execute command: ${g9("bunx --bun eslint . --fix")}`||u===`Failed to execute command: ${g9("bun storage/framework/core/actions/src/lint/fix.ts")}`){if(!this.isTestEnvironment)console.log("No need to worry. The edge function is currently being destroyed. Please run `buddy undeploy` shortly again, and continue doing so until it succeeds running."),console.log("Hoping to see you back soon!")}if(this.shouldExitProcess)wY.exit(1)}}function nu(D,u,F,E){function $(B){return B instanceof F?B:new F(function(C){C(B)})}return new(F||(F=Promise))(function(B,C){function J(W){try{M(E.next(W))}catch(H){C(H)}}function X(W){try{M(E.throw(W))}catch(H){C(H)}}function M(W){W.done?B(W.value):$(W.value).then(J,X)}M((E=E.apply(D,[])).next())})}function v9(D){var u=typeof Symbol==="function"&&Symbol.iterator,F=u&&D[u],E=0;if(F)return F.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&E>=D.length)D=void 0;return{value:D&&D[E++],done:!D}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")}function xu(D){return this instanceof xu?(this.v=D,this):new xu(D)}function JY(D,u,F){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var E=F.apply(D,u||[]),$,B=[];return $={},C("next"),C("throw"),C("return"),$[Symbol.asyncIterator]=function(){return this},$;function C(q){if(E[q])$[q]=function(A){return new Promise(function(Q,y){B.push([q,A,Q,y])>1||J(q,A)})}}function J(q,A){try{X(E[q](A))}catch(Q){H(B[0][3],Q)}}function X(q){q.value instanceof xu?Promise.resolve(q.value.v).then(M,W):H(B[0][2],q)}function M(q){J("next",q)}function W(q){J("throw",q)}function H(q,A){if(q(A),B.shift(),B.length)J(B[0][0],B[0][1])}}function KY(D){var u,F;return u={},E("next"),E("throw",function($){throw $}),E("return"),u[Symbol.iterator]=function(){return this},u;function E($,B){u[$]=D[$]?function(C){return(F=!F)?{value:xu(D[$](C)),done:$==="return"}:B?B(C):C}:B}}function XY(D){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var u=D[Symbol.asyncIterator],F;return u?u.call(D):(D=typeof v9==="function"?v9(D):D[Symbol.iterator](),F={},E("next"),E("throw"),E("return"),F[Symbol.asyncIterator]=function(){return this},F);function E(B){F[B]=D[B]&&function(C){return new Promise(function(J,X){C=D[B](C),$(J,X,C.done,C.value)})}}function $(B,C,J,X){Promise.resolve(X).then(function(M){B({value:M,done:J})},C)}}function wu(D){return new lD(D)}var ZY={withStackTrace:!1},m9=(D,u,F=ZY)=>{const E=u.isOk()?{type:"Ok",value:u.value}:{type:"Err",value:u.error},$=F.withStackTrace?new Error().stack:void 0;return{data:E,message:D,stack:$}};class XD{constructor(D){this._promise=D}static fromSafePromise(D){const u=D.then((F)=>new Du(F));return new XD(u)}static fromPromise(D,u){const F=D.then((E)=>new Du(E)).catch((E)=>new lD(u(E)));return new XD(F)}static fromThrowable(D,u){return(...F)=>{return new XD((()=>nu(this,void 0,void 0,function*(){try{return new Du(yield D(...F))}catch(E){return new lD(u?u(E):E)}}))())}}static combine(D){return MY(D)}static combineWithAllErrors(D){return AY(D)}map(D){return new XD(this._promise.then((u)=>nu(this,void 0,void 0,function*(){if(u.isErr())return new lD(u.error);return new Du(yield D(u.value))})))}andThrough(D){return new XD(this._promise.then((u)=>nu(this,void 0,void 0,function*(){if(u.isErr())return new lD(u.error);const F=yield D(u.value);if(F.isErr())return new lD(F.error);return new Du(u.value)})))}andTee(D){return new XD(this._promise.then((u)=>nu(this,void 0,void 0,function*(){if(u.isErr())return new lD(u.error);try{yield D(u.value)}catch(F){}return new Du(u.value)})))}mapErr(D){return new XD(this._promise.then((u)=>nu(this,void 0,void 0,function*(){if(u.isOk())return new Du(u.value);return new lD(yield D(u.error))})))}andThen(D){return new XD(this._promise.then((u)=>{if(u.isErr())return new lD(u.error);const F=D(u.value);return F instanceof XD?F._promise:F}))}orElse(D){return new XD(this._promise.then((u)=>nu(this,void 0,void 0,function*(){if(u.isErr())return D(u.error);return new Du(u.value)})))}match(D,u){return this._promise.then((F)=>F.match(D,u))}unwrapOr(D){return this._promise.then((u)=>u.unwrapOr(D))}safeUnwrap(){return JY(this,arguments,function*D(){return yield xu(yield xu(yield*KY(XY(yield xu(this._promise.then((u)=>u.safeUnwrap()))))))})}then(D,u){return this._promise.then(D,u)}}var K8=(D)=>new XD(Promise.resolve(new lD(D))),WY=XD.fromPromise,QY=XD.fromSafePromise,YG=XD.fromThrowable,c9=(D)=>{let u=Ou([]);for(let F of D)if(F.isErr()){u=wu(F.error);break}else u.map((E)=>E.push(F.value));return u},MY=(D)=>XD.fromSafePromise(Promise.all(D)).andThen(c9),f9=(D)=>{let u=Ou([]);for(let F of D)if(F.isErr()&&u.isErr())u.error.push(F.error);else if(F.isErr()&&u.isOk())u=wu([F.error]);else if(F.isOk()&&u.isOk())u.value.push(F.value);return u},AY=(D)=>XD.fromSafePromise(Promise.all(D)).andThen(f9),X8;(function(D){function u($,B){return(...C)=>{try{const J=$(...C);return Ou(J)}catch(J){return wu(B?B(J):J)}}}D.fromThrowable=u;function F($){return c9($)}D.combine=F;function E($){return f9($)}D.combineWithAllErrors=E})(X8||(X8={}));var Ou=(D)=>new Du(D);class Du{constructor(D){this.value=D}isOk(){return!0}isErr(){return!this.isOk()}map(D){return Ou(D(this.value))}mapErr(D){return Ou(this.value)}andThen(D){return D(this.value)}andThrough(D){return D(this.value).map((u)=>this.value)}andTee(D){try{D(this.value)}catch(u){}return Ou(this.value)}orElse(D){return Ou(this.value)}asyncAndThen(D){return D(this.value)}asyncAndThrough(D){return D(this.value).map(()=>this.value)}asyncMap(D){return XD.fromSafePromise(D(this.value))}unwrapOr(D){return this.value}match(D,u){return D(this.value)}safeUnwrap(){const D=this.value;return function*(){return D}()}_unsafeUnwrap(D){return this.value}_unsafeUnwrapErr(D){throw m9("Called `_unsafeUnwrapErr` on an Ok",this,D)}}class lD{constructor(D){this.error=D}isOk(){return!1}isErr(){return!this.isOk()}map(D){return wu(this.error)}mapErr(D){return wu(D(this.error))}andThrough(D){return wu(this.error)}andTee(D){return wu(this.error)}andThen(D){return wu(this.error)}orElse(D){return D(this.error)}asyncAndThen(D){return K8(this.error)}asyncAndThrough(D){return K8(this.error)}asyncMap(D){return K8(this.error)}unwrapOr(D){return D}match(D,u){return u(this.error)}safeUnwrap(){const D=this.error;return function*(){throw yield wu(D),new Error("Do not use this generator out of `safeTry`")}()}_unsafeUnwrap(D){throw m9("Called `_unsafeUnwrap` on an Err",this,D)}_unsafeUnwrapErr(D){return this.error}}var GY=X8.fromThrowable;X3();W8();M8();G8();function cZ(){const D=/--verbose(?!\s*=\s*false|\s+false)(?:\s+|=true)?(?:$|\s)/,u=mZ();if(D.test(u))return 4;return 3}var q0={...V8({level:cZ()}),warning:(D)=>console.warn(D),dump:(...D)=>console.log(...D),dd:(...D)=>{console.log(...D),T8.exit(1)},echo:(D)=>console.log(D)};var Wu={info:async(D,u)=>{if(u?.styled===!1)console.log(D);else q0.info(D);await Uu(`INFO: ${G0(D)}`)},success:async(D,u)=>{if(u?.styled===!1)console.log(D);else q0.success(D);await Uu(`SUCCESS: ${G0(D)}`)},warn:async(D,u)=>{if(u?.styled===!1)console.log(D);else q0.warn(D);await Uu(`WARN: ${G0(D)}`)},warning:async(D,u)=>{if(u?.styled===!1)console.log(D);else q0.warn(D);await Uu(`WARN: ${G0(D)}`)},error:async(D,u)=>{P9(D,u)},debug:async(...D)=>{const F=`DEBUG: ${D.map((E)=>typeof E==="object"?JSON.stringify(E,null,2):E).join(" ")}`;if(T8.env.APP_ENV==="production"||T8.env.APP_ENV==="prod")return Uu(F);q0.debug(F),await Uu(G0(F))},dump:(...D)=>D.forEach((u)=>console.log(u)),dd:(...D)=>{D.forEach((u)=>console.log(u)),T8.exit(1)},echo:(...D)=>console.log(...D)};var x4=l(j3(),1);import TK from"node-fetch";var L4="https://www.iana.org/whois?q=",N4={"whois.denic.de":"-T dn,ace","whois.nic.fr":"-V Md5.2"},R3={"br.com":"whois.centralnic.net","cn.com":"whois.centralnic.net","de.com":"whois.centralnic.net","eu.com":"whois.centralnic.net","gb.com":"whois.centralnic.net","gb.net":"whois.centralnic.net","gr.com":"whois.centralnic.net","hu.com":"whois.centralnic.net","in.net":"whois.centralnic.net","no.com":"whois.centralnic.net","qc.com":"whois.centralnic.net","ru.com":"whois.centralnic.net","sa.com":"whois.centralnic.net","se.com":"whois.centralnic.net","se.net":"whois.centralnic.net","uk.com":"whois.centralnic.net","uk.net":"whois.centralnic.net","us.com":"whois.centralnic.net","uy.com":"whois.centralnic.net","za.com":"whois.centralnic.net","jpn.com":"whois.centralnic.ne","web.com":"whois.centralnic.ne",com:"whois.verisign-grs.com","za.net":"whois.za.net",net:"whois.verisign-grs.com","eu.org":"whois.eu.org","za.org":"whois.za.org",org:"whois.pir.org","llyw.cymru":"whois.nic.llyw.cymru","gov.scot":"whois.nic.gov.scot","gov.wales":"whois.nic.gov.wales",edu:"whois.educause.edu",gov:"whois.dotgov.gov",int:"whois.iana.org","e164.arpa":"whois.ripe.net",arpa:"whois.iana.org",aero:"whois.aero",asia:"whois.nic.asia",biz:"whois.nic.biz",cat:"whois.nic.cat",coop:"whois.nic.coop",info:"whois.afilias.net",jobs:"whois.nic.jobs",mobi:"whois.afilias.net",museum:"whois.nic.museum",name:"whois.nic.name",post:"whois.dotpostregistry.net",pro:"whois.nic.pro",tel:"whois.nic.tel",travel:"whois.nic.travel",xxx:"whois.nic.xxx",ac:"whois.nic.ac",ae:"whois.aeda.net.ae",af:"whois.nic.af",ag:"whois.nic.ag",ai:"whois.nic.ai",am:"whois.amnic.net",ar:"whois.nic.ar",as:"whois.nic.as","priv.at":"whois.nic.priv.at",at:"whois.nic.at",au:"whois.auda.org.au",aw:"whois.nic.aw",ax:"whois.ax",be:"whois.dns.be",bf:"whois.registre.bf",bg:"whois.register.bg",bh:"whois.nic.bh",bi:"whois1.nic.bi",bj:"whois.nic.bj",bm:"whois.afilias-srs.net",bn:"whois.bnnic.bn",bo:"whois.nic.bo",br:"whois.registro.br",by:"whois.cctld.by",bw:"whois.nic.net.bw",bz:"whois.afilias-grs.info","co.ca":"whois.co.ca",ca:"whois.cira.ca",cc:"ccwhois.verisign-grs.com",cd:"whois.nic.cd",ch:"whois.nic.ch",ci:"whois.nic.ci",cl:"whois.nic.cl",cm:"whois.netcom.cm","edu.cn":"whois.edu.cn",cn:"whois.cnnic.cn","uk.co":"whois.uk.co",co:"whois.nic.co",cr:"whois.nic.cr",cx:"whois.nic.cx",cz:"whois.nic.cz",de:"whois.denic.de",dk:"whois.dk-hostmaster.dk",dm:"whois.dmdomains.dm",do:"whois.nic.do",dz:"whois.nic.dz",ec:"whois.nic.ec",ee:"whois.tld.ee",eu:"whois.eu",fi:"whois.fi",fj:"www.whois.fj",fm:"whois.nic.fm",fo:"whois.nic.fo",fr:"whois.nic.fr",gd:"whois.nic.gd",ge:"whois.nic.ge",gf:"whois.mediaserv.net",gg:"whois.gg",gh:"whois.nic.gh",gi:"whois2.afilias-grs.net",gl:"whois.nic.gl",gp:"whois.nic.gp",gq:"whois.dominio.gq",gs:"whois.nic.gs",gy:"whois.registry.gy",hk:"whois.hkirc.hk",hm:"whois.registry.hm",hn:"whois.nic.hn",hr:"whois.dns.hr",ht:"whois.nic.ht",hu:"whois.nic.hu",id:"whois.id",ie:"whois.weare.ie",il:"whois.isoc.org.il",im:"whois.nic.im",in:"whois.registry.in",io:"whois.nic.io",iq:"whois.cmc.iq",ir:"whois.nic.ir",is:"whois.isnic.is",it:"whois.nic.it",je:"whois.je",jp:"whois.jprs.jp",ke:"whois.kenic.or.ke",kg:"whois.kg",ki:"whois.nic.ki",kn:"whois.nic.kn",kr:"whois.kr",kw:"whois.nic.kw",ky:"whois.kyregistry.ky",kz:"whois.nic.kz",la:"whois.nic.la",lb:"whois.lbdr.org.lb",lc:"whois2.afilias-grs.net",li:"whois.nic.li",lk:"whois.nic.lk",ls:"whois.nic.ls",lt:"whois.domreg.lt",lu:"whois.dns.lu",lv:"whois.nic.lv",ly:"whois.nic.ly",ma:"whois.registre.ma",md:"whois.nic.md",me:"whois.nic.me",mg:"whois.nic.mg",mk:"whois.marnet.mk",ml:"whois.dot.ml",mm:"whois.registry.gov.mm",mn:"whois.nic.mn",mq:"whois.mediaserv.net",mr:"whois.nic.mr",ms:"whois.nic.ms",mt:"whois.nic.org.mt",mu:"whois.nic.mu",mw:"whois.nic.mw",mx:"whois.mx",my:"whois.mynic.my",mz:"whois.nic.mz",na:"whois.na-nic.com.na",nc:"whois.nc",nf:"whois.nic.nf",ng:"whois.nic.net.ng",nl:"whois.domain-registry.nl",no:"whois.norid.no",nu:"whois.iis.nu",nz:"whois.irs.net.nz",om:"whois.registry.om",pe:"kero.yachay.pe",pf:"whois.registry.pf",pk:"whois.pknic.net.pk","co.pl":"whois.co.pl",pl:"whois.dns.pl",pm:"whois.nic.pm",pr:"whois.afilias-srs.net",ps:"whois.pnina.ps",pt:"whois.dns.pt",pw:"whois.nic.pw",qa:"whois.registry.qa",re:"whois.nic.re",ro:"whois.rotld.ro",rs:"whois.rnids.rs","ac.ru":"whois.free.net","edu.ru":"whois.informika.ru","com.ru":"whois.flexireg.net","msk.ru":"whois.flexireg.net","net.ru":"whois.nic.net.ru","nov.ru":"whois.flexireg.net","org.ru":"whois.nic.net.ru","pp.ru":"whois.nic.net.ru","spb.ru":"whois.flexireg.net",ru:"whois.tcinet.ru",rw:"whois.ricta.org.rw",sa:"whois.nic.net.sa",sb:"whois.nic.net.sb",sc:"whois2.afilias-grs.net",sd:"whois.sdnic.sd",se:"whois.iis.se",sg:"whois.sgnic.sg",sh:"whois.nic.sh",si:"whois.register.si",sk:"whois.sk-nic.sk",sl:"whois.nic.sl",sm:"whois.nic.sm",sn:"whois.nic.sn",so:"whois.nic.so",ss:"whois.nic.ss",st:"whois.nic.st","msk.su":"whois.flexireg.net","nov.su":"whois.flexireg.net","spb.su":"whois.flexireg.net",su:"whois.tcinet.ru",sx:"whois.sx",sy:"whois.tld.sy",tc:"whois.nic.tc",td:"whois.nic.td",tf:"whois.nic.tf",tg:"whois.nic.tg",th:"whois.thnic.co.th",tk:"whois.dot.tk",tl:"whois.nic.tl",tm:"whois.nic.tm",tn:"whois.ati.tn",to:"whois.tonic.to",tr:"whois.trabis.gov.tr",tv:"whois.nic.tv",tw:"whois.twnic.net.tw",tz:"whois.tznic.or.tz","biz.ua":"whois.biz.ua","co.ua":"whois.co.ua","pp.ua":"whois.pp.ua",ua:"whois.ua",ug:"whois.co.ug","ac.uk":"whois.nic.ac.uk","gov.uk":"whois.gov.uk",uk:"whois.nic.uk","fed.us":"whois.nic.gov",us:"whois.nic.us",uy:"whois.nic.org.uy",uz:"whois.cctld.uz",vc:"whois2.afilias-grs.net",ve:"whois.nic.ve",vg:"whois.nic.vg",vu:"whois.dnrs.vu",wf:"whois.nic.wf",ws:"whois.website.ws",yt:"whois.nic.yt","ac.za":"whois.ac.za","co.za":"whois.registry.net.za","gov.za":"whois.gov.za","net.za":"net-whois.registry.net.za","org.za":"org-whois.registry.net.za","web.za":"web-whois.registry.net.za",zm:"whois.zicta.zm","xn--2scrj9c":"whois.registry.in","xn--3e0b707e":"whois.kr","xn--3hcrj9c":"whois.registry.in","xn--45br5cyl":"whois.registry.in","xn--45brj9c":"whois.registry.in","xn--4dbrk0ce":"whois.isoc.org.il","xn--80ao21a":"whois.nic.kz","xn--90a3ac":"whois.rnids.rs","xn--90ae":"whois.imena.bg","xn--90ais":"whois.cctld.by","xn--clchc0ea0b2g2a9gcd":"whois.sgnic.sg","xn--d1alf":"whois.marnet.mk","xn--e1a4c":"whois.eu","xn--fiqs8s":"cwhois.cnnic.cn","xn--fiqz9s":"cwhois.cnnic.cn","xn--fpcrj9c3d":"whois.registry.in","xn--fzc2c9e2c":"whois.nic.lk","xn--gecrj9c":"whois.registry.in","xn--h2breg3eve":"whois.registry.in","xn--h2brj9c8c":"whois.registry.in","xn--h2brj9c":"whois.registry.in","xn--j1amh":"whois.dotukr.com","xn--j6w193g":"whois.hkirc.hk","xn--kprw13d":"whois.twnic.net.tw","xn--kpry57d":"whois.twnic.net.tw","xn--lgbbat1ad8j":"whois.nic.dz","xn--mgb9awbf":"whois.registry.om","xn--mgba3a4f16a":"whois.nic.ir","xn--mgbaam7a8h":"whois.aeda.net.ae","xn--mgbah1a3hjkrd":"whois.nic.mr","xn--mgbbh1a71e":"whois.registry.in","xn--mgbbh1a":"whois.registry.in","xn--mgberp4a5d4ar":"whois.nic.net.sa","xn--mgbgu82a":"whois.registry.in","xn--mgbtx2b":"whois.cmc.iq","xn--mgbx4cd0ab":"whois.mynic.my","xn--node":"whois.itdc.ge","xn--o3cw4h":"whois.thnic.co.th","xn--ogbpf8fl":"whois.tld.sy","xn--p1ai":"whois.tcinet.ru","xn--pgbs0dh":"whois.ati.tn","xn--q7ce6a":"whois.nic.la","xn--qxa6a":"whois.eu","xn--rvc1e0am3e":"whois.registry.in","xn--s9brj9c":"whois.registry.in","xn--wgbh1c":"whois.dotmasr.eg","xn--wgbl6a":"whois.registry.qa","xn--xkc2al3hye2a":"whois.nic.lk","xn--xkc2dl3a5ee0h":"whois.registry.in","xn--y9a3aq":"whois.amnic.net","xn--yfro4i67o":"whois.sgnic.sg","xn--ygbi2ammx":"whois.pnina.ps"};var I4;((F)=>{F[F.SOCKS4=0]="SOCKS4";F[F.SOCKS5=1]="SOCKS5"})(I4||={});function y3(D){if(Array.isArray(D))return D.slice();if(typeof D==="object"&&D!==null){const u={};for(let F in D)if(Object.prototype.hasOwnProperty.call(D,F))u[F]=y3(D[F]);return u}return D}var xK=l(j3(),1);async function LK(D){const u=L4+D;try{const F=await TK(u);if(F.ok){const $=(await F.text()).match(/whois:\s+(\S+)/);if($?.[1])return $[1]}}catch(F){console.error("Error in getting WhoIs server data from IANA",F)}return""}function NK(D){if(D==="com")return"whois.verisign-grs.com";return R3[D]}function S4(D){const u=D.split(".");for(let F=u.length-1;F>0;F--){const E=u.slice(F).join(".");if(R3[E])return E}return u[u.length-1]}function IK(D){return N4[D]}async function SK(D,u,F,E,$,B){const C=new TextDecoder($),J=new TextEncoder;if(!B){const M=new VK.Socket;return new Promise((W,H)=>{try{M.connect({port:E,host:F},()=>{if(u!=="")M.write(J.encode(`${u} ${D}\r\n`));else M.write(J.encode(`${D}\r\n`))}),M.on("data",(q)=>{W(C.decode(q))}),M.on("error",(q)=>{H(q)})}catch(q){H(q)}})}const X={proxy:{host:B.ip,port:B.port,type:B.type===1?5:4},command:"connect",destination:{host:F,port:E}};if(B.username&&B.password)X.proxy.userId=B.username,X.proxy.password=B.password;return new Promise((M,W)=>{x4.SocksClient.createConnection(X,(H,q)=>{if(H)W(H);else{if(!q)W(new Error("No socket info received!"));if(u!=="")q?.socket.write(J.encode(`${u} ${D}\r\n`));else q?.socket.write(J.encode(`${D}\r\n`));q?.socket.on("data",(A)=>{M(C.decode(A))}),q?.socket.resume()}})})}async function k3(D,u=!1,F=null){let E,$=43,B="",C,J="utf-8";if(!F)E=S4(D),C=null;else E=F.tld?F.tld:S4(D),J=F.encoding?F.encoding:"utf-8",C=F.proxy?F.proxy:null,B=F.server?F.server:"",$=F.serverPort?F.serverPort:43;if(B===""){let W=NK(E);if(!W){if(Wu.debug(`No WhoIs server found for TLD: ${E}! Attempting IANA WhoIs database for server!`),W=await LK(E),!W)return Wu.debug("WhoIs server could not be found!"),{_raw:"",parsedData:null};Wu.debug(`WhoIs sever found for ${E}: ${B}`)}B=W}const M=IK(B)||"";try{Wu.debug(`Attempting WHOIS lookup for ${D} on server ${B}`);const W=await SK(D,M,B,$,J,C);if(Wu.debug("Raw WHOIS data received:",W),!u){const q=y8.parseData(W,null);return{_raw:W,parsedData:q}}let H=null;if(F?.parseData)H=y3(F.parseData);try{const q=y8.parseData(W,H);return{_raw:W,parsedData:q}}catch(q){return console.error("Error in parsing WhoIs data!",q),{_raw:W,parsedData:null}}}catch(W){return Wu.debug(`Error in WHOIS lookup for ${D} on server ${B}`,W),{_raw:"",parsedData:null}}}function zq(D,u=null){return Wu.debug(`Lookup called for ${D}`),k3(D,!0,u)}async function Uq(D,u=!1,F=1,E=!1,$=null){let B=[];if(u){if(F>D.length)F=D.length;for(let C=0;C<D.length;C+=F){const J=D.slice(C,C+F);B=await Promise.all(J.map(async(X)=>{return await k3(X,E,$)}))}}else for(let C=0;C<D.length;C++){const J=await k3(D[C],E,$);B.push(J)}return B}class y8{static iterParse(D,u){let F="",E=null,$="";for(let B=0;B<D.length;B++){const C=D[B];if(C==="\n"||$===":"&&C===" "){if(F.trim()in u)E=F.trim();else if(E!==null){const J=F.trim();if(J!==""){const X=u[E];if(Array.isArray(X))X.push(J);else u[E]=J;E=null}}F=""}else if(C!==":")F=F+C;if($=C,F==="Record maintained by"||F===">>>")break}return u}static parseData(D,u){if(!u)u={"Domain Name":"","Creation Date":"","Updated Date":"","Registry Expiry Date":"","Domain Status":[],Registrar:""};return u=y8.iterParse(D,u),u}}var export_SocksClient=xK.SocksClient;export{k3 as whois,SK as tcpWhois,zq as lookup,NK as getWhoIsServer,S4 as getTLD,IK as getParameters,LK as findWhoIsServer,Uq as batchWhois,y8 as WhoIsParser,export_SocksClient as SocksClient,R3 as SERVERS,I4 as ProxyType,N4 as PARAMETERS,L4 as IANA_CHK_URL};
|
|
162
|
+
|
|
163
|
+
//# debugId=9E1C8239726D93FF64756E2164756E21
|
|
5
164
|
//# sourceMappingURL=index.js.map
|