import{ad as n}from"./index-m7Z9H1b_.js";function A(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);e&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,a)}return t}function f(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?A(Object(t),!0).forEach(function(a){R(r,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):A(Object(t)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(t,a))})}return r}function R(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function g(r){return typeof r=="function"}function v(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)}function h(r){return g(r.$validator)?f({},r):{$validator:r}}function q(r){return typeof r=="object"?r.$valid:r}function E(r){return r.$validator||r}function N(r,e){if(!v(r))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof r}`);if(!v(e)&&!g(e))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const t=h(e);return t.$params=f(f({},t.$params||{}),r),t}function U(r,e){if(!g(r)&&typeof n(r)!="string")throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof r}`);if(!v(e)&&!g(e))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const t=h(e);return t.$message=r,t}function F(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const t=h(r);return f(f({},t),{},{$async:!0,$watchTargets:e})}function M(r){return{$validator(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),i=1;i<t;i++)a[i-1]=arguments[i];return n(e).reduce((d,j,T)=>{const b=Object.entries(j).reduce(($,D)=>{let[c,x]=D;const S=r[c]||{},y=Object.entries(S).reduce((s,L)=>{let[z,w]=L;const m=E(w).call(this,x,j,T,...a),l=q(m);if(s.$data[z]=m,s.$data.$invalid=!l||!!s.$data.$invalid,s.$data.$error=s.$data.$invalid,!l){let p=w.$message||"";const V=w.$params||{};typeof p=="function"&&(p=p({$pending:!1,$invalid:!l,$params:V,$model:x,$response:m})),s.$errors.push({$property:c,$message:p,$params:V,$response:m,$model:x,$pending:!1,$validator:z})}return{$valid:s.$valid&&l,$data:s.$data,$errors:s.$errors}},{$valid:!0,$data:{},$errors:[]});return $.$data[c]=y.$data,$.$errors[c]=y.$errors,{$valid:$.$valid&&y.$valid,$data:$.$data,$errors:$.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:d.$valid&&b.$valid,$data:d.$data.concat(b.$data),$errors:d.$errors.concat(b.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:e=>{let{$response:t}=e;return t?t.$errors.map(a=>Object.values(a).map(i=>i.map(d=>d.$message)).reduce((i,d)=>i.concat(d),[])):[]}}}const o=r=>{if(r=n(r),Array.isArray(r))return!!r.length;if(r==null)return!1;if(r===!1)return!0;if(r instanceof Date)return!isNaN(r.getTime());if(typeof r=="object"){for(let e in r)return!0;return!1}return!!String(r).length},O=r=>(r=n(r),Array.isArray(r)?r.length:typeof r=="object"?Object.keys(r).length:String(r).length);function u(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return a=>(a=n(a),!o(a)||e.every(i=>(i.lastIndex=0,i.test(a))))}var er=Object.freeze({__proto__:null,forEach:M,len:O,normalizeValidatorObject:h,regex:u,req:o,unwrap:n,unwrapNormalizedValidator:E,unwrapValidatorResponse:q,withAsync:F,withMessage:U,withParams:N});u(/^[a-zA-Z]*$/);u(/^[a-zA-Z0-9]*$/);var Z=u(/^\d*(\.\d+)?$/),tr={$validator:Z,$message:"Value must be numeric",$params:{type:"numeric"}};function _(r,e){return t=>!o(t)||(!/\s/.test(t)||t instanceof Date)&&+n(r)<=+t&&+n(e)>=+t}function ar(r,e){return{$validator:_(r,e),$message:t=>{let{$params:a}=t;return`The value must be between ${a.min} and ${a.max}`},$params:{min:r,max:e,type:"between"}}}const K=/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;var B=u(K),nr={$validator:B,$message:"Value is not a valid email address",$params:{type:"email"}};function C(r){return e=>!o(e)||O(e)<=n(r)}function ir(r){return{$validator:C(r),$message:e=>{let{$params:t}=e;return`The maximum length allowed is ${t.max}`},$params:{max:r,type:"maxLength"}}}function G(r){return e=>!o(e)||O(e)>=n(r)}function sr(r){return{$validator:G(r),$message:e=>{let{$params:t}=e;return`This field should be at least ${t.min} characters long`},$params:{min:r,type:"minLength"}}}function H(r){return typeof r=="string"&&(r=r.trim()),o(r)}var or={$validator:H,$message:"Value is required",$params:{type:"required"}};const P=(r,e)=>r?!0:o(typeof e=="string"?e.trim():e);function I(r){return function(e,t){if(typeof r!="function")return P(n(r),e);const a=r.call(this,e,t);return P(a,e)}}function ur(r){return{$validator:I(r),$message:"The value is required",$params:{type:"requiredUnless",prop:r}}}function J(r){return e=>n(e)===n(r)}function dr(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"other";return{$validator:J(r),$message:t=>`The value must be equal to the ${e} value`,$params:{equalTo:r,otherName:e,type:"sameAs"}}}const Q=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;var W=u(Q),$r={$validator:W,$message:"The value is not a valid URL address",$params:{type:"url"}};function X(r){return e=>!o(e)||(!/\s/.test(e)||e instanceof Date)&&+e>=+n(r)}function fr(r){return{$validator:X(r),$message:e=>{let{$params:t}=e;return`The minimum value allowed is ${t.min}`},$params:{min:r,type:"minValue"}}}function Y(r){return e=>!o(e)||(!/\s/.test(e)||e instanceof Date)&&+e<=+n(r)}var cr=r=>({$validator:Y(r),$message:e=>{let{$params:t}=e;return`The maximum value allowed is ${t.max}`},$params:{max:r,type:"maxValue"}});u(/(^[0-9]*$)|(^-[0-9]+$)/);u(/^[-]?\d*(\.\d+)?$/);export{fr as a,ar as b,er as c,cr as d,nr as e,ir as f,ur as g,sr as m,tr as n,or as r,dr as s,$r as u};