UNPKG

shu-c-view

Version:

rollup 打包vue组件库框架

7 lines (6 loc) 16.9 kB
/*! * shu-c-view v1.2.37 * (c) 2022-09-22 * @license MIT */ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("lodash/isArray"),e=require("lodash/isEmpty"),n=require("lodash/isNil");function r(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var o=r(t),i=r(e),a=r(n),c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},u=function(t){try{return!!t()}catch(t){return!0}},l=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),s={},f=function(t){return t&&t.Math==Math&&t},p=f("object"==typeof globalThis&&globalThis)||f("object"==typeof window&&window)||f("object"==typeof self&&self)||f("object"==typeof c&&c)||function(){return this}()||Function("return this")(),d=function(t){return"object"==typeof t?null!==t:"function"==typeof t},g=d,v=p.document,h=g(v)&&g(v.createElement),y=function(t){return h?v.createElement(t):{}},x=!l&&!u((function(){return 7!=Object.defineProperty(y("div"),"a",{get:function(){return 7}}).a})),m=d,b=function(t){if(!m(t))throw TypeError(String(t)+" is not an object");return t},E=d,_=function(t,e){if(!E(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!E(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!E(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!E(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},S=l,O=x,w=b,R=_,C=Object.defineProperty;s.f=S?C:function(t,e,n){if(w(t),e=R(e,!0),w(n),O)try{return C(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var T=l,P=s.f,j=Function.prototype,A=j.toString,I=/^\s*function ([^ (]*)/;T&&!("name"in j)&&P(j,"name",{configurable:!0,get:function(){try{return A.call(this).match(I)[1]}catch(t){return""}}});var N={},$={},k={}.propertyIsEnumerable,D=Object.getOwnPropertyDescriptor,U=D&&!k.call({1:2},1);$.f=U?function(t){var e=D(this,t);return!!e&&e.enumerable}:k;var M=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},L={}.toString,F=function(t){return L.call(t).slice(8,-1)},B=F,K="".split,V=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},q=u((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==B(t)?K.call(t,""):Object(t)}:Object,G=V,H=function(t){return q(G(t))},X={}.hasOwnProperty,Y=function(t,e){return X.call(t,e)},z=l,W=$,J=M,Q=H,Z=_,tt=Y,et=x,nt=Object.getOwnPropertyDescriptor;N.f=z?nt:function(t,e){if(t=Q(t),e=Z(e,!0),et)try{return nt(t,e)}catch(t){}if(tt(t,e))return J(!W.f.call(t,e),t[e])};var rt=s,ot=M,it=l?function(t,e,n){return rt.f(t,e,ot(1,n))}:function(t,e,n){return t[e]=n,t},at={exports:{}},ct=p,ut=it,lt=function(t,e){try{ut(ct,t,e)}catch(n){ct[t]=e}return e},st=lt,ft=p["__core-js_shared__"]||st("__core-js_shared__",{}),pt=ft,dt=Function.toString;"function"!=typeof pt.inspectSource&&(pt.inspectSource=function(t){return dt.call(t)});var gt=pt.inspectSource,vt=gt,ht=p.WeakMap,yt="function"==typeof ht&&/native code/.test(vt(ht)),xt={exports:{}},mt=ft;(xt.exports=function(t,e){return mt[t]||(mt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.9.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var bt,Et,_t,St=0,Ot=Math.random(),wt=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++St+Ot).toString(36)},Rt=xt.exports,Ct=wt,Tt=Rt("keys"),Pt={},jt=yt,At=d,It=it,Nt=Y,$t=ft,kt=function(t){return Tt[t]||(Tt[t]=Ct(t))},Dt=Pt,Ut=p.WeakMap;if(jt){var Mt=$t.state||($t.state=new Ut),Lt=Mt.get,Ft=Mt.has,Bt=Mt.set;bt=function(t,e){return e.facade=t,Bt.call(Mt,t,e),e},Et=function(t){return Lt.call(Mt,t)||{}},_t=function(t){return Ft.call(Mt,t)}}else{var Kt=kt("state");Dt[Kt]=!0,bt=function(t,e){return e.facade=t,It(t,Kt,e),e},Et=function(t){return Nt(t,Kt)?t[Kt]:{}},_t=function(t){return Nt(t,Kt)}}var Vt={set:bt,get:Et,has:_t,enforce:function(t){return _t(t)?Et(t):bt(t,{})},getterFor:function(t){return function(e){var n;if(!At(e)||(n=Et(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},qt=p,Gt=it,Ht=Y,Xt=lt,Yt=gt,zt=Vt.get,Wt=Vt.enforce,Jt=String(String).split("String");(at.exports=function(t,e,n,r){var o,i=!!r&&!!r.unsafe,a=!!r&&!!r.enumerable,c=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof e||Ht(n,"name")||Gt(n,"name",e),(o=Wt(n)).source||(o.source=Jt.join("string"==typeof e?e:""))),t!==qt?(i?!c&&t[e]&&(a=!0):delete t[e],a?t[e]=n:Gt(t,e,n)):a?t[e]=n:Xt(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&zt(this).source||Yt(this)}));var Qt=p,Zt=p,te=function(t){return"function"==typeof t?t:void 0},ee=function(t,e){return arguments.length<2?te(Qt[t])||te(Zt[t]):Qt[t]&&Qt[t][e]||Zt[t]&&Zt[t][e]},ne={},re=Math.ceil,oe=Math.floor,ie=function(t){return isNaN(t=+t)?0:(t>0?oe:re)(t)},ae=ie,ce=Math.min,ue=function(t){return t>0?ce(ae(t),9007199254740991):0},le=ie,se=Math.max,fe=Math.min,pe=H,de=ue,ge=function(t,e){var n=le(t);return n<0?se(n+e,0):fe(n,e)},ve=function(t){return function(e,n,r){var o,i=pe(e),a=de(i.length),c=ge(r,a);if(t&&n!=n){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},he={includes:ve(!0),indexOf:ve(!1)},ye=Y,xe=H,me=he.indexOf,be=Pt,Ee=function(t,e){var n,r=xe(t),o=0,i=[];for(n in r)!ye(be,n)&&ye(r,n)&&i.push(n);for(;e.length>o;)ye(r,n=e[o++])&&(~me(i,n)||i.push(n));return i},_e=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");ne.f=Object.getOwnPropertyNames||function(t){return Ee(t,_e)};var Se={};Se.f=Object.getOwnPropertySymbols;var Oe=ne,we=Se,Re=b,Ce=ee("Reflect","ownKeys")||function(t){var e=Oe.f(Re(t)),n=we.f;return n?e.concat(n(t)):e},Te=Y,Pe=Ce,je=N,Ae=s,Ie=u,Ne=/#|\.prototype\./,$e=function(t,e){var n=De[ke(t)];return n==Me||n!=Ue&&("function"==typeof e?Ie(e):!!e)},ke=$e.normalize=function(t){return String(t).replace(Ne,".").toLowerCase()},De=$e.data={},Ue=$e.NATIVE="N",Me=$e.POLYFILL="P",Le=$e,Fe=p,Be=N.f,Ke=it,Ve=at.exports,qe=lt,Ge=function(t,e){for(var n=Pe(e),r=Ae.f,o=je.f,i=0;i<n.length;i++){var a=n[i];Te(t,a)||r(t,a,o(e,a))}},He=Le,Xe=b,Ye=function(){var t=Xe(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},ze={},We=u;function Je(t,e){return RegExp(t,e)}ze.UNSUPPORTED_Y=We((function(){var t=Je("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),ze.BROKEN_CARET=We((function(){var t=Je("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));var Qe=Ye,Ze=ze,tn=RegExp.prototype.exec,en=String.prototype.replace,nn=tn,rn=function(){var t=/a/,e=/b*/g;return tn.call(t,"a"),tn.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),on=Ze.UNSUPPORTED_Y||Ze.BROKEN_CARET,an=void 0!==/()??/.exec("")[1];(rn||an||on)&&(nn=function(t){var e,n,r,o,i=this,a=on&&i.sticky,c=Qe.call(i),u=i.source,l=0,s=t;return a&&(-1===(c=c.replace("y","")).indexOf("g")&&(c+="g"),s=String(t).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==t[i.lastIndex-1])&&(u="(?: "+u+")",s=" "+s,l++),n=new RegExp("^(?:"+u+")",c)),an&&(n=new RegExp("^"+u+"$(?!\\s)",c)),rn&&(e=i.lastIndex),r=tn.call(a?n:i,s),a?r?(r.input=r.input.slice(l),r[0]=r[0].slice(l),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:rn&&r&&(i.lastIndex=i.global?r.index+r[0].length:e),an&&r&&r.length>1&&en.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r});var cn=nn;(function(t,e){var n,r,o,i,a,c=t.target,u=t.global,l=t.stat;if(n=u?Fe:l?Fe[c]||qe(c,{}):(Fe[c]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(a=Be(n,r))&&a.value:n[r],!He(u?r:c+(l?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ge(i,o)}(t.sham||o&&o.sham)&&Ke(i,"sham",!0),Ve(n,r,i,t)}})({target:"RegExp",proto:!0,forced:/./.exec!==cn},{exec:cn});var un,ln,sn="process"==F(p.process),fn=ee("navigator","userAgent")||"",pn=p.process,dn=pn&&pn.versions,gn=dn&&dn.v8;gn?ln=(un=gn.split("."))[0]+un[1]:fn&&(!(un=fn.match(/Edge\/(\d+)/))||un[1]>=74)&&(un=fn.match(/Chrome\/(\d+)/))&&(ln=un[1]);var vn=sn,hn=ln&&+ln,yn=u,xn=!!Object.getOwnPropertySymbols&&!yn((function(){return!Symbol.sham&&(vn?38===hn:hn>37&&hn<41)})),mn=xn&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,bn=p,En=xt.exports,_n=Y,Sn=wt,On=xn,wn=mn,Rn=En("wks"),Cn=bn.Symbol,Tn=wn?Cn:Cn&&Cn.withoutSetter||Sn,Pn=function(t){return _n(Rn,t)&&(On||"string"==typeof Rn[t])||(On&&_n(Cn,t)?Rn[t]=Cn[t]:Rn[t]=Tn("Symbol."+t)),Rn[t]},jn=at.exports,An=u,In=Pn,Nn=cn,$n=it,kn=In("species"),Dn=!An((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),Un="$0"==="a".replace(/./,"$0"),Mn=In("replace"),Ln=!!/./[Mn]&&""===/./[Mn]("a","$0"),Fn=!An((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Bn=ie,Kn=V,Vn=function(t){return function(e,n){var r,o,i=String(Kn(e)),a=Bn(n),c=i.length;return a<0||a>=c?t?"":void 0:(r=i.charCodeAt(a))<55296||r>56319||a+1===c||(o=i.charCodeAt(a+1))<56320||o>57343?t?i.charAt(a):r:t?i.slice(a,a+2):o-56320+(r-55296<<10)+65536}},qn={codeAt:Vn(!1),charAt:Vn(!0)}.charAt,Gn=V,Hn=function(t){return Object(Gn(t))},Xn=Math.floor,Yn="".replace,zn=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Wn=/\$([$&'`]|\d{1,2})/g,Jn=F,Qn=cn,Zn=function(t,e,n,r){var o=In(t),i=!An((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),a=i&&!An((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[kn]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return e=!0,null},n[o](""),!e}));if(!i||!a||"replace"===t&&(!Dn||!Un||Ln)||"split"===t&&!Fn){var c=/./[o],u=n(o,""[t],(function(t,e,n,r,o){return e.exec===Nn?i&&!o?{done:!0,value:c.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:Un,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Ln}),l=u[0],s=u[1];jn(String.prototype,t,l),jn(RegExp.prototype,o,2==e?function(t,e){return s.call(t,this,e)}:function(t){return s.call(t,this)})}r&&$n(RegExp.prototype[o],"sham",!0)},tr=b,er=ue,nr=ie,rr=V,or=function(t,e,n){return e+(n?qn(t,e).length:1)},ir=function(t,e,n,r,o,i){var a=n+t.length,c=r.length,u=Wn;return void 0!==o&&(o=Hn(o),u=zn),Yn.call(i,u,(function(i,u){var l;switch(u.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(a);case"<":l=o[u.slice(1,-1)];break;default:var s=+u;if(0===s)return i;if(s>c){var f=Xn(s/10);return 0===f?i:f<=c?void 0===r[f-1]?u.charAt(1):r[f-1]+u.charAt(1):i}l=r[s-1]}return void 0===l?"":l}))},ar=function(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==Jn(t))throw TypeError("RegExp#exec called on incompatible receiver");return Qn.call(t,e)},cr=Math.max,ur=Math.min;Zn("replace",2,(function(t,e,n,r){var o=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,a=o?"$":"$0";return[function(n,r){var o=rr(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,o,r):e.call(String(o),n,r)},function(t,r){if(!o&&i||"string"==typeof r&&-1===r.indexOf(a)){var c=n(e,t,this,r);if(c.done)return c.value}var u=tr(t),l=String(this),s="function"==typeof r;s||(r=String(r));var f=u.global;if(f){var p=u.unicode;u.lastIndex=0}for(var d=[];;){var g=ar(u,l);if(null===g)break;if(d.push(g),!f)break;""===String(g[0])&&(u.lastIndex=or(l,er(u.lastIndex),p))}for(var v,h="",y=0,x=0;x<d.length;x++){g=d[x];for(var m=String(g[0]),b=cr(ur(nr(g.index),l.length),0),E=[],_=1;_<g.length;_++)E.push(void 0===(v=g[_])?v:String(v));var S=g.groups;if(s){var O=[m].concat(E,b,l);void 0!==S&&O.push(S);var w=String(r.apply(void 0,O))}else w=ir(m,l,b,E,S,r);b>=y&&(h+=l.slice(y,b)+w,y=b+m.length)}return h+l.slice(y)}]}));var lr=d,sr=b,fr=function(t){if(!lr(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t},pr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return sr(n),fr(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),dr=d,gr=pr,vr=d,hr=F,yr=Pn("match"),xr=ee,mr=s,br=l,Er=Pn("species"),_r=l,Sr=p,Or=Le,wr=function(t,e,n){var r,o;return gr&&"function"==typeof(r=e.constructor)&&r!==n&&dr(o=r.prototype)&&o!==n.prototype&&gr(t,o),t},Rr=s.f,Cr=ne.f,Tr=function(t){var e;return vr(t)&&(void 0!==(e=t[yr])?!!e:"RegExp"==hr(t))},Pr=Ye,jr=ze,Ar=at.exports,Ir=u,Nr=Vt.set,$r=function(t){var e=xr(t),n=mr.f;br&&e&&!e[Er]&&n(e,Er,{configurable:!0,get:function(){return this}})},kr=Pn("match"),Dr=Sr.RegExp,Ur=Dr.prototype,Mr=/a/g,Lr=/a/g,Fr=new Dr(Mr)!==Mr,Br=jr.UNSUPPORTED_Y;if(_r&&Or("RegExp",!Fr||Br||Ir((function(){return Lr[kr]=!1,Dr(Mr)!=Mr||Dr(Lr)==Lr||"/a/i"!=Dr(Mr,"i")})))){for(var Kr=function(t,e){var n,r=this instanceof Kr,o=Tr(t),i=void 0===e;if(!r&&o&&t.constructor===Kr&&i)return t;Fr?o&&!i&&(t=t.source):t instanceof Kr&&(i&&(e=Pr.call(t)),t=t.source),Br&&(n=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,""));var a=wr(Fr?new Dr(t,e):Dr(t,e),r?this:Ur,Kr);return Br&&n&&Nr(a,{sticky:n}),a},Vr=function(t){t in Kr||Rr(Kr,t,{configurable:!0,get:function(){return Dr[t]},set:function(e){Dr[t]=e}})},qr=Cr(Dr),Gr=0;qr.length>Gr;)Vr(qr[Gr++]);Ur.constructor=Kr,Kr.prototype=Ur,Ar(Sr,"RegExp",Kr)}$r("RegExp");var Hr=at.exports,Xr=b,Yr=u,zr=Ye,Wr=RegExp.prototype,Jr=Wr.toString,Qr=Yr((function(){return"/a/b"!=Jr.call({source:"a",flags:"b"})})),Zr="toString"!=Jr.name;(Qr||Zr)&&Hr(RegExp.prototype,"toString",(function(){var t=Xr(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in Wr)?zr.call(t):n)}),{unsafe:!0});function to(t,e,n,r,o,i,a,c,u,l){"boolean"!=typeof a&&(u=c,c=a,a=!1);const s="function"==typeof n?n.options:n;let f;if(t&&t.render&&(s.render=t.render,s.staticRenderFns=t.staticRenderFns,s._compiled=!0,o&&(s.functional=!0)),r&&(s._scopeId=r),i?(f=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,u(t)),t&&t._registeredComponents&&t._registeredComponents.add(i)},s._ssrRegister=f):e&&(f=a?function(t){e.call(this,l(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,c(t))}),f)if(s.functional){const t=s.render;s.render=function(e,n){return f.call(n),t(e,n)}}else{const t=s.beforeCreate;s.beforeCreate=t?[].concat(t,f):[f]}return n}const eo={name:"BaseEntNumLine",props:{isRenderLeft:{type:Boolean,default:!0},itemHeight:{type:String,default:"20px"},inTextAlign:{type:String,default:"left",validator:function(t){return-1!==["center","left","right"].indexOf(t)}},topBarAlign:{type:String,default:"space-between",validator:function(t){return-1!==["flex-start","flex-end","center","space-between","space-around"].indexOf(t)}},ctCls:{type:String},resData:{type:Array,default:()=>[]}},watch:{resData:{handler(t){a(t)||i(t)||(this.detailData=t,this.$nextTick((()=>{this.loading=!1})))},immediate:!0}},data:()=>({detailData:[],loading:!0}),methods:{onClickDown(t){this.$emit("click",t)}}};var no=function(){var t,e=this,n=e.$createElement,r=e._self._c||n;return r("div",{class:(t={"base-ent-num-line":!0},t[e.ctCls]=e.ctCls,t)},[e.isRenderLeft?r("div",{staticClass:"left"},[e._t("left")],2):e._e(),e._v(" "),r("div",{staticClass:"echarts"},[e.loading?r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"loading"}):e._l(e.detailData,(function(t,n){return r("div",{key:n,staticClass:"item",on:{click:function(n){return e.onClickDown(t)}}},[r("div",{staticClass:"text",style:{justifyContent:e.topBarAlign}},[e._t("topBarContent",null,{value:t})],2),e._v(" "),r("div",{staticClass:"bottom",style:{height:e.itemHeight}},e._l(t.list,(function(t,n){return r("el-tooltip",{key:n,staticClass:"item",attrs:{effect:"dark",placement:"bottom-end"},scopedSlots:e._u([{key:"content",fn:function(){return[e._t("content",null,{value:t})]},proxy:!0}],null,!0)},[r("div",{staticClass:"inTextCls",style:{flex:t.rate,backgroundColor:t.colour,lineHeight:e.itemHeight,textAlign:e.inTextAlign}},[e._t("inText",null,{value:t})],2)])})),1)])}))],2)])};no._withStripped=!0;const ro=to({render:no,staticRenderFns:[]},undefined,eo,undefined,false,undefined,!1,void 0,void 0,void 0);ro.install=function(t,e){var n;if(n="按需加载独立组件:"+ro.name,"development"!==process.env.NODE_ENV&&"dev"!==process.env.NODE_ENV||console.warn(n),o(e)&&!i(e))for(var r=0;r<e.length;r++)e[r].name!==ro.name&&t.use(e[r]);t.component(ro.name,ro)},exports.BaseEntNumLine=ro;