UNPKG

nimble-ui

Version:
1 lines 33.5 kB
module.exports=function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s="WPLj")}({"0Zk/":function(t,e,n){"use strict";e.a=function(t,e){return Object(o.a)(t,e).replace(/^[a-z]/,function(t){return t.toUpperCase()})};var o=n("lXuC")},"37ml":function(t,e,n){"use strict";e.a=function(t){t&&!t.install&&(t.install=function(e,n){e.mixin(Object(o.a)(t,[n]))});return t};var o=n("ekq3")},"4qRk":function(t,e,n){"use strict";e.a=function(t){t&&!t.install&&(t.install=function(e){var n=t.name||"",o=e.component(n);o||e.component(n,t)});return t}},"5fCB":function(t,e,n){"use strict";var o=n("E5mE"),i=n("eY/N");e.a=function t(){for(var e=!0,n=void 0,r=arguments.length,s=Array(r),a=0;a<r;a++)s[a]=arguments[a];if(s instanceof Array&&(n=s.slice(0,1)[0]),"boolean"==typeof n&&(e=n,s.splice(0,1),e||(n=s.splice(0,1)[0])),s&&s.length<1)return"boolean"==typeof n?s[1]:n;e&&(n=null);for(var u=0;u<s.length;u++){var c=s[u];if(c instanceof Object)if(e){for(var p in n&&n instanceof Object||(n=c instanceof Array?[]:{}),c)if(c.hasOwnProperty(p)){var l=c[p];if(h(l)){var f=h(n[p])&&n[p]||(l instanceof Array?[]:{});n[p]=t(f,l)}else void 0!==l?n[p]=l:void 0!==n[p]&&(n[p]=l)}}else n=n&&n instanceof Object?Object.assign(n,c):c}return n;function h(t){return t&&(Object(o.a)(t,"Array")||Object(i.a)(t))||!1}}},"76is":function(t,e,n){"use strict";n.d(e,"a",function(){return o});var o={SHOW:"showChange",HIDE:"hideChange",CONFIRM:"confirmChange",CANCEL:"cancelChange",CLOSE_POPUP:"closePopup",CLOSE:"close",OPEN_PAGE:"openPage",GO_BACK_PAGE:"goBackPage"}},"9B2K":function(t,e,n){"use strict";e.a=function(t,e,n){t=((t||"")+"").replace(/\s+/g,"");var a=n||window,u=e?"on":"";if(u+t in a)return t;var c=u?t:Object(o.a)(t);c=c.replace(/(start$|end$|animation|frame$)/gi,function(t,e){return Object(o.a)(e)});for(var p=0;p<r.length;p++){var l=r[p],f=l+c,h=l+t;if(u+f in a)return r=[l],s[t]=f,f;if(u+h in a)return r=[l],s[t]=h,h}var v=Object(i.a)("transition-property",!0);v&&u+v+c in a&&(t=v+c);return e?t:""};var o=n("0Zk/"),i=n("shrL"),r=["Moz","moz","Webkit","webkit","O","o","MS","ms"],s={}},"B/FW":function(t,e){},E5mE:function(t,e,n){"use strict";e.a=function(t,e){var n=!1;try{n=Object.prototype.toString.call(t)==="[object "+e+"]"}catch(t){}return n}},FNmr:function(t,e,n){"use strict";e.a=function(t,e){var n="";if(t&&e)if(e.name){var i="$s"+(n=Object(o.a)(e.name));t.prototype&&!t.prototype[i]&&function(t,e,n){if(t&&e&&n){t[n]=e;try{Object.defineProperty(t,n,{get:function(){var t=this;return e._getParent=function(){return t},e},enumerable:!1,configurable:!1})}catch(t){}}}(t.prototype,e,i)}else console.error("Mount is not defined for the image name");return n};var o=n("0Zk/")},FlVT:function(t,e,n){"use strict";var o=n("Z05q");e.a=o.a},HDd3:function(t,e,n){"use strict";var o={extends:n("Lv3q").a},i=n("VU/8")(o,null,!1,null,null,null);e.a=i.exports},Hxsb:function(t,e,n){"use strict";e.a=function(t,e){var n;e=e||{};var r={};r[t=(t||"")+""]=e.value||{};var s="my"+Object(i.a)(t);return{props:r,data:function(){var n={};return n[s]=Object(o.a)(e.myValueInit||this[t],[this[t]],this),n},watch:(n={},n[t]=function(t,n){var i=Object(o.a)(e.mValueChange,[t,n],this);!1!==i&&(this[s]=t)},n[s]=function(n,i){var r=Object(o.a)(e.myValueChange,[n,i],this);!1!==r&&this.$emit("update:"+t,n)},n)}};var o=n("ekq3"),i=n("WGR+")},Lv3q:function(t,e,n){"use strict";n("B/FW");var o=n("VU/8")({methods:{_onClick:function(t){this.$emit("click",t)},_onTap:function(t){this.$emit("tap",t)},_onClickItem:function(t){this.$emit("clickItem",t)}}},null,!1,null,null,null);e.a=o.exports},MKYu:function(t,e){},Nt7u:function(t,e,n){"use strict";var o=n("XAAj");e.a=o.a},Q4rh:function(t,e){},"VU/8":function(t,e){t.exports=function(t,e,n,o,i,r){var s,a=t=t||{},u=typeof t.default;"object"!==u&&"function"!==u||(s=t,a=t.default);var c,p="function"==typeof a?a.options:a;if(e&&(p.render=e.render,p.staticRenderFns=e.staticRenderFns,p._compiled=!0),n&&(p.functional=!0),i&&(p._scopeId=i),r?(c=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__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},p._ssrRegister=c):o&&(c=o),c){var l=p.functional,f=l?p.render:p.beforeCreate;l?(p._injectStyles=c,p.render=function(t,e){return c.call(e),f(t,e)}):p.beforeCreate=f?[].concat(f,c):[c]}return{esModule:s,exports:a,options:p}}},"WGR+":function(t,e,n){"use strict";var o=n("0Zk/");e.a=o.a},WPLj:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n("rRBi"),i=n("m3wD"),r=n("gTYF"),s=n("kuhF"),a=function(t,e){return Object(i.default)(t,Object(o.a)({popupComponent:r.default,getComponent:function(t){return new Promise(function(e,n){var o=void 0;switch(t){case"toast":default:o=s.default}e(o)})}},e))};a.install=function(t,e){t.use(s.default),t.use(a(t,e))},e.default=a},XAAj:function(t,e,n){"use strict";e.a=function(t){var e=document.createEvent("undefined"!=typeof MouseEvent?"MouseEvents":"Event");return e.initEvent(t,!0,!1),e}},XUgh:function(t,e,n){"use strict";var o=n("9B2K");e.a=o.a},Z05q:function(t,e,n){"use strict";e.a=function(t,e,n){if(t&&(t.tagName||t===window||t===document)&&e&&"string"==typeof e){var r=Object(o.a)(e);r._constructed=!0,r=Object(i.a)(!1,r,n),t.dispatchEvent(r)}};var o=n("XAAj"),i=n("5fCB")},Z9R9:function(t,e,n){"use strict";var o=n("qd2b");e.a=o.a},ZMJv:function(t,e,n){"use strict";var o=n("uGS0");e.a=o.a},"eY/N":function(t,e,n){"use strict";e.a=function(t){if(!Object(o.a)(t,"Object"))return!1;var e=Object.getPrototypeOf(t);if(!e)return!0;var n=i.call(e,"constructor")&&e.constructor;return"function"==typeof n&&i.toString.call(n)===i.toString.call(Object)};var o=n("E5mE"),i=Object.prototype.hasOwnProperty},ekq3:function(t,e,n){"use strict";var o=n("zagf");e.a=o.a},gTYF:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n("Nt7u"),i=n("FlVT"),r=n("XUgh"),s=n("ekq3"),a=n("Hxsb"),u=n("76is"),c={extends:n("HDd3").a,props:{scrollEl:{},isDisableScroll:{type:Boolean,default:!1},disableCla:{default:"nus_popup-overflowHide"}},data:function(){return{myScrollEl:this.scrollEl}},methods:{_stopEvent:function(){var t=this;(t.isDiableScroll||t.scrollEl)&&t.$nextTick(function(){var e=t.$refs||{};[e.hook_bg,e.hook_wrap].forEach(function(t){t&&t.addEventListener("touchmove",function(n){t!==e.hook_wrap&&n.preventDefault(),n.stopPropagation()},{passive:!1})})})},_initDisable:function(){var t=this.$tPopup;if(this.isDisableScroll||this.scrollEl){if(!this.myScrollEl){var e=t&&t.getOptions(),n=e&&e.scrollEl;this.myScrollEl=n}this._setElScroll=this._initElScroll(this.myScrollEl)}},_setScroll:function(t){if(this.isDisableScroll||this.scrollEl){if(t){if(this._isInitElScroll)return;this._isInitElScroll=!0}else this._isInitElScroll=!1;this._setBodyScroll(t),this._setElScroll&&this._setElScroll(t)}},_setBodyScroll:function(t){var e=document.body,n=e._popupCount||0;if(e)if(t){if(e._popupCount=n+1,n<2){var o=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;o&&(e.__scrollTop=o,e.style.top=-o+"px"),e.classList&&e.classList.add(this.disableCla)}}else(n-=1)>0?e._popupCount=n:(e._popupCount=0,e.style.top=0,e.classList&&e.classList.remove(this.disableCla),window.scrollTo(e.__scrollLeft||0,e.__scrollTop||0))},_initElScroll:function(t){var e=this;t&&"string"==typeof t&&(t=(t=document.querySelectorAll(t))&&Array.from(t)),t&&t.length<=0&&(t=[t]);var n=document.body;return t=t&&t.filter(function(t){return t!==n}),function(e){if(t&&!(t.length<=0))for(var n=0;n<t.length;n++){o(e,t[n])}};function o(t,n){var o=n._popupCount||0;n&&(t?(n._popupCount=o+1,o<2&&n.classList&&n.classList.add(e.disableCla)):(o-=1)>0?n._popupCount=o:(n._popupCount=0,n.classList&&n.classList.remove(e.disableCla)))}}}};var p=n("VU/8")(c,null,!1,function(t){n("qWP1")},null,null).exports,l=n("qd2b"),f=n("uGS0");var h=window.location||{},v=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return o.defaultOption={pageName:""},o.setDefaultOptions(n),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.toPage=function(t,e){var n=(t=this.getOptions(t)||{}).queryKey||"";if(t.notRouter)return t&&t.pageName||null;if(n&&t.pageName){var o=new RegExp("_"+n+"=[a-z]+","ig"),i=new RegExp("\\?_"+n+"=[a-z]+(&)?|&_"+n+"=[a-z]+","ig"),r=(e=e||h.href||"")||"",s=o.test(r);s?(o.lastIndex=0,r=r.replace(o,"_"+n+"="+t.pageName)):r=/[?&]/.test(r)?r+"&_"+n+"="+t.pageName:r+"?_"+n+"="+t.pageName;var a=r.split("?");0;var u=window.history.state,c=Object.assign({},t.state,{_type:n});return s&&u&&u._type===n?window.history.replaceState(c||null,t.title||"",a.join("?")):(!s||u&&u._type===n||window.history.replaceState(u||null,"",r.replace(i,function(t,e){var n="";return"&"===e&&(n="?"),n})),window.history.pushState(c||null,t.title||"",a.join("?"))),t.pageName}},e.prototype.goBackPage=function(t){return t=this.getOptions(t)||{},new Promise(function(e,n){if(t.notRouter)e(t&&t.pageName||null);else{var o=t.queryKey||"";if(!t[o]){var i=new RegExp("_"+o+"=[a-z]+","i"),r=decodeURIComponent(h.href||"").match(i);if(r&&r[0]){var s=((r[0]||"")+"").split("=")[1],a=s&&s[1];a&&(t[o]=a)}}Object(f.a)(t.getUrlParams||t,t).then(function(t){(t=t||{})[o]?(history.go(t.goBack||-1),e(t[o])):t.goBack&&(history.go(t.goBack),e(t[o]))},n)}})},e}(l.a),d={extends:p,props:{routerOption:{type:Object}},data:function(){return{pageList:[]}},created:function(){var t=this,e=t.routerOption||{};t._routerLive||e.notRouter||!e.queryKey||(t._routerLive=new v(e),t.onPopstate=function(e){t._onPopstate(e)},window.addEventListener("popstate",t.onPopstate))},beforeDestroy:function(){this.onPopstate&&(this._goBackPage(),window.removeEventListener("popstate",this.onPopstate))},methods:{_toPage:function(t,e){var n=this._routerLive;if(n){var o=t&&t.pageName,i=this.pageList;return o&&this._outPage!==o&&i[i.length-1]!==o?i.push(o):this._outPage=null,this._pageList=this._pageList||[],n&&n.toPage(t,e)}},_goBackPage:function(t){var e=this._routerLive;return e&&e.goBackPage(t)},_onPopstate:function(t){var e=this.$refs.hook_is,n=e&&e.$options;if(this._routerLive){var o=this.pageList,i=void 0,r=void 0;o&&o.length>0&&(i=o.pop(),r=o[o.length-1],this._outPage=r);var a=o.length>=2&&o[o.length-2];n&&Object(s.a)(n.popupPopstate,[{Event:t,oldPage:i,nowPage:r,upPage:a}],e)}}}},_=n("VU/8")(d,null,!1,null,null,null).exports,m=n("xaRY"),y={extends:_,name:"NuPopup",props:{maskFlag:{type:[Number,String],default:1},props:{type:Object},content:{},isHeight:{type:Boolean,default:!1},maskCloseFlag:{type:Number,default:1},isCloseBtn:{type:Boolean,default:!1},alignCla:{type:String,default:"bottom"},wrapCla:{type:String,default:""},transition:{type:Boolean,default:!0},transitionCls:{type:String,default:"toUp"}},data:function(){return{cHeight:0,showFlag:null,myProps:this.props}},mixins:[Object(a.a)("isOpen",{value:{type:Boolean,default:!0},mValueChange:function(t){return t?(this.myIsOpen=t,this._initCom(),this.show(!0)):(this._clearInit(),this.hide()),!1}}),Object(a.a)("isShow",{value:{type:Boolean,default:!0},myValueInit:function(){return!1},mValueChange:function(t){return t?(this.myIsOpen=!0,this.show()):this.hide(),!1}}),Object(m.default)()],watch:{showOpen:function(t){this._setScroll(t)},props:function(t){this.myProps=t}},created:function(){var t=this;t._resize=function(){t.cHeight=null,void 0!==t.timer&&clearTimeout(t.timer),t.timer=setTimeout(function(){t._getWrapHeight()},20)},t._initCom()},beforeDestroy:function(){if(this.myIsOpen){var t=Object(o.a)("destroy");this.close(t)}this._setScroll(!1)},mounted:function(){this.show(!0),this._setScroll(this.showOpen)},computed:{showOpen:function(){return this.isOpen&&this.myIsOpen&&this.isShow&&this.myIsShow},wrapHeight:function(){var t="";if(this.isHeight){var e=this.cHeight;e&&(t=e+"px")}return t}},methods:{_clearInit:function(){this._isInit=!1},_afterEnter:function(){Object(i.a)(this.$el,Object(r.a)("transitionend",!0))},_initCom:function(){this.hide(!0),this.isOpen&&(this._initDisable(),this._stopEvent(),this._initEvent||(this._initEvent=!0,this.isHeight&&(window.addEventListener("resize",this._resize),window.addEventListener("orientationchange",this._resize))))},_getContent:function(){var t=this;return new Promise(function(e,n){t.$nextTick(function(){var n=t.$slots.default;if(!t.content||n&&n.length)e(null);else{var o=t.$refs.hook_is;e(o)}})})},_getWrapHeight:function(){var t=this;t.cHeight=0,t.$nextTick(function(){var e=t.$refs.hook_wrap;e&&(t.cHeight=e.clientHeight)})},_clickCont:function(t){t&&t.target===this.$refs.hookCont&&this._clickBg(t)},_clickBg:function(t){switch(this.$emit("clickBg",t),this.maskCloseFlag+""){case"1":this.closePopup(t);break;case"2":this.hide()}},show:function(t){(this.myIsShow=this.isShow,this.showFlag=!t&&"show","show"===this.showFlag)&&(this._getContent().then(function(t){var e=t&&t.$options;e&&Object(s.a)(e.popupShow,[],t)}),this.$emit(u.a.SHOW,{}));this.myIsShow&&this._getWrapHeight()},hide:function(t){this.myIsShow=!1,this.showFlag=!t&&"hide"},closePopup:function(t){this.transition?this.hide():this.close(t),this.showFlag=null},close:function(t){(this._initEvent=!1,this.isHeight&&(window.removeEventListener("resize",this._resize),window.removeEventListener("orientationchange",this._resize)),"hide"!==this.showFlag||t&&"destroy"===t.type)?(this.myIsOpen=!1,this.$emit(u.a.CLOSE,t)):this._getContent().then(function(t){var e=t&&t.$options;e&&Object(s.a)(e.popupHide,[],t)});this.myIsShow=!1,this.$emit(u.a.HIDE,t),this.showFlag=null}}},g={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"n_popup"},on:{"after-enter":t._afterEnter,"after-leave":t.close}},[t.myIsOpen?n("div",{directives:[{name:"show",rawName:"v-show",value:t.myIsShow,expression:"myIsShow"}],staticClass:"nus_popup",class:[t.wrapCla,t.alignCla&&"nu_align-"+t.alignCla||"",-1===t.maskFlag&&"nu_hide-mask"]},[t.isCloseBtn?n("i",{staticClass:"nu_close nu_icon",on:{touchstart:function(e){t.closePopup(e)},click:function(e){t.closePopup(e)},tap:function(e){t.closePopup(e)}}},[t._v("\n \n ")]):t._e(),t._v(" "),-1!==t.maskFlag?n("div",{ref:"hook_bg",staticClass:"nu_popup-bg",class:[t.maskFlag+""=="1"&&"nu_mask"],on:{click:function(e){t._clickBg(e)},tap:function(e){t._clickBg(e)}}}):t._e(),t._v(" "),n("div",{ref:"hook_wrap",staticClass:"nu_content-wrap",style:t.wrapHeight&&{height:t.wrapHeight}},[n("div",{ref:"hookCont",staticClass:"nu_content",class:[t.transitionCls&&"n_"+t.transitionCls],on:{click:function(e){t._clickCont(e)},tap:function(e){t._clickCont(e)}}},[t._t("default",[t.content?n(t.content,t._b({ref:"hook_is",tag:"div",on:{showChange:function(e){t.show()},hideChange:function(e){t.hide()},closePopup:t.closePopup,close:t.close,openPage:t._toPage,goBackPage:t._goBackPage,confirmChange:t._confirm,cancelChange:t._cancel}},"div",t.myProps,!1)):t._e()])],2)])]):t._e()])},staticRenderFns:[]};var b=n("VU/8")(y,g,!1,function(t){n("Q4rh")},null,null).exports,w=n("4qRk");e.default=Object(w.a)(b)},"ho/f":function(t,e,n){"use strict";var o={extends:n("Lv3q").a},i=n("VU/8")(o,null,!1,null,null,null);e.a=i.exports},kARP:function(t,e){},kuhF:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n("Nt7u"),i={props:{nameText:{type:String},time:{type:Number,default:3e3}},mounted:function(){this._initCom()},beforeDestroy:function(){clearTimeout(this.timer)},methods:{_initCom:function(){var t=this;void 0!==t.timer&&null!==t.timer&&clearTimeout(t.timer),t.timer=setTimeout(function(){t.timer=null,t.$emit("close",Object(o.a)("close"))},t.time||3e3)}}},r={render:function(){var t=this.$createElement,e=this._self._c||t;return this.nameText?e("div",{staticClass:"nus_toastitem",domProps:{innerHTML:this._s(this.nameText)}}):this._e()},staticRenderFns:[]};var s=n("VU/8")(i,r,!1,function(t){n("MKYu")},null,null).exports,a=n("ho/f"),u=n("ekq3"),c={extends:a.a,name:"NuToast",components:{ToastItem:s},props:{isList:{default:!1},list:{type:Array}},data:function(){return{myIsList:this.isList,myList:this.list||[],itemData:null,lock:!1}},watch:{list:function(t){this.itemData=t},itemData:function(t){this.lock=!1,t&&(this.myIsList||(this.myList=[]),this.myList=this.myList.concat(t))}},methods:{_closePopup:function(t,e){var n=this,o=this.myList,i=0;if(t=t||0,o&&o.length)for(var r=0;r<o.length;r++){if(o[r]&&(i+=1)>t)return void Object(u.a)(e)}void 0!==n._settime&&null===n._settime&&clearTimeout(n._settime),n.lock||(n.lock=!0,n.$emit("closePopup"),n._settime=setTimeout(function(){n._settime=null,Object(u.a)(e)},200))},_onClose:function(t){var e=this;e._closePopup(1,function(){e.$set(e.myList,t,null)})}}},p={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.myList&&t.myList.length>0?n("div",{staticClass:"nus_toast"},[t._l(t.myList,function(e,o){return[e?n("toast-item",{key:o,staticClass:"nu_toast-item",attrs:{nameText:e.text,time:e.time},on:{close:function(e){e.stopPropagation(),t._onClose(o)}}}):t._e()]})],2):t._e()},staticRenderFns:[]};var l=n("VU/8")(c,p,!1,function(t){n("kARP")},null,null).exports,f=n("4qRk");e.default=Object(f.a)(l)},lXuC:function(t,e,n){"use strict";e.a=function(t,e){var n="("+(e||"_|-")+")";return t=(t=(t=(t+"").replace(new RegExp(n+"?(?:(?:[A-Z]{2,}[A-Z]"+n+"*$)|(?:[A-Z]{2,}(?=[A-Z])))","g"),function(t){return(((e||"")+"").split("|")[0]||"-")+(t=t.replace(new RegExp(n),"")).toLowerCase()})).replace(new RegExp("(?:^"+n+"?([a-z]))|(?:"+n+"$)","gi"),function(t,e,n){return(n||"").toLowerCase()})).replace(new RegExp(n+"([a-z])","gi"),function(t,e,n){return(n||"").toUpperCase()})}},m3wD:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n("ekq3"),i=n("rRBi"),r=n("wSSq");var s=function(t){function e(n,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,o));return i.name="Tips",i._toastList=[],i.isPopShow=!1,i.setDefaultOptions(o),i._popup=new r.a(n,i.defaultOption),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.tips=function(t,e){var n=this.getOptions({key:"tips",wrapCla:"",alignCla:"centerMiddle",transitionCls:"scale",maskCloseFlag:-1,maskFlag:-1},t);return n.wrapCla=(n.wrapCla||"")+" nu_tips-popup",this._popup.popupData(function(){return Object(o.a)(n.getComponent,[n.type||"toast"])},n,e)},e.prototype.toast=function(t,e){var n=this,o=void 0;function r(){n._popup.updateProps("toast",{isList:e&&e.isList||!1,list:n._toastList})&&(n._toastList=[])}"number"==typeof e?(o=e,e={}):o=e&&e.time,(e=n.getOptions(e))&&e.isList||(n._toastList=[]),n._toastList.push({text:t,time:o}),n.isPopShow?r():(n.isPopShow=!0,n.tips(Object(i.a)(!1,{key:"toast",wrapCla:"nu_toast-popup",maskFlag:-1},e,{type:"toast"}),function(){r()}).then(function(){n.isPopShow=!1}))},e}(n("q44f").a);function a(t,e){return new s(t,e)}a.install=function(t,e){t.use(a(t,e))};e.default=a},q44f:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.inputBlur=function(){var t=document.activeElement;if(t&&"input"===(t.tagName||"").toLowerCase()){var e=t;e.blur(),setTimeout(function(){e.scrollIntoView()},20)}},e}(n("Z9R9").a)},qWP1:function(t,e){},qd2b:function(t,e,n){"use strict";var o=n("5fCB"),i=n("Z05q"),r=n("zagf");var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._events={}}return t.prototype.$dispatchEvent=function(t,e,n){return Object(i.a)(t,e,n)},t.prototype.$on=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push([e,n])},t.prototype.$once=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this,o=this,i=!1,r=function r(){o.$off(t,r),i||(i=!0,e.apply(n,arguments))};r.fn=e,o.$on(t,r)},t.prototype.$off=function(t,e){var n=this._events&&this._events[t];if(n)for(var o=n.length;o--;)(n[o][0]===e||n[o][0]&&n[o][0].fn===e)&&(n[o][0]=void 0)},t.prototype.$emit=function(t){var e=this._events&&this._events[t];if(e){for(var n=e.length,o=[].concat(e),i=arguments.length,s=Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];for(var u=0;u<n;u++){var c=o[u],p=c[0],l=c[1];Object(r.a)(p,s,l)}}},t}(),a=n("FNmr");n.d(e,"a",function(){return u});var u=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return o.name="",o.defaultOption={},o.setDefaultOptions(!0,n),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.singleton=function(t){var e=this._singleton||this.instance(t);return this._singleton=e,e},e.instance=function(t){return new this(t)},e.install=function(t,e){var n=this.instance(e);return t&&t.use instanceof Function&&t.use(n,e),n},e.prototype.getParent=function(){return Object(r.a)(this._getParent||this._vue&&this._vue.prototype||null,[],this)},e.prototype.install=function(t,e){this._vue=this._vue||t;var n=Object(a.a)(t,this);return this.setDefaultOptions(e&&n&&e[n]||e),this},e.prototype.setDefaultOptions=function(t){var e=void 0,n=!0;"boolean"==typeof t?(n=t,e=arguments[1]||{}):e=t,e&&(this.defaultOption=Object(o.a)(n,this.defaultOption||{},e))},e.prototype.getOptions=function(){for(var t=[{},this.defaultOption||{}],e=!0,n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];return"boolean"==typeof i[0]&&(e=i[0],i.splice(0,1)),i&&i.length>0&&(t=t.concat(i)),o.a.apply(void 0,[e].concat(t))},e.prototype.preload=function(){var t=this;return new Promise(function(e,n){e(t)})},e}(s)},rRBi:function(t,e,n){"use strict";var o=n("5fCB");e.a=o.a},shrL:function(t,e,n){"use strict";e.a=function(t,e){if(t=Object(o.a)(((t||"")+"").replace(/\s+/g,"")),!e&&a[t])return a[t];if(!e&&t in r)return t;for(var n=Object(i.a)(t),u=0;u<s.length;u++){var c=s[u],p=c+n;if(p in r)return s=[c],a[t]=p,e?c:p}return e?"":t};var o=n("lXuC"),i=n("0Zk/"),r=document.createElement("div").style,s=["Moz","webkit","O","ms"],a={}},uGS0:function(t,e,n){"use strict";e.a=function(t,e,n,r){var s=t;!e||e instanceof Array||(e=[e]);return new Promise(function(a,u){(s=Object(o.a)(t||s,e,r||null))instanceof Promise||Object(i.a)(s,"Promise")||s&&s.then instanceof Function?s.then(a,u):a(n?{default:s}:s)})};var o=n("zagf"),i=n("E5mE")},wSSq:function(t,e,n){"use strict";var o=n("ZMJv"),i=n("ekq3"),r=n("76is"),s={confirmFilter:function(t){return{type:"confirm",data:t}},cancelFilter:function(t){return{type:"cancel",data:t}},closeFilter:function(t){return{type:"close",data:t}},hideFilter:function(t){return{type:"hide",data:t}}},a=n("q44f");var u=function(){for(var t=!1,e=void 0,n=void 0,o=arguments.length,i=Array(o),r=0;r<o;r++)i[r]=arguments[r];if(i instanceof Array&&(n=i.splice(0,1)[0]),"boolean"==typeof n&&(t=n,n=i.splice(0,1)[0]),i&&i.length<1)return"boolean"==typeof n?i[1]:n;t?i[0]instanceof Array?e=[]:i[0]instanceof Object&&(e={}):e=n;for(var s=0;s<i.length;s++){var a=i[s];if(a instanceof Object)for(var u in n)n.hasOwnProperty(u)&&u in a&&(!t||t&&void 0!==a[u])&&(e[u]=a[u])}return e},c=n("rRBi");var p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._Vue=this._Vue||e}return t.prototype._initCom=function(t,e){var n=t,o=(e=e||{}).parent;if(!o){var r=Object(i.a)(this._getParent,[],this);r&&r.$vnode&&(o=r)}var s=void 0;if(o&&(s={parent:o,store:o.$store||o.$parent&&o.$parent.$store}),!(t instanceof Function)){if(!(this._Vue instanceof Function))return console.log(new Error("挂载组件时候未找到Vue")),{};n=this._Vue.extend(t)}return e&&e.props&&(e.propsData=e.props,delete e.props),new n(Object.assign({},e,s||{}))},t.prototype.instCom=function(t,e){var n=(e=e||{}).el;return n||(n=document.body),e.el=document.createElement("div"),Object(i.a)(n.appendChild,[e.el],n),this._initCom(t,e)},t.prototype.updataProps=function(t,e){t&&e&&Object.assign(t,e)},t.prototype.setVue=function(t){this._Vue=t||this._Vue},t}();var l=function(t){t.mixin({beforeDestroy:function(){this.$emit("destroyPopupCore")}})},f=function(t){function e(n,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,o));return i.name="PopupCore",i._mountCom=null,i.setDefaultOptions(o),i._initMountCom(n),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._instPopup=function(t){var e=this;t=e.getOptions(t);var n=Object(c.a)({},t);return n.props=u(!0,{maskFlag:"",props:"",content:"",isOpen:!0,isShow:!0,maskCloseFlag:"",isCloseBtn:"",alignCla:"",wrapCla:"",transition:"",transitionCls:"",routerOption:"",isHeight:!1,scrollEl:"",isDisableScroll:""},t),new Promise(function(i,r){(function(e){if(t.content&&t.content.prototype&&t.content.prototype.$mount)return new Promise(function(t,n){t(e)});return Object(o.a)(e)})(t.content).then(function(s){n.props.content=s,Object(o.a)(t.popupComponent).then(function(t){var o=e._mountCom.instCom(t,n);i(o)},r)})})},e.prototype.createPopup=function(t,e,n){var o=this,s=o.getOptions(e,{content:t});return new Promise(function(t,e){o._instPopup(s).then(function(e){var a=e.$refs.hook_is,u={component:a,popup:e,updateProps:function(t){e&&(e.$data.myProps=Object.assign({},e.$data.myProps,t))},updateData:function(t){a=e.$refs.hook_is,console.warn("请不要使用updateData修改数据"),a&&o._mountCom.updataProps(a.$data,t)},show:function(){e&&e.show()},hide:function(){e&&e.hide()},closePopup:function(){e&&e.closePopup()},close:function(){e&&e.close()}};function c(){if(e){e.$parent&&e.$parent.$off("destroyPopupCore",c);var t=e.$el;e.$destroy();var o=t.parentNode;o&&o.removeChild(t),Object(i.a)(n)}u.popup=null,u.component=null,e=null,a=null}e&&e.$parent&&e.$parent.$once("destroyPopupCore",c),e.$on(r.a.CLOSE,function(){c()}),a?(s&&s.data instanceof Object&&u.updateData(s.data),t(u)):setTimeout(function(){s&&s.data instanceof Object&&u.updateData(s.data),u.component=e.$refs.hook_is,t(u)})},e)})},e.prototype._initMountCom=function(t){var e=this;if(e._mountCom)e._mountCom.setVue(t);else{var n=new p(t);t&&(Object(i.a)(l,[t]),l=null),n._getParent=function(){return e._getParent&&e._getParent()},e._mountCom=n}},e.prototype.install=function(e,n){this._initMountCom(e),t.prototype.install.call(this,e,n)},e}(a.a);n.d(e,"a",function(){return h});var h=function(t){function e(n,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,o));return i.name="PopupBase",i.defaultOption=s,i._cache={},i.setDefaultOptions(o),i._setSPopup(n),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._initWatch=function(t,e,n){var s=this;return new Promise(function(a,u){var c,p=null;if(!t)return u(new Error("popup 不能为空"));for(var l=((c={})[r.a.CONFIRM]=function(t){_(t,e.confirmFilter)},c[r.a.HIDE]=function(t){d(t,e.hideFilter)},c[r.a.CLOSE]=function(t){d(t,e.closeFilter),void 0!==p&&clearTimeout(p),p=setTimeout(function(){Object(i.a)(n||t,t)},0)},c[r.a.CANCEL]=function(t){_(t,e.cancelFilter)},c),f=Object.keys(l),h=0;h<f.length;h++){var v=f[h];t.$on(v,l[v])}function d(e,n){return Object(o.a)(n||e,e).then(function(e){for(var n=0;n<f.length;n++){var o=f[n];t.$off(o,l[o])}a(e)})}function _(t,n){Object(o.a)(n||t,t).then(function(t){"show"===e.showFlag?s.hide(e.key):s.closePopup(e.key),a(t)})}})},e.prototype._handlePopup=function(t,e,n,o){var i=this._getPopup(t);return!!i&&(!o&&this._removePopup(t),i&&i[e](n),!0)},e.prototype._initPopup=function(t,e){return e=this.getOptions(e),this.sPopup.createPopup(t,e)},e.prototype._addPopup=function(){var t,e=(t=regeneratorRuntime.mark(function t(e,n,o,i){var r,s;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=this,e=e||"default",s=i&&r._getPopup(e),i&&s&&s.close(e),t.next=6,r._initPopup(n,o);case 6:return s=t.sent,i&&(r.close(e),r._cache[e]=s),t.abrupt("return",s);case 9:case"end":return t.stop()}},t,this)}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function o(i,r){try{var s=e[i](r),a=s.value}catch(t){return void n(t)}if(!s.done)return Promise.resolve(a).then(function(t){o("next",t)},function(t){o("throw",t)});t(a)}("next")})});return function(t,n,o,i){return e.apply(this,arguments)}}(),e.prototype._removePopup=function(t){delete this._cache[t||"default"]},e.prototype._getPopup=function(t){t=t||"default";return this._cache[t]},e.prototype._setSPopup=function(t){var e=this;if(e.sPopup)e.sPopup._initMountCom(t);else{var n=new f(t);n._getParent=function(){return e._getParent&&e._getParent()},e.sPopup=n}},e.prototype.popupData=function(t,e,n){var o=this,r=o.getOptions(e);"show"===r.showFlag?o.show(r.key):o.close(r.key);var s=new Promise(function(e,a){var u=o._getPopup(r.key);u&&u.popup&&"show"===r.showFlag?(o._initWatch(u.popup,r).then(e,a),Object(i.a)(n,[u.popup])):o.openPopup(t,Object.assign({},r),!0).then(function(t){Object.assign(s,t),t.popup&&o._initWatch(t.popup,r).then(e,a),Object(i.a)(n,[t.popup])})});return s},e.prototype.openPopup=function(t,e,n){return e=e||{},this._addPopup(e.key,t,e,n)},e.prototype.updateProps=function(t,e){return this._handlePopup(t,"updateProps",e,!0)},e.prototype.updateData=function(t,e){return this._handlePopup(t,"updateData",e,!0)},e.prototype.show=function(t){return this._handlePopup(t,"show",null,!0)},e.prototype.hide=function(t){return this._handlePopup(t,"hide",null,!0)},e.prototype.closePopup=function(t){return this._handlePopup(t,"closePopup")},e.prototype.close=function(t){return this._handlePopup(t,"close")},e.prototype.closeAll=function(){var t=this._cache;for(var e in t)t.hasOwnProperty(e)&&this.close(e)},e.prototype.install=function(e,n){this._setSPopup(e),t.prototype.install.call(this,e,n)},e}(a.a)},xaRY:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n("76is");var i=n("37ml");e.default=Object(i.a)(function(){return{methods:{_cancel:function(t){this.$emit(o.a.CANCEL,t)},_confirm:function(t){this.$emit(o.a.CONFIRM,t)}}}})},zagf:function(t,e,n){"use strict";e.a=function(t,e,n){var o=t;t instanceof Function&&(o=t.apply(n,e));return o}}});