PageSourceSearch

https://cdn.vooglam.com/vooglam-nuxt/_vooglam/el-form.2d92a368.js

js vooglam.com collected 2026-10-01 13:06:49 UTC 27,926 bytes, 13 lines download raw bytes

1var ct=Object.defineProperty,pt=Object.defineProperties;var vt=Object.getOwnPropertyDescriptors;var ee=Object.getOwnPropertySymbols;var Re=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable;var je=(i,e,t)=>e in i?ct(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,W=(i,e)=>{for(var t in e||(e={}))Re.call(e,t)&&je(i,t,e[t]);if(ee)for(var t of ee(e))Ne.call(e,t)&&je(i,t,e[t]);return i},B=(i,e)=>pt(i,vt(e));var Ie=(i,e)=>{var t={};for(var r in i)Re.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&ee)for(var r of ee(i))e.indexOf(r)<0&&Ne.call(i,r)&&(t[r]=i[r]);return t};var C=(i,e,t)=>new Promise((r,n)=>{var s=f=>{try{o(t.next(f))}catch(g){n(g)}},a=f=>{try{o(t.throw(f))}catch(g){n(g)}},o=f=>f.done?r(f.value):Promise.resolve(f.value).then(s,a);o((t=t.apply(i,e)).next())});import{bl as Oe,dS as Ge,bn as ve,cJ as mt,cg as me,bp as Je,r as D,S as A,ar as Q,cH as Ke,au as Ee,w as ae,cZ as gt,c2 as Ze,aT as ke,cd as He,cF as _e,K as ge,N as Qe,ao as ne,af as K,l as O,aw as Xe,i as et,an as se,cG as he,cY as ht,A as tt,o as rt,cT as yt,dL as bt,Y as oe,O as wt,am as nt,c0 as Ft,br as qt,dT as xt,bt as Ve,dU as de,M as ce,L as Ot,b9 as Et,aa as Me,aI as _t,a8 as Le,a9 as We,ae as Te,cp as At,c7 as Pt,dH as St}from"./entry.661fa3a2.js";import{c as ye}from"./castArray.5d9473ee.js";import{b as jt}from"./_baseClone.1821a0a4.js";(function(){try{var i=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{};i.SENTRY_RELEASE={id:"09964b0e4444e4e5336e3f91eb61254c4ce7cda3"};var e=new i.Error().stack;e&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[e]="a0f0379a-f545-4087-8daa-b7e9b5e00428",i._sentryDebugIdIdentifier="sentry-dbid-a0f0379a-f545-4087-8daa-b7e9b5e00428")}catch(t){}})();var Rt=4;function $e(i){return jt(i,Rt)}const Nt=Oe({size:{type:String,values:Ge},disabled:Boolean}),It=Oe(B(W({},Nt),{model:Object,rules:{type:ve(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean]}})),Vt={validate:(i,e,t)=>(mt(i)||me(i))&&Je(e)&&me(t)};function Mt(){const i=D([]),e=A(()=>{if(!i.value.length)return"0";const s=Math.max(...i.value);return s?`${s}px`:""});function t(s){const a=i.value.indexOf(s);return a===-1&&e.value,a}function r(s,a){if(s&&a){const o=t(a);i.value.splice(o,1,s)}else s&&i.value.push(s)}function n(s){const a=t(s);a>-1&&i.value.splice(a,1)}return{autoLabelWidth:e,registerLabelWidth:r,deregisterLabelWidth:n}}const te=(i,e)=>{const t=ye(e);return t.length>0?i.filter(r=>r.prop&&t.includes(r.prop)):i},Lt="ElForm",Wt=Q({name:Lt}),Tt=Q(B(W({},Wt),{props:It,emits:Vt,setup(i,{expose:e,emit:t}){const r=i,n=[],s=Ke(),a=Ee("form"),o=A(()=>{const{labelPosition:v,inline:u}=r;return[a.b(),a.m(s.value||"default"),{[a.m(`label-${v}`)]:v,[a.m("inline")]:u}]}),f=v=>{n.push(v)},g=v=>{v.prop&&n.splice(n.indexOf(v),1)},p=(v=[])=>{r.model&&te(n,v).forEach(u=>u.resetField())},h=(v=[])=>{te(n,v).forEach(u=>u.clearValidate())},w=A(()=>!!r.model),E=v=>{if(n.length===0)return[];const u=te(n,v);return u.length?u:[]},_=v=>C(this,null,function*(){return y(void 0,v)}),d=(...u)=>C(this,[...u],function*(v=[]){if(!w.value)return!1;const b=E(v);if(b.length===0)return!0;let x={};for(const F of b)try{yield F.validate("")}catch(j){x=W(W({},x),j)}return Object.keys(x).length===0?!0:Promise.reject(x)}),y=(...b)=>C(this,[...b],function*(v=[],u){const x=!et(u);try{const F=yield d(v);return F===!0&&(u==null||u(F)),F}catch(F){if(F instanceof Error)throw F;const j=F;return r.scrollToError&&l(Object.keys(j)[0]),u==null||u(!1,j),x&&Promise.reject(j)}}),l=v=>{var u;const b=te(n,v)[0];b&&((u=b.$el)==null||u.scrollIntoView(r.scrollIntoViewOptions))};return ae(()=>r.rules,()=>{r.validateOnRuleChange&&_().catch(v=>gt())},{deep:!0}),Ze(_e,ke(W(B(W({},He(r)),{emit:t,resetFields:p,clearValidate:h,validateField:y,addField:f,removeField:g}),Mt()))),e({validate:_,validateField:y,resetFields:p,clearValidate:h,scrollToField:l}),(v,u)=>(ge(),Qe("form",{class:K(O(o))},[ne(v.$slots,"default")],2))}}));var $t=Xe(Tt,[["__file","/home/runner/work/element-plus/element-plus/packages/components/form/src/form.vue"]]);function z(){return z=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},z.apply(this,arguments)}function Bt(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,H(i,e)}function be(i){return be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},be(i)}
1function H(i,e){return H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},H(i,e)}function Ct(){if(typeof Reflect=="undefined"||!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(i){return!1}}function ie(i,e,t){return Ct()?ie=Reflect.construct.bind():ie=function(n,s,a){var o=[null];o.push.apply(o,s);var f=Function.bind.apply(n,o),g=new f;return a&&H(g,a.prototype),g},ie.apply(null,arguments)}function Dt(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function we(i){var e=typeof Map=="function"?new Map:void 0;return we=function(r){if(r===null||!Dt(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e!="undefined"){if(e.has(r))return e.get(r);e.set(r,n)}function n(){return ie(r,arguments,be(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),H(n,r)},we(i)}var zt=/%[sdj%]/g,Ut=function(){};typeof process!="undefined"&&process.env;function Fe(i){if(!i||!i.length)return null;var e={};return i.forEach(function(t){var r=t.field;e[r]=e[r]||[],e[r].push(t)}),e}function I(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];var n=0,s=t.length;if(typeof i=="function")return i.apply(null,t);if(typeof i=="string"){var a=i.replace(zt,function(o){if(o==="%%")return"%";if(n>=s)return o;switch(o){case"%s":return String(t[n++]);case"%d":return Number(t[n++]);case"%j":try{return JSON.stringify(t[n++])}catch(f){return"[Circular]"}break;default:return o}});return a}return i}function Yt(i){return i==="string"||i==="url"||i==="hex"||i==="email"||i==="date"||i==="pattern"}function P(i,e){return!!(i==null||e==="array"&&Array.isArray(i)&&!i.length||Yt(e)&&typeof i=="string"&&!i)}function Gt(i,e,t){var r=[],n=0,s=i.length;function a(o){r.push.apply(r,o||[]),n++,n===s&&t(r)}i.forEach(function(o){e(o,a)})}function Be(i,e,t){var r=0,n=i.length;function s(a){if(a&&a.length){t(a);return}var o=r;r=r+1,o<n?e(i[o],s):t([])}s([])}function Jt(i){var e=[];
1return Object.keys(i).forEach(function(t){e.push.apply(e,i[t]||[])}),e}var Ce=function(i){Bt(e,i);function e(t,r){var n;return n=i.call(this,"Async Validation Error")||this,n.errors=t,n.fields=r,n}return e}(we(Error));function Kt(i,e,t,r,n){if(e.first){var s=new Promise(function(w,E){var _=function(l){return r(l),l.length?E(new Ce(l,Fe(l))):w(n)},d=Jt(i);Be(d,t,_)});return s.catch(function(w){return w}),s}var a=e.firstFields===!0?Object.keys(i):e.firstFields||[],o=Object.keys(i),f=o.length,g=0,p=[],h=new Promise(function(w,E){var _=function(y){if(p.push.apply(p,y),g++,g===f)return r(p),p.length?E(new Ce(p,Fe(p))):w(n)};o.length||(r(p),w(n)),o.forEach(function(d){var y=i[d];a.indexOf(d)!==-1?Be(y,t,_):Gt(y,t,_)})});return h.catch(function(w){return w}),h}function Zt(i){return!!(i&&i.message!==void 0)}function kt(i,e){for(var t=i,r=0;r<e.length;r++){if(t==null)return t;t=t[e[r]]}return t}function De(i,e){return function(t){var r;return i.fullFields?r=kt(e,i.fullFields):r=e[t.field||i.fullField],Zt(t)?(t.field=t.field||i.fullField,t.fieldValue=r,t):{message:typeof t=="function"?t():t,fieldValue:r,field:t.field||i.fullField}}}function ze(i,e){if(e){for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];typeof r=="object"&&typeof i[t]=="object"?i[t]=z({},i[t],r):i[t]=r}}return i}var it=function(e,t,r,n,s,a){e.required&&(!r.hasOwnProperty(e.field)||P(t,a||e.type))&&n.push(I(s.messages.required,e.fullField))},Ht=function(e,t,r,n,s){(/^\s+$/.test(t)||t==="")&&n.push(I(s.messages.whitespace,e.fullField))},re,Qt=function(){if(re)return re;var i="[a-fA-F\\d:]",e=function(b){return b&&b.includeBoundaries?"(?:(?<=\\s|^)(?="+i+")|(?<="+i+")(?=\\s|$))":""},t="(?: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}",r="[a-fA-F\\d]{1,4}",n=(`
2(?:
3(?:`+r+":){7}(?:"+r+`|:)|                                    // 1:2:3:4:5:6:7::  1:2:3:4:5:6:7:8
4(?:`+r+":){6}(?:"+t+"|:"+r+`|:)|                             // 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(?:`+r+":){5}(?::"+t+"|(?::"+r+`){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(?:`+r+":){4}(?:(?::"+r+"){0,1}:"+t+"|(?::"+r+`){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(?:`+r+":){3}(?:(?::"+r+"){0,2}:"+t+"|(?::"+r+`){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(?:`+r+":){2}(?:(?::"+r+"){0,3}:"+t+"|(?::"+r+`){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(?:`+r+":){1}(?:(?::"+r+"){0,4}:"+t+"|(?::"+r+`){1,6}|:)| // 1::              1::3:4:5:6:7:8   1::8            1::3:4:5:6:7:1.2.3.4
10(?::(?:(?::`+r+"){0,5}:"+t+"|(?::"+r+`){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(),s=new RegExp("(?:^"+t+"$)|(?:^"+n+"$)"),a=new RegExp("^"+t+"$"),o=new RegExp("^"+n+"$"),f=function(b){return b&&b.exact?s:new RegExp("(?:"+e(b)+t+e(b)+")|(?:"+e(b)+n+e(b)+")","g")};f.v4=function(u){return u&&u.exact?a:new RegExp(""+e(u)+t+e(u),"g")},f.v6=function(u){return u&&u.exact?o:new RegExp(""+e(u)+n+e(u),"g")};var g="(?:(?:[a-z]+:)?//)",p="(?:\\S+(?::\\S*)?@)?",h=f.v4().source,w=f.v6().source,E="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",_="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",d="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",y="(?::\\d{2,5})?",l='(?:[/?#][^\\s"]*)?',v="(?:"+g+"|www\\.)"+p+"(?:localhost|"+h+"|"+w+"|"+E+_+d+")"+y+l;return re=new RegExp("(?:^"+v+"$)","i"),re},Ue={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},Z={integer:function(e){return Z.number(e)&&parseInt(e,10)===e},float:function(e){return Z.number(e)&&!Z.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(t){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"&&!Z.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(Ue.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(Qt())},hex:function(e){return typeof e=="string"&&!!e.match(Ue.hex)}},Xt=function(e,t,r,n,s){if(e.required&&t===void 0){it(e,t,r,n,s);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],o=e.type;a.indexOf(o)>-1?Z[o](t)||n.push(I(s.messages.types[o],e.fullField,e.type)):o&&typeof t!==e.type&&n.push(I(s.messages.types[o],e.fullField,e.type))},er=function(e,t,r,n,s){var a=typeof e.len=="number",o=typeof e.min=="number",f=typeof e.max=="number",g=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,p=t,h=null,w=typeof t=="number",E=typeof t=="string",_=Array.isArray(t);if(w?h="number":E?h="string":_&&(h="array"),!h)return!1;_&&(p=t.length),E&&(p=t.replace(g,"_").length),a?p!==e.len&&n.push(I(s.messages[h].len,e.fullField,e.len)):o&&!f&&p<e.min?n.push(I(s.messages[h].min,e.fullField,e.min)):f&&!o&&p>e.max?n.push(I(s.messages[h].max,e.fullField,e.max)):o&&f&&(p<e.min||p>e.max)&&n.push(I(s.messages[h].range,e.fullField,e.min,e.max))},G="enum",tr=function(e,t,r,n,s){e[G]=Array.isArray(e[G])?e[G]:[],e[G].indexOf(t)===-1&&n.push(I(s.messages[G],e.fullField,e[G].join(", ")))},rr=function(e,t,r,n,s){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||n.push(I(s.messages.pattern.mismatch,e.fullField,t,e.pattern));else if(typeof e.pattern=="string"){var a=new RegExp(e.pattern);a.test(t)||n.push(I(s.messages.pattern.mismatch,e.fullField,t,e.pattern))}}},m={required:it,whitespace:Ht,type:Xt,range:er,enum:tr,pattern:rr},nr=function(e,t,r,n,s){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(P(t,"string")&&!e.required)return r();m.required(e,t,n,a,s,"string"),P(t,"string")||(m.type(e,t,n,a,s),m.range(e,t,n,a,s),m.pattern(e,t,n,a,s),e.whitespace===!0&&m.whitespace(e,t,n,a,s))}r(a)},ir=function(e,t,r,n,s){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(P(t)&&!e.required)return r();m.required(e,t,n,a,s),t!==void 0&&m.type(e,t,n,a,s)}r(a)},ar=function(e,t,r,n,s){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(t===""&&(t=void 0),P(t)&&!e.required)return r();m.required(e,t,n,a,s),t!==void 0&&(m.type(e,t,n,a,s),m.range(e,t,n,a,s))}r(a)},sr=function(e,t,r,n,s){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(P(t)&&!e.required)return r();m.required(e,t,n,a,s),t!==void 0&&m.type(e,t,n,a,s)}r(a)},or=function(e,t,r,n,s){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(P(t)&&!e.required)return r();m.required(e,t,n,a,s),P(t)||m.type(e,t,n,a,s)}r(a)},fr=function(e,t,r,n,s){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(P(t)&&!e.required)return r();m.required(e,t,n,a,s),t!==void 0&&(m.type(e,t,n,a,s),m.range(e,t,n,a,s))}r(a)},lr=function(e,t,r,n,s){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(P(t)&&!e.required)return r();m.required(e,t,n,a,s),t!==void 0&&(m.type(e,t,n,a,s),m.range(e,t,n,a,s))}r(a)},ur=function(e,t,r,n,s){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(t==null&&!e.required)return r();m.required(e,t,n,a,s,"array"),t!=null&&(m.type(e,t,n,a,s),m.range(e,t,n,a,s))}r(a)},dr=function(e,t,r,n,s){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(P(t)&&!e.required)return r();m.required(e,t,n,a,s),t!==void 0&&m.type(e,t,n,a,s)}r(a)},cr="enum",pr=function(e,t,r,n,s){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(P(t)&&!e.required)return r();m.required(e,t,n,a,s),t!==void 0&&m[cr](e,t,n,a,s)}r(a)},vr=function(e,t,r,n,s){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(P(t,"string")&&!e.required)return r();m.required(e,t,n,a,s),P(t,"string")||m.pattern(e,t,n,a,s)}r(a)},mr=function(e,t,r,n,s){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(P(t,"date")&&!e.required)return r();if(m.required(e,t,n,a,s),!P(t,"date")){var f;t instanceof Date?f=t:f=new Date(t),m.type(e,f,n,a,s),f&&m.range(e,f.getTime(),n,a,s)}}r(a)},gr=function(e,t,r,n,s){var a=[],o=Array.isArray(t)?"array":typeof t;m.required(e,t,n,a,s,o),r(a)},pe=function(e,t,r,n,s){var a=e.type,o=[],f=e.required||!e.required&&n.hasOwnProperty(e.field);if(f){if(P(t,a)&&!e.required)return r();m.required(e,t,n,o,s,a),P(t,a)||m.type(e,t,n,o,s)}r(o)},hr=function(e,t,r,n,s){var a=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(P(t)&&!e.required)return r();m.required(e,t,n,a,s)}r(a)},k={string:nr,method:ir,number:ar,boolean:sr,regexp:or,integer:fr,float:lr,array:ur,object:dr,enum:pr,pattern:vr,date:mr,url:pe,hex:pe,email:pe,required:gr,any:hr};function qe(){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 invali
12d 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 xe=qe(),X=function(){function i(t){this.rules=null,this._messages=xe,this.define(t)}var e=i.prototype;return e.define=function(r){var n=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(typeof r!="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(s){var a=r[s];n.rules[s]=Array.isArray(a)?a:[a]})},e.messages=function(r){return r&&(this._messages=ze(qe(),r)),this._messages},e.validate=function(r,n,s){var a=this;n===void 0&&(n={}),s===void 0&&(s=function(){});var o=r,f=n,g=s;if(typeof f=="function"&&(g=f,f={}),!this.rules||Object.keys(this.rules).length===0)return g&&g(null,o),Promise.resolve(o);function p(d){var y=[],l={};function v(b){if(Array.isArray(b)){var x;y=(x=y).concat.apply(x,b)}else y.push(b)}for(var u=0;u<d.length;u++)v(d[u]);y.length?(l=Fe(y),g(y,l)):g(null,o)}if(f.messages){var h=this.messages();h===xe&&(h=qe()),ze(h,f.messages),f.messages=h}else f.messages=this.messages();var w={},E=f.keys||Object.keys(this.rules);E.forEach(function(d){var y=a.rules[d],l=o[d];y.forEach(function(v){var u=v;typeof u.transform=="function"&&(o===r&&(o=z({},o)),l=o[d]=u.transform(l)),typeof u=="function"?u={validator:u}:u=z({},u),u.validator=a.getValidationMethod(u),u.validator&&(u.field=d,u.fullField=u.fullField||d,u.type=a.getType(u),w[d]=w[d]||[],w[d].push({rule:u,value:l,source:o,field:d}))})});var _={};return Kt(w,f,function(d,y){var l=d.rule,v=(l.type==="object"||l.type==="array")&&(typeof l.fields=="object"||typeof l.defaultField=="object");v=v&&(l.required||!l.required&&d.value),l.field=d.field;function u(F,j){return z({},j,{fullField:l.fullField+"."+F,fullFields:l.fullFields?[].concat(l.fullFields,[F]):[F]})}function b(F){F===void 0&&(F=[]);var j=Array.isArray(F)?F:[F];!f.suppressWarning&&j.length&&i.warning("async-validator:",j),j.length&&l.message!==void 0&&(j=[].concat(l.message));var N=j.map(De(l,o));if(f.first&&N.length)return _[l.field]=1,y(N);if(!v)y(N);else{if(l.required&&!d.value)return l.message!==void 0?N=[].concat(l.message).map(De(l,o)):f.error&&(N=[f.error(l,I(f.messages.required,l.field))]),y(N);var $={};l.defaultField&&Object.keys(d.value).map(function(M){$[M]=l.defaultField}),$=z({},$,d.rule.fields);var J={};Object.keys($).forEach(function(M){var V=$[M],fe=Array.isArray(V)?V:[V];J[M]=fe.map(u.bind(null,M))});var U=new i(J);U.messages(f.messages),d.rule.options&&(d.rule.options.messages=f.messages,d.rule.options.error=f.error),U.validate(d.value,d.rule.options||f,function(M){var V=[];N&&N.length&&V.push.apply(V,N),M&&M.length&&V.push.apply(V,M),y(V.length?V:null)})}}var x;if(l.asyncValidator)x=l.asyncValidator(l,d.value,b,d.source,f);else if(l.validator){try{x=l.validator(l,d.value,b,d.source,f)}catch(F){console.error==null||console.error(F),f.suppressValidatorError||setTimeout(function(){throw F},0),b(F.message)}x===!0?b():x===!1?b(typeof l.message=="function"?l.message(l.fullField||l.field):l.message||(l.fullField||l.field)+" fails"):x instanceof Array?b(
12x):x instanceof Error&&b(x.message)}x&&x.then&&x.then(function(){return b()},function(F){return b(F)})},function(d){p(d)},o)},e.getType=function(r){if(r.type===void 0&&r.pattern instanceof RegExp&&(r.type="pattern"),typeof r.validator!="function"&&r.type&&!k.hasOwnProperty(r.type))throw new Error(I("Unknown rule type %s",r.type));return r.type||"string"},e.getValidationMethod=function(r){if(typeof r.validator=="function")return r.validator;var n=Object.keys(r),s=n.indexOf("message");return s!==-1&&n.splice(s,1),n.length===1&&n[0]==="required"?k.required:k[this.getType(r)]||void 0},i}();X.register=function(e,t){if(typeof t!="function")throw new Error("Cannot register a validator by type, validator is not a function");k[e]=t};X.warning=Ut;X.messages=xe;X.validators=k;const yr=["","error","validating","success"],br=Oe({label:String,labelWidth:{type:[String,Number],default:""},prop:{type:ve([String,Array])},required:{type:Boolean,default:void 0},rules:{type:ve([Object,Array])},error:String,validateStatus:{type:String,values:yr},for:String,inlineMessage:{type:[String,Boolean],default:""},showMessage:{type:Boolean,default:!0},size:{type:String,values:Ge}}),Ye="ElLabelWrap";var wr=Q({name:Ye,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(i,{slots:e}){const t=se(_e,void 0),r=se(he);r||ht(Ye,"usage: <el-form-item><label-wrap /></el-form-item>");const n=Ee("form"),s=D(),a=D(0),o=()=>{var p;if((p=s.value)!=null&&p.firstElementChild){const h=window.getComputedStyle(s.value.firstElementChild).width;return Math.ceil(Number.parseFloat(h))}else return 0},f=(p="update")=>{nt(()=>{e.default&&i.isAutoWidth&&(p==="update"?a.value=o():p==="remove"&&(t==null||t.deregisterLabelWidth(a.value)))})},g=()=>f("update");return tt(()=>{g()}),rt(()=>{f("remove")}),yt(()=>g()),ae(a,(p,h)=>{i.updateAll&&(t==null||t.registerLabelWidth(p,h))}),bt(A(()=>{var p,h;return(h=(p=s.value)==null?void 0:p.firstElementChild)!=null?h:null}),g),()=>{var p,h;if(!e)return null;const{isAutoWidth:w}=i;if(w){const E=t==null?void 0:t.autoLabelWidth,_=r==null?void 0:r.hasLabel,d={};if(_&&E&&E!=="auto"){const y=Math.max(0,Number.parseInt(E,10)-a.value),l=t.labelPosition==="left"?"marginRight":"marginLeft";y&&(d[l]=`${y}px`)}return oe("div",{ref:s,class:[n.be("item","label-wrap")],style:d},[(p=e.default)==null?void 0:p.call(e)])}else return oe(wt,{ref:s},[(h=e.default)==null?void 0:h.call(e)])}}});const Fr=["role","aria-labelledby"],qr=Q({name:"ElFormItem"}),xr=Q(B(W({},qr),{props:br,setup(i,{expose:e}){const t=i,r=Ft(),n=se(_e,void 0),s=se(he,void 0),a=Ke(void 0,{formItem:!1}),o=Ee("form-item"),f=qt().value,g=D([]),p=D(""),h=xt(p,100),w=D(""),E=D();let _,d=!1;const y=A(()=>{if((n==null?void 0:n.labelPosition)==="top")return{};const c=Ve(t.labelWidth||(n==null?void 0:n.labelWidth)||"");return c?{width:c}:{}}),l=A(()=>{if((n==null?void 0:n.labelPosition)==="top"||n!=null&&n.inline)return{};if(!t.label&&!t.labelWidth&&$)return{};const c=Ve(t.labelWidth||(n==null?void 0:n.labelWidth)||"");return!t.label&&!r.label?{marginLeft:c}:{}}),v=A(()=>[o.b(),o.m(a.value),o.is("error",p.value==="error"),o.is("validating",p.value==="validating"),o.is("success",p.value==="success"),o.is("required",fe.value||t.required),o.is("no-asterisk",n==null?void 0:n.hideRequiredAsterisk),(n==null?void 0:n.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[o.m("feedback")]:n==null?void 0:n.statusIcon}]),u=A(()=>Je(t.inlineMessage)?t.inlineMessage:(n==null?void 0:n.inlineMessage)||!1),b=A(()=>[o.e("error"),{[o.em("error","inline")]:u.value}]),x=A(()=>t.prop?me(t.prop)?t.prop:t.prop.join("."):""),F=A(()=>!!(t.label||r.label)),j=A(()=>t.for||(g.value.length===1?g.value[0]:void 0)),N=A(()=>!j.value&&F.value),$=!!s,J=A(()=>{const c=n==null?void 0:n.model;if(!(!c||!t.prop))return de(c,t.prop).value}),U=A(()=>{const{required:c}=t,q=[];t.rules&&q.push(...ye(t.rules));const R=n==null?void 0:n.rules;if(R&&t.prop){const S=de(R,t.prop).value;S&&q.push(...ye(S))}if(c!==void 0){const S=q.map((L,T)=>[L,T]).filter(([L])=>Object.keys(L).includes("required"));if(S.length>0)for(const[L,T]of S)L.required!==c&&(q[T]=B(W({},L),{required:c}));else q.push({required:c})}return q}),M=A(()=>U.value.length>0),V=c=>U.value.filter(R=>!R.trigger||!c?!0:Array.isArray(R.trigger)?R.trigger.includes(c):R.trigger===c).map(L=>{var T=L,{trigger:R}=T,S=Ie(T,["trigger"]);return S}),fe=A(()=>U.value.some(c=>
12c.required)),st=A(()=>{var c;return h.value==="error"&&t.showMessage&&((c=n==null?void 0:n.showMessage)!=null?c:!0)}),Ae=A(()=>`${t.label||""}${(n==null?void 0:n.labelSuffix)||""}`),Y=c=>{p.value=c},ot=c=>{var q,R;const{errors:S,fields:L}=c;(!S||!L)&&console.error(c),Y("error"),w.value=S?(R=(q=S==null?void 0:S[0])==null?void 0:q.message)!=null?R:`${t.prop} is required`:"",n==null||n.emit("validate",t.prop,!1,w.value)},ft=()=>{Y("success"),n==null||n.emit("validate",t.prop,!0,"")},lt=c=>C(this,null,function*(){const q=x.value;return new X({[q]:c}).validate({[q]:J.value},{firstFields:!0}).then(()=>(ft(),!0)).catch(S=>(ot(S),Promise.reject(S)))}),Pe=(c,q)=>C(this,null,function*(){if(d||!t.prop)return!1;const R=et(q);if(!M.value)return q==null||q(!1),!1;const S=V(c);return S.length===0?(q==null||q(!0),!0):(Y("validating"),lt(S).then(()=>(q==null||q(!0),!0)).catch(L=>{const{fields:T}=L;return q==null||q(!1,T),R?!1:Promise.reject(T)}))}),le=()=>{Y(""),w.value="",d=!1},Se=()=>C(this,null,function*(){const c=n==null?void 0:n.model;if(!c||!t.prop)return;const q=de(c,t.prop);d=!0,q.value=$e(_),yield nt(),le(),d=!1}),ut=c=>{g.value.includes(c)||g.value.push(c)},dt=c=>{g.value=g.value.filter(q=>q!==c)};ae(()=>t.error,c=>{w.value=c||"",Y(c?"error":"")},{immediate:!0}),ae(()=>t.validateStatus,c=>Y(c||""));const ue=ke(B(W({},He(t)),{$el:E,size:a,validateState:p,labelId:f,inputIds:g,isGroup:N,hasLabel:F,addInputId:ut,removeInputId:dt,resetField:Se,clearValidate:le,validate:Pe}));return Ze(he,ue),tt(()=>{t.prop&&(n==null||n.addField(ue),_=$e(J.value))}),rt(()=>{n==null||n.removeField(ue)}),e({size:a,validateMessage:w,validateState:p,validate:Pe,clearValidate:le,resetField:Se}),(c,q)=>{var R;return ge(),Qe("div",{ref_key:"formItemRef",ref:E,class:K(O(v)),role:O(N)?"group":void 0,"aria-labelledby":O(N)?O(f):void 0},[oe(O(wr),{"is-auto-width":O(y).width==="auto","update-all":((R=O(n))==null?void 0:R.labelWidth)==="auto"},{default:ce(()=>[O(F)?(ge(),Ot(Et(O(j)?"label":"div"),{key:0,id:O(f),for:O(j),class:K(O(o).e("label")),style:Me(O(y))},{default:ce(()=>[ne(c.$slots,"label",{label:O(Ae)},()=>[_t(Le(O(Ae)),1)])]),_:3},8,["id","for","class","style"])):We("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),Te("div",{class:K(O(o).e("content")),style:Me(O(l))},[ne(c.$slots,"default"),oe(At,{name:`${O(o).namespace.value}-zoom-in-top`},{default:ce(()=>[O(st)?ne(c.$slots,"error",{key:0,error:w.value},()=>[Te("div",{class:K(O(b))},Le(w.value),3)]):We("v-if",!0)]),_:3},8,["name"])],6)],10,Fr)}}}));var at=Xe(xr,[["__file","/home/runner/work/element-plus/element-plus/packages/components/form/src/form-item.vue"]]);const Pr=Pt($t,{FormItem:at}),Sr=St(at);export{Sr as E,Pr as a};
13//# sourceMappingURL=el-form.2d92a368.js.map

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.