@stacksjs/whois 0.70.22 → 0.70.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,208 +1,7 @@
1
1
  // @bun
2
- var $5=Object.create;var{getPrototypeOf:E5,defineProperty:A8,getOwnPropertyNames:w5}=Object;var B5=Object.prototype.hasOwnProperty;var t=(D,u,F)=>{F=D!=null?$5(E5(D)):{};let C=u||!D||!D.__esModule?A8(F,"default",{value:D,enumerable:!0}):F;for(let $ of w5(D))if(!B5.call(C,$))A8(C,$,{get:()=>D[$],enumerable:!0});return C};var I=(D,u)=>()=>(u||D((u={exports:{}}).exports,u),u.exports);var M5=(D,u)=>{for(var F in u)A8(D,F,{get:u[F],enumerable:!0,configurable:!0,set:(C)=>u[F]=()=>C})};var J5=(D,u)=>()=>(D&&(u=D(D=0)),u);var FD=import.meta.require;var ED=I((E1,T8)=>{Object.defineProperty(E1,"__esModule",{value:!0});E1.default=O5;function V8(D){return V8=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},V8(D)}function O5(D){var u=typeof D==="string"||D instanceof String;if(!u){var F=V8(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))}}T8.exports=E1.default;T8.exports.default=E1.default});var B1=I((w1,h8)=>{Object.defineProperty(w1,"__esModule",{value:!0});w1.default=L8;var T5=L5(ED());function L5(D){return D&&D.__esModule?D:{default:D}}var m3="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",ju="(".concat(m3,"[.]){3}").concat(m3),h5=new RegExp("^".concat(ju,"$")),JD="(?:[0-9a-fA-F]{1,4})",I5=new RegExp("^("+"(?:".concat(JD,":){7}(?:").concat(JD,"|:)|")+"(?:".concat(JD,":){6}(?:").concat(ju,"|:").concat(JD,"|:)|")+"(?:".concat(JD,":){5}(?::").concat(ju,"|(:").concat(JD,"){1,2}|:)|")+"(?:".concat(JD,":){4}(?:(:").concat(JD,"){0,1}:").concat(ju,"|(:").concat(JD,"){1,3}|:)|")+"(?:".concat(JD,":){3}(?:(:").concat(JD,"){0,2}:").concat(ju,"|(:").concat(JD,"){1,4}|:)|")+"(?:".concat(JD,":){2}(?:(:").concat(JD,"){0,3}:").concat(ju,"|(:").concat(JD,"){1,5}|:)|")+"(?:".concat(JD,":){1}(?:(:").concat(JD,"){0,4}:").concat(ju,"|(:").concat(JD,"){1,6}|:)|")+"(?::((?::".concat(JD,"){0,5}:").concat(ju,"|(?::").concat(JD,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function L8(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(T5.default(D),u=String(u),!u)return L8(D,4)||L8(D,6);if(u==="4")return h5.test(D);if(u==="6")return I5.test(D);return!1}h8.exports=w1.default;h8.exports.default=w1.default});var Ru=I((M1,I8)=>{Object.defineProperty(M1,"__esModule",{value:!0});M1.default=g5;function g5(){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}I8.exports=M1.default;I8.exports.default=M1.default});var _3=I((J1,N8)=>{Object.defineProperty(J1,"__esModule",{value:!0});J1.default=_5;var j5=S3(ED()),R5=S3(Ru());function S3(D){return D&&D.__esModule?D:{default:D}}var k5=/[^A-Z0-9+\/=]/i,m5=/^[A-Z0-9_\-]*$/i,S5={urlSafe:!1};function _5(D,u){j5.default(D),u=R5.default(u,S5);var F=D.length;if(u.urlSafe)return m5.test(D);if(F%4!==0||k5.test(D))return!1;var C=D.indexOf("=");return C===-1||C===F-1||C===F-2&&D[F-1]==="="}N8.exports=J1.default;N8.exports.default=J1.default});var c3=I((Y1,g8)=>{Object.defineProperty(Y1,"__esModule",{value:!0});Y1.default=n5;var c5=b3(ED()),v5=b3(_3());function b3(D){return D&&D.__esModule?D:{default:D}}function n5(D){c5.default(D);var u=D.split("."),F=u.length;if(F!==3)return!1;return u.reduce(function(C,$){return C&&v5.default($,{urlSafe:!0})},!0)}g8.exports=Y1.default;g8.exports.default=Y1.default});var j8=I((q1,P8)=>{Object.defineProperty(q1,"__esModule",{value:!0});q1.default=r5;var f5=v3(ED()),i5=v3(Ru());function v3(D){return D&&D.__esModule?D:{default:D}}var d5={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function r5(D,u){if(f5.default(D),u=i5.default(u,d5),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("."),C=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(C))return!1;if(/\s/.test(C))return!1}if(!u.allow_numeric_tld&&/^\d+$/.test(C))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})}P8.exports=q1.default;P8.exports.default=q1.default});var i3=I((K1,R8)=>{Object.defineProperty(K1,"__esModule",{value:!0});K1.default=Ew;var p5=Z1(ED()),a5=Z1(j8()),n3=Z1(B1()),t5=Z1(Ru());function Z1(D){return D&&D.__esModule?D:{default:D}}function o5(D,u){return uw(D)||Dw(D,u)||e5(D,u)||s5()}function s5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e5(D,u){if(!D)return;if(typeof D==="string")return x3(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 x3(D,u)}function x3(D,u){if(u==null||u>D.length)u=D.length;for(var F=0,C=new Array(u);F<u;F++)C[F]=D[F];return C}function Dw(D,u){var F=D==null?null:typeof Symbol!="undefined"&&D[Symbol.iterator]||D["@@iterator"];if(F!=null){var C,$,w,E,J=[],q=!0,W=!1;try{if(w=(F=F.call(D)).next,u===0){if(Object(F)!==F)return;q=!1}else for(;!(q=(C=w.call(F)).done)&&(J.push(C.value),J.length!==u);q=!0);}catch(Z){W=!0,$=Z}finally{try{if(!q&&F.return!=null&&(E=F.return(),Object(E)!==E))return}finally{if(W)throw $}}return J}}function uw(D){if(Array.isArray(D))return D}var Fw={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},Cw=/^\[([^\]]+)\](?::([0-9]+))?$/;function $w(D){return Object.prototype.toString.call(D)==="[object RegExp]"}function f3(D,u){for(var F=0;F<u.length;F++){var C=u[F];if(D===C||$w(C)&&C.test(D))return!0}return!1}function Ew(D,u){if(p5.default(D),!D||/[\s<>]/.test(D))return!1;if(D.indexOf("mailto:")===0)return!1;if(u=t5.default(u,Fw),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,C,$,w,E,J,q,W;if(q=D.split("#"),D=q.shift(),q=D.split("?"),D=q.shift(),q=D.split("://"),q.length>1){if(F=q.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;q[0]=D.slice(2)}if(D=q.join("://"),D==="")return!1;if(q=D.split("/"),D=q.shift(),D===""&&!u.require_host)return!0;if(q=D.split("@"),q.length>1){if(u.disallow_auth)return!1;if(q[0]==="")return!1;if(C=q.shift(),C.indexOf(":")>=0&&C.split(":").length>2)return!1;var Z=C.split(":"),y=o5(Z,2),G=y[0],z=y[1];if(G===""&&z==="")return!1}w=q.join("@"),J=null,W=null;var X=w.match(Cw);if(X)$="",W=X[1],J=X[2]||null;else if(q=w.split(":"),$=q.shift(),q.length)J=q.join(":");if(J!==null&&J.length>0){if(E=parseInt(J,10),!/^[0-9]+$/.test(J)||E<=0||E>65535)return!1}else if(u.require_port)return!1;if(u.host_whitelist)return f3($,u.host_whitelist);if($===""&&!u.require_host)return!0;if(!n3.default($)&&!a5.default($,u)&&(!W||!n3.default(W,6)))return!1;if($=$||W,u.host_blacklist&&f3($,u.host_blacklist))return!1;return!0}R8.exports=K1.default;R8.exports.default=K1.default});var d3=I((X1,k8)=>{Object.defineProperty(X1,"__esModule",{value:!0});X1.default=Yw;var Bw=Mw(ED());function Mw(D){return D&&D.__esModule?D:{default:D}}var Jw=/^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;function Yw(D){return Bw.default(D),Jw.test(D)}k8.exports=X1.default;k8.exports.default=X1.default});var p3=I((r3)=>{Object.defineProperty(r3,"__esModule",{value:!0});r3.default=Ww;r3.locales=void 0;var Zw=Kw(ED());function Kw(D){return D&&D.__esModule?D:{default:D}}var z1={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}$/};function Xw(D){var u=D.filter(function(F){return!(F in z1)});if(u.length>0)return!1;return!0}function zw(D,u){var F=D.replace(/[\s\-]+/gi,"").toUpperCase(),C=F.slice(0,2).toUpperCase(),$=C in z1;if(u.whitelist){if(!Xw(u.whitelist))return!1;var w=u.whitelist.includes(C);if(!w)return!1}if(u.blacklist){var E=u.blacklist.includes(C);if(E)return!1}return $&&z1[C].test(F)}function yw(D){var u=D.replace(/[^A-Z0-9]+/gi,"").toUpperCase(),F=u.slice(4)+u.slice(0,4),C=F.replace(/[A-Z]/g,function(w){return w.charCodeAt(0)-55}),$=C.match(/\d{1,7}/g).reduce(function(w,E){return Number(w+E)%97},"");return $===1}function Ww(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Zw.default(D),zw(D,u)&&yw(D)}var MG=r3.locales=Object.keys(z1)});var a3=I((y1,m8)=>{Object.defineProperty(y1,"__esModule",{value:!0});y1.default=Uw;var Aw=Qw(ED());function Qw(D){return D&&D.__esModule?D:{default:D}}var Hw={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};function Uw(D,u){Aw.default(D);var F=Hw[![void 0,null].includes(u)?u:"all"];return!!F&&F.test(D)}m8.exports=y1.default;m8.exports.default=y1.default});var t3=I((W1,S8)=>{Object.defineProperty(W1,"__esModule",{value:!0});W1.default=hw;var Vw=Tw(ED());function Tw(D){return D&&D.__esModule?D:{default:D}}var Lw=/^[\x00-\x7F]+$/;function hw(D){return Vw.default(D),Lw.test(D)}S8.exports=W1.default;S8.exports.default=W1.default});var o3=I((G1,b8)=>{Object.defineProperty(G1,"__esModule",{value:!0});G1.default=Pw;var Nw=gw(ED());function gw(D){return D&&D.__esModule?D:{default:D}}function _8(D){return _8=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},_8(D)}function Pw(D,u){Nw.default(D);var F,C;if(_8(u)==="object")F=u.min||0,C=u.max;else F=arguments[1],C=arguments[2];var $=encodeURI(D).split(/%..|./).length-1;return $>=F&&(typeof C==="undefined"||$<=C)}b8.exports=G1.default;b8.exports.default=G1.default});var e3=I((A1,v8)=>{Object.defineProperty(A1,"__esModule",{value:!0});A1.default=dw;var Rw=T0(ED()),c8=T0(o3()),kw=T0(j8()),s3=T0(B1()),mw=T0(Ru());function T0(D){return D&&D.__esModule?D:{default:D}}var Sw={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:[]},_w=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,bw=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,cw=/^[a-z\d]+$/,vw=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,nw=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,xw=/^([\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,fw=254;function iw(D){var u=D.replace(/^"(.+)"$/,"$1");if(!u.trim())return!1;var F=/[\.";<>]/.test(u);if(F){if(u===D)return!1;var C=u.split('"').length===u.split("\\\"").length;if(!C)return!1}return!0}function dw(D,u){if(Rw.default(D),u=mw.default(u,Sw),u.require_display_name||u.allow_display_name){var F=D.match(_w);if(F){var C=F[1];if(D=D.replace(C,"").replace(/(^<|>$)/g,""),C.endsWith(" "))C=C.slice(0,-1);if(!iw(C))return!1}else if(u.require_display_name)return!1}if(!u.ignore_max_length&&D.length>fw)return!1;var $=D.split("@"),w=$.pop(),E=w.toLowerCase();if(u.host_blacklist.includes(E))return!1;if(u.host_whitelist.length>0&&!u.host_whitelist.includes(E))return!1;var J=$.join("@");if(u.domain_specific_validation&&(E==="gmail.com"||E==="googlemail.com")){J=J.toLowerCase();var q=J.split("+")[0];if(!c8.default(q.replace(/\./g,""),{min:6,max:30}))return!1;var W=q.split(".");for(var Z=0;Z<W.length;Z++)if(!cw.test(W[Z]))return!1}if(u.ignore_max_length===!1&&(!c8.default(J,{max:64})||!c8.default(w,{max:254})))return!1;if(!kw.default(w,{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(!s3.default(w)){if(!w.startsWith("[")||!w.endsWith("]"))return!1;var y=w.slice(1,-1);if(y.length===0||!s3.default(y))return!1}}if(J[0]==='"')return J=J.slice(1,J.length-1),u.allow_utf8_local_part?xw.test(J):vw.test(J);var G=u.allow_utf8_local_part?nw:bw,z=J.split(".");for(var X=0;X<z.length;X++)if(!G.test(z[X]))return!1;if(u.blacklisted_chars){if(J.search(new RegExp("[".concat(u.blacklisted_chars,"]+"),"g"))!==-1)return!1}return!0}v8.exports=A1.default;v8.exports.default=A1.default});var Q1=I((wF)=>{Object.defineProperty(wF,"__esModule",{value:!0});wF.farsiLocales=wF.englishLocales=wF.dotDecimal=wF.decimal=wF.commaDecimal=wF.bengaliLocales=wF.arabicLocales=wF.alphanumeric=wF.alpha=void 0;var fD=wF.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]+$/},iD=wF.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=wF.decimal={"en-US":".",ar:"\u066B"},DF=wF.englishLocales=["AU","GB","HK","IN","NZ","ZA","ZM"];for(L0=0;L0<DF.length;L0++)u0="en-".concat(DF[L0]),fD[u0]=fD["en-US"],iD[u0]=iD["en-US"],jD[u0]=jD["en-US"];var u0,L0,uF=wF.arabicLocales=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"];for(h0=0;h0<uF.length;h0++)F0="ar-".concat(uF[h0]),fD[F0]=fD.ar,iD[F0]=iD.ar,jD[F0]=jD.ar;var F0,h0,FF=wF.farsiLocales=["IR","AF"];for(N0=0;N0<FF.length;N0++)I0="fa-".concat(FF[N0]),iD[I0]=iD.fa,jD[I0]=jD.ar;var I0,N0,CF=wF.bengaliLocales=["BD","IN"];for(g0=0;g0<CF.length;g0++)C0="bn-".concat(CF[g0]),fD[C0]=fD.bn,iD[C0]=iD.bn,jD[C0]=jD["en-US"];var C0,g0,$F=wF.dotDecimal=["ar-EG","ar-LB","ar-LY"],EF=wF.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(P0=0;P0<$F.length;P0++)jD[$F[P0]]=jD["en-US"];var P0;for(j0=0;j0<EF.length;j0++)jD[EF[j0]]=",";var j0;fD["fr-CA"]=fD["fr-FR"];iD["fr-CA"]=iD["fr-FR"];fD["pt-BR"]=fD["pt-PT"];iD["pt-BR"]=iD["pt-PT"];jD["pt-BR"]=jD["pt-PT"];fD["pl-Pl"]=fD["pl-PL"];iD["pl-Pl"]=iD["pl-PL"];jD["pl-Pl"]=jD["pl-PL"];fD["fa-AF"]=fD.fa});var YF=I((MF)=>{Object.defineProperty(MF,"__esModule",{value:!0});MF.default=CB;MF.locales=void 0;var uB=FB(ED()),n8=Q1();function FB(D){return D&&D.__esModule?D:{default:D}}function CB(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};uB.default(D);var C=D,$=F.ignore;if($)if($ instanceof RegExp)C=C.replace($,"");else if(typeof $==="string")C=C.replace(new RegExp("[".concat($.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(u in n8.alpha)return n8.alpha[u].test(C);throw new Error("Invalid locale '".concat(u,"'"))}var qG=MF.locales=Object.keys(n8.alpha)});var ZF=I((H1,x8)=>{Object.defineProperty(H1,"__esModule",{value:!0});H1.default=ZB;var EB=qF(ED()),wB=qF(Ru());function qF(D){return D&&D.__esModule?D:{default:D}}var BB=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,MB=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/,JB=/^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i,YB=/^\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,qB={checkDMS:!1};function ZB(D,u){if(EB.default(D),u=wB.default(u,qB),!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 JB.test(F[0])&&YB.test(F[1]);return BB.test(F[0])&&MB.test(F[1])}x8.exports=H1.default;x8.exports.default=H1.default});var XF=I((U1,f8)=>{Object.defineProperty(U1,"__esModule",{value:!0});U1.default=void 0;var XB=function D(u,F){return u.some(function(C){return F===C})},KG=U1.default=XB;f8.exports=U1.default;f8.exports.default=U1.default});var yF=I((O1,d8)=>{Object.defineProperty(O1,"__esModule",{value:!0});O1.default=HB;var zB=i8(Ru()),yB=i8(ED()),WB=i8(XF()),zF=Q1();function i8(D){return D&&D.__esModule?D:{default:D}}function GB(D){var u=new RegExp("^[-+]?([0-9]+)?(\\".concat(zF.decimal[D.locale],"[0-9]{").concat(D.decimal_digits,"})").concat(D.force_decimal?"":"?","$"));return u}var AB={force_decimal:!1,decimal_digits:"1,",locale:"en-US"},QB=["","-","+"];function HB(D,u){if(yB.default(D),u=zB.default(u,AB),u.locale in zF.decimal)return!WB.default(QB,D.replace(/ /g,""))&&GB(u).test(D);throw new Error("Invalid locale '".concat(u.locale,"'"))}d8.exports=O1.default;d8.exports.default=O1.default});var WF=I((V1,r8)=>{Object.defineProperty(V1,"__esModule",{value:!0});V1.default=LB;var OB=VB(ED());function VB(D){return D&&D.__esModule?D:{default:D}}var TB=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;function LB(D){return OB.default(D),TB.test(D)}r8.exports=V1.default;r8.exports.default=V1.default});var GF=I((T1,l8)=>{Object.defineProperty(T1,"__esModule",{value:!0});T1.default=gB;var IB=NB(ED());function NB(D){return D&&D.__esModule?D:{default:D}}function gB(D){IB.default(D);var u=D.replace(/[- ]+/g,""),F=0,C,$,w;for(var E=u.length-1;E>=0;E--){if(C=u.substring(E,E+1),$=parseInt(C,10),w)if($*=2,$>=10)F+=$%10+1;else F+=$;else F+=$;w=!w}return!!(F%10===0?u:!1)}l8.exports=T1.default;l8.exports.default=T1.default});var QF=I((L1,p8)=>{Object.defineProperty(L1,"__esModule",{value:!0});L1.default=mB;var jB=AF(ED()),RB=AF(GF());function AF(D){return D&&D.__esModule?D:{default:D}}var $0={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})?$/},kB=function(){var D=[];for(var u in $0)if($0.hasOwnProperty(u))D.push($0[u]);return D}();function mB(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};jB.default(D);var F=u.provider,C=D.replace(/[- ]+/g,"");if(F&&F.toLowerCase()in $0){if(!$0[F.toLowerCase()].test(C))return!1}else if(F&&!(F.toLowerCase()in $0))throw new Error("".concat(F," is not a valid credit card provider."));else if(!kB.some(function($){return $.test(C)}))return!1;return RB.default(D)}p8.exports=L1.default;p8.exports.default=L1.default});var OF=I((HF)=>{Object.defineProperty(HF,"__esModule",{value:!0});HF.default=cB;HF.locales=void 0;var _B=bB(ED()),a8=Q1();function bB(D){return D&&D.__esModule?D:{default:D}}function cB(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};_B.default(D);var C=D,$=F.ignore;if($)if($ instanceof RegExp)C=C.replace($,"");else if(typeof $==="string")C=C.replace(new RegExp("[".concat($.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(u in a8.alphanumeric)return a8.alphanumeric[u].test(C);throw new Error("Invalid locale '".concat(u,"'"))}var XG=HF.locales=Object.keys(a8.alphanumeric)});var TF=I((h1,t8)=>{Object.defineProperty(h1,"__esModule",{value:!0});h1.default=fB;var nB=xB(ED());function xB(D){return D&&D.__esModule?D:{default:D}}var VF={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}$/};function fB(D,u){nB.default(D);var F=D.replace(/\s/g,"").toUpperCase();return u.toUpperCase()in VF&&VF[u].test(F)}t8.exports=h1.default;t8.exports.default=h1.default});var s8=I((hF)=>{Object.defineProperty(hF,"__esModule",{value:!0});hF.default=lB;hF.locales=void 0;var dB=rB(ED());function rB(D){return D&&D.__esModule?D:{default:D}}var LF=/^\d{3}$/,aD=/^\d{4}$/,RD=/^\d{5}$/,o8=/^\d{6}$/,E0={AD:/^AD\d{3}$/,AT:aD,AU:aD,AZ:/^AZ\d{4}$/,BA:/^([7-8]\d{4}$)/,BE:aD,BG:aD,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:aD,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:aD,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:aD,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:LF,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:aD,LV:/^LV\-\d{4}$/,LK:RD,MG:LF,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:aD,NP:/^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,NZ:aD,PL:/^\d{2}\-\d{3}$/,PR:/^00[679]\d{2}([ -]\d{4})?$/,PT:/^\d{4}\-\d{3}?$/,RO:o8,RU:o8,SA:RD,SE:/^[1-9]\d{2}\s?\d{2}$/,SG:o8,SI:aD,SK:/^\d{3}\s?\d{2}$/,TH:RD,TN:aD,TW:/^\d{3}(\d{2})?$/,UA:RD,US:/^\d{5}(-\d{4})?$/,ZA:aD,ZM:RD},yG=hF.locales=Object.keys(E0);function lB(D,u){if(dB.default(D),u in E0)return E0[u].test(D);else if(u==="any"){for(var F in E0)if(E0.hasOwnProperty(F)){var C=E0[F];if(C.test(D))return!0}return!1}throw new Error("Invalid locale '".concat(u,"'"))}});var e8=I((NF)=>{Object.defineProperty(NF,"__esModule",{value:!0});NF.default=oB;NF.locales=void 0;var aB=tB(ED());function tB(D){return D&&D.__esModule?D:{default:D}}var 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"];function oB(D,u,F){if(aB.default(D),F&&F.strictMode&&!D.startsWith("+"))return!1;if(Array.isArray(u))return u.some(function(w){if(CD.hasOwnProperty(w)){var E=CD[w];if(E.test(D))return!0}return!1});else if(u in CD)return CD[u].test(D);else if(!u||u==="any"){for(var C in CD)if(CD.hasOwnProperty(C)){var $=CD[C];if($.test(D))return!0}return!1}throw new Error("Invalid locale '".concat(u,"'"))}var GG=NF.locales=Object.keys(CD)});var E2=I((C2,$2)=>{(function(D,u){typeof C2=="object"&&typeof $2!="undefined"?$2.exports=u():typeof define=="function"&&define.amd?define(u):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs=u()})(C2,function(){var D=1000,u=60000,F=3600000,C="millisecond",$="second",w="minute",E="hour",J="day",q="week",W="month",Z="quarter",y="year",G="date",z="Invalid Date",X=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|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,b={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 O=["th","st","nd","rd"],Q=k%100;return"["+k+(O[(Q-20)%10]||O[Q]||O[0])+"]"}},v=function(k,O,Q){var h=String(k);return!h||h.length>=O?k:""+Array(O+1-h.length).join(Q)+k},r={s:v,z:function(k){var O=-k.utcOffset(),Q=Math.abs(O),h=Math.floor(Q/60),H=Q%60;return(O<=0?"+":"-")+v(h,2,"0")+":"+v(H,2,"0")},m:function k(O,Q){if(O.date()<Q.date())return-k(Q,O);var h=12*(Q.year()-O.year())+(Q.month()-O.month()),H=O.clone().add(h,W),N=Q-H<0,S=O.clone().add(h+(N?-1:1),W);return+(-(h+(Q-H)/(N?H-S:S-H))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:W,y,w:q,d:J,D:G,h:E,m:w,s:$,ms:C,Q:Z}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},i="en",BD={};BD[i]=b;var gD="$isDayjsObject",ZD=function(k){return k instanceof x||!(!k||!k[gD])},KD=function k(O,Q,h){var H;if(!O)return i;if(typeof O=="string"){var N=O.toLowerCase();BD[N]&&(H=N),Q&&(BD[N]=Q,H=N);var S=O.split("-");if(!H&&S.length>1)return k(S[0])}else{var _=O.name;BD[_]=O,H=_}return!h&&H&&(i=H),H||!h&&i},a=function(k,O){if(ZD(k))return k.clone();var Q=typeof O=="object"?O:{};return Q.date=k,Q.args=arguments,new x(Q)},T=r;T.l=KD,T.i=ZD,T.w=function(k,O){return a(k,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var x=function(){function k(Q){this.$L=KD(Q.locale,null,!0),this.parse(Q),this.$x=this.$x||Q.x||{},this[gD]=!0}var O=k.prototype;return O.parse=function(Q){this.$d=function(h){var{date:H,utc:N}=h;if(H===null)return new Date(NaN);if(T.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var S=H.match(X);if(S){var _=S[2]-1||0,l=(S[7]||"0").substring(0,3);return N?new Date(Date.UTC(S[1],_,S[3]||1,S[4]||0,S[5]||0,S[6]||0,l)):new Date(S[1],_,S[3]||1,S[4]||0,S[5]||0,S[6]||0,l)}}return new Date(H)}(Q),this.init()},O.init=function(){var Q=this.$d;this.$y=Q.getFullYear(),this.$M=Q.getMonth(),this.$D=Q.getDate(),this.$W=Q.getDay(),this.$H=Q.getHours(),this.$m=Q.getMinutes(),this.$s=Q.getSeconds(),this.$ms=Q.getMilliseconds()},O.$utils=function(){return T},O.isValid=function(){return this.$d.toString()!==z},O.isSame=function(Q,h){var H=a(Q);return this.startOf(h)<=H&&H<=this.endOf(h)},O.isAfter=function(Q,h){return a(Q)<this.startOf(h)},O.isBefore=function(Q,h){return this.endOf(h)<a(Q)},O.$g=function(Q,h,H){return T.u(Q)?this[h]:this.set(H,Q)},O.unix=function(){return Math.floor(this.valueOf()/1000)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(Q,h){var H=this,N=!!T.u(h)||h,S=T.p(Q),_=function(XD,qD){var xD=T.w(H.$u?Date.UTC(H.$y,qD,XD):new Date(H.$y,qD,XD),H);return N?xD:xD.endOf(J)},l=function(XD,qD){return T.w(H.toDate()[XD].apply(H.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(qD)),H)},DD=this.$W,MD=this.$M,LD=this.$D,yu="set"+(this.$u?"UTC":"");switch(S){case y:return N?_(1,0):_(31,11);case W:return N?_(1,MD):_(0,MD+1);case q:var $u=this.$locale().weekStart||0,Vu=(DD<$u?DD+7:DD)-$u;return _(N?LD-Vu:LD+(6-Vu),MD);case J:case G:return l(yu+"Hours",0);case E:return l(yu+"Minutes",1);case w:return l(yu+"Seconds",2);case $:return l(yu+"Milliseconds",3);default:return this.clone()}},O.endOf=function(Q){return this.startOf(Q,!1)},O.$set=function(Q,h){var H,N=T.p(Q),S="set"+(this.$u?"UTC":""),_=(H={},H[J]=S+"Date",H[G]=S+"Date",H[W]=S+"Month",H[y]=S+"FullYear",H[E]=S+"Hours",H[w]=S+"Minutes",H[$]=S+"Seconds",H[C]=S+"Milliseconds",H)[N],l=N===J?this.$D+(h-this.$W):h;if(N===W||N===y){var DD=this.clone().set(G,1);DD.$d[_](l),DD.init(),this.$d=DD.set(G,Math.min(this.$D,DD.daysInMonth())).$d}else _&&this.$d[_](l);return this.init(),this},O.set=function(Q,h){return this.clone().$set(Q,h)},O.get=function(Q){return this[T.p(Q)]()},O.add=function(Q,h){var H,N=this;Q=Number(Q);var S=T.p(h),_=function(MD){var LD=a(N);return T.w(LD.date(LD.date()+Math.round(MD*Q)),N)};if(S===W)return this.set(W,this.$M+Q);if(S===y)return this.set(y,this.$y+Q);if(S===J)return _(1);if(S===q)return _(7);var l=(H={},H[w]=u,H[E]=F,H[$]=D,H)[S]||1,DD=this.$d.getTime()+Q*l;return T.w(DD,this)},O.subtract=function(Q,h){return this.add(-1*Q,h)},O.format=function(Q){var h=this,H=this.$locale();if(!this.isValid())return H.invalidDate||z;var N=Q||"YYYY-MM-DDTHH:mm:ssZ",S=T.z(this),_=this.$H,l=this.$m,DD=this.$M,MD=H.weekdays,LD=H.months,yu=H.meridiem,$u=function(qD,xD,Eu,Wu){return qD&&(qD[xD]||qD(h,N))||Eu[xD].slice(0,Wu)},Vu=function(qD){return T.s(_%12||12,qD,"0")},XD=yu||function(qD,xD,Eu){var Wu=qD<12?"AM":"PM";return Eu?Wu.toLowerCase():Wu};return N.replace(R,function(qD,xD){return xD||function(Eu){switch(Eu){case"YY":return String(h.$y).slice(-2);case"YYYY":return T.s(h.$y,4,"0");case"M":return DD+1;case"MM":return T.s(DD+1,2,"0");case"MMM":return $u(H.monthsShort,DD,LD,3);case"MMMM":return $u(LD,DD);case"D":return h.$D;case"DD":return T.s(h.$D,2,"0");case"d":return String(h.$W);case"dd":return $u(H.weekdaysMin,h.$W,MD,2);case"ddd":return $u(H.weekdaysShort,h.$W,MD,3);case"dddd":return MD[h.$W];case"H":return String(_);case"HH":return T.s(_,2,"0");case"h":return Vu(1);case"hh":return Vu(2);case"a":return XD(_,l,!0);case"A":return XD(_,l,!1);case"m":return String(l);case"mm":return T.s(l,2,"0");case"s":return String(h.$s);case"ss":return T.s(h.$s,2,"0");case"SSS":return T.s(h.$ms,3,"0");case"Z":return S}return null}(qD)||S.replace(":","")})},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(Q,h,H){var N,S=this,_=T.p(h),l=a(Q),DD=(l.utcOffset()-this.utcOffset())*u,MD=this-l,LD=function(){return T.m(S,l)};switch(_){case y:N=LD()/12;break;case W:N=LD();break;case Z:N=LD()/3;break;case q:N=(MD-DD)/604800000;break;case J:N=(MD-DD)/86400000;break;case E:N=MD/F;break;case w:N=MD/u;break;case $:N=MD/D;break;default:N=MD}return H?N:T.a(N)},O.daysInMonth=function(){return this.endOf(W).$D},O.$locale=function(){return BD[this.$L]},O.locale=function(Q,h){if(!Q)return this.$L;var H=this.clone(),N=KD(Q,h,!0);return N&&(H.$L=N),H},O.clone=function(){return T.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},k}(),n=x.prototype;return a.prototype=n,[["$ms",C],["$s",$],["$m",w],["$H",E],["$W",J],["$M",W],["$y",y],["$D",G]].forEach(function(k){n[k[1]]=function(O){return this.$g(O,k[0],k[1])}}),a.extend=function(k,O){return k.$i||(k(O,x,a),k.$i=!0),a},a.locale=KD,a.isDayjs=ZD,a.unix=function(k){return a(1000*k)},a.en=BD[i],a.Ls=BD,a.p={},a})});var F9=I((w2,B2)=>{(function(D,u){typeof w2=="object"&&typeof B2!="undefined"?B2.exports=u():typeof define=="function"&&define.amd?define(u):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs_plugin_isSameOrAfter=u()})(w2,function(){return function(D,u){u.prototype.isSameOrAfter=function(F,C){return this.isSame(F,C)||this.isAfter(F,C)}}})});var C9=I((M2,J2)=>{(function(D,u){typeof M2=="object"&&typeof J2!="undefined"?J2.exports=u():typeof define=="function"&&define.amd?define(u):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs_plugin_isSameOrBefore=u()})(M2,function(){return function(D,u){u.prototype.isSameOrBefore=function(F,C){return this.isSame(F,C)||this.isBefore(F,C)}}})});var $9=I((Y2,q2)=>{(function(D,u){typeof Y2=="object"&&typeof q2!="undefined"?q2.exports=u():typeof define=="function"&&define.amd?define(u):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs_plugin_customParseFormat=u()})(Y2,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/,C=/\d\d/,$=/\d\d?/,w=/\d*[^-_:/,()\s\d]+/,E={},J=function(X){return(X=+X)+(X>68?1900:2000)},q=function(X){return function(R){this[X]=+R}},W=[/[+-]\d\d:?(\d\d)?|Z/,function(X){(this.zone||(this.zone={})).offset=function(R){if(!R)return 0;if(R==="Z")return 0;var b=R.match(/([+-]|\d\d)/g),v=60*b[1]+(+b[2]||0);return v===0?0:b[0]==="+"?-v:v}(X)}],Z=function(X){var R=E[X];return R&&(R.indexOf?R:R.s.concat(R.f))},y=function(X,R){var b,v=E.meridiem;if(v){for(var r=1;r<=24;r+=1)if(X.indexOf(v(r,0,R))>-1){b=r>12;break}}else b=X===(R?"pm":"PM");return b},G={A:[w,function(X){this.afternoon=y(X,!1)}],a:[w,function(X){this.afternoon=y(X,!0)}],Q:[F,function(X){this.month=3*(X-1)+1}],S:[F,function(X){this.milliseconds=100*+X}],SS:[C,function(X){this.milliseconds=10*+X}],SSS:[/\d{3}/,function(X){this.milliseconds=+X}],s:[$,q("seconds")],ss:[$,q("seconds")],m:[$,q("minutes")],mm:[$,q("minutes")],H:[$,q("hours")],h:[$,q("hours")],HH:[$,q("hours")],hh:[$,q("hours")],D:[$,q("day")],DD:[C,q("day")],Do:[w,function(X){var R=E.ordinal,b=X.match(/\d+/);if(this.day=b[0],R)for(var v=1;v<=31;v+=1)R(v).replace(/\[|\]/g,"")===X&&(this.day=v)}],w:[$,q("week")],ww:[C,q("week")],M:[$,q("month")],MM:[C,q("month")],MMM:[w,function(X){var R=Z("months"),b=(Z("monthsShort")||R.map(function(v){return v.slice(0,3)})).indexOf(X)+1;if(b<1)throw new Error;this.month=b%12||b}],MMMM:[w,function(X){var R=Z("months").indexOf(X)+1;if(R<1)throw new Error;this.month=R%12||R}],Y:[/[+-]?\d+/,q("year")],YY:[C,function(X){this.year=J(X)}],YYYY:[/\d{4}/,q("year")],Z:W,ZZ:W};function z(X){var R,b;R=X,b=E&&E.formats;for(var v=(X=R.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(a,T,x){var n=x&&x.toUpperCase();return T||b[x]||D[x]||b[n].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(k,O,Q){return O||Q.slice(1)})})).match(u),r=v.length,i=0;i<r;i+=1){var BD=v[i],gD=G[BD],ZD=gD&&gD[0],KD=gD&&gD[1];v[i]=KD?{regex:ZD,parser:KD}:BD.replace(/^\[|\]$/g,"")}return function(a){for(var T={},x=0,n=0;x<r;x+=1){var k=v[x];if(typeof k=="string")n+=k.length;else{var{regex:O,parser:Q}=k,h=a.slice(n),H=O.exec(h)[0];Q.call(T,H),a=a.replace(H,"")}}return function(N){var S=N.afternoon;if(S!==void 0){var _=N.hours;S?_<12&&(N.hours+=12):_===12&&(N.hours=0),delete N.afternoon}}(T),T}}return function(X,R,b){b.p.customParseFormat=!0,X&&X.parseTwoDigitYear&&(J=X.parseTwoDigitYear);var v=R.prototype,r=v.parse;v.parse=function(i){var{date:BD,utc:gD,args:ZD}=i;this.$u=gD;var KD=ZD[1];if(typeof KD=="string"){var a=ZD[2]===!0,T=ZD[3]===!0,x=a||T,n=ZD[2];T&&(n=ZD[2]),E=this.$locale(),!a&&n&&(E=b.Ls[n]),this.$d=function(h,H,N,S){try{if(["x","X"].indexOf(H)>-1)return new Date((H==="X"?1000:1)*h);var _=z(H)(h),l=_.year,DD=_.month,MD=_.day,LD=_.hours,yu=_.minutes,$u=_.seconds,Vu=_.milliseconds,XD=_.zone,qD=_.week,xD=new Date,Eu=MD||(l||DD?1:xD.getDate()),Wu=l||xD.getFullYear(),eu=0;l&&!DD||(eu=DD>0?DD-1:xD.getMonth());var D0,G0=LD||0,A0=yu||0,Q0=$u||0,H0=Vu||0;return XD?new Date(Date.UTC(Wu,eu,Eu,G0,A0,Q0,H0+60*XD.offset*1000)):N?new Date(Date.UTC(Wu,eu,Eu,G0,A0,Q0,H0)):(D0=new Date(Wu,eu,Eu,G0,A0,Q0,H0),qD&&(D0=S(D0).week(qD).toDate()),D0)}catch(A3){return new Date("")}}(BD,KD,gD,b),this.init(),n&&n!==!0&&(this.$L=this.locale(n).$L),x&&BD!=this.format(KD)&&(this.$d=new Date("")),E={}}else if(KD instanceof Array)for(var k=KD.length,O=1;O<=k;O+=1){ZD[1]=KD[O-1];var Q=b.apply(this,ZD);if(Q.isValid()){this.$d=Q.$d,this.$L=Q.$L,this.init();break}O===k&&(this.$d=new Date(""))}else r.call(this,i)}}})});var E9=I((N1,X2)=>{Object.defineProperty(N1,"__esModule",{value:!0});N1.default=KM;var qM=ZM(ED());function ZM(D){return D&&D.__esModule?D:{default:D}}function KM(D){return qM.default(D),D.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\//g,"&#x2F;").replace(/\\/g,"&#x5C;").replace(/`/g,"&#96;")}X2.exports=N1.default;X2.exports.default=N1.default});var w9=I((g1,z2)=>{Object.defineProperty(g1,"__esModule",{value:!0});g1.default=OM;var zM=yM(Ru());function yM(D){return D&&D.__esModule?D:{default:D}}var WM={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},GM=["icloud.com","me.com"],AM=["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"],QM=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"],HM=["yandex.ru","yandex.ua","yandex.kz","yandex.com","yandex.by","ya.ru"];function UM(D){if(D.length>1)return D;return""}function OM(D,u){u=zM.default(u,WM);var F=D.split("@"),C=F.pop(),$=F.join("@"),w=[$,C];if(w[1]=w[1].toLowerCase(),w[1]==="gmail.com"||w[1]==="googlemail.com"){if(u.gmail_remove_subaddress)w[0]=w[0].split("+")[0];if(u.gmail_remove_dots)w[0]=w[0].replace(/\.+/g,UM);if(!w[0].length)return!1;if(u.all_lowercase||u.gmail_lowercase)w[0]=w[0].toLowerCase();w[1]=u.gmail_convert_googlemaildotcom?"gmail.com":w[1]}else if(GM.indexOf(w[1])>=0){if(u.icloud_remove_subaddress)w[0]=w[0].split("+")[0];if(!w[0].length)return!1;if(u.all_lowercase||u.icloud_lowercase)w[0]=w[0].toLowerCase()}else if(AM.indexOf(w[1])>=0){if(u.outlookdotcom_remove_subaddress)w[0]=w[0].split("+")[0];if(!w[0].length)return!1;if(u.all_lowercase||u.outlookdotcom_lowercase)w[0]=w[0].toLowerCase()}else if(QM.indexOf(w[1])>=0){if(u.yahoo_remove_subaddress){var E=w[0].split("-");w[0]=E.length>1?E.slice(0,-1).join("-"):E[0]}if(!w[0].length)return!1;if(u.all_lowercase||u.yahoo_lowercase)w[0]=w[0].toLowerCase()}else if(HM.indexOf(w[1])>=0){if(u.all_lowercase||u.yandex_lowercase)w[0]=w[0].toLowerCase();w[1]="yandex.ru"}else if(u.all_lowercase)w[0]=w[0].toLowerCase();return w.join("@")}z2.exports=g1.default;z2.exports.default=g1.default});var WD=I((GJ)=>{GJ.fromCallback=function(D){return Object.defineProperty(function(...u){if(typeof u[u.length-1]==="function")D.apply(this,u);else return new Promise((F,C)=>{u.push(($,w)=>$!=null?C($):F(w)),D.apply(this,u)})},"name",{value:D.name})};GJ.fromPromise=function(D){return Object.defineProperty(function(...u){let F=u[u.length-1];if(typeof F!=="function")return D.apply(this,u);else u.pop(),D.apply(this,u).then((C)=>F(null,C),F)},"name",{value:D.name})}});var DC=I((nA,e6)=>{var ku=FD("node:constants"),HJ=process.cwd,b1=null,UJ=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!b1)b1=HJ.call(process);return b1};try{process.cwd()}catch(D){}if(typeof process.chdir==="function"){if(c1=process.chdir,process.chdir=function(D){b1=null,c1.call(process,D)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,c1)}var c1;e6.exports=OJ;function OJ(D){if(ku.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))u(D);if(!D.lutimes)F(D);if(D.chown=w(D.chown),D.fchown=w(D.fchown),D.lchown=w(D.lchown),D.chmod=C(D.chmod),D.fchmod=C(D.fchmod),D.lchmod=C(D.lchmod),D.chownSync=E(D.chownSync),D.fchownSync=E(D.fchownSync),D.lchownSync=E(D.lchownSync),D.chmodSync=$(D.chmodSync),D.fchmodSync=$(D.fchmodSync),D.lchmodSync=$(D.lchmodSync),D.stat=J(D.stat),D.fstat=J(D.fstat),D.lstat=J(D.lstat),D.statSync=q(D.statSync),D.fstatSync=q(D.fstatSync),D.lstatSync=q(D.lstatSync),D.chmod&&!D.lchmod)D.lchmod=function(Z,y,G){if(G)process.nextTick(G)},D.lchmodSync=function(){};if(D.chown&&!D.lchown)D.lchown=function(Z,y,G,z){if(z)process.nextTick(z)},D.lchownSync=function(){};if(UJ==="win32")D.rename=typeof D.rename!=="function"?D.rename:function(Z){function y(G,z,X){var R=Date.now(),b=0;Z(G,z,function v(r){if(r&&(r.code==="EACCES"||r.code==="EPERM"||r.code==="EBUSY")&&Date.now()-R<60000){if(setTimeout(function(){D.stat(z,function(i,BD){if(i&&i.code==="ENOENT")Z(G,z,v);else X(r)})},b),b<100)b+=10;return}if(X)X(r)})}if(Object.setPrototypeOf)Object.setPrototypeOf(y,Z);return y}(D.rename);D.read=typeof D.read!=="function"?D.read:function(Z){function y(G,z,X,R,b,v){var r;if(v&&typeof v==="function"){var i=0;r=function(BD,gD,ZD){if(BD&&BD.code==="EAGAIN"&&i<10)return i++,Z.call(D,G,z,X,R,b,r);v.apply(this,arguments)}}return Z.call(D,G,z,X,R,b,r)}if(Object.setPrototypeOf)Object.setPrototypeOf(y,Z);return y}(D.read),D.readSync=typeof D.readSync!=="function"?D.readSync:function(Z){return function(y,G,z,X,R){var b=0;while(!0)try{return Z.call(D,y,G,z,X,R)}catch(v){if(v.code==="EAGAIN"&&b<10){b++;continue}throw v}}}(D.readSync);function u(Z){Z.lchmod=function(y,G,z){Z.open(y,ku.O_WRONLY|ku.O_SYMLINK,G,function(X,R){if(X){if(z)z(X);return}Z.fchmod(R,G,function(b){Z.close(R,function(v){if(z)z(b||v)})})})},Z.lchmodSync=function(y,G){var z=Z.openSync(y,ku.O_WRONLY|ku.O_SYMLINK,G),X=!0,R;try{R=Z.fchmodSync(z,G),X=!1}finally{if(X)try{Z.closeSync(z)}catch(b){}else Z.closeSync(z)}return R}}function F(Z){if(ku.hasOwnProperty("O_SYMLINK")&&Z.futimes)Z.lutimes=function(y,G,z,X){Z.open(y,ku.O_SYMLINK,function(R,b){if(R){if(X)X(R);return}Z.futimes(b,G,z,function(v){Z.close(b,function(r){if(X)X(v||r)})})})},Z.lutimesSync=function(y,G,z){var X=Z.openSync(y,ku.O_SYMLINK),R,b=!0;try{R=Z.futimesSync(X,G,z),b=!1}finally{if(b)try{Z.closeSync(X)}catch(v){}else Z.closeSync(X)}return R};else if(Z.futimes)Z.lutimes=function(y,G,z,X){if(X)process.nextTick(X)},Z.lutimesSync=function(){}}function C(Z){if(!Z)return Z;return function(y,G,z){return Z.call(D,y,G,function(X){if(W(X))X=null;if(z)z.apply(this,arguments)})}}function $(Z){if(!Z)return Z;return function(y,G){try{return Z.call(D,y,G)}catch(z){if(!W(z))throw z}}}function w(Z){if(!Z)return Z;return function(y,G,z,X){return Z.call(D,y,G,z,function(R){if(W(R))R=null;if(X)X.apply(this,arguments)})}}function E(Z){if(!Z)return Z;return function(y,G,z){try{return Z.call(D,y,G,z)}catch(X){if(!W(X))throw X}}}function J(Z){if(!Z)return Z;return function(y,G,z){if(typeof G==="function")z=G,G=null;function X(R,b){if(b){if(b.uid<0)b.uid+=4294967296;if(b.gid<0)b.gid+=4294967296}if(z)z.apply(this,arguments)}return G?Z.call(D,y,G,X):Z.call(D,y,X)}}function q(Z){if(!Z)return Z;return function(y,G){var z=G?Z.call(D,y,G):Z.call(D,y);if(z){if(z.uid<0)z.uid+=4294967296;if(z.gid<0)z.gid+=4294967296}return z}}function W(Z){if(!Z)return!0;if(Z.code==="ENOSYS")return!0;var y=!process.getuid||process.getuid()!==0;if(y){if(Z.code==="EINVAL"||Z.code==="EPERM")return!0}return!1}}});var CC=I((xA,FC)=>{var uC=FD("node:stream").Stream;FC.exports=VJ;function VJ(D){return{ReadStream:u,WriteStream:F};function u(C,$){if(!(this instanceof u))return new u(C,$);uC.call(this);var w=this;this.path=C,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,$=$||{};var E=Object.keys($);for(var J=0,q=E.length;J<q;J++){var W=E[J];this[W]=$[W]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!=="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){w._read()});return}D.open(this.path,this.flags,this.mode,function(Z,y){if(Z){w.emit("error",Z),w.readable=!1;return}w.fd=y,w.emit("open",y),w._read()})}function F(C,$){if(!(this instanceof F))return new F(C,$);uC.call(this),this.path=C,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,$=$||{};var w=Object.keys($);for(var E=0,J=w.length;E<J;E++){var q=w[E];this[q]=$[q]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=D.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var EC=I((fA,$C)=>{$C.exports=LJ;var TJ=Object.getPrototypeOf||function(D){return D.__proto__};function LJ(D){if(D===null||typeof D!=="object")return D;if(D instanceof Object)var u={__proto__:TJ(D)};else var u=Object.create(null);return Object.getOwnPropertyNames(D).forEach(function(F){Object.defineProperty(u,F,Object.getOwnPropertyDescriptor(D,F))}),u}});var J0=I((iA,V2)=>{var wD=FD("node:fs"),hJ=DC(),IJ=CC(),NJ=EC(),v1=FD("node:util"),VD,x1;if(typeof Symbol==="function"&&typeof Symbol.for==="function")VD=Symbol.for("graceful-fs.queue"),x1=Symbol.for("graceful-fs.previous");else VD="___graceful-fs.queue",x1="___graceful-fs.previous";function gJ(){}function BC(D,u){Object.defineProperty(D,VD,{get:function(){return u}})}var du=gJ;if(v1.debuglog)du=v1.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))du=function(){var D=v1.format.apply(v1,arguments);D="GFS4: "+D.split(/\n/).join(`
4
- GFS4: `),console.error(D)};if(!wD[VD]){if(H2=global[VD]||[],BC(wD,H2),wD.close=function(D){function u(F,C){return D.call(wD,F,function($){if(!$)wC();if(typeof C==="function")C.apply(this,arguments)})}return Object.defineProperty(u,x1,{value:D}),u}(wD.close),wD.closeSync=function(D){function u(F){D.apply(wD,arguments),wC()}return Object.defineProperty(u,x1,{value:D}),u}(wD.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){du(wD[VD]),FD("node:assert").equal(wD[VD].length,0)})}var H2;if(!global[VD])BC(global,wD[VD]);V2.exports=U2(NJ(wD));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!wD.__patched)V2.exports=U2(wD),wD.__patched=!0;function U2(D){hJ(D),D.gracefulify=U2,D.createReadStream=gD,D.createWriteStream=ZD;var u=D.readFile;D.readFile=F;function F(T,x,n){if(typeof x==="function")n=x,x=null;return k(T,x,n);function k(O,Q,h,H){return u(O,Q,function(N){if(N&&(N.code==="EMFILE"||N.code==="ENFILE"))M0([k,[O,Q,h],N,H||Date.now(),Date.now()]);else if(typeof h==="function")h.apply(this,arguments)})}}var C=D.writeFile;D.writeFile=$;function $(T,x,n,k){if(typeof n==="function")k=n,n=null;return O(T,x,n,k);function O(Q,h,H,N,S){return C(Q,h,H,function(_){if(_&&(_.code==="EMFILE"||_.code==="ENFILE"))M0([O,[Q,h,H,N],_,S||Date.now(),Date.now()]);else if(typeof N==="function")N.apply(this,arguments)})}}var w=D.appendFile;if(w)D.appendFile=E;function E(T,x,n,k){if(typeof n==="function")k=n,n=null;return O(T,x,n,k);function O(Q,h,H,N,S){return w(Q,h,H,function(_){if(_&&(_.code==="EMFILE"||_.code==="ENFILE"))M0([O,[Q,h,H,N],_,S||Date.now(),Date.now()]);else if(typeof N==="function")N.apply(this,arguments)})}}var J=D.copyFile;if(J)D.copyFile=q;function q(T,x,n,k){if(typeof n==="function")k=n,n=0;return O(T,x,n,k);function O(Q,h,H,N,S){return J(Q,h,H,function(_){if(_&&(_.code==="EMFILE"||_.code==="ENFILE"))M0([O,[Q,h,H,N],_,S||Date.now(),Date.now()]);else if(typeof N==="function")N.apply(this,arguments)})}}var W=D.readdir;D.readdir=y;var Z=/^v[0-5]\./;function y(T,x,n){if(typeof x==="function")n=x,x=null;var k=Z.test(process.version)?function Q(h,H,N,S){return W(h,O(h,H,N,S))}:function Q(h,H,N,S){return W(h,H,O(h,H,N,S))};return k(T,x,n);function O(Q,h,H,N){return function(S,_){if(S&&(S.code==="EMFILE"||S.code==="ENFILE"))M0([k,[Q,h,H],S,N||Date.now(),Date.now()]);else{if(_&&_.sort)_.sort();if(typeof H==="function")H.call(this,S,_)}}}}if(process.version.substr(0,4)==="v0.8"){var G=IJ(D);v=G.ReadStream,i=G.WriteStream}var z=D.ReadStream;if(z)v.prototype=Object.create(z.prototype),v.prototype.open=r;var X=D.WriteStream;if(X)i.prototype=Object.create(X.prototype),i.prototype.open=BD;Object.defineProperty(D,"ReadStream",{get:function(){return v},set:function(T){v=T},enumerable:!0,configurable:!0}),Object.defineProperty(D,"WriteStream",{get:function(){return i},set:function(T){i=T},enumerable:!0,configurable:!0});var R=v;Object.defineProperty(D,"FileReadStream",{get:function(){return R},set:function(T){R=T},enumerable:!0,configurable:!0});var b=i;Object.defineProperty(D,"FileWriteStream",{get:function(){return b},set:function(T){b=T},enumerable:!0,configurable:!0});function v(T,x){if(this instanceof v)return z.apply(this,arguments),this;else return v.apply(Object.create(v.prototype),arguments)}function r(){var T=this;a(T.path,T.flags,T.mode,function(x,n){if(x){if(T.autoClose)T.destroy();T.emit("error",x)}else T.fd=n,T.emit("open",n),T.read()})}function i(T,x){if(this instanceof i)return X.apply(this,arguments),this;else return i.apply(Object.create(i.prototype),arguments)}function BD(){var T=this;a(T.path,T.flags,T.mode,function(x,n){if(x)T.destroy(),T.emit("error",x);else T.fd=n,T.emit("open",n)})}function gD(T,x){return new D.ReadStream(T,x)}function ZD(T,x){return new D.WriteStream(T,x)}var KD=D.open;D.open=a;function a(T,x,n,k){if(typeof n==="function")k=n,n=null;return O(T,x,n,k);function O(Q,h,H,N,S){return KD(Q,h,H,function(_,l){if(_&&(_.code==="EMFILE"||_.code==="ENFILE"))M0([O,[Q,h,H,N],_,S||Date.now(),Date.now()]);else if(typeof N==="function")N.apply(this,arguments)})}}return D}function M0(D){du("ENQUEUE",D[0].name,D[1]),wD[VD].push(D),O2()}var n1;function wC(){var D=Date.now();for(var u=0;u<wD[VD].length;++u)if(wD[VD][u].length>2)wD[VD][u][3]=D,wD[VD][u][4]=D;O2()}function O2(){if(clearTimeout(n1),n1=void 0,wD[VD].length===0)return;var D=wD[VD].shift(),u=D[0],F=D[1],C=D[2],$=D[3],w=D[4];if($===void 0)du("RETRY",u.name,F),u.apply(null,F);else if(Date.now()-$>=60000){du("TIMEOUT",u.name,F);var E=F.pop();if(typeof E==="function")E.call(null,C)}else{var J=Date.now()-w,q=Math.max(w-$,1),W=Math.min(q*1.2,100);if(J>=W)du("RETRY",u.name,F),u.apply(null,F.concat([$]));else wD[VD].push(D)}if(n1===void 0)n1=setTimeout(O2,0)}});var mD=I((T2)=>{var MC=WD().fromCallback,kD=J0(),PJ=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter((D)=>{return typeof kD[D]==="function"});Object.assign(T2,kD);PJ.forEach((D)=>{T2[D]=MC(kD[D])});T2.exists=function(D,u){if(typeof u==="function")return kD.exists(D,u);return new Promise((F)=>{return kD.exists(D,F)})};T2.read=function(D,u,F,C,$,w){if(typeof w==="function")return kD.read(D,u,F,C,$,w);return new Promise((E,J)=>{kD.read(D,u,F,C,$,(q,W,Z)=>{if(q)return J(q);E({bytesRead:W,buffer:Z})})})};T2.write=function(D,u,...F){if(typeof F[F.length-1]==="function")return kD.write(D,u,...F);return new Promise((C,$)=>{kD.write(D,u,...F,(w,E,J)=>{if(w)return $(w);C({bytesWritten:E,buffer:J})})})};T2.readv=function(D,u,...F){if(typeof F[F.length-1]==="function")return kD.readv(D,u,...F);return new Promise((C,$)=>{kD.readv(D,u,...F,(w,E,J)=>{if(w)return $(w);C({bytesRead:E,buffers:J})})})};T2.writev=function(D,u,...F){if(typeof F[F.length-1]==="function")return kD.writev(D,u,...F);return new Promise((C,$)=>{kD.writev(D,u,...F,(w,E,J)=>{if(w)return $(w);C({bytesWritten:E,buffers:J})})})};if(typeof kD.realpath.native==="function")T2.realpath.native=MC(kD.realpath.native);else process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var YC=I((bJ,JC)=>{var _J=FD("node:path");bJ.checkPath=function D(u){if(process.platform==="win32"){if(/[<>:"|?*]/.test(u.replace(_J.parse(u).root,""))){let C=new Error(`Path contains invalid characters: ${u}`);throw C.code="EINVAL",C}}}});var XC=I((vJ,L2)=>{var qC=mD(),{checkPath:ZC}=YC(),KC=(D)=>{let u={mode:511};if(typeof D==="number")return D;return{...u,...D}.mode};vJ.makeDir=async(D,u)=>{return ZC(D),qC.mkdir(D,{mode:KC(u),recursive:!0})};vJ.makeDirSync=(D,u)=>{return ZC(D),qC.mkdirSync(D,{mode:KC(u),recursive:!0})}});var Yu=I((lA,zC)=>{var fJ=WD().fromPromise,{makeDir:iJ,makeDirSync:h2}=XC(),I2=fJ(iJ);zC.exports={mkdirs:I2,mkdirsSync:h2,mkdirp:I2,mkdirpSync:h2,ensureDir:I2,ensureDirSync:h2}});var mu=I((pA,WC)=>{var dJ=WD().fromPromise,yC=mD();function rJ(D){return yC.access(D).then(()=>!0).catch(()=>!1)}WC.exports={pathExists:dJ(rJ),pathExistsSync:yC.existsSync}});var N2=I((aA,GC)=>{var Y0=mD(),lJ=WD().fromPromise;async function pJ(D,u,F){let C=await Y0.open(D,"r+"),$=null;try{await Y0.futimes(C,u,F)}finally{try{await Y0.close(C)}catch(w){$=w}}if($)throw $}function aJ(D,u,F){let C=Y0.openSync(D,"r+");return Y0.futimesSync(C,u,F),Y0.closeSync(C)}GC.exports={utimesMillis:lJ(pJ),utimesMillisSync:aJ}});var ru=I((tA,UC)=>{var q0=mD(),GD=FD("node:path"),AC=WD().fromPromise;function tJ(D,u,F){let C=F.dereference?($)=>q0.stat($,{bigint:!0}):($)=>q0.lstat($,{bigint:!0});return Promise.all([C(D),C(u).catch(($)=>{if($.code==="ENOENT")return null;throw $})]).then(([$,w])=>({srcStat:$,destStat:w}))}function oJ(D,u,F){let C,$=F.dereference?(E)=>q0.statSync(E,{bigint:!0}):(E)=>q0.lstatSync(E,{bigint:!0}),w=$(D);try{C=$(u)}catch(E){if(E.code==="ENOENT")return{srcStat:w,destStat:null};throw E}return{srcStat:w,destStat:C}}async function sJ(D,u,F,C){let{srcStat:$,destStat:w}=await tJ(D,u,C);if(w){if(c0($,w)){let E=GD.basename(D),J=GD.basename(u);if(F==="move"&&E!==J&&E.toLowerCase()===J.toLowerCase())return{srcStat:$,destStat:w,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if($.isDirectory()&&!w.isDirectory())throw new Error(`Cannot overwrite non-directory '${u}' with directory '${D}'.`);if(!$.isDirectory()&&w.isDirectory())throw new Error(`Cannot overwrite directory '${u}' with non-directory '${D}'.`)}if($.isDirectory()&&g2(D,u))throw new Error(f1(D,u,F));return{srcStat:$,destStat:w}}function eJ(D,u,F,C){let{srcStat:$,destStat:w}=oJ(D,u,C);if(w){if(c0($,w)){let E=GD.basename(D),J=GD.basename(u);if(F==="move"&&E!==J&&E.toLowerCase()===J.toLowerCase())return{srcStat:$,destStat:w,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if($.isDirectory()&&!w.isDirectory())throw new Error(`Cannot overwrite non-directory '${u}' with directory '${D}'.`);if(!$.isDirectory()&&w.isDirectory())throw new Error(`Cannot overwrite directory '${u}' with non-directory '${D}'.`)}if($.isDirectory()&&g2(D,u))throw new Error(f1(D,u,F));return{srcStat:$,destStat:w}}async function QC(D,u,F,C){let $=GD.resolve(GD.dirname(D)),w=GD.resolve(GD.dirname(F));if(w===$||w===GD.parse(w).root)return;let E;try{E=await q0.stat(w,{bigint:!0})}catch(J){if(J.code==="ENOENT")return;throw J}if(c0(u,E))throw new Error(f1(D,F,C));return QC(D,u,w,C)}function HC(D,u,F,C){let $=GD.resolve(GD.dirname(D)),w=GD.resolve(GD.dirname(F));if(w===$||w===GD.parse(w).root)return;let E;try{E=q0.statSync(w,{bigint:!0})}catch(J){if(J.code==="ENOENT")return;throw J}if(c0(u,E))throw new Error(f1(D,F,C));return HC(D,u,w,C)}function c0(D,u){return u.ino&&u.dev&&u.ino===D.ino&&u.dev===D.dev}function g2(D,u){let F=GD.resolve(D).split(GD.sep).filter(($)=>$),C=GD.resolve(u).split(GD.sep).filter(($)=>$);return F.every(($,w)=>C[w]===$)}function f1(D,u,F){return`Cannot ${F} '${D}' to a subdirectory of itself, '${u}'.`}UC.exports={checkPaths:AC(sJ),checkPathsSync:eJ,checkParentPaths:AC(QC),checkParentPathsSync:HC,isSrcSubdir:g2,areIdentical:c0}});var hC=I((oA,LC)=>{var ID=mD(),v0=FD("node:path"),{mkdirs:DY}=Yu(),{pathExists:uY}=mu(),{utimesMillis:FY}=N2(),n0=ru();async function CY(D,u,F={}){if(typeof F==="function")F={filter:F};if(F.clobber="clobber"in F?!!F.clobber:!0,F.overwrite="overwrite"in F?!!F.overwrite:F.clobber,F.preserveTimestamps&&process.arch==="ia32")process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
5
-
6
- see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:C,destStat:$}=await n0.checkPaths(D,u,"copy",F);if(await n0.checkParentPaths(D,C,u,"copy"),!await VC(D,u,F))return;let E=v0.dirname(u);if(!await uY(E))await DY(E);await TC($,D,u,F)}async function VC(D,u,F){if(!F.filter)return!0;return F.filter(D,u)}async function TC(D,u,F,C){let w=await(C.dereference?ID.stat:ID.lstat)(u);if(w.isDirectory())return BY(w,D,u,F,C);if(w.isFile()||w.isCharacterDevice()||w.isBlockDevice())return $Y(w,D,u,F,C);if(w.isSymbolicLink())return MY(D,u,F,C);if(w.isSocket())throw new Error(`Cannot copy a socket file: ${u}`);if(w.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${u}`);throw new Error(`Unknown file: ${u}`)}async function $Y(D,u,F,C,$){if(!u)return OC(D,F,C,$);if($.overwrite)return await ID.unlink(C),OC(D,F,C,$);if($.errorOnExist)throw new Error(`'${C}' already exists`)}async function OC(D,u,F,C){if(await ID.copyFile(u,F),C.preserveTimestamps){if(EY(D.mode))await wY(F,D.mode);let $=await ID.stat(u);await FY(F,$.atime,$.mtime)}return ID.chmod(F,D.mode)}function EY(D){return(D&128)===0}function wY(D,u){return ID.chmod(D,u|128)}async function BY(D,u,F,C,$){if(!u)await ID.mkdir(C);let w=[];for await(let E of await ID.opendir(F)){let J=v0.join(F,E.name),q=v0.join(C,E.name);w.push(VC(J,q,$).then((W)=>{if(W)return n0.checkPaths(J,q,"copy",$).then(({destStat:Z})=>{return TC(Z,J,q,$)})}))}if(await Promise.all(w),!u)await ID.chmod(C,D.mode)}async function MY(D,u,F,C){let $=await ID.readlink(u);if(C.dereference)$=v0.resolve(process.cwd(),$);if(!D)return ID.symlink($,F);let w=null;try{w=await ID.readlink(F)}catch(E){if(E.code==="EINVAL"||E.code==="UNKNOWN")return ID.symlink($,F);throw E}if(C.dereference)w=v0.resolve(process.cwd(),w);if(n0.isSrcSubdir($,w))throw new Error(`Cannot copy '${$}' to a subdirectory of itself, '${w}'.`);if(n0.isSrcSubdir(w,$))throw new Error(`Cannot overwrite '${w}' with '${$}'.`);return await ID.unlink(F),ID.symlink($,F)}LC.exports=CY});var jC=I((sA,PC)=>{var SD=J0(),x0=FD("node:path"),JY=Yu().mkdirsSync,YY=N2().utimesMillisSync,f0=ru();function qY(D,u,F){if(typeof F==="function")F={filter:F};if(F=F||{},F.clobber="clobber"in F?!!F.clobber:!0,F.overwrite="overwrite"in F?!!F.overwrite:F.clobber,F.preserveTimestamps&&process.arch==="ia32")process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
7
-
8
- see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:C,destStat:$}=f0.checkPathsSync(D,u,"copy",F);if(f0.checkParentPathsSync(D,C,u,"copy"),F.filter&&!F.filter(D,u))return;let w=x0.dirname(u);if(!SD.existsSync(w))JY(w);return IC($,D,u,F)}function IC(D,u,F,C){let w=(C.dereference?SD.statSync:SD.lstatSync)(u);if(w.isDirectory())return GY(w,D,u,F,C);else if(w.isFile()||w.isCharacterDevice()||w.isBlockDevice())return ZY(w,D,u,F,C);else if(w.isSymbolicLink())return HY(D,u,F,C);else if(w.isSocket())throw new Error(`Cannot copy a socket file: ${u}`);else if(w.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${u}`);throw new Error(`Unknown file: ${u}`)}function ZY(D,u,F,C,$){if(!u)return NC(D,F,C,$);return KY(D,F,C,$)}function KY(D,u,F,C){if(C.overwrite)return SD.unlinkSync(F),NC(D,u,F,C);else if(C.errorOnExist)throw new Error(`'${F}' already exists`)}function NC(D,u,F,C){if(SD.copyFileSync(u,F),C.preserveTimestamps)XY(D.mode,u,F);return P2(F,D.mode)}function XY(D,u,F){if(zY(D))yY(F,D);return WY(u,F)}function zY(D){return(D&128)===0}function yY(D,u){return P2(D,u|128)}function P2(D,u){return SD.chmodSync(D,u)}function WY(D,u){let F=SD.statSync(D);return YY(u,F.atime,F.mtime)}function GY(D,u,F,C,$){if(!u)return AY(D.mode,F,C,$);return gC(F,C,$)}function AY(D,u,F,C){return SD.mkdirSync(F),gC(u,F,C),P2(F,D)}function gC(D,u,F){let C=SD.opendirSync(D);try{let $;while(($=C.readSync())!==null)QY($.name,D,u,F)}finally{C.closeSync()}}function QY(D,u,F,C){let $=x0.join(u,D),w=x0.join(F,D);if(C.filter&&!C.filter($,w))return;let{destStat:E}=f0.checkPathsSync($,w,"copy",C);return IC(E,$,w,C)}function HY(D,u,F,C){let $=SD.readlinkSync(u);if(C.dereference)$=x0.resolve(process.cwd(),$);if(!D)return SD.symlinkSync($,F);else{let w;try{w=SD.readlinkSync(F)}catch(E){if(E.code==="EINVAL"||E.code==="UNKNOWN")return SD.symlinkSync($,F);throw E}if(C.dereference)w=x0.resolve(process.cwd(),w);if(f0.isSrcSubdir($,w))throw new Error(`Cannot copy '${$}' to a subdirectory of itself, '${w}'.`);if(f0.isSrcSubdir(w,$))throw new Error(`Cannot overwrite '${w}' with '${$}'.`);return UY($,F)}}function UY(D,u){return SD.unlinkSync(u),SD.symlinkSync(D,u)}PC.exports=qY});var i1=I((eA,RC)=>{var OY=WD().fromPromise;RC.exports={copy:OY(hC()),copySync:jC()}});var i0=I((DQ,mC)=>{var kC=J0(),VY=WD().fromCallback;function TY(D,u){kC.rm(D,{recursive:!0,force:!0},u)}function LY(D){kC.rmSync(D,{recursive:!0,force:!0})}mC.exports={remove:VY(TY),removeSync:LY}});var fC=I((uQ,xC)=>{var hY=WD().fromPromise,bC=mD(),cC=FD("node:path"),vC=Yu(),nC=i0(),SC=hY(async function D(u){let F;try{F=await bC.readdir(u)}catch{return vC.mkdirs(u)}return Promise.all(F.map((C)=>nC.remove(cC.join(u,C))))});function _C(D){let u;try{u=bC.readdirSync(D)}catch{return vC.mkdirsSync(D)}u.forEach((F)=>{F=cC.join(D,F),nC.removeSync(F)})}xC.exports={emptyDirSync:_C,emptydirSync:_C,emptyDir:SC,emptydir:SC}});var lC=I((FQ,rC)=>{var IY=WD().fromPromise,iC=FD("node:path"),Iu=mD(),dC=Yu();async function NY(D){let u;try{u=await Iu.stat(D)}catch{}if(u&&u.isFile())return;let F=iC.dirname(D),C=null;try{C=await Iu.stat(F)}catch($){if($.code==="ENOENT"){await dC.mkdirs(F),await Iu.writeFile(D,"");return}else throw $}if(C.isDirectory())await Iu.writeFile(D,"");else await Iu.readdir(F)}function gY(D){let u;try{u=Iu.statSync(D)}catch{}if(u&&u.isFile())return;let F=iC.dirname(D);try{if(!Iu.statSync(F).isDirectory())Iu.readdirSync(F)}catch(C){if(C&&C.code==="ENOENT")dC.mkdirsSync(F);else throw C}Iu.writeFileSync(D,"")}rC.exports={createFile:IY(NY),createFileSync:gY}});var sC=I((CQ,oC)=>{var PY=WD().fromPromise,pC=FD("node:path"),Su=mD(),aC=Yu(),{pathExists:jY}=mu(),{areIdentical:tC}=ru();async function RY(D,u){let F;try{F=await Su.lstat(u)}catch{}let C;try{C=await Su.lstat(D)}catch(E){throw E.message=E.message.replace("lstat","ensureLink"),E}if(F&&tC(C,F))return;let $=pC.dirname(u);if(!await jY($))await aC.mkdirs($);await Su.link(D,u)}function kY(D,u){let F;try{F=Su.lstatSync(u)}catch{}try{let w=Su.lstatSync(D);if(F&&tC(w,F))return}catch(w){throw w.message=w.message.replace("lstat","ensureLink"),w}let C=pC.dirname(u);if(Su.existsSync(C))return Su.linkSync(D,u);return aC.mkdirsSync(C),Su.linkSync(D,u)}oC.exports={createLink:PY(RY),createLinkSync:kY}});var D4=I(($Q,eC)=>{var _u=FD("node:path"),d0=mD(),{pathExists:mY}=mu(),SY=WD().fromPromise;async function _Y(D,u){if(_u.isAbsolute(D)){try{await d0.lstat(D)}catch(w){throw w.message=w.message.replace("lstat","ensureSymlink"),w}return{toCwd:D,toDst:D}}let F=_u.dirname(u),C=_u.join(F,D);if(await mY(C))return{toCwd:C,toDst:D};try{await d0.lstat(D)}catch(w){throw w.message=w.message.replace("lstat","ensureSymlink"),w}return{toCwd:D,toDst:_u.relative(F,D)}}function bY(D,u){if(_u.isAbsolute(D)){if(!d0.existsSync(D))throw new Error("absolute srcpath does not exist");return{toCwd:D,toDst:D}}let F=_u.dirname(u),C=_u.join(F,D);if(d0.existsSync(C))return{toCwd:C,toDst:D};if(!d0.existsSync(D))throw new Error("relative srcpath does not exist");return{toCwd:D,toDst:_u.relative(F,D)}}eC.exports={symlinkPaths:SY(_Y),symlinkPathsSync:bY}});var C4=I((EQ,F4)=>{var u4=mD(),cY=WD().fromPromise;async function vY(D,u){if(u)return u;let F;try{F=await u4.lstat(D)}catch{return"file"}return F&&F.isDirectory()?"dir":"file"}function nY(D,u){if(u)return u;let F;try{F=u4.lstatSync(D)}catch{return"file"}return F&&F.isDirectory()?"dir":"file"}F4.exports={symlinkType:cY(vY),symlinkTypeSync:nY}});var B4=I((wQ,w4)=>{var xY=WD().fromPromise,$4=FD("node:path"),Au=mD(),{mkdirs:fY,mkdirsSync:iY}=Yu(),{symlinkPaths:dY,symlinkPathsSync:rY}=D4(),{symlinkType:lY,symlinkTypeSync:pY}=C4(),{pathExists:aY}=mu(),{areIdentical:E4}=ru();async function tY(D,u,F){let C;try{C=await Au.lstat(u)}catch{}if(C&&C.isSymbolicLink()){let[J,q]=await Promise.all([Au.stat(D),Au.stat(u)]);if(E4(J,q))return}let $=await dY(D,u);D=$.toDst;let w=await lY($.toCwd,F),E=$4.dirname(u);if(!await aY(E))await fY(E);return Au.symlink(D,u,w)}function oY(D,u,F){let C;try{C=Au.lstatSync(u)}catch{}if(C&&C.isSymbolicLink()){let J=Au.statSync(D),q=Au.statSync(u);if(E4(J,q))return}let $=rY(D,u);D=$.toDst,F=pY($.toCwd,F);let w=$4.dirname(u);if(Au.existsSync(w))return Au.symlinkSync(D,u,F);return iY(w),Au.symlinkSync(D,u,F)}w4.exports={createSymlink:xY(tY),createSymlinkSync:oY}});var z4=I((BQ,X4)=>{var{createFile:M4,createFileSync:J4}=lC(),{createLink:Y4,createLinkSync:q4}=sC(),{createSymlink:Z4,createSymlinkSync:K4}=B4();X4.exports={createFile:M4,createFileSync:J4,ensureFile:M4,ensureFileSync:J4,createLink:Y4,createLinkSync:q4,ensureLink:Y4,ensureLinkSync:q4,createSymlink:Z4,createSymlinkSync:K4,ensureSymlink:Z4,ensureSymlinkSync:K4}});var d1=I((MQ,y4)=>{function sY(D,{EOL:u=`
9
- `,finalEOL:F=!0,replacer:C=null,spaces:$}={}){let w=F?u:"";return JSON.stringify(D,C,$).replace(/\n/g,u)+w}function eY(D){if(Buffer.isBuffer(D))D=D.toString("utf8");return D.replace(/^\uFEFF/,"")}y4.exports={stringify:sY,stripBom:eY}});var Q4=I((JQ,A4)=>{var Z0;try{Z0=J0()}catch(D){Z0=FD("node:fs")}var r1=WD(),{stringify:W4,stripBom:G4}=d1();async function Dq(D,u={}){if(typeof u==="string")u={encoding:u};let F=u.fs||Z0,C="throws"in u?u.throws:!0,$=await r1.fromCallback(F.readFile)(D,u);$=G4($);let w;try{w=JSON.parse($,u?u.reviver:null)}catch(E){if(C)throw E.message=`${D}: ${E.message}`,E;else return null}return w}var uq=r1.fromPromise(Dq);function Fq(D,u={}){if(typeof u==="string")u={encoding:u};let F=u.fs||Z0,C="throws"in u?u.throws:!0;try{let $=F.readFileSync(D,u);return $=G4($),JSON.parse($,u.reviver)}catch($){if(C)throw $.message=`${D}: ${$.message}`,$;else return null}}async function Cq(D,u,F={}){let C=F.fs||Z0,$=W4(u,F);await r1.fromCallback(C.writeFile)(D,$,F)}var $q=r1.fromPromise(Cq);function Eq(D,u,F={}){let C=F.fs||Z0,$=W4(u,F);return C.writeFileSync(D,$,F)}var wq={readFile:uq,readFileSync:Fq,writeFile:$q,writeFileSync:Eq};A4.exports=wq});var U4=I((YQ,H4)=>{var l1=Q4();H4.exports={readJson:l1.readFile,readJsonSync:l1.readFileSync,writeJson:l1.writeFile,writeJsonSync:l1.writeFileSync}});var p1=I((qQ,T4)=>{var Bq=WD().fromPromise,j2=mD(),O4=FD("node:path"),V4=Yu(),Mq=mu().pathExists;async function Jq(D,u,F="utf-8"){let C=O4.dirname(D);if(!await Mq(C))await V4.mkdirs(C);return j2.writeFile(D,u,F)}function Yq(D,...u){let F=O4.dirname(D);if(!j2.existsSync(F))V4.mkdirsSync(F);j2.writeFileSync(D,...u)}T4.exports={outputFile:Bq(Jq),outputFileSync:Yq}});var h4=I((ZQ,L4)=>{var{stringify:qq}=d1(),{outputFile:Zq}=p1();async function Kq(D,u,F={}){let C=qq(u,F);await Zq(D,C,F)}L4.exports=Kq});var N4=I((KQ,I4)=>{var{stringify:Xq}=d1(),{outputFileSync:zq}=p1();function yq(D,u,F){let C=Xq(u,F);zq(D,C,F)}I4.exports=yq});var P4=I((XQ,g4)=>{var Wq=WD().fromPromise,_D=U4();_D.outputJson=Wq(h4());_D.outputJsonSync=N4();_D.outputJSON=_D.outputJson;_D.outputJSONSync=_D.outputJsonSync;_D.writeJSON=_D.writeJson;_D.writeJSONSync=_D.writeJsonSync;_D.readJSON=_D.readJson;_D.readJSONSync=_D.readJsonSync;g4.exports=_D});var S4=I((zQ,m4)=>{var Gq=mD(),j4=FD("node:path"),{copy:Aq}=i1(),{remove:k4}=i0(),{mkdirp:Qq}=Yu(),{pathExists:Hq}=mu(),R4=ru();async function Uq(D,u,F={}){let C=F.overwrite||F.clobber||!1,{srcStat:$,isChangingCase:w=!1}=await R4.checkPaths(D,u,"move",F);await R4.checkParentPaths(D,$,u,"move");let E=j4.dirname(u);if(j4.parse(E).root!==E)await Qq(E);return Oq(D,u,C,w)}async function Oq(D,u,F,C){if(!C){if(F)await k4(u);else if(await Hq(u))throw new Error("dest already exists.")}try{await Gq.rename(D,u)}catch($){if($.code!=="EXDEV")throw $;await Vq(D,u,F)}}async function Vq(D,u,F){return await Aq(D,u,{overwrite:F,errorOnExist:!0,preserveTimestamps:!0}),k4(D)}m4.exports=Uq});var n4=I((yQ,v4)=>{var b4=J0(),k2=FD("node:path"),Tq=i1().copySync,c4=i0().removeSync,Lq=Yu().mkdirpSync,_4=ru();function hq(D,u,F){F=F||{};let C=F.overwrite||F.clobber||!1,{srcStat:$,isChangingCase:w=!1}=_4.checkPathsSync(D,u,"move",F);if(_4.checkParentPathsSync(D,$,u,"move"),!Iq(u))Lq(k2.dirname(u));return Nq(D,u,C,w)}function Iq(D){let u=k2.dirname(D);return k2.parse(u).root===u}function Nq(D,u,F,C){if(C)return R2(D,u,F);if(F)return c4(u),R2(D,u,F);if(b4.existsSync(u))throw new Error("dest already exists.");return R2(D,u,F)}function R2(D,u,F){try{b4.renameSync(D,u)}catch(C){if(C.code!=="EXDEV")throw C;return gq(D,u,F)}}function gq(D,u,F){return Tq(D,u,{overwrite:F,errorOnExist:!0,preserveTimestamps:!0}),c4(D)}v4.exports=hq});var f4=I((WQ,x4)=>{var Pq=WD().fromPromise;x4.exports={move:Pq(S4()),moveSync:n4()}});var d4=I((GQ,i4)=>{i4.exports={...mD(),...i1(),...fC(),...z4(),...P4(),...Yu(),...f4(),...p1(),...mu(),...i0()}});var m7={};M5(m7,{prompt:()=>k7,kCancel:()=>R7});import Zu,{stdin as YZ,stdout as qZ}from"node:process";import q7 from"node:readline";import{WriteStream as ZZ}from"node:tty";function KZ(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}function XZ(){if(Z7)return f2;Z7=1;let D="\x1B",u=`${D}[`,F="\x07",C={to(E,J){if(!J)return`${u}${E+1}G`;return`${u}${J+1};${E+1}H`},move(E,J){let q="";if(E<0)q+=`${u}${-E}D`;else if(E>0)q+=`${u}${E}C`;if(J<0)q+=`${u}${-J}A`;else if(J>0)q+=`${u}${J}B`;return q},up:(E=1)=>`${u}${E}A`,down:(E=1)=>`${u}${E}B`,forward:(E=1)=>`${u}${E}C`,backward:(E=1)=>`${u}${E}D`,nextLine:(E=1)=>`${u}E`.repeat(E),prevLine:(E=1)=>`${u}F`.repeat(E),left:`${u}G`,hide:`${u}?25l`,show:`${u}?25h`,save:`${D}7`,restore:`${D}8`},$={up:(E=1)=>`${u}S`.repeat(E),down:(E=1)=>`${u}T`.repeat(E)},w={screen:`${u}2J`,up:(E=1)=>`${u}1J`.repeat(E),down:(E=1)=>`${u}J`.repeat(E),line:`${u}2K`,lineEnd:`${u}K`,lineStart:`${u}1K`,lines(E){let J="";for(let q=0;q<E;q++)J+=this.line+(q<E-1?C.up():"");if(E)J+=C.left;return J}};return f2={cursor:C,scroll:$,erase:w,beep:F},f2}function zZ(){if(K7)return s1.exports;K7=1;let D=process||{},u=D.argv||[],F=D.env||{},C=!(!!F.NO_COLOR||u.includes("--no-color"))&&(!!F.FORCE_COLOR||u.includes("--color")||D.platform==="win32"||(D.stdout||{}).isTTY&&F.TERM!=="dumb"||!!F.CI),$=(J,q,W=J)=>(Z)=>{let y=""+Z,G=y.indexOf(q,J.length);return~G?J+w(y,q,W,G)+q:J+y+q},w=(J,q,W,Z)=>{let y="",G=0;do y+=J.substring(G,Z)+W,G=Z+q.length,Z=J.indexOf(q,G);while(~Z);return y+J.substring(G)},E=(J=C)=>{let q=J?$:()=>String;return{isColorSupported:J,reset:q("\x1B[0m","\x1B[0m"),bold:q("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:q("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:q("\x1B[3m","\x1B[23m"),underline:q("\x1B[4m","\x1B[24m"),inverse:q("\x1B[7m","\x1B[27m"),hidden:q("\x1B[8m","\x1B[28m"),strikethrough:q("\x1B[9m","\x1B[29m"),black:q("\x1B[30m","\x1B[39m"),red:q("\x1B[31m","\x1B[39m"),green:q("\x1B[32m","\x1B[39m"),yellow:q("\x1B[33m","\x1B[39m"),blue:q("\x1B[34m","\x1B[39m"),magenta:q("\x1B[35m","\x1B[39m"),cyan:q("\x1B[36m","\x1B[39m"),white:q("\x1B[37m","\x1B[39m"),gray:q("\x1B[90m","\x1B[39m"),bgBlack:q("\x1B[40m","\x1B[49m"),bgRed:q("\x1B[41m","\x1B[49m"),bgGreen:q("\x1B[42m","\x1B[49m"),bgYellow:q("\x1B[43m","\x1B[49m"),bgBlue:q("\x1B[44m","\x1B[49m"),bgMagenta:q("\x1B[45m","\x1B[49m"),bgCyan:q("\x1B[46m","\x1B[49m"),bgWhite:q("\x1B[47m","\x1B[49m"),blackBright:q("\x1B[90m","\x1B[39m"),redBright:q("\x1B[91m","\x1B[39m"),greenBright:q("\x1B[92m","\x1B[39m"),yellowBright:q("\x1B[93m","\x1B[39m"),blueBright:q("\x1B[94m","\x1B[39m"),magentaBright:q("\x1B[95m","\x1B[39m"),cyanBright:q("\x1B[96m","\x1B[39m"),whiteBright:q("\x1B[97m","\x1B[39m"),bgBlackBright:q("\x1B[100m","\x1B[49m"),bgRedBright:q("\x1B[101m","\x1B[49m"),bgGreenBright:q("\x1B[102m","\x1B[49m"),bgYellowBright:q("\x1B[103m","\x1B[49m"),bgBlueBright:q("\x1B[104m","\x1B[49m"),bgMagentaBright:q("\x1B[105m","\x1B[49m"),bgCyanBright:q("\x1B[106m","\x1B[49m"),bgWhiteBright:q("\x1B[107m","\x1B[49m")}};return s1.exports=E(),s1.exports.createColors=E,s1.exports}function WZ({onlyFirst:D=!1}={}){let u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(u,D?void 0:"g")}function V7(D){if(typeof D!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(GZ,"")}function T7(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}function l0(D,u={}){if(typeof D!="string"||D.length===0||(u={ambiguousIsNarrow:!0,...u},D=V7(D),D.length===0))return 0;D=D.replace(UZ()," ");let F=u.ambiguousIsNarrow?1:2,C=0;for(let $ of D){let w=$.codePointAt(0);if(w<=31||w>=127&&w<=159||w>=768&&w<=879)continue;switch(QZ.eastAsianWidth($)){case"F":case"W":C+=2;break;case"A":C+=F;break;default:C+=1}}return C}function TZ(){let D=new Map;for(let[u,F]of Object.entries($D)){for(let[C,$]of Object.entries(F))$D[C]={open:`\x1B[${$[0]}m`,close:`\x1B[${$[1]}m`},F[C]=$D[C],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=X7(),$D.color.ansi256=z7(),$D.color.ansi16m=y7(),$D.bgColor.ansi=X7(i2),$D.bgColor.ansi256=z7(i2),$D.bgColor.ansi16m=y7(i2),Object.defineProperties($D,{rgbToAnsi256:{value:(u,F,C)=>u===F&&F===C?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(C/255*5),enumerable:!1},hexToRgb:{value:(u)=>{let F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!F)return[0,0,0];let[C]=F;C.length===3&&(C=[...C].map((w)=>w+w).join(""));let $=Number.parseInt(C,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,C,$;if(u>=232)F=((u-232)*10+8)/255,C=F,$=F;else{u-=16;let J=u%36;F=Math.floor(u/36)/5,C=Math.floor(J/6)/5,$=J%6/5}let w=Math.max(F,C,$)*2;if(w===0)return 30;let E=30+(Math.round($)<<2|Math.round(C)<<1|Math.round(F));return w===2&&(E+=60),E},enumerable:!1},rgbToAnsi:{value:(u,F,C)=>$D.ansi256ToAnsi($D.rgbToAnsi256(u,F,C)),enumerable:!1},hexToAnsi:{value:(u)=>$D.ansi256ToAnsi($D.hexToAnsi256(u)),enumerable:!1}}),$D}function A7(D,u,F){return String(D).normalize().replace(/\r\n/g,`
10
- `).split(`
11
- `).map((C)=>PZ(C,u,F)).join(`
12
- `)}function N7(D,u){if(typeof D=="string")return D8.aliases.get(D)===u;for(let F of D)if(F!==void 0&&N7(F,u))return!0;return!1}function RZ(D,u){if(D===u)return;let F=D.split(`
13
- `),C=u.split(`
14
- `),$=[];for(let w=0;w<Math.max(F.length,C.length);w++)F[w]!==C[w]&&$.push(w);return $}function e1(D,u){let F=D;F.isTTY&&F.setRawMode(u)}class p0{constructor(D,u=!0){oD(this,"input"),oD(this,"output"),oD(this,"_abortSignal"),oD(this,"rl"),oD(this,"opts"),oD(this,"_render"),oD(this,"_track",!1),oD(this,"_prevFrame",""),oD(this,"_subscribers",new Map),oD(this,"_cursor",0),oD(this,"state","initial"),oD(this,"error",""),oD(this,"value");let{input:F=YZ,output:C=qZ,render:$,signal:w,...E}=D;this.opts=E,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=$.bind(this),this._track=u,this._abortSignal=w,this.input=F,this.output=C}unsubscribe(){this._subscribers.clear()}setSubscriber(D,u){let F=this._subscribers.get(D)??[];F.push(u),this._subscribers.set(D,F)}on(D,u){this.setSubscriber(D,{cb:u})}once(D,u){this.setSubscriber(D,{cb:u,once:!0})}emit(D,...u){let F=this._subscribers.get(D)??[],C=[];for(let $ of F)$.cb(...u),$.once&&C.push(()=>F.splice(F.indexOf($),1));for(let $ of C)$()}prompt(){return new Promise((D,u)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),D(Q7);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let F=new ZZ(0);F._write=(C,$,w)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),w()},this.input.pipe(F),this.rl=q7.createInterface({input:this.input,output:F,tabSize:2,prompt:"",escapeCodeTimeout:50}),q7.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),e1(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(Ku.cursor.show),this.output.off("resize",this.render),e1(this.input,!1),D(this.value)}),this.once("cancel",()=>{this.output.write(Ku.cursor.show),this.output.off("resize",this.render),e1(this.input,!1),D(Q7)})})}onKeypress(D,u){if(this.state==="error"&&(this.state="active"),u?.name&&(!this._track&&D8.aliases.has(u.name)&&this.emit("cursor",D8.aliases.get(u.name)),D8.actions.has(u.name)&&this.emit("cursor",u.name)),D&&(D.toLowerCase()==="y"||D.toLowerCase()==="n")&&this.emit("confirm",D.toLowerCase()==="y"),D==="\t"&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),D&&this.emit("key",D.toLowerCase()),u?.name==="return"){if(this.opts.validate){let F=this.opts.validate(this.value);F&&(this.error=F instanceof Error?F.message:F,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}N7([D,u?.name,u?.sequence],"cancel")&&(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(`
15
- `),e1(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let D=A7(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
16
- `).length-1;this.output.write(Ku.cursor.move(-999,D*-1))}render(){let D=A7(this._render(this)??"",process.stdout.columns,{hard:!0});if(D!==this._prevFrame){if(this.state==="initial")this.output.write(Ku.cursor.hide);else{let u=RZ(this._prevFrame,D);if(this.restoreCursor(),u&&u?.length===1){let F=u[0];this.output.write(Ku.cursor.move(0,F)),this.output.write(Ku.erase.lines(1));let C=D.split(`
17
- `);this.output.write(C[F]),this._prevFrame=D,this.output.write(Ku.cursor.move(0,C.length-F-1));return}if(u&&u?.length>1){let F=u[0];this.output.write(Ku.cursor.move(0,F)),this.output.write(Ku.erase.down());let C=D.split(`
18
- `).slice(F);this.output.write(C.join(`
19
- `)),this._prevFrame=D;return}this.output.write(Ku.erase.down())}this.output.write(D),this.state==="initial"&&(this.state="active"),this._prevFrame=D}}}function nZ(){return Zu.platform!=="win32"?Zu.env.TERM!=="linux":!!Zu.env.CI||!!Zu.env.WT_SESSION||!!Zu.env.TERMINUS_SUBLIME||Zu.env.ConEmuTask==="{cmd::Cmder}"||Zu.env.TERM_PROGRAM==="Terminus-Sublime"||Zu.env.TERM_PROGRAM==="vscode"||Zu.env.TERM==="xterm-256color"||Zu.env.TERM==="alacritty"||Zu.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}async function k7(D,u={}){let F=(C)=>{if(typeof C!=="symbol"||C.toString()!=="Symbol(clack:cancel)")return C;switch(u.cancel){case"reject":{let $=new Error("Prompt cancelled.");if($.name="ConsolaPromptCancelledError",Error.captureStackTrace)Error.captureStackTrace($,k7);throw $}case"undefined":return;case"null":return null;case"symbol":return R7;default:case"default":return u.default??u.initial}};if(!u.type||u.type==="text")return await aZ({message:D,defaultValue:u.default,placeholder:u.placeholder,initialValue:u.initial}).then(F);if(u.type==="confirm")return await tZ({message:D,initialValue:u.initial}).then(F);if(u.type==="select")return await oZ({message:D,options:u.options.map((C)=>typeof C==="string"?{value:C,label:C}:C),initialValue:u.initial}).then(F);if(u.type==="multiselect")return await sZ({message:D,options:u.options.map((C)=>typeof C==="string"?{value:C,label:C}:C),required:u.required,initialValues:u.initial}).then(F);throw new Error(`Unknown prompt type: ${u.type}`)}var f2,Z7,Ku,s1,K7,yZ,L,GZ,L7,AZ,QZ,HZ=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},UZ,i2=10,X7=(D=0)=>(u)=>`\x1B[${u+D}m`,z7=(D=0)=>(u)=>`\x1B[${38+D};5;${u}m`,y7=(D=0)=>(u,F,C)=>`\x1B[${38+D};2;${u};${F};${C}m`,$D,OZ,VZ,LZ,u8,hZ=39,a2="\x07",h7="[",IZ="]",I7="m",t2,W7=(D)=>`${u8.values().next().value}${h7}${D}${I7}`,G7=(D)=>`${u8.values().next().value}${t2}${D}${a2}`,NZ=(D)=>D.split(" ").map((u)=>l0(u)),d2=(D,u,F)=>{let C=[...u],$=!1,w=!1,E=l0(V7(D[D.length-1]));for(let[J,q]of C.entries()){let W=l0(q);if(E+W<=F?D[D.length-1]+=q:(D.push(q),E=0),u8.has(q)&&($=!0,w=C.slice(J+1).join("").startsWith(t2)),$){w?q===a2&&($=!1,w=!1):q===I7&&($=!1);continue}E+=W,E===F&&J<C.length-1&&(D.push(""),E=0)}!E&&D[D.length-1].length>0&&D.length>1&&(D[D.length-2]+=D.pop())},gZ=(D)=>{let u=D.split(" "),F=u.length;for(;F>0&&!(l0(u[F-1])>0);)F--;return F===u.length?D:u.slice(0,F).join(" ")+u.slice(F).join("")},PZ=(D,u,F={})=>{if(F.trim!==!1&&D.trim()==="")return"";let C="",$,w,E=NZ(D),J=[""];for(let[W,Z]of D.split(" ").entries()){F.trim!==!1&&(J[J.length-1]=J[J.length-1].trimStart());let y=l0(J[J.length-1]);if(W!==0&&(y>=u&&(F.wordWrap===!1||F.trim===!1)&&(J.push(""),y=0),(y>0||F.trim===!1)&&(J[J.length-1]+=" ",y++)),F.hard&&E[W]>u){let G=u-y,z=1+Math.floor((E[W]-G-1)/u);Math.floor((E[W]-1)/u)<z&&J.push(""),d2(J,Z,u);continue}if(y+E[W]>u&&y>0&&E[W]>0){if(F.wordWrap===!1&&y<u){d2(J,Z,u);continue}J.push("")}if(y+E[W]>u&&F.wordWrap===!1){d2(J,Z,u);continue}J[J.length-1]+=Z}F.trim!==!1&&(J=J.map((W)=>gZ(W)));let q=[...J.join(`
20
- `)];for(let[W,Z]of q.entries()){if(C+=Z,u8.has(Z)){let{groups:G}=new RegExp(`(?:\\${h7}(?<code>\\d+)m|\\${t2}(?<uri>.*)${a2})`).exec(q.slice(W).join(""))||{groups:{}};if(G.code!==void 0){let z=Number.parseFloat(G.code);$=z===hZ?void 0:z}else G.uri!==void 0&&(w=G.uri.length===0?void 0:G.uri)}let y=LZ.codes.get(Number($));q[W+1]===`
21
- `?(w&&(C+=G7("")),$&&y&&(C+=W7(y))):Z===`
22
- `&&($&&y&&(C+=W7($)),w&&(C+=G7(w)))}return C},jZ,D8,Q7,kZ,mZ=(D,u,F)=>(u in D)?kZ(D,u,{enumerable:!0,configurable:!0,writable:!0,value:F}):D[u]=F,oD=(D,u,F)=>(mZ(D,typeof u!="symbol"?u+"":u,F),F),g7,SZ,_Z=(D,u,F)=>(u in D)?SZ(D,u,{enumerable:!0,configurable:!0,writable:!0,value:F}):D[u]=F,H7=(D,u,F)=>(_Z(D,typeof u!="symbol"?u+"":u,F),F),bZ,cZ,vZ=(D,u,F)=>(u in D)?cZ(D,u,{enumerable:!0,configurable:!0,writable:!0,value:F}):D[u]=F,U7=(D,u,F)=>(vZ(D,typeof u!="symbol"?u+"":u,F),F),P7,j7,xZ,Xu=(D,u)=>xZ?D:u,fZ,iZ,dZ,rZ,s,K0,r2,l2,lZ,O7,pZ,F8=(D)=>{switch(D){case"initial":case"active":return L.cyan(fZ);case"cancel":return L.red(iZ);case"error":return L.yellow(dZ);case"submit":return L.green(rZ)}},p2=(D)=>{let{cursor:u,options:F,style:C}=D,$=D.maxItems??Number.POSITIVE_INFINITY,w=Math.max(process.stdout.rows-4,0),E=Math.min(w,Math.max($,5)),J=0;u>=J+E-3?J=Math.max(Math.min(u-E+3,F.length-E),0):u<J+2&&(J=Math.max(u-2,0));let q=E<F.length&&J>0,W=E<F.length&&J+E<F.length;return F.slice(J,J+E).map((Z,y,G)=>{let z=y===0&&q,X=y===G.length-1&&W;return z||X?L.dim("..."):C(Z,y+J===u)})},aZ=(D)=>new j7({validate:D.validate,placeholder:D.placeholder,defaultValue:D.defaultValue,initialValue:D.initialValue,render(){let u=`${L.gray(s)}
23
- ${F8(this.state)} ${D.message}
24
- `,F=D.placeholder?L.inverse(D.placeholder[0])+L.dim(D.placeholder.slice(1)):L.inverse(L.hidden("_")),C=this.value?this.valueWithCursor:F;switch(this.state){case"error":return`${u.trim()}
25
- ${L.yellow(s)} ${C}
26
- ${L.yellow(K0)} ${L.yellow(this.error)}
27
- `;case"submit":return`${u}${L.gray(s)} ${L.dim(this.value||D.placeholder)}`;case"cancel":return`${u}${L.gray(s)} ${L.strikethrough(L.dim(this.value??""))}${this.value?.trim()?`
28
- ${L.gray(s)}`:""}`;default:return`${u}${L.cyan(s)} ${C}
29
- ${L.cyan(K0)}
30
- `}}}).prompt(),tZ=(D)=>{let u=D.active??"Yes",F=D.inactive??"No";return new g7({active:u,inactive:F,initialValue:D.initialValue??!0,render(){let C=`${L.gray(s)}
31
- ${F8(this.state)} ${D.message}
32
- `,$=this.value?u:F;switch(this.state){case"submit":return`${C}${L.gray(s)} ${L.dim($)}`;case"cancel":return`${C}${L.gray(s)} ${L.strikethrough(L.dim($))}
33
- ${L.gray(s)}`;default:return`${C}${L.cyan(s)} ${this.value?`${L.green(r2)} ${u}`:`${L.dim(l2)} ${L.dim(u)}`} ${L.dim("/")} ${this.value?`${L.dim(l2)} ${L.dim(F)}`:`${L.green(r2)} ${F}`}
34
- ${L.cyan(K0)}
35
- `}}}).prompt()},oZ=(D)=>{let u=(F,C)=>{let $=F.label??String(F.value);switch(C){case"selected":return`${L.dim($)}`;case"active":return`${L.green(r2)} ${$} ${F.hint?L.dim(`(${F.hint})`):""}`;case"cancelled":return`${L.strikethrough(L.dim($))}`;default:return`${L.dim(l2)} ${L.dim($)}`}};return new P7({options:D.options,initialValue:D.initialValue,render(){let F=`${L.gray(s)}
36
- ${F8(this.state)} ${D.message}
37
- `;switch(this.state){case"submit":return`${F}${L.gray(s)} ${u(this.options[this.cursor],"selected")}`;case"cancel":return`${F}${L.gray(s)} ${u(this.options[this.cursor],"cancelled")}
38
- ${L.gray(s)}`;default:return`${F}${L.cyan(s)} ${p2({cursor:this.cursor,options:this.options,maxItems:D.maxItems,style:(C,$)=>u(C,$?"active":"inactive")}).join(`
39
- ${L.cyan(s)} `)}
40
- ${L.cyan(K0)}
41
- `}}}).prompt()},sZ=(D)=>{let u=(F,C)=>{let $=F.label??String(F.value);return C==="active"?`${L.cyan(lZ)} ${$} ${F.hint?L.dim(`(${F.hint})`):""}`:C==="selected"?`${L.green(O7)} ${L.dim($)}`:C==="cancelled"?`${L.strikethrough(L.dim($))}`:C==="active-selected"?`${L.green(O7)} ${$} ${F.hint?L.dim(`(${F.hint})`):""}`:C==="submitted"?`${L.dim($)}`:`${L.dim(pZ)} ${L.dim($)}`};return new bZ({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.
42
- ${L.reset(L.dim(`Press ${L.gray(L.bgWhite(L.inverse(" space ")))} to select, ${L.gray(L.bgWhite(L.inverse(" enter ")))} to submit`))}`},render(){let F=`${L.gray(s)}
43
- ${F8(this.state)} ${D.message}
44
- `,C=($,w)=>{let E=this.value.includes($.value);return w&&E?u($,"active-selected"):E?u($,"selected"):u($,w?"active":"inactive")};switch(this.state){case"submit":return`${F}${L.gray(s)} ${this.options.filter(({value:$})=>this.value.includes($)).map(($)=>u($,"submitted")).join(L.dim(", "))||L.dim("none")}`;case"cancel":{let $=this.options.filter(({value:w})=>this.value.includes(w)).map((w)=>u(w,"cancelled")).join(L.dim(", "));return`${F}${L.gray(s)} ${$.trim()?`${$}
45
- ${L.gray(s)}`:""}`}case"error":{let $=this.error.split(`
46
- `).map((w,E)=>E===0?`${L.yellow(K0)} ${L.yellow(w)}`:` ${w}`).join(`
47
- `);return`${F+L.yellow(s)} ${p2({options:this.options,cursor:this.cursor,maxItems:D.maxItems,style:C}).join(`
48
- ${L.yellow(s)} `)}
49
- ${$}
50
- `}default:return`${F}${L.cyan(s)} ${p2({options:this.options,cursor:this.cursor,maxItems:D.maxItems,style:C}).join(`
51
- ${L.cyan(s)} `)}
52
- ${L.cyan(K0)}
53
- `}}}).prompt()},R7;var S7=J5(()=>{Ku=XZ(),s1={exports:{}};yZ=zZ(),L=KZ(yZ);GZ=WZ();L7={exports:{}};(function(D){var u={};D.exports=u,u.eastAsianWidth=function(C){var $=C.charCodeAt(0),w=C.length==2?C.charCodeAt(1):0,E=$;return 55296<=$&&$<=56319&&56320<=w&&w<=57343&&($&=1023,w&=1023,E=$<<10|w,E+=65536),E==12288||65281<=E&&E<=65376||65504<=E&&E<=65510?"F":E==8361||65377<=E&&E<=65470||65474<=E&&E<=65479||65482<=E&&E<=65487||65490<=E&&E<=65495||65498<=E&&E<=65500||65512<=E&&E<=65518?"H":4352<=E&&E<=4447||4515<=E&&E<=4519||4602<=E&&E<=4607||9001<=E&&E<=9002||11904<=E&&E<=11929||11931<=E&&E<=12019||12032<=E&&E<=12245||12272<=E&&E<=12283||12289<=E&&E<=12350||12353<=E&&E<=12438||12441<=E&&E<=12543||12549<=E&&E<=12589||12593<=E&&E<=12686||12688<=E&&E<=12730||12736<=E&&E<=12771||12784<=E&&E<=12830||12832<=E&&E<=12871||12880<=E&&E<=13054||13056<=E&&E<=19903||19968<=E&&E<=42124||42128<=E&&E<=42182||43360<=E&&E<=43388||44032<=E&&E<=55203||55216<=E&&E<=55238||55243<=E&&E<=55291||63744<=E&&E<=64255||65040<=E&&E<=65049||65072<=E&&E<=65106||65108<=E&&E<=65126||65128<=E&&E<=65131||110592<=E&&E<=110593||127488<=E&&E<=127490||127504<=E&&E<=127546||127552<=E&&E<=127560||127568<=E&&E<=127569||131072<=E&&E<=194367||177984<=E&&E<=196605||196608<=E&&E<=262141?"W":32<=E&&E<=126||162<=E&&E<=163||165<=E&&E<=166||E==172||E==175||10214<=E&&E<=10221||10629<=E&&E<=10630?"Na":E==161||E==164||167<=E&&E<=168||E==170||173<=E&&E<=174||176<=E&&E<=180||182<=E&&E<=186||188<=E&&E<=191||E==198||E==208||215<=E&&E<=216||222<=E&&E<=225||E==230||232<=E&&E<=234||236<=E&&E<=237||E==240||242<=E&&E<=243||247<=E&&E<=250||E==252||E==254||E==257||E==273||E==275||E==283||294<=E&&E<=295||E==299||305<=E&&E<=307||E==312||319<=E&&E<=322||E==324||328<=E&&E<=331||E==333||338<=E&&E<=339||358<=E&&E<=359||E==363||E==462||E==464||E==466||E==468||E==470||E==472||E==474||E==476||E==593||E==609||E==708||E==711||713<=E&&E<=715||E==717||E==720||728<=E&&E<=731||E==733||E==735||768<=E&&E<=879||913<=E&&E<=929||931<=E&&E<=937||945<=E&&E<=961||963<=E&&E<=969||E==1025||1040<=E&&E<=1103||E==1105||E==8208||8211<=E&&E<=8214||8216<=E&&E<=8217||8220<=E&&E<=8221||8224<=E&&E<=8226||8228<=E&&E<=8231||E==8240||8242<=E&&E<=8243||E==8245||E==8251||E==8254||E==8308||E==8319||8321<=E&&E<=8324||E==8364||E==8451||E==8453||E==8457||E==8467||E==8470||8481<=E&&E<=8482||E==8486||E==8491||8531<=E&&E<=8532||8539<=E&&E<=8542||8544<=E&&E<=8555||8560<=E&&E<=8569||E==8585||8592<=E&&E<=8601||8632<=E&&E<=8633||E==8658||E==8660||E==8679||E==8704||8706<=E&&E<=8707||8711<=E&&E<=8712||E==8715||E==8719||E==8721||E==8725||E==8730||8733<=E&&E<=8736||E==8739||E==8741||8743<=E&&E<=8748||E==8750||8756<=E&&E<=8759||8764<=E&&E<=8765||E==8776||E==8780||E==8786||8800<=E&&E<=8801||8804<=E&&E<=8807||8810<=E&&E<=8811||8814<=E&&E<=8815||8834<=E&&E<=8835||8838<=E&&E<=8839||E==8853||E==8857||E==8869||E==8895||E==8978||9312<=E&&E<=9449||9451<=E&&E<=9547||9552<=E&&E<=9587||9600<=E&&E<=9615||9618<=E&&E<=9621||9632<=E&&E<=9633||9635<=E&&E<=9641||9650<=E&&E<=9651||9654<=E&&E<=9655||9660<=E&&E<=9661||9664<=E&&E<=9665||9670<=E&&E<=9672||E==9675||9678<=E&&E<=9681||9698<=E&&E<=9701||E==9711||9733<=E&&E<=9734||E==9737||9742<=E&&E<=9743||9748<=E&&E<=9749||E==9756||E==9758||E==9792||E==9794||9824<=E&&E<=9825||9827<=E&&E<=9829||9831<=E&&E<=9834||9836<=E&&E<=9837||E==9839||9886<=E&&E<=9887||9918<=E&&E<=9919||9924<=E&&E<=9933||9935<=E&&E<=9953||E==9955||9960<=E&&E<=9983||E==10045||E==10071||10102<=E&&E<=10111||11093<=E&&E<=11097||12872<=E&&E<=12879||57344<=E&&E<=63743||65024<=E&&E<=65039||E==65533||127232<=E&&E<=127242||127248<=E&&E<=127277||127280<=E&&E<=127337||127344<=E&&E<=127386||917760<=E&&E<=917999||983040<=E&&E<=1048573||1048576<=E&&E<=1114109?"A":"N"},u.characterLength=function(C){var $=this.eastAsianWidth(C);return $=="F"||$=="W"||$=="A"?2:1};function F(C){return C.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function(C){for(var $=F(C),w=0,E=0;E<$.length;E++)w=w+this.characterLength($[E]);return w},u.slice=function(C,$,w){textLen=u.length(C),$=$||0,w=w||1,$<0&&($=textLen+$),w<0&&(w=textLen+w);for(var E="",J=0,q=F(C),W=0;W<q.length;W++){var Z=q[W],y=u.length(Z);if(J>=$-(y==2?1:0))if(J+y<=w)E+=Z;else break;J+=y}return E}})(L7);AZ=L7.exports,QZ=T7(AZ),UZ=T7(HZ);$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);OZ=Object.keys($D.color),VZ=Object.keys($D.bgColor);[...OZ];LZ=TZ(),u8=new Set(["\x1B","\x9B"]),t2=`${IZ}8;;`;jZ=["up","down","left","right","space","enter","cancel"],D8={actions:new Set(jZ),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]])};globalThis.process.platform.startsWith("win");Q7=Symbol("clack:cancel");kZ=Object.defineProperty;g7=class g7 extends p0{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(Ku.cursor.move(0,-1)),this.value=u,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};SZ=Object.defineProperty,bZ=class extends p0{constructor(D){super(D,!1),H7(this,"options"),H7(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(){let D=this.value.length===this.options.length;this.value=D?[]:this.options.map((u)=>u.value)}toggleValue(){let D=this.value.includes(this._value);this.value=D?this.value.filter((u)=>u!==this._value):[...this.value,this._value]}},cZ=Object.defineProperty;P7=class P7 extends p0{constructor(D){super(D,!1),U7(this,"options"),U7(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}};j7=class j7 extends p0{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;let D=this.value.slice(0,this.cursor),[u,...F]=this.value.slice(this.cursor);return`${D}${L.inverse(u)}${F.join("")}`}get cursor(){return this._cursor}constructor(D){super(D),this.on("finalize",()=>{this.value||(this.value=D.defaultValue)})}};xZ=nZ(),fZ=Xu("\u276F",">"),iZ=Xu("\u25A0","x"),dZ=Xu("\u25B2","x"),rZ=Xu("\u2714","\u221A"),s=Xu(""),K0=Xu(""),r2=Xu("\u25CF",">"),l2=Xu("\u25CB"," "),lZ=Xu("\u25FB","[\u2022]"),O7=Xu("\u25FC","[+]"),pZ=Xu("\u25FB","[ ]");`${L.gray(s)} `;R7=Symbol.for("cancel")});var p7=I((l7)=>{Object.defineProperty(l7,"__esModule",{value:!0});var i7=FD("node:buffer"),au={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."};l7.ERRORS=au;function cK(D){if(!i7.Buffer.isEncoding(D))throw new Error(au.INVALID_ENCODING)}l7.checkEncoding=cK;function d7(D){return typeof D==="number"&&isFinite(D)&&fK(D)}l7.isFiniteInteger=d7;function r7(D,u){if(typeof D==="number"){if(!d7(D)||D<0)throw new Error(u?au.INVALID_OFFSET:au.INVALID_LENGTH)}else throw new Error(u?au.INVALID_OFFSET_NON_NUMBER:au.INVALID_LENGTH_NON_NUMBER)}function vK(D){r7(D,!1)}l7.checkLengthValue=vK;function nK(D){r7(D,!0)}l7.checkOffsetValue=nK;function xK(D,u){if(D<0||D>u.length)throw new Error(au.INVALID_TARGET_OFFSET)}l7.checkTargetOffset=xK;function fK(D){return typeof D==="number"&&isFinite(D)&&Math.floor(D)===D}function iK(D){if(typeof BigInt==="undefined")throw new Error("Platform does not support JS BigInt type.");if(typeof i7.Buffer.prototype[D]==="undefined")throw new Error(`Platform does not support Buffer.prototype.${D}.`)}l7.bigIntAndBufferInt64Check=iK});var o7=I((t7)=>{Object.defineProperty(t7,"__esModule",{value:!0});var d=p7(),a7=4096,sK="utf8";class D3{constructor(D){if(this.length=0,this._encoding=sK,this._writeOffset=0,this._readOffset=0,D3.isSmartBufferOptions(D)){if(D.encoding)d.checkEncoding(D.encoding),this._encoding=D.encoding;if(D.size)if(d.isFiniteInteger(D.size)&&D.size>0)this._buff=Buffer.allocUnsafe(D.size);else throw new Error(d.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(d.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(a7)}else{if(typeof D!=="undefined")throw new Error(d.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(a7)}}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){let 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 d.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,D)}readBigInt64LE(D){return d.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 d.bigIntAndBufferInt64Check("writeBigInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,D,u)}insertBigInt64BE(D,u){return d.bigIntAndBufferInt64Check("writeBigInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,D,u)}writeBigInt64LE(D,u){return d.bigIntAndBufferInt64Check("writeBigInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,D,u)}insertBigInt64LE(D,u){return d.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 d.bigIntAndBufferInt64Check("readBigUInt64BE"),this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,D)}readBigUInt64LE(D){return d.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 d.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,D,u)}insertBigUInt64BE(D,u){return d.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,D,u)}writeBigUInt64LE(D,u){return d.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,D,u)}insertBigUInt64LE(D,u){return d.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")d.checkLengthValue(D),F=Math.min(D,this.length-this._readOffset);else u=D,F=this.length-this._readOffset;if(typeof u!=="undefined")d.checkEncoding(u);let C=this._buff.slice(this._readOffset,this._readOffset+F).toString(u||this._encoding);return this._readOffset+=F,C}insertString(D,u,F){return d.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")d.checkEncoding(D);let u=this.length;for(let C=this._readOffset;C<this.length;C++)if(this._buff[C]===0){u=C;break}let F=this._buff.slice(this._readOffset,u);return this._readOffset=u+1,F.toString(D||this._encoding)}insertStringNT(D,u,F){return d.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")d.checkLengthValue(D);let u=typeof D==="number"?D:this.length,F=Math.min(this.length,this._readOffset+u),C=this._buff.slice(this._readOffset,F);return this._readOffset=F,C}insertBuffer(D,u){return d.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}let u=this._buff.slice(this._readOffset,D);return this._readOffset=D+1,u}insertBufferNT(D,u){return d.checkOffsetValue(u),this.insertBuffer(D,u),this.insertUInt8(0,u+D.length),this}writeBufferNT(D,u){if(typeof u!=="undefined")d.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){d.checkOffsetValue(D),d.checkTargetOffset(D,this),this._readOffset=D}get writeOffset(){return this._writeOffset}set writeOffset(D){d.checkOffsetValue(D),d.checkTargetOffset(D,this),this._writeOffset=D}get encoding(){return this._encoding}set encoding(D){d.checkEncoding(D),this._encoding=D}get internalBuffer(){return this._buff}toBuffer(){return this._buff.slice(0,this.length)}toString(D){let u=typeof D==="string"?D:this._encoding;return d.checkEncoding(u),this._buff.toString(u,0,this.length)}destroy(){return this.clear(),this}_handleString(D,u,F,C){let $=this._writeOffset,w=this._encoding;if(typeof F==="number")$=F;else if(typeof F==="string")d.checkEncoding(F),w=F;if(typeof C==="string")d.checkEncoding(C),w=C;let E=Buffer.byteLength(D,w);if(u)this.ensureInsertable(E,$);else this._ensureWriteable(E,$);if(this._buff.write(D,$,E,w),u)this._writeOffset+=E;else if(typeof F==="number")this._writeOffset=Math.max(this._writeOffset,$+E);else this._writeOffset+=E;return this}_handleBuffer(D,u,F){let C=typeof F==="number"?F:this._writeOffset;if(u)this.ensureInsertable(D.length,C);else this._ensureWriteable(D.length,C);if(D.copy(this._buff,C),u)this._writeOffset+=D.length;else if(typeof F==="number")this._writeOffset=Math.max(this._writeOffset,C+D.length);else this._writeOffset+=D.length;return this}ensureReadable(D,u){let F=this._readOffset;if(typeof u!=="undefined")d.checkOffsetValue(u),F=u;if(F<0||F+D>this.length)throw new Error(d.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(D,u){if(d.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){let F=typeof u==="number"?u:this._writeOffset;if(this._ensureCapacity(F+D),F+D>this.length)this.length=F+D}_ensureCapacity(D){let u=this._buff.length;if(D>u){let F=this._buff,C=u*3/2+1;if(C<D)C=D;this._buff=Buffer.allocUnsafe(C),F.copy(this._buff,0,0,u)}}_readNumberValue(D,u,F){this.ensureReadable(u,F);let C=D.call(this._buff,typeof F==="number"?F:this._readOffset);if(typeof F==="undefined")this._readOffset+=u;return C}_insertNumberValue(D,u,F,C){return d.checkOffsetValue(C),this.ensureInsertable(u,C),D.call(this._buff,F,C),this._writeOffset+=u,this}_writeNumberValue(D,u,F,C){if(typeof C==="number"){if(C<0)throw new Error(d.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);d.checkOffsetValue(C)}let $=typeof C==="number"?C:this._writeOffset;if(this._ensureWriteable(u,$),D.call(this._buff,F,$),typeof C==="number")this._writeOffset=Math.max(this._writeOffset,$+u);else this._writeOffset+=u;return this}}t7.SmartBuffer=D3});var u3=I(($$)=>{Object.defineProperty($$,"__esModule",{value:!0});$$.SOCKS5_NO_ACCEPTABLE_AUTH=$$.SOCKS5_CUSTOM_AUTH_END=$$.SOCKS5_CUSTOM_AUTH_START=$$.SOCKS_INCOMING_PACKET_SIZES=$$.SocksClientState=$$.Socks5Response=$$.Socks5HostType=$$.Socks5Auth=$$.Socks4Response=$$.SocksCommand=$$.ERRORS=$$.DEFAULT_TIMEOUT=void 0;var DX=30000;$$.DEFAULT_TIMEOUT=DX;var uX={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"};$$.ERRORS=uX;var FX={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:(D)=>D+7,Socks4Response:8};$$.SOCKS_INCOMING_PACKET_SIZES=FX;var s7;(function(D){D[D.connect=1]="connect",D[D.bind=2]="bind",D[D.associate=3]="associate"})(s7||($$.SocksCommand=s7={}));var e7;(function(D){D[D.Granted=90]="Granted",D[D.Failed=91]="Failed",D[D.Rejected=92]="Rejected",D[D.RejectedIdent=93]="RejectedIdent"})(e7||($$.Socks4Response=e7={}));var D$;(function(D){D[D.NoAuth=0]="NoAuth",D[D.GSSApi=1]="GSSApi",D[D.UserPass=2]="UserPass"})(D$||($$.Socks5Auth=D$={}));var CX=128;$$.SOCKS5_CUSTOM_AUTH_START=CX;var $X=254;$$.SOCKS5_CUSTOM_AUTH_END=$X;var EX=255;$$.SOCKS5_NO_ACCEPTABLE_AUTH=EX;var u$;(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"})(u$||($$.Socks5Response=u$={}));var F$;(function(D){D[D.IPv4=1]="IPv4",D[D.Hostname=3]="Hostname",D[D.IPv6=4]="IPv6"})(F$||($$.Socks5HostType=F$={}));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$||($$.SocksClientState=C$={}))});var F3=I((B$)=>{Object.defineProperty(B$,"__esModule",{value:!0});B$.shuffleArray=B$.SocksClientError=void 0;class w$ extends Error{constructor(D,u){super(D);this.options=u}}B$.SocksClientError=w$;function WX(D){for(let u=D.length-1;u>0;u--){let F=Math.floor(Math.random()*(u+1));[D[u],D[F]]=[D[F],D[u]]}}B$.shuffleArray=WX});var C3=I((J$)=>{Object.defineProperty(J$,"__esModule",{value:!0});J$.isCorrect=J$.isInSubnet=void 0;function AX(D){if(this.subnetMask<D.subnetMask)return!1;if(this.mask(D.subnetMask)===D.mask())return!0;return!1}J$.isInSubnet=AX;function QX(D){return function(){if(this.addressMinusSuffix!==this.correctForm())return!1;if(this.subnetMask===D&&!this.parsedSubnet)return!0;return this.parsedSubnet===String(this.subnetMask)}}J$.isCorrect=QX});var $3=I((q$)=>{Object.defineProperty(q$,"__esModule",{value:!0});q$.RE_SUBNET_STRING=q$.RE_ADDRESS=q$.GROUPS=q$.BITS=void 0;q$.BITS=32;q$.GROUPS=4;q$.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;q$.RE_SUBNET_STRING=/\/\d{1,2}$/});var w8=I((X$)=>{Object.defineProperty(X$,"__esModule",{value:!0});X$.AddressError=void 0;class K$ extends Error{constructor(D,u){super(D);if(this.name="AddressError",u!==null)this.parseMessage=u}}X$.AddressError=K$});var E3=I((B8,y$)=>{(function(){var D,u=244837814094590,F=(u&16777215)==15715070;function C(B,M,Y){if(B!=null)if(typeof B=="number")this.fromNumber(B,M,Y);else if(M==null&&typeof B!="string")this.fromString(B,256);else this.fromString(B,M)}function $(){return new C(null)}function w(B,M,Y,K,A,U){while(--U>=0){var j=M*this[B++]+Y[K]+A;A=Math.floor(j/67108864),Y[K++]=j&67108863}return A}function E(B,M,Y,K,A,U){var j=M&32767,m=M>>15;while(--U>=0){var uD=this[B]&32767,yD=this[B++]>>15,eD=m*uD+yD*j;uD=j*uD+((eD&32767)<<15)+Y[K]+(A&1073741823),A=(uD>>>30)+(eD>>>15)+m*yD+(A>>>30),Y[K++]=uD&1073741823}return A}function J(B,M,Y,K,A,U){var j=M&16383,m=M>>14;while(--U>=0){var uD=this[B]&16383,yD=this[B++]>>14,eD=m*uD+yD*j;uD=j*uD+((eD&16383)<<14)+Y[K]+A,A=(uD>>28)+(eD>>14)+m*yD,Y[K++]=uD&268435455}return A}var q=typeof navigator!=="undefined";if(q&&F&&navigator.appName=="Microsoft Internet Explorer")C.prototype.am=E,D=30;else if(q&&F&&navigator.appName!="Netscape")C.prototype.am=w,D=26;else C.prototype.am=J,D=28;C.prototype.DB=D,C.prototype.DM=(1<<D)-1,C.prototype.DV=1<<D;var W=52;C.prototype.FV=Math.pow(2,W),C.prototype.F1=W-D,C.prototype.F2=2*D-W;var Z="0123456789abcdefghijklmnopqrstuvwxyz",y=new Array,G,z;G=48;for(z=0;z<=9;++z)y[G++]=z;G=97;for(z=10;z<36;++z)y[G++]=z;G=65;for(z=10;z<36;++z)y[G++]=z;function X(B){return Z.charAt(B)}function R(B,M){var Y=y[B.charCodeAt(M)];return Y==null?-1:Y}function b(B){for(var M=this.t-1;M>=0;--M)B[M]=this[M];B.t=this.t,B.s=this.s}function v(B){if(this.t=1,this.s=B<0?-1:0,B>0)this[0]=B;else if(B<-1)this[0]=B+this.DV;else this.t=0}function r(B){var M=$();return M.fromInt(B),M}function i(B,M){var Y;if(M==16)Y=4;else if(M==8)Y=3;else if(M==256)Y=8;else if(M==2)Y=1;else if(M==32)Y=5;else if(M==4)Y=2;else{this.fromRadix(B,M);return}this.t=0,this.s=0;var K=B.length,A=!1,U=0;while(--K>=0){var j=Y==8?B[K]&255:R(B,K);if(j<0){if(B.charAt(K)=="-")A=!0;continue}if(A=!1,U==0)this[this.t++]=j;else if(U+Y>this.DB)this[this.t-1]|=(j&(1<<this.DB-U)-1)<<U,this[this.t++]=j>>this.DB-U;else this[this.t-1]|=j<<U;if(U+=Y,U>=this.DB)U-=this.DB}if(Y==8&&(B[0]&128)!=0){if(this.s=-1,U>0)this[this.t-1]|=(1<<this.DB-U)-1<<U}if(this.clamp(),A)C.ZERO.subTo(this,this)}function BD(){var B=this.s&this.DM;while(this.t>0&&this[this.t-1]==B)--this.t}function gD(B){if(this.s<0)return"-"+this.negate().toString(B);var M;if(B==16)M=4;else if(B==8)M=3;else if(B==2)M=1;else if(B==32)M=5;else if(B==4)M=2;else return this.toRadix(B);var Y=(1<<M)-1,K,A=!1,U="",j=this.t,m=this.DB-j*this.DB%M;if(j-- >0){if(m<this.DB&&(K=this[j]>>m)>0)A=!0,U=X(K);while(j>=0){if(m<M)K=(this[j]&(1<<m)-1)<<M-m,K|=this[--j]>>(m+=this.DB-M);else if(K=this[j]>>(m-=M)&Y,m<=0)m+=this.DB,--j;if(K>0)A=!0;if(A)U+=X(K)}}return A?U:"0"}function ZD(){var B=$();return C.ZERO.subTo(this,B),B}function KD(){return this.s<0?this.negate():this}function a(B){var M=this.s-B.s;if(M!=0)return M;var Y=this.t;if(M=Y-B.t,M!=0)return this.s<0?-M:M;while(--Y>=0)if((M=this[Y]-B[Y])!=0)return M;return 0}function T(B){var M=1,Y;if((Y=B>>>16)!=0)B=Y,M+=16;if((Y=B>>8)!=0)B=Y,M+=8;if((Y=B>>4)!=0)B=Y,M+=4;if((Y=B>>2)!=0)B=Y,M+=2;if((Y=B>>1)!=0)B=Y,M+=1;return M}function x(){if(this.t<=0)return 0;return this.DB*(this.t-1)+T(this[this.t-1]^this.s&this.DM)}function n(B,M){var Y;for(Y=this.t-1;Y>=0;--Y)M[Y+B]=this[Y];for(Y=B-1;Y>=0;--Y)M[Y]=0;M.t=this.t+B,M.s=this.s}function k(B,M){for(var Y=B;Y<this.t;++Y)M[Y-B]=this[Y];M.t=Math.max(this.t-B,0),M.s=this.s}function O(B,M){var Y=B%this.DB,K=this.DB-Y,A=(1<<K)-1,U=Math.floor(B/this.DB),j=this.s<<Y&this.DM,m;for(m=this.t-1;m>=0;--m)M[m+U+1]=this[m]>>K|j,j=(this[m]&A)<<Y;for(m=U-1;m>=0;--m)M[m]=0;M[U]=j,M.t=this.t+U+1,M.s=this.s,M.clamp()}function Q(B,M){M.s=this.s;var Y=Math.floor(B/this.DB);if(Y>=this.t){M.t=0;return}var K=B%this.DB,A=this.DB-K,U=(1<<K)-1;M[0]=this[Y]>>K;for(var j=Y+1;j<this.t;++j)M[j-Y-1]|=(this[j]&U)<<A,M[j-Y]=this[j]>>K;if(K>0)M[this.t-Y-1]|=(this.s&U)<<A;M.t=this.t-Y,M.clamp()}function h(B,M){var Y=0,K=0,A=Math.min(B.t,this.t);while(Y<A)K+=this[Y]-B[Y],M[Y++]=K&this.DM,K>>=this.DB;if(B.t<this.t){K-=B.s;while(Y<this.t)K+=this[Y],M[Y++]=K&this.DM,K>>=this.DB;K+=this.s}else{K+=this.s;while(Y<B.t)K-=B[Y],M[Y++]=K&this.DM,K>>=this.DB;K-=B.s}if(M.s=K<0?-1:0,K<-1)M[Y++]=this.DV+K;else if(K>0)M[Y++]=K;M.t=Y,M.clamp()}function H(B,M){var Y=this.abs(),K=B.abs(),A=Y.t;M.t=A+K.t;while(--A>=0)M[A]=0;for(A=0;A<K.t;++A)M[A+Y.t]=Y.am(0,K[A],M,A,0,Y.t);if(M.s=0,M.clamp(),this.s!=B.s)C.ZERO.subTo(M,M)}function N(B){var M=this.abs(),Y=B.t=2*M.t;while(--Y>=0)B[Y]=0;for(Y=0;Y<M.t-1;++Y){var K=M.am(Y,M[Y],B,2*Y,0,1);if((B[Y+M.t]+=M.am(Y+1,2*M[Y],B,2*Y+1,K,M.t-Y-1))>=M.DV)B[Y+M.t]-=M.DV,B[Y+M.t+1]=1}if(B.t>0)B[B.t-1]+=M.am(Y,M[Y],B,2*Y,0,1);B.s=0,B.clamp()}function S(B,M,Y){var K=B.abs();if(K.t<=0)return;var A=this.abs();if(A.t<K.t){if(M!=null)M.fromInt(0);if(Y!=null)this.copyTo(Y);return}if(Y==null)Y=$();var U=$(),j=this.s,m=B.s,uD=this.DB-T(K[K.t-1]);if(uD>0)K.lShiftTo(uD,U),A.lShiftTo(uD,Y);else K.copyTo(U),A.copyTo(Y);var yD=U.t,eD=U[yD-1];if(eD==0)return;var pD=eD*(1<<this.F1)+(yD>1?U[yD-2]>>this.F2:0),Tu=this.FV/pD,u1=(1<<this.F1)/pD,Bu=1<<this.F2,Mu=Y.t,F1=Mu-yD,Pu=M==null?$():M;if(U.dlShiftTo(F1,Pu),Y.compareTo(Pu)>=0)Y[Y.t++]=1,Y.subTo(Pu,Y);C.ONE.dlShiftTo(yD,Pu),Pu.subTo(U,U);while(U.t<yD)U[U.t++]=0;while(--F1>=0){var G8=Y[--Mu]==eD?this.DM:Math.floor(Y[Mu]*Tu+(Y[Mu-1]+Bu)*u1);if((Y[Mu]+=U.am(0,G8,Y,F1,0,yD))<G8){U.dlShiftTo(F1,Pu),Y.subTo(Pu,Y);while(Y[Mu]<--G8)Y.subTo(Pu,Y)}}if(M!=null){if(Y.drShiftTo(yD,M),j!=m)C.ZERO.subTo(M,M)}if(Y.t=yD,Y.clamp(),uD>0)Y.rShiftTo(uD,Y);if(j<0)C.ZERO.subTo(Y,Y)}function _(B){var M=$();if(this.abs().divRemTo(B,null,M),this.s<0&&M.compareTo(C.ZERO)>0)B.subTo(M,M);return M}function l(B){this.m=B}function DD(B){if(B.s<0||B.compareTo(this.m)>=0)return B.mod(this.m);else return B}function MD(B){return B}function LD(B){B.divRemTo(this.m,null,B)}function yu(B,M,Y){B.multiplyTo(M,Y),this.reduce(Y)}function $u(B,M){B.squareTo(M),this.reduce(M)}l.prototype.convert=DD,l.prototype.revert=MD,l.prototype.reduce=LD,l.prototype.mulTo=yu,l.prototype.sqrTo=$u;function Vu(){if(this.t<1)return 0;var B=this[0];if((B&1)==0)return 0;var M=B&3;return M=M*(2-(B&15)*M)&15,M=M*(2-(B&255)*M)&255,M=M*(2-((B&65535)*M&65535))&65535,M=M*(2-B*M%this.DV)%this.DV,M>0?this.DV-M:-M}function XD(B){this.m=B,this.mp=B.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<B.DB-15)-1,this.mt2=2*B.t}function qD(B){var M=$();if(B.abs().dlShiftTo(this.m.t,M),M.divRemTo(this.m,null,M),B.s<0&&M.compareTo(C.ZERO)>0)this.m.subTo(M,M);return M}function xD(B){var M=$();return B.copyTo(M),this.reduce(M),M}function Eu(B){while(B.t<=this.mt2)B[B.t++]=0;for(var M=0;M<this.m.t;++M){var Y=B[M]&32767,K=Y*this.mpl+((Y*this.mph+(B[M]>>15)*this.mpl&this.um)<<15)&B.DM;Y=M+this.m.t,B[Y]+=this.m.am(0,K,B,M,0,this.m.t);while(B[Y]>=B.DV)B[Y]-=B.DV,B[++Y]++}if(B.clamp(),B.drShiftTo(this.m.t,B),B.compareTo(this.m)>=0)B.subTo(this.m,B)}function Wu(B,M){B.squareTo(M),this.reduce(M)}function eu(B,M,Y){B.multiplyTo(M,Y),this.reduce(Y)}XD.prototype.convert=qD,XD.prototype.revert=xD,XD.prototype.reduce=Eu,XD.prototype.mulTo=eu,XD.prototype.sqrTo=Wu;function D0(){return(this.t>0?this[0]&1:this.s)==0}function G0(B,M){if(B>4294967295||B<1)return C.ONE;var Y=$(),K=$(),A=M.convert(this),U=T(B)-1;A.copyTo(Y);while(--U>=0)if(M.sqrTo(Y,K),(B&1<<U)>0)M.mulTo(K,A,Y);else{var j=Y;Y=K,K=j}return M.revert(Y)}function A0(B,M){var Y;if(B<256||M.isEven())Y=new l(M);else Y=new XD(M);return this.exp(B,Y)}C.prototype.copyTo=b,C.prototype.fromInt=v,C.prototype.fromString=i,C.prototype.clamp=BD,C.prototype.dlShiftTo=n,C.prototype.drShiftTo=k,C.prototype.lShiftTo=O,C.prototype.rShiftTo=Q,C.prototype.subTo=h,C.prototype.multiplyTo=H,C.prototype.squareTo=N,C.prototype.divRemTo=S,C.prototype.invDigit=Vu,C.prototype.isEven=D0,C.prototype.exp=G0,C.prototype.toString=gD,C.prototype.negate=ZD,C.prototype.abs=KD,C.prototype.compareTo=a,C.prototype.bitLength=x,C.prototype.mod=_,C.prototype.modPowInt=A0,C.ZERO=r(0),C.ONE=r(1);function Q0(){var B=$();return this.copyTo(B),B}function H0(){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 A3(){return this.t==0?this.s:this[0]<<24>>24}function o$(){return this.t==0?this.s:this[0]<<16>>16}function s$(B){return Math.floor(Math.LN2*this.DB/Math.log(B))}function e$(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this[0]<=0)return 0;else return 1}function DE(B){if(B==null)B=10;if(this.signum()==0||B<2||B>36)return"0";var M=this.chunkSize(B),Y=Math.pow(B,M),K=r(Y),A=$(),U=$(),j="";this.divRemTo(K,A,U);while(A.signum()>0)j=(Y+U.intValue()).toString(B).substr(1)+j,A.divRemTo(K,A,U);return U.intValue().toString(B)+j}function uE(B,M){if(this.fromInt(0),M==null)M=10;var Y=this.chunkSize(M),K=Math.pow(M,Y),A=!1,U=0,j=0;for(var m=0;m<B.length;++m){var uD=R(B,m);if(uD<0){if(B.charAt(m)=="-"&&this.signum()==0)A=!0;continue}if(j=M*j+uD,++U>=Y)this.dMultiply(K),this.dAddOffset(j,0),U=0,j=0}if(U>0)this.dMultiply(Math.pow(M,U)),this.dAddOffset(j,0);if(A)C.ZERO.subTo(this,this)}function FE(B,M,Y){if(typeof M=="number")if(B<2)this.fromInt(1);else{if(this.fromNumber(B,Y),!this.testBit(B-1))this.bitwiseTo(C.ONE.shiftLeft(B-1),X8,this);if(this.isEven())this.dAddOffset(1,0);while(!this.isProbablePrime(M))if(this.dAddOffset(2,0),this.bitLength()>B)this.subTo(C.ONE.shiftLeft(B-1),this)}else{var K=new Array,A=B&7;if(K.length=(B>>3)+1,M.nextBytes(K),A>0)K[0]&=(1<<A)-1;else K[0]=0;this.fromString(K,256)}}function CE(){var B=this.t,M=new Array;M[0]=this.s;var Y=this.DB-B*this.DB%8,K,A=0;if(B-- >0){if(Y<this.DB&&(K=this[B]>>Y)!=(this.s&this.DM)>>Y)M[A++]=K|this.s<<this.DB-Y;while(B>=0){if(Y<8)K=(this[B]&(1<<Y)-1)<<8-Y,K|=this[--B]>>(Y+=this.DB-8);else if(K=this[B]>>(Y-=8)&255,Y<=0)Y+=this.DB,--B;if((K&128)!=0)K|=-256;if(A==0&&(this.s&128)!=(K&128))++A;if(A>0||K!=this.s)M[A++]=K}}return M}function $E(B){return this.compareTo(B)==0}function EE(B){return this.compareTo(B)<0?this:B}function wE(B){return this.compareTo(B)>0?this:B}function BE(B,M,Y){var K,A,U=Math.min(B.t,this.t);for(K=0;K<U;++K)Y[K]=M(this[K],B[K]);if(B.t<this.t){A=B.s&this.DM;for(K=U;K<this.t;++K)Y[K]=M(this[K],A);Y.t=this.t}else{A=this.s&this.DM;for(K=U;K<B.t;++K)Y[K]=M(A,B[K]);Y.t=B.t}Y.s=M(this.s,B.s),Y.clamp()}function ME(B,M){return B&M}function JE(B){var M=$();return this.bitwiseTo(B,ME,M),M}function X8(B,M){return B|M}function YE(B){var M=$();return this.bitwiseTo(B,X8,M),M}function Q3(B,M){return B^M}function qE(B){var M=$();return this.bitwiseTo(B,Q3,M),M}function H3(B,M){return B&~M}function ZE(B){var M=$();return this.bitwiseTo(B,H3,M),M}function KE(){var B=$();for(var M=0;M<this.t;++M)B[M]=this.DM&~this[M];return B.t=this.t,B.s=~this.s,B}function XE(B){var M=$();if(B<0)this.rShiftTo(-B,M);else this.lShiftTo(B,M);return M}function zE(B){var M=$();if(B<0)this.lShiftTo(-B,M);else this.rShiftTo(B,M);return M}function yE(B){if(B==0)return-1;var M=0;if((B&65535)==0)B>>=16,M+=16;if((B&255)==0)B>>=8,M+=8;if((B&15)==0)B>>=4,M+=4;if((B&3)==0)B>>=2,M+=2;if((B&1)==0)++M;return M}function WE(){for(var B=0;B<this.t;++B)if(this[B]!=0)return B*this.DB+yE(this[B]);if(this.s<0)return this.t*this.DB;return-1}function GE(B){var M=0;while(B!=0)B&=B-1,++M;return M}function AE(){var B=0,M=this.s&this.DM;for(var Y=0;Y<this.t;++Y)B+=GE(this[Y]^M);return B}function QE(B){var M=Math.floor(B/this.DB);if(M>=this.t)return this.s!=0;return(this[M]&1<<B%this.DB)!=0}function HE(B,M){var Y=C.ONE.shiftLeft(B);return this.bitwiseTo(Y,M,Y),Y}function UE(B){return this.changeBit(B,X8)}function OE(B){return this.changeBit(B,H3)}function VE(B){return this.changeBit(B,Q3)}function TE(B,M){var Y=0,K=0,A=Math.min(B.t,this.t);while(Y<A)K+=this[Y]+B[Y],M[Y++]=K&this.DM,K>>=this.DB;if(B.t<this.t){K+=B.s;while(Y<this.t)K+=this[Y],M[Y++]=K&this.DM,K>>=this.DB;K+=this.s}else{K+=this.s;while(Y<B.t)K+=B[Y],M[Y++]=K&this.DM,K>>=this.DB;K+=B.s}if(M.s=K<0?-1:0,K>0)M[Y++]=K;else if(K<-1)M[Y++]=this.DV+K;M.t=Y,M.clamp()}function LE(B){var M=$();return this.addTo(B,M),M}function hE(B){var M=$();return this.subTo(B,M),M}function IE(B){var M=$();return this.multiplyTo(B,M),M}function NE(){var B=$();return this.squareTo(B),B}function gE(B){var M=$();return this.divRemTo(B,M,null),M}function PE(B){var M=$();return this.divRemTo(B,null,M),M}function jE(B){var M=$(),Y=$();return this.divRemTo(B,M,Y),new Array(M,Y)}function RE(B){this[this.t]=this.am(0,B-1,this,0,0,this.t),++this.t,this.clamp()}function kE(B,M){if(B==0)return;while(this.t<=M)this[this.t++]=0;this[M]+=B;while(this[M]>=this.DV){if(this[M]-=this.DV,++M>=this.t)this[this.t++]=0;++this[M]}}function U0(){}function U3(B){return B}function mE(B,M,Y){B.multiplyTo(M,Y)}function SE(B,M){B.squareTo(M)}U0.prototype.convert=U3,U0.prototype.revert=U3,U0.prototype.mulTo=mE,U0.prototype.sqrTo=SE;function _E(B){return this.exp(B,new U0)}function bE(B,M,Y){var K=Math.min(this.t+B.t,M);Y.s=0,Y.t=K;while(K>0)Y[--K]=0;var A;for(A=Y.t-this.t;K<A;++K)Y[K+this.t]=this.am(0,B[K],Y,K,0,this.t);for(A=Math.min(B.t,M);K<A;++K)this.am(0,B[K],Y,K,0,M-K);Y.clamp()}function cE(B,M,Y){--M;var K=Y.t=this.t+B.t-M;Y.s=0;while(--K>=0)Y[K]=0;for(K=Math.max(M-this.t,0);K<B.t;++K)Y[this.t+K-M]=this.am(M-K,B[K],Y,0,0,this.t+K-M);Y.clamp(),Y.drShiftTo(1,Y)}function fu(B){this.r2=$(),this.q3=$(),C.ONE.dlShiftTo(2*B.t,this.r2),this.mu=this.r2.divide(B),this.m=B}function vE(B){if(B.s<0||B.t>2*this.m.t)return B.mod(this.m);else if(B.compareTo(this.m)<0)return B;else{var M=$();return B.copyTo(M),this.reduce(M),M}}function nE(B){return B}function xE(B){if(B.drShiftTo(this.m.t-1,this.r2),B.t>this.m.t+1)B.t=this.m.t+1,B.clamp();this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(B.compareTo(this.r2)<0)B.dAddOffset(1,this.m.t+1);B.subTo(this.r2,B);while(B.compareTo(this.m)>=0)B.subTo(this.m,B)}function fE(B,M){B.squareTo(M),this.reduce(M)}function iE(B,M,Y){B.multiplyTo(M,Y),this.reduce(Y)}fu.prototype.convert=vE,fu.prototype.revert=nE,fu.prototype.reduce=xE,fu.prototype.mulTo=iE,fu.prototype.sqrTo=fE;function dE(B,M){var Y=B.bitLength(),K,A=r(1),U;if(Y<=0)return A;else if(Y<18)K=1;else if(Y<48)K=3;else if(Y<144)K=4;else if(Y<768)K=5;else K=6;if(Y<8)U=new l(M);else if(M.isEven())U=new fu(M);else U=new XD(M);var j=new Array,m=3,uD=K-1,yD=(1<<K)-1;if(j[1]=U.convert(this),K>1){var eD=$();U.sqrTo(j[1],eD);while(m<=yD)j[m]=$(),U.mulTo(eD,j[m-2],j[m]),m+=2}var pD=B.t-1,Tu,u1=!0,Bu=$(),Mu;Y=T(B[pD])-1;while(pD>=0){if(Y>=uD)Tu=B[pD]>>Y-uD&yD;else if(Tu=(B[pD]&(1<<Y+1)-1)<<uD-Y,pD>0)Tu|=B[pD-1]>>this.DB+Y-uD;m=K;while((Tu&1)==0)Tu>>=1,--m;if((Y-=m)<0)Y+=this.DB,--pD;if(u1)j[Tu].copyTo(A),u1=!1;else{while(m>1)U.sqrTo(A,Bu),U.sqrTo(Bu,A),m-=2;if(m>0)U.sqrTo(A,Bu);else Mu=A,A=Bu,Bu=Mu;U.mulTo(Bu,j[Tu],A)}while(pD>=0&&(B[pD]&1<<Y)==0)if(U.sqrTo(A,Bu),Mu=A,A=Bu,Bu=Mu,--Y<0)Y=this.DB-1,--pD}return U.revert(A)}function rE(B){var M=this.s<0?this.negate():this.clone(),Y=B.s<0?B.negate():B.clone();if(M.compareTo(Y)<0){var K=M;M=Y,Y=K}var A=M.getLowestSetBit(),U=Y.getLowestSetBit();if(U<0)return M;if(A<U)U=A;if(U>0)M.rShiftTo(U,M),Y.rShiftTo(U,Y);while(M.signum()>0){if((A=M.getLowestSetBit())>0)M.rShiftTo(A,M);if((A=Y.getLowestSetBit())>0)Y.rShiftTo(A,Y);if(M.compareTo(Y)>=0)M.subTo(Y,M),M.rShiftTo(1,M);else Y.subTo(M,Y),Y.rShiftTo(1,Y)}if(U>0)Y.lShiftTo(U,Y);return Y}function lE(B){if(B<=0)return 0;var M=this.DV%B,Y=this.s<0?B-1:0;if(this.t>0)if(M==0)Y=this[0]%B;else for(var K=this.t-1;K>=0;--K)Y=(M*Y+this[K])%B;return Y}function pE(B){var M=B.isEven();if(this.isEven()&&M||B.signum()==0)return C.ZERO;var Y=B.clone(),K=this.clone(),A=r(1),U=r(0),j=r(0),m=r(1);while(Y.signum()!=0){while(Y.isEven()){if(Y.rShiftTo(1,Y),M){if(!A.isEven()||!U.isEven())A.addTo(this,A),U.subTo(B,U);A.rShiftTo(1,A)}else if(!U.isEven())U.subTo(B,U);U.rShiftTo(1,U)}while(K.isEven()){if(K.rShiftTo(1,K),M){if(!j.isEven()||!m.isEven())j.addTo(this,j),m.subTo(B,m);j.rShiftTo(1,j)}else if(!m.isEven())m.subTo(B,m);m.rShiftTo(1,m)}if(Y.compareTo(K)>=0){if(Y.subTo(K,Y),M)A.subTo(j,A);U.subTo(m,U)}else{if(K.subTo(Y,K),M)j.subTo(A,j);m.subTo(U,m)}}if(K.compareTo(C.ONE)!=0)return C.ZERO;if(m.compareTo(B)>=0)return m.subtract(B);if(m.signum()<0)m.addTo(B,m);else return m;if(m.signum()<0)return m.add(B);else return m}var PD=[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],aE=67108864/PD[PD.length-1];function tE(B){var M,Y=this.abs();if(Y.t==1&&Y[0]<=PD[PD.length-1]){for(M=0;M<PD.length;++M)if(Y[0]==PD[M])return!0;return!1}if(Y.isEven())return!1;M=1;while(M<PD.length){var K=PD[M],A=M+1;while(A<PD.length&&K<aE)K*=PD[A++];K=Y.modInt(K);while(M<A)if(K%PD[M++]==0)return!1}return Y.millerRabin(B)}function oE(B){var M=this.subtract(C.ONE),Y=M.getLowestSetBit();if(Y<=0)return!1;var K=M.shiftRight(Y);if(B=B+1>>1,B>PD.length)B=PD.length;var A=$();for(var U=0;U<B;++U){A.fromInt(PD[Math.floor(Math.random()*PD.length)]);var j=A.modPow(K,this);if(j.compareTo(C.ONE)!=0&&j.compareTo(M)!=0){var m=1;while(m++<Y&&j.compareTo(M)!=0)if(j=j.modPowInt(2,this),j.compareTo(C.ONE)==0)return!1;if(j.compareTo(M)!=0)return!1}}return!0}C.prototype.chunkSize=s$,C.prototype.toRadix=DE,C.prototype.fromRadix=uE,C.prototype.fromNumber=FE,C.prototype.bitwiseTo=BE,C.prototype.changeBit=HE,C.prototype.addTo=TE,C.prototype.dMultiply=RE,C.prototype.dAddOffset=kE,C.prototype.multiplyLowerTo=bE,C.prototype.multiplyUpperTo=cE,C.prototype.modInt=lE,C.prototype.millerRabin=oE,C.prototype.clone=Q0,C.prototype.intValue=H0,C.prototype.byteValue=A3,C.prototype.shortValue=o$,C.prototype.signum=e$,C.prototype.toByteArray=CE,C.prototype.equals=$E,C.prototype.min=EE,C.prototype.max=wE,C.prototype.and=JE,C.prototype.or=YE,C.prototype.xor=qE,C.prototype.andNot=ZE,C.prototype.not=KE,C.prototype.shiftLeft=XE,C.prototype.shiftRight=zE,C.prototype.getLowestSetBit=WE,C.prototype.bitCount=AE,C.prototype.testBit=QE,C.prototype.setBit=UE,C.prototype.clearBit=OE,C.prototype.flipBit=VE,C.prototype.add=LE,C.prototype.subtract=hE,C.prototype.multiply=IE,C.prototype.divide=gE,C.prototype.remainder=PE,C.prototype.divideAndRemainder=jE,C.prototype.modPow=dE,C.prototype.modInverse=pE,C.prototype.pow=_E,C.prototype.gcd=rE,C.prototype.isProbablePrime=tE,C.prototype.square=NE,C.prototype.Barrett=fu;var D1,lD,zD;function sE(B){if(lD[zD++]^=B&255,lD[zD++]^=B>>8&255,lD[zD++]^=B>>16&255,lD[zD++]^=B>>24&255,zD>=W8)zD-=W8}function O3(){sE(new Date().getTime())}if(lD==null){lD=new Array,zD=0;var wu;if(typeof window!=="undefined"&&window.crypto){if(window.crypto.getRandomValues){var V3=new Uint8Array(32);window.crypto.getRandomValues(V3);for(wu=0;wu<32;++wu)lD[zD++]=V3[wu]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var T3=window.crypto.random(32);for(wu=0;wu<T3.length;++wu)lD[zD++]=T3.charCodeAt(wu)&255}}while(zD<W8)wu=Math.floor(65536*Math.random()),lD[zD++]=wu>>>8,lD[zD++]=wu&255;zD=0,O3()}function eE(){if(D1==null){O3(),D1=C5(),D1.init(lD);for(zD=0;zD<lD.length;++zD)lD[zD]=0;zD=0}return D1.next()}function D5(B){var M;for(M=0;M<B.length;++M)B[M]=eE()}function z8(){}z8.prototype.nextBytes=D5;function y8(){this.i=0,this.j=0,this.S=new Array}function u5(B){var M,Y,K;for(M=0;M<256;++M)this.S[M]=M;Y=0;for(M=0;M<256;++M)Y=Y+this.S[M]+B[M%B.length]&255,K=this.S[M],this.S[M]=this.S[Y],this.S[Y]=K;this.i=0,this.j=0}function F5(){var B;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,B=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=B,this.S[B+this.S[this.i]&255]}y8.prototype.init=u5,y8.prototype.next=F5;function C5(){return new y8}var W8=256;if(typeof B8!=="undefined")B8=y$.exports={default:C,BigInteger:C,SecureRandom:z8};else this.jsbn={BigInteger:C,SecureRandom:z8}}).call(B8)});var s0=I((W$)=>{(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(E){return C(w(E),arguments)}function F(E,J){return u.apply(null,[E].concat(J||[]))}function C(E,J){var q=1,W=E.length,Z,y="",G,z,X,R,b,v,r,i;for(G=0;G<W;G++)if(typeof E[G]==="string")y+=E[G];else if(typeof E[G]==="object"){if(X=E[G],X.keys){Z=J[q];for(z=0;z<X.keys.length;z++){if(Z==null)throw new Error(u('[sprintf] Cannot access property "%s" of undefined value "%s"',X.keys[z],X.keys[z-1]));Z=Z[X.keys[z]]}}else if(X.param_no)Z=J[X.param_no];else Z=J[q++];if(D.not_type.test(X.type)&&D.not_primitive.test(X.type)&&Z instanceof Function)Z=Z();if(D.numeric_arg.test(X.type)&&(typeof Z!=="number"&&isNaN(Z)))throw new TypeError(u("[sprintf] expecting number but found %T",Z));if(D.number.test(X.type))r=Z>=0;switch(X.type){case"b":Z=parseInt(Z,10).toString(2);break;case"c":Z=String.fromCharCode(parseInt(Z,10));break;case"d":case"i":Z=parseInt(Z,10);break;case"j":Z=JSON.stringify(Z,null,X.width?parseInt(X.width):0);break;case"e":Z=X.precision?parseFloat(Z).toExponential(X.precision):parseFloat(Z).toExponential();break;case"f":Z=X.precision?parseFloat(Z).toFixed(X.precision):parseFloat(Z);break;case"g":Z=X.precision?String(Number(Z.toPrecision(X.precision))):parseFloat(Z);break;case"o":Z=(parseInt(Z,10)>>>0).toString(8);break;case"s":Z=String(Z),Z=X.precision?Z.substring(0,X.precision):Z;break;case"t":Z=String(!!Z),Z=X.precision?Z.substring(0,X.precision):Z;break;case"T":Z=Object.prototype.toString.call(Z).slice(8,-1).toLowerCase(),Z=X.precision?Z.substring(0,X.precision):Z;break;case"u":Z=parseInt(Z,10)>>>0;break;case"v":Z=Z.valueOf(),Z=X.precision?Z.substring(0,X.precision):Z;break;case"x":Z=(parseInt(Z,10)>>>0).toString(16);break;case"X":Z=(parseInt(Z,10)>>>0).toString(16).toUpperCase();break}if(D.json.test(X.type))y+=Z;else{if(D.number.test(X.type)&&(!r||X.sign))i=r?"+":"-",Z=Z.toString().replace(D.sign,"");else i="";b=X.pad_char?X.pad_char==="0"?"0":X.pad_char.charAt(1):" ",v=X.width-(i+Z).length,R=X.width?v>0?b.repeat(v):"":"",y+=X.align?i+Z+R:b==="0"?i+R+Z:R+i+Z}}return y}var $=Object.create(null);function w(E){if($[E])return $[E];var J=E,q,W=[],Z=0;while(J){if((q=D.text.exec(J))!==null)W.push(q[0]);else if((q=D.modulo.exec(J))!==null)W.push("%");else if((q=D.placeholder.exec(J))!==null){if(q[2]){Z|=1;var y=[],G=q[2],z=[];if((z=D.key.exec(G))!==null){y.push(z[1]);while((G=G.substring(z[0].length))!=="")if((z=D.key_access.exec(G))!==null)y.push(z[1]);else if((z=D.index_access.exec(G))!==null)y.push(z[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key")}else throw new SyntaxError("[sprintf] failed to parse named argument key");q[2]=y}else Z|=2;if(Z===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");W.push({placeholder:q[0],param_no:q[1],keys:q[2],sign:q[3],pad_char:q[4],align:q[5],width:q[6],precision:q[7],type:q[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");J=J.substring(q[0].length)}return $[E]=W}if(typeof W$!=="undefined")W$.sprintf=u,W$.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 w3=I((Uu)=>{var TX=Uu&&Uu.__createBinding||(Object.create?function(D,u,F,C){if(C===void 0)C=F;var $=Object.getOwnPropertyDescriptor(u,F);if(!$||("get"in $?!u.__esModule:$.writable||$.configurable))$={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,C,$)}:function(D,u,F,C){if(C===void 0)C=F;D[C]=u[F]}),LX=Uu&&Uu.__setModuleDefault||(Object.create?function(D,u){Object.defineProperty(D,"default",{enumerable:!0,value:u})}:function(D,u){D.default=u}),Q$=Uu&&Uu.__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))TX(u,D,F)}return LX(u,D),u};Object.defineProperty(Uu,"__esModule",{value:!0});Uu.Address4=void 0;var G$=Q$(C3()),zu=Q$($3()),A$=w8(),e0=E3(),X0=s0();class Cu{constructor(D){this.groups=zu.GROUPS,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=G$.isCorrect(zu.BITS),this.isInSubnet=G$.isInSubnet,this.address=D;let u=zu.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>zu.BITS)throw new A$.AddressError("Invalid subnet mask.");D=D.replace(zu.RE_SUBNET_STRING,"")}this.addressMinusSuffix=D,this.parsedAddress=this.parse(D)}static isValid(D){try{return new Cu(D),!0}catch(u){return!1}}parse(D){let u=D.split(".");if(!D.match(zu.RE_ADDRESS))throw new A$.AddressError("Invalid IPv4 address.");return u}correctForm(){return this.parsedAddress.map((D)=>parseInt(D,10)).join(".")}static fromHex(D){let u=D.replace(/:/g,"").padStart(8,"0"),F=[],C;for(C=0;C<8;C+=2){let $=u.slice(C,C+2);F.push(parseInt($,16))}return new Cu(F.join("."))}static fromInteger(D){return Cu.fromHex(D.toString(16))}static fromArpa(D){let F=D.replace(/(\.in-addr\.arpa)?\.$/,"").split(".").reverse().join(".");return new Cu(F)}toHex(){return this.parsedAddress.map((D)=>X0.sprintf("%02x",parseInt(D,10))).join(":")}toArray(){return this.parsedAddress.map((D)=>parseInt(D,10))}toGroup6(){let D=[],u;for(u=0;u<zu.GROUPS;u+=2){let F=X0.sprintf("%02x%02x",parseInt(this.parsedAddress[u],10),parseInt(this.parsedAddress[u+1],10));D.push(X0.sprintf("%x",parseInt(F,16)))}return D.join(":")}bigInteger(){return new e0.BigInteger(this.parsedAddress.map((D)=>X0.sprintf("%02x",parseInt(D,10))).join(""),16)}_startAddress(){return new e0.BigInteger(this.mask()+"0".repeat(zu.BITS-this.subnetMask),2)}startAddress(){return Cu.fromBigInteger(this._startAddress())}startAddressExclusive(){let D=new e0.BigInteger("1");return Cu.fromBigInteger(this._startAddress().add(D))}_endAddress(){return new e0.BigInteger(this.mask()+"1".repeat(zu.BITS-this.subnetMask),2)}endAddress(){return Cu.fromBigInteger(this._endAddress())}endAddressExclusive(){let D=new e0.BigInteger("1");return Cu.fromBigInteger(this._endAddress().subtract(D))}static fromBigInteger(D){return Cu.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={};let u=this.correctForm().split(".").reverse().join(".");if(D.omitSuffix)return u;return X0.sprintf("%s.in-addr.arpa.",u)}isMulticast(){return this.isInSubnet(new Cu("224.0.0.0/4"))}binaryZeroPad(){return this.bigInteger().toString(2).padStart(zu.BITS,"0")}groupForV6(){let D=this.parsedAddress;return this.address.replace(zu.RE_ADDRESS,X0.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(".")))}}Uu.Address4=Cu});var B3=I((H$)=>{Object.defineProperty(H$,"__esModule",{value:!0});H$.RE_URL_WITH_PORT=H$.RE_URL=H$.RE_ZONE_STRING=H$.RE_SUBNET_STRING=H$.RE_BAD_ADDRESS=H$.RE_BAD_CHARACTERS=H$.TYPES=H$.SCOPES=H$.GROUPS=H$.BITS=void 0;H$.BITS=128;H$.GROUPS=8;H$.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"};H$.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"};H$.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi;H$.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi;H$.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/;H$.RE_ZONE_STRING=/%.*$/;H$.RE_URL=new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/);H$.RE_URL_WITH_PORT=new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/)});var M3=I((L$)=>{Object.defineProperty(L$,"__esModule",{value:!0});L$.simpleGroup=L$.spanLeadingZeroes=L$.spanAll=L$.spanAllZeroes=void 0;var O$=s0();function V$(D){return D.replace(/(0+)/g,'<span class="zero">$1</span>')}L$.spanAllZeroes=V$;function SX(D,u=0){return D.split("").map((C,$)=>O$.sprintf('<span class="digit value-%s position-%d">%s</span>',C,$+u,V$(C))).join("")}L$.spanAll=SX;function T$(D){return D.replace(/^(0+)/,'<span class="zero">$1</span>')}function _X(D){return D.split(":").map((F)=>T$(F)).join(":")}L$.spanLeadingZeroes=_X;function bX(D,u=0){return D.split(":").map((C,$)=>{if(/group-v4/.test(C))return C;return O$.sprintf('<span class="hover-group group-%d">%s</span>',$+u,T$(C))})}L$.simpleGroup=bX});var I$=I((QD)=>{var xX=QD&&QD.__createBinding||(Object.create?function(D,u,F,C){if(C===void 0)C=F;var $=Object.getOwnPropertyDescriptor(u,F);if(!$||("get"in $?!u.__esModule:$.writable||$.configurable))$={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,C,$)}:function(D,u,F,C){if(C===void 0)C=F;D[C]=u[F]}),fX=QD&&QD.__setModuleDefault||(Object.create?function(D,u){Object.defineProperty(D,"default",{enumerable:!0,value:u})}:function(D,u){D.default=u}),iX=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))xX(u,D,F)}return fX(u,D),u};Object.defineProperty(QD,"__esModule",{value:!0});QD.possibleElisions=QD.simpleRegularExpression=QD.ADDRESS_BOUNDARY=QD.padGroup=QD.groupPossibilities=void 0;var dX=iX(B3()),z0=s0();function J8(D){return z0.sprintf("(%s)",D.join("|"))}QD.groupPossibilities=J8;function M8(D){if(D.length<4)return z0.sprintf("0{0,%d}%s",4-D.length,D);return D}QD.padGroup=M8;QD.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]";function rX(D){let u=[];D.forEach((C,$)=>{if(parseInt(C,16)===0)u.push($)});let F=u.map((C)=>D.map(($,w)=>{if(w===C){let E=w===0||w===dX.GROUPS-1?":":"";return J8([M8($),E])}return M8($)}).join(":"));return F.push(D.map(M8).join(":")),J8(F)}QD.simpleRegularExpression=rX;function lX(D,u,F){let C=u?"":":",$=F?"":":",w=[];if(!u&&!F)w.push("::");if(u&&F)w.push("");if(F&&!u||!F&&u)w.push(":");w.push(z0.sprintf("%s(:0{1,4}){1,%d}",C,D-1)),w.push(z0.sprintf("(0{1,4}:){1,%d}%s",D-1,$)),w.push(z0.sprintf("(0{1,4}:){%d}0{1,4}",D-1));for(let E=1;E<D-1;E++)for(let J=1;J<D-E;J++)w.push(z0.sprintf("(0{1,4}:){%d}:(0{1,4}:){%d}0{1,4}",J,D-J-E-1));return J8(w)}QD.possibleElisions=lX});var j$=I((Ou)=>{var pX=Ou&&Ou.__createBinding||(Object.create?function(D,u,F,C){if(C===void 0)C=F;var $=Object.getOwnPropertyDescriptor(u,F);if(!$||("get"in $?!u.__esModule:$.writable||$.configurable))$={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,C,$)}:function(D,u,F,C){if(C===void 0)C=F;D[C]=u[F]}),aX=Ou&&Ou.__setModuleDefault||(Object.create?function(D,u){Object.defineProperty(D,"default",{enumerable:!0,value:u})}:function(D,u){D.default=u}),q8=Ou&&Ou.__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))pX(u,D,F)}return aX(u,D),u};Object.defineProperty(Ou,"__esModule",{value:!0});Ou.Address6=void 0;var N$=q8(C3()),J3=q8($3()),e=q8(B3()),Y3=q8(M3()),tu=w3(),ou=I$(),gu=w8(),cD=E3(),vD=s0();function Y8(D){if(!D)throw new Error("Assertion failed.")}function tX(D){let u=/(\d+)(\d{3})/;while(u.test(D))D=D.replace(u,"$1,$2");return D}function oX(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 sX(D,u){let F=[],C=[],$;for($=0;$<D.length;$++)if($<u[0])F.push(D[$]);else if($>u[1])C.push(D[$]);return F.concat(["compact"]).concat(C)}function g$(D){return vD.sprintf("%04x",parseInt(D,16))}function P$(D){return D&255}class HD{constructor(D,u){if(this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=N$.isInSubnet,this.isCorrect=N$.isCorrect(e.BITS),u===void 0)this.groups=e.GROUPS;else this.groups=u;this.address=D;let F=e.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>e.BITS)throw new gu.AddressError("Invalid subnet mask.");D=D.replace(e.RE_SUBNET_STRING,"")}else if(/\//.test(D))throw new gu.AddressError("Invalid subnet mask.");let C=e.RE_ZONE_STRING.exec(D);if(C)this.zone=C[0],D=D.replace(e.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){let u=D.toString(16).padStart(32,"0"),F=[],C;for(C=0;C<e.GROUPS;C++)F.push(u.slice(C*4,(C+1)*4));return new HD(F.join(":"))}static fromURL(D){let u,F=null,C;if(D.indexOf("[")!==-1&&D.indexOf("]:")!==-1){if(C=e.RE_URL_WITH_PORT.exec(D),C===null)return{error:"failed to parse address with port",address:null,port:null};u=C[1],F=C[2]}else if(D.indexOf("/")!==-1){if(D=D.replace(/^[a-z0-9]+:\/\//,""),C=e.RE_URL.exec(D),C===null)return{error:"failed to parse address from URL",address:null,port:null};u=C[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){let u=new tu.Address4(D),F=e.BITS-(J3.BITS-u.subnetMask);return new HD(`::ffff:${u.correctForm()}/${F}`)}static fromArpa(D){let u=D.replace(/(\.ip6\.arpa)?\.$/,""),F=7;if(u.length!==63)throw new gu.AddressError("Invalid 'ip6.arpa' form.");let C=u.split(".").reverse();for(let $=F;$>0;$--){let w=$*4;C.splice(w,0,":")}return u=C.join(""),new HD(u)}microsoftTranscription(){return vD.sprintf("%s.ipv6-literal.net",this.correctForm().replace(/:/g,"-"))}mask(D=this.subnetMask){return this.getBitsBase2(0,D)}possibleSubnets(D=128){let u=e.BITS-this.subnetMask,F=Math.abs(D-e.BITS),C=u-F;if(C<0)return"0";return tX(new cD.BigInteger("2",10).pow(C).toString(10))}_startAddress(){return new cD.BigInteger(this.mask()+"0".repeat(e.BITS-this.subnetMask),2)}startAddress(){return HD.fromBigInteger(this._startAddress())}startAddressExclusive(){let D=new cD.BigInteger("1");return HD.fromBigInteger(this._startAddress().add(D))}_endAddress(){return new cD.BigInteger(this.mask()+"1".repeat(e.BITS-this.subnetMask),2)}endAddress(){return HD.fromBigInteger(this._endAddress())}endAddressExclusive(){let D=new cD.BigInteger("1");return HD.fromBigInteger(this._endAddress().subtract(D))}getScope(){let D=e.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(e.TYPES))if(this.isInSubnet(new HD(D)))return e.TYPES[D];return"Global unicast"}getBits(D,u){return new cD.BigInteger(this.getBitsBase2(D,u),2)}getBitsBase2(D,u){return this.binaryZeroPad().slice(D,u)}getBitsBase16(D,u){let 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,e.BITS)}reverseForm(D){if(!D)D={};let 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 vD.sprintf("%s.ip6.arpa.",F)}if(D.omitSuffix)return"";return"ip6.arpa."}correctForm(){let D,u=[],F=0,C=[];for(D=0;D<this.parsedAddress.length;D++){let E=parseInt(this.parsedAddress[D],16);if(E===0)F++;if(E!==0&&F>0){if(F>1)C.push([D-F,D-1]);F=0}}if(F>1)C.push([this.parsedAddress.length-F,this.parsedAddress.length-1]);let $=C.map((E)=>E[1]-E[0]+1);if(C.length>0){let E=$.indexOf(Math.max(...$));u=sX(this.parsedAddress,C[E])}else u=this.parsedAddress;for(D=0;D<u.length;D++)if(u[D]!=="compact")u[D]=parseInt(u[D],16).toString(16);let w=u.join(":");return w=w.replace(/^compact$/,"::"),w=w.replace(/^compact|compact$/,":"),w=w.replace(/compact/,""),w}binaryZeroPad(){return this.bigInteger().toString(2).padStart(e.BITS,"0")}parse4in6(D){let u=D.split(":"),C=u.slice(-1)[0].match(J3.RE_ADDRESS);if(C){this.parsedAddress4=C[0],this.address4=new tu.Address4(this.parsedAddress4);for(let $=0;$<this.address4.groups;$++)if(/^0[0-9]+/.test(this.address4.parsedAddress[$]))throw new gu.AddressError("IPv4 addresses can't have leading zeroes.",D.replace(J3.RE_ADDRESS,this.address4.parsedAddress.map(oX).join(".")));this.v4=!0,u[u.length-1]=this.address4.toGroup6(),D=u.join(":")}return D}parse(D){D=this.parse4in6(D);let u=D.match(e.RE_BAD_CHARACTERS);if(u)throw new gu.AddressError(vD.sprintf("Bad character%s detected in address: %s",u.length>1?"s":"",u.join("")),D.replace(e.RE_BAD_CHARACTERS,'<span class="parse-error">$1</span>'));let F=D.match(e.RE_BAD_ADDRESS);if(F)throw new gu.AddressError(vD.sprintf("Address failed regex: %s",F.join("")),D.replace(e.RE_BAD_ADDRESS,'<span class="parse-error">$1</span>'));let C=[],$=D.split("::");if($.length===2){let w=$[0].split(":"),E=$[1].split(":");if(w.length===1&&w[0]==="")w=[];if(E.length===1&&E[0]==="")E=[];let J=this.groups-(w.length+E.length);if(!J)throw new gu.AddressError("Error parsing groups");this.elidedGroups=J,this.elisionBegin=w.length,this.elisionEnd=w.length+this.elidedGroups,C=C.concat(w);for(let q=0;q<J;q++)C.push("0");C=C.concat(E)}else if($.length===1)C=D.split(":"),this.elidedGroups=0;else throw new gu.AddressError("Too many :: groups found");if(C=C.map((w)=>vD.sprintf("%x",parseInt(w,16))),C.length!==this.groups)throw new gu.AddressError("Incorrect number of groups found");return C}canonicalForm(){return this.parsedAddress.map(g$).join(":")}decimal(){return this.parsedAddress.map((D)=>vD.sprintf("%05d",parseInt(D,16))).join(":")}bigInteger(){return new cD.BigInteger(this.parsedAddress.map(g$).join(""),16)}to4(){let D=this.binaryZeroPad().split("");return tu.Address4.fromHex(new cD.BigInteger(D.slice(96,128).join(""),2).toString(16))}to4in6(){let D=this.to4(),F=new HD(this.parsedAddress.slice(0,6).join(":"),6).correctForm(),C="";if(!/:$/.test(F))C=":";return F+C+D.address}inspectTeredo(){let D=this.getBitsBase16(0,32),u=this.getBits(80,96).xor(new cD.BigInteger("ffff",16)).toString(),F=tu.Address4.fromHex(this.getBitsBase16(32,64)),C=tu.Address4.fromHex(this.getBits(96,128).xor(new cD.BigInteger("ffffffff",16)).toString(16)),$=this.getBits(64,80),w=this.getBitsBase2(64,80),E=$.testBit(15),J=$.testBit(14),q=$.testBit(8),W=$.testBit(9),Z=new cD.BigInteger(w.slice(2,6)+w.slice(8,16),2).toString(10);return{prefix:vD.sprintf("%s:%s",D.slice(0,4),D.slice(4,8)),server4:F.address,client4:C.address,flags:w,coneNat:E,microsoft:{reserved:J,universalLocal:W,groupIndividual:q,nonce:Z},udpPort:u}}inspect6to4(){let D=this.getBitsBase16(0,16),u=tu.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:vD.sprintf("%s",D.slice(0,4)),gateway:u.address}}to6to4(){if(!this.is4())return null;let D=["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":");return new HD(D)}toByteArray(){let D=this.bigInteger().toByteArray();if(D.length===17&&D[0]===0)return D.slice(1);return D}toUnsignedByteArray(){return this.toByteArray().map(P$)}static fromByteArray(D){return this.fromUnsignedByteArray(D.map(P$))}static fromUnsignedByteArray(D){let u=new cD.BigInteger("256",10),F=new cD.BigInteger("0",10),C=new cD.BigInteger("1",10);for(let $=D.length-1;$>=0;$--)F=F.add(C.multiply(new cD.BigInteger(D[$].toString(10),10))),C=C.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=vD.sprintf(":%s",D);return vD.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 vD.sprintf('<a href="%1$s%2$s" class="%3$s">%2$s</a>',D.prefix,u.call(this),D.className);return vD.sprintf('<a href="%1$s%2$s">%2$s</a>',D.prefix,u.call(this))}group(){if(this.elidedGroups===0)return Y3.simpleGroup(this.address).join(":");Y8(typeof this.elidedGroups==="number"),Y8(typeof this.elisionBegin==="number");let D=[],[u,F]=this.address.split("::");if(u.length)D.push(...Y3.simpleGroup(u));else D.push("");let C=["hover-group"];for(let $=this.elisionBegin;$<this.elisionBegin+this.elidedGroups;$++)C.push(vD.sprintf("group-%d",$));if(D.push(vD.sprintf('<span class="%s"></span>',C.join(" "))),F.length)D.push(...Y3.simpleGroup(F,this.elisionEnd));else D.push("");if(this.is4())Y8(this.address4 instanceof tu.Address4),D.pop(),D.push(this.address4.groupForV6());return D.join(":")}regularExpressionString(D=!1){let u=[],F=new HD(this.correctForm());if(F.elidedGroups===0)u.push(ou.simpleRegularExpression(F.parsedAddress));else if(F.elidedGroups===e.GROUPS)u.push(ou.possibleElisions(e.GROUPS));else{let C=F.address.split("::");if(C[0].length)u.push(ou.simpleRegularExpression(C[0].split(":")));if(Y8(typeof F.elidedGroups==="number"),u.push(ou.possibleElisions(F.elidedGroups,C[0].length!==0,C[1].length!==0)),C[1].length)u.push(ou.simpleRegularExpression(C[1].split(":")));u=[u.join(":")]}if(!D)u=["(?=^|",ou.ADDRESS_BOUNDARY,"|[^\\w\\:])(",...u,")(?=[^\\w\\:]|",ou.ADDRESS_BOUNDARY,"|$)"];return u.join("")}regularExpression(D=!1){return new RegExp(this.regularExpressionString(D),"i")}}Ou.Address6=HD});var q3=I((ND)=>{var eX=ND&&ND.__createBinding||(Object.create?function(D,u,F,C){if(C===void 0)C=F;var $=Object.getOwnPropertyDescriptor(u,F);if(!$||("get"in $?!u.__esModule:$.writable||$.configurable))$={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,C,$)}:function(D,u,F,C){if(C===void 0)C=F;D[C]=u[F]}),Dz=ND&&ND.__setModuleDefault||(Object.create?function(D,u){Object.defineProperty(D,"default",{enumerable:!0,value:u})}:function(D,u){D.default=u}),uz=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))eX(u,D,F)}return Dz(u,D),u};Object.defineProperty(ND,"__esModule",{value:!0});ND.v6=ND.AddressError=ND.Address6=ND.Address4=void 0;var Fz=w3();Object.defineProperty(ND,"Address4",{enumerable:!0,get:function(){return Fz.Address4}});var Cz=j$();Object.defineProperty(ND,"Address6",{enumerable:!0,get:function(){return Cz.Address6}});var $z=w8();Object.defineProperty(ND,"AddressError",{enumerable:!0,get:function(){return $z.AddressError}});var Ez=uz(M3());ND.v6={helpers:Ez}});var v$=I((b$)=>{Object.defineProperty(b$,"__esModule",{value:!0});b$.ipToBuffer=b$.int32ToIpv4=b$.ipv4ToInt32=b$.validateSocksClientChainOptions=b$.validateSocksClientOptions=void 0;var nD=F3(),UD=u3(),wz=FD("node:stream"),Z3=q3(),R$=FD("node:net");function Bz(D,u=["connect","bind","associate"]){if(!UD.SocksCommand[D.command])throw new nD.SocksClientError(UD.ERRORS.InvalidSocksCommand,D);if(u.indexOf(D.command)===-1)throw new nD.SocksClientError(UD.ERRORS.InvalidSocksCommandForOperation,D);if(!m$(D.destination))throw new nD.SocksClientError(UD.ERRORS.InvalidSocksClientOptionsDestination,D);if(!S$(D.proxy))throw new nD.SocksClientError(UD.ERRORS.InvalidSocksClientOptionsProxy,D);if(k$(D.proxy,D),D.timeout&&!_$(D.timeout))throw new nD.SocksClientError(UD.ERRORS.InvalidSocksClientOptionsTimeout,D);if(D.existing_socket&&!(D.existing_socket instanceof wz.Duplex))throw new nD.SocksClientError(UD.ERRORS.InvalidSocksClientOptionsExistingSocket,D)}b$.validateSocksClientOptions=Bz;function Mz(D){if(D.command!=="connect")throw new nD.SocksClientError(UD.ERRORS.InvalidSocksCommandChain,D);if(!m$(D.destination))throw new nD.SocksClientError(UD.ERRORS.InvalidSocksClientOptionsDestination,D);if(!(D.proxies&&Array.isArray(D.proxies)&&D.proxies.length>=2))throw new nD.SocksClientError(UD.ERRORS.InvalidSocksClientOptionsProxiesLength,D);if(D.proxies.forEach((u)=>{if(!S$(u))throw new nD.SocksClientError(UD.ERRORS.InvalidSocksClientOptionsProxy,D);k$(u,D)}),D.timeout&&!_$(D.timeout))throw new nD.SocksClientError(UD.ERRORS.InvalidSocksClientOptionsTimeout,D)}b$.validateSocksClientChainOptions=Mz;function k$(D,u){if(D.custom_auth_method!==void 0){if(D.custom_auth_method<UD.SOCKS5_CUSTOM_AUTH_START||D.custom_auth_method>UD.SOCKS5_CUSTOM_AUTH_END)throw new nD.SocksClientError(UD.ERRORS.InvalidSocksClientOptionsCustomAuthRange,u);if(D.custom_auth_request_handler===void 0||typeof D.custom_auth_request_handler!=="function")throw new nD.SocksClientError(UD.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,u);if(D.custom_auth_response_size===void 0)throw new nD.SocksClientError(UD.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,u);if(D.custom_auth_response_handler===void 0||typeof D.custom_auth_response_handler!=="function")throw new nD.SocksClientError(UD.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,u)}}function m$(D){return D&&typeof D.host==="string"&&typeof D.port==="number"&&D.port>=0&&D.port<=65535}function S$(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 _$(D){return typeof D==="number"&&D>0}function Jz(D){return new Z3.Address4(D).toArray().reduce((F,C)=>(F<<8)+C,0)}b$.ipv4ToInt32=Jz;function Yz(D){let u=D>>>24&255,F=D>>>16&255,C=D>>>8&255,$=D&255;return[u,F,C,$].join(".")}b$.int32ToIpv4=Yz;function qz(D){if(R$.isIPv4(D)){let u=new Z3.Address4(D);return Buffer.from(u.toArray())}else if(R$.isIPv6(D)){let u=new Z3.Address6(D);return Buffer.from(u.canonicalForm().split(":").map((F)=>F.padStart(4,"0")).join(""),"hex")}else throw new Error("Invalid IP address format")}b$.ipToBuffer=qz});var i$=I((x$)=>{Object.defineProperty(x$,"__esModule",{value:!0});x$.ReceiveBuffer=void 0;class n${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){let 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.");let 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}}x$.ReceiveBuffer=n$});var d$=I((xu)=>{var y0=xu&&xu.__awaiter||function(D,u,F,C){function $(w){return w instanceof F?w:new F(function(E){E(w)})}return new(F||(F=Promise))(function(w,E){function J(Z){try{W(C.next(Z))}catch(y){E(y)}}function q(Z){try{W(C.throw(Z))}catch(y){E(y)}}function W(Z){Z.done?w(Z.value):$(Z.value).then(J,q)}W((C=C.apply(D,u||[])).next())})};Object.defineProperty(xu,"__esModule",{value:!0});xu.SocksClientError=xu.SocksClient=void 0;var yz=FD("node:events"),W0=FD("node:net"),rD=o7(),V=u3(),sD=v$(),Wz=i$(),X3=F3();Object.defineProperty(xu,"SocksClientError",{enumerable:!0,get:function(){return X3.SocksClientError}});var K3=q3();class Z8 extends yz.EventEmitter{constructor(D){super();this.options=Object.assign({},D),sD.validateSocksClientOptions(D),this.setState(V.SocksClientState.Created)}static createConnection(D,u){return new Promise((F,C)=>{try{sD.validateSocksClientOptions(D,["connect"])}catch(w){if(typeof u==="function")return u(w),F(w);else return C(w)}let $=new Z8(D);$.connect(D.existing_socket),$.once("established",(w)=>{if($.removeAllListeners(),typeof u==="function")u(null,w),F(w);else F(w)}),$.once("error",(w)=>{if($.removeAllListeners(),typeof u==="function")u(w),F(w);else C(w)})})}static createConnectionChain(D,u){return new Promise((F,C)=>y0(this,void 0,void 0,function*(){try{sD.validateSocksClientChainOptions(D)}catch($){if(typeof u==="function")return u($),F($);else return C($)}if(D.randomizeChain)X3.shuffleArray(D.proxies);try{let $;for(let w=0;w<D.proxies.length;w++){let E=D.proxies[w],J=w===D.proxies.length-1?D.destination:{host:D.proxies[w+1].host||D.proxies[w+1].ipaddress,port:D.proxies[w+1].port},q=yield Z8.createConnection({command:"connect",proxy:E,destination:J,existing_socket:$});$=$||q.socket}if(typeof u==="function")u(null,{socket:$}),F({socket:$});else F({socket:$})}catch($){if(typeof u==="function")u($),F($);else C($)}}))}static createUDPFrame(D){let u=new rD.SmartBuffer;if(u.writeUInt16BE(0),u.writeUInt8(D.frameNumber||0),W0.isIPv4(D.remoteHost.host))u.writeUInt8(V.Socks5HostType.IPv4),u.writeUInt32BE(sD.ipv4ToInt32(D.remoteHost.host));else if(W0.isIPv6(D.remoteHost.host))u.writeUInt8(V.Socks5HostType.IPv6),u.writeBuffer(sD.ipToBuffer(D.remoteHost.host));else u.writeUInt8(V.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){let u=rD.SmartBuffer.fromBuffer(D);u.readOffset=2;let F=u.readUInt8(),C=u.readUInt8(),$;if(C===V.Socks5HostType.IPv4)$=sD.int32ToIpv4(u.readUInt32BE());else if(C===V.Socks5HostType.IPv6)$=K3.Address6.fromByteArray(Array.from(u.readBuffer(16))).canonicalForm();else $=u.readString(u.readUInt8());let w=u.readUInt16BE();return{frameNumber:F,remoteHost:{host:$,port:w},data:u.readBuffer()}}setState(D){if(this.state!==V.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();let u=setTimeout(()=>this.onEstablishedTimeout(),this.options.timeout||V.DEFAULT_TIMEOUT);if(u.unref&&typeof u.unref==="function")u.unref();if(D)this.socket=D;else this.socket=new W0.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(V.SocksClientState.Connecting),this.receiveBuffer=new Wz.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){let C=this.receiveBuffer.get(this.receiveBuffer.length);F.socket.emit("data",C)}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!==V.SocksClientState.Established&&this.state!==V.SocksClientState.BoundWaitingForConnection)this.closeSocket(V.ERRORS.ProxyConnectionTimedOut)}onConnectHandler(){if(this.setState(V.SocksClientState.Connected),this.options.proxy.type===4)this.sendSocks4InitialHandshake();else this.sendSocks5InitialHandshake();this.setState(V.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(D){this.receiveBuffer.append(D),this.processData()}processData(){while(this.state!==V.SocksClientState.Established&&this.state!==V.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize)if(this.state===V.SocksClientState.SentInitialHandshake)if(this.options.proxy.type===4)this.handleSocks4FinalHandshakeResponse();else this.handleInitialSocks5HandshakeResponse();else if(this.state===V.SocksClientState.SentAuthentication)this.handleInitialSocks5AuthenticationHandshakeResponse();else if(this.state===V.SocksClientState.SentFinalHandshake)this.handleSocks5FinalHandshakeResponse();else if(this.state===V.SocksClientState.BoundWaitingForConnection)if(this.options.proxy.type===4)this.handleSocks4IncomingConnectionResponse();else this.handleSocks5IncomingConnectionResponse();else{this.closeSocket(V.ERRORS.InternalError);break}}onCloseHandler(){this.closeSocket(V.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!==V.SocksClientState.Error)this.setState(V.SocksClientState.Error),this.socket.destroy(),this.removeInternalSocketHandlers(),this.emit("error",new X3.SocksClientError(D,this.options))}sendSocks4InitialHandshake(){let D=this.options.proxy.userId||"",u=new rD.SmartBuffer;if(u.writeUInt8(4),u.writeUInt8(V.SocksCommand[this.options.command]),u.writeUInt16BE(this.options.destination.port),W0.isIPv4(this.options.destination.host))u.writeBuffer(sD.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=V.SOCKS_INCOMING_PACKET_SIZES.Socks4Response,this.socket.write(u.toBuffer())}handleSocks4FinalHandshakeResponse(){let D=this.receiveBuffer.get(8);if(D[1]!==V.Socks4Response.Granted)this.closeSocket(`${V.ERRORS.Socks4ProxyRejectedConnection} - (${V.Socks4Response[D[1]]})`);else if(V.SocksCommand[this.options.command]===V.SocksCommand.bind){let u=rD.SmartBuffer.fromBuffer(D);u.readOffset=2;let F={port:u.readUInt16BE(),host:sD.int32ToIpv4(u.readUInt32BE())};if(F.host==="0.0.0.0")F.host=this.options.proxy.ipaddress;this.setState(V.SocksClientState.BoundWaitingForConnection),this.emit("bound",{remoteHost:F,socket:this.socket})}else this.setState(V.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{socket:this.socket})}handleSocks4IncomingConnectionResponse(){let D=this.receiveBuffer.get(8);if(D[1]!==V.Socks4Response.Granted)this.closeSocket(`${V.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${V.Socks4Response[D[1]]})`);else{let u=rD.SmartBuffer.fromBuffer(D);u.readOffset=2;let F={port:u.readUInt16BE(),host:sD.int32ToIpv4(u.readUInt32BE())};this.setState(V.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:F,socket:this.socket})}}sendSocks5InitialHandshake(){let D=new rD.SmartBuffer,u=[V.Socks5Auth.NoAuth];if(this.options.proxy.userId||this.options.proxy.password)u.push(V.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=V.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse,this.socket.write(D.toBuffer()),this.setState(V.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){let D=this.receiveBuffer.get(2);if(D[0]!==5)this.closeSocket(V.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion);else if(D[1]===V.SOCKS5_NO_ACCEPTABLE_AUTH)this.closeSocket(V.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType);else if(D[1]===V.Socks5Auth.NoAuth)this.socks5ChosenAuthType=V.Socks5Auth.NoAuth,this.sendSocks5CommandRequest();else if(D[1]===V.Socks5Auth.UserPass)this.socks5ChosenAuthType=V.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(V.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}sendSocks5UserPassAuthentication(){let D=this.options.proxy.userId||"",u=this.options.proxy.password||"",F=new rD.SmartBuffer;F.writeUInt8(1),F.writeUInt8(Buffer.byteLength(D)),F.writeString(D),F.writeUInt8(Buffer.byteLength(u)),F.writeString(u),this.nextRequiredPacketBufferSize=V.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse,this.socket.write(F.toBuffer()),this.setState(V.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return y0(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(V.SocksClientState.SentAuthentication)})}handleSocks5CustomAuthHandshakeResponse(D){return y0(this,void 0,void 0,function*(){return yield this.options.proxy.custom_auth_response_handler(D)})}handleSocks5AuthenticationNoAuthHandshakeResponse(D){return y0(this,void 0,void 0,function*(){return D[1]===0})}handleSocks5AuthenticationUserPassHandshakeResponse(D){return y0(this,void 0,void 0,function*(){return D[1]===0})}handleInitialSocks5AuthenticationHandshakeResponse(){return y0(this,void 0,void 0,function*(){this.setState(V.SocksClientState.ReceivedAuthenticationResponse);let D=!1;if(this.socks5ChosenAuthType===V.Socks5Auth.NoAuth)D=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2));else if(this.socks5ChosenAuthType===V.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(V.ERRORS.Socks5AuthenticationFailed);else this.sendSocks5CommandRequest()})}sendSocks5CommandRequest(){let D=new rD.SmartBuffer;if(D.writeUInt8(5),D.writeUInt8(V.SocksCommand[this.options.command]),D.writeUInt8(0),W0.isIPv4(this.options.destination.host))D.writeUInt8(V.Socks5HostType.IPv4),D.writeBuffer(sD.ipToBuffer(this.options.destination.host));else if(W0.isIPv6(this.options.destination.host))D.writeUInt8(V.Socks5HostType.IPv6),D.writeBuffer(sD.ipToBuffer(this.options.destination.host));else D.writeUInt8(V.Socks5HostType.Hostname),D.writeUInt8(this.options.destination.host.length),D.writeString(this.options.destination.host);D.writeUInt16BE(this.options.destination.port),this.nextRequiredPacketBufferSize=V.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.socket.write(D.toBuffer()),this.setState(V.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){let D=this.receiveBuffer.peek(5);if(D[0]!==5||D[1]!==V.Socks5Response.Granted)this.closeSocket(`${V.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${V.Socks5Response[D[1]]}`);else{let u=D[3],F,C;if(u===V.Socks5HostType.IPv4){let $=V.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<$){this.nextRequiredPacketBufferSize=$;return}if(C=rD.SmartBuffer.fromBuffer(this.receiveBuffer.get($).slice(4)),F={host:sD.int32ToIpv4(C.readUInt32BE()),port:C.readUInt16BE()},F.host==="0.0.0.0")F.host=this.options.proxy.ipaddress}else if(u===V.Socks5HostType.Hostname){let $=D[4],w=V.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname($);if(this.receiveBuffer.length<w){this.nextRequiredPacketBufferSize=w;return}C=rD.SmartBuffer.fromBuffer(this.receiveBuffer.get(w).slice(5)),F={host:C.readString($),port:C.readUInt16BE()}}else if(u===V.Socks5HostType.IPv6){let $=V.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<$){this.nextRequiredPacketBufferSize=$;return}C=rD.SmartBuffer.fromBuffer(this.receiveBuffer.get($).slice(4)),F={host:K3.Address6.fromByteArray(Array.from(C.readBuffer(16))).canonicalForm(),port:C.readUInt16BE()}}if(this.setState(V.SocksClientState.ReceivedFinalResponse),V.SocksCommand[this.options.command]===V.SocksCommand.connect)this.setState(V.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:F,socket:this.socket});else if(V.SocksCommand[this.options.command]===V.SocksCommand.bind)this.setState(V.SocksClientState.BoundWaitingForConnection),this.nextRequiredPacketBufferSize=V.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.emit("bound",{remoteHost:F,socket:this.socket});else if(V.SocksCommand[this.options.command]===V.SocksCommand.associate)this.setState(V.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:F,socket:this.socket})}}handleSocks5IncomingConnectionResponse(){let D=this.receiveBuffer.peek(5);if(D[0]!==5||D[1]!==V.Socks5Response.Granted)this.closeSocket(`${V.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${V.Socks5Response[D[1]]}`);else{let u=D[3],F,C;if(u===V.Socks5HostType.IPv4){let $=V.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<$){this.nextRequiredPacketBufferSize=$;return}if(C=rD.SmartBuffer.fromBuffer(this.receiveBuffer.get($).slice(4)),F={host:sD.int32ToIpv4(C.readUInt32BE()),port:C.readUInt16BE()},F.host==="0.0.0.0")F.host=this.options.proxy.ipaddress}else if(u===V.Socks5HostType.Hostname){let $=D[4],w=V.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname($);if(this.receiveBuffer.length<w){this.nextRequiredPacketBufferSize=w;return}C=rD.SmartBuffer.fromBuffer(this.receiveBuffer.get(w).slice(5)),F={host:C.readString($),port:C.readUInt16BE()}}else if(u===V.Socks5HostType.IPv6){let $=V.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<$){this.nextRequiredPacketBufferSize=$;return}C=rD.SmartBuffer.fromBuffer(this.receiveBuffer.get($).slice(4)),F={host:K3.Address6.fromByteArray(Array.from(C.readBuffer(16))).canonicalForm(),port:C.readUInt16BE()}}this.setState(V.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:F,socket:this.socket})}}get socksClientOptions(){return Object.assign({},this.options)}}xu.SocksClient=Z8});var z3=I((su)=>{var Gz=su&&su.__createBinding||(Object.create?function(D,u,F,C){if(C===void 0)C=F;var $=Object.getOwnPropertyDescriptor(u,F);if(!$||("get"in $?!u.__esModule:$.writable||$.configurable))$={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,C,$)}:function(D,u,F,C){if(C===void 0)C=F;D[C]=u[F]}),Az=su&&su.__exportStar||function(D,u){for(var F in D)if(F!=="default"&&!Object.prototype.hasOwnProperty.call(u,F))Gz(u,D,F)};Object.defineProperty(su,"__esModule",{value:!0});Az(d$(),su)});import Qz from"node:net";import E8 from"node:process";import{buddyOptions as _K,stripAnsi as t0}from"@stacksjs/cli";import{appendFile as l4,mkdir as p4}from"node:fs/promises";import{dirname as Rq}from"node:path";import kq from"node:process";import{italic as r4,stripAnsi as mq}from"@stacksjs/cli";import{basename as Nz,delimiter as gz,dirname as I3,extname as Pz,isAbsolute as jz,join as Rz,normalize as kz,parse as mz,relative as Y5,resolve as L3,sep as Sz,toNamespacedPath as _z}from"node:path";import h3 from"node:process";function Q8(D){return Z5(`logs/${D||""}`)}function q5(D="",u){let F=h3.cwd();while(F.includes("storage"))F=L3(F,"..");let C=L3(F,D);if(u?.relative)return Y5(h3.cwd(),C);return C}function Z5(D){return q5(`storage/${D||""}`)}var X5=new Set([".","!","?"]),lz=new Set([...X5,":",'"',"'","\u201D"]);var H8=[],U8=[],N3={},O0={},V0={};function g3(D){return typeof D==="string"?new RegExp(`^${D}$`,"i"):D}function C1(D,u){if(D===u)return u;if(D===D.toLowerCase())return u.toLowerCase();if(D===D.toUpperCase())return u.toUpperCase();if(D[0]===D[0].toUpperCase())return u.charAt(0).toUpperCase()+u.slice(1).toLowerCase();return u.toLowerCase()}function y5(D,...u){return D.replace(/\$(\d{1,2})/g,(F,C)=>u[Number(C)]||"")}function W5(D,u){return D.replace(u[0],(...F)=>{let C=y5(u[1],...F);if(F[0]==="")return C1(D[F[F.length-2]-1],C);return C1(F[0],C)})}function P3(D,u,F){if(!D.length||N3[D])return u;for(let C=F.length-1;C>=0;C--){let $=F[C];if($[0].test(u))return W5(u,$)}return u}function j3(D,u,F){return(C)=>{let $=C.toLowerCase();if(u[$])return C1(C,$);if(D[$])return C1(C,D[$]);return P3($,C,F)}}function R3(D,u,F){return(C)=>{let $=C.toLowerCase();if(u[$])return!0;if(D[$])return!1;return P3($,$,F)===$}}var hD=(D,u={})=>{let{count:F=2,inclusive:C=!1}=u;if(typeof D!=="string")throw new TypeError("Word must be a string");let $=F===1?hD.singular(D):hD.plural(D);return C?`${F} ${$}`:$};hD.plural=j3(V0,O0,H8);hD.isPlural=R3(V0,O0,H8);hD.singular=j3(O0,V0,U8);hD.isSingular=R3(O0,V0,U8);hD.addPluralRule=(D,u)=>{H8.push([g3(D),u])};hD.addSingularRule=(D,u)=>{U8.push([g3(D),u])};hD.addUncountableRule=(D)=>{if(typeof D==="string"){N3[D.toLowerCase()]=!0;return}hD.addPluralRule(D,"$0"),hD.addSingularRule(D,"$0")};hD.addIrregularRule=(D,u)=>{let F=u.toLowerCase(),C=D.toLowerCase();V0[C]=F,O0[F]=C};[["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"],["my","our"],["its","their"],["his","their"],["her","their"],["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"],["canvas","canvases"]].forEach(([D,u])=>hD.addIrregularRule(D,u));[[/s?$/i,"s"],[/[^\x20-\x7F]$/,"$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(([D,u])=>hD.addPluralRule(D,u));[[/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"],[/(dg|ss|ois|lk|ok|wn|mb|th|ch|ec|oal|is|ck|ix|sser|ts|wb)ies$/i,"$1ie"],[/\b(l|(?:neck|cross|hog|aun)?t|coll|faer|food|gen|goon|group|hipp|junk|vegg|(?:pork)?p|charl|calor|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(([D,u])=>hD.addSingularRule(D,u));["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","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(hD.addUncountableRule);var Dy=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"}'),uy=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 k3(D){return typeof D==="string"}var U5=Object.defineProperty,$1=(D,u)=>{for(var F in u)U5(D,F,{get:u[F],enumerable:!0})};function O8(D,u,F,C,$){for(u=u.split?u.split("."):u,C=0;C<u.length;C++)D=D?D[u[C]]:$;return D===$?F:D}var jF=t(B1(),1),RF=t(c3(),1),kF=t(i3(),1),mF=t(d3(),1),SF=t(p3(),1),_F=t(a3(),1),bF=t(t3(),1),cF=t(e3(),1),vF=t(YF(),1),nF=t(ZF(),1),xF=t(yF(),1),fF=t(WF(),1),iF=t(QF(),1),dF=t(OF(),1),rF=t(TF(),1),lF=t(s8(),1),pF=t(e8(),1),aF=t(e8(),1),tF=t(s8(),1),R0=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,C,$)=>{let w=$.trim().split("."),E=u;while(w.length){if(E===null||typeof E!=="object")return;let J=w.shift();E=Object.hasOwn(E,J)?E[J]:void 0}return E})}getMessage(D,u,F,C){let $=this.#u[F.name]||F.name,w=this.#D[`${F.getFieldPath()}.${u}`];if(w)return this.#F(w,{field:$,...C});let E=this.#D[`${F.wildCardPath}.${u}`];if(E)return this.#F(E,{field:$,...C});let J=this.#D[u];if(J)return this.#F(J,{field:$,...C});return this.#F(D,{field:$,...C})}toJSON(){return{messages:this.#D,fields:this.#u}}},I1={};$1(I1,{E_VALIDATION_ERROR:()=>PF});var D2=class extends Error{constructor(D,u){super("Validation failure",u);this.messages=D;let F=this.constructor;if("captureStackTrace"in Error)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}`}},PF=D2,u2=class{hasErrors=!1;errors=[];report(D,u,F,C){let $={message:D,rule:u,field:F.getFieldPath()};if(C)$.meta=C;if(F.isArrayMember)$.index=F.name;this.hasErrors=!0,this.errors.push($)}createError(){return new PF(this.errors)}},eB=["1",1,"true",!0,"on"],DM=["0",0,"false",!1],uM=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,c={exists(D){return D!==null&&D!==void 0},isMissing(D){return!this.exists(D)},isTrue(D){return eB.includes(D)},isFalse(D){return DM.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:kF.default.default,isAlpha:vF.default.default,isAlphaNumeric:dF.default.default,isIP:jF.default.default,isUUID:_F.default.default,isAscii:bF.default.default,isCreditCard:iF.default.default,isIBAN:SF.default.default,isJWT:RF.default.default,isLatLong:nF.default.default,isMobilePhone:pF.default.default,isPassportNumber:rF.default.default,isPostalCode:lF.default.default,isSlug:mF.default.default,isDecimal:xF.default.default,mobileLocales:aF.locales,postalCountryCodes:tF.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"],isULID(D){if(typeof D!=="string")return!1;if(D[0]>"7")return!1;return uM.test(D)},isHexColor:(D)=>{if(!D.startsWith("#"))return!1;return fF.default.default(D)},isActiveURL:async(D)=>{let{resolve4:u,resolve6:F}=await import("node:dns/promises");try{let{hostname:C}=new URL(D);if((await F(C)).length)return!0;else return(await u(C)).length>0}catch{return!1}},isDistinct:(D,u)=>{let F=new Set;if(!u){for(let $ of D)if(c.exists($))if(F.has($))return!1;else F.add($);return!0}let C=Array.isArray(u)?u:[u];for(let $ of D)if(c.isObject($)&&c.hasKeys($,C)){let w=C.map((E)=>$[E]).join("_");if(F.has(w))return!1;else F.add(w)}return!0},getNestedValue(D,u){if(D.indexOf(".")>-1)return O8(u.data,D);return u.parent[D]}};var g={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",ulid:"The {{ field }} field must be a valid ULID",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"},oF={"":"data"};var w0=class{static macro(D,u){this.prototype[D]=u}static getter(D,u,F=!1){Object.defineProperty(this.prototype,D,{get(){let C=u.call(this);if(F)Object.defineProperty(this,D,{configurable:!1,enumerable:!1,value:C,writable:!1});return C},configurable:!0,enumerable:!1})}};var FM=/[\p{Lu}]/u,CM=/[\p{Ll}]/u,sF=/^[\p{Lu}](?![\p{Lu}])/gu,u9=/([\p{Alpha}\p{N}_]|$)/u,F2=/[_.\- ]+/,$M=new RegExp("^"+F2.source),eF=new RegExp(F2.source+u9.source,"gu"),D9=new RegExp("\\d+"+u9.source,"gu"),EM=(D,u,F,C)=>{let $=!1,w=!1,E=!1,J=!1;for(let q=0;q<D.length;q++){let W=D[q];if(J=q>2?D[q-3]==="-":!0,$&&FM.test(W))D=D.slice(0,q)+"-"+D.slice(q),$=!1,E=w,w=!0,q++;else if(w&&E&&CM.test(W)&&(!J||C))D=D.slice(0,q-1)+"-"+D.slice(q-1),E=w,w=!1,$=!0;else $=u(W)===W&&F(W)!==W,E=w,w=F(W)===W&&u(W)!==W}return D},wM=(D,u)=>{return sF.lastIndex=0,D.replaceAll(sF,(F)=>u(F))},BM=(D,u)=>{return eF.lastIndex=0,D9.lastIndex=0,D.replaceAll(D9,(F,C,$)=>["_","-"].includes(D.charAt($+F.length))?F:u(F)).replaceAll(eF,(F,C)=>u(C))};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((w)=>w.trim()).filter((w)=>w.length).join("-");else D=D.trim();if(D.length===0)return"";let F=u.locale===!1?(w)=>w.toLowerCase():(w)=>w.toLocaleLowerCase(u.locale),C=u.locale===!1?(w)=>w.toUpperCase():(w)=>w.toLocaleUpperCase(u.locale);if(D.length===1){if(F2.test(D))return"";return u.pascalCase?C(D):F(D)}if(D!==F(D))D=EM(D,F,C,u.preserveConsecutiveUppercase);if(D=D.replace($M,""),D=u.preserveConsecutiveUppercase?wM(D,F):F(D),u.pascalCase)D=C(D.charAt(0))+D.slice(1);return BM(D,C)}var m6=t(E2(),1),o=t(E2(),1),S6=t(F9(),1),_6=t(C9(),1),b6=t($9(),1);var Z2=(D,u)=>u.some((F)=>F instanceof RegExp?F.test(D):F===D),MM=new Set(["https:","http:","file:"]),JM=(D)=>{try{let{protocol:u}=new URL(D);return u.endsWith(":")&&!u.includes(".")&&!MM.has(u)}catch{return!1}},YM=(D,{stripHash:u})=>{let F=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(D);if(!F)throw new Error(`Invalid URL: ${D}`);let{type:C,data:$,hash:w}=F.groups,E=C.split(";");w=u?"":w;let J=!1;if(E[E.length-1]==="base64")E.pop(),J=!0;let q=E.shift()?.toLowerCase()??"",Z=[...E.map((y)=>{let[G,z=""]=y.split("=").map((X)=>X.trim());if(G==="charset"){if(z=z.toLowerCase(),z==="us-ascii")return""}return`${G}${z?`=${z}`:""}`}).filter(Boolean)];if(J)Z.push("base64");if(Z.length>0||q&&q!=="text/plain")Z.unshift(q);return`data:${Z.join(";")},${J?$.trim():$}${w?`#${w}`:""}`};function K2(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 YM(D,u);if(JM(D))return D;let F=D.startsWith("//");if(!(!F&&/^\.*\//.test(D)))D=D.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,u.defaultProtocol);let $=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){let E=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,J=0,q="";for(;;){let Z=E.exec($.pathname);if(!Z)break;let y=Z[0],G=Z.index,z=$.pathname.slice(J,G);q+=z.replace(/\/{2,}/g,"/"),q+=y,J=G+y.length}let W=$.pathname.slice(J,$.pathname.length);q+=W.replace(/\/{2,}/g,"/"),$.pathname=q}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 E=$.pathname.split("/"),J=E[E.length-1];if(Z2(J,u.removeDirectoryIndex))E=E.slice(0,-1),$.pathname=E.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 E of[...$.searchParams.keys()])if(Z2(E,u.removeQueryParameters))$.searchParams.delete(E)}if(!Array.isArray(u.keepQueryParameters)&&u.removeQueryParameters===!0)$.search="";if(Array.isArray(u.keepQueryParameters)&&u.keepQueryParameters.length>0){for(let E of[...$.searchParams.keys()])if(!Z2(E,u.keepQueryParameters))$.searchParams.delete(E)}if(u.sortQueryParameters){$.searchParams.sort();try{$.search=decodeURIComponent($.search)}catch{}}if(u.removeTrailingSlash)$.pathname=$.pathname.replace(/\/$/,"");if(u.removeExplicitPort&&$.port)$.port="";let w=D;if(D=$.toString(),!u.removeSingleSlash&&$.pathname==="/"&&!w.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 d6=t(E9(),1),r6=t(w9(),1);var TM=class D{#D="";newLine=`
54
- `;writeStatement(u){this.#D=`${this.#D}${this.newLine}${u}`}child(){return new D}toString(){return this.#D}flush(){this.#D=""}};function LM({parseFnRefId:D,variableName:u,wildCardPath:F,isArrayMember:C,valueExpression:$,parentExpression:w,fieldNameExpression:E,parentValueExpression:J}){let q=D?`refs['${D}'](${$}, {
55
- data: root,
56
- meta: meta,
57
- parent: ${J}
58
- })`:$,W="";if(w==="root"||w==="root_item")W=E;else if(E!=="''")W=`${w}.getFieldPath() + '.' + ${E}`;return`const ${u} = defineValue(${q}, {
59
- data: root,
60
- meta: meta,
61
- name: ${E},
62
- wildCardPath: '${F}',
63
- getFieldPath() {
64
- return ${W};
65
- },
66
- mutate: defineValue,
67
- report: report,
68
- isValid: true,
69
- parent: ${J},
70
- isArrayMember: ${C},
71
- });`}var B0=class{#D;#u;field;constructor(D,u,F,C){if(this.#u=C,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(LM({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}))}};function B9({variableName:D,guardedCodeSnippet:u}){return`if (${D}_is_array) {
72
- ${u}
73
- }`}function P1({variableName:D,bail:u,guardedCodeSnippet:F}){if(!u)return F;return`if (${D}.isValid) {
74
- ${F}
75
- }`}function k0({allowNull:D,conditional:u,variableName:F,outputExpression:C,transformFnRefId:$}){if(!D)return"";return`${u||"if"}(${F}.value === null) {
76
- ${C} = ${$?`refs['${$}'](null, ${F});`:"null;"}
77
- }`}function hM(D,u){let[F,C]=D;if(F&&C)return`if (${F} && ${C}) {
78
- ${u}
79
- }`;if(F)return`if (${F}) {
80
- ${u}
81
- }`;if(C)return`if (${C}) {
82
- ${u}
83
- }`;return u}function IM({isAsync:D,implicit:u,ruleFnId:F},C,$,w,E){let J=`refs['${F}']`,q=`${J}.validator(${C}.value, ${J}.options, ${C});`;E=E||`${C}.isDefined`;let W=$?`${C}.isValid`:"";return hM([W,u||w?"":E],D?`await ${q}`:`${q}`)}function m0({bail:D,validations:u,variableName:F,dropMissingCheck:C,existenceCheckExpression:$}){return`${u.map((w)=>IM(w,F,D,C,$)).join(`
84
- `)}`}function M9({variableName:D,outputExpression:u,outputValueExpression:F}){return`const ${D}_out = ${F};
85
- ${u} = ${D}_out;`}function S0({allowNull:D,isOptional:u,variableName:F}){if(u===!1)if(D===!1)return`ensureExists(${F});`;else return`ensureIsDefined(${F});`;return""}function J9({variableName:D}){return`const ${D}_is_array = ensureIsArray(${D});`}var NM=class extends B0{#D;#u;#F;constructor(D,u,F,C,$){super(D,F,C,$);this.#D=D,this.#u=u,this.#F=F}#C(){let 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(S0({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName})),this.#u.writeStatement(J9({variableName:this.field.variableName})),this.#u.writeStatement(m0({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!1,existenceCheckExpression:`${this.field.variableName}_is_array`}));let D=B9({variableName:this.field.variableName,guardedCodeSnippet:`${this.#u.newLine}${P1({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${M9({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:this.#D.allowUnknownProperties?`copyProperties(${this.field.variableName}.value)`:"[]"})}${this.#u.newLine}${this.#C()}`})}`});this.#u.writeStatement(`${D}${this.#u.newLine}${k0({allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}};function gM({variableName:D,loopCodeSnippet:u,startingIndex:F}){return F=F||0,`const ${D}_items_size = ${D}.value.length;
86
- for (let ${D}_i = ${F}; ${D}_i < ${D}_items_size; ${D}_i++) {
87
- ${u}
88
- }`}var PM=class extends B0{#D;#u;#F;constructor(D,u,F,C,$){super(D,F,C,$);this.#D=D,this.#u=u,this.#F=F}#C(){let 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});let u=this.#u.child();return u.writeStatement(gM({variableName:this.field.variableName,startingIndex:0,loopCodeSnippet:D.toString()})),D.flush(),u.toString()}compile(){this.defineField(this.#u),this.#u.writeStatement(S0({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName})),this.#u.writeStatement(J9({variableName:this.field.variableName})),this.#u.writeStatement(m0({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!1,existenceCheckExpression:`${this.field.variableName}_is_array`}));let D=B9({variableName:this.field.variableName,guardedCodeSnippet:`${this.#u.newLine}${P1({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${M9({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"[]"})}${this.#u.newLine}${this.#C()}`})}`});this.#u.writeStatement(`${D}${this.#u.newLine}${k0({allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}};function jM({parseFnRefId:D,variableName:u}){if(D)return`${u}.value = refs['${D}'](${u}.value);`;return""}function Y9({variableName:D,conditionalFnRefId:u}){return`else {
89
- refs['${u}'](${D}.value, ${D});
90
- }`}function q9({conditional:D,variableName:u,conditionalFnRefId:F,guardedCodeSnippet:C}){return`${D}(refs['${F}'](${u}.value, ${u})) {
91
- ${C}
92
- }`}var RM=class extends B0{#D;#u;#F;#C;constructor(D,u,F,C,$){super(D,F,C,$);this.#u=D,this.#F=u,this.#C=C,this.#D=F}#$(){let D=this.#F.child();if(this.#u.conditions.forEach((u,F)=>{let C=this.#F.child();if("parseFnId"in u.schema)C.writeStatement(jM({parseFnRefId:u.schema.parseFnId,variableName:this.field.variableName}));this.#D.compileNode(u.schema,C,this.#C,this.field),D.writeStatement(q9({conditional:F===0?"if":"else if",variableName:this.field.variableName,conditionalFnRefId:u.conditionalFnRefId,guardedCodeSnippet:C.toString()})),C.flush()}),this.#u.elseConditionalFnRefId&&this.#u.conditions.length)D.writeStatement(Y9({variableName:this.field.variableName,conditionalFnRefId:this.#u.elseConditionalFnRefId}));return D.toString()}compile(){this.defineField(this.#F),this.#F.writeStatement(this.#$())}};function kM({variableName:D,loopCodeSnippet:u}){return`const ${D}_keys = Object.keys(${D}.value);
93
- const ${D}_keys_size = ${D}_keys.length;
94
- for (let ${D}_key_i = 0; ${D}_key_i < ${D}_keys_size; ${D}_key_i++) {
95
- const ${D}_i = ${D}_keys[${D}_key_i];
96
- ${u}
97
- }`}function Z9({variableName:D,guardedCodeSnippet:u}){return`if (${D}_is_object) {
98
- ${u}
99
- }`}function K9({variableName:D,outputExpression:u,outputValueExpression:F}){return`const ${D}_out = ${F};
100
- ${u} = ${D}_out;`}function X9({variableName:D}){return`const ${D}_is_object = ensureIsObject(${D});`}var mM=class extends B0{#D;#u;#F;constructor(D,u,F,C,$){super(D,F,C,$);this.#D=D,this.#u=u,this.#F=F}#C(){let 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(kM({variableName:this.field.variableName,loopCodeSnippet:u.toString()})),u.flush(),D.toString()}compile(){this.defineField(this.#u),this.#u.writeStatement(S0({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName})),this.#u.writeStatement(X9({variableName:this.field.variableName})),this.#u.writeStatement(m0({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!1,existenceCheckExpression:`${this.field.variableName}_is_object`}));let D=P1({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${K9({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"{}"})}${this.#C()}`}),u=Z9({variableName:this.field.variableName,guardedCodeSnippet:`${this.#u.newLine}${D}`});this.#u.writeStatement(`${u}${this.#u.newLine}${k0({allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}};function SM(D){return`[${D.map((u)=>`"${u}"`).join(", ")}]`}function _M({variableName:D,fieldsToIgnore:u,allowUnknownProperties:F}){if(!F)return"";let C=SM(u);return`moveProperties(${D}.value, ${D}_out, ${C});`}var bM=class extends B0{#D;#u;#F;constructor(D,u,F,C,$){super(D,F,C,$);this.#D=D,this.#u=u,this.#F=F}#C(D){let u=D.properties.map((C)=>C.fieldName),F=D.groups.flatMap((C)=>this.#$(C));return u.concat(F)}#$(D){return D.conditions.flatMap((u)=>{return this.#C(u.schema)})}#E(){let 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()}#w(){let 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.#B(F,D,u)),D.toString()}#B(D,u,F){if(D.conditions.forEach((C,$)=>{let w=u.child();C.schema.properties.forEach((E)=>{this.#F.compileNode(E,w,F)}),C.schema.groups.forEach((E)=>{this.#B(E,w,F)}),u.writeStatement(q9({variableName:this.field.variableName,conditional:$===0?"if":"else if",conditionalFnRefId:C.conditionalFnRefId,guardedCodeSnippet:w.toString()}))}),D.elseConditionalFnRefId&&D.conditions.length)u.writeStatement(Y9({variableName:this.field.variableName,conditionalFnRefId:D.elseConditionalFnRefId}))}compile(){this.defineField(this.#u),this.#u.writeStatement(S0({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName})),this.#u.writeStatement(X9({variableName:this.field.variableName})),this.#u.writeStatement(m0({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!1,existenceCheckExpression:`${this.field.variableName}_is_object`}));let D=P1({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${K9({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"{}"})}${this.#u.newLine}${this.#E()}${this.#u.newLine}${this.#w()}${this.#u.newLine}${_M({variableName:this.field.variableName,allowUnknownProperties:this.#D.allowUnknownProperties,fieldsToIgnore:this.#D.allowUnknownProperties?this.#C(this.#D):[]})}`}),u=Z9({variableName:this.field.variableName,guardedCodeSnippet:`${D}`});this.#u.writeStatement(`${u}${this.#u.newLine}${k0({variableName:this.field.variableName,allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,conditional:"else if"})}`)}};function cM(D){return{parentExpression:D.variableName,parentValueExpression:D.variableName,fieldNameExpression:"''",fieldPathExpression:"''",wildCardPath:"",variableName:`${D.variableName}_item`,valueExpression:"root",outputExpression:D.outputExpression,isArrayMember:!1}}function vM({variableName:D,outputExpression:u,transformFnRefId:F}){let C=F?`refs['${F}'](${D}.value, ${D})`:`${D}.value`;return`if (${D}.isDefined && ${D}.isValid) {
101
- ${u} = ${C};
102
- }`}var nM=class extends B0{#D;#u;constructor(D,u,F,C,$){super(D,F,C,$);this.#D=D,this.#u=u}compile(){this.defineField(this.#u),this.#u.writeStatement(S0({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName})),this.#u.writeStatement(m0({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!1})),this.#u.writeStatement(`${vM({variableName:this.field.variableName,outputExpression:this.field.outputExpression,transformFnRefId:this.#D.transformFnId})}${this.#u.newLine}${k0({variableName:this.field.variableName,allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,transformFnRefId:this.#D.transformFnId,conditional:"else if"})}`)}};function xM(D){let 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 fM(D,u){let 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 iM(){return`if(errorReporter.hasErrors) {
103
- throw errorReporter.createError();
104
- }`}var dM=/\d/,rM=/[A-Za-z0-9]+/;function lM(D=""){if(dM.test(D))return;return D!==D.toLowerCase()}function pM(D){return D?D[0].toUpperCase()+D.slice(1):""}function aM(D){return D?D[0].toLowerCase()+D.slice(1):""}function tM(D){let u=[];if(!D||typeof D!=="string")return u;let F="",C,$;for(let w of D){let E=!rM.test(w);if(E===!0){u.push(F),F="",C=void 0;continue}let J=lM(w);if($===!1){if(C===!1&&J===!0){u.push(F),F=w,C=J;continue}if(C===!0&&J===!1&&F.length>1){let q=F.at(-1);u.push(F.slice(0,Math.max(0,F.length-1))),F=q+w,C=J;continue}}F+=w,C=J,$=E}return u.push(F),u}function oM(D){let u=tM(D).map((F)=>pM(F.toLowerCase())).join("");return/^[0-9]+/.test(u)?`var_${u}`:aM(u)}function sM(D,u,F){let C=F.wildCardPath!==""?`${F.wildCardPath}.${D.fieldName}`:D.fieldName;return{parentExpression:F.variableName,parentValueExpression:`${F.variableName}.value`,fieldNameExpression:`'${D.fieldName}'`,fieldPathExpression:C,wildCardPath:C,variableName:`${oM(D.propertyName)}_${u}`,valueExpression:`${F.variableName}.value['${D.fieldName}']`,outputExpression:`${F.variableName}_out['${D.propertyName}']`,isArrayMember:!1}}function eM(D){let 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 DJ(D){return`function report(message, rule, field, args) {
105
- field.isValid = false;
106
- errorReporter.report(messagesProvider.getMessage(message, rule, field, args), rule, field, args);
107
- };
108
- function defineValue(value, field) {
109
- ${D.convertEmptyStringsToNull?"if (value === '') { value = null; }":""}
110
- field.value = value;
111
- field.isDefined = value !== undefined && value !== null;
112
- return field;
113
- };
114
- function ensureExists(field) {
115
- if (field.value === undefined || field.value === null) {
116
- field.report(REQUIRED, 'required', field);
117
- return false;
118
- }
119
- return true;
120
- };
121
- function ensureIsDefined(field) {
122
- if (field.value === undefined) {
123
- field.report(REQUIRED, 'required', field);
124
- return false;
125
- }
126
- return true;
127
- };
128
- function ensureIsObject(field) {
129
- if (!field.isDefined) {
130
- return false;
131
- }
132
- if (typeof field.value == 'object' && !Array.isArray(field.value)) {
133
- return true;
134
- }
135
- field.report(NOT_AN_OBJECT, 'object', field);
136
- return false;
137
- };
138
- function ensureIsArray(field) {
139
- if (!field.isDefined) {
140
- return false;
141
- }
142
- if (Array.isArray(field.value)) {
143
- return true;
144
- }
145
- field.report(NOT_AN_ARRAY, 'array', field);
146
- return false;
147
- };
148
- function copyProperties(val) {
149
- let k, out, tmp;
150
-
151
- if (Array.isArray(val)) {
152
- out = Array((k = val.length))
153
- while (k--) out[k] = (tmp = val[k]) && typeof tmp == 'object' ? copyProperties(tmp) : tmp
154
- return out
155
- }
156
-
157
- if (Object.prototype.toString.call(val) === '[object Object]') {
158
- out = {} // null
159
- for (k in val) {
160
- out[k] = (tmp = val[k]) && typeof tmp == 'object' ? copyProperties(tmp) : tmp
161
- }
162
- return out
163
- }
164
- return val
165
- };
166
- function moveProperties(source, destination, ignoreKeys) {
167
- for (let key in source) {
168
- if (!ignoreKeys.includes(key)) {
169
- const value = source[key]
170
- destination[key] = copyProperties(value)
171
- }
172
- }
173
- };`}function uJ(D){return`const REQUIRED = '${D.required}';
174
- const NOT_AN_OBJECT = '${D.object}';
175
- const NOT_AN_ARRAY = '${D.array}';`}var FJ=Object.getPrototypeOf(async function(){}).constructor,y2=class{variablesCounter=0;#D;#u;#F=new TM;constructor(D,u){this.#D=D,this.#u=u||{convertEmptyStringsToNull:!1}}#C(){this.#F.writeStatement(uJ({required:"value is required",object:"value is not a valid object",array:"value is not a valid array",...this.#u.messages})),this.#F.writeStatement(DJ(this.#u)),this.#F.writeStatement("let out;")}#$(){this.#F.writeStatement(iM()),this.#F.writeStatement("return out;")}#E(){this.compileNode(this.#D.schema,this.#F,{type:"root",variableName:"root",outputExpression:"out",fieldPathExpression:"out",wildCardPath:""})}#w(){return new FJ("root","meta","refs","messagesProvider","errorReporter",this.#F.toString())}createFieldFor(D,u){switch(u.type){case"array":return xM(u);case"root":return cM(u);case"object":return sM(D,this.variablesCounter,u);case"tuple":return fM(D,u);case"record":return eM(u)}}compileNode(D,u,F,C){switch(D.type){case"literal":return new nM(D,u,this,F,C).compile();case"array":return new PM(D,u,this,F,C).compile();case"record":return new mM(D,u,this,F,C).compile();case"object":return new bM(D,u,this,F,C).compile();case"tuple":return new NM(D,u,this,F,C).compile();case"union":return new RM(D,u,this,F,C).compile()}}compile(){this.#C(),this.#E(),this.#$();let D=this.#w();return this.variablesCounter=0,this.#F.flush(),D}};function z9(){let D=0,u={};return{toJSON(){return u},track(F){D++;let C=`ref://${D}`;return u[C]=F,C},trackValidation(F){return this.track(F)},trackParser(F){return this.track(F)},trackTransformer(F){return this.track(F)},trackConditional(F){return this.track(F)}}}function P(D,u){let F={validator:D,isAsync:u?.isAsync||D.constructor.name==="AsyncFunction",implicit:u?.implicit??!1};return function(...C){return{rule:F,options:C[0]}}}var R6={};$1(R6,{COTYPE:()=>EJ,IS_OF_TYPE:()=>uu,ITYPE:()=>CJ,OTYPE:()=>$J,PARSE:()=>p,SUBTYPE:()=>Ju,UNIQUE_NAME:()=>dD,VALIDATION:()=>hu});var dD=Symbol.for("schema_name"),uu=Symbol.for("is_of_type"),p=Symbol.for("parse"),CJ=Symbol.for("opaque_input_type"),$J=Symbol.for("opaque_type"),EJ=Symbol.for("camelcase_opaque_type"),hu=Symbol.for("to_validation"),Ju=Symbol.for("subtype"),Du=P((D,u,F)=>{let C=u(F);if(!F.isDefined&&C)F.report(g.required,"required",F)},{implicit:!0}),R1=class extends w0{optional(D){return new BJ(this,D)}nullable(){return new wJ(this)}transform(D){return new MJ(D,this)}},wJ=class D extends R1{#D;constructor(u){super();this.#D=u}clone(){return new D(this.#D.clone())}[p](u,F,C){let $=this.#D[p](u,F,C);return $.allowNull=!0,$}},BJ=class D extends R1{#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(hu in u?u[hu]():u),this}requiredWhen(u,F,C){if(typeof u==="function")return this.use(Du(u));let $;switch(F){case"=":$=(w)=>w===C;break;case"!=":$=(w)=>w!==C;break;case"in":$=(w)=>C.includes(w);break;case"notIn":$=(w)=>!C.includes(w);break;case">":$=(w)=>w>C;break;case"<":$=(w)=>w<C;break;case">=":$=(w)=>w>=C;break;case"<=":$=(w)=>w<=C}return this.use(Du((w)=>{let E=c.getNestedValue(u,w);return $(E)}))}requiredIfExists(u){let F=Array.isArray(u)?u:[u];return this.use(Du((C)=>{return F.every(($)=>c.exists(c.getNestedValue($,C)))}))}requiredIfAnyExists(u){return this.use(Du((F)=>{return u.some((C)=>c.exists(c.getNestedValue(C,F)))}))}requiredIfMissing(u){let F=Array.isArray(u)?u:[u];return this.use(Du((C)=>{return F.every(($)=>c.isMissing(c.getNestedValue($,C)))}))}requiredIfAnyMissing(u){return this.use(Du((F)=>{return u.some((C)=>c.isMissing(c.getNestedValue(C,F)))}))}clone(){return new D(this.#D.clone(),this.cloneValidations())}[p](u,F,C){let $=this.#D[p](u,F,C);return $.isOptional=!0,$.validations=$.validations.concat(this.compileValidations(F)),$}},MJ=class D extends R1{#D;#u;constructor(u,F){super();this.#u=u,this.#D=F}clone(){return new D(this.#u,this.#D.clone())}[p](u,F,C){let $=this.#D[p](u,F,C);return $.transformFnId=F.trackTransformer(this.#u),$}},Gu=class extends R1{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(hu in D?D[hu]():D),this}bail(D){return this.options.bail=D,this}[p](D,u,F){return{type:"literal",subtype:this[Ju],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)}}},k6=class D extends Gu{constructor(u,F){super(u,F)}[Ju]="any";clone(){return new D(this.cloneOptions(),this.cloneValidations())}},j1=P((D,u,F)=>{let C=typeof u.choices==="function"?u.choices(F):u.choices;if(!C.includes(D))F.report(g.enum,"enum",F,{choices:C})}),k1=class D extends Gu{static rules={enum:j1};#D;[Ju]="enum";getChoices(){return this.#D}constructor(u,F,C){super(F,C||[j1({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"];o.default.extend(b6.default);o.default.extend(S6.default);o.default.extend(_6.default);var JJ=P((D,u,F)=>{if(typeof D!=="string"&&typeof D!=="number"){F.report(g.date,"date",F);return}let C=!1,$=!1,w=u.formats||iu;if(Array.isArray(w))w=[...w],C=w.includes("x"),$=w.includes("iso8601");else if(typeof w!=="string")w={...w},C=w.format==="x",$=w.format==="iso";let E=C?c.asNumber(D):D,J;if(C&&!Number.isNaN(E))J=o.default(E);else J=o.default(D,w,!0);if(!J.isValid()&&$)J=o.default(D);if(!J.isValid()){F.report(g.date,"date",F);return}F.meta.$value=J,F.meta.$formats=w,F.mutate(J.toDate(),F)}),y9=P((D,u,F)=>{if(!F.meta.$value)return;let C=u.compare||"day",$=u.format||iu,w=F.meta.$value,E=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,J=o.default(E,$,!0);if(!J.isValid())throw new Error(`Invalid datetime value "${E}" provided to the equals rule`);if(!w.isSame(J,C))F.report(g["date.equals"],"date.equals",F,{expectedValue:E,compare:C})}),W9=P((D,u,F)=>{if(!F.meta.$value)return;let C=u.compare||"day",$=u.format||iu,w=F.meta.$value,E=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,J=E==="today"?o.default():E==="tomorrow"?o.default().add(1,"day"):o.default(E,$,!0);if(!J.isValid())throw new Error(`Invalid datetime value "${E}" provided to the after rule`);if(!w.isAfter(J,C))F.report(g["date.after"],"date.after",F,{expectedValue:E,compare:C})}),G9=P((D,u,F)=>{if(!F.meta.$value)return;let C=u.compare||"day",$=u.format||iu,w=F.meta.$value,E=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,J=E==="today"?o.default():E==="tomorrow"?o.default().add(1,"day"):o.default(E,$,!0);if(!J.isValid())throw new Error(`Invalid datetime value "${E}" provided to the afterOrEqual rule`);if(!w.isSameOrAfter(J,C))F.report(g["date.afterOrEqual"],"date.afterOrEqual",F,{expectedValue:E,compare:C})}),A9=P((D,u,F)=>{if(!F.meta.$value)return;let C=u.compare||"day",$=u.format||iu,w=F.meta.$value,E=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,J=E==="today"?o.default():E==="yesterday"?o.default().subtract(1,"day"):o.default(E,$,!0);if(!J.isValid())throw new Error(`Invalid datetime value "${E}" provided to the before rule`);if(!w.isBefore(J,C))F.report(g["date.before"],"date.before",F,{expectedValue:E,compare:C})}),Q9=P((D,u,F)=>{if(!F.meta.$value)return;let C=u.compare||"day",$=u.format||iu,w=F.meta.$value,E=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,J=E==="today"?o.default():E==="yesterday"?o.default().subtract(1,"day"):o.default(E,$,!0);if(!J.isValid())throw new Error(`Invalid datetime value "${E}" provided to the beforeOrEqual rule`);if(!w.isSameOrBefore(J,C))F.report(g["date.beforeOrEqual"],"date.beforeOrEqual",F,{expectedValue:E,compare:C})}),H9=P((D,u,F)=>{if(!F.meta.$value)return;let C=u.compare||"day",$=F.meta.$value,w=u.format||F.meta.$formats,E=c.getNestedValue(u.otherField,F),J=o.default(E,w,!0);if(!J.isValid())return;if(!$.isSame(J,C))F.report(g["date.sameAs"],"date.sameAs",F,{otherField:u.otherField,expectedValue:E,compare:C})}),U9=P((D,u,F)=>{if(!F.meta.$value)return;let C=u.compare||"day",$=F.meta.$value,w=u.format||F.meta.$formats,E=c.getNestedValue(u.otherField,F),J=o.default(E,w,!0);if(!J.isValid())return;if($.isSame(J,C))F.report(g["date.notSameAs"],"date.notSameAs",F,{otherField:u.otherField,expectedValue:E,compare:C})}),O9=P((D,u,F)=>{if(!F.meta.$value)return;let C=u.compare||"day",$=F.meta.$value,w=u.format||F.meta.$formats,E=c.getNestedValue(u.otherField,F),J=o.default(E,w,!0);if(!J.isValid())return;if(!$.isAfter(J,C))F.report(g["date.afterField"],"date.afterField",F,{otherField:u.otherField,expectedValue:E,compare:C})}),V9=P((D,u,F)=>{if(!F.meta.$value)return;let C=u.compare||"day",$=F.meta.$value,w=u.format||F.meta.$formats,E=c.getNestedValue(u.otherField,F),J=o.default(E,w,!0);if(!J.isValid())return;if(!$.isSameOrAfter(J,C))F.report(g["date.afterOrSameAs"],"date.afterOrSameAs",F,{otherField:u.otherField,expectedValue:E,compare:C})}),T9=P((D,u,F)=>{if(!F.meta.$value)return;let C=u.compare||"day",$=F.meta.$value,w=u.format||F.meta.$formats,E=c.getNestedValue(u.otherField,F),J=o.default(E,w,!0);if(!J.isValid())return;if(!$.isBefore(J,C))F.report(g["date.beforeField"],"date.beforeField",F,{otherField:u.otherField,expectedValue:E,compare:C})}),L9=P((D,u,F)=>{if(!F.meta.$value)return;let C=u.compare||"day",$=F.meta.$value,w=u.format||F.meta.$formats,E=c.getNestedValue(u.otherField,F),J=o.default(E,w,!0);if(!J.isValid())return;if(!$.isSameOrBefore(J,C))F.report(g["date.beforeOrSameAs"],"date.beforeOrSameAs",F,{otherField:u.otherField,expectedValue:E,compare:C})}),h9=P((D,u,F)=>{if(!F.meta.$value)return;let $=F.meta.$value.day();if($!==0&&$!==6)F.report(g["date.weekend"],"date.weekend",F)}),I9=P((D,u,F)=>{if(!F.meta.$value)return;let $=F.meta.$value.day();if($===0||$===6)F.report(g["date.weekday"],"date.weekday",F)}),G2=class D extends Gu{static rules={equals:y9,after:W9,afterOrEqual:G9,before:A9,beforeOrEqual:Q9,sameAs:H9,notSameAs:U9,afterField:O9,afterOrSameAs:V9,beforeField:T9,beforeOrSameAs:L9,weekend:h9,weekday:I9};[dD]="vine.date";[Ju]="date";[uu]=(u)=>{if(typeof u!=="string")return!1;return m6.default(u,this.options.formats||iu,!0).isValid()};constructor(u,F){super(u,F||[JJ(u||{})])}equals(u,F){return this.use(y9({expectedValue:u,...F}))}after(u,F){return this.use(W9({expectedValue:u,...F}))}afterOrEqual(u,F){return this.use(G9({expectedValue:u,...F}))}before(u,F){return this.use(A9({expectedValue:u,...F}))}beforeOrEqual(u,F){return this.use(Q9({expectedValue:u,...F}))}sameAs(u,F){return this.use(H9({otherField:u,...F}))}notSameAs(u,F){return this.use(U9({otherField:u,...F}))}afterField(u,F){return this.use(O9({otherField:u,...F}))}afterOrSameAs(u,F){return this.use(V9({otherField:u,...F}))}beforeField(u,F){return this.use(T9({otherField:u,...F}))}beforeOrSameAs(u,F){return this.use(L9({otherField:u,...F}))}weekend(){return this.use(h9())}weekday(){return this.use(I9())}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},c6=class D{#D;#u=(u,F)=>{F.report(g.union,"union",F)};constructor(u){this.#D=u}otherwise(u){return this.#u=u,this}clone(){let u=new D(this.#D);return u.otherwise(this.#u),u}[p](u,F,C){return{type:"union",fieldName:u,propertyName:C.toCamelCase?OD(u):u,elseConditionalFnRefId:F.trackConditional(this.#u),conditions:this.#D.map(($)=>$[p](u,F,C))}}},v6=class{#D;#u;constructor(D,u){this.#D=u,this.#u=D}[p](D,u,F){return{conditionalFnRefId:u.trackConditional(this.#u),schema:this.#D[p](D,u,F)}}};function A2(D){return new c6(D)}A2.if=function D(u,F){return new v6(u,F)};A2.else=function D(u){return new v6(()=>!0,u)};var _0=class extends w0{optional(){return new qJ(this)}nullable(){return new YJ(this)}},YJ=class D extends _0{#D;constructor(u){super();this.#D=u}clone(){return new D(this.#D.clone())}[p](u,F,C){let $=this.#D[p](u,F,C);if($.type!=="union")$.allowNull=!0;return $}},qJ=class D extends _0{#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(hu in u?u[hu]():u),this}requiredWhen(u,F,C){if(typeof u==="function")return this.use(Du(u));let $;switch(F){case"=":$=(w)=>w===C;break;case"!=":$=(w)=>w!==C;break;case"in":$=(w)=>C.includes(w);break;case"notIn":$=(w)=>!C.includes(w);break;case">":$=(w)=>w>C;break;case"<":$=(w)=>w<C;break;case">=":$=(w)=>w>=C;break;case"<=":$=(w)=>w<=C}return this.use(Du((w)=>{let E=c.getNestedValue(u,w);return $(E)}))}requiredIfExists(u){let F=Array.isArray(u)?u:[u];return this.use(Du((C)=>{return F.every(($)=>{return c.exists(c.getNestedValue($,C))})}))}requiredIfAnyExists(u){return this.use(Du((F)=>{return u.some((C)=>c.exists(c.getNestedValue(C,F)))}))}requiredIfMissing(u){let F=Array.isArray(u)?u:[u];return this.use(Du((C)=>{return F.every(($)=>c.isMissing(c.getNestedValue($,C)))}))}requiredIfAnyMissing(u){return this.use(Du((F)=>{return u.some((C)=>c.isMissing(c.getNestedValue(C,F)))}))}clone(){return new D(this.#D.clone(),this.cloneValidations())}[p](u,F,C){let $=this.#D[p](u,F,C);if($.type!=="union")$.isOptional=!0,$.validations=$.validations.concat(this.compileValidations(F));return $}},b0=class extends _0{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(hu in D?D[hu]():D),this}bail(D){return this.options.bail=D,this}},n6=class D extends b0{#D;#u=!1;[dD]="vine.array";[uu]=(u)=>{return Array.isArray(u)};constructor(u,F,C){super(F,C);this.#D=u}allowUnknownProperties(){return this.#u=!0,this}clone(){let u=new D(this.#D.map((F)=>F.clone()),this.cloneOptions(),this.cloneValidations());if(this.#u)u.allowUnknownProperties();return u}[p](u,F,C){return{type:"tuple",fieldName:u,propertyName:C.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(($,w)=>$[p](String(w),F,C))}}},N9=P((D,u,F)=>{if(!F.isValid)return;if(D.length<u.min)F.report(g["array.minLength"],"array.minLength",F,u)}),g9=P((D,u,F)=>{if(!F.isValid)return;if(D.length>u.max)F.report(g["array.maxLength"],"array.maxLength",F,u)}),P9=P((D,u,F)=>{if(!F.isValid)return;if(D.length!==u.size)F.report(g["array.fixedLength"],"array.fixedLength",F,u)}),j9=P((D,u,F)=>{if(!F.isValid)return;if(D.length<=0)F.report(g.notEmpty,"notEmpty",F)}),R9=P((D,u,F)=>{if(!F.isValid)return;if(!c.isDistinct(D,u.fields))F.report(g.distinct,"distinct",F,u)}),k9=P((D,u,F)=>{if(!F.isValid)return;F.mutate(D.filter((C)=>c.exists(C)&&C!==""),F)}),x6=class D extends b0{static rules={compact:k9,notEmpty:j9,distinct:R9,minLength:N9,maxLength:g9,fixedLength:P9};#D;[dD]="vine.array";[uu]=(u)=>{return Array.isArray(u)};constructor(u,F,C){super(F,C);this.#D=u}minLength(u){return this.use(N9({min:u}))}maxLength(u){return this.use(g9({max:u}))}fixedLength(u){return this.use(P9({size:u}))}notEmpty(){return this.use(j9())}distinct(u){return this.use(R9({fields:u}))}compact(){return this.use(k9())}clone(){return new D(this.#D.clone(),this.cloneOptions(),this.cloneValidations())}[p](u,F,C){return{type:"array",fieldName:u,propertyName:C.toCamelCase?OD(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,each:this.#D[p]("*",F,C),parseFnId:this.options.parse?F.trackParser(this.options.parse):void 0,validations:this.compileValidations(F)}}},ZJ=class D extends _0{#D;[dD]="types.object";[uu]=(u)=>{return u!==null&&typeof u==="object"&&!Array.isArray(u)};constructor(u){super();this.#D=u}clone(){return new D(this.#D.clone())}[p](u,F,C){return C.toCamelCase=!0,this.#D[p](u,F,C)}},f6=class D extends b0{#D;#u=[];#F=!1;[dD]="vine.object";[uu]=(u)=>{return u!==null&&typeof u==="object"&&!Array.isArray(u)};constructor(u,F,C){if(!u)throw new Error('Missing properties for "vine.object". Use an empty object if you do not want to validate any specific fields');super(F,C);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(){let 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 ZJ(this)}[p](u,F,C){return{type:"object",fieldName:u,propertyName:C.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[$][p]($,F,C)}),groups:this.#u.map(($)=>{return $[p](F,C)})}}},m9=P((D,u,F)=>{if(!F.isValid)return;if(Object.keys(D).length<u.min)F.report(g["record.minLength"],"record.minLength",F,u)}),S9=P((D,u,F)=>{if(!F.isValid)return;if(Object.keys(D).length>u.max)F.report(g["record.maxLength"],"record.maxLength",F,u)}),_9=P((D,u,F)=>{if(!F.isValid)return;if(Object.keys(D).length!==u.size)F.report(g["record.fixedLength"],"record.fixedLength",F,u)}),b9=P((D,u,F)=>{if(!F.isValid)return;u(Object.keys(D),F)}),i6=class D extends b0{static rules={maxLength:S9,minLength:m9,fixedLength:_9,validateKeys:b9};#D;[dD]="vine.object";[uu]=(u)=>{return u!==null&&typeof u==="object"&&!Array.isArray(u)};constructor(u,F,C){super(F,C);this.#D=u}minLength(u){return this.use(m9({min:u}))}maxLength(u){return this.use(S9({max:u}))}fixedLength(u){return this.use(_9({size:u}))}validateKeys(...u){return this.use(b9(...u))}clone(){return new D(this.#D.clone(),this.cloneOptions(),this.cloneValidations())}[p](u,F,C){return{type:"record",fieldName:u,propertyName:C.toCamelCase?OD(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,each:this.#D[p]("*",F,C),parseFnId:this.options.parse?F.trackParser(this.options.parse):void 0,validations:this.compileValidations(F)}}},c9=P((D,u,F)=>{if(typeof D!=="string")F.report(g.string,"string",F)}),v9=P((D,u,F)=>{if(!F.isValid)return;if(!c.isEmail(D,u))F.report(g.email,"email",F)}),n9=P((D,u,F)=>{if(!F.isValid)return;let C=u&&typeof u==="function"?u(F):u,$=C?.locale||"any";if(!c.isMobilePhone(D,$,C))F.report(g.mobile,"mobile",F)}),x9=P((D,u,F)=>{if(!F.isValid)return;if(!c.isIP(D,u?.version))F.report(g.ipAddress,"ipAddress",F)}),f9=P((D,u,F)=>{if(!F.isValid)return;if(!u.test(D))F.report(g.regex,"regex",F)}),i9=P((D,u,F)=>{if(!F.isValid)return;if(!c.isHexColor(D))F.report(g.hexCode,"hexCode",F)}),d9=P((D,u,F)=>{if(!F.isValid)return;if(!c.isURL(D,u))F.report(g.url,"url",F)}),r9=P(async(D,u,F)=>{if(!F.isValid)return;if(!await c.isActiveURL(D))F.report(g.activeUrl,"activeUrl",F)}),l9=P((D,u,F)=>{if(!F.isValid)return;let C="a-zA-Z";if(u){if(u.allowSpaces)C+="\\s";if(u.allowDashes)C+="-";if(u.allowUnderscores)C+="_"}if(!new RegExp(`^[${C}]+$`).test(D))F.report(g.alpha,"alpha",F)}),p9=P((D,u,F)=>{if(!F.isValid)return;let C="a-zA-Z0-9";if(u){if(u.allowSpaces)C+="\\s";if(u.allowDashes)C+="-";if(u.allowUnderscores)C+="_"}if(!new RegExp(`^[${C}]+$`).test(D))F.report(g.alphaNumeric,"alphaNumeric",F)}),a9=P((D,u,F)=>{if(!F.isValid)return;if(D.length<u.min)F.report(g.minLength,"minLength",F,u)}),t9=P((D,u,F)=>{if(!F.isValid)return;if(D.length>u.max)F.report(g.maxLength,"maxLength",F,u)}),o9=P((D,u,F)=>{if(!F.isValid)return;if(D.length!==u.size)F.report(g.fixedLength,"fixedLength",F,u)}),s9=P((D,u,F)=>{if(!F.isValid)return;if(!D.endsWith(u.substring))F.report(g.endsWith,"endsWith",F,u)}),e9=P((D,u,F)=>{if(!F.isValid)return;if(!D.startsWith(u.substring))F.report(g.startsWith,"startsWith",F,u)}),D6=P((D,u,F)=>{if(!F.isValid)return;if(c.getNestedValue(u.otherField,F)!==D){F.report(g.sameAs,"sameAs",F,u);return}}),u6=P((D,u,F)=>{if(!F.isValid)return;if(c.getNestedValue(u.otherField,F)===D){F.report(g.notSameAs,"notSameAs",F,u);return}}),F6=P((D,u,F)=>{if(!F.isValid)return;let C=u?.confirmationField||`${F.name}_confirmation`;if(F.parent[C]!==D){F.report(g.confirmed,"confirmed",F,{otherField:C});return}}),C6=P((D,u,F)=>{if(!F.isValid)return;F.mutate(D.trim(),F)}),$6=P((D,u,F)=>{if(!F.isValid)return;F.mutate(r6.default.default(D,u),F)}),E6=P((D,u,F)=>{if(!F.isValid)return;F.mutate(D.toLocaleUpperCase(u),F)}),w6=P((D,u,F)=>{if(!F.isValid)return;F.mutate(D.toLocaleLowerCase(u),F)}),B6=P((D,u,F)=>{if(!F.isValid)return;F.mutate(OD(D),F)}),M6=P((D,u,F)=>{if(!F.isValid)return;F.mutate(d6.default.default(D),F)}),J6=P((D,u,F)=>{if(!F.isValid)return;F.mutate(K2(D,u),F)}),Y6=P((D,u,F)=>{if(!F.isValid)return;if(!(typeof u.choices==="function"?u.choices(F):u.choices).includes(D)){F.report(g.in,"in",F,u);return}}),q6=P((D,u,F)=>{if(!F.isValid)return;if((typeof u.list==="function"?u.list(F):u.list).includes(D)){F.report(g.notIn,"notIn",F,u);return}}),Z6=P((D,u,F)=>{if(!F.isValid)return;let C=u?typeof u==="function"?u(F)?.provider||[]:u.provider:[];if(!C.length){if(!c.isCreditCard(D))F.report(g.creditCard,"creditCard",F,{providersList:"credit"})}else if(!C.find((w)=>c.isCreditCard(D,{provider:w})))F.report(g.creditCard,"creditCard",F,{providers:C,providersList:C.join("/")})}),K6=P((D,u,F)=>{if(!F.isValid)return;let C=typeof u==="function"?u(F).countryCode:u.countryCode;if(!C.find((w)=>c.isPassportNumber(D,w)))F.report(g.passport,"passport",F,{countryCodes:C})}),X6=P((D,u,F)=>{if(!F.isValid)return;let C=u?typeof u==="function"?u(F)?.countryCode||[]:u.countryCode:[];if(!C.length){if(!c.isPostalCode(D,"any"))F.report(g.postalCode,"postalCode",F)}else if(!C.find((w)=>c.isPostalCode(D,w)))F.report(g.postalCode,"postalCode",F,{countryCodes:C})}),z6=P((D,u,F)=>{if(!F.isValid)return;if(!u||!u.version){if(!c.isUUID(D))F.report(g.uuid,"uuid",F)}else if(!u.version.find(($)=>c.isUUID(D,$)))F.report(g.uuid,"uuid",F,u)}),y6=P((D,u,F)=>{if(!F.isValid)return;if(!c.isULID(D))F.report(g.ulid,"ulid",F)}),W6=P((D,u,F)=>{if(!F.isValid)return;if(!c.isAscii(D))F.report(g.ascii,"ascii",F)}),G6=P((D,u,F)=>{if(!F.isValid)return;if(!c.isIBAN(D))F.report(g.iban,"iban",F)}),A6=P((D,u,F)=>{if(!F.isValid)return;if(!c.isJWT(D))F.report(g.jwt,"jwt",F)}),Q6=P((D,u,F)=>{if(!F.isValid)return;if(!c.isLatLong(D))F.report(g.coordinates,"coordinates",F)}),m1=class D extends Gu{static rules={in:Y6,jwt:A6,url:d9,iban:G6,uuid:z6,ulid:y6,trim:C6,email:v9,alpha:l9,ascii:W6,notIn:q6,regex:f9,escape:M6,sameAs:D6,mobile:n9,string:c9,hexCode:i9,passport:K6,endsWith:s9,confirmed:F6,activeUrl:r9,minLength:a9,notSameAs:u6,maxLength:t9,ipAddress:x9,creditCard:Z6,postalCode:X6,startsWith:e9,toUpperCase:E6,toLowerCase:w6,toCamelCase:B6,fixedLength:o9,coordinates:Q6,normalizeUrl:J6,alphaNumeric:p9,normalizeEmail:$6};[Ju]="string";[dD]="vine.string";[uu]=(u)=>{return typeof u==="string"};constructor(u,F){super(u,F||[c9()])}url(...u){return this.use(d9(...u))}activeUrl(){return this.use(r9())}email(...u){return this.use(v9(...u))}mobile(...u){return this.use(n9(...u))}ipAddress(u){return this.use(x9(u?{version:u}:void 0))}hexCode(){return this.use(i9())}regex(u){return this.use(f9(u))}alpha(u){return this.use(l9(u))}alphaNumeric(u){return this.use(p9(u))}minLength(u){return this.use(a9({min:u}))}maxLength(u){return this.use(t9({max:u}))}fixedLength(u){return this.use(o9({size:u}))}confirmed(u){return this.use(F6(u))}trim(){return this.use(C6())}normalizeEmail(u){return this.use($6(u))}toUpperCase(){return this.use(E6())}toLowerCase(){return this.use(w6())}toCamelCase(){return this.use(B6())}escape(){return this.use(M6())}normalizeUrl(...u){return this.use(J6(...u))}startsWith(u){return this.use(e9({substring:u}))}endsWith(u){return this.use(s9({substring:u}))}sameAs(u){return this.use(D6({otherField:u}))}notSameAs(u){return this.use(u6({otherField:u}))}in(u){return this.use(Y6({choices:u}))}notIn(u){return this.use(q6({list:u}))}creditCard(...u){return this.use(Z6(...u))}passport(...u){return this.use(K6(...u))}postalCode(...u){return this.use(X6(...u))}uuid(...u){return this.use(z6(...u))}ulid(){return this.use(y6())}ascii(){return this.use(W6())}iban(){return this.use(G6())}jwt(){return this.use(A6())}coordinates(){return this.use(Q6())}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},H6=P((D,u,F)=>{let C=u.strict?D:c.asNumber(D);if(typeof C!=="number"||Number.isNaN(C)||C===Number.POSITIVE_INFINITY||C===Number.NEGATIVE_INFINITY){F.report(g.number,"number",F);return}F.mutate(C,F)}),U6=P((D,u,F)=>{if(!F.isValid)return;if(D<u.min)F.report(g.min,"min",F,u)}),O6=P((D,u,F)=>{if(!F.isValid)return;if(D>u.max)F.report(g.max,"max",F,u)}),V6=P((D,u,F)=>{if(!F.isValid)return;if(D<u.min||D>u.max)F.report(g.range,"range",F,u)}),T6=P((D,u,F)=>{if(!F.isValid)return;if(D<0)F.report(g.positive,"positive",F)}),L6=P((D,u,F)=>{if(!F.isValid)return;if(D>=0)F.report(g.negative,"negative",F)}),h6=P((D,u,F)=>{if(!F.isValid)return;if(!c.isDecimal(String(D),{force_decimal:u.range[0]!==0,decimal_digits:u.range.join(",")}))F.report(g.decimal,"decimal",F,{digits:u.range.join("-")})}),I6=P((D,u,F)=>{if(!F.isValid)return;if(!Number.isInteger(D))F.report(g.withoutDecimals,"withoutDecimals",F)}),N6=P((D,u,F)=>{if(!F.isValid)return;if(!u.values.includes(D))F.report(g["number.in"],"in",F,u)}),S1=class D extends Gu{static rules={in:N6,max:O6,min:U6,range:V6,number:H6,decimal:h6,negative:L6,positive:T6,withoutDecimals:I6};[Ju]="number";[dD]="vine.number";[uu]=(u)=>{let F=c.asNumber(u);return!Number.isNaN(F)};constructor(u,F){super(u,F||[H6(u||{})])}min(u){return this.use(U6({min:u}))}max(u){return this.use(O6({max:u}))}range(u){return this.use(V6({min:u[0],max:u[1]}))}positive(){return this.use(T6())}negative(){return this.use(L6())}decimal(u){return this.use(h6({range:Array.isArray(u)?u:[u]}))}withoutDecimals(){return this.use(I6())}clone(){return new D(this.cloneOptions(),this.cloneValidations())}in(u){return this.use(N6({values:u}))}},g6=P((D,u,F)=>{let C=u.strict===!0?D:c.asBoolean(D);if(typeof C!=="boolean"){F.report(g.boolean,"boolean",F);return}F.mutate(C,F)}),_1=class D extends Gu{static rules={boolean:g6};[Ju]="boolean";[dD]="vine.boolean";[uu]=(u)=>{return typeof(this.options.strict===!0?u:c.asBoolean(u))==="boolean"};constructor(u,F){super(u,F||[g6(u||{})])}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},P6=P((D,u,F)=>{let C=D;if(typeof u.expectedValue==="boolean")C=c.asBoolean(D);else if(typeof u.expectedValue==="number")C=c.asNumber(D);if(C!==u.expectedValue){F.report(g.literal,"literal",F,u);return}F.mutate(C,F)}),l6=class D extends Gu{static rules={equals:P6};#D;[Ju]="literal";constructor(u,F,C){super(F,C||[P6({expectedValue:u})]);this.#D=u}clone(){return new D(this.#D,this.cloneOptions(),this.cloneValidations())}},KJ=["on","1","yes","true",!0,1],j6=P((D,u,F)=>{if(!KJ.includes(D))F.report(g.accepted,"accepted",F)}),p6=class D extends Gu{static rules={accepted:j6};[Ju]="checkbox";constructor(u,F){super(u,F||[j6()])}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},XJ=class D{#D;#u=(u,F)=>{F.report(g.unionGroup,"unionGroup",F)};constructor(u){this.#D=u}clone(){let u=new D(this.#D);return u.otherwise(this.#u),u}otherwise(u){return this.#u=u,this}[p](u,F){return{type:"group",elseConditionalFnRefId:u.trackConditional(this.#u),conditions:this.#D.map((C)=>C[p](u,F))}}},a6=class{#D;#u;constructor(D,u){this.#D=u,this.#u=D}[p](D,u){return{schema:{type:"sub_object",properties:Object.keys(this.#D).map((F)=>{return this.#D[F][p](F,D,u)}),groups:[]},conditionalFnRefId:D.trackConditional(this.#u)}}};function Q2(D){return new XJ(D)}Q2.if=function D(u,F){return new a6(u,F)};Q2.else=function D(u){return new a6(()=>!0,u)};var t6=class D extends Gu{static rules={enum:j1};#D;[Ju]="enum";constructor(u,F,C){super(F,C||[j1({choices:Object.values(u)})]);this.#D=u}clone(){return new D(this.#D,this.cloneOptions(),this.cloneValidations())}},zJ=class D{#D;#u=(u,F)=>{F.report(g.unionOfTypes,"unionOfTypes",F)};constructor(u){this.#D=u}otherwise(u){return this.#u=u,this}clone(){let u=new D(this.#D);return u.otherwise(this.#u),u}[p](u,F,C){return{type:"union",fieldName:u,propertyName:C.toCamelCase?OD(u):u,elseConditionalFnRefId:F.trackConditional(this.#u),conditions:this.#D.map(($)=>{return{conditionalFnRefId:F.trackConditional((w,E)=>{return $[uu](w,E)}),schema:$[p](u,F,C)}})}}},yJ=class extends w0{group=Q2;union=A2;string(){return new m1}boolean(D){return new _1(D)}accepted(){return new p6}number(D){return new S1(D)}date(D){return new G2(D)}literal(D){return new l6(D)}object(D){return new f6(D)}array(D){return new x6(D)}tuple(D){return new n6(D)}record(D){return new i6(D)}enum(D){if(Array.isArray(D)||typeof D==="function")return new k1(D);return new t6(D)}any(){return new k6}unionOfTypes(D){let u=new Set;return D.forEach((F)=>{if(!F[uu]||!F[dD])throw new Error(`Cannot use "${F.constructor.name}". The schema type is not compatible for use with "vine.unionOfTypes"`);if(u.has(F[dD]))throw new Error(`Cannot use duplicate schema "${F[dD]}". "vine.unionOfTypes" needs distinct schema types only`);u.add(F[dD])}),u.clear(),new zJ(D)}},WJ={required:g.required,array:g.array,object:g.object},W2=class{#D;messagesProvider;errorReporter;#u(D){let u=z9();return{compilerNode:{type:"root",schema:D[p]("",u,{toCamelCase:!1})},refs:u.toJSON()}}constructor(D,u){let{compilerNode:F,refs:C}=this.#u(D);this.#D={schema:F,refs:C};let $=u.metaDataValidator,w=new y2(F,{convertEmptyStringsToNull:u.convertEmptyStringsToNull,messages:WJ}).compile();if(this.errorReporter=u.errorReporter,this.messagesProvider=u.messagesProvider,$)this.validate=(E,J)=>{let q=J??{},W=q.meta??{},Z=q.errorReporter??this.errorReporter,y=q.messagesProvider??this.messagesProvider;return $(W),w(E,W,C,y,Z())};else this.validate=(E,J)=>{let q=J??{},W=q.meta??{},Z=q.errorReporter??this.errorReporter,y=q.messagesProvider??this.messagesProvider;return w(E,W,C,y,Z())}}async tryValidate(D,...[u]){try{return[null,await this.validate(D,u)]}catch(F){if(F instanceof D2)return[F,null];throw F}}toJSON(){let{schema:D,refs:u}=this.#D;return{schema:structuredClone(D),refs:u}}},o6=class extends yJ{messagesProvider=new R0(g,oF);errorReporter=()=>new u2;convertEmptyStringsToNull=!1;helpers=c;createRule=P;compile(D){return new W2(D,{convertEmptyStringsToNull:this.convertEmptyStringsToNull,messagesProvider:this.messagesProvider,errorReporter:this.errorReporter})}withMetaData(D){return{compile:(u)=>{return new W2(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)}},$A=new o6;var a4=t(d4(),1);class m2{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);let C=new Error(F);if(D instanceof Error)Object.assign(C,D);return this.writeErrorToFile(C).catch(($)=>console.error($)),C}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}let u=`[${new Date().toISOString()}] ${D.name}: ${D.message}
176
- `,F=Q8("stacks.log")??Q8("errors.log");try{await p4(I3(F),{recursive:!0}),await l4(F,u)}catch(C){console.error("Failed to write to error file:",C)}}static writeErrorToConsole(D){console.error(D);let 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: ${r4("bunx --bun eslint . --fix")}`||u===`Failed to execute command: ${r4("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)kq.exit(1)}}var Sq="storage/logs/stacks.log";async function bu(D,u){let C=`[${new Date().toISOString()}] ${D}
177
- `,$=u?.logFile??Sq,w=Rq($);if(!a4.default.existsSync(w))await p4(w,{recursive:!0});await l4($,C)}function t4(D,u){let F,C;if(u&&typeof u==="object"&&!("shouldExit"in u)&&!("silent"in u)&&!("message"in u))C=u,u=void 0;if(u&&"message"in u)F=u.message;else if(k3(D))F=D;else if(D instanceof Error)F=D.stack||D.message;else F=String(D);let $=`ERROR: ${mq(F)}`;if(C)$+=`
178
- Context: ${JSON.stringify(C,null,2)}`;return bu($),m2.handle(D,u)}var _q={withStackTrace:!1},e4=(D,u,F=_q)=>{let C=u.isOk()?{type:"Ok",value:u.value}:{type:"Err",value:u.error},$=F.withStackTrace?new Error().stack:void 0;return{data:C,message:D,stack:$}};function lu(D,u,F,C){function $(w){return w instanceof F?w:new F(function(E){E(w)})}return new(F||(F=Promise))(function(w,E){function J(Z){try{W(C.next(Z))}catch(y){E(y)}}function q(Z){try{W(C.throw(Z))}catch(y){E(y)}}function W(Z){Z.done?w(Z.value):$(Z.value).then(J,q)}W((C=C.apply(D,u||[])).next())})}function o4(D){var u=typeof Symbol==="function"&&Symbol.iterator,F=u&&D[u],C=0;if(F)return F.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&C>=D.length)D=void 0;return{value:D&&D[C++],done:!D}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")}function Qu(D){return this instanceof Qu?(this.v=D,this):new Qu(D)}function s4(D,u,F){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var C=F.apply(D,u||[]),$,w=[];return $=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),J("next"),J("throw"),J("return",E),$[Symbol.asyncIterator]=function(){return this},$;function E(z){return function(X){return Promise.resolve(X).then(z,y)}}function J(z,X){if(C[z]){if($[z]=function(R){return new Promise(function(b,v){w.push([z,R,b,v])>1||q(z,R)})},X)$[z]=X($[z])}}function q(z,X){try{W(C[z](X))}catch(R){G(w[0][3],R)}}function W(z){z.value instanceof Qu?Promise.resolve(z.value.v).then(Z,y):G(w[0][2],z)}function Z(z){q("next",z)}function y(z){q("throw",z)}function G(z,X){if(z(X),w.shift(),w.length)q(w[0][0],w[0][1])}}function bq(D){var u,F;return u={},C("next"),C("throw",function($){throw $}),C("return"),u[Symbol.iterator]=function(){return this},u;function C($,w){u[$]=D[$]?function(E){return(F=!F)?{value:Qu(D[$](E)),done:!1}:w?w(E):E}:w}}function cq(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 o4==="function"?o4(D):D[Symbol.iterator](),F={},C("next"),C("throw"),C("return"),F[Symbol.asyncIterator]=function(){return this},F);function C(w){F[w]=D[w]&&function(E){return new Promise(function(J,q){E=D[w](E),$(J,q,E.done,E.value)})}}function $(w,E,J,q){Promise.resolve(q).then(function(W){w({value:W,done:J})},E)}}class YD{constructor(D){this._promise=D}static fromSafePromise(D){let u=D.then((F)=>new Fu(F));return new YD(u)}static fromPromise(D,u){let F=D.then((C)=>new Fu(C)).catch((C)=>new tD(u(C)));return new YD(F)}static fromThrowable(D,u){return(...F)=>{return new YD((()=>lu(this,void 0,void 0,function*(){try{return new Fu(yield D(...F))}catch(C){return new tD(u?u(C):C)}}))())}}static combine(D){return xq(D)}static combineWithAllErrors(D){return fq(D)}map(D){return new YD(this._promise.then((u)=>lu(this,void 0,void 0,function*(){if(u.isErr())return new tD(u.error);return new Fu(yield D(u.value))})))}andThrough(D){return new YD(this._promise.then((u)=>lu(this,void 0,void 0,function*(){if(u.isErr())return new tD(u.error);let F=yield D(u.value);if(F.isErr())return new tD(F.error);return new Fu(u.value)})))}andTee(D){return new YD(this._promise.then((u)=>lu(this,void 0,void 0,function*(){if(u.isErr())return new tD(u.error);try{yield D(u.value)}catch(F){}return new Fu(u.value)})))}orTee(D){return new YD(this._promise.then((u)=>lu(this,void 0,void 0,function*(){if(u.isOk())return new Fu(u.value);try{yield D(u.error)}catch(F){}return new tD(u.error)})))}mapErr(D){return new YD(this._promise.then((u)=>lu(this,void 0,void 0,function*(){if(u.isOk())return new Fu(u.value);return new tD(yield D(u.error))})))}andThen(D){return new YD(this._promise.then((u)=>{if(u.isErr())return new tD(u.error);let F=D(u.value);return F instanceof YD?F._promise:F}))}orElse(D){return new YD(this._promise.then((u)=>lu(this,void 0,void 0,function*(){if(u.isErr())return D(u.error);return new Fu(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 s4(this,arguments,function*D(){return yield Qu(yield Qu(yield*bq(cq(yield Qu(this._promise.then((u)=>u.safeUnwrap()))))))})}then(D,u){return this._promise.then(D,u)}[Symbol.asyncIterator](){return s4(this,arguments,function*D(){let u=yield Qu(this._promise);if(u.isErr())yield yield Qu(r0(u.error));return yield Qu(u.value)})}}function r0(D){return new YD(Promise.resolve(new tD(D)))}var{fromPromise:vq,fromSafePromise:nq,fromThrowable:gQ}=YD,D7=(D)=>{let u=Nu([]);for(let F of D)if(F.isErr()){u=qu(F.error);break}else u.map((C)=>C.push(F.value));return u},xq=(D)=>YD.fromSafePromise(Promise.all(D)).andThen(D7),u7=(D)=>{let u=Nu([]);for(let F of D)if(F.isErr()&&u.isErr())u.error.push(F.error);else if(F.isErr()&&u.isOk())u=qu([F.error]);else if(F.isOk()&&u.isOk())u.value.push(F.value);return u},fq=(D)=>YD.fromSafePromise(Promise.all(D)).andThen(u7),a1;(function(D){function u($,w){return(...E)=>{try{let J=$(...E);return Nu(J)}catch(J){return qu(w?w(J):J)}}}D.fromThrowable=u;function F($){return D7($)}D.combine=F;function C($){return u7($)}D.combineWithAllErrors=C})(a1||(a1={}));function Nu(D){return new Fu(D)}function qu(D){return new tD(D)}class Fu{constructor(D){this.value=D}isOk(){return!0}isErr(){return!this.isOk()}map(D){return Nu(D(this.value))}mapErr(D){return Nu(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 Nu(this.value)}orTee(D){return Nu(this.value)}orElse(D){return Nu(this.value)}asyncAndThen(D){return D(this.value)}asyncAndThrough(D){return D(this.value).map(()=>this.value)}asyncMap(D){return YD.fromSafePromise(D(this.value))}unwrapOr(D){return this.value}match(D,u){return D(this.value)}safeUnwrap(){let D=this.value;return function*(){return D}()}_unsafeUnwrap(D){return this.value}_unsafeUnwrapErr(D){throw e4("Called `_unsafeUnwrapErr` on an Ok",this,D)}*[Symbol.iterator](){return this.value}}class tD{constructor(D){this.error=D}isOk(){return!1}isErr(){return!this.isOk()}map(D){return qu(this.error)}mapErr(D){return qu(D(this.error))}andThrough(D){return qu(this.error)}andTee(D){return qu(this.error)}orTee(D){try{D(this.error)}catch(u){}return qu(this.error)}andThen(D){return qu(this.error)}orElse(D){return D(this.error)}asyncAndThen(D){return r0(this.error)}asyncAndThrough(D){return r0(this.error)}asyncMap(D){return r0(this.error)}unwrapOr(D){return D}match(D,u){return u(this.error)}safeUnwrap(){let D=this.error;return function*(){throw yield qu(D),new Error("Do not use this generator out of `safeTry`")}()}_unsafeUnwrap(D){throw e4("Called `_unsafeUnwrap` on an Err",this,D)}_unsafeUnwrapErr(D){return this.error}*[Symbol.iterator](){let D=this;return yield D,D}}var iq=a1.fromThrowable;var TD={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},c2={silent:{level:-1},fatal:{level:TD.fatal},error:{level:TD.error},warn:{level:TD.warn},log:{level:TD.log},info:{level:TD.info},success:{level:TD.success},fail:{level:TD.fail},ready:{level:TD.info},start:{level:TD.info},box:{level:TD.info},debug:{level:TD.debug},trace:{level:TD.trace},verbose:{level:TD.verbose}};function S2(D){if(D===null||typeof D!=="object")return!1;let u=Object.getPrototypeOf(D);if(u!==null&&u!==Object.prototype&&Object.getPrototypeOf(u)!==null)return!1;if(Symbol.iterator in D)return!1;if(Symbol.toStringTag in D)return Object.prototype.toString.call(D)==="[object Module]";return!0}function v2(D,u,F=".",C){if(!S2(u))return v2(D,{},F,C);let $=Object.assign({},u);for(let w in D){if(w==="__proto__"||w==="constructor")continue;let E=D[w];if(E===null||E===void 0)continue;if(C&&C($,w,E,F))continue;if(Array.isArray(E)&&Array.isArray($[w]))$[w]=[...E,...$[w]];else if(S2(E)&&S2($[w]))$[w]=v2(E,$[w],(F?`${F}.`:"")+w.toString(),C);else $[w]=E}return $}function dq(D){return(...u)=>u.reduce((F,C)=>v2(F,C,"",D),{})}var rq=dq();function lq(D){return Object.prototype.toString.call(D)==="[object Object]"}function pq(D){if(!lq(D))return!1;if(!D.message&&!D.args)return!1;if(D.stack)return!1;return!0}var _2=!1,F7=[];class AD{options;_lastLog;_mockFn;constructor(D={}){let u=D.types||c2;this.options=rq({...D,defaults:{...D.defaults},level:b2(D.level,u),reporters:[...D.reporters||[]]},{types:c2,throttle:1000,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(let F in u){let C={type:F,...this.options.defaults,...u[F]};this[F]=this._wrapLogFn(C),this[F].raw=this._wrapLogFn(C,!0)}if(this.options.mockFn)this.mockTypes();this._lastLog={}}get level(){return this.options.level}set level(D){this.options.level=b2(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){let u=new AD({...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){let u=this.options.reporters.indexOf(D);if(u!==-1)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(){_2=!0}resumeLogs(){_2=!1;let D=F7.splice(0);for(let u of D)u[0]._logFn(u[1],u[2])}mockTypes(D){let 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(_2){F7.push([this,D,F,u]);return}return this._logFn(D,F,u)}}_logFn(D,u,F){if((D.level||0)>this.level)return!1;let C={date:new Date,args:[],...D,level:b2(D.level,this.options.types)};if(!F&&u.length===1&&pq(u[0]))Object.assign(C,u[0]);else C.args=[...u];if(C.message)C.args.unshift(C.message),delete C.message;if(C.additional){if(!Array.isArray(C.additional))C.additional=C.additional.split(`
179
- `);C.args.push(`
180
- `+C.additional.join(`
181
- `)),delete C.additional}C.type=typeof C.type==="string"?C.type.toLowerCase():"log",C.tag=typeof C.tag==="string"?C.tag:"";let $=(E=!1)=>{let J=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&J>0){let q=[...this._lastLog.object.args];if(J>1)q.push(`(repeated ${J} times)`);this._log({...this._lastLog.object,args:q}),this._lastLog.count=1}if(E)this._lastLog.object=C,this._log(C)};clearTimeout(this._lastLog.timeout);let w=this._lastLog.time&&C.date?C.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=C.date,w<this.options.throttle)try{let E=JSON.stringify([C.type,C.tag,C.args]),J=this._lastLog.serialized===E;if(this._lastLog.serialized=E,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})}}function b2(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}AD.prototype.add=AD.prototype.addReporter;AD.prototype.remove=AD.prototype.removeReporter;AD.prototype.clear=AD.prototype.removeReporter;AD.prototype.withScope=AD.prototype.withTag;AD.prototype.mock=AD.prototype.mockTypes;AD.prototype.pause=AD.prototype.pauseLogs;AD.prototype.resume=AD.prototype.resumeLogs;function C7(D={}){return new AD(D)}import{formatWithOptions as $7}from"node:util";import{sep as aq}from"node:path";function x2(D,u){let F=process.cwd()+aq;return D.split(`
182
- `).splice(u.split(`
183
- `).length).map(($)=>$.trim().replace("file://","").replace(F,""))}function tq(D,u){return(u.__write||u.write).call(u,D)}var n2=(D)=>D?`[${D}]`:"";class t1{formatStack(D,u,F){let C=" ".repeat((F?.errorLevel||0)+1);return C+x2(D,u).join(`
184
- ${C}`)}formatError(D,u){let F=D.message??$7(u,D),C=D.stack?this.formatStack(D.stack,F,u):"",$=u?.errorLevel||0,w=$>0?`${" ".repeat($)}[cause]: `:"",E=D.cause?`
185
-
186
- `+this.formatError(D.cause,{...u,errorLevel:$+1}):"";return w+F+`
187
- `+C+E}formatArgs(D,u){let F=D.map((C)=>{if(C&&typeof C.stack==="string")return this.formatError(C,u);return C});return $7(u,...F)}formatDate(D,u){return u.date?D.toLocaleTimeString():""}filterAndJoin(D){return D.filter(Boolean).join(" ")}formatLogObj(D,u){let F=this.formatArgs(D.args,u);if(D.type==="box")return`
188
- `+[n2(D.tag),D.title&&D.title,...F.split(`
189
- `)].filter(Boolean).map((C)=>" > "+C).join(`
190
- `)+`
191
- `;return this.filterAndJoin([n2(D.type),n2(D.tag),F])}log(D,u){let F=this.formatLogObj(D,{columns:u.options.stdout.columns||0,...u.options.formatOptions});return tq(F+`
192
- `,D.level<2?u.options.stderr||process.stderr:u.options.stdout||process.stdout)}}import _7 from"node:process";import*as o1 from"node:tty";var{env:vu={},argv:B7=[],platform:oq=""}=typeof process==="undefined"?{}:process,sq="NO_COLOR"in vu||B7.includes("--no-color"),eq="FORCE_COLOR"in vu||B7.includes("--color"),DZ=oq==="win32",M7=vu.TERM==="dumb",uZ=o1&&o1.isatty&&o1.isatty(1)&&vu.TERM&&!M7,FZ="CI"in vu&&(("GITHUB_ACTIONS"in vu)||("GITLAB_CI"in vu)||("CIRCLECI"in vu)),CZ=!sq&&(eq||DZ&&!M7||uZ||FZ);function J7(D,u,F,C,$=u.slice(0,Math.max(0,D))+C,w=u.slice(Math.max(0,D+F.length)),E=w.indexOf(F)){return $+(E<0?w:J7(E,w,F,C))}function $Z(D,u,F,C,$){return D<0?F+u+C:F+J7(D,u,C,$)+C}function EZ(D,u,F=D,C=D.length+1){return($)=>$||!($===""||$===void 0)?$Z((""+$).indexOf(u,C),$,D,u,F):""}function f(D,u,F){return EZ(`\x1B[${D}m`,`\x1B[${u}m`,F)}var E7={reset:f(0,0),bold:f(1,22,"\x1B[22m\x1B[1m"),dim:f(2,22,"\x1B[22m\x1B[2m"),italic:f(3,23),underline:f(4,24),inverse:f(7,27),hidden:f(8,28),strikethrough:f(9,29),black:f(30,39),red:f(31,39),green:f(32,39),yellow:f(33,39),blue:f(34,39),magenta:f(35,39),cyan:f(36,39),white:f(37,39),gray:f(90,39),bgBlack:f(40,49),bgRed:f(41,49),bgGreen:f(42,49),bgYellow:f(43,49),bgBlue:f(44,49),bgMagenta:f(45,49),bgCyan:f(46,49),bgWhite:f(47,49),blackBright:f(90,39),redBright:f(91,39),greenBright:f(92,39),yellowBright:f(93,39),blueBright:f(94,39),magentaBright:f(95,39),cyanBright:f(96,39),whiteBright:f(97,39),bgBlackBright:f(100,49),bgRedBright:f(101,49),bgGreenBright:f(102,49),bgYellowBright:f(103,49),bgBlueBright:f(104,49),bgMagentaBright:f(105,49),bgCyanBright:f(106,49),bgWhiteBright:f(107,49)};function wZ(D=CZ){return D?E7:Object.fromEntries(Object.keys(E7).map((u)=>[u,String]))}var bD=wZ();function BZ(D,u="reset"){return bD[D]||bD[u]}var MZ=[String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`,String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join("|");function cu(D){return D.replace(new RegExp(MZ,"g"),"")}var w7={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"}},JZ={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1};function Y7(D,u={}){let F={...u,style:{...JZ,...u.style}},C=D.split(`
193
- `),$=[],w=BZ(F.style.borderColor),E={...typeof F.style.borderStyle==="string"?w7[F.style.borderStyle]||w7.solid:F.style.borderStyle};if(w)for(let z in E)E[z]=w(E[z]);let J=F.style.padding%2===0?F.style.padding:F.style.padding+1,q=C.length+J,W=Math.max(...C.map((z)=>cu(z).length),F.title?cu(F.title).length:0)+J,Z=W+J,y=F.style.marginLeft>0?" ".repeat(F.style.marginLeft):"";if(F.style.marginTop>0)$.push("".repeat(F.style.marginTop));if(F.title){let z=w?w(F.title):F.title,X=E.h.repeat(Math.floor((W-cu(F.title).length)/2)),R=E.h.repeat(W-cu(F.title).length-cu(X).length+J);$.push(`${y}${E.tl}${X}${z}${R}${E.tr}`)}else $.push(`${y}${E.tl}${E.h.repeat(Z)}${E.tr}`);let G=F.style.valign==="center"?Math.floor((q-C.length)/2):F.style.valign==="top"?q-C.length-J:q-C.length;for(let z=0;z<q;z++)if(z<G||z>=G+C.length)$.push(`${y}${E.v}${" ".repeat(Z)}${E.v}`);else{let X=C[z-G],R=" ".repeat(J),b=" ".repeat(W-cu(X).length);$.push(`${y}${E.v}${R}${X}${b}${E.v}`)}if($.push(`${y}${E.bl}${E.h.repeat(Z)}${E.br}`),F.style.marginBottom>0)$.push("".repeat(F.style.marginBottom));return $.join(`
194
- `)}var $8=Object.create(null),a0=(D)=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(D?$8:globalThis),nu=new Proxy($8,{get(D,u){return a0()[u]??$8[u]},has(D,u){let F=a0();return u in F||u in $8},set(D,u,F){let C=a0(!0);return C[u]=F,!0},deleteProperty(D,u){if(!u)return!1;let F=a0(!0);return delete F[u],!0},ownKeys(){let D=a0(!0);return Object.keys(D)}}),eZ=typeof process<"u"&&process.env&&"development"||"",DK=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["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"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function uK(){if(globalThis.process?.env)for(let D of DK){let u=D[1]||D[0];if(globalThis.process?.env[u])return{name:D[0].toLowerCase(),...D[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}var n7=uK();n7.name;function pu(D){return D?D!=="false":!1}var FK=globalThis.process?.platform||"",o2=pu(nu.CI)||n7.ci!==!1,x7=pu(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY),CK=pu(nu.DEBUG),s2=eZ==="test"||pu(nu.TEST);pu(nu.MINIMAL);var $K=/^win/i.test(FK);!pu(nu.NO_COLOR)&&(pu(nu.FORCE_COLOR)||(x7||$K)&&nu.TERM);var EK=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(EK?.split(".")[0]);var wK=globalThis.process||Object.create(null),b7={versions:{}};new Proxy(wK,{get(D,u){if(u==="env")return nu;if(u in D)return D[u];if(u in b7)return b7[u]}});var BK=globalThis.process?.release?.name==="node",MK=!!globalThis.Bun||!!globalThis.process?.versions?.bun,JK=!!globalThis.Deno,YK=!!globalThis.fastly,qK=!!globalThis.Netlify,ZK=!!globalThis.EdgeRuntime,KK=globalThis.navigator?.userAgent==="Cloudflare-Workers",XK=[[qK,"netlify"],[ZK,"edge-light"],[KK,"workerd"],[YK,"fastly"],[JK,"deno"],[MK,"bun"],[BK,"node"]];function zK(){let D=XK.find((u)=>u[0]);if(D)return{name:D[1]}}var yK=zK();yK?.name;function WK({onlyFirst:D=!1}={}){let F=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(F,D?void 0:"g")}var GK=WK();function AK(D){if(typeof D!=="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(GK,"")}function QK(D){return D===161||D===164||D===167||D===168||D===170||D===173||D===174||D>=176&&D<=180||D>=182&&D<=186||D>=188&&D<=191||D===198||D===208||D===215||D===216||D>=222&&D<=225||D===230||D>=232&&D<=234||D===236||D===237||D===240||D===242||D===243||D>=247&&D<=250||D===252||D===254||D===257||D===273||D===275||D===283||D===294||D===295||D===299||D>=305&&D<=307||D===312||D>=319&&D<=322||D===324||D>=328&&D<=331||D===333||D===338||D===339||D===358||D===359||D===363||D===462||D===464||D===466||D===468||D===470||D===472||D===474||D===476||D===593||D===609||D===708||D===711||D>=713&&D<=715||D===717||D===720||D>=728&&D<=731||D===733||D===735||D>=768&&D<=879||D>=913&&D<=929||D>=931&&D<=937||D>=945&&D<=961||D>=963&&D<=969||D===1025||D>=1040&&D<=1103||D===1105||D===8208||D>=8211&&D<=8214||D===8216||D===8217||D===8220||D===8221||D>=8224&&D<=8226||D>=8228&&D<=8231||D===8240||D===8242||D===8243||D===8245||D===8251||D===8254||D===8308||D===8319||D>=8321&&D<=8324||D===8364||D===8451||D===8453||D===8457||D===8467||D===8470||D===8481||D===8482||D===8486||D===8491||D===8531||D===8532||D>=8539&&D<=8542||D>=8544&&D<=8555||D>=8560&&D<=8569||D===8585||D>=8592&&D<=8601||D===8632||D===8633||D===8658||D===8660||D===8679||D===8704||D===8706||D===8707||D===8711||D===8712||D===8715||D===8719||D===8721||D===8725||D===8730||D>=8733&&D<=8736||D===8739||D===8741||D>=8743&&D<=8748||D===8750||D>=8756&&D<=8759||D===8764||D===8765||D===8776||D===8780||D===8786||D===8800||D===8801||D>=8804&&D<=8807||D===8810||D===8811||D===8814||D===8815||D===8834||D===8835||D===8838||D===8839||D===8853||D===8857||D===8869||D===8895||D===8978||D>=9312&&D<=9449||D>=9451&&D<=9547||D>=9552&&D<=9587||D>=9600&&D<=9615||D>=9618&&D<=9621||D===9632||D===9633||D>=9635&&D<=9641||D===9650||D===9651||D===9654||D===9655||D===9660||D===9661||D===9664||D===9665||D>=9670&&D<=9672||D===9675||D>=9678&&D<=9681||D>=9698&&D<=9701||D===9711||D===9733||D===9734||D===9737||D===9742||D===9743||D===9756||D===9758||D===9792||D===9794||D===9824||D===9825||D>=9827&&D<=9829||D>=9831&&D<=9834||D===9836||D===9837||D===9839||D===9886||D===9887||D===9919||D>=9926&&D<=9933||D>=9935&&D<=9939||D>=9941&&D<=9953||D===9955||D===9960||D===9961||D>=9963&&D<=9969||D===9972||D>=9974&&D<=9977||D===9979||D===9980||D===9982||D===9983||D===10045||D>=10102&&D<=10111||D>=11094&&D<=11097||D>=12872&&D<=12879||D>=57344&&D<=63743||D>=65024&&D<=65039||D===65533||D>=127232&&D<=127242||D>=127248&&D<=127277||D>=127280&&D<=127337||D>=127344&&D<=127373||D===127375||D===127376||D>=127387&&D<=127404||D>=917760&&D<=917999||D>=983040&&D<=1048573||D>=1048576&&D<=1114109}function HK(D){return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510}function UK(D){return D>=4352&&D<=4447||D===8986||D===8987||D===9001||D===9002||D>=9193&&D<=9196||D===9200||D===9203||D===9725||D===9726||D===9748||D===9749||D>=9776&&D<=9783||D>=9800&&D<=9811||D===9855||D>=9866&&D<=9871||D===9875||D===9889||D===9898||D===9899||D===9917||D===9918||D===9924||D===9925||D===9934||D===9940||D===9962||D===9970||D===9971||D===9973||D===9978||D===9981||D===9989||D===9994||D===9995||D===10024||D===10060||D===10062||D>=10067&&D<=10069||D===10071||D>=10133&&D<=10135||D===10160||D===10175||D===11035||D===11036||D===11088||D===11093||D>=11904&&D<=11929||D>=11931&&D<=12019||D>=12032&&D<=12245||D>=12272&&D<=12287||D>=12289&&D<=12350||D>=12353&&D<=12438||D>=12441&&D<=12543||D>=12549&&D<=12591||D>=12593&&D<=12686||D>=12688&&D<=12773||D>=12783&&D<=12830||D>=12832&&D<=12871||D>=12880&&D<=42124||D>=42128&&D<=42182||D>=43360&&D<=43388||D>=44032&&D<=55203||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65106||D>=65108&&D<=65126||D>=65128&&D<=65131||D>=94176&&D<=94180||D===94192||D===94193||D>=94208&&D<=100343||D>=100352&&D<=101589||D>=101631&&D<=101640||D>=110576&&D<=110579||D>=110581&&D<=110587||D===110589||D===110590||D>=110592&&D<=110882||D===110898||D>=110928&&D<=110930||D===110933||D>=110948&&D<=110951||D>=110960&&D<=111355||D>=119552&&D<=119638||D>=119648&&D<=119670||D===126980||D===127183||D===127374||D>=127377&&D<=127386||D>=127488&&D<=127490||D>=127504&&D<=127547||D>=127552&&D<=127560||D===127568||D===127569||D>=127584&&D<=127589||D>=127744&&D<=127776||D>=127789&&D<=127797||D>=127799&&D<=127868||D>=127870&&D<=127891||D>=127904&&D<=127946||D>=127951&&D<=127955||D>=127968&&D<=127984||D===127988||D>=127992&&D<=128062||D===128064||D>=128066&&D<=128252||D>=128255&&D<=128317||D>=128331&&D<=128334||D>=128336&&D<=128359||D===128378||D===128405||D===128406||D===128420||D>=128507&&D<=128591||D>=128640&&D<=128709||D===128716||D>=128720&&D<=128722||D>=128725&&D<=128727||D>=128732&&D<=128735||D===128747||D===128748||D>=128756&&D<=128764||D>=128992&&D<=129003||D===129008||D>=129292&&D<=129338||D>=129340&&D<=129349||D>=129351&&D<=129535||D>=129648&&D<=129660||D>=129664&&D<=129673||D>=129679&&D<=129734||D>=129742&&D<=129756||D>=129759&&D<=129769||D>=129776&&D<=129784||D>=131072&&D<=196605||D>=196608&&D<=262141}function OK(D){if(!Number.isSafeInteger(D))throw new TypeError(`Expected a code point, got \`${typeof D}\`.`)}function VK(D,{ambiguousAsWide:u=!1}={}){if(OK(D),HK(D)||UK(D)||u&&QK(D))return 2;return 1}var TK=()=>{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\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](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\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]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\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])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\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-\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]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\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(?:[\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\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\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-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\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-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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},LK=globalThis.Intl?.Segmenter?new Intl.Segmenter:{segment:(D)=>D.split("")},hK=/^\p{Default_Ignorable_Code_Point}$/u;function IK(D,u={}){if(typeof D!=="string"||D.length===0)return 0;let{ambiguousIsNarrow:F=!0,countAnsiEscapeCodes:C=!1}=u;if(!C)D=AK(D);if(D.length===0)return 0;let $=0,w={ambiguousAsWide:!F};for(let{segment:E}of LK.segment(D)){let J=E.codePointAt(0);if(J<=31||J>=127&&J<=159)continue;if(J>=8203&&J<=8207||J===65279)continue;if(J>=768&&J<=879||J>=6832&&J<=6911||J>=7616&&J<=7679||J>=8400&&J<=8447||J>=65056&&J<=65071)continue;if(J>=55296&&J<=57343)continue;if(J>=65024&&J<=65039)continue;if(hK.test(E))continue;if(TK().test(E)){$+=2;continue}$+=VK(J,w)}return $}function NK(){let{env:D}=_7,{TERM:u,TERM_PROGRAM:F}=D;if(_7.platform!=="win32")return u!=="linux";return Boolean(D.WT_SESSION)||Boolean(D.TERMINUS_SUBLIME)||D.ConEmuTask==="{cmd::Cmder}"||F==="Terminus-Sublime"||F==="vscode"||u==="xterm-256color"||u==="alacritty"||u==="rxvt-unicode"||u==="rxvt-unicode-256color"||D.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var gK={info:"cyan",fail:"red",success:"green",ready:"green",start:"magenta"},PK={0:"red",1:"yellow"},jK=NK(),Hu=(D,u)=>jK?D:u,c7={error:Hu("\u2716","\xD7"),fatal:Hu("\u2716","\xD7"),ready:Hu("\u2714","\u221A"),warn:Hu("\u26A0","\u203C"),info:Hu("\u2139","i"),success:Hu("\u2714","\u221A"),debug:Hu("\u2699","D"),trace:Hu("\u2192","\u2192"),fail:Hu("\u2716","\xD7"),start:Hu("\u25D0","o"),log:""};function v7(D){if(typeof Intl!=="object"||!Intl.Segmenter)return cu(D).length;return IK(D)}class f7 extends t1{formatStack(D,u,F){let C=" ".repeat((F?.errorLevel||0)+1);return`
195
- ${C}`+x2(D,u).map(($)=>" "+$.replace(/^at +/,(w)=>bD.gray(w)).replace(/\((.+)\)/,(w,E)=>`(${bD.cyan(E)})`)).join(`
196
- ${C}`)}formatType(D,u,F){let C=gK[D.type]||PK[D.level]||"gray";if(u)return kK(C)(bD.black(` ${D.type.toUpperCase()} `));let $=typeof c7[D.type]==="string"?c7[D.type]:D.icon||D.type;return $?RK(C)($):""}formatLogObj(D,u){let[F,...C]=this.formatArgs(D.args,u).split(`
197
- `);if(D.type==="box")return Y7(C8(F+(C.length>0?`
198
- `+C.join(`
199
- `):"")),{title:D.title?C8(D.title):void 0,style:D.style});let $=this.formatDate(D.date,u),w=$&&bD.gray($),E=D.badge??D.level<2,J=this.formatType(D,E,u),q=D.tag?bD.gray(D.tag):"",W,Z=this.filterAndJoin([J,C8(F)]),y=this.filterAndJoin(u.columns?[q,w]:[q]),G=(u.columns||0)-v7(Z)-v7(y)-2;if(W=G>0&&(u.columns||0)>=80?Z+" ".repeat(G)+y:(y?`${bD.gray(`[${y}]`)} `:"")+Z,W+=C8(C.length>0?`
200
- `+C.join(`
201
- `):""),D.type==="trace"){let z=new Error("Trace: "+D.message);W+=this.formatStack(z.stack||"",z.message)}return E?`
202
- `+W+`
203
- `:W}}function C8(D){return D.replace(/`([^`]+)`/gm,(u,F)=>bD.cyan(F)).replace(/\s+_([^_]+)_\s+/gm,(u,F)=>` ${bD.underline(F)} `)}function RK(D="white"){return bD[D]||bD.white}function kK(D="bgWhite"){return bD[`bg${D[0].toUpperCase()}${D.slice(1)}`]||bD.bgWhite}function e2(D={}){let u=mK();if(process.env.CONSOLA_LEVEL)u=Number.parseInt(process.env.CONSOLA_LEVEL)??u;return C7({level:u,defaults:{level:u},stdout:process.stdout,stderr:process.stderr,prompt:(...C)=>Promise.resolve().then(() => (S7(),m7)).then(($)=>$.prompt(...C)),reporters:D.reporters||[D.fancy??!(o2||s2)?new f7:new t1],...D})}function mK(){if(CK)return TD.debug;if(s2)return TD.warn;return TD.info}var SK=e2();function bK(){let D=/--verbose(?!\s*=\s*false|\s+false)(?:\s+|=true)?(?:$|\s)/,u=_K();if(D.test(u))return 4;return 3}var o0={...e2({level:bK()}),warning:(D)=>console.warn(D),dump:(...D)=>console.log(...D),dd:(...D)=>{console.log(...D),E8.exit(1)},echo:(D)=>console.log(D)};var Lu={info:async(D,u)=>{if(u?.styled===!1)console.log(D);else o0.info(D);await bu(`INFO: ${t0(D)}`)},success:async(D,u)=>{if(u?.styled===!1)console.log(D);else o0.success(D);await bu(`SUCCESS: ${t0(D)}`)},warn:async(D,u)=>{if(u?.styled===!1)console.log(D);else o0.warn(D);await bu(`WARN: ${t0(D)}`)},warning:async(D,u)=>{if(u?.styled===!1)console.log(D);else o0.warn(D);await bu(`WARN: ${t0(D)}`)},error:async(D,u)=>{t4(D,u)},debug:async(...D)=>{let F=`DEBUG: ${D.map((C)=>typeof C==="object"?JSON.stringify(C,null,2):C).join(" ")}`;if(E8.env.APP_ENV==="production"||E8.env.APP_ENV==="prod")return bu(F);o0.debug(F),await bu(t0(F))},dump:(...D)=>D.forEach((u)=>console.log(u)),dd:(...D)=>{D.forEach((u)=>console.log(u)),E8.exit(1)},echo:(...D)=>console.log(...D)};var t$=t(z3(),1);import Hz from"node-fetch";var r$="https://www.iana.org/whois?q=",l$={"whois.denic.de":"-T dn,ace","whois.nic.fr":"-V Md5.2"},y3={"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 p$;((F)=>{F[F.SOCKS4=0]="SOCKS4";F[F.SOCKS5=1]="SOCKS5"})(p$||={});function W3(D){if(Array.isArray(D))return D.slice();if(typeof D==="object"&&D!==null){let u={};for(let F in D)if(Object.prototype.hasOwnProperty.call(D,F))u[F]=W3(D[F]);return u}return D}var Lz=t(z3(),1);async function Uz(D){let u=r$+D;try{let F=await Hz(u);if(F.ok){let $=(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 Oz(D){if(D==="com")return"whois.verisign-grs.com";return y3[D]}function a$(D){let u=D.split(".");for(let F=u.length-1;F>0;F--){let C=u.slice(F).join(".");if(y3[C])return C}return u[u.length-1]}function Vz(D){return l$[D]}class K8{static iterParse(D,u){let F="",C=null,$="";for(let w=0;w<D.length;w++){let E=D[w];if(E===`
204
- `||$===":"&&E===" "){if(F.trim()in u)C=F.trim();else if(C!==null){let J=F.trim();if(J!==""){let q=u[C];if(Array.isArray(q))q.push(J);else u[C]=J;C=null}}F=""}else if(E!==":")F=F+E;if($=E,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=K8.iterParse(D,u),u}}async function Tz(D,u,F,C,$,w){let E=new TextDecoder($),J=new TextEncoder;if(!w){let W=new Qz.Socket;return new Promise((Z,y)=>{try{W.connect({port:C,host:F},()=>{if(u!=="")W.write(J.encode(`${u} ${D}\r
205
- `));else W.write(J.encode(`${D}\r
206
- `))}),W.on("data",(G)=>{Z(E.decode(G))}),W.on("error",(G)=>{y(G)})}catch(G){y(G)}})}let q={proxy:{host:w.ip,port:w.port,type:w.type===1?5:4},command:"connect",destination:{host:F,port:C}};if(w.username&&w.password)q.proxy.userId=w.username,q.proxy.password=w.password;return new Promise((W,Z)=>{t$.SocksClient.createConnection(q,(y,G)=>{if(y)Z(y);else{if(!G)Z(new Error("No socket info received!"));if(u!=="")G?.socket.write(J.encode(`${u} ${D}\r
207
- `));else G?.socket.write(J.encode(`${D}\r
208
- `));G?.socket.on("data",(z)=>{W(E.decode(z))}),G?.socket.resume()}})})}async function G3(D,u=!1,F=null){let C,$=43,w="",E,J="utf-8";if(!F)C=a$(D),E=null;else C=F.tld?F.tld:a$(D),J=F.encoding?F.encoding:"utf-8",E=F.proxy?F.proxy:null,w=F.server?F.server:"",$=F.serverPort?F.serverPort:43;if(w===""){let Z=Oz(C);if(!Z){if(Lu.debug(`No WhoIs server found for TLD: ${C}! Attempting IANA WhoIs database for server!`),Z=await Uz(C),!Z)return Lu.debug("WhoIs server could not be found!"),{_raw:"",parsedData:null};Lu.debug(`WhoIs sever found for ${C}: ${w}`)}w=Z}let W=Vz(w)||"";try{Lu.debug(`Attempting WHOIS lookup for ${D} on server ${w}`);let Z=await Tz(D,W,w,$,J,E);if(Lu.debug("Raw WHOIS data received:",Z),!u){let G=K8.parseData(Z,null);return{_raw:Z,parsedData:G}}let y=null;if(F?.parseData)y=W3(F.parseData);try{let G=K8.parseData(Z,y);return{_raw:Z,parsedData:G}}catch(G){return console.error("Error in parsing WhoIs data!",G),{_raw:Z,parsedData:null}}}catch(Z){return Lu.debug(`Error in WHOIS lookup for ${D} on server ${w}`,Z),{_raw:"",parsedData:null}}}function mH(D,u=null){return Lu.debug(`Lookup called for ${D}`),G3(D,!0,u)}async function SH(D,u=!1,F=1,C=!1,$=null){let w=[];if(u){if(F>D.length)F=D.length;for(let E=0;E<D.length;E+=F){let J=D.slice(E,E+F);w=await Promise.all(J.map(async(q)=>{return await G3(q,C,$)}))}}else for(let E=0;E<D.length;E++){let J=await G3(D[E],C,$);w.push(J)}return w}var export_SocksClient=Lz.SocksClient;export{G3 as whois,Tz as tcpWhois,mH as lookup,Oz as getWhoIsServer,a$ as getTLD,Vz as getParameters,Uz as findWhoIsServer,SH as batchWhois,K8 as WhoIsParser,export_SocksClient as SocksClient,y3 as SERVERS,p$ as ProxyType,l$ as PARAMETERS,r$ as IANA_CHK_URL};
2
+ import E from"net";import{log as q}from"@stacksjs/logging";var Y="https://www.iana.org/whois?q=",Z={"whois.denic.de":"-T dn,ace","whois.nic.fr":"-V Md5.2"},K={"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"};import U from"net";class G{options;constructor(i){this.options=i}static createConnection(i,h){new G(i).connect(h)}connect(i){let h=new U.Socket,{proxy:w,destination:n}=this.options;h.connect({port:w.port,host:w.host},()=>{if(w.type===5)this.connectSocks5(h,i);else this.connectSocks4(h,i)}),h.on("error",(g)=>{i(g)})}connectSocks4(i,h){let{destination:w,proxy:n}=this.options,g=w.port,c=n.userId||"",s;if(this.isIPv4(w.host)){let m=w.host.split(".").map(Number);s=Buffer.from(m)}else s=Buffer.from([0,0,0,1]);let o=Buffer.concat([Buffer.from([4]),Buffer.from([1]),Buffer.from([g>>8&255,g&255]),s,Buffer.from(c),Buffer.from([0])]);if(!this.isIPv4(w.host)){let m=Buffer.concat([o,Buffer.from(w.host),Buffer.from([0])]);i.write(m)}else i.write(o);i.once("data",(m)=>{if(m.length<8){h(Error("Invalid SOCKS4 response"));return}let x=m[1];if(x!==90){h(Error(`SOCKS4 connection failed with status: ${x}`));return}h(null,{socket:i})})}connectSocks5(i,h){let{destination:w,proxy:n}=this.options,g;if(n.userId&&n.password)g=[0,2];else g=[0];let c=Buffer.from([5,g.length,...g]);i.write(c),i.once("data",(s)=>{if(s.length<2||s[0]!==5){h(Error("Invalid SOCKS5 greeting response"));return}let o=s[1];if(o===255){h(Error("No acceptable authentication methods"));return}if(o===2)this.authenticateSocks5(i,h);else this.sendConnectRequest(i,h)})}authenticateSocks5(i,h){let{proxy:w}=this.options,n=w.userId||"",g=w.password||"",c=Buffer.concat([Buffer.from([1]),Buffer.from([n.length]),Buffer.from(n),Buffer.from([g.length]),Buffer.from(g)]);i.write(c),i.once("data",(s)=>{if(s.length<2||s[0]!==1){h(Error("Invalid SOCKS5 auth response"));return}if(s[1]!==0){h(Error("SOCKS5 authentication failed"));return}this.sendConnectRequest(i,h)})}sendConnectRequest(i,h){let{destination:w}=this.options,n=w.port,g,c;if(this.isIPv4(w.host)){c=1;let o=w.host.split(".").map(Number);g=Buffer.from(o)}else if(this.isIPv6(w.host)){c=4;let o=w.host.split(":"),m=[];for(let x of o){let z=Number.parseInt(x,16);m.push(z>>8&255,z&255)}g=Buffer.from(m)}else c=3,g=Buffer.concat([Buffer.from([w.host.length]),Buffer.from(w.host)]);let s=Buffer.concat([Buffer.from([5,1,0,c]),g,Buffer.from([n>>8&255,n&255])]);i.write(s),i.once("data",(o)=>{if(o.length<10||o[0]!==5){h(Error("Invalid SOCKS5 connect response"));return}let m=o[1];if(m!==0){let z=m===void 0?"No SOCKS5 status returned":{1:"General SOCKS server failure",2:"Connection not allowed by ruleset",3:"Network unreachable",4:"Host unreachable",5:"Connection refused",6:"TTL expired",7:"Command not supported",8:"Address type not supported"}[m]||`Unknown error (${m})`;h(Error(`SOCKS5 connection failed: ${z}`));return}h(null,{socket:i})})}isIPv4(i){if(!/^(\d{1,3}\.){3}\d{1,3}$/.test(i))return!1;return i.split(".").map(Number).every((n)=>n>=0&&n<=255)}isIPv6(i){return i.includes(":")&&i.split(":").length>=3}}var _;((w)=>{w[w.SOCKS4=0]="SOCKS4";w[w.SOCKS5=1]="SOCKS5"})(_||={});function Q(i){if(Array.isArray(i))return i.slice();if(typeof i==="object"&&i!==null){let h={};for(let w in i)if(Object.prototype.hasOwnProperty.call(i,w))h[w]=Q(i[w]);return h}return i}async function A(i){let h=Y+i;try{let w=await fetch(h);if(w.ok){let g=(await w.text()).match(/whois:\s+(\S+)/);if(g?.[1])return g[1]}}catch(w){console.error("Error in getting WhoIs server data from IANA",w)}return""}function N(i){if(i==="com")return"whois.verisign-grs.com";return K[i]}function $(i){let h=i.split(".");for(let w=h.length-1;w>0;w--){let n=h.slice(w).join(".");if(K[n])return n}return h[h.length-1]}function y(i){return Z[i]}class J{static iterParse(i,h){let w="",n=null,g="";for(let c=0;c<i.length;c++){let s=i[c];if(s===`
3
+ `||g===":"&&s===" "){if(w.trim()in h)n=w.trim();else if(n!==null){let o=w.trim();if(o!==""){let m=h[n];if(Array.isArray(m))m.push(o);else h[n]=o;n=null}}w=""}else if(s!==":")w=w+s;if(g=s,w==="Record maintained by"||w===">>>")break}return h}static parseData(i,h){if(!h)h={"Domain Name":"","Creation Date":"","Updated Date":"","Registry Expiry Date":"","Domain Status":[],Registrar:""};return h=J.iterParse(i,h),h}}async function R(i,h,w,n,g,c){let s=new TextDecoder(g),o=new TextEncoder;if(!c){let x=new E.Socket;return x.setTimeout(30000),new Promise((z,f)=>{try{x.connect({port:n,host:w},()=>{if(h!=="")x.write(o.encode(`${h} ${i}\r
4
+ `));else x.write(o.encode(`${i}\r
5
+ `))}),x.on("data",(b)=>{z(s.decode(b))}),x.on("error",(b)=>{f(b)}),x.on("timeout",()=>{x.destroy(),f(Error(`WHOIS request to ${w}:${n} timed out after 30s`))})}catch(b){f(b)}})}let m={proxy:{host:c.ip,port:c.port,type:c.type===1?5:4},command:"connect",destination:{host:w,port:n}};if(c.username&&c.password)m.proxy.userId=c.username,m.proxy.password=c.password;return new Promise((x,z)=>{G.createConnection(m,(f,b)=>{if(f)z(f);else{if(!b)z(Error("No socket info received!"));if(h!=="")b?.socket.write(o.encode(`${h} ${i}\r
6
+ `));else b?.socket.write(o.encode(`${i}\r
7
+ `));b?.socket.on("data",(H)=>{x(s.decode(H))}),b?.socket.resume()}})})}async function X(i,h=!1,w=null){let n,g=43,c="",s,o="utf-8";if(!w)n=$(i),s=null;else n=w.tld?w.tld:$(i),o=w.encoding?w.encoding:"utf-8",s=w.proxy?w.proxy:null,c=w.server?w.server:"",g=w.serverPort?w.serverPort:43;if(c===""){let z=N(n);if(!z){if(q.debug(`No WhoIs server found for TLD: ${n}! Attempting IANA WhoIs database for server!`),z=await A(n),!z)return q.debug("WhoIs server could not be found!"),{_raw:"",parsedData:null};q.debug(`WhoIs sever found for ${n}: ${c}`)}c=z}let x=y(c)||"";try{q.debug(`Attempting WHOIS lookup for ${i} on server ${c}`);let z=await R(i,x,c,g,o,s);if(q.debug("Raw WHOIS data received:",z),!h){let b=J.parseData(z,null);return{_raw:z,parsedData:b}}let f=null;if(w?.parseData)f=Q(w.parseData);try{let b=J.parseData(z,f);return{_raw:z,parsedData:b}}catch(b){return console.error("Error in parsing WhoIs data!",b),{_raw:z,parsedData:null}}}catch(z){return q.debug(`Error in WHOIS lookup for ${i} on server ${c}`,z),{_raw:"",parsedData:null}}}function T(i,h=null){return q.debug(`Lookup called for ${i}`),X(i,!0,h)}async function W(i,h=!1,w=1,n=!1,g=null){let c=[];if(h){if(w>i.length)w=i.length;for(let s=0;s<i.length;s+=w){let o=i.slice(s,s+w),m=await Promise.all(o.map(async(x)=>{return await X(x,n,g)}));c.push(...m)}}else for(let s=0;s<i.length;s++){let o=await X(i[s],n,g);c.push(o)}return c}export{X as whois,R as tcpWhois,T as lookup,N as getWhoIsServer,$ as getTLD,y as getParameters,A as findWhoIsServer,W as batchWhois,J as WhoIsParser,G as SocksClient,K as SERVERS,_ as ProxyType,Z as PARAMETERS,Y as IANA_CHK_URL};