"use strict";var e=require("@babel/runtime/helpers/typeof"),t=require("url"),n=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),i=require("@babel/runtime/helpers/defineProperty"),o=/^\s*[0-9a-zA-Z]+\s*$/,s={isValid:function(e){return("string"==typeof e||e instanceof String)&&o.test(e)}},u={isValid:function(t){var n=e(t);if("boolean"===n||t instanceof Boolean)return!0;if("string"===n||t instanceof String){var r=t.trim().toLowerCase();return"true"===r||"false"===r}return!1}},c=18,a=6,h=4,f=10,l=2,p=12,d=2,g=10,m=48,I=57,R=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2],D=["1","0","X","9","8","7","6","5","4","3","2"];function U(e,t,n){for(var r=0,i=t;iI)return null;r*=g,r+=o-m}return r}function y(e){if("string"==typeof e||e instanceof String){if((e=e.trim()).length!==c)return!1;for(var t=0,n=0;nI)return!1;t+=(r-m)*R[n]}var i=D[t%D.length];return e.charAt(c-1).toUpperCase()===i&&!!function(e){if("string"==typeof e||e instanceof String){if((e=e.trim()).length!==c)return!1;var t=U(e,a,a+h),n=U(e,f,f+l),r=U(e,p,p+d);if(null==t||null==n||null==r)return!1;var i=new Date(t,n-1,r);if(i.getFullYear()!==t||i.getMonth()!==n-1||i.getDate()!==r)return!1;var o=new Date;return!(i.getTime()>o.getTime())}return!1}(e)}return!1}var S={type:"IDENTITY_CARD",name:"身份证",isValid:function(e){return y(e)},getGender:function(e){return function(e){return"string"==typeof e||e instanceof String?(e=e.trim()).length!==c?null:(e.charCodeAt(16)-m)%2==1?"MALE":"FEMALE":null}(e)},getBirthday:function(e){return function(e){if("string"==typeof e||e instanceof String){if((e=e.trim()).length!==c)return null;var t=e.substring(a,a+h),n=e.substring(f,f+l),r=e.substring(p,p+d);return"".concat(t,"-").concat(n,"-").concat(r)}return null}(e)}},C=S,w=/^\s*(0|86|17951)?(13[0-9]|14[5-9]|15[0-35-9]|16[5-6]|17[0-8]|18[0-9]|19[1589])[0-9]{8}\s*$/,E={isValid:function(e){return("string"==typeof e||e instanceof String)&&0!==e.length&&w.test(e)}},b=/^\s*[a-zA-Z0-9.]{6,8}\s*$/,L={type:"OFFICER_CARD",name:"中国人民解放军军官证",isValid:function(e){return("string"==typeof e||e instanceof String)&&b.test(e)}},A=L,F=/^\s*(E[A-Z0-9][0-9]{7}|[SDP]E[0-9]{7}|MA[0-9]{7}|K[0-9]{8}|1[45][0-9]{7}|G[0-9]{8}|P[0-9]{7}|S[0-9]{7,8}|D[0-9]{8})\s*$/,$={type:"PASSPORT",name:"护照",isValid:function(e){return("string"==typeof e||e instanceof String)&&F.test(e)}},N=$,_=/^\s*(\+?\d{2,4}[-_-—]?\d{3,8}([-_-—]?\d{1,8}){0,2}|0?1[35]\d{9})\s*$/,v={isValid:function(e){return("string"==typeof e||e instanceof String)&&0!==e.length&&_.test(e)}};function P(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var x={},O=/^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;x.validate=function(e){if(!e)return!1;if(e.length>254)return!1;if(!O.test(e))return!1;var t=e.split("@");return!(t[0].length>64)&&!t[1].split(".").some((function(e){return e.length>63}))};var V={isValid:function(e){return("string"==typeof e||e instanceof String)&&x.validate(e.trim())}},k=/^\s*[+-]?\d+\s*$/,T={isValid:function(t){var n=e(t);return"bigint"===n||("number"===n?Number.isInteger(t):t instanceof Number?Number.isInteger(Number(t)):("string"===n||t instanceof String)&&k.test(t))}},q=/^\s*[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}\s*$/,H={isValid:function(e){return e instanceof Date||("string"==typeof e||e instanceof String)&&q.test(e.trim())}},z=/^\s*[0-9]{4}-(0?[1-9]|1[0-2])-(0?[1-9]|[12][0-9]|3[01]) (0?[0-9]|1[0-9]|2[0-3]):(0?[0-9]|[1-5][0-9])(:(0?[0-9]|[1-5][0-9]))?\s*$/,j={isValid:function(e){return("string"==typeof e||e instanceof String)&&z.test(e)}},M=/^\s*(0?[0-9]|1[0-9]|2[0-3]):(0?[0-9]|[0-5][0-9])(:(0?[0-9]|[0-5][0-9]))?\s*$/,Z={isValid:function(e){return("string"==typeof e||e instanceof String)&&M.test(e)}},G=/^\s*[+-]?(?:\d+\.?|\d*\.\d+)(?:[E|e][+|-]?\d+)?\s*$/,W={DEFAULT_OPTION:{allowNaN:!1,allowInfinity:!1},isValid:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.DEFAULT_OPTION,r=e(t);if("number"===r||t instanceof Number){var i=Number(t);return Number.isNaN(i)?!0===n.allowNaN:!!Number.isFinite(i)||!0===n.allowInfinity}if("string"===r||t instanceof String){if(0===(t=t.trim()).length)return!1;if(G.test(t))return!0;if(n.allowNaN&&"NaN"===t.trim())return!0;if(n.allowInfinity&&"Infinity"===t.trim())return!0}return!1}},B={isValid:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W.DEFAULT_OPTION;return"bigint"==typeof e||W.isValid(e,t)}},K=/^\s*[a-zA-Z0-9.]{2,60}\s*$/,Y={isValid:function(e){return("string"==typeof e||e instanceof String)&&K.test(e)}},Q=Y,X=/^[-a-zA-Z0-9`~!@#$%^&*()_=+{}[\]|\\:;'",./?<>]+$/,J={minLength:6,maxLength:32,isValid:function(e){return("string"==typeof e||e instanceof String)&&(e.length>=this.minLength&&e.length<=this.maxLength&&X.test(e))}},ee=/^[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?:[\u3400-\u4DBF\u4E00-\u9FEF\uF900-\uFAD9]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1F])(?:[\.\xB7\u3400-\u4DBF\u4E00-\u9FEF\uF900-\uFAD9]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1F]){0,28}(?:[\u3400-\u4DBF\u4E00-\u9FEF\uF900-\uFAD9]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1F])[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*$/,te=/^\s*[a-zA-Z][a-zA-Z .]{0,58}[a-zA-Z]\s*$/,ne={isValid:function(e){return("string"==typeof e||e instanceof String)&&0!==e.length&&(ee.test(e)||te.test(e))}},re=/^\s*[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}([ ]?T?[0-2]?[0-9]:[0-5]?[0-9](:[0-5]?[0-9](\.[0-9]{1,3})?)?)?([ ]*[Zz])?\s*$/,ie={isValid:function(e){return("string"==typeof e||e instanceof String)&&re.test(e)}},oe=/^\s*[0-9A-Z]+\s*$/,se={isValid:function(e){return("string"==typeof e||e instanceof String)&&oe.test(e)}};const ue=function(e){return!(null==e||Number.isNaN(e))};var ce=Object.freeze({exists:ue,is:function(e,t){return ue(e)&&ue(t)&&(t.constructor===e||t instanceof e)}});const{is:ae,exists:he}=ce,fe=function(e){let t;if(he(e)){const n=e.valueOf();if(ae(Number,n))Number.isFinite(n)&&(t=n);else if(ae(String,n)||ae(Boolean,n)){const e=Number(n);Number.isFinite(e)&&(t=e)}}return t},le=function(e){const t=fe(e);let n;if(void 0!==t){const e=parseInt(t,10);Number.isNaN(e)||(n=e)}return n};const pe=Object.freeze({number:fe,num:function(e,{ge:t,le:n}={}){let r=fe(e);if(void 0!==r){const e=fe(n),i=fe(t);void 0!==e&&void 0!==i?(re)&&(r=void 0):(void 0!==e&&r>e||void 0!==i&&re)&&(r=void 0):(void 0!==e&&r>e||void 0!==i&&r0&&_e(String,t.path)))return"";let n=t.scheme;if(_e(String,t.host)){if(""!==t.path&&!t.path.startsWith("/"))return"";if(t.host.length<=2)return"";n+="://",_e(String,t.userinfo)&&t.userinfo.length>0&&(n+=`${t.userinfo}@`),n+=Ve(t.host),Ne(t.port)&&void 0!==$e(t.port,{ge:ve,le:Pe})&&(n+=`:${t.port}`)}else{if(t.path.startsWith("//"))return"";n+=":"}return""===t.path&&_e(String,t.host)?n+="/":n+=t.path,_e(String,t.query)&&t.query.length>0&&(n+=`?${t.query}`),_e(String,t.fragment)&&t.fragment.length>0&&(n+=`#${t.fragment}`),n};var Te=Object.freeze({hostToURI:Ve,recomposeURI:ke,parseURI:function(e){const t={scheme:null,authority:null,authorityPunydecoded:null,userinfo:null,host:null,hostPunydecoded:null,port:null,path:null,pathqf:null,query:null,fragment:null,href:null};if(!(_e(String,e)&&e.length>0))return t;const[,n,r,i,o,s]=e.match(xe);if(!(_e(String,n)&&n.length>0))return t;let u=null,c=null,a=null,h=null,f=null,l=null;if(_e(String,r)){let e=null;if([a=null,e=null]=r.split("@"),!Ne(e)&&Ne(a)&&(e=a,a=null),_e(String,e)){const t=e.match(Oe);let n,r;_e(Array,t)?[,n=null,r=null]=t:[n=null,r=null]=e.split(":");const i=_e(String,n)?n.toLowerCase():null,o=Le(i),s=Ae(i);i!==o?(h=o,f=i):i!==s?(h=i,f=s):(h=i,f=i),""!==h&&""!==f||(h=null),l=$e(r)||r,Ne(f)&&(c="",Ne(a)&&(c+=`${a}@`),c+=Ve(f),Ne(l)&&(c+=`:${l}`)),Ne(h)?(u="",Ne(a)&&(u+=`${a}@`),u+=Ve(h),Ne(l)&&(u+=`:${l}`)):(a=null,l=null)}}const p=_e(String,o)&&o.length>0?o:null,d=_e(String,s)&&s.length>0?s:null;t.pathqf=_e(String,i)?i.valueOf():null,_e(String,t.pathqf)&&(_e(String,p)&&(t.pathqf+=`?${p}`),_e(String,d)&&(t.pathqf+=`#${d}`)),t.scheme=n.toLowerCase(),t.authority=u,t.authorityPunydecoded=c,t.userinfo=a,t.host=h,t.hostPunydecoded=f,t.port=l,t.path=i,t.query=p,t.fragment=d;const g=ke({scheme:t.scheme,userinfo:t.userinfo,host:t.host,port:t.port,path:t.path,query:t.query,fragment:t.fragment});return t.href=""!==g?g:null,t}});const{object:{is:qe}}=ge,He=function(e,t){if(!qe(String,e))return!1;const n=!0===t,r=e.charCodeAt();return 37===r?!n:r>=36&&r<=59||r>=64&&r<=90||r>=97&&r<=122||33===r||61===r||95===r||126===r},ze=function(e,t){if(!qe(String,e))return!1;const n=!0===t,r=e.charCodeAt();return 37===r?!n:r>=36&&r<=38||r>=40&&r<=41||r>=43&&r<=59||r>=97&&r<=122||33===r||61===r||64===r||95===r||126===r};var je=Object.freeze({isSchemeChar:function(e,{start:t}={}){if(!qe(String,e))return!1;const n=e.charCodeAt();return t?n>=97&&n<=122:n>=48&&n<=57||n>=97&&n<=122||43===n||45===n||46===n},isUserinfoChar:function(e,t){if(!qe(String,e))return!1;const n=!0===t,r=e.charCodeAt();return 37===r?!n:r>=38&&r<=46||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||33===r||36===r||58===r||59===r||61===r||95===r||126===r},isSitemapUserinfoChar:function(e,t){if(!qe(String,e))return!1;const n=!0===t,r=e.charCodeAt();return 37===r?!n:r>=40&&r<=41||r>=43&&r<=46||r>=48&&r<=57||r>=97&&r<=122||33===r||36===r||38===r||58===r||59===r||61===r||95===r||126===r},isDomainChar:function(e,{start:t,end:n}={}){if(!qe(String,e))return!1;const r=e.charCodeAt();return(!0!==t&&!0!==n||45!==r)&&(r>=48&&r<=57||r>=97&&r<=122||45===r)},isPathChar:He,isSitemapPathChar:ze,isQueryOrFragmentChar:function(e,t){return!!He(e,t)||qe(String,e)&&63===e.charCodeAt()},isSitemapQueryOrFragmentChar:function(e,t){return!!ze(e,t)||qe(String,e)&&63===e.charCodeAt()},isPercentEncodingChar:function(e){if(!qe(String,e))return!1;const t=e.charCodeAt();return t>=48&&t<=57||t>=65&&t<=70}});const{punycode:Me}=Ee,{isDomainChar:Ze}=je,{object:{is:Ge}}=ge,We=function(e){if(!Ge(String,e))return!1;const t=e.length;if(t<1||t>63)return!1;for(let n=0;n255)return!1;const r=t.split("."),i=r.length;if(i<=1)return!1;const o={};for(let e=0;e1)return!1}return!0}});const Ke={"*":"%2A"},Ye=Object.keys(Ke),Qe={};Ye.forEach((e=>{Qe[Ke[e]]=e}));const Xe=Object.keys(Qe),Je={"&":"&","'":"'"},et=Object.keys(Je),tt={};et.forEach((e=>{tt[Je[e]]=e}));const nt=Object.keys(tt),rt=nt.length;var it=Object.freeze({specialChars:Ke,specialCharsKeys:Ye,pencodings:Qe,pencodingsKeys:Xe,entities:Je,entitiesKeys:et,escapeCodes:tt,escapeCodesKeys:nt,escapeCodesKeysLen:rt});const{maxLengthURL:ot,minPortInteger:st,maxPortInteger:ut}=be,{parseURI:ct}=Te,{isDomain:at}=Be,{cast:{int:ht},object:{exists:ft,is:lt}}=ge,{isIP:pt}=Ue,{escapeCodesKeys:dt,escapeCodesKeysLen:gt}=it,{isSchemeChar:mt,isUserinfoChar:It,isPathChar:Rt,isQueryOrFragmentChar:Dt,isSitemapUserinfoChar:Ut,isSitemapPathChar:yt,isSitemapQueryOrFragmentChar:St,isPercentEncodingChar:Ct}=je,wt=function(e,t,n){if(!lt(String,e)){const e=new URIError("a string is required when checking for percent encoding");throw e.code="URI_INVALID_PERCENT_ENCODING",e}const r=lt(Number,n)&&n>=0?n:e.length,i=lt(Number,t)&&t0&&"%"===e[i]){if(!(i+2=0?n:e.length,i=lt(Number,t)&&t0&&"&"===e[i]){let t;for(let n=0;n0?t:e.length;if(n<=0){const e=new URIError("scheme cannot be empty");throw e.code="URI_INVALID_SCHEME",e}for(let t=0;t0){if(""!==c&&!c.startsWith("/")){const e=new URIError("path must be empty or start with '/' when authority is present");throw e.code="URI_INVALID_PATH",e}}else if(c.startsWith("//")){const e=new URIError("path must not start with '//' when authority is not present");throw e.code="URI_INVALID_PATH",e}if(!ft(n)&&ft(r)){const e=new URIError(`host must be a valid ip or domain name, got '${s}'`);throw e.code="URI_INVALID_HOST",e}return{scheme:t,authority:n,authorityPunydecoded:r,userinfo:i,host:o,hostPunydecoded:s,port:u,path:c,pathqf:a,query:h,fragment:f,href:l,schemeLen:p,valid:!0}},$t=function(e,{sitemap:t}={}){const{scheme:n,authority:r,authorityPunydecoded:i,userinfo:o,host:s,hostPunydecoded:u,port:c,path:a,pathqf:h,query:f,fragment:l,href:p,schemeLen:d}=Ft(e);if(Lt(n,d),ft(r)){if(bt({sitemap:t,type:"userinfo",string:o}),!pt(s)&&!at(s)){const e=new URIError(`host must be a valid ip or domain name, got '${s}'`);throw e.code="URI_INVALID_HOST",e}if(ft(c)&&void 0===ht(c,{ge:st,le:ut})){const e=new URIError(`port must be an integer between ${st}-${ut}, got '${c}'`);throw e.code="URI_INVALID_PORT",e}}return bt({sitemap:t,type:"path",string:a}),bt({sitemap:t,type:"query",string:f}),bt({sitemap:t,type:"fragment",string:l}),{scheme:n,authority:r,authorityPunydecoded:i,userinfo:o,host:s,hostPunydecoded:u,port:c,path:a,pathqf:h,query:f,fragment:l,href:p,valid:!0}},Nt=function(e,{https:t,web:n,sitemap:r}={}){!0===r&&At(e);const i=[];!0===t?i.push("https"):!0===n?i.push("http","https"):i.push("http");const{scheme:o,authority:s,authorityPunydecoded:u,userinfo:c,host:a,hostPunydecoded:h,port:f,path:l,pathqf:p,query:d,fragment:g,href:m}=$t(e,{sitemap:r});if(!i.includes(o)){const e=new URIError(`scheme must be ${i.join(" or ")}, got '${o}'`);throw e.code="URI_INVALID_SCHEME",e}if(!lt(String,s)){const e=new URIError("authority is required");throw e.code="URI_MISSING_AUTHORITY",e}if(lt(String,m)&&m.length>ot){const e=new URIError(`max URL length of ${ot} reached: ${m.length}`);throw e.code="URI_MAX_LENGTH_URL",e}return{scheme:o,authority:s,authorityPunydecoded:u,userinfo:c,host:a,hostPunydecoded:h,port:f,path:l,pathqf:p,query:d,fragment:g,href:m,valid:!0}};var _t=Object.freeze({checkPercentEncoding:wt,checkSitemapEncoding:Et,checkComponent:bt,checkSchemeChars:Lt,checkLowercase:At,checkURISyntax:Ft,checkURI:$t,checkHttpURL:Nt,checkHttpsURL:function(e){return Nt(e,{https:!0})},checkHttpSitemapURL:function(e){return Nt(e,{sitemap:!0})},checkHttpsSitemapURL:function(e){return Nt(e,{https:!0,sitemap:!0})},checkWebURL:function(e){return Nt(e,{web:!0})},checkSitemapURL:function(e){return Nt(e,{web:!0,sitemap:!0})}});const{maxLengthURL:vt,minPortInteger:Pt,maxPortInteger:xt}=be,{checkURISyntax:Ot,checkSchemeChars:Vt}=_t,{isUserinfoChar:kt,isPathChar:Tt,isQueryOrFragmentChar:qt,isSitemapUserinfoChar:Ht,isSitemapPathChar:zt,isSitemapQueryOrFragmentChar:jt}=je,{recomposeURI:Mt}=Te,{entities:Zt,specialChars:Gt}=it,{isDomain:Wt}=Be,{isIP:Bt}=Ue,{cast:{int:Kt},object:{exists:Yt,is:Qt}}=ge,Xt=function(e,{type:t,sitemap:n,lowercase:r}={}){if(!Qt(String,e))return"";const i=!0===r||!0===n?e.toLowerCase():e,o=i.length;let s="";for(let e=0;evt){const e=new URIError(`max URL length of ${vt} reached: ${D.length}`);throw e.code="URI_MAX_LENGTH_URL",e}return D};var en=Object.freeze({encodeURIComponentString:Xt,encodeURIString:Jt,encodeWebURL:function(e,{lowercase:t}={}){return Jt(e,{lowercase:t,web:!0})},encodeSitemapURL:function(e){return Jt(e,{lowercase:!0,sitemap:!0})}});const{maxLengthURL:tn,minPortInteger:nn,maxPortInteger:rn}=be,{checkURISyntax:on,checkSchemeChars:sn}=_t,{cast:{int:un},object:{exists:cn,is:an}}=ge,{recomposeURI:hn}=Te,{isDomain:fn}=Be,{isIP:ln}=Ue,{escapeCodes:pn,escapeCodesKeys:dn,pencodings:gn,pencodingsKeys:mn}=it,In=function(e,{sitemap:t,lowercase:n}={}){if(!an(String,e))return"";const r=!0===n?e.toLowerCase():e;if(!0===t){const e=new RegExp(dn.concat(mn).join("|"),"g"),t=r.replace(e,(e=>pn[e]||gn[e]));try{return decodeURIComponent(t)}catch(e){return""}}try{return decodeURIComponent(r)}catch(e){return""}},Rn=function(e,{web:t,sitemap:n,lowercase:r}={}){const i=an(String,e)&&!0===r?e.toLowerCase():e,o=!0===t||!0===n,{scheme:s,authority:u,userinfo:c,host:a,hostPunydecoded:h,port:f,path:l,query:p,fragment:d,schemeLen:g}=on(i);if(o){if("http"!==s&&"https"!==s){const e=new URIError(`scheme must be http or https, got '${s}'`);throw e.code="URI_INVALID_SCHEME",e}}else sn(s,g);if(o&&!an(String,u)){const e=new URIError("authority is required");throw e.code="URI_MISSING_AUTHORITY",e}if(cn(a)&&!ln(a)&&!fn(a)){const e=new URIError(`host must be a valid ip or domain name, got '${a}'`);throw e.code="URI_INVALID_HOST",e}if(cn(f)&&void 0===un(f,{ge:nn,le:rn})){const e=new URIError(`port must be an integer between ${nn}-${rn}, got '${f}'`);throw e.code="URI_INVALID_PORT",e}const m=In(c,{sitemap:n,lowercase:!1}),I=In(l,{sitemap:n,lowercase:!1}),R=In(p,{sitemap:n,lowercase:!1}),D=In(d,{sitemap:n,lowercase:!1}),U=hn({scheme:s,port:f,host:h,userinfo:m,path:I,query:R,fragment:D});if(o&&U.length>tn){const e=new URIError(`max URL length of ${tn} reached: ${U.length}`);throw e.code="URI_MAX_LENGTH_URL",e}return U};var Dn=Object.freeze({decodeURIComponentString:In,decodeURIString:Rn,decodeWebURL:function(e,{lowercase:t}={}){return Rn(e,{lowercase:t,web:!0})},decodeSitemapURL:function(e,{lowercase:t}={}){return Rn(e,{lowercase:t,sitemap:!0})}});const{punycode:Un,punydecode:yn}=Ee,{parseURI:Sn,recomposeURI:Cn}=Te,{isDomainLabel:wn,isDomain:En}=Be,{isIP:bn,isIPv4:Ln,isIPv6:An}=Ue,{checkURI:Fn,checkHttpURL:$n,checkHttpsURL:Nn,checkHttpSitemapURL:_n,checkHttpsSitemapURL:vn,checkWebURL:Pn,checkSitemapURL:xn}=_t,{encodeURIComponentString:On,encodeURIString:Vn,encodeWebURL:kn,encodeSitemapURL:Tn}=en,{decodeURIComponentString:qn,decodeURIString:Hn,decodeWebURL:zn,decodeSitemapURL:jn}=Dn;var Mn=P(Object.freeze({punycode:Un,punydecode:yn,parseURI:Sn,recomposeURI:Cn,isDomainLabel:wn,isDomain:En,isIP:bn,isIPv4:Ln,isIPv6:An,checkURI:Fn,checkHttpURL:$n,checkHttpsURL:Nn,checkHttpSitemapURL:_n,checkHttpsSitemapURL:vn,checkWebURL:Pn,checkSitemapURL:xn,encodeURIComponentString:On,encodeURIString:Vn,encodeWebURL:kn,encodeSitemapURL:Tn,decodeURIComponentString:qn,decodeURIString:Hn,decodeWebURL:zn,decodeSitemapURL:jn})),Zn={isValid:function(e){if(!("string"==typeof e||e instanceof String))return!1;var t=e.trim();if(0===t.length)return!1;try{return Mn.checkWebURL(t),!0}catch(e){return!1}}},Gn=/^[a-zA-Z0-9][a-zA-Z0-9@\\._-]*$/,Wn={minLength:4,maxLength:32,isValid:function(e){return("string"==typeof e||e instanceof String)&&(e.length>=this.minLength&&e.length<=this.maxLength&&Gn.test(e))}},Bn=function(){function e(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";n(this,e),i(this,"success",!0),i(this,"description",""),i(this,"next",null),this.success=null==t||t,this.description=null!=r?r:"",this.next=null}return r(e,null,[{key:"merge",value:function(t){if(Array.isArray(t)&&t.length>0){for(var n=new e(!0),r=n,i=0;i1&&void 0!==arguments[1]?arguments[1]:6;if("string"==typeof e||e instanceof String){var n=(e=e.trim()).length;if(n!==t)return!1;for(var r=0;r57)return!1;return!0}return!1}};exports.AlphaNumberRule=s,exports.BoolRule=u,exports.ChinaIdentityCardRule=C,exports.ChinaMobileRule=E,exports.ChinaOfficerCardRule=A,exports.ChinaPassportRule=N,exports.ChinaPhoneRule=v,exports.EmailRule=V,exports.IntegerRule=T,exports.LocalDateRule=H,exports.LocalDateTimeRule=j,exports.LocalTimeRule=Z,exports.NumberRule=W,exports.NumericRule=B,exports.OtherCredentialRule=Q,exports.PasswordRule=J,exports.PersonNameRule=ne,exports.TimestampRule=ie,exports.UppercaseAlphaNumberRule=se,exports.UrlRule=Zn,exports.UsernameRule=Wn,exports.ValidationResult=Bn,exports.VerifyCodeRule=Kn;//# sourceMappingURL=common-validation-rule.min.cjs.map