phone-number-generator-js
Version:
Generates a random phone number following the E.164 international standard
2 lines • 681 kB
JavaScript
/*! For license information please see index.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.exampleTypescriptPackage=e():t.exampleTypescriptPackage=e()}(this,(()=>(()=>{var t={3231:(t,e,n)=>{"use strict";n.r(e),n.d(e,{ARRAY_CONTAINS:()=>qu,ARRAY_MAX_SIZE:()=>cl,ARRAY_MIN_SIZE:()=>il,ARRAY_NOT_CONTAINS:()=>el,ARRAY_NOT_EMPTY:()=>dl,ARRAY_UNIQUE:()=>$l,Allow:()=>b,ArrayContains:()=>tl,ArrayMaxSize:()=>fl,ArrayMinSize:()=>ll,ArrayNotContains:()=>rl,ArrayNotEmpty:()=>ol,ArrayUnique:()=>hl,CONTAINS:()=>Dt,Contains:()=>jt,EQUALS:()=>K,Equals:()=>z,IS_ALPHA:()=>Zt,IS_ALPHANUMERIC:()=>Kt,IS_ARRAY:()=>Wu,IS_ASCII:()=>re,IS_BASE32:()=>Ao,IS_BASE58:()=>pu,IS_BASE64:()=>ue,IS_BIC:()=>Oo,IS_BOOLEAN:()=>Nu,IS_BOOLEAN_STRING:()=>fo,IS_BTC_ADDRESS:()=>xo,IS_BYTE_LENGTH:()=>$e,IS_CREDIT_CARD:()=>_e,IS_CURRENCY:()=>Se,IS_DATA_URI:()=>Fo,IS_DATE:()=>Mu,IS_DATE_STRING:()=>io,IS_DECIMAL:()=>qt,IS_DEFINED:()=>N,IS_DIVISIBLE_BY:()=>$t,IS_EAN:()=>Uo,IS_EMAIL:()=>Pe,IS_EMPTY:()=>Q,IS_ENUM:()=>Du,IS_ETHEREUM_ADDRESS:()=>Ko,IS_FIREBASE_PUSH_ID:()=>Dr,IS_FQDN:()=>Te,IS_FULL_WIDTH:()=>Fe,IS_HALF_WIDTH:()=>ke,IS_HASH:()=>qa,IS_HEXADECIMAL:()=>nn,IS_HEX_COLOR:()=>Xe,IS_HSL:()=>qo,IS_IBAN:()=>ni,IS_IDENTITY_CARD:()=>ii,IS_IN:()=>at,IS_INSTANCE:()=>gl,IS_INT:()=>Gu,IS_IP:()=>pn,IS_ISBN:()=>Cn,IS_ISIN:()=>Mn,IS_ISO31661_ALPHA_2:()=>rr,IS_ISO31661_ALPHA_3:()=>ur,IS_ISO4217_CURRENCY_CODE:()=>Su,IS_ISO8601:()=>Rn,IS_ISRC:()=>fi,IS_ISSN:()=>ro,IS_JSON:()=>Bn,IS_JWT:()=>Hn,IS_LATITUDE:()=>k,IS_LATLONG:()=>j,IS_LENGTH:()=>Wr,IS_LOCALE:()=>mi,IS_LONGITUDE:()=>H,IS_LOWERCASE:()=>zn,IS_MAC_ADDRESS:()=>ln,IS_MAGNET_URI:()=>Ai,IS_MILITARY_TIME:()=>Ka,IS_MIME_TYPE:()=>Oi,IS_MOBILE_PHONE:()=>Qn,IS_MONGO_ID:()=>$r,IS_MULTIBYTE:()=>_r,IS_NEGATIVE:()=>gt,IS_NOT_EMPTY:()=>nt,IS_NOT_EMPTY_OBJECT:()=>yl,IS_NOT_IN:()=>ut,IS_NUMBER:()=>xu,IS_NUMBER_STRING:()=>mo,IS_OBJECT:()=>zu,IS_OCTAL:()=>xi,IS_PASSPORT_NUMBER:()=>Fi,IS_PHONE_NUMBER:()=>Ha,IS_PORT:()=>gn,IS_POSITIVE:()=>yt,IS_POSTAL_CODE:()=>ki,IS_RFC_3339:()=>Wi,IS_RGB_COLOR:()=>Xi,IS_SEM_VER:()=>nu,IS_STRING:()=>Zu,IS_STRONG_PASSWORD:()=>ou,IS_SURROGATE_PAIR:()=>Sr,IS_TAX_ID:()=>gu,IS_TIMEZONE:()=>lu,IS_UPPERCASE:()=>kr,IS_URL:()=>Pr,IS_UUID:()=>Tr,IS_VARIABLE_WIDTH:()=>We,IsAlpha:()=>Vt,IsAlphanumeric:()=>zt,IsArray:()=>Yu,IsAscii:()=>ae,IsBIC:()=>Mo,IsBase32:()=>Co,IsBase58:()=>yu,IsBase64:()=>ce,IsBoolean:()=>Pu,IsBooleanString:()=>po,IsBtcAddress:()=>Ro,IsByteLength:()=>he,IsCreditCard:()=>ve,IsCurrency:()=>Ie,IsDataURI:()=>Bo,IsDate:()=>Eu,IsDateString:()=>lo,IsDecimal:()=>te,IsDefined:()=>P,IsDivisibleBy:()=>ht,IsEAN:()=>Ho,IsEmail:()=>we,IsEmpty:()=>et,IsEnum:()=>Bu,IsEthereumAddress:()=>zo,IsFQDN:()=>Le,IsFirebasePushId:()=>jr,IsFullWidth:()=>Be,IsHSL:()=>ti,IsHalfWidth:()=>Ze,IsHash:()=>to,IsHexColor:()=>Qe,IsHexadecimal:()=>dn,IsIBAN:()=>di,IsIP:()=>yn,IsISBN:()=>Nn,IsISIN:()=>En,IsISO31661Alpha2:()=>ar,IsISO31661Alpha3:()=>cr,IsISO4217CurrencyCode:()=>Iu,IsISO8601:()=>Dn,IsISRC:()=>pi,IsISSN:()=>oo,IsIdentityCard:()=>li,IsIn:()=>it,IsInstance:()=>bl,IsInt:()=>Uu,IsJSON:()=>kn,IsJWT:()=>Wn,IsLatLong:()=>G,IsLatitude:()=>Z,IsLocale:()=>gi,IsLongitude:()=>W,IsLowercase:()=>Xn,IsMACAddress:()=>sn,IsMagnetURI:()=>Ci,IsMilitaryTime:()=>za,IsMimeType:()=>Mi,IsMobilePhone:()=>er,IsMongoId:()=>hr,IsMultibyte:()=>vr,IsNegative:()=>bt,IsNotEmpty:()=>dt,IsNotEmptyObject:()=>_l,IsNotIn:()=>ct,IsNumber:()=>Ru,IsNumberString:()=>go,IsObject:()=>Xu,IsOctal:()=>Ri,IsOptional:()=>M,IsPassportNumber:()=>Bi,IsPhoneNumber:()=>Wa,IsPort:()=>bn,IsPositive:()=>_t,IsPostalCode:()=>Zi,IsRFC3339:()=>Yi,IsRgbColor:()=>Qi,IsSemVer:()=>du,IsString:()=>Vu,IsStrongPassword:()=>uu,IsSurrogatePair:()=>Ir,IsTaxId:()=>bu,IsTimeZone:()=>su,IsUUID:()=>Lr,IsUppercase:()=>Zr,IsUrl:()=>wr,IsVariableWidth:()=>Ye,Length:()=>Yr,MATCHES:()=>rd,MAX:()=>At,MAX_DATE:()=>Et,MAX_LENGTH:()=>zr,MIN:()=>It,MIN_DATE:()=>Pt,MIN_LENGTH:()=>qr,Matches:()=>ad,Max:()=>Ct,MaxDate:()=>Tt,MaxLength:()=>Xr,MetadataStorage:()=>i,Min:()=>Ot,MinDate:()=>wt,MinLength:()=>td,NOT_CONTAINS:()=>Bt,NOT_EQUALS:()=>J,NotContains:()=>kt,NotEquals:()=>q,Validate:()=>E,ValidateBy:()=>I,ValidateIf:()=>x,ValidateNested:()=>R,ValidatePromise:()=>L,ValidationError:()=>l,ValidationTypes:()=>c,Validator:()=>m,ValidatorConstraint:()=>w,arrayContains:()=>Qu,arrayMaxSize:()=>sl,arrayMinSize:()=>ul,arrayNotContains:()=>nl,arrayNotEmpty:()=>al,arrayUnique:()=>pl,buildMessage:()=>C,contains:()=>Ft,equals:()=>Y,getFromContainer:()=>v,getMetadataStorage:()=>u,isAlpha:()=>Ht,isAlphanumeric:()=>Yt,isArray:()=>Ku,isAscii:()=>de,isBIC:()=>Po,isBase32:()=>So,isBase58:()=>hu,isBase64:()=>le,isBoolean:()=>Ou,isBooleanString:()=>$o,isBtcAddress:()=>To,isByteLength:()=>pe,isCreditCard:()=>ge,isCurrency:()=>Ce,isDataURI:()=>jo,isDate:()=>wu,isDateString:()=>uo,isDecimal:()=>Qt,isDefined:()=>O,isDivisibleBy:()=>pt,isEAN:()=>Zo,isEmail:()=>Me,isEmpty:()=>tt,isEnum:()=>Fu,isEthereumAddress:()=>Yo,isFQDN:()=>Re,isFirebasePushId:()=>Fr,isFullWidth:()=>je,isHSL:()=>Qo,isHalfWidth:()=>Ue,isHash:()=>Qa,isHexColor:()=>qe,isHexadecimal:()=>rn,isIBAN:()=>ri,isIP:()=>hn,isISBN:()=>In,isISIN:()=>wn,isISO31661Alpha2:()=>dr,isISO31661Alpha3:()=>lr,isISO4217CurrencyCode:()=>Cu,isISO8601:()=>Ln,isISRC:()=>$i,isISSN:()=>ao,isIdentityCard:()=>ui,isIn:()=>ot,isInstance:()=>vl,isInt:()=>ku,isJSON:()=>Gn,isJWT:()=>Vn,isLatLong:()=>B,isLatitude:()=>U,isLocale:()=>_i,isLongitude:()=>V,isLowercase:()=>Jn,isMACAddress:()=>cn,isMagnetURI:()=>Si,isMilitaryTime:()=>Ya,isMimeType:()=>Pi,isMobilePhone:()=>tr,isMongoId:()=>pr,isMultibyte:()=>gr,isNegative:()=>vt,isNotEmpty:()=>rt,isNotEmptyObject:()=>ml,isNotIn:()=>lt,isNumber:()=>Tu,isNumberString:()=>_o,isObject:()=>Ju,isOctal:()=>Ti,isPassportNumber:()=>ji,isPhoneNumber:()=>Va,isPort:()=>vn,isPositive:()=>mt,isPostalCode:()=>Ui,isRFC3339:()=>Ki,isRgbColor:()=>qi,isSemVer:()=>ru,isString:()=>Hu,isStrongPassword:()=>iu,isSurrogatePair:()=>Cr,isTaxId:()=>vu,isTimeZone:()=>cu,isURL:()=>Mr,isUUID:()=>Rr,isUppercase:()=>Ur,isValidationOptions:()=>an,isVariableWidth:()=>Ke,length:()=>Kr,matches:()=>dd,max:()=>St,maxDate:()=>xt,maxLength:()=>Jr,min:()=>Nt,minDate:()=>Mt,minLength:()=>Qr,notContains:()=>Gt,notEquals:()=>X,registerDecorator:()=>S,registerSchema:()=>Il,useContainer:()=>g,validate:()=>Al,validateOrReject:()=>Sl,validateSync:()=>Cl});var r=function(t){this.groups=[],this.each=!1,this.context=void 0,this.type=t.type,this.name=t.name,this.target=t.target,this.propertyName=t.propertyName,this.constraints=null==t?void 0:t.constraints,this.constraintCls=t.constraintCls,this.validationTypeOptions=t.validationTypeOptions,t.validationOptions&&(this.message=t.validationOptions.message,this.groups=t.validationOptions.groups,this.always=t.validationOptions.always,this.each=t.validationOptions.each,this.context=t.validationOptions.context)},d=function(){function t(){}return t.prototype.transform=function(t){var e=[];return Object.keys(t.properties).forEach((function(n){t.properties[n].forEach((function(d){var a={message:d.message,groups:d.groups,always:d.always,each:d.each},o={type:d.type,name:d.name,target:t.name,propertyName:n,constraints:d.constraints,validationTypeOptions:d.options,validationOptions:a};e.push(new r(o))}))})),e},t}(),a=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,d,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){d={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(d)throw d.error}}return o},o=function(t,e,n){if(n||2===arguments.length)for(var r,d=0,a=e.length;d<a;d++)!r&&d in e||(r||(r=Array.prototype.slice.call(e,0,d)),r[d]=e[d]);return t.concat(r||Array.prototype.slice.call(e))},i=function(){function t(){this.validationMetadatas=new Map,this.constraintMetadatas=new Map}return Object.defineProperty(t.prototype,"hasValidationMetaData",{get:function(){return!!this.validationMetadatas.size},enumerable:!1,configurable:!0}),t.prototype.addValidationSchema=function(t){var e=this;(new d).transform(t).forEach((function(t){return e.addValidationMetadata(t)}))},t.prototype.addValidationMetadata=function(t){var e=this.validationMetadatas.get(t.target);e?e.push(t):this.validationMetadatas.set(t.target,[t])},t.prototype.addConstraintMetadata=function(t){var e=this.constraintMetadatas.get(t.target);e?e.push(t):this.constraintMetadatas.set(t.target,[t])},t.prototype.groupByPropertyName=function(t){var e={};return t.forEach((function(t){e[t.propertyName]||(e[t.propertyName]=[]),e[t.propertyName].push(t)})),e},t.prototype.getTargetValidationMetadatas=function(t,e,n,r,d){var i,u,l=function(t){return void 0!==t.always?t.always:(!t.groups||!t.groups.length)&&n},c=function(t){return!(!r||d&&d.length||!t.groups||!t.groups.length)},s=(this.validationMetadatas.get(t)||[]).filter((function(n){return(n.target===t||n.target===e)&&(!!l(n)||!c(n)&&(!(d&&d.length>0)||n.groups&&!!n.groups.find((function(t){return-1!==d.indexOf(t)}))))})),f=[];try{for(var $=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.validationMetadatas.entries()),p=$.next();!p.done;p=$.next()){var h=a(p.value,2),y=h[0],m=h[1];t.prototype instanceof y&&f.push.apply(f,o([],a(m),!1))}}catch(t){i={error:t}}finally{try{p&&!p.done&&(u=$.return)&&u.call($)}finally{if(i)throw i.error}}var _=f.filter((function(e){return"string"!=typeof e.target&&e.target!==t&&(!(e.target instanceof Function)||t.prototype instanceof e.target)&&(!!l(e)||!c(e)&&(!(d&&d.length>0)||e.groups&&!!e.groups.find((function(t){return-1!==d.indexOf(t)}))))})).filter((function(t){return!s.find((function(e){return e.propertyName===t.propertyName&&e.type===t.type}))}));return s.concat(_)},t.prototype.getTargetValidatorConstraints=function(t){return this.constraintMetadatas.get(t)||[]},t}();function u(){var t="undefined"!=typeof globalThis?globalThis:void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0;return t.classValidatorMetadataStorage||(t.classValidatorMetadataStorage=new i),t.classValidatorMetadataStorage}var l=function(){function t(){}return t.prototype.toString=function(t,e,n,r){var d=this;void 0===t&&(t=!1),void 0===e&&(e=!1),void 0===n&&(n=""),void 0===r&&(r=!1);var a=t?"[1m":"",o=t?"[22m":"",i=function(t){return" - property ".concat(a).concat(n).concat(t).concat(o," has failed the following constraints: ").concat(a).concat((r?Object.values:Object.keys)(null!==(e=d.constraints)&&void 0!==e?e:{}).join(", ")).concat(o," \n");var e};if(e){var u=Number.isInteger(+this.property)?"[".concat(this.property,"]"):"".concat(n?".":"").concat(this.property);return this.constraints?i(u):this.children?this.children.map((function(e){return e.toString(t,!0,"".concat(n).concat(u),r)})).join(""):""}return"An instance of ".concat(a).concat(this.target?this.target.constructor.name:"an object").concat(o," has failed the validation:\n")+(this.constraints?i(this.property):"")+(this.children?this.children.map((function(e){return e.toString(t,!0,d.property,r)})).join(""):"")},t}(),c=function(){function t(){}return t.isValid=function(t){var e=this;return"isValid"!==t&&"getMessage"!==t&&-1!==Object.keys(this).map((function(t){return e[t]})).indexOf(t)},t.CUSTOM_VALIDATION="customValidation",t.NESTED_VALIDATION="nestedValidation",t.PROMISE_VALIDATION="promiseValidation",t.CONDITIONAL_VALIDATION="conditionalValidation",t.WHITELIST="whitelistValidation",t.IS_DEFINED="isDefined",t}(),s=function(){function t(){}return t.replaceMessageSpecialTokens=function(t,e){var n;return t instanceof Function?n=t(e):"string"==typeof t&&(n=t),n&&Array.isArray(e.constraints)&&e.constraints.forEach((function(t,e){n=n.replace(new RegExp("\\$constraint".concat(e+1),"g"),function(t){return Array.isArray(t)?t.join(", "):("symbol"==typeof t&&(t=t.description),"".concat(t))}(t))})),n&&void 0!==e.value&&null!==e.value&&["string","boolean","number"].includes(typeof e.value)&&(n=n.replace(/\$value/g,e.value)),n&&(n=n.replace(/\$property/g,e.property)),n&&(n=n.replace(/\$target/g,e.targetName)),n},t}();function f(t){return null!==t&&"object"==typeof t&&"function"==typeof t.then}var $,p,h=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,d,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){d={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(d)throw d.error}}return o},y=function(){function t(t,e){this.validator=t,this.validatorOptions=e,this.awaitingPromises=[],this.ignoreAsyncValidations=!1,this.metadataStorage=u()}return t.prototype.execute=function(t,e,n){var r,d,a=this;this.metadataStorage.hasValidationMetaData||!0!==(null===(r=this.validatorOptions)||void 0===r?void 0:r.enableDebugMessages)||console.warn("No validation metadata found. No validation will be performed. There are multiple possible reasons:\n - There may be multiple class-validator versions installed. You will need to flatten your dependencies to fix the issue.\n - This validation runs before any file with validation decorator was parsed by NodeJS.");var o=this.validatorOptions?this.validatorOptions.groups:void 0,i=this.validatorOptions&&this.validatorOptions.strictGroups||!1,u=this.validatorOptions&&this.validatorOptions.always||!1,s=void 0===(null===(d=this.validatorOptions)||void 0===d?void 0:d.forbidUnknownValues)||!1!==this.validatorOptions.forbidUnknownValues,f=this.metadataStorage.getTargetValidationMetadatas(t.constructor,e,u,i,o),$=this.metadataStorage.groupByPropertyName(f);if(this.validatorOptions&&s&&!f.length){var p=new l;return this.validatorOptions&&this.validatorOptions.validationError&&void 0!==this.validatorOptions.validationError.target&&!0!==this.validatorOptions.validationError.target||(p.target=t),p.value=void 0,p.property=void 0,p.children=[],p.constraints={unknownValue:"an unknown value was passed to the validate function"},void n.push(p)}this.validatorOptions&&this.validatorOptions.whitelist&&this.whitelist(t,$,n),Object.keys($).forEach((function(e){var r=t[e],d=$[e].filter((function(t){return t.type===c.IS_DEFINED})),o=$[e].filter((function(t){return t.type!==c.IS_DEFINED&&t.type!==c.WHITELIST}));r instanceof Promise&&o.find((function(t){return t.type===c.PROMISE_VALIDATION}))?a.awaitingPromises.push(r.then((function(r){a.performValidations(t,r,e,d,o,n)}))):a.performValidations(t,r,e,d,o,n)}))},t.prototype.whitelist=function(t,e,n){var r=this,d=[];Object.keys(t).forEach((function(t){e[t]&&0!==e[t].length||d.push(t)})),d.length>0&&(this.validatorOptions&&this.validatorOptions.forbidNonWhitelisted?d.forEach((function(e){var d,a=r.generateValidationError(t,t[e],e);a.constraints=((d={})[c.WHITELIST]="property ".concat(e," should not exist"),d),a.children=void 0,n.push(a)})):d.forEach((function(e){return delete t[e]})))},t.prototype.stripEmptyErrors=function(t){var e=this;return t.filter((function(t){if(t.children&&(t.children=e.stripEmptyErrors(t.children)),0===Object.keys(t.constraints).length){if(0===t.children.length)return!1;delete t.constraints}return!0}))},t.prototype.performValidations=function(t,e,n,r,d,a){var o=d.filter((function(t){return t.type===c.CUSTOM_VALIDATION})),i=d.filter((function(t){return t.type===c.NESTED_VALIDATION})),u=d.filter((function(t){return t.type===c.CONDITIONAL_VALIDATION})),l=this.generateValidationError(t,e,n);a.push(l),this.conditionalValidations(t,e,u)&&(this.customValidations(t,e,r,l),this.mapContexts(t,e,r,l),void 0===e&&this.validatorOptions&&!0===this.validatorOptions.skipUndefinedProperties||null===e&&this.validatorOptions&&!0===this.validatorOptions.skipNullProperties||null==e&&this.validatorOptions&&!0===this.validatorOptions.skipMissingProperties||(this.customValidations(t,e,o,l),this.nestedValidations(e,i,l),this.mapContexts(t,e,d,l),this.mapContexts(t,e,o,l)))},t.prototype.generateValidationError=function(t,e,n){var r=new l;return this.validatorOptions&&this.validatorOptions.validationError&&void 0!==this.validatorOptions.validationError.target&&!0!==this.validatorOptions.validationError.target||(r.target=t),this.validatorOptions&&this.validatorOptions.validationError&&void 0!==this.validatorOptions.validationError.value&&!0!==this.validatorOptions.validationError.value||(r.value=e),r.property=n,r.children=[],r.constraints={},r},t.prototype.conditionalValidations=function(t,e,n){return n.map((function(n){return n.constraints[0](t,e)})).reduce((function(t,e){return t&&e}),!0)},t.prototype.customValidations=function(t,e,n,r){var d=this;n.forEach((function(n){d.metadataStorage.getTargetValidatorConstraints(n.constraintCls).forEach((function(a){if(!(a.async&&d.ignoreAsyncValidations||d.validatorOptions&&d.validatorOptions.stopAtFirstError&&Object.keys(r.constraints||{}).length>0)){var o={targetName:t.constructor?t.constructor.name:void 0,property:n.propertyName,object:t,value:e,constraints:n.constraints};if(n.each&&(Array.isArray(e)||e instanceof Set||e instanceof Map)){var i,u=((i=e)instanceof Map?Array.from(i.values()):Array.isArray(i)?i:Array.from(i)).map((function(t){return a.instance.validate(t,o)}));if(u.some((function(t){return f(t)}))){var l=u.map((function(t){return f(t)?t:Promise.resolve(t)})),c=Promise.all(l).then((function(o){if(!o.every((function(t){return t}))){var i=h(d.createValidationError(t,e,n,a),2),u=i[0],l=i[1];r.constraints[u]=l,n.context&&(r.contexts||(r.contexts={}),r.contexts[u]=Object.assign(r.contexts[u]||{},n.context))}}));d.awaitingPromises.push(c)}else if(!u.every((function(t){return t}))){var s=h(d.createValidationError(t,e,n,a),2);m=s[0],_=s[1],r.constraints[m]=_}}else{var $=a.instance.validate(e,o);if(f($)){var p=$.then((function(o){if(!o){var i=h(d.createValidationError(t,e,n,a),2),u=i[0],l=i[1];r.constraints[u]=l,n.context&&(r.contexts||(r.contexts={}),r.contexts[u]=Object.assign(r.contexts[u]||{},n.context))}}));d.awaitingPromises.push(p)}else if(!$){var y=h(d.createValidationError(t,e,n,a),2),m=y[0],_=y[1];r.constraints[m]=_}}}}))}))},t.prototype.nestedValidations=function(t,e,n){var r=this;void 0!==t&&e.forEach((function(d){if(!(d.type!==c.NESTED_VALIDATION&&d.type!==c.PROMISE_VALIDATION||r.validatorOptions&&r.validatorOptions.stopAtFirstError&&Object.keys(n.constraints||{}).length>0))if(Array.isArray(t)||t instanceof Set||t instanceof Map)(t instanceof Set?Array.from(t):t).forEach((function(d,a){r.performValidations(t,d,a.toString(),[],e,n.children)}));else if(t instanceof Object){var a="string"==typeof d.target?d.target:d.target.name;r.execute(t,a,n.children)}else{var o=h(r.createValidationError(d.target,t,d),2),i=o[0],u=o[1];n.constraints[i]=u}}))},t.prototype.mapContexts=function(t,e,n,r){var d=this;return n.forEach((function(t){if(t.context){var e=void 0;t.type===c.CUSTOM_VALIDATION&&(e=d.metadataStorage.getTargetValidatorConstraints(t.constraintCls)[0]);var n=d.getConstraintType(t,e);r.constraints[n]&&(r.contexts||(r.contexts={}),r.contexts[n]=Object.assign(r.contexts[n]||{},t.context))}}))},t.prototype.createValidationError=function(t,e,n,r){var d=t.constructor?t.constructor.name:void 0,a=this.getConstraintType(n,r),o={targetName:d,property:n.propertyName,object:t,value:e,constraints:n.constraints},i=n.message||"";return n.message||this.validatorOptions&&(!this.validatorOptions||this.validatorOptions.dismissDefaultMessages)||r&&r.instance.defaultMessage instanceof Function&&(i=r.instance.defaultMessage(o)),[a,s.replaceMessageSpecialTokens(i,o)]},t.prototype.getConstraintType=function(t,e){return e&&e.name?e.name:t.type},t}(),m=function(){function t(){}return t.prototype.validate=function(t,e,n){return this.coreValidate(t,e,n)},t.prototype.validateOrReject=function(t,e,n){return r=this,d=void 0,o=function(){var r;return function(t,e){var n,r,d,a,o={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,i[0]&&(o=0)),o;)try{if(n=1,r&&(d=2&i[0]?r.return:i[0]?r.throw||((d=r.return)&&d.call(r),0):r.next)&&!(d=d.call(r,i[1])).done)return d;switch(r=0,d&&(i=[2&i[0],d.value]),i[0]){case 0:case 1:d=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((d=(d=o.trys).length>0&&d[d.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!d||i[1]>d[0]&&i[1]<d[3])){o.label=i[1];break}if(6===i[0]&&o.label<d[1]){o.label=d[1],d=i;break}if(d&&o.label<d[2]){o.label=d[2],o.ops.push(i);break}d[2]&&o.ops.pop(),o.trys.pop();continue}i=e.call(t,o)}catch(t){i=[6,t],r=0}finally{n=d=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(d){switch(d.label){case 0:return[4,this.coreValidate(t,e,n)];case 1:return(r=d.sent()).length?[2,Promise.reject(r)]:[2]}}))},new((a=void 0)||(a=Promise))((function(t,e){function n(t){try{u(o.next(t))}catch(t){e(t)}}function i(t){try{u(o.throw(t))}catch(t){e(t)}}function u(e){var r;e.done?t(e.value):(r=e.value,r instanceof a?r:new a((function(t){t(r)}))).then(n,i)}u((o=o.apply(r,d||[])).next())}));var r,d,a,o},t.prototype.validateSync=function(t,e,n){var r="string"==typeof t?e:t,d="string"==typeof t?t:void 0,a=new y(this,"string"==typeof t?n:e);a.ignoreAsyncValidations=!0;var o=[];return a.execute(r,d,o),a.stripEmptyErrors(o)},t.prototype.coreValidate=function(t,e,n){var r="string"==typeof t?e:t,d="string"==typeof t?t:void 0,a=new y(this,"string"==typeof t?n:e),o=[];return a.execute(r,d,o),Promise.all(a.awaitingPromises).then((function(){return a.stripEmptyErrors(o)}))},t}(),_=new(function(){function t(){this.instances=[]}return t.prototype.get=function(t){var e=this.instances.find((function(e){return e.type===t}));return e||(e={type:t,object:new t},this.instances.push(e)),e.object},t}());function g(t,e){$=t,p=e}function v(t){if($)try{var e=$.get(t);if(e)return e;if(!p||!p.fallback)return e}catch(t){if(!p||!p.fallbackOnErrors)throw t}return _.get(t)}function b(t){return function(e,n){var d={type:c.WHITELIST,target:e.constructor,propertyName:n,validationOptions:t};u().addValidationMetadata(new r(d))}}var A=function(){function t(t,e,n){void 0===n&&(n=!1),this.target=t,this.name=e,this.async=n}return Object.defineProperty(t.prototype,"instance",{get:function(){return v(this.target)},enumerable:!1,configurable:!0}),t}();function S(t){var e;if(t.validator instanceof Function){if(e=t.validator,v(i).getTargetValidatorConstraints(t.validator).length>1)throw"More than one implementation of ValidatorConstraintInterface found for validator on: ".concat(t.target.name,":").concat(t.propertyName)}else{var n=t.validator;e=function(){function t(){}return t.prototype.validate=function(t,e){return n.validate(t,e)},t.prototype.defaultMessage=function(t){return n.defaultMessage?n.defaultMessage(t):""},t}(),u().addConstraintMetadata(new A(e,t.name,t.async))}var d={type:t.name&&c.isValid(t.name)?t.name:c.CUSTOM_VALIDATION,name:t.name,target:t.target,propertyName:t.propertyName,validationOptions:t.options,constraintCls:e,constraints:t.constraints};u().addValidationMetadata(new r(d))}function C(t,e){return function(n){var r=e&&e.each?"each value in ":"";return t(r,n)}}function I(t,e){return function(n,r){S({name:t.name,target:n.constructor,propertyName:r,options:e,constraints:t.constraints,validator:t.validator})}}var N=c.IS_DEFINED;function O(t){return null!=t}function P(t){return I({name:N,validator:{validate:function(t){return O(t)},defaultMessage:C((function(t){return t+"$property should not be null or undefined"}),t)}},t)}function M(t){return function(e,n){var d={type:c.CONDITIONAL_VALIDATION,target:e.constructor,propertyName:n,constraints:[function(t,e){return null!==t[n]&&void 0!==t[n]}],validationOptions:t};u().addValidationMetadata(new r(d))}}function w(t){return function(e){var n=t&&t.async,r=t&&t.name?t.name:"";r||(r=e.name)||(r=r.replace(/\.?([A-Z]+)/g,(function(t,e){return"_"+e.toLowerCase()})).replace(/^_/,""));var d=new A(e,r,n);u().addConstraintMetadata(d)}}function E(t,e,n){return function(d,a){var o={type:c.CUSTOM_VALIDATION,target:d.constructor,propertyName:a,constraintCls:t,constraints:Array.isArray(e)?e:void 0,validationOptions:Array.isArray(e)?n:e};u().addValidationMetadata(new r(o))}}function x(t,e){return function(n,d){var a={type:c.CONDITIONAL_VALIDATION,target:n.constructor,propertyName:d,constraints:[t],validationOptions:e};u().addValidationMetadata(new r(a))}}var T=function(){return T=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var d in e=arguments[n])Object.prototype.hasOwnProperty.call(e,d)&&(t[d]=e[d]);return t},T.apply(this,arguments)};function R(t){var e=T({},t),n=e.each?"each value in ":"";return e.message=e.message||n+"nested property $property must be either object or array",function(t,n){var d={type:c.NESTED_VALIDATION,target:t.constructor,propertyName:n,validationOptions:e};u().addValidationMetadata(new r(d))}}function L(t){return function(e,n){var d={type:c.PROMISE_VALIDATION,target:e.constructor,propertyName:n,validationOptions:t};u().addValidationMetadata(new r(d))}}var D=n(478),F=n.n(D),j="isLatLong";function B(t){return"string"==typeof t&&F()(t)}function G(t){return I({name:j,validator:{validate:function(t,e){return B(t)},defaultMessage:C((function(t){return t+"$property must be a latitude,longitude string"}),t)}},t)}var k="isLatitude";function U(t){return("number"==typeof t||"string"==typeof t)&&B("".concat(t,",0"))}function Z(t){return I({name:k,validator:{validate:function(t,e){return U(t)},defaultMessage:C((function(t){return t+"$property must be a latitude string or number"}),t)}},t)}var H="isLongitude";function V(t){return("number"==typeof t||"string"==typeof t)&&B("0,".concat(t))}function W(t){return I({name:H,validator:{validate:function(t,e){return V(t)},defaultMessage:C((function(t){return t+"$property must be a longitude string or number"}),t)}},t)}var K="equals";function Y(t,e){return t===e}function z(t,e){return I({name:K,constraints:[t],validator:{validate:function(t,e){return Y(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property must be equal to $constraint1"}),e)}},e)}var J="notEquals";function X(t,e){return t!==e}function q(t,e){return I({name:J,constraints:[t],validator:{validate:function(t,e){return X(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property should not be equal to $constraint1"}),e)}},e)}var Q="isEmpty";function tt(t){return""===t||null==t}function et(t){return I({name:Q,validator:{validate:function(t,e){return tt(t)},defaultMessage:C((function(t){return t+"$property must be empty"}),t)}},t)}var nt="isNotEmpty";function rt(t){return""!==t&&null!=t}function dt(t){return I({name:nt,validator:{validate:function(t,e){return rt(t)},defaultMessage:C((function(t){return t+"$property should not be empty"}),t)}},t)}var at="isIn";function ot(t,e){return Array.isArray(e)&&e.some((function(e){return e===t}))}function it(t,e){return I({name:at,constraints:[t],validator:{validate:function(t,e){return ot(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property must be one of the following values: $constraint1"}),e)}},e)}var ut="isNotIn";function lt(t,e){return!Array.isArray(e)||!e.some((function(e){return e===t}))}function ct(t,e){return I({name:ut,constraints:[t],validator:{validate:function(t,e){return lt(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property should not be one of the following values: $constraint1"}),e)}},e)}var st=n(8335),ft=n.n(st),$t="isDivisibleBy";function pt(t,e){return"number"==typeof t&&"number"==typeof e&&ft()(String(t),e)}function ht(t,e){return I({name:$t,constraints:[t],validator:{validate:function(t,e){return pt(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property must be divisible by $constraint1"}),e)}},e)}var yt="isPositive";function mt(t){return"number"==typeof t&&t>0}function _t(t){return I({name:yt,validator:{validate:function(t,e){return mt(t)},defaultMessage:C((function(t){return t+"$property must be a positive number"}),t)}},t)}var gt="isNegative";function vt(t){return"number"==typeof t&&t<0}function bt(t){return I({name:gt,validator:{validate:function(t,e){return vt(t)},defaultMessage:C((function(t){return t+"$property must be a negative number"}),t)}},t)}var At="max";function St(t,e){return"number"==typeof t&&"number"==typeof e&&t<=e}function Ct(t,e){return I({name:At,constraints:[t],validator:{validate:function(t,e){return St(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property must not be greater than $constraint1"}),e)}},e)}var It="min";function Nt(t,e){return"number"==typeof t&&"number"==typeof e&&t>=e}function Ot(t,e){return I({name:It,constraints:[t],validator:{validate:function(t,e){return Nt(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property must not be less than $constraint1"}),e)}},e)}var Pt="minDate";function Mt(t,e){return t instanceof Date&&t.getTime()>=(e instanceof Date?e:e()).getTime()}function wt(t,e){return I({name:Pt,constraints:[t],validator:{validate:function(t,e){return Mt(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return"minimal allowed date for "+t+"$property is $constraint1"}),e)}},e)}var Et="maxDate";function xt(t,e){return t instanceof Date&&t.getTime()<=(e instanceof Date?e:e()).getTime()}function Tt(t,e){return I({name:Et,constraints:[t],validator:{validate:function(t,e){return xt(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return"maximal allowed date for "+t+"$property is $constraint1"}),e)}},e)}var Rt=n(9466),Lt=n.n(Rt),Dt="contains";function Ft(t,e){return"string"==typeof t&&Lt()(t,e)}function jt(t,e){return I({name:Dt,constraints:[t],validator:{validate:function(t,e){return Ft(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property must contain a $constraint1 string"}),e)}},e)}var Bt="notContains";function Gt(t,e){return"string"==typeof t&&!Lt()(t,e)}function kt(t,e){return I({name:Bt,constraints:[t],validator:{validate:function(t,e){return Gt(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property should not contain a $constraint1 string"}),e)}},e)}var Ut=n(9234),Zt="isAlpha";function Ht(t,e){return"string"==typeof t&&(0,Ut.default)(t,e)}function Vt(t,e){return I({name:Zt,constraints:[t],validator:{validate:function(t,e){return Ht(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property must contain only letters (a-zA-Z)"}),e)}},e)}var Wt=n(4583),Kt="isAlphanumeric";function Yt(t,e){return"string"==typeof t&&(0,Wt.default)(t,e)}function zt(t,e){return I({name:Kt,constraints:[t],validator:{validate:function(t,e){return Yt(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property must contain only letters and numbers"}),e)}},e)}var Jt=n(5218),Xt=n.n(Jt),qt="isDecimal";function Qt(t,e){return"string"==typeof t&&Xt()(t,e)}function te(t,e){return I({name:qt,constraints:[t],validator:{validate:function(t,e){return Qt(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property is not a valid decimal number."}),e)}},e)}var ee=n(4094),ne=n.n(ee),re="isAscii";function de(t){return"string"==typeof t&&ne()(t)}function ae(t){return I({name:re,validator:{validate:function(t,e){return de(t)},defaultMessage:C((function(t){return t+"$property must contain only ASCII characters"}),t)}},t)}var oe=n(2689),ie=n.n(oe),ue="isBase64";function le(t,e){return"string"==typeof t&&ie()(t,e)}function ce(t,e){return I({name:ue,constraints:[t],validator:{validate:function(t,e){return le(t)},defaultMessage:C((function(t){return t+"$property must be base64 encoded"}),e)}},e)}var se=n(3235),fe=n.n(se),$e="isByteLength";function pe(t,e,n){return"string"==typeof t&&fe()(t,{min:e,max:n})}function he(t,e,n){return I({name:$e,constraints:[t,e],validator:{validate:function(t,e){return pe(t,null==e?void 0:e.constraints[0],null==e?void 0:e.constraints[1])},defaultMessage:C((function(t){return t+"$property's byte length must fall into ($constraint1, $constraint2) range"}),n)}},n)}var ye=n(682),me=n.n(ye),_e="isCreditCard";function ge(t){return"string"==typeof t&&me()(t)}function ve(t){return I({name:_e,validator:{validate:function(t,e){return ge(t)},defaultMessage:C((function(t){return t+"$property must be a credit card"}),t)}},t)}var be=n(94),Ae=n.n(be),Se="isCurrency";function Ce(t,e){return"string"==typeof t&&Ae()(t,e)}function Ie(t,e){return I({name:Se,constraints:[t],validator:{validate:function(t,e){return Ce(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property must be a currency"}),e)}},e)}var Ne=n(3868),Oe=n.n(Ne),Pe="isEmail";function Me(t,e){return"string"==typeof t&&Oe()(t,e)}function we(t,e){return I({name:Pe,constraints:[t],validator:{validate:function(t,e){return Me(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property must be an email"}),e)}},e)}var Ee=n(221),xe=n.n(Ee),Te="isFqdn";function Re(t,e){return"string"==typeof t&&xe()(t,e)}function Le(t,e){return I({name:Te,constraints:[t],validator:{validate:function(t,e){return Re(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property must be a valid domain name"}),e)}},e)}var De=n(7146),Fe="isFullWidth";function je(t){return"string"==typeof t&&(0,De.default)(t)}function Be(t){return I({name:Fe,validator:{validate:function(t,e){return je(t)},defaultMessage:C((function(t){return t+"$property must contain a full-width characters"}),t)}},t)}var Ge=n(2941),ke="isHalfWidth";function Ue(t){return"string"==typeof t&&(0,Ge.default)(t)}function Ze(t){return I({name:ke,validator:{validate:function(t,e){return Ue(t)},defaultMessage:C((function(t){return t+"$property must contain a half-width characters"}),t)}},t)}var He=n(9019),Ve=n.n(He),We="isVariableWidth";function Ke(t){return"string"==typeof t&&Ve()(t)}function Ye(t){return I({name:We,validator:{validate:function(t,e){return Ke(t)},defaultMessage:C((function(t){return t+"$property must contain a full-width and half-width characters"}),t)}},t)}var ze=n(6298),Je=n.n(ze),Xe="isHexColor";function qe(t){return"string"==typeof t&&Je()(t)}function Qe(t){return I({name:Xe,validator:{validate:function(t,e){return qe(t)},defaultMessage:C((function(t){return t+"$property must be a hexadecimal color"}),t)}},t)}var tn=n(7117),en=n.n(tn),nn="isHexadecimal";function rn(t){return"string"==typeof t&&en()(t)}function dn(t){return I({name:nn,validator:{validate:function(t,e){return rn(t)},defaultMessage:C((function(t){return t+"$property must be a hexadecimal number"}),t)}},t)}function an(t){return!!t&&("each"in t||"message"in t||"groups"in t||"always"in t||"context"in t)}var on=n(8999),un=n.n(on),ln="isMacAddress";function cn(t,e){return"string"==typeof t&&un()(t,e)}function sn(t,e){var n=an(t)?void 0:t,r=an(t)?t:e;return I({name:ln,constraints:[n],validator:{validate:function(t,e){return cn(t,n)},defaultMessage:C((function(t){return t+"$property must be a MAC Address"}),r)}},r)}var fn=n(1028),$n=n.n(fn),pn="isIp";function hn(t,e){var n=e?"".concat(e):void 0;return"string"==typeof t&&$n()(t,n)}function yn(t,e){return I({name:pn,constraints:[t],validator:{validate:function(t,e){return hn(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property must be an ip address"}),e)}},e)}var mn=n(4595),_n=n.n(mn),gn="isPort";function vn(t){return"string"==typeof t&&_n()(t)}function bn(t){return I({name:gn,validator:{validate:function(t,e){return vn(t)},defaultMessage:C((function(t){return t+"$property must be a port"}),t)}},t)}var An=n(7612),Sn=n.n(An),Cn="isIsbn";function In(t,e){var n=e?"".concat(e):void 0;return"string"==typeof t&&Sn()(t,n)}function Nn(t,e){return I({name:Cn,constraints:[t],validator:{validate:function(t,e){return In(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property must be an ISBN"}),e)}},e)}var On=n(7148),Pn=n.n(On),Mn="isIsin";function wn(t){return"string"==typeof t&&Pn()(t)}function En(t){return I({name:Mn,validator:{validate:function(t,e){return wn(t)},defaultMessage:C((function(t){return t+"$property must be an ISIN (stock/security identifier)"}),t)}},t)}var xn=n(5061),Tn=n.n(xn),Rn="isIso8601";function Ln(t,e){return"string"==typeof t&&Tn()(t,e)}function Dn(t,e){return I({name:Rn,constraints:[t],validator:{validate:function(t,e){return Ln(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property must be a valid ISO 8601 date string"}),e)}},e)}var Fn=n(1008),jn=n.n(Fn),Bn="isJson";function Gn(t){return"string"==typeof t&&jn()(t)}function kn(t){return I({name:Bn,validator:{validate:function(t,e){return Gn(t)},defaultMessage:C((function(t){return t+"$property must be a json string"}),t)}},t)}var Un=n(4979),Zn=n.n(Un),Hn="isJwt";function Vn(t){return"string"==typeof t&&Zn()(t)}function Wn(t){return I({name:Hn,validator:{validate:function(t,e){return Vn(t)},defaultMessage:C((function(t){return t+"$property must be a jwt string"}),t)}},t)}var Kn=n(3928),Yn=n.n(Kn),zn="isLowercase";function Jn(t){return"string"==typeof t&&Yn()(t)}function Xn(t){return I({name:zn,validator:{validate:function(t,e){return Jn(t)},defaultMessage:C((function(t){return t+"$property must be a lowercase string"}),t)}},t)}var qn=n(8355),Qn="isMobilePhone";function tr(t,e,n){return"string"==typeof t&&(0,qn.default)(t,e,n)}function er(t,e,n){return I({name:Qn,constraints:[t,e],validator:{validate:function(t,e){return tr(t,null==e?void 0:e.constraints[0],null==e?void 0:e.constraints[1])},defaultMessage:C((function(t){return t+"$property must be a phone number"}),n)}},n)}var nr=n(1727),rr="isISO31661Alpha2";function dr(t){return"string"==typeof t&&(0,nr.default)(t)}function ar(t){return I({name:rr,validator:{validate:function(t,e){return dr(t)},defaultMessage:C((function(t){return t+"$property must be a valid ISO31661 Alpha2 code"}),t)}},t)}var or=n(6776),ir=n.n(or),ur="isISO31661Alpha3";function lr(t){return"string"==typeof t&&ir()(t)}function cr(t){return I({name:ur,validator:{validate:function(t,e){return lr(t)},defaultMessage:C((function(t){return t+"$property must be a valid ISO31661 Alpha3 code"}),t)}},t)}var sr=n(9131),fr=n.n(sr),$r="isMongoId";function pr(t){return"string"==typeof t&&fr()(t)}function hr(t){return I({name:$r,validator:{validate:function(t,e){return pr(t)},defaultMessage:C((function(t){return t+"$property must be a mongodb id"}),t)}},t)}var yr=n(3590),mr=n.n(yr),_r="isMultibyte";function gr(t){return"string"==typeof t&&mr()(t)}function vr(t){return I({name:_r,validator:{validate:function(t,e){return gr(t)},defaultMessage:C((function(t){return t+"$property must contain one or more multibyte chars"}),t)}},t)}var br=n(2828),Ar=n.n(br),Sr="isSurrogatePair";function Cr(t){return"string"==typeof t&&Ar()(t)}function Ir(t){return I({name:Sr,validator:{validate:function(t,e){return Cr(t)},defaultMessage:C((function(t){return t+"$property must contain any surrogate pairs chars"}),t)}},t)}var Nr=n(2492),Or=n.n(Nr),Pr="isUrl";function Mr(t,e){return"string"==typeof t&&Or()(t,e)}function wr(t,e){return I({name:Pr,constraints:[t],validator:{validate:function(t,e){return Mr(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property must be a URL address"}),e)}},e)}var Er=n(7278),xr=n.n(Er),Tr="isUuid";function Rr(t,e){return"string"==typeof t&&xr()(t,e)}function Lr(t,e){return I({name:Tr,constraints:[t],validator:{validate:function(t,e){return Rr(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property must be a UUID"}),e)}},e)}var Dr="IsFirebasePushId";function Fr(t){return"string"==typeof t&&20===t.length&&/^[a-zA-Z0-9_-]*$/.test(t)}function jr(t){return I({name:Dr,validator:{validate:function(t,e){return Fr(t)},defaultMessage:C((function(t){return t+"$property must be a Firebase Push Id"}),t)}},t)}var Br=n(7245),Gr=n.n(Br),kr="isUppercase";function Ur(t){return"string"==typeof t&&Gr()(t)}function Zr(t){return I({name:kr,validator:{validate:function(t,e){return Ur(t)},defaultMessage:C((function(t){return t+"$property must be uppercase"}),t)}},t)}var Hr=n(661),Vr=n.n(Hr),Wr="isLength";function Kr(t,e,n){return"string"==typeof t&&Vr()(t,{min:e,max:n})}function Yr(t,e,n){return I({name:Wr,constraints:[t,e],validator:{validate:function(t,e){return Kr(t,null==e?void 0:e.constraints[0],null==e?void 0:e.constraints[1])},defaultMessage:C((function(t,e){var n=null!==(null==e?void 0:e.constraints[0])&&void 0!==(null==e?void 0:e.constraints[0]),r=null!==(null==e?void 0:e.constraints[1])&&void 0!==(null==e?void 0:e.constraints[1]);return n&&(!e.value||e.value.length<(null==e?void 0:e.constraints[0]))?t+"$property must be longer than or equal to $constraint1 characters":r&&e.value.length>(null==e?void 0:e.constraints[1])?t+"$property must be shorter than or equal to $constraint2 characters":t+"$property must be longer than or equal to $constraint1 and shorter than or equal to $constraint2 characters"}),n)}},n)}var zr="maxLength";function Jr(t,e){return"string"==typeof t&&Vr()(t,{min:0,max:e})}function Xr(t,e){return I({name:zr,constraints:[t],validator:{validate:function(t,e){return Jr(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property must be shorter than or equal to $constraint1 characters"}),e)}},e)}var qr="minLength";function Qr(t,e){return"string"==typeof t&&Vr()(t,{min:e})}function td(t,e){return I({name:qr,constraints:[t],validator:{validate:function(t,e){return Qr(t,null==e?void 0:e.constraints[0])},defaultMessage:C((function(t){return t+"$property must be longer than or equal to $constraint1 characters"}),e)}},e)}var ed=n(5090),nd=n.n(ed),rd="matches";function dd(t,e,n){return"string"==typeof t&&nd()(t,e,n)}function ad(t,e,n){var r;return e&&e instanceof Object&&!n?n=e:r=e,I({name:rd,constraints:[t,r],validator:{validate:function(t,e){return dd(t,null==e?void 0:e.constraints[0],null==e?void 0:e.constraints[1])},defaultMessage:C((function(t,e){return t+"$property must match $constraint1 regular expression"}),n)}},n)}const od={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6],0,0,0,0,0,0,0,[["6[2-467]\\d{3}",[5]],["4\\d{4}",[5]],0,0,0,0,["(?:0[1-9]|[1589]\\d)\\d{4}",[6]]]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[["[78]\\d{5}",[6]],["690\\d{6}|[356]\\d{5}",[6,9]],["180[02]\\d{4}",[8]],["[19]\\d{5}",[6]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0",0,0,0,0,0,[["[2-4679][2-8]\\d{6}",[8]],["5[024-68]\\d{7}",[9]],["400\\d{6}|800\\d{2,9}"],["900[02]\\d{5}",[9]],0,0,["600[25]\\d{5}",[9]],0,0,["700[05]\\d{5}",[9]]]],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0",0,0,0,0,0,[["(?:[25][0-8]|[34][0-4]|6[0-5])[2-9]\\d{6}"],["7\\d{8}"]]],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268",[["268(?:4(?:6[0-38]|84)|56[0-2])\\d{4}"],["268(?:464|7(?:1[3-9]|[28]\\d|3[0246]|64|7[0-689]))\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,["26840[69]\\d{4}"],["26848[01]\\d{4}"]]],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264",[["264(?:292|4(?:6[12]|9[78]))\\d{4}"],["264(?:235|4(?:69|76)|5(?:3[6-9]|8[1-4])|7(?:29|72))\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,["264724\\d{4}"]]],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0",0,0,0,0,0,[["4505[0-2]\\d{3}|(?:[2358][16-9]\\d[2-9]|4410)\\d{4}|(?:[2358][2-5][2-9]|4(?:[2-57-9][2-9]|6\\d))\\d{5}",[8]],["6(?:[78][2-9]|9\\d)\\d{6}",[9]],["800\\d{4}",[7]],["900[1-9]\\d\\d",[6]],["700[2-9]\\d{4}",[8]],0,0,0,0,["808[1-9]\\d\\d",[6]]]],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0",0,0,0,0,0,[["(?:(?:1[0-25]|47)\\d|2(?:2[2-46]|3[1-8]|4[2-69]|5[2-7]|6[1-9]|8[1-7])|3[12]2)\\d{5}"],["(?:33|4[1349]|55|77|88|9[13-9])\\d{6}"],["800\\d{5}"],["90[016]\\d{5}"],0,0,0,0,["60(?:2[78]|3[5-9]|4[02-9]|5[0-46-9]|[6-8]\\d|9[0-2])\\d{4}"],["80[1-4]\\d{5}"]]],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]],0,0,0,0,0,0,[["2\\d(?:[0134][25-9]|[25-9]\\d)\\d{5}"],["9[1-79]\\d{7}"]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[25