1import{g as te,f as ne,H as ie}from"./COfgP330.js";import{Y as ae,e as K,f as B,w as fe}from"./BVuyBFAy.js";function _(){return _=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(i[t]=r[t])}return i},_.apply(this,arguments)}function se(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,T(i,e)}function J(i){return J=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},J(i)}function T(i,e){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},T(i,e)}function oe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function L(i,e,r){return oe()?L=Reflect.construct.bind():L=function(n,f,a){var s=[null];s.push.apply(s,f);var u=Function.bind.apply(n,s),h=new u;return a&&T(h,a.prototype),h},L.apply(null,arguments)}function ue(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function Z(i){var e=typeof Map=="function"?new Map:void 0;return Z=function(t){if(t===null||!ue(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return L(t,arguments,J(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),T(n,t)},Z(i)}var de=/%[sdj%]/g,ce=function(){};function I(i){if(!i||!i.length)return null;var e={};return i.forEach(function(r){var t=r.field;e[t]=e[t]||[],e[t].push(r)}),e}function O(i){for(var e=arguments.length,r=new Array(e>1?e-1:0),t=1;t<e;t++)r[t-1]=arguments[t];var n=0,f=r.length;if(typeof i=="function")return i.apply(null,r);if(typeof i=="string"){var a=i.replace(de,function(s){if(s==="%%")return"%";if(n>=f)return s;switch(s){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch{return"[Circular]"}break;default:return s}});return a}return i}function pe(i){return i==="string"||i==="url"||i==="hex"||i==="email"||i==="date"||i==="pattern"}function w(i,e){return!!(i==null||e==="array"&&Array.isArray(i)&&!i.length||pe(e)&&typeof i=="string"&&!i)}function ye(i,e,r){var t=[],n=0,f=i.length;function a(s){t.push.apply(t,s||[]),n++,n===f&&r(t)}i.forEach(function(s){e(s,a)})}function G(i,e,r){var t=0,n=i.length;function f(a){if(a&&a.length){r(a);return}var s=t;t=t+1,s<n?e(i[s],f):r([])}f([])}function ve(i){var e=[];
1return Object.keys(i).forEach(function(r){e.push.apply(e,i[r]||[])}),e}var Q=function(i){se(e,i);function e(r,t){var n;return n=i.call(this,"Async Validation Error")||this,n.errors=r,n.fields=t,n}return e}(Z(Error));function ge(i,e,r,t,n){if(e.first){var f=new Promise(function(m,x){var F=function(o){return t(o),o.length?x(new Q(o,I(o))):m(n)},d=ve(i);G(d,r,F)});return f.catch(function(m){return m}),f}var a=e.firstFields===!0?Object.keys(i):e.firstFields||[],s=Object.keys(i),u=s.length,h=0,g=[],l=new Promise(function(m,x){var F=function(y){if(g.push.apply(g,y),h++,h===u)return t(g),g.length?x(new Q(g,I(g))):m(n)};s.length||(t(g),m(n)),s.forEach(function(d){var y=i[d];a.indexOf(d)!==-1?G(y,r,F):ye(y,r,F)})});return l.catch(function(m){return m}),l}function le(i){return!!(i&&i.message!==void 0)}function he(i,e){for(var r=i,t=0;t<e.length;t++){if(r==null)return r;r=r[e[t]]}return r}function X(i,e){return function(r){var t;return i.fullFields?t=he(e,i.fullFields):t=e[r.field||i.fullField],le(r)?(r.field=r.field||i.fullField,r.fieldValue=t,r):{message:typeof r=="function"?r():r,fieldValue:t,field:r.field||i.fullField}}}function C(i,e){if(e){for(var r in e)if(e.hasOwnProperty(r)){var t=e[r];typeof t=="object"&&typeof i[r]=="object"?i[r]=_({},i[r],t):i[r]=t}}return i}var ee=function(e,r,t,n,f,a){e.required&&(!t.hasOwnProperty(e.field)||w(r,a||e.type))&&n.push(O(f.messages.required,e.fullField))},me=function(e,r,t,n,f){(/^\s+$/.test(r)||r==="")&&n.push(O(f.messages.whitespace,e.fullField))},M,we=function(){if(M)return M;var i="[a-fA-F\\d:]",e=function(v){return v&&v.includeBoundaries?"(?:(?<=\\s|^)(?="+i+")|(?<="+i+")(?=\\s|$))":""},r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",t="[a-fA-F\\d]{1,4}",n=(` 2(?: 3(?:`+t+":){7}(?:"+t+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 4(?:`+t+":){6}(?:"+r+"|:"+t+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 5(?:`+t+":){5}(?::"+r+"|(?::"+t+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 6(?:`+t+":){4}(?:(?::"+t+"){0,1}:"+r+"|(?::"+t+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 7(?:`+t+":){3}(?:(?::"+t+"){0,2}:"+r+"|(?::"+t+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 8(?:`+t+":){2}(?:(?::"+t+"){0,3}
8:"+r+"|(?::"+t+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 9(?:`+t+":){1}(?:(?::"+t+"){0,4}:"+r+"|(?::"+t+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 10(?::(?:(?::`+t+"){0,5}:"+r+"|(?::"+t+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 11)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1 12`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),f=new RegExp("(?:^"+r+"$)|(?:^"+n+"$)"),a=new RegExp("^"+r+"$"),s=new RegExp("^"+n+"$"),u=function(v){return v&&v.exact?f:new RegExp("(?:"+e(v)+r+e(v)+")|(?:"+e(v)+n+e(v)+")","g")};u.v4=function(p){return p&&p.exact?a:new RegExp(""+e(p)+r+e(p),"g")},u.v6=function(p){return p&&p.exact?s:new RegExp(""+e(p)+n+e(p),"g")};var h="(?:(?:[a-z]+:)?//)",g="(?:\\S+(?::\\S*)?@)?",l=u.v4().source,m=u.v6().source,x="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",F="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",d="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",y="(?::\\d{2,5})?",o='(?:[/?#][^\\s"]*)?',E="(?:"+h+"|www\\.)"+g+"(?:localhost|"+l+"|"+m+"|"+x+F+d+")"+y+o;return M=new RegExp("(?:^"+E+"$)","i"),M},k={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},D={integer:function(e){return D.number(e)&&parseInt(e,10)===e},float:function(e){return D.number(e)&&!D.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!D.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(k.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(we())},hex:function(e){return typeof e=="string"&&!!e.match(k.hex)}},qe=function(e,r,t,n,f){if(e.required&&r===void 0){ee(e,r,t,n,f);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=e.type;a.indexOf(s)>-1?D[s](r)||n.push(O(f.messages.types[s],e.fullField,e.type)):s&&typeof r!==e.type&&n.push(O(f.messages.types[s],e.fullField,e.type))},Fe=function(e,r,t,n,f){var a=typeof e.len=="number",s=typeof e.min=="number",u=typeof e.max=="number",h=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=r,l=null,m=typeof r=="number",x=typeof r=="string",F=Array.isArray(r);if(m?l="number":x?l="string":F&&(l="array"),!l)return!1;F&&(g=r.length),x&&(g=r.replace(h,"_").length),a?g!==e.len&&n.push(O(f.messages[l].len,e.fullField,e.len)):s&&!u&&g<e.min?n.push(O(f.messages[l].min,e.fullField,e.min)):u&&!s&&g>e.max?n.push(O(f.messages[l].max,e.fullField,e.max)):s&&u&&(g<e.min||g>e.max)&&n.push(O(f.messages[l].range,e.fullField,e.min,e.max))},V="enum",be=function(e,r,t,n,f){e[V]=Array.isArray(e[V])?e[V]:[],e[V].indexOf(r)===-1&&n.push(O(f.messages[V],e.fullField,e[V].join(", ")))},xe=function(e,r,t,n,f){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(r)||n.push(O(f.messages.pattern.mismatch,e.fullField,r,e.pattern));else if(typeof e.pattern=="string"){var a=new RegExp(e.pattern);a.test(r)||n.push(O(f.messages.pattern.mismatch,e.fullField,r,e.pattern))}}},c={required:ee,whitespace:me,type:qe,range:Fe,enum:be,pattern:xe},Oe=function(e,r,t,n,f){var a=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(w(r,"string")&&!e.required)return t();c.required(e,r,n,a,f,"string"),w(r,"string")||(c.type(e,r,n,a,f),c.range(e,r,n,a,f),c.pattern(e,r,n,a,f),e.whitespace===!0&&c.whitespace(e,r,n,a,f))}t(a)},Ee=function(e,r,t,n,f){var a=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(w(r)&&!e.required)return t();c.required(e,r,n,a,f),r!==void 0&&c.type(e,r,n,a,f)}t(a)},Ae=function(e,r,t,n,f){var a=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(r===""&&(r=void 0),w(r)&&!e.required)return t();c.required(e,r,n,a,f),r!==void 0&&(c.type(e,r,n,a,f),c.range(e,r,n,a,f))}t(a)},Pe=function(e,r,t,n,f){var a=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(w(r)&&!e.required)return t();c.required(e,r,n,a,f),r!==void 0&&c.type(e,r,n,a,f)}t(a)},je=function(e,r,t,n,f){var a=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(w(r)&&!e.required)return t();c.required(e,r,n,a,f),w(r)||c.type(e,r,n,a,f)}t(a)},Re=function(e,r,t,n,f){var a=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(w(r)&&!e.required)return t();c.required(e,r,n,a,f),r!==void 0&&(c.type(e,r,n,a,f),c.range(e,r,n,a,f))}t(a)},_e=function(e,r,t,n,f){var a=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(w(r)&&!e.required)return t();c.required(e,r,n,a,f),r!==void 0&&(c.type(e,r,n,a,f),c.range(e,r,n,a,f))}t(a)},Ve=function(e,r,t,n,f){var a=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(r==null&&!e.required)return t();
12c.required(e,r,n,a,f,"array"),r!=null&&(c.type(e,r,n,a,f),c.range(e,r,n,a,f))}t(a)},Ne=function(e,r,t,n,f){var a=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(w(r)&&!e.required)return t();c.required(e,r,n,a,f),r!==void 0&&c.type(e,r,n,a,f)}t(a)},$e="enum",De=function(e,r,t,n,f){var a=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(w(r)&&!e.required)return t();c.required(e,r,n,a,f),r!==void 0&&c[$e](e,r,n,a,f)}t(a)},Se=function(e,r,t,n,f){var a=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(w(r,"string")&&!e.required)return t();c.required(e,r,n,a,f),w(r,"string")||c.pattern(e,r,n,a,f)}t(a)},Te=function(e,r,t,n,f){var a=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(w(r,"date")&&!e.required)return t();if(c.required(e,r,n,a,f),!w(r,"date")){var u;r instanceof Date?u=r:u=new Date(r),c.type(e,u,n,a,f),u&&c.range(e,u.getTime(),n,a,f)}}t(a)},Me=function(e,r,t,n,f){var a=[],s=Array.isArray(r)?"array":typeof r;c.required(e,r,n,a,f,s),t(a)},U=function(e,r,t,n,f){var a=e.type,s=[],u=e.required||!e.required&&n.hasOwnProperty(e.field);if(u){if(w(r,a)&&!e.required)return t();c.required(e,r,n,s,f,a),w(r,a)||c.type(e,r,n,s,f)}t(s)},Le=function(e,r,t,n,f){var a=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(w(r)&&!e.required)return t();c.required(e,r,n,a,f)}t(a)},S={string:Oe,method:Ee,number:Ae,boolean:Pe,regexp:je,integer:Re,float:_e,array:Ve,object:Ne,enum:De,pattern:Se,date:Te,url:U,hex:U,email:U,required:Me,any:Le};function W(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Y=W(),N=function(){function i(r){this.rules=null,this._messages=Y,this.define(r)}var e=i.prototype;return e.define=function(t){var n=this;if(!t)throw new Error("Cannot configure a schema with no rules");if(typeof t!="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={},Object.keys(t).forEach(function(f){var a=t[f];n.rules[f]=Array.isArray(a)?a:[a]})},e.messages=function(t){return t&&(this._messages=C(W(),t)),this._messages},e.validate=function(t,n,f){var a=this;n===void 0&&(n={}),f===void 0&&(f=function(){});var s=t,u=n,h=f;if(typeof u=="function"&&(h=u,u={}),!this.rules||Object.keys(this.rules).length===0)return h&&h(null,s),Promise.resolve(s);function g(d){var y=[],o={};function E(v){if(Array.isArray(v)){var b;y=(b=y).concat.apply(b,v)}else y.push(v)}for(var p=0;p<d.length;p++)E(d[p]);y.length?(o=I(y),h(y,o)):h(null,s)}if(u.messages){var l=this.messages();l===Y&&(l=W()),C(l,u.messages),u.messages=l}else u.messages=this.messages();var m={},x=u.keys||Object.keys(this.rules);x.forEach(function(d){var y=a.rules[d],o=s[d];y.forEach(function(E){var p=E;typeof p.transform=="function"&&(s===t&&(s=_({},s)),o=s[d]=p.transform(o)),typeof p=="function"?p={validator:p}:p=_({},p),p.validator=a.getValidationMethod(p),p.validator&&(p.field=d,p.fullField=p.fullField||d,p.type=a.getType(p),m[d]=m[d]||[],m[d].push({rule:p,value:o,source:s,field:d}))})});var F={};return ge(m,u,function(d,y){var o=d.rule,E=(o.type==="object"||o.type==="array")&&(typeof o.fields=="object"||typeof o.defaultField=="object");E=E&&(o.required||!o.required&&d.value),o.field=d.field;function p(q,R){return _({},R,{fullField:o.fullField+"."+q,fullFields:o.fullFields?[].concat(o.fullFields,[q]):[q]})}function v(q){q===void 0&&(q=[]);var R=Array.isArray(q)?q:[q];!u.suppressWarning&&R.length&&i.warning("async-validator:",R),R.length&&o.message!==void 0&&(R=[].concat(o.message));var P=R.map(X(o,s));if(u.first&&P.length)return F[o.field]=1,y(P);if(!E)y(P);else{if(o.required&&!d.value)return o.message!==void 0?P=[].concat(o.message).map(X(o,s)):u.error&&(P=[u.error(o,O(u.messages.required,o.field))]),y(P);var $={};o.defaultField&&Object.keys(d.value).map(function(j){$[j]=o.defaultField}),$=_({},$,d.rule.fields);var z={};Object.keys($).forEach(function(j){var A=$[j],re=Array.isArray(A)?A:[A];z[j]=re.map(p.bind(null,j))});var H=new i(z);H.messages(u.messages),d.rule.options&&(d.rule.options.messages=u.messages,d.rule.options.error=u.error),H.validate(d.value,d.rule.options||u,function(j){var A=[];P&&P.length&&A.push.apply(A,P),j&&j.length&&A.push.apply(A,j),y(A.length?A:null)})}}var b;if(o.asyncValidator)b=o.asyncValidator(o,d.value,v,d.source,u);else if(o.validator){try{b=o.validator(o,d.value,v,d.source,u)}catch(q){console.error==null||console.error(q),u.suppressValidatorError||setTimeout(function(){throw q},0),v(q.message)}b===!0?v():b===!1?v(typeof o.message=="function"?o.message(o.fullField||o.field):o.message||(o.fullField||o.field)+" fails"):b instanceof Array?v(b):b instanceof Error&&v(b.message)}b&&b.then&&b.then(function(){return v()},function(q){return v(q)})},function(d){g(d)},s)},e.getType=function(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!S.hasOwnProperty(t.type))throw new Error(O("Unknown rule type %s",t.type));return t.type||"string"},e.getValidationMethod=function(t){if(typeof t.validator=="function")return t.validator;var n=Object.keys(t),f=n.indexOf("message");return f!==-1&&n.splice(f,1),n.length===1&&n[0]==="required"?S.required:S[this.getType(t)]||void 0},i}();N.register=function(e,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");S[e]=r};N.warning=ce;N.messages=Y;
12N.validators=S;const Be=N.default||N;function Ze(i,e,r={}){const{validateOption:t={},immediate:n=!0,manual:f=!1}=r,a=te(i),s=ae(null),u=K(!0),h=K(!n||f),g=B(()=>{var y;return((y=s.value)==null?void 0:y.errors)||[]}),l=B(()=>{var y;return((y=s.value)==null?void 0:y.fields)||{}}),m=B(()=>new Be(ne(e))),x=async()=>{u.value=!1,h.value=!1;try{await m.value.validate(a.value,t),h.value=!0,s.value=null}catch(y){s.value=y}finally{u.value=!0}return{pass:h.value,errorInfo:s.value,errors:g.value,errorFields:l.value}};f||fe([a,m],()=>x(),{immediate:n,deep:!0});const F={isFinished:u,pass:h,errors:g,errorInfo:s,errorFields:l,execute:x};function d(){return new Promise((y,o)=>{ie(u).toBe(!0).then(()=>y(F)).catch(E=>o(E))})}return{...F,then(y,o){return d().then(y,o)}}}export{Ze as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.