UNPKG

nw-ui-vue

Version:

NW component for vue2.x

17 lines (14 loc) 37.5 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("element-ui"),require("lodash-es"),require("element-china-area-data")):"function"==typeof define&&define.amd?define(["exports","vue","element-ui","lodash-es","element-china-area-data"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).NwForVue={},e.Vue,e.elementUi,e.lodashEs,e.elementChinaAreaData)}(this,(function(e,t,n,r,i){"use strict";var o=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(t),a={name:"NwListContain",props:{show:{type:Boolean,default:!1},customStyle:{type:String,default:""},empty:{type:Boolean,default:!1},emptyText:{type:String,default:"暂无内容"},emptyImage:{type:String,default:"https://youxuan-img.health-100.cn/niwo_resource_img/20220606/ElJwIYqj6dRXQstl0k4rjwmgvxuGxiIr.png"}}};function l(e,t,n,r,i,o,a,l,c,u){"boolean"!=typeof a&&(c=l,l=a,a=!1);const s="function"==typeof n?n.options:n;let d;if(e&&e.render&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns,s._compiled=!0,i&&(s.functional=!0)),r&&(s._scopeId=r),o?(d=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(o)},s._ssrRegister=d):t&&(d=a?function(e){t.call(this,u(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,l(e))}),d)if(s.functional){const e=s.render;s.render=function(t,n){return d.call(n),e(t,n)}}else{const e=s.beforeCreate;s.beforeCreate=e?[].concat(e,d):[d]}return n}const c="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function u(e){return(e,t)=>function(e,t){const n=c?t.media||"default":e,r=d[n]||(d[n]={ids:new Set,styles:[]});if(!r.ids.has(e)){r.ids.add(e);let n=t.source;if(t.map&&(n+="\n/*# sourceURL="+t.map.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),r.element||(r.element=document.createElement("style"),r.element.type="text/css",t.media&&r.element.setAttribute("media",t.media),void 0===s&&(s=document.head||document.getElementsByTagName("head")[0]),s.appendChild(r.element)),"styleSheet"in r.element)r.styles.push(n),r.element.styleSheet.cssText=r.styles.filter(Boolean).join("\n");else{const e=r.ids.size-1,t=document.createTextNode(n),i=r.element.childNodes;i[e]&&r.element.removeChild(i[e]),i.length?r.element.insertBefore(t,i[e]):r.element.appendChild(t)}}}(e,t)}let s;const d={},f=l({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.show,expression:"show"}],staticClass:"nw-list-contain",style:e.customStyle,attrs:{"element-loading-text":"加载中...","element-loading-spinner":"el-icon-loading"}},[!e.show&&e.empty?n("div",{staticClass:"empty"},[n("el-image",{staticStyle:{height:"150px"},attrs:{fit:"contain",src:e.emptyImage}}),e._v(" "),n("p",{staticClass:"empty-text"},[e._v(e._s(e.emptyText))])],1):[e._t("default")]],2)},staticRenderFns:[]},(function(e){e&&e("data-v-3d7a5910_0",{source:".nw-list-contain[data-v-3d7a5910]{min-height:180px;position:relative}.nw-list-contain .loading[data-v-3d7a5910]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%,0)}.nw-list-contain .el-loading-spinner[data-v-3d7a5910]{font-size:24px}.nw-list-contain .el-loading-spinner .el-loading-text[data-v-3d7a5910]{font-size:13px}.nw-list-contain .empty[data-v-3d7a5910]{height:100%;position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;flex-direction:column;position:none;user-select:none}.nw-list-contain .empty .empty-text[data-v-3d7a5910]{font-size:12px;color:#999;margin:0;margin-top:-5px;position:relative;z-index:9}",map:void 0,media:void 0})}),a,"data-v-3d7a5910",!1,void 0,!1,u,void 0,void 0),v=l({},void 0,o.default.extend({template:'\n <div\n v-loading="show"\n class="nw-list-group"\n element-loading-text="加载中..."\n element-loading-spinner="el-icon-loading"\n :style="customStyle"\n >\n <div v-if="!show && empty" class="empty">\n <el-image\n style="height: 150px"\n fit="contain"\n :src="emptyImage"\n />\n <p class="empty-text">{{ emptyText }}</p>\n </div>\n <template v-else>\n <slot />\n </template>\n </div>\n ',name:"NwListGroup",props:{show:{type:Boolean,default:!1},customStyle:{type:String,default:""},empty:{type:Boolean,default:!1},emptyText:{type:String,default:"暂无内容"},emptyImage:{type:String,default:"https://youxuan-img.health-100.cn/niwo_resource_img/20220606/ElJwIYqj6dRXQstl0k4rjwmgvxuGxiIr.png"}}}),void 0,void 0,void 0,!1,void 0,void 0,void 0); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var h=function(){return h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},h.apply(this,arguments)};function p(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function l(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}c((r=r.apply(e,t||[])).next())}))}function g(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}var y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},b=function(e,t){return e===t||e!=e&&t!=t},w=b,m=function(e,t){for(var n=e.length;n--;)if(w(e[n][0],t))return n;return-1},x=m,j=Array.prototype.splice,_=m,k=m,S=m,A=function(){this.__data__=[],this.size=0};function O(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}O.prototype.clear=A,O.prototype.delete=function(e){var t=this.__data__,n=x(t,e);return!(n<0||(n==t.length-1?t.pop():j.call(t,n,1),--this.size,0))},O.prototype.get=function(e){var t=this.__data__,n=_(t,e);return n<0?void 0:t[n][1]},O.prototype.has=function(e){return k(this.__data__,e)>-1},O.prototype.set=function(e,t){var n=this.__data__,r=S(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var T,C=O,N=C,E="object"==typeof y&&y&&y.Object===Object&&y,I=E,D="object"==typeof self&&self&&self.Object===Object&&self,z=I||D||Function("return this")(),R=z.Symbol,$=R,P=Object.prototype,F=P.hasOwnProperty,U=P.toString,B=$?$.toStringTag:void 0,M=Object.prototype.toString,V=function(e){var t=F.call(e,B),n=e[B];try{e[B]=void 0;var r=!0}catch(e){}var i=U.call(e);return r&&(t?e[B]=n:delete e[B]),i},L=R?R.toStringTag:void 0,q=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":L&&L in Object(e)?V(e):function(e){return M.call(e)}(e)},G=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},W=q,X=G,H=function(e){if(!X(e))return!1;var t=W(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},J=z["__core-js_shared__"],K=(T=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||""))?"Symbol(src)_1."+T:"",Q=Function.prototype.toString,Y=function(e){if(null!=e){try{return Q.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Z=H,ee=function(e){return!!K&&K in e},te=G,ne=Y,re=/^\[object .+?Constructor\]$/,ie=Function.prototype,oe=Object.prototype,ae=ie.toString,le=oe.hasOwnProperty,ce=RegExp("^"+ae.call(le).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ue=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!te(e)||ee(e))&&(Z(e)?ce:re).test(ne(e))}(n)?n:void 0},se=ue(z,"Map"),de=ue(Object,"create"),fe=de,ve=de,he=Object.prototype.hasOwnProperty,pe=de,ge=Object.prototype.hasOwnProperty,ye=de,be=function(){this.__data__=fe?fe(null):{},this.size=0},we=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},me=function(e){var t=this.__data__;if(ve){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return he.call(t,e)?t[e]:void 0};function xe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xe.prototype.clear=be,xe.prototype.delete=we,xe.prototype.get=me,xe.prototype.has=function(e){var t=this.__data__;return pe?void 0!==t[e]:ge.call(t,e)},xe.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ye&&void 0===t?"__lodash_hash_undefined__":t,this};var je=xe,_e=C,ke=se,Se=function(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map},Ae=Se,Oe=Se,Te=Se,Ce=Se;function Ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ne.prototype.clear=function(){this.size=0,this.__data__={hash:new je,map:new(ke||_e),string:new je}},Ne.prototype.delete=function(e){var t=Ae(this,e).delete(e);return this.size-=t?1:0,t},Ne.prototype.get=function(e){return Oe(this,e).get(e)},Ne.prototype.has=function(e){return Te(this,e).has(e)},Ne.prototype.set=function(e,t){var n=Ce(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Ee=C,Ie=se,De=Ne,ze=C,Re=function(){this.__data__=new N,this.size=0},$e=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Pe=function(e){return this.__data__.get(e)},Fe=function(e){return this.__data__.has(e)};function Ue(e){var t=this.__data__=new ze(e);this.size=t.size}Ue.prototype.clear=Re,Ue.prototype.delete=$e,Ue.prototype.get=Pe,Ue.prototype.has=Fe,Ue.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ee){var r=n.__data__;if(!Ie||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new De(r)}return n.set(e,t),this.size=n.size,this};var Be=Ue,Me=ue,Ve=function(){try{var e=Me(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Le=function(e,t,n){"__proto__"==t&&Ve?Ve(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},qe=Le,Ge=b,We=Object.prototype.hasOwnProperty,Xe=function(e,t,n){var r=e[t];We.call(e,t)&&Ge(r,n)&&(void 0!==n||t in e)||qe(e,t,n)},He=Xe,Je=Le,Ke=function(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var l=t[o],c=r?r(n[l],e[l],l,n,e):void 0;void 0===c&&(c=e[l]),i?Je(n,l,c):He(n,l,c)}return n},Qe=function(e){return null!=e&&"object"==typeof e},Ye=q,Ze=Qe,et=function(e){return Ze(e)&&"[object Arguments]"==Ye(e)},tt=Qe,nt=Object.prototype,rt=nt.hasOwnProperty,it=nt.propertyIsEnumerable,ot=et(function(){return arguments}())?et:function(e){return tt(e)&&rt.call(e,"callee")&&!it.call(e,"callee")},at=ot,lt=Array.isArray,ct={exports:{}},ut=function(){return!1};!function(e,t){var n=z,r=ut,i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?n.Buffer:void 0,l=(a?a.isBuffer:void 0)||r;e.exports=l}(ct,ct.exports);var st=/^(?:0|[1-9]\d*)$/,dt=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},ft=q,vt=dt,ht=Qe,pt={};pt["[object Float32Array]"]=pt["[object Float64Array]"]=pt["[object Int8Array]"]=pt["[object Int16Array]"]=pt["[object Int32Array]"]=pt["[object Uint8Array]"]=pt["[object Uint8ClampedArray]"]=pt["[object Uint16Array]"]=pt["[object Uint32Array]"]=!0,pt["[object Arguments]"]=pt["[object Array]"]=pt["[object ArrayBuffer]"]=pt["[object Boolean]"]=pt["[object DataView]"]=pt["[object Date]"]=pt["[object Error]"]=pt["[object Function]"]=pt["[object Map]"]=pt["[object Number]"]=pt["[object Object]"]=pt["[object RegExp]"]=pt["[object Set]"]=pt["[object String]"]=pt["[object WeakMap]"]=!1;var gt=function(e){return function(t){return e(t)}},yt={exports:{}};!function(e,t){var n=E,r=t&&!t.nodeType&&t,i=r&&e&&!e.nodeType&&e,o=i&&i.exports===r&&n.process,a=function(){try{return i&&i.require&&i.require("util").types||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a}(yt,yt.exports);var bt=function(e){return ht(e)&&vt(e.length)&&!!pt[ft(e)]},wt=gt,mt=yt.exports,xt=mt&&mt.isTypedArray,jt=xt?wt(xt):bt,_t=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},kt=at,St=lt,At=ct.exports,Ot=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&st.test(e))&&e>-1&&e%1==0&&e<t},Tt=jt,Ct=Object.prototype.hasOwnProperty,Nt=function(e,t){var n=St(e),r=!n&&kt(e),i=!n&&!r&&At(e),o=!n&&!r&&!i&&Tt(e),a=n||r||i||o,l=a?_t(e.length,String):[],c=l.length;for(var u in e)!t&&!Ct.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ot(u,c))||l.push(u);return l},Et=Object.prototype,It=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Et)},Dt=function(e,t){return function(n){return e(t(n))}},zt=Dt(Object.keys,Object),Rt=It,$t=zt,Pt=Object.prototype.hasOwnProperty,Ft=H,Ut=dt,Bt=function(e){return null!=e&&Ut(e.length)&&!Ft(e)},Mt=Nt,Vt=Bt,Lt=function(e){return Vt(e)?Mt(e):function(e){if(!Rt(e))return $t(e);var t=[];for(var n in Object(e))Pt.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)},qt=Ke,Gt=Lt,Wt=G,Xt=It,Ht=Object.prototype.hasOwnProperty,Jt=Nt,Kt=function(e){if(!Wt(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Xt(e),n=[];for(var r in e)("constructor"!=r||!t&&Ht.call(e,r))&&n.push(r);return n},Qt=Bt,Yt=function(e){return Qt(e)?Jt(e,!0):Kt(e)},Zt=Ke,en=Yt,tn={exports:{}};!function(e,t){var n=z,r=t&&!t.nodeType&&t,i=r&&e&&!e.nodeType&&e,o=i&&i.exports===r?n.Buffer:void 0,a=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}}(tn,tn.exports);var nn=function(){return[]},rn=nn,on=Object.prototype.propertyIsEnumerable,an=Object.getOwnPropertySymbols,ln=an?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(an(e),(function(t){return on.call(e,t)})))}:rn,cn=Ke,un=ln,sn=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},dn=Dt(Object.getPrototypeOf,Object),fn=sn,vn=dn,hn=ln,pn=nn,gn=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)fn(t,hn(e)),e=vn(e);return t}:pn,yn=Ke,bn=gn,wn=sn,mn=lt,xn=function(e,t,n){var r=t(e);return mn(e)?r:wn(r,n(e))},jn=xn,_n=ln,kn=Lt,Sn=xn,An=gn,On=Yt,Tn=ue(z,"DataView"),Cn=se,Nn=ue(z,"Promise"),En=ue(z,"Set"),In=ue(z,"WeakMap"),Dn=q,zn=Y,Rn="[object Map]",$n="[object Promise]",Pn="[object Set]",Fn="[object WeakMap]",Un="[object DataView]",Bn=zn(Tn),Mn=zn(Cn),Vn=zn(Nn),Ln=zn(En),qn=zn(In),Gn=Dn;(Tn&&Gn(new Tn(new ArrayBuffer(1)))!=Un||Cn&&Gn(new Cn)!=Rn||Nn&&Gn(Nn.resolve())!=$n||En&&Gn(new En)!=Pn||In&&Gn(new In)!=Fn)&&(Gn=function(e){var t=Dn(e),n="[object Object]"==t?e.constructor:void 0,r=n?zn(n):"";if(r)switch(r){case Bn:return Un;case Mn:return Rn;case Vn:return $n;case Ln:return Pn;case qn:return Fn}return t});var Wn=Gn,Xn=Object.prototype.hasOwnProperty,Hn=z.Uint8Array,Jn=function(e){var t=new e.constructor(e.byteLength);return new Hn(t).set(new Hn(e)),t},Kn=Jn,Qn=/\w*$/,Yn=R?R.prototype:void 0,Zn=Yn?Yn.valueOf:void 0,er=Jn,tr=Jn,nr=function(e,t){var n=t?Kn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},rr=function(e){var t=new e.constructor(e.source,Qn.exec(e));return t.lastIndex=e.lastIndex,t},ir=G,or=Object.create,ar=function(){function e(){}return function(t){if(!ir(t))return{};if(or)return or(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),lr=dn,cr=It,ur=Wn,sr=Qe,dr=gt,fr=yt.exports,vr=fr&&fr.isMap,hr=vr?dr(vr):function(e){return sr(e)&&"[object Map]"==ur(e)},pr=Wn,gr=Qe,yr=gt,br=yt.exports,wr=br&&br.isSet,mr=wr?yr(wr):function(e){return gr(e)&&"[object Set]"==pr(e)},xr=Be,jr=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},_r=Xe,kr=function(e,t){return e&&qt(t,Gt(t),e)},Sr=function(e,t){return e&&Zt(t,en(t),e)},Ar=tn.exports,Or=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},Tr=function(e,t){return cn(e,un(e),t)},Cr=function(e,t){return yn(e,bn(e),t)},Nr=function(e){return jn(e,kn,_n)},Er=function(e){return Sn(e,On,An)},Ir=Wn,Dr=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Xn.call(e,"index")&&(n.index=e.index,n.input=e.input),n},zr=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return tr(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return nr(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?er(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return rr(e);case"[object Symbol]":return function(e){return Zn?Object(Zn.call(e)):{}}(e)}},Rr=function(e){return"function"!=typeof e.constructor||cr(e)?{}:ar(lr(e))},$r=lt,Pr=ct.exports,Fr=hr,Ur=G,Br=mr,Mr=Lt,Vr=Yt,Lr="[object Arguments]",qr="[object Function]",Gr="[object Object]",Wr={};Wr[Lr]=Wr["[object Array]"]=Wr["[object ArrayBuffer]"]=Wr["[object DataView]"]=Wr["[object Boolean]"]=Wr["[object Date]"]=Wr["[object Float32Array]"]=Wr["[object Float64Array]"]=Wr["[object Int8Array]"]=Wr["[object Int16Array]"]=Wr["[object Int32Array]"]=Wr["[object Map]"]=Wr["[object Number]"]=Wr[Gr]=Wr["[object RegExp]"]=Wr["[object Set]"]=Wr["[object String]"]=Wr["[object Symbol]"]=Wr["[object Uint8Array]"]=Wr["[object Uint8ClampedArray]"]=Wr["[object Uint16Array]"]=Wr["[object Uint32Array]"]=!0,Wr["[object Error]"]=Wr[qr]=Wr["[object WeakMap]"]=!1;var Xr=function e(t,n,r,i,o,a){var l,c=1&n,u=2&n,s=4&n;if(r&&(l=o?r(t,i,o,a):r(t)),void 0!==l)return l;if(!Ur(t))return t;var d=$r(t);if(d){if(l=Dr(t),!c)return Or(t,l)}else{var f=Ir(t),v=f==qr||"[object GeneratorFunction]"==f;if(Pr(t))return Ar(t,c);if(f==Gr||f==Lr||v&&!o){if(l=u||v?{}:Rr(t),!c)return u?Cr(t,Sr(l,t)):Tr(t,kr(l,t))}else{if(!Wr[f])return o?t:{};l=zr(t,f,c)}}a||(a=new xr);var h=a.get(t);if(h)return h;a.set(t,l),Br(t)?t.forEach((function(i){l.add(e(i,n,r,i,t,a))})):Fr(t)&&t.forEach((function(i,o){l.set(o,e(i,n,r,o,t,a))}));var p=d?void 0:(s?u?Er:Nr:u?Vr:Mr)(t);return jr(p||t,(function(i,o){p&&(i=t[o=i]),_r(l,o,e(i,n,r,o,t,a))})),l},Hr=function(e){return Xr(e,5)},Jr=z,Kr=/\s/,Qr=/^\s+/,Yr=q,Zr=Qe,ei=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&Kr.test(e.charAt(t)););return t}(e)+1).replace(Qr,""):e},ti=G,ni=/^[-+]0x[0-9a-f]+$/i,ri=/^0b[01]+$/i,ii=/^0o[0-7]+$/i,oi=parseInt,ai=G,li=function(){return Jr.Date.now()},ci=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||Zr(e)&&"[object Symbol]"==Yr(e)}(e))return NaN;if(ti(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ti(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=ei(e);var n=ri.test(e);return n||ii.test(e)?oi(e.slice(2),n?2:8):ni.test(e)?NaN:+e},ui=Math.max,si=Math.min,di=function(e){var t=h({},e);return function(e){return Boolean(null==e?void 0:e.children)}(e)&&(t.children=[]),t},fi=function(e){var t=function(e,n,r){return void 0===n&&(n=[]),void 0===r&&(r=0),e.forEach((function(e){var i,o=e.label,a=e.value,l=e.id,c=e.code;(null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)?(0===r&&n.push({label:o,value:null}),t(null==e?void 0:e.children,n,r+1)):n.push({label:o,value:a||l||c})})),n};return t([e])},vi=function(e,t){void 0===t&&(t=[{parent:"浙江省,杭州市",label:"临平区"},{parent:"浙江省,杭州市",label:"钱塘区"},{parent:"江西省,南昌市",label:"红谷滩区"}]);for(var n=function(t){var n=(null==t?void 0:t.parent.split(","))||[],r=n[0],i=n[1],o=hi(e,[r,i]);if((null==o?void 0:o.children)&&(null==t?void 0:t.label)&&!o.children.some((function(e){return e.label.indexOf(t.label)>-1}))){var a=o.children,l=a.slice(-1)[0],c=t.value||l&&pi(l.value);a.push({label:t.label,value:c,id:c,pid:o.id||o.value||0})}},r=0,i=t;r<i.length;r++)n(i[r]);return Hr(e)},hi=function(e,t){var n;void 0===t&&(t=[]);var r=t[0],i=t[1],o=null;return r&&(o=e.find((function(e){return e.label.indexOf(r)>-1}))),i&&(null==o?void 0:o.children)&&(o=null===(n=null==o?void 0:o.children)||void 0===n?void 0:n.find((function(e){return e.label.indexOf(i)>-1}))),o},pi=function(e,t){return void 0===t&&(t=10),e?String(function(e,t){if(void 0===t&&(t=0),e){var n=0;if(n=Number("string"==typeof e?e.replace(/[^\d|\.|-]/g,""):e||0),e&&!isNaN(n))return t?t<0?Math.round(n):Number(n.toFixed(t)):n}return 0}(e)+t):0};const gi=l({},(function(e){e&&e("data-v-5441c558_0",{source:".nw-region-selection[data-v-5441c558]{display:flex;align-items:flex-start;height:var(--cu-region-height,480px);min-width:var(--cu-region-min-width,450px);width:var(--cu-region-width,100%);margin:auto}.nw-region-selection .box[data-v-5441c558],.nw-region-selection .nw-region-left[data-v-5441c558],.nw-region-selection .nw-region-right[data-v-5441c558]{width:0;flex:1 1;height:inherit;box-sizing:border-box;border:1px solid var(--cu-black-color-2,#ebeef5);border-radius:var(--cu-region-border-radius,4px);display:flex;flex-direction:column}.nw-region-selection .box .nw-region-search[data-v-5441c558],.nw-region-selection .nw-region-left .nw-region-search[data-v-5441c558],.nw-region-selection .nw-region-right .nw-region-search[data-v-5441c558]{display:flex;align-items:center;margin:0 20px;padding-bottom:10px}.nw-region-selection .box .nw-region-search .el-input[data-v-5441c558],.nw-region-selection .nw-region-left .nw-region-search .el-input[data-v-5441c558],.nw-region-selection .nw-region-right .nw-region-search .el-input[data-v-5441c558]{flex:1 1;width:100%}.nw-region-selection .box .nw-region-search .el-input .el-input__inner[data-v-5441c558],.nw-region-selection .nw-region-left .nw-region-search .el-input .el-input__inner[data-v-5441c558],.nw-region-selection .nw-region-right .nw-region-search .el-input .el-input__inner[data-v-5441c558]{border-radius:50px}.nw-region-selection .box .nw-region-title[data-v-5441c558],.nw-region-selection .nw-region-left .nw-region-title[data-v-5441c558],.nw-region-selection .nw-region-right .nw-region-title[data-v-5441c558]{padding:15px 20px;display:flex;align-items:center}.nw-region-selection .box .nw-region-title[data-v-5441c558] .el-checkbox,.nw-region-selection .nw-region-left .nw-region-title[data-v-5441c558] .el-checkbox,.nw-region-selection .nw-region-right .nw-region-title[data-v-5441c558] .el-checkbox{width:auto!important;margin-right:8px}.nw-region-selection .box .nw-region-title.title-left[data-v-5441c558],.nw-region-selection .nw-region-left .nw-region-title.title-left[data-v-5441c558],.nw-region-selection .nw-region-right .nw-region-title.title-left[data-v-5441c558]{justify-content:flex-start}.nw-region-selection .box .nw-region-title.title-center[data-v-5441c558],.nw-region-selection .nw-region-left .nw-region-title.title-center[data-v-5441c558],.nw-region-selection .nw-region-right .nw-region-title.title-center[data-v-5441c558]{justify-content:center}.nw-region-selection .box .nw-region-title.title-right[data-v-5441c558],.nw-region-selection .nw-region-left .nw-region-title.title-right[data-v-5441c558],.nw-region-selection .nw-region-right .nw-region-title.title-right[data-v-5441c558]{justify-content:flex-end}.nw-region-selection .box .nw-region-title strong[data-v-5441c558],.nw-region-selection .nw-region-left .nw-region-title strong[data-v-5441c558],.nw-region-selection .nw-region-right .nw-region-title strong[data-v-5441c558]{font-size:var(--cu-font-size-medium,16px);color:var(--cu-black-color-2,#222);padding:0;margin:0}.nw-region-selection .box .nw-region-content[data-v-5441c558],.nw-region-selection .nw-region-left .nw-region-content[data-v-5441c558],.nw-region-selection .nw-region-right .nw-region-content[data-v-5441c558]{padding:10px;height:0;flex:1;position:relative;overflow:hidden;overflow-y:auto}.nw-region-selection .box .nw-region-content[data-v-5441c558] .el-checkbox,.nw-region-selection .nw-region-left .nw-region-content[data-v-5441c558] .el-checkbox,.nw-region-selection .nw-region-right .nw-region-content[data-v-5441c558] .el-checkbox{width:auto!important;margin-right:8px}.nw-region-selection .nw-region-center[data-v-5441c558]{width:10%;display:flex;align-items:center;justify-content:center;height:inherit;font-size:var(--cu-font-size-medium,16px);color:var(--cu-black-color-4,#ccd0d9)}",map:void 0,media:void 0})}),o.default.extend({name:"NwRegionSelection",components:{ElTree:n.Tree,ElInput:n.Input,ElCheckbox:n.Checkbox},props:{customStyle:{type:String,default:""},title:{type:Array,default:function(){return["可选省市区","已选省市区"]}},titleAlign:{type:String,default:"left"},showSearch:{type:Boolean,default:!0},defaultProps:{type:Object,default:function(){return{children:"children",label:"label"}}},checked:{type:Array,default:function(){return[]}},exclude:{type:Array,default:function(){return[]}},sort:{type:Array,default:function(){return[]}}},data:function(){return{isInit:!1,keywords:"",timeHandler:null,checkedAll:!1,regionData:vi(i.regionData),selectedData:[],currentItem:null}},computed:{getTitle:function(){var e=this.title||[],t=e[0];return{a:t||"",b:e[1]||t}},getChecked:function(){var e=this,t=function(n,r){return void 0===n&&(n=[]),void 0===r&&(r=[]),n.forEach((function(n){var i;e.exclude.length&&e.exclude.includes(n.value)?r.push(null):r.push(n.value),(null===(i=null==n?void 0:n.children)||void 0===i?void 0:i.length)&&t(n.children,r)})),r};return this.selectedData.length?t(this.selectedData,[]).filter((function(e){return e})):[]},getRegionData:function(){var e=this,t=function(n,r){void 0===n&&(n=[]),void 0===r&&(r=null);var i=r;return n.map((function(n){var r,o,a;if(e.exclude.length&&e.exclude.includes(n.value))return null;if("市辖区"===n.label&&1===(null===(r=null==i?void 0:i.children)||void 0===r?void 0:r.length)&&(n.label=i.label),(null===(o=null==n?void 0:n.children)||void 0===o?void 0:o.length)>1){var l=(n.children||[])[0];"市辖区"===(null==l?void 0:l.label)&&"重庆市"!==n.label&&(null==n||n.children.splice(0,1)),"重庆市"===(null==i?void 0:i.label)&&"市辖区"===n.label&&(n.label="重庆市")}return n.id=n.value,n.pid=(null==i?void 0:i.value)||0,(null===(a=null==n?void 0:n.children)||void 0===a?void 0:a.length)&&t(n.children,n),n})).filter((function(e){return e}))},n=t(this.regionData),r=this.sort||[];return r.length&&r.reverse().forEach((function(e){var t=n.findIndex((function(t){return t.value===e}));if(t>-1){var r=n.splice(t,1)[0],i=void 0===r?{}:r;n.unshift(i)}})),n}},watch:{keywords:{handler:function(e,t,n){var r,i,o,a,l,c,u=0,s=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function h(e){return u=e,l=setTimeout(g,t),s?v(e):a}function p(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-u>=o}function g(){var e=li();if(p(e))return y(e);l=setTimeout(g,function(e){var n=t-(e-c);return d?si(n,o-(e-u)):n}(e))}function y(e){return l=void 0,f&&r?v(e):(r=i=void 0,a)}function b(){var e=li(),n=p(e);if(r=arguments,i=this,c=e,n){if(void 0===l)return h(c);if(d)return clearTimeout(l),l=setTimeout(g,t),v(c)}return void 0===l&&(l=setTimeout(g,t)),a}return t=ci(t)||0,ai(n)&&(s=!!n.leading,o=(d="maxWait"in n)?ui(ci(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f),b.cancel=function(){void 0!==l&&clearTimeout(l),u=0,r=c=i=l=void 0},b.flush=function(){return void 0===l?a:y(li())},b}((function(e){this.$refs.setTree.filter(e)}),300)},checked:{handler:function(e){var t=Hr(e||[]),n=function(e){return void 0===e&&(e=[]),e.map((function(e){var t;return e.value=e.id,(null===(t=null==e?void 0:e.children)||void 0===t?void 0:t.length)&&n(e.children),e}))};this.selectedData=n(t);var r=this.selectedData.length;this.checkedAll=r&&r===this.getRegionData.length,this.initSetTree()},immediate:!0,deep:!0}},mounted:function(){this.initSetTree()},methods:{initSetTree:function(){return p(this,void 0,void 0,(function(){var e,t,n,r=this;return g(this,(function(i){switch(i.label){case 0:return e=this.$refs||{},t=e.setTree,n=e.preTree,this.keywords="",t?[4,t.setCheckedKeys(this.getChecked,!0)]:[3,2];case 1:i.sent(),this.$nextTick((function(){r.updateCheckAllStatus(),r.exclude.length&&r.exclude.forEach((function(e){t.remove(e),n.remove(e)}))})),i.label=2;case 2:return[2]}}))}))},onCheckAll:function(e){this.selectedData=e?this.getRegionData.map((function(e){return di(e)})):[],this.onSetCheckedDeep(this.getRegionData,e,!e)},onTreeSearch:function(e,t){return!e||-1!==t.label.indexOf(e)},onCheckChange:function(e,t){var n=this;if(void 0===t&&(t=!0),!this.isInit){clearTimeout(this.timeHandler);var r=this.$refs||{},i=r.preTree,o=r.setTree;if(this.currentItem=e,t){var a=o.getNode(e),l=this.getFirstFullRegion(a);if(null==l?void 0:l.length){var c=null;l.forEach((function(e){i.getNode(e)||i.append(e,(null==c?void 0:c.value)||null),c=e}))}this.$nextTick((function(){var e,t,r;if(0!==(null===(e=null==a?void 0:a.parent)||void 0===e?void 0:e.level)){var i=(null===(t=null==a?void 0:a.parent)||void 0===t?void 0:t.data)||{};(null===(r=i.children)||void 0===r?void 0:r.length)&&n.updateCheckAllStatus([i])}}))}else e.pid?this.onSetCheckedDeep(e,!1):this.unCheckedChildren(e,!1),i.remove(e);this.timeHandler=setTimeout((function(){n.$emit("change",Hr(n.selectedData||[]))}),100)}},unCheckedChildren:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=!1);var n=(this.$refs||{}).setTree,r=function(e){e.forEach((function(e){n.setChecked(e.value,t),e.children&&r(e.children)}))};r([e])},onSetCheckedDeep:function(e,t,n){var r=this;void 0===t&&(t=!0),void 0===n&&(n=!0);var i=this.$refs||{},o=i.setTree,a=i.preTree,l=function(e){var i;void 0===e&&(e=[]);for(var c=0,u=e;c<u.length;c++){var s=u[c],d=o.getNode(s),f=(d||{}).parent,v=void 0===f?{}:f,h=(null==v?void 0:v.childNodes)||[],p=h.some((function(e){var t;return(null==e?void 0:e.checked)&&(null===(t=null==e?void 0:e.childNodes)||void 0===t?void 0:t.some((function(e){return e.checked})))})),g=h.every((function(e){var t;return(null==e?void 0:e.checked)&&(null===(t=null==e?void 0:e.childNodes)||void 0===t?void 0:t.every((function(e){return e.checked})))})),y=d.childNodes||[],b=r.currentItem&&r.currentItem.value===s.value&&y.some((function(e){return null==e?void 0:e.checked}));if(p&&!g&&!b)break;(null==d?void 0:d.checked)!==t&&(a.remove(s),o.setChecked(s.value,t)),(null===(i=null==s?void 0:s.children)||void 0===i?void 0:i.length)&&n&&l(s.children)}};l(Array.isArray(e)?e:[e])},updateCheckAllStatus:function(e){var t=this,n=(this.$refs||{}).setTree,r=this.getChecked;(e=e||n.getCheckedNodes()).forEach((function(e){var i,o,a;if((null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)>1){var l=e.children.every((function(e){var t=e.value;return r.includes(t)}));if(l){var c=n.getNode(e),u=(null===(o=null==c?void 0:c.parent)||void 0===o?void 0:o.data)||{},s=1===(null===(a=null==u?void 0:u.children)||void 0===a?void 0:a.length)?u.children:e.children;t.onSetCheckedDeep(s,!1)}}}))},getFirstFullRegion:function(e){var t=null,n=[];if(e){for(var r=e;r;){if(0!==r.level){var i=di(r.data);t&&(i.children=[t]),t=i,n.push(di(r.data))}r=null==r?void 0:r.parent}t&&this.updateCheckUnionStatus([t])}return n.reverse()},updateCheckUnionStatus:function(e){return p(this,void 0,void 0,(function(){var t,n,r,i,o=this;return g(this,(function(a){return t=(this.$refs||{}).setTree,n=[],r=function(e){void 0===e&&(e=[]),e.length&&e.forEach((function(e){var t;n.push(e.value),(null===(t=e.children)||void 0===t?void 0:t.length)&&r(e.children)}))},r(e),(null==n?void 0:n.length)&&(this.isInit=!0,i=t.getCheckedKeys(),t.setCheckedKeys(i.concat(n),!0),this.$nextTick((function(){o.isInit=!1}))),[2]}))}))},collapseAll:function(e){var t=(this.getRegionData||[])[0];if(t){var n=e.getNode(t.value);(null==n?void 0:n.expand)&&(n.expand=!1)}},clear:function(){}},template:'\n <div class="nw-region-selection" :style="customStyle">\n <div class="nw-region-left">\n <div\n v-if="getTitle.a"\n class="nw-region-title"\n :class="\'title-\' + titleAlign"\n >\n <el-checkbox v-model="checkedAll" @change="onCheckAll" />\n <strong>{{ getTitle.a }}</strong>\n </div>\n\n <div v-if="showSearch" class="nw-region-search">\n <el-input\n v-model.trim="keywords"\n placeholder="请输入关键字"\n prefix-icon="el-icon-search"\n clearable\n round\n size="small"\n />\n </div>\n\n <div class="nw-region-content">\n <el-tree\n ref="setTree"\n :data="getRegionData"\n :filter-node-method="onTreeSearch"\n show-checkbox\n check-strictly\n accordion\n node-key="value"\n :props="defaultProps"\n @check-change="onCheckChange"\n />\n </div>\n </div>\n\n <div class="nw-region-center">\n <i class="el-icon-arrow-right"></i>\n </div>\n\n <div class="nw-region-right">\n <div\n v-if="getTitle.b"\n class="nw-region-title"\n :class="\'title-\' + titleAlign"\n >\n <strong>{{ getTitle.b }}</strong>\n </div>\n <div class="nw-region-content">\n <el-tree\n ref="preTree"\n accordion\n :data="selectedData"\n node-key="value"\n :props="defaultProps"\n />\n </div>\n </div>\n </div>\n '}),"data-v-5441c558",void 0,void 0,!1,u,void 0,void 0),yi=l({},void 0,o.default.extend({name:"VueTestProject",mounted:function(){console.log(111111,"VueTestProject")},render:function(e){return e("div",{ref:"test",class:"test"})}}),void 0,void 0,void 0,!1,void 0,void 0,void 0);e.NwListContain=f,e.NwListGroup=v,e.NwRegionSelection=gi,e.NwTipPopup=yi,e.extraAllSelectedValue=function(e){void 0===e&&(e=[]);var t=e.map((function(e){return null==e?void 0:e.displayValue})).filter((function(e){return e}));return Array.from(new Set(r.flatten(t).filter((function(e){return e}))))},e.extractRegionNames=fi,e.formatRegionData=function(e){if(void 0===e&&(e=[]),!(null==e?void 0:e.length))return[];var t=Hr(e),n=new Map,r=["province","city","district"],i=function(e,t,o,a){return void 0===e&&(e=[]),void 0===t&&(t=[]),void 0===o&&(o=0),void 0===a&&(a=null),e.forEach((function(e){var l;if(e.level=o,e.pid=(null==a?void 0:a.id)||(null==a?void 0:a.value)||0,n.set(e.id||e.value,e),null===(l=null==e?void 0:e.children)||void 0===l?void 0:l.length)i(e.children,t,e.level+1,e);else{for(var c={},u=e;u;)c[r[u.level]]={code:u.id||u.value,name:u.name||u.label},u=u.pid?n.get(u.pid):null;r.forEach((function(e){c[e]||(c[e]={})})),t.push(c)}})),t};return i(t)},e.transformRegionData=function(e){if(void 0===e&&(e=[]),!(null==e?void 0:e.length))return[];var t=Hr(e),n=["province","city","district"],r=function(e,t,i){return void 0===t&&(t=0),void 0===i&&(i=[]),e.forEach((function(o){var a=n[t],l={id:o[a].code||o[a].value,label:o[a].name||o[a].label};if(i.findIndex((function(e){return e.id===l.id}))<0&&l.id){if(t<2){var c=e.filter((function(e){return e[a].code===l.id}));c.length&&(l.children=r(c,t+1))}if(0===t){var u=fi(l)||[];l.displayName=u.map((function(e){return e.label})),l.displayValue=u.map((function(e){return e.value})).filter((function(e){return e}))}i.push(l)}})),i};return r(t)},Object.defineProperty(e,"__esModule",{value:!0})}));