UNPKG

nw-ui-vue

Version:

NW component for vue2.x

17 lines (14 loc) 37.1 kB
import e from"vue";import{Tree as t,Input as n,Checkbox as r}from"element-ui";import{flatten as i}from"lodash-es";import{regionData as o}from"element-china-area-data";var 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,e.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},j=m,x=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=j(t,e);return!(n<0||(n==t.length-1?t.pop():x.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,G=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)},W=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},q=G,X=W,H=function(e){if(!X(e))return!1;var t=q(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=W,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 je(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])}}je.prototype.clear=be,je.prototype.delete=we,je.prototype.get=me,je.prototype.has=function(e){var t=this.__data__;return pe?void 0!==t[e]:ge.call(t,e)},je.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 xe=je,_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 xe,map:new(ke||_e),string:new xe}},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},Ge=Le,We=b,qe=Object.prototype.hasOwnProperty,Xe=function(e,t,n){var r=e[t];qe.call(e,t)&&We(r,n)&&(void 0!==n||t in e)||Ge(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=G,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=Array.isArray,lt={exports:{}},ct=function(){return!1};!function(e,t){var n=z,r=ct,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}(lt,lt.exports);var ut=/^(?:0|[1-9]\d*)$/,st=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},dt=G,ft=st,vt=Qe,ht={};ht["[object Float32Array]"]=ht["[object Float64Array]"]=ht["[object Int8Array]"]=ht["[object Int16Array]"]=ht["[object Int32Array]"]=ht["[object Uint8Array]"]=ht["[object Uint8ClampedArray]"]=ht["[object Uint16Array]"]=ht["[object Uint32Array]"]=!0,ht["[object Arguments]"]=ht["[object Array]"]=ht["[object ArrayBuffer]"]=ht["[object Boolean]"]=ht["[object DataView]"]=ht["[object Date]"]=ht["[object Error]"]=ht["[object Function]"]=ht["[object Map]"]=ht["[object Number]"]=ht["[object Object]"]=ht["[object RegExp]"]=ht["[object Set]"]=ht["[object String]"]=ht["[object WeakMap]"]=!1;var pt=function(e){return function(t){return e(t)}},gt={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}(gt,gt.exports);var yt=function(e){return vt(e)&&ft(e.length)&&!!ht[dt(e)]},bt=pt,wt=gt.exports,mt=wt&&wt.isTypedArray,jt=mt?bt(mt):yt,xt=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},_t=ot,kt=at,St=lt.exports,At=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ut.test(e))&&e>-1&&e%1==0&&e<t},Ot=jt,Tt=Object.prototype.hasOwnProperty,Ct=function(e,t){var n=kt(e),r=!n&&_t(e),i=!n&&!r&&St(e),o=!n&&!r&&!i&&Ot(e),a=n||r||i||o,l=a?xt(e.length,String):[],c=l.length;for(var u in e)!t&&!Tt.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||At(u,c))||l.push(u);return l},Nt=Object.prototype,Et=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Nt)},It=function(e,t){return function(n){return e(t(n))}},Dt=It(Object.keys,Object),zt=Et,Rt=Dt,$t=Object.prototype.hasOwnProperty,Pt=H,Ft=st,Ut=function(e){return null!=e&&Ft(e.length)&&!Pt(e)},Bt=Ct,Mt=Ut,Vt=function(e){return Mt(e)?Bt(e):function(e){if(!zt(e))return Rt(e);var t=[];for(var n in Object(e))$t.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)},Lt=Ke,Gt=Vt,Wt=W,qt=Et,Xt=Object.prototype.hasOwnProperty,Ht=Ct,Jt=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=qt(e),n=[];for(var r in e)("constructor"!=r||!t&&Xt.call(e,r))&&n.push(r);return n},Kt=Ut,Qt=function(e){return Kt(e)?Ht(e,!0):Jt(e)},Yt=Ke,Zt=Qt,en={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}}(en,en.exports);var tn=function(){return[]},nn=tn,rn=Object.prototype.propertyIsEnumerable,on=Object.getOwnPropertySymbols,an=on?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}(on(e),(function(t){return rn.call(e,t)})))}:nn,ln=Ke,cn=an,un=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},sn=It(Object.getPrototypeOf,Object),dn=un,fn=sn,vn=an,hn=tn,pn=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)dn(t,vn(e)),e=fn(e);return t}:hn,gn=Ke,yn=pn,bn=un,wn=at,mn=function(e,t,n){var r=t(e);return wn(e)?r:bn(r,n(e))},jn=mn,xn=an,_n=Vt,kn=mn,Sn=pn,An=Qt,On=ue(z,"DataView"),Tn=se,Cn=ue(z,"Promise"),Nn=ue(z,"Set"),En=ue(z,"WeakMap"),In=G,Dn=Y,zn=Dn(On),Rn=Dn(Tn),$n=Dn(Cn),Pn=Dn(Nn),Fn=Dn(En),Un=In;(On&&"[object DataView]"!=Un(new On(new ArrayBuffer(1)))||Tn&&"[object Map]"!=Un(new Tn)||Cn&&"[object Promise]"!=Un(Cn.resolve())||Nn&&"[object Set]"!=Un(new Nn)||En&&"[object WeakMap]"!=Un(new En))&&(Un=function(e){var t=In(e),n="[object Object]"==t?e.constructor:void 0,r=n?Dn(n):"";if(r)switch(r){case zn:return"[object DataView]";case Rn:return"[object Map]";case $n:return"[object Promise]";case Pn:return"[object Set]";case Fn:return"[object WeakMap]"}return t});var Bn=Un,Mn=Object.prototype.hasOwnProperty,Vn=z.Uint8Array,Ln=function(e){var t=new e.constructor(e.byteLength);return new Vn(t).set(new Vn(e)),t},Gn=Ln,Wn=/\w*$/,qn=R?R.prototype:void 0,Xn=qn?qn.valueOf:void 0,Hn=Ln,Jn=Ln,Kn=function(e,t){var n=t?Gn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},Qn=function(e){var t=new e.constructor(e.source,Wn.exec(e));return t.lastIndex=e.lastIndex,t},Yn=W,Zn=Object.create,er=function(){function e(){}return function(t){if(!Yn(t))return{};if(Zn)return Zn(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),tr=sn,nr=Et,rr=Bn,ir=Qe,or=pt,ar=gt.exports,lr=ar&&ar.isMap,cr=lr?or(lr):function(e){return ir(e)&&"[object Map]"==rr(e)},ur=Bn,sr=Qe,dr=pt,fr=gt.exports,vr=fr&&fr.isSet,hr=vr?dr(vr):function(e){return sr(e)&&"[object Set]"==ur(e)},pr=Be,gr=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},yr=Xe,br=function(e,t){return e&&Lt(t,Gt(t),e)},wr=function(e,t){return e&&Yt(t,Zt(t),e)},mr=en.exports,jr=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},xr=function(e,t){return ln(e,cn(e),t)},_r=function(e,t){return gn(e,yn(e),t)},kr=function(e){return jn(e,_n,xn)},Sr=function(e){return kn(e,An,Sn)},Ar=Bn,Or=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Mn.call(e,"index")&&(n.index=e.index,n.input=e.input),n},Tr=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return Jn(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return Kn(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?Hn(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 Qn(e);case"[object Symbol]":return function(e){return Xn?Object(Xn.call(e)):{}}(e)}},Cr=function(e){return"function"!=typeof e.constructor||nr(e)?{}:er(tr(e))},Nr=at,Er=lt.exports,Ir=cr,Dr=W,zr=hr,Rr=Vt,$r=Qt,Pr={};Pr["[object Arguments]"]=Pr["[object Array]"]=Pr["[object ArrayBuffer]"]=Pr["[object DataView]"]=Pr["[object Boolean]"]=Pr["[object Date]"]=Pr["[object Float32Array]"]=Pr["[object Float64Array]"]=Pr["[object Int8Array]"]=Pr["[object Int16Array]"]=Pr["[object Int32Array]"]=Pr["[object Map]"]=Pr["[object Number]"]=Pr["[object Object]"]=Pr["[object RegExp]"]=Pr["[object Set]"]=Pr["[object String]"]=Pr["[object Symbol]"]=Pr["[object Uint8Array]"]=Pr["[object Uint8ClampedArray]"]=Pr["[object Uint16Array]"]=Pr["[object Uint32Array]"]=!0,Pr["[object Error]"]=Pr["[object Function]"]=Pr["[object WeakMap]"]=!1;var Fr=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(!Dr(t))return t;var d=Nr(t);if(d){if(l=Or(t),!c)return jr(t,l)}else{var f=Ar(t),v="[object Function]"==f||"[object GeneratorFunction]"==f;if(Er(t))return mr(t,c);if("[object Object]"==f||"[object Arguments]"==f||v&&!o){if(l=u||v?{}:Cr(t),!c)return u?_r(t,wr(l,t)):xr(t,br(l,t))}else{if(!Pr[f])return o?t:{};l=Tr(t,f,c)}}a||(a=new pr);var h=a.get(t);if(h)return h;a.set(t,l),zr(t)?t.forEach((function(i){l.add(e(i,n,r,i,t,a))})):Ir(t)&&t.forEach((function(i,o){l.set(o,e(i,n,r,o,t,a))}));var p=d?void 0:(s?u?Sr:kr:u?$r:Rr)(t);return gr(p||t,(function(i,o){p&&(i=t[o=i]),yr(l,o,e(i,n,r,o,t,a))})),l},Ur=function(e){return Fr(e,5)},Br=z,Mr=/\s/,Vr=/^\s+/,Lr=G,Gr=Qe,Wr=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&Mr.test(e.charAt(t)););return t}(e)+1).replace(Vr,""):e},qr=W,Xr=/^[-+]0x[0-9a-f]+$/i,Hr=/^0b[01]+$/i,Jr=/^0o[0-7]+$/i,Kr=parseInt,Qr=W,Yr=function(){return Br.Date.now()},Zr=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||Gr(e)&&"[object Symbol]"==Lr(e)}(e))return NaN;if(qr(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=qr(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Wr(e);var n=Hr.test(e);return n||Jr.test(e)?Kr(e.slice(2),n?2:8):Xr.test(e)?NaN:+e},ei=Math.max,ti=Math.min,ni=function(e){var t=h({},e);return function(e){return Boolean(null==e?void 0:e.children)}(e)&&(t.children=[]),t},ri=function(e){if(void 0===e&&(e=[]),!(null==e?void 0:e.length))return[];var t=Ur(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)},ii=function(e){if(void 0===e&&(e=[]),!(null==e?void 0:e.length))return[];var t=Ur(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=oi(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)},oi=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])},ai=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(i(t).filter((function(e){return e}))))},li=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=ci(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&&ui(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 Ur(e)},ci=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},ui=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 si=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})}),e.extend({name:"NwRegionSelection",components:{ElTree:t,ElInput:n,ElCheckbox:r},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:li(o),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=Yr();if(p(e))return y(e);l=setTimeout(g,function(e){var n=t-(e-c);return d?ti(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=Yr(),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=Zr(t)||0,Qr(n)&&(s=!!n.leading,o=(d="maxWait"in n)?ei(Zr(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(Yr())},b}((function(e){this.$refs.setTree.filter(e)}),300)},checked:{handler:function(e){var t=Ur(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 ni(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",Ur(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=ni(r.data);t&&(i.children=[t]),t=i,n.push(ni(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),di=l({},void 0,e.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);export{f as NwListContain,v as NwListGroup,si as NwRegionSelection,di as NwTipPopup,ai as extraAllSelectedValue,oi as extractRegionNames,ri as formatRegionData,ii as transformRegionData};