shu-c-view
Version:
rollup 打包vue组件库框架
7 lines (6 loc) • 22.9 kB
JavaScript
/*!
* shu-c-view v1.2.37
* (c) 2022-09-22
* @license MIT
*/
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("lodash/isArray"),t=require("lodash/isEmpty"),r=require("lodash/set"),n=require("lodash/isEqual"),o=require("lodash/isNil"),i=require("lodash/join"),a=require("lodash/forEach"),u=require("lodash/has"),c=require("lodash/omit"),l=require("lodash/find"),s=require("lodash/get");function f(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var p=f(e),d=f(t),h=f(r),g=f(n),v=f(o),m=f(i),y=f(a),b=f(u),E=f(c),_=f(l),x=f(s),S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},I=function(e){try{return!!e()}catch(e){return!0}},O=!I((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),N={},w=function(e){return e&&e.Math==Math&&e},R=w("object"==typeof globalThis&&globalThis)||w("object"==typeof window&&window)||w("object"==typeof self&&self)||w("object"==typeof S&&S)||function(){return this}()||Function("return this")(),C=function(e){return"object"==typeof e?null!==e:"function"==typeof e},T=C,j=R.document,P=T(j)&&T(j.createElement),A=function(e){return P?j.createElement(e):{}},$=A,M=!O&&!I((function(){return 7!=Object.defineProperty($("div"),"a",{get:function(){return 7}}).a})),F=C,q=function(e){if(!F(e))throw TypeError(String(e)+" is not an object");return e},k=C,U=function(e,t){if(!k(e))return e;var r,n;if(t&&"function"==typeof(r=e.toString)&&!k(n=r.call(e)))return n;if("function"==typeof(r=e.valueOf)&&!k(n=r.call(e)))return n;if(!t&&"function"==typeof(r=e.toString)&&!k(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")},B=O,D=M,V=q,z=U,L=Object.defineProperty;N.f=B?L:function(e,t,r){if(V(e),t=z(t,!0),V(r),D)try{return L(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var G=O,X=N.f,Y=Function.prototype,K=Y.toString,W=/^\s*function ([^ (]*)/;G&&!("name"in Y)&&X(Y,"name",{configurable:!0,get:function(){try{return K.call(this).match(W)[1]}catch(e){return""}}});var H={},J={},Q={}.propertyIsEnumerable,Z=Object.getOwnPropertyDescriptor,ee=Z&&!Q.call({1:2},1);J.f=ee?function(e){var t=Z(this,e);return!!t&&t.enumerable}:Q;var te=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},re={}.toString,ne=function(e){return re.call(e).slice(8,-1)},oe=ne,ie="".split,ae=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},ue=I((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==oe(e)?ie.call(e,""):Object(e)}:Object,ce=ae,le=function(e){return ue(ce(e))},se={}.hasOwnProperty,fe=function(e,t){return se.call(e,t)},pe=O,de=J,he=te,ge=le,ve=U,me=fe,ye=M,be=Object.getOwnPropertyDescriptor;H.f=pe?be:function(e,t){if(e=ge(e),t=ve(t,!0),ye)try{return be(e,t)}catch(e){}if(me(e,t))return he(!de.f.call(e,t),e[t])};var Ee=N,_e=te,xe=O?function(e,t,r){return Ee.f(e,t,_e(1,r))}:function(e,t,r){return e[t]=r,e},Se={exports:{}},Ie=R,Oe=xe,Ne=function(e,t){try{Oe(Ie,e,t)}catch(r){Ie[e]=t}return t},we=Ne,Re=R["__core-js_shared__"]||we("__core-js_shared__",{}),Ce=Re,Te=Function.toString;"function"!=typeof Ce.inspectSource&&(Ce.inspectSource=function(e){return Te.call(e)});var je=Ce.inspectSource,Pe=je,Ae=R.WeakMap,$e="function"==typeof Ae&&/native code/.test(Pe(Ae)),Me={exports:{}},Fe=Re;(Me.exports=function(e,t){return Fe[e]||(Fe[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.9.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var qe,ke,Ue,Be=0,De=Math.random(),Ve=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Be+De).toString(36)},ze=Me.exports,Le=Ve,Ge=ze("keys"),Xe=function(e){return Ge[e]||(Ge[e]=Le(e))},Ye={},Ke=$e,We=C,He=xe,Je=fe,Qe=Re,Ze=Xe,et=Ye,tt=R.WeakMap;if(Ke){var rt=Qe.state||(Qe.state=new tt),nt=rt.get,ot=rt.has,it=rt.set;qe=function(e,t){return t.facade=e,it.call(rt,e,t),t},ke=function(e){return nt.call(rt,e)||{}},Ue=function(e){return ot.call(rt,e)}}else{var at=Ze("state");et[at]=!0,qe=function(e,t){return t.facade=e,He(e,at,t),t},ke=function(e){return Je(e,at)?e[at]:{}},Ue=function(e){return Je(e,at)}}var ut={set:qe,get:ke,has:Ue,enforce:function(e){return Ue(e)?ke(e):qe(e,{})},getterFor:function(e){return function(t){var r;if(!We(t)||(r=ke(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}},ct=R,lt=xe,st=fe,ft=Ne,pt=je,dt=ut.get,ht=ut.enforce,gt=String(String).split("String");(Se.exports=function(e,t,r,n){var o,i=!!n&&!!n.unsafe,a=!!n&&!!n.enumerable,u=!!n&&!!n.noTargetGet;"function"==typeof r&&("string"!=typeof t||st(r,"name")||lt(r,"name",t),(o=ht(r)).source||(o.source=gt.join("string"==typeof t?t:""))),e!==ct?(i?!u&&e[t]&&(a=!0):delete e[t],a?e[t]=r:lt(e,t,r)):a?e[t]=r:ft(t,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&dt(this).source||pt(this)}));var vt=R,mt=R,yt=function(e){return"function"==typeof e?e:void 0},bt=function(e,t){return arguments.length<2?yt(vt[e])||yt(mt[e]):vt[e]&&vt[e][t]||mt[e]&&mt[e][t]},Et={},_t=Math.ceil,xt=Math.floor,St=function(e){return isNaN(e=+e)?0:(e>0?xt:_t)(e)},It=St,Ot=Math.min,Nt=function(e){return e>0?Ot(It(e),9007199254740991):0},wt=St,Rt=Math.max,Ct=Math.min,Tt=le,jt=Nt,Pt=function(e,t){var r=wt(e);return r<0?Rt(r+t,0):Ct(r,t)},At=function(e){return function(t,r,n){var o,i=Tt(t),a=jt(i.length),u=Pt(n,a);if(e&&r!=r){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((e||u in i)&&i[u]===r)return e||u||0;return!e&&-1}},$t={includes:At(!0),indexOf:At(!1)},Mt=fe,Ft=le,qt=$t.indexOf,kt=Ye,Ut=function(e,t){var r,n=Ft(e),o=0,i=[];for(r in n)!Mt(kt,r)&&Mt(n,r)&&i.push(r);for(;t.length>o;)Mt(n,r=t[o++])&&(~qt(i,r)||i.push(r));return i},Bt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Dt=Ut,Vt=Bt.concat("length","prototype");Et.f=Object.getOwnPropertyNames||function(e){return Dt(e,Vt)};var zt={};zt.f=Object.getOwnPropertySymbols;var Lt=Et,Gt=zt,Xt=q,Yt=bt("Reflect","ownKeys")||function(e){var t=Lt.f(Xt(e)),r=Gt.f;return r?t.concat(r(e)):t},Kt=fe,Wt=Yt,Ht=H,Jt=N,Qt=I,Zt=/#|\.prototype\./,er=function(e,t){var r=rr[tr(e)];return r==or||r!=nr&&("function"==typeof t?Qt(t):!!t)},tr=er.normalize=function(e){return String(e).replace(Zt,".").toLowerCase()},rr=er.data={},nr=er.NATIVE="N",or=er.POLYFILL="P",ir=er,ar=R,ur=H.f,cr=xe,lr=Se.exports,sr=Ne,fr=function(e,t){for(var r=Wt(t),n=Jt.f,o=Ht.f,i=0;i<r.length;i++){var a=r[i];Kt(e,a)||n(e,a,o(t,a))}},pr=ir,dr=q,hr=function(){var e=dr(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},gr={},vr=I;function mr(e,t){return RegExp(e,t)}gr.UNSUPPORTED_Y=vr((function(){var e=mr("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),gr.BROKEN_CARET=vr((function(){var e=mr("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var yr=hr,br=gr,Er=RegExp.prototype.exec,_r=String.prototype.replace,xr=Er,Sr=function(){var e=/a/,t=/b*/g;return Er.call(e,"a"),Er.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Ir=br.UNSUPPORTED_Y||br.BROKEN_CARET,Or=void 0!==/()??/.exec("")[1];(Sr||Or||Ir)&&(xr=function(e){var t,r,n,o,i=this,a=Ir&&i.sticky,u=yr.call(i),c=i.source,l=0,s=e;return a&&(-1===(u=u.replace("y","")).indexOf("g")&&(u+="g"),s=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(c="(?: "+c+")",s=" "+s,l++),r=new RegExp("^(?:"+c+")",u)),Or&&(r=new RegExp("^"+c+"$(?!\\s)",u)),Sr&&(t=i.lastIndex),n=Er.call(a?r:i,s),a?n?(n.input=n.input.slice(l),n[0]=n[0].slice(l),n.index=i.lastIndex,i.lastIndex+=n[0].length):i.lastIndex=0:Sr&&n&&(i.lastIndex=i.global?n.index+n[0].length:t),Or&&n&&n.length>1&&_r.call(n[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)})),n});var Nr=xr;(function(e,t){var r,n,o,i,a,u=e.target,c=e.global,l=e.stat;if(r=c?ar:l?ar[u]||sr(u,{}):(ar[u]||{}).prototype)for(n in t){if(i=t[n],o=e.noTargetGet?(a=ur(r,n))&&a.value:r[n],!pr(c?n:u+(l?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;fr(i,o)}(e.sham||o&&o.sham)&&cr(i,"sham",!0),lr(r,n,i,e)}})({target:"RegExp",proto:!0,forced:/./.exec!==Nr},{exec:Nr});var wr,Rr,Cr="process"==ne(R.process),Tr=bt("navigator","userAgent")||"",jr=R.process,Pr=jr&&jr.versions,Ar=Pr&&Pr.v8;Ar?Rr=(wr=Ar.split("."))[0]+wr[1]:Tr&&(!(wr=Tr.match(/Edge\/(\d+)/))||wr[1]>=74)&&(wr=Tr.match(/Chrome\/(\d+)/))&&(Rr=wr[1]);var $r=Cr,Mr=Rr&&+Rr,Fr=I,qr=!!Object.getOwnPropertySymbols&&!Fr((function(){return!Symbol.sham&&($r?38===Mr:Mr>37&&Mr<41)})),kr=qr&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ur=R,Br=Me.exports,Dr=fe,Vr=Ve,zr=qr,Lr=kr,Gr=Br("wks"),Xr=Ur.Symbol,Yr=Lr?Xr:Xr&&Xr.withoutSetter||Vr,Kr=function(e){return Dr(Gr,e)&&(zr||"string"==typeof Gr[e])||(zr&&Dr(Xr,e)?Gr[e]=Xr[e]:Gr[e]=Yr("Symbol."+e)),Gr[e]},Wr=Se.exports,Hr=I,Jr=Kr,Qr=Nr,Zr=xe,en=Jr("species"),tn=!Hr((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),rn="$0"==="a".replace(/./,"$0"),nn=Jr("replace"),on=!!/./[nn]&&""===/./[nn]("a","$0"),an=!Hr((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),un=St,cn=ae,ln=function(e){return function(t,r){var n,o,i=String(cn(t)),a=un(r),u=i.length;return a<0||a>=u?e?"":void 0:(n=i.charCodeAt(a))<55296||n>56319||a+1===u||(o=i.charCodeAt(a+1))<56320||o>57343?e?i.charAt(a):n:e?i.slice(a,a+2):o-56320+(n-55296<<10)+65536}},sn={codeAt:ln(!1),charAt:ln(!0)}.charAt,fn=ae,pn=function(e){return Object(fn(e))},dn=Math.floor,hn="".replace,gn=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,vn=/\$([$&'`]|\d{1,2})/g,mn=ne,yn=Nr,bn=function(e,t,r,n){var o=Jr(e),i=!Hr((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),a=i&&!Hr((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[en]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return t=!0,null},r[o](""),!t}));if(!i||!a||"replace"===e&&(!tn||!rn||on)||"split"===e&&!an){var u=/./[o],c=r(o,""[e],(function(e,t,r,n,o){return t.exec===Qr?i&&!o?{done:!0,value:u.call(t,r,n)}:{done:!0,value:e.call(r,t,n)}:{done:!1}}),{REPLACE_KEEPS_$0:rn,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:on}),l=c[0],s=c[1];Wr(String.prototype,e,l),Wr(RegExp.prototype,o,2==t?function(e,t){return s.call(e,this,t)}:function(e){return s.call(e,this)})}n&&Zr(RegExp.prototype[o],"sham",!0)},En=q,_n=Nt,xn=St,Sn=ae,In=function(e,t,r){return t+(r?sn(e,t).length:1)},On=function(e,t,r,n,o,i){var a=r+e.length,u=n.length,c=vn;return void 0!==o&&(o=pn(o),c=gn),hn.call(i,c,(function(i,c){var l;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(a);case"<":l=o[c.slice(1,-1)];break;default:var s=+c;if(0===s)return i;if(s>u){var f=dn(s/10);return 0===f?i:f<=u?void 0===n[f-1]?c.charAt(1):n[f-1]+c.charAt(1):i}l=n[s-1]}return void 0===l?"":l}))},Nn=function(e,t){var r=e.exec;if("function"==typeof r){var n=r.call(e,t);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==mn(e))throw TypeError("RegExp#exec called on incompatible receiver");return yn.call(e,t)},wn=Math.max,Rn=Math.min;bn("replace",2,(function(e,t,r,n){var o=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=n.REPLACE_KEEPS_$0,a=o?"$":"$0";return[function(r,n){var o=Sn(this),i=null==r?void 0:r[e];return void 0!==i?i.call(r,o,n):t.call(String(o),r,n)},function(e,n){if(!o&&i||"string"==typeof n&&-1===n.indexOf(a)){var u=r(t,e,this,n);if(u.done)return u.value}var c=En(e),l=String(this),s="function"==typeof n;s||(n=String(n));var f=c.global;if(f){var p=c.unicode;c.lastIndex=0}for(var d=[];;){var h=Nn(c,l);if(null===h)break;if(d.push(h),!f)break;""===String(h[0])&&(c.lastIndex=In(l,_n(c.lastIndex),p))}for(var g,v="",m=0,y=0;y<d.length;y++){h=d[y];for(var b=String(h[0]),E=wn(Rn(xn(h.index),l.length),0),_=[],x=1;x<h.length;x++)_.push(void 0===(g=h[x])?g:String(g));var S=h.groups;if(s){var I=[b].concat(_,E,l);void 0!==S&&I.push(S);var O=String(n.apply(void 0,I))}else O=On(b,l,E,_,S,n);E>=m&&(v+=l.slice(m,E)+O,m=E+b.length)}return v+l.slice(m)}]}));var Cn=C,Tn=q,jn=function(e){if(!Cn(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e},Pn=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return Tn(r),jn(n),t?e.call(r,n):r.__proto__=n,r}}():void 0),An=C,$n=Pn,Mn=function(e,t,r){var n,o;return $n&&"function"==typeof(n=t.constructor)&&n!==r&&An(o=n.prototype)&&o!==r.prototype&&$n(e,o),e},Fn=C,qn=ne,kn=Kr("match"),Un=bt,Bn=N,Dn=O,Vn=Kr("species"),zn=O,Ln=R,Gn=ir,Xn=Mn,Yn=N.f,Kn=Et.f,Wn=function(e){var t;return Fn(e)&&(void 0!==(t=e[kn])?!!t:"RegExp"==qn(e))},Hn=hr,Jn=gr,Qn=Se.exports,Zn=I,eo=ut.set,to=function(e){var t=Un(e),r=Bn.f;Dn&&t&&!t[Vn]&&r(t,Vn,{configurable:!0,get:function(){return this}})},ro=Kr("match"),no=Ln.RegExp,oo=no.prototype,io=/a/g,ao=/a/g,uo=new no(io)!==io,co=Jn.UNSUPPORTED_Y;if(zn&&Gn("RegExp",!uo||co||Zn((function(){return ao[ro]=!1,no(io)!=io||no(ao)==ao||"/a/i"!=no(io,"i")})))){for(var lo=function(e,t){var r,n=this instanceof lo,o=Wn(e),i=void 0===t;if(!n&&o&&e.constructor===lo&&i)return e;uo?o&&!i&&(e=e.source):e instanceof lo&&(i&&(t=Hn.call(e)),e=e.source),co&&(r=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var a=Xn(uo?new no(e,t):no(e,t),n?this:oo,lo);return co&&r&&eo(a,{sticky:r}),a},so=function(e){e in lo||Yn(lo,e,{configurable:!0,get:function(){return no[e]},set:function(t){no[e]=t}})},fo=Kn(no),po=0;fo.length>po;)so(fo[po++]);oo.constructor=lo,lo.prototype=oo,Qn(Ln,"RegExp",lo)}to("RegExp");var ho=Se.exports,go=q,vo=I,mo=hr,yo=RegExp.prototype,bo=yo.toString,Eo=vo((function(){return"/a/b"!=bo.call({source:"a",flags:"b"})})),_o="toString"!=bo.name;(Eo||_o)&&ho(RegExp.prototype,"toString",(function(){var e=go(this),t=String(e.source),r=e.flags;return"/"+t+"/"+String(void 0===r&&e instanceof RegExp&&!("flags"in yo)?mo.call(e):r)}),{unsafe:!0});var xo,So=Ut,Io=Bt,Oo=Object.keys||function(e){return So(e,Io)},No=N,wo=q,Ro=Oo,Co=O?Object.defineProperties:function(e,t){wo(e);for(var r,n=Ro(t),o=n.length,i=0;o>i;)No.f(e,r=n[i++],t[r]);return e},To=bt("document","documentElement"),jo=q,Po=Co,Ao=Bt,$o=Ye,Mo=To,Fo=A,qo=Xe("IE_PROTO"),ko=function(){},Uo=function(e){return"<script>"+e+"<\/script>"},Bo=function(){try{xo=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;Bo=xo?function(e){e.write(Uo("")),e.close();var t=e.parentWindow.Object;return e=null,t}(xo):((t=Fo("iframe")).style.display="none",Mo.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Uo("document.F=Object")),e.close(),e.F);for(var r=Ao.length;r--;)delete Bo.prototype[Ao[r]];return Bo()};$o[qo]=!0;var Do=Object.create||function(e,t){var r;return null!==e?(ko.prototype=jo(e),r=new ko,ko.prototype=null,r[qo]=e):r=Bo(),void 0===t?r:Po(r,t)},Vo=ae,zo="[\t\n\v\f\r \u2028\u2029\ufeff]",Lo=RegExp("^"+zo+zo+"*"),Go=RegExp(zo+zo+"*$"),Xo=function(e){return function(t){var r=String(Vo(t));return 1&e&&(r=r.replace(Lo,"")),2&e&&(r=r.replace(Go,"")),r}},Yo={start:Xo(1),end:Xo(2),trim:Xo(3)},Ko=O,Wo=R,Ho=ir,Jo=Se.exports,Qo=fe,Zo=ne,ei=Mn,ti=U,ri=I,ni=Do,oi=Et.f,ii=H.f,ai=N.f,ui=Yo.trim,ci=Wo.Number,li=ci.prototype,si="Number"==Zo(ni(li)),fi=function(e){var t,r,n,o,i,a,u,c,l=ti(e,!1);if("string"==typeof l&&l.length>2)if(43===(t=(l=ui(l)).charCodeAt(0))||45===t){if(88===(r=l.charCodeAt(2))||120===r)return NaN}else if(48===t){switch(l.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+l}for(a=(i=l.slice(2)).length,u=0;u<a;u++)if((c=i.charCodeAt(u))<48||c>o)return NaN;return parseInt(i,n)}return+l};if(Ho("Number",!ci(" 0o1")||!ci("0b1")||ci("+0x1"))){for(var pi,di=function(e){var t=arguments.length<1?0:e,r=this;return r instanceof di&&(si?ri((function(){li.valueOf.call(r)})):"Number"!=Zo(r))?ei(new ci(fi(t)),r,di):fi(t)},hi=Ko?oi(ci):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),gi=0;hi.length>gi;gi++)Qo(ci,pi=hi[gi])&&!Qo(di,pi)&&ai(di,pi,ii(ci,pi));di.prototype=li,li.constructor=di,Jo(Wo,"Number",di)}function vi(e,t,r,n,o,i,a,u,c,l){"boolean"!=typeof a&&(c=u,u=a,a=!1);const s="function"==typeof r?r.options:r;let f;if(e&&e.render&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns,s._compiled=!0,o&&(s.functional=!0)),n&&(s._scopeId=n),i?(f=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,c(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},s._ssrRegister=f):t&&(f=a?function(e){t.call(this,l(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,u(e))}),f)if(s.functional){const e=s.render;s.render=function(t,r){return f.call(r),e(t,r)}}else{const e=s.beforeCreate;s.beforeCreate=e?[].concat(e,f):[f]}return r}const mi={inject:["getBaseElForm"],props:{title:{type:String,default:""},colon:{type:Boolean,default:!1},column:{type:Number,default:4},border:{type:Boolean,default:!0},detail:{type:Array,default:()=>[]},model:{type:Object,default:()=>({})},rules:{type:Object,default:()=>({})},size:{type:String,default:"medium"}},data(){return this.desc="表单布局,是一种专门用于管理表单中输入字段的布局",{}},created(){},methods:{registerEvent(e,t){if(b(e,"listeners")&&!d(e.listeners)){const r=this.$refs["ref-form-item"][t],n=e.listeners;y(n,((e,t)=>{r.$off(t,e),r.$on(t,e)}))}},getComponent:e=>e,getComponentProps:e=>E(e,["value","span","name","label","labelHtml","rules","labelWidth","required","error","showMessage","inlineMessage","size","show-message","inline-message","itemCtCls"]),onInputModel(e,t){this.$emit("updateModel",e,t)},_isRenderErrorSlot:(e={})=>!v(x(e,"slotNode.error")),_renderErrorHtml(e=function(){},t=""){this.$slots.default=e(this.$createElement,t)},renderRequireIcon({required:e,rules:t,name:r}){if(e)return!0;let n=_(t,(e=>!0===e.required));return!(v(n)||!n.required)||(n=x(this.rules,r),!v(n)&&null!==_(t,(e=>e.required))||void 0)}}};var yi=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-descriptions",{attrs:{title:e.title,column:e.column,colon:e.colon,border:e.border,size:this.size}},[e._l(e.detail,(function(t,n){return[r("el-descriptions-item",e._b({key:t.name},"el-descriptions-item",t,!1),[r("template",{slot:"label"},[e.renderRequireIcon(t)?r("span",{staticClass:"base-field-required-cls"},[e._v("*")]):e._e(),e._v(e._s(t.label))]),e._v(" "),r("el-form-item",{attrs:{prop:t.name,required:t.required,rules:t.rules,error:t.error,"show-message":t.showMessage,"inline-message":t.inlineMessage,size:t.size},scopedSlots:e._u([e._isRenderErrorSlot(t)?{key:"error",fn:function(r){var n=r.error;return[e._v("\n "+e._s(e._renderErrorHtml(t.slotNode.error,n))+"\n "),e._t("default")]}}:null],null,!0)},[r(e.getComponent(t.el),e._b({ref:"ref-form-item",refInFor:!0,tag:"component",attrs:{value:e.model[t.name],selectTreeValue:e.model[t.name],selectGridValue:e.model[t.name],cascaderTreeValue:e.model[t.name],checkBoxGroupValue:e.model[t.name]},on:{input:function(r){return e.onInputModel(r,t.name)},selectTreeChange:function(r){return e.onInputModel(r,t.name)},selectGridChange:function(r){return e.onInputModel(r,t.name)},selectChange:function(r){return e.onInputModel(r,t.name)},change:function(r){return e.onInputModel(r,t.name)},cascaderTreeChange:function(r){return e.onInputModel(r,t.name)},checkBoxGroupChange:function(r){return e.onInputModel(r,t.name)},inputChange:function(r){return e.onInputModel(r,t.name)},selectInputChange:function(r){return e.onInputModel(r,t.name)},"hook:mounted":function(r){return e.registerEvent(t,n)}}},"component",e.getComponentProps(t),!1))],1)],2)]}))],2)],1)};yi._withStripped=!0;const bi=vi({render:yi,staticRenderFns:[]},undefined,mi,undefined,false,undefined,!1,void 0,void 0,void 0);var Ei={name:"BaseElForm",inheritAttrs:!1,provide:function(){return{getBaseElForm:this}},props:{title:{type:String,default:""},border:{type:Boolean,default:!1},colon:{type:Boolean,default:!0},column:{type:Number,default:3},detail:{type:Array,default:function(){return[]}},ctCls:{type:String},model:{type:Object,default:function(){return{}}},rules:{type:Object,default:function(){return{}}},size:{type:String,default:"medium",validator:function(e){return-1!==["medium","small","mini"].indexOf(e)}},isRender:{type:Boolean,default:!0},isDisplay:{type:Boolean,default:!0}},data:function(){return{refName:"".concat(this._uid,"-el-form-ref")}},methods:{_validateEvent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.$emit("validate",e,t,r)},validate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};this.$refs[this.refName].validate((function(r){if(!r)return t(),!1;e()}))},resetFields:function(){this.$refs[this.refName].resetFields()},clearValidate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.$refs[this.refName].clearValidate(e)},validateField:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};d(e)||this.$refs[this.refName].validateField(e,t)},getForm:function(){return this.$refs[this.refName]}},render:function(e){var t=this;if(g(this.isRender,!1))return e();var r={};g(this.isDisplay,!1)&&h(r,"display","none");var n=["base-el-form-layout"];return v(this.ctCls)||n.push(this.ctCls),this.rowErrorMessage&&n.push("base-row_error_message"),e("el-form",{ref:this.refName,style:r,attrs:{id:this.$attrs.id},class:m(n," "),props:{model:this.model,rules:this.rules,size:this.size},on:{validate:this._validateEvent}},[e(bi,{props:{title:this.title,colon:this.colon,column:this.column,border:this.border,detail:this.detail,model:this.model,rules:this.rules,size:this.size},on:{updateModel:function(e,r){t.model[r]=e}}},[])])}};Ei.install=function(e,t){var r;if(r="按需加载独立组件:"+Ei.name,"development"!==process.env.NODE_ENV&&"dev"!==process.env.NODE_ENV||console.warn(r),p(t)&&!d(t))for(var n=0;n<t.length;n++)t[n].name!==Ei.name&&e.use(t[n]);e.component(Ei.name,Ei)},exports.BaseElForm=Ei;