New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

awesome-notifications

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

awesome-notifications - npm Package Compare versions

Comparing version 1.1.1 to 2.0.0

src/constants.js

2

dist/index.js

@@ -1,1 +0,1 @@

!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.AWN=n():t.AWN=n()}("undefined"!=typeof self?self:this,function(){return function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var e={};return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},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,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=44)}([function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n,e){var r=e(28)("wks"),o=e(29),i=e(0).Symbol,c="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=c&&i[t]||(c?i:o)("Symbol."+t))}).store=r},function(t,n){var e=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=e)},function(t,n,e){var r=e(9);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n,e){var r=e(0),o=e(2),i=e(8),c=e(5),u=function(t,n,e){var a,s,f,l=t&u.F,p=t&u.G,h=t&u.S,v=t&u.P,d=t&u.B,y=t&u.W,m=p?o:o[n]||(o[n]={}),_=m.prototype,g=p?r:h?r[n]:(r[n]||{}).prototype;p&&(e=n);for(a in e)(s=!l&&g&&void 0!==g[a])&&a in m||(f=s?g[a]:e[a],m[a]=p&&"function"!=typeof g[a]?e[a]:d&&s?i(f,r):y&&g[a]==f?function(t){var n=function(n,e,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e)}return new t(n,e,r)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(f):v&&"function"==typeof f?i(Function.call,f):f,v&&((m.virtual||(m.virtual={}))[a]=f,t&u.R&&_&&!_[a]&&c(_,a,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,n,e){var r=e(6),o=e(17);t.exports=e(7)?function(t,n,e){return r.f(t,n,o(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(3),o=e(49),i=e(50),c=Object.defineProperty;n.f=e(7)?Object.defineProperty:function(t,n,e){if(r(t),n=i(n,!0),r(e),o)try{return c(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){t.exports=!e(27)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(11);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n){t.exports={}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,e){var r=e(9),o=e(0).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,e){var r=e(57),o=e(15);t.exports=function(t){return r(o(t))}},function(t,n,e){var r=e(14),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,n,e){var r=e(28)("keys"),o=e(29);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,n,e){var r=e(6).f,o=e(12),i=e(1)("toStringTag");t.exports=function(t,n,e){t&&!o(t=e?t:t.prototype,i)&&r(t,i,{configurable:!0,value:n})}},function(t,n,e){"use strict";function r(t){var n,e;this.promise=new t(function(t,r){if(void 0!==n||void 0!==e)throw TypeError("Bad Promise constructor");n=t,e=r}),this.resolve=o(n),this.reject=o(e)}var o=e(11);t.exports.f=function(t){return new r(t)}},function(t,n,e){t.exports={default:e(46),__esModule:!0}},function(t,n,e){"use strict";var r=e(48)(!0);e(25)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,n=this._t,e=this._i;return e>=n.length?{value:void 0,done:!0}:(t=r(n,e),this._i+=t.length,{value:t,done:!1})})},function(t,n,e){"use strict";var r=e(26),o=e(4),i=e(51),c=e(5),u=e(12),a=e(10),s=e(52),f=e(21),l=e(60),p=e(1)("iterator"),h=!([].keys&&"next"in[].keys()),v=function(){return this};t.exports=function(t,n,e,d,y,m,_){s(e,n,d);var g,b,w,x=function(t){if(!h&&t in L)return L[t];switch(t){case"keys":case"values":return function(){return new e(this,t)}}return function(){return new e(this,t)}},j=n+" Iterator",O="values"==y,E=!1,L=t.prototype,k=L[p]||L["@@iterator"]||y&&L[y],S=!h&&k||x(y),P=y?O?x("entries"):S:void 0,T="Array"==n?L.entries||k:k;if(T&&(w=l(T.call(new t)))!==Object.prototype&&w.next&&(f(w,j,!0),r||u(w,p)||c(w,p,v)),O&&k&&"values"!==k.name&&(E=!0,S=function(){return k.call(this)}),r&&!_||!h&&!E&&L[p]||c(L,p,S),a[n]=S,a[j]=v,y)if(g={values:O?S:x("values"),keys:m?S:x("keys"),entries:P},_)for(b in g)b in L||i(L,b,g[b]);else o(o.P+o.F*(h||E),n,g);return g}},function(t,n){t.exports=!0},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,e){var r=e(0),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,e){var r=e(0).document;t.exports=r&&r.documentElement},function(t,n,e){var r=e(15);t.exports=function(t){return Object(r(t))}},function(t,n,e){var r=e(13),o=e(1)("toStringTag"),i="Arguments"==r(function(){return arguments}()),c=function(t,n){try{return t[n]}catch(t){}};t.exports=function(t){var n,e,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=c(n=Object(t),o))?e:i?r(n):"Object"==(u=r(n))&&"function"==typeof n.callee?"Arguments":u}},function(t,n,e){var r=e(3);t.exports=function(t,n,e,o){try{return o?n(r(e)[0],e[1]):n(e)}catch(n){var i=t.return;throw void 0!==i&&r(i.call(t)),n}}},function(t,n,e){var r=e(10),o=e(1)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,n,e){var r=e(33),o=e(1)("iterator"),i=e(10);t.exports=e(2).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,n,e){var r=e(3),o=e(11),i=e(1)("species");t.exports=function(t,n){var e,c=r(t).constructor;return void 0===c||void 0==(e=r(c)[i])?n:o(e)}},function(t,n,e){var r,o,i,c=e(8),u=e(68),a=e(31),s=e(16),f=e(0),l=f.process,p=f.setImmediate,h=f.clearImmediate,v=f.MessageChannel,d=f.Dispatch,y=0,m={},_=function(){var t=+this;if(m.hasOwnProperty(t)){var n=m[t];delete m[t],n()}},g=function(t){_.call(t.data)};p&&h||(p=function(t){for(var n=[],e=1;arguments.length>e;)n.push(arguments[e++]);return m[++y]=function(){u("function"==typeof t?t:Function(t),n)},r(y),y},h=function(t){delete m[t]},"process"==e(13)(l)?r=function(t){l.nextTick(c(_,t,1))}:d&&d.now?r=function(t){d.now(c(_,t,1))}:v?(o=new v,i=o.port2,o.port1.onmessage=g,r=c(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",g,!1)):r="onreadystatechange"in s("script")?function(t){a.appendChild(s("script")).onreadystatechange=function(){a.removeChild(this),_.call(t)}}:function(t){setTimeout(c(_,t,1),0)}),t.exports={set:p,clear:h}},function(t,n){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,n,e){var r=e(3),o=e(9),i=e(22);t.exports=function(t,n){if(r(t),o(n)&&n.constructor===t)return n;var e=i.f(t);return(0,e.resolve)(n),e.promise}},function(t,n,e){var r=e(1)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,n){if(!n&&!o)return!1;var e=!1;try{var i=[7],c=i[r]();c.next=function(){return{done:e=!0}},i[r]=function(){return c},t(i)}catch(t){}return e}},function(t,n,e){"use strict";n.__esModule=!0,n.default=function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}},function(t,n,e){"use strict";n.__esModule=!0;var r=e(82),o=function(t){return t&&t.__esModule?t:{default:t}}(r);n.default=function(){function t(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,o.default)(t,r.key,r)}}return function(n,e,r){return e&&t(n.prototype,e),r&&t(n,r),n}}()},function(t,n,e){t.exports=e(45)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(23),o=e.n(r),i=e(74),c=e.n(i),u=e(78),a=e.n(u),s=e(81),f=e.n(s),l=e(42),p=e.n(l),h=e(43),v=e.n(h),d=e(85),y=e(89),m=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p()(this,t),this.options=Object(d.a)(n),this.labels=this.options.labels,this.icons=this.options.icons,this.replacements=this.options.replacements,this.maxNotifications=this.options.maxNotifications,this.timers={},this.deleted={}}return v()(t,[{key:"tip",value:function(t){this.notify(t,"tip")}},{key:"info",value:function(t){this.notify(t,"info")}},{key:"success",value:function(t){this.notify(t,"success")}},{key:"warning",value:function(t){this.notify(t,"warning")}},{key:"alert",value:function(t){this.notify(t,"alert")}},{key:"notify",value:function(t,n){t=this._applyReplacements(t,n),this._addNotification(t,n)}},{key:"async",value:function(t,n,e,r,o){return r=r||this.options.asyncDefaultMessage,r=this._applyReplacements(r),this._addAsyncNotification(t,n,e,r,o)}},{key:"_applyReplacements",value:function(t,n){for(var e in this.replacements.general)t=t.replace(e,this.replacements.general[e]);if(this.replacements[n])for(var r in this.replacements[n])t=t.replace(r,this.replacements[n][r]);return t}},{key:"confirm",value:function(t,n,e){t=this._applyReplacements(t),this._showConfirm(t,n,e)}},{key:"_showConfirm",value:function(t,n,e){var r=this,o=document.createElement("div");o.id="awn-confirm",o.style.animationDuration=this._msToS(this.options.animationDuration);var i=this._getIcon(this.icons.confirm);o.innerHTML="\n <div class='awn-confirm-body'>\n "+i+"\n <div class='awn-confirm-title'>\n "+this.labels.confirm+"\n </div>\n "+t+"\n <div class='awn-buttons'>\n <button class='awn-btn awn-btn-success' id='awn-btn-success'>"+this.options.confirm.successBtnLabel+"</button>\n <button class='awn-btn awn-btn-cancel' id='awn-btn-cancel'>"+this.options.confirm.cancelBtnLabel+"</button>\n </div>\n </div>\n ",o=document.body.appendChild(o),document.getElementById("awn-btn-success").addEventListener("click",function(){r._deleteConfirm(o),"function"==typeof n&&n()}),document.getElementById("awn-btn-cancel").addEventListener("click",function(){r._deleteConfirm(o),"function"==typeof e&&e()})}},{key:"_deleteConfirm",value:function(t){this._beforeDelete(t).then(function(){document.body.removeChild(t)})}},{key:"_addAsyncNotification",value:function(){function t(t,e,r,o,i){return n.apply(this,arguments)}var n=f()(a.a.mark(function t(n,e,r,o,i){var c,u=this;return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._insertEl(o,"async");case 2:return c=t.sent,t.abrupt("return",n.then(function(t){if(i?(i=u._applyReplacements(i,"success"),u._addNotification(i,"success",c)):u._deleteEl(c),"function"==typeof e)return e(t)},function(t){if(u._addNotification(t,"alert",c),"function"==typeof r)return r(t)}));case 4:case"end":return t.stop()}},t,this)}));return t}()},{key:"_addNotification",value:function(t,n,e){var r=this;e?this._replaceEl(t,n,e).then(function(t){r._addListeners(t)}):this._insertEl(t,n).then(function(t){r._addListeners(t)})}},{key:"_addListeners",value:function(t){var n=this;this.timers[t.id]=new y.a(function(){n._deleteEl(t)},this.options.duration),t.addEventListener("click",function(){n._deleteEl(t)}),t.addEventListener("mouseenter",function(){n.deleted[t.id]||(t.classList.add("awn-progress-bar-paused"),n.timers[t.id].pause())}),t.addEventListener("mouseleave",function(){n.deleted[t.id]||(t.classList.remove("awn-progress-bar-paused"),n.timers[t.id].resume())})}},{key:"_beforeInsert",value:function(){var t=this;if(this._getContainer().childElementCount>=this.maxNotifications){var n=c()(this._getContainer().getElementsByClassName("awn-event")),e=n.find(function(n){return!t.deleted[n.id]});e&&this._deleteEl(e)}}},{key:"_insertEl",value:function(t,n){var e=this;return new o.a(function(r,o){e._beforeInsert(),r(e._getContainer().appendChild(e._newEl(t,n)))})}},{key:"_replaceEl",value:function(t,n,e){var r=this;return new o.a(function(o,i){if(document.getElementById(e.id)){var c=r._newEl(t,n);r._beforeDelete(e).then(function(){r._getContainer().replaceChild(c,e),o(document.getElementById(c.id))})}})}},{key:"_newEl",value:function(t,n){var e="awn-"+Math.floor(Date.now()-100*Math.random()),r="async"===n?"":"<div class='awn-progress-bar' style=\"animation-duration:"+this._msToS(this.options.duration)+';"></div>',o=this._getIcon(this.icons[n]),i=document.createElement("div");return i.className="awn-event awn-"+n,i.id=e,i.style.animationDuration=this._msToS(this.options.animationDuration),i.innerHTML=r+"<b>"+this.labels[n]+"</b>"+t+o,i}},{key:"_beforeDelete",value:function(t){var n=this;return new o.a(function(e,r){t.classList.add("awn-hiding"),setTimeout(e,n.options.animationDuration)})}},{key:"_clearTimers",value:function(t){this.timers[t.id]&&(this.timers[t.id].pause(),this.timers[t.id]=null)}},{key:"_deleteEl",value:function(t){var n=this;t.parentNode&&(this._clearTimers(t),this.deleted[t.id]=!0,this._beforeDelete(t).then(function(){t.parentNode.removeChild(t),n.deleted[t.id]=null}))}},{key:"_getContainer",value:function(){if(!this.container){var t=document.getElementById("awn-container");this.container=t||this._createContainer(this.options.position)}return this.container}},{key:"_createContainer",value:function(t){var n=document.createElement("div");switch(n.id="awn-container",t){case"top-left":n.className="awn-left awn-top";break;case"bottom-left":n.className="awn-left";break;case"top-right":n.className="awn-top"}return document.body.appendChild(n)}},{key:"_getIcon",value:function(t){return this.options.icons.enabled?this.options.icons.template.prefix+t+this.options.icons.template.suffix:""}},{key:"_msToS",value:function(t){return t/1e3+"s"}}]),t}();n.default=m},function(t,n,e){e(47),e(24),e(61),e(65),e(72),e(73),t.exports=e(2).Promise},function(t,n){},function(t,n,e){var r=e(14),o=e(15);t.exports=function(t){return function(n,e){var i,c,u=String(o(n)),a=r(e),s=u.length;return a<0||a>=s?t?"":void 0:(i=u.charCodeAt(a),i<55296||i>56319||a+1===s||(c=u.charCodeAt(a+1))<56320||c>57343?t?u.charAt(a):i:t?u.slice(a,a+2):c-56320+(i-55296<<10)+65536)}}},function(t,n,e){t.exports=!e(7)&&!e(27)(function(){return 7!=Object.defineProperty(e(16)("div"),"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(9);t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n,e){t.exports=e(5)},function(t,n,e){"use strict";var r=e(53),o=e(17),i=e(21),c={};e(5)(c,e(1)("iterator"),function(){return this}),t.exports=function(t,n,e){t.prototype=r(c,{next:o(1,e)}),i(t,n+" Iterator")}},function(t,n,e){var r=e(3),o=e(54),i=e(30),c=e(20)("IE_PROTO"),u=function(){},a=function(){var t,n=e(16)("iframe"),r=i.length;for(n.style.display="none",e(31).appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),a=t.F;r--;)delete a.prototype[i[r]];return a()};t.exports=Object.create||function(t,n){var e;return null!==t?(u.prototype=r(t),e=new u,u.prototype=null,e[c]=t):e=a(),void 0===n?e:o(e,n)}},function(t,n,e){var r=e(6),o=e(3),i=e(55);t.exports=e(7)?Object.defineProperties:function(t,n){o(t);for(var e,c=i(n),u=c.length,a=0;u>a;)r.f(t,e=c[a++],n[e]);return t}},function(t,n,e){var r=e(56),o=e(30);t.exports=Object.keys||function(t){return r(t,o)}},function(t,n,e){var r=e(12),o=e(18),i=e(58)(!1),c=e(20)("IE_PROTO");t.exports=function(t,n){var e,u=o(t),a=0,s=[];for(e in u)e!=c&&r(u,e)&&s.push(e);for(;n.length>a;)r(u,e=n[a++])&&(~i(s,e)||s.push(e));return s}},function(t,n,e){var r=e(13);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n,e){var r=e(18),o=e(19),i=e(59);t.exports=function(t){return function(n,e,c){var u,a=r(n),s=o(a.length),f=i(c,s);if(t&&e!=e){for(;s>f;)if((u=a[f++])!=u)return!0}else for(;s>f;f++)if((t||f in a)&&a[f]===e)return t||f||0;return!t&&-1}}},function(t,n,e){var r=e(14),o=Math.max,i=Math.min;t.exports=function(t,n){return t=r(t),t<0?o(t+n,0):i(t,n)}},function(t,n,e){var r=e(12),o=e(32),i=e(20)("IE_PROTO"),c=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},function(t,n,e){e(62);for(var r=e(0),o=e(5),i=e(10),c=e(1)("toStringTag"),u="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),a=0;a<u.length;a++){var s=u[a],f=r[s],l=f&&f.prototype;l&&!l[c]&&o(l,c,s),i[s]=i.Array}},function(t,n,e){"use strict";var r=e(63),o=e(64),i=e(10),c=e(18);t.exports=e(25)(Array,"Array",function(t,n){this._t=c(t),this._i=0,this._k=n},function(){var t=this._t,n=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,o(1)):"keys"==n?o(0,e):"values"==n?o(0,t[e]):o(0,[e,t[e]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,n){t.exports=function(){}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,e){"use strict";var r,o,i,c,u=e(26),a=e(0),s=e(8),f=e(33),l=e(4),p=e(9),h=e(11),v=e(66),d=e(67),y=e(37),m=e(38).set,_=e(69)(),g=e(22),b=e(39),w=e(40),x=a.TypeError,j=a.process,O=a.Promise,E="process"==f(j),L=function(){},k=o=g.f,S=!!function(){try{var t=O.resolve(1),n=(t.constructor={})[e(1)("species")]=function(t){t(L,L)};return(E||"function"==typeof PromiseRejectionEvent)&&t.then(L)instanceof n}catch(t){}}(),P=function(t){var n;return!(!p(t)||"function"!=typeof(n=t.then))&&n},T=function(t,n){if(!t._n){t._n=!0;var e=t._c;_(function(){for(var r=t._v,o=1==t._s,i=0;e.length>i;)!function(n){var e,i,c=o?n.ok:n.fail,u=n.resolve,a=n.reject,s=n.domain;try{c?(o||(2==t._h&&C(t),t._h=1),!0===c?e=r:(s&&s.enter(),e=c(r),s&&s.exit()),e===n.promise?a(x("Promise-chain cycle")):(i=P(e))?i.call(e,u,a):u(e)):a(r)}catch(t){a(t)}}(e[i++]);t._c=[],t._n=!1,n&&!t._h&&A(t)})}},A=function(t){m.call(a,function(){var n,e,r,o=t._v,i=M(t);if(i&&(n=b(function(){E?j.emit("unhandledRejection",o,t):(e=a.onunhandledrejection)?e({promise:t,reason:o}):(r=a.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=E||M(t)?2:1),t._a=void 0,i&&n.e)throw n.v})},M=function(t){return 1!==t._h&&0===(t._a||t._c).length},C=function(t){m.call(a,function(){var n;E?j.emit("rejectionHandled",t):(n=a.onrejectionhandled)&&n({promise:t,reason:t._v})})},N=function(t){var n=this;n._d||(n._d=!0,n=n._w||n,n._v=t,n._s=2,n._a||(n._a=n._c.slice()),T(n,!0))},I=function(t){var n,e=this;if(!e._d){e._d=!0,e=e._w||e;try{if(e===t)throw x("Promise can't be resolved itself");(n=P(t))?_(function(){var r={_w:e,_d:!1};try{n.call(t,s(I,r,1),s(N,r,1))}catch(t){N.call(r,t)}}):(e._v=t,e._s=1,T(e,!1))}catch(t){N.call({_w:e,_d:!1},t)}}};S||(O=function(t){v(this,O,"Promise","_h"),h(t),r.call(this);try{t(s(I,this,1),s(N,this,1))}catch(t){N.call(this,t)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=e(70)(O.prototype,{then:function(t,n){var e=k(y(this,O));return e.ok="function"!=typeof t||t,e.fail="function"==typeof n&&n,e.domain=E?j.domain:void 0,this._c.push(e),this._a&&this._a.push(e),this._s&&T(this,!1),e.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=s(I,t,1),this.reject=s(N,t,1)},g.f=k=function(t){return t===O||t===c?new i(t):o(t)}),l(l.G+l.W+l.F*!S,{Promise:O}),e(21)(O,"Promise"),e(71)("Promise"),c=e(2).Promise,l(l.S+l.F*!S,"Promise",{reject:function(t){var n=k(this);return(0,n.reject)(t),n.promise}}),l(l.S+l.F*(u||!S),"Promise",{resolve:function(t){return w(u&&this===c?O:this,t)}}),l(l.S+l.F*!(S&&e(41)(function(t){O.all(t).catch(L)})),"Promise",{all:function(t){var n=this,e=k(n),r=e.resolve,o=e.reject,i=b(function(){var e=[],i=0,c=1;d(t,!1,function(t){var u=i++,a=!1;e.push(void 0),c++,n.resolve(t).then(function(t){a||(a=!0,e[u]=t,--c||r(e))},o)}),--c||r(e)});return i.e&&o(i.v),e.promise},race:function(t){var n=this,e=k(n),r=e.reject,o=b(function(){d(t,!1,function(t){n.resolve(t).then(e.resolve,r)})});return o.e&&r(o.v),e.promise}})},function(t,n){t.exports=function(t,n,e,r){if(!(t instanceof n)||void 0!==r&&r in t)throw TypeError(e+": incorrect invocation!");return t}},function(t,n,e){var r=e(8),o=e(34),i=e(35),c=e(3),u=e(19),a=e(36),s={},f={},n=t.exports=function(t,n,e,l,p){var h,v,d,y,m=p?function(){return t}:a(t),_=r(e,l,n?2:1),g=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(i(m)){for(h=u(t.length);h>g;g++)if((y=n?_(c(v=t[g])[0],v[1]):_(t[g]))===s||y===f)return y}else for(d=m.call(t);!(v=d.next()).done;)if((y=o(d,_,v.value,n))===s||y===f)return y};n.BREAK=s,n.RETURN=f},function(t,n){t.exports=function(t,n,e){var r=void 0===e;switch(n.length){case 0:return r?t():t.call(e);case 1:return r?t(n[0]):t.call(e,n[0]);case 2:return r?t(n[0],n[1]):t.call(e,n[0],n[1]);case 3:return r?t(n[0],n[1],n[2]):t.call(e,n[0],n[1],n[2]);case 4:return r?t(n[0],n[1],n[2],n[3]):t.call(e,n[0],n[1],n[2],n[3])}return t.apply(e,n)}},function(t,n,e){var r=e(0),o=e(38).set,i=r.MutationObserver||r.WebKitMutationObserver,c=r.process,u=r.Promise,a="process"==e(13)(c);t.exports=function(){var t,n,e,s=function(){var r,o;for(a&&(r=c.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?e():n=void 0,r}}n=void 0,r&&r.enter()};if(a)e=function(){c.nextTick(s)};else if(!i||r.navigator&&r.navigator.standalone)if(u&&u.resolve){var f=u.resolve();e=function(){f.then(s)}}else e=function(){o.call(r,s)};else{var l=!0,p=document.createTextNode("");new i(s).observe(p,{characterData:!0}),e=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};n&&(n.next=o),t||(t=o,e()),n=o}}},function(t,n,e){var r=e(5);t.exports=function(t,n,e){for(var o in n)e&&t[o]?t[o]=n[o]:r(t,o,n[o]);return t}},function(t,n,e){"use strict";var r=e(0),o=e(2),i=e(6),c=e(7),u=e(1)("species");t.exports=function(t){var n="function"==typeof o[t]?o[t]:r[t];c&&n&&!n[u]&&i.f(n,u,{configurable:!0,get:function(){return this}})}},function(t,n,e){"use strict";var r=e(4),o=e(2),i=e(0),c=e(37),u=e(40);r(r.P+r.R,"Promise",{finally:function(t){var n=c(this,o.Promise||i.Promise),e="function"==typeof t;return this.then(e?function(e){return u(n,t()).then(function(){return e})}:t,e?function(e){return u(n,t()).then(function(){throw e})}:t)}})},function(t,n,e){"use strict";var r=e(4),o=e(22),i=e(39);r(r.S,"Promise",{try:function(t){var n=o.f(this),e=i(t);return(e.e?n.reject:n.resolve)(e.v),n.promise}})},function(t,n,e){t.exports={default:e(75),__esModule:!0}},function(t,n,e){e(24),e(76),t.exports=e(2).Array.from},function(t,n,e){"use strict";var r=e(8),o=e(4),i=e(32),c=e(34),u=e(35),a=e(19),s=e(77),f=e(36);o(o.S+o.F*!e(41)(function(t){Array.from(t)}),"Array",{from:function(t){var n,e,o,l,p=i(t),h="function"==typeof this?this:Array,v=arguments.length,d=v>1?arguments[1]:void 0,y=void 0!==d,m=0,_=f(p);if(y&&(d=r(d,v>2?arguments[2]:void 0,2)),void 0==_||h==Array&&u(_))for(n=a(p.length),e=new h(n);n>m;m++)s(e,m,y?d(p[m],m):p[m]);else for(l=_.call(p),e=new h;!(o=l.next()).done;m++)s(e,m,y?c(l,d,[o.value,m],!0):o.value);return e.length=m,e}})},function(t,n,e){"use strict";var r=e(6),o=e(17);t.exports=function(t,n,e){n in t?r.f(t,n,o(0,e)):t[n]=e}},function(t,n,e){t.exports=e(79)},function(t,n,e){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=e(80),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,n){!function(n){"use strict";function e(t,n,e,r){var i=n&&n.prototype instanceof o?n:o,c=Object.create(i.prototype),u=new h(r||[]);return c._invoke=s(t,e,u),c}function r(t,n,e){try{return{type:"normal",arg:t.call(n,e)}}catch(t){return{type:"throw",arg:t}}}function o(){}function i(){}function c(){}function u(t){["next","throw","return"].forEach(function(n){t[n]=function(t){return this._invoke(n,t)}})}function a(t){function n(e,o,i,c){var u=r(t[e],t,o);if("throw"!==u.type){var a=u.arg,s=a.value;return s&&"object"==typeof s&&_.call(s,"__await")?Promise.resolve(s.__await).then(function(t){n("next",t,i,c)},function(t){n("throw",t,i,c)}):Promise.resolve(s).then(function(t){a.value=t,i(a)},c)}c(u.arg)}function e(t,e){function r(){return new Promise(function(r,o){n(t,e,r,o)})}return o=o?o.then(r,r):r()}var o;this._invoke=e}function s(t,n,e){var o=E;return function(i,c){if(o===k)throw new Error("Generator is already running");if(o===S){if("throw"===i)throw c;return d()}for(e.method=i,e.arg=c;;){var u=e.delegate;if(u){var a=f(u,e);if(a){if(a===P)continue;return a}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(o===E)throw o=S,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);o=k;var s=r(t,n,e);if("normal"===s.type){if(o=e.done?S:L,s.arg===P)continue;return{value:s.arg,done:e.done}}"throw"===s.type&&(o=S,e.method="throw",e.arg=s.arg)}}}function f(t,n){var e=t.iterator[n.method];if(e===y){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=y,f(t,n),"throw"===n.method))return P;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return P}var o=r(e,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,P;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=y),n.delegate=null,P):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,P)}function l(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function p(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function h(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(l,this),this.reset(!0)}function v(t){if(t){var n=t[b];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,r=function n(){for(;++e<t.length;)if(_.call(t,e))return n.value=t[e],n.done=!1,n;return n.value=y,n.done=!0,n};return r.next=r}}return{next:d}}function d(){return{value:y,done:!0}}var y,m=Object.prototype,_=m.hasOwnProperty,g="function"==typeof Symbol?Symbol:{},b=g.iterator||"@@iterator",w=g.asyncIterator||"@@asyncIterator",x=g.toStringTag||"@@toStringTag",j="object"==typeof t,O=n.regeneratorRuntime;if(O)return void(j&&(t.exports=O));O=n.regeneratorRuntime=j?t.exports:{},O.wrap=e;var E="suspendedStart",L="suspendedYield",k="executing",S="completed",P={},T={};T[b]=function(){return this};var A=Object.getPrototypeOf,M=A&&A(A(v([])));M&&M!==m&&_.call(M,b)&&(T=M);var C=c.prototype=o.prototype=Object.create(T);i.prototype=C.constructor=c,c.constructor=i,c[x]=i.displayName="GeneratorFunction",O.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===i||"GeneratorFunction"===(n.displayName||n.name))},O.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,x in t||(t[x]="GeneratorFunction")),t.prototype=Object.create(C),t},O.awrap=function(t){return{__await:t}},u(a.prototype),a.prototype[w]=function(){return this},O.AsyncIterator=a,O.async=function(t,n,r,o){var i=new a(e(t,n,r,o));return O.isGeneratorFunction(n)?i:i.next().then(function(t){return t.done?t.value:i.next()})},u(C),C[x]="Generator",C[b]=function(){return this},C.toString=function(){return"[object Generator]"},O.keys=function(t){var n=[];for(var e in t)n.push(e);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},O.values=v,h.prototype={constructor:h,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=y,this.done=!1,this.delegate=null,this.method="next",this.arg=y,this.tryEntries.forEach(p),!t)for(var n in this)"t"===n.charAt(0)&&_.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=y)},stop:function(){this.done=!0;var t=this.tryEntries[0],n=t.completion;if("throw"===n.type)throw n.arg;return this.rval},dispatchException:function(t){function n(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=y),!!r}if(this.done)throw t;for(var e=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=_.call(o,"catchLoc"),u=_.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,n){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc<=this.prev&&_.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=n&&n<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=n,o?(this.method="next",this.next=o.finallyLoc,P):this.complete(i)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),P},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),p(e),P}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var o=r.arg;p(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,e){return this.delegate={iterator:v(t),resultName:n,nextLoc:e},"next"===this.method&&(this.arg=y),P}}}(function(){return this}()||Function("return this")())},function(t,n,e){"use strict";n.__esModule=!0;var r=e(23),o=function(t){return t&&t.__esModule?t:{default:t}}(r);n.default=function(t){return function(){var n=t.apply(this,arguments);return new o.default(function(t,e){function r(i,c){try{var u=n[i](c),a=u.value}catch(t){return void e(t)}if(!u.done)return o.default.resolve(a).then(function(t){r("next",t)},function(t){r("throw",t)});t(a)}return r("next")})}}},function(t,n,e){t.exports={default:e(83),__esModule:!0}},function(t,n,e){e(84);var r=e(2).Object;t.exports=function(t,n,e){return r.defineProperty(t,n,e)}},function(t,n,e){var r=e(4);r(r.S+r.F*!e(7),"Object",{defineProperty:e(6).f})},function(t,n,e){"use strict";var r=e(86),o=e.n(r),i={labels:{tip:"Tip",info:"Info",success:"Success",warning:"Attention",alert:"Error",async:"Loading",confirm:"Confirmation required"},icons:{tip:"question-circle",info:"info-circle",success:"check-circle",warning:"exclamation-circle",alert:"warning",async:"cog fa-spin",confirm:"warning",template:{prefix:"<span><i class='fa fa-fw fa-",suffix:"'></i></span>"},enabled:!0},replacements:{tip:null,info:null,success:null,warning:null,alert:null,async:null,confirm:null,general:{"<script>":"","<\/script>":""}},confirm:{successBtnLabel:"OK",cancelBtnLabel:"Cancel"},maxNotifications:10,asyncDefaultMessage:"Please, wait...",animationDuration:300,position:"bottom-right",duration:5e3};n.a=function(t){return o()(t,i)}},function(t,n,e){(function(t,e){function r(t,n){return t.set(n[0],n[1]),t}function o(t,n){return t.add(n),t}function i(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function c(t,n){for(var e=-1,r=t?t.length:0;++e<r&&!1!==n(t[e],e,t););return t}function u(t,n){for(var e=-1,r=n.length,o=t.length;++e<r;)t[o+e]=n[e];return t}function a(t,n,e,r){var o=-1,i=t?t.length:0;for(r&&i&&(e=t[++o]);++o<i;)e=n(e,t[o],o,t);return e}function s(t,n){for(var e=-1,r=Array(t);++e<t;)r[e]=n(e);return r}function f(t,n){return null==t?void 0:t[n]}function l(t){var n=!1;if(null!=t&&"function"!=typeof t.toString)try{n=!!(t+"")}catch(t){}return n}function p(t){var n=-1,e=Array(t.size);return t.forEach(function(t,r){e[++n]=[r,t]}),e}function h(t,n){return function(e){return t(n(e))}}function v(t){var n=-1,e=Array(t.size);return t.forEach(function(t){e[++n]=t}),e}function d(t){var n=-1,e=t?t.length:0;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function y(){this.__data__=ne?ne(null):{}}function m(t){return this.has(t)&&delete this.__data__[t]}function _(t){var n=this.__data__;if(ne){var e=n[t];return e===Ut?void 0:e}return In.call(n,t)?n[t]:void 0}function g(t){var n=this.__data__;return ne?void 0!==n[t]:In.call(n,t)}function b(t,n){return this.__data__[t]=ne&&void 0===n?Ut:n,this}function w(t){var n=-1,e=t?t.length:0;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function x(){this.__data__=[]}function j(t){var n=this.__data__,e=V(n,t);return!(e<0)&&(e==n.length-1?n.pop():Hn.call(n,e,1),!0)}function O(t){var n=this.__data__,e=V(n,t);return e<0?void 0:n[e][1]}function E(t){return V(this.__data__,t)>-1}function L(t,n){var e=this.__data__,r=V(e,t);return r<0?e.push([t,n]):e[r][1]=n,this}function k(t){var n=-1,e=t?t.length:0;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function S(){this.__data__={hash:new d,map:new(Qn||w),string:new d}}function P(t){return ht(this,t).delete(t)}function T(t){return ht(this,t).get(t)}function A(t){return ht(this,t).has(t)}function M(t,n){return ht(this,t).set(t,n),this}function C(t){this.__data__=new w(t)}function N(){this.__data__=new w}function I(t){return this.__data__.delete(t)}function R(t){return this.__data__.get(t)}function F(t){return this.__data__.has(t)}function D(t,n){var e=this.__data__;if(e instanceof w){var r=e.__data__;if(!Qn||r.length<Gt-1)return r.push([t,n]),this;e=this.__data__=new k(r)}return e.set(t,n),this}function B(t,n){var e=le(t)||kt(t)?s(t.length,String):[],r=e.length,o=!!r;for(var i in t)!n&&!In.call(t,i)||o&&("length"==i||_t(i,r))||e.push(i);return e}function G(t,n,e){(void 0===e||Lt(t[n],e))&&("number"!=typeof n||void 0!==e||n in t)||(t[n]=e)}function U(t,n,e){var r=t[n];In.call(t,n)&&Lt(r,e)&&(void 0!==e||n in t)||(t[n]=e)}function V(t,n){for(var e=t.length;e--;)if(Lt(t[e][0],n))return e;return-1}function W(t,n){return t&&ft(n,Rt(n),t)}function $(t,n,e,r,o,i,u){var a;if(r&&(a=i?r(t,o,i,u):r(t)),void 0!==a)return a;if(!Mt(t))return t;var s=le(t);if(s){if(a=dt(t),!n)return st(t,a)}else{var f=fe(t),p=f==qt||f==zt;if(pe(t))return nt(t,n);if(f==Jt||f==Wt||p&&!i){if(l(t))return i?t:{};if(a=yt(p?{}:t),!n)return lt(t,W(a,t))}else{if(!gn[f])return i?t:{};a=mt(t,f,$,n)}}u||(u=new C);var h=u.get(t);if(h)return h;if(u.set(t,a),!s)var v=e?pt(t):Rt(t);return c(v||t,function(o,i){v&&(i=o,o=t[i]),U(a,i,$(o,n,e,r,i,t,u))}),a}function H(t){return Mt(t)?Wn(t):{}}function q(t,n,e){var r=n(t);return le(t)?r:u(r,e(t))}function z(t){return Fn.call(t)}function K(t){return!(!Mt(t)||wt(t))&&(Tt(t)||l(t)?Dn:yn).test(Et(t))}function Y(t){return Ct(t)&&At(t.length)&&!!_n[Fn.call(t)]}function J(t){if(!xt(t))return Kn(t);var n=[];for(var e in Object(t))In.call(t,e)&&"constructor"!=e&&n.push(e);return n}function Q(t){if(!Mt(t))return Ot(t);var n=xt(t),e=[];for(var r in t)("constructor"!=r||!n&&In.call(t,r))&&e.push(r);return e}function X(t,n,e,r,o){if(t!==n){if(!le(n)&&!he(n))var i=Q(n);c(i||n,function(c,u){if(i&&(u=c,c=n[u]),Mt(c))o||(o=new C),Z(t,n,u,e,X,r,o);else{var a=r?r(t[u],c,u+"",t,n,o):void 0;void 0===a&&(a=c),G(t,u,a)}})}}function Z(t,n,e,r,o,i,c){var u=t[e],a=n[e],s=c.get(a);if(s)return void G(t,e,s);var f=i?i(u,a,e+"",t,n,c):void 0,l=void 0===f;l&&(f=a,le(a)||he(a)?le(u)?f=u:Pt(u)?f=st(u):(l=!1,f=$(a,!0)):Nt(a)||kt(a)?kt(u)?f=It(u):!Mt(u)||r&&Tt(u)?(l=!1,f=$(a,!0)):f=u:l=!1),l&&(c.set(a,f),o(f,a,r,i,c),c.delete(a)),G(t,e,f)}function tt(t,n){return n=Yn(void 0===n?t.length-1:n,0),function(){for(var e=arguments,r=-1,o=Yn(e.length-n,0),c=Array(o);++r<o;)c[r]=e[n+r];r=-1;for(var u=Array(n+1);++r<n;)u[r]=e[r];return u[n]=c,i(t,this,u)}}function nt(t,n){if(n)return t.slice();var e=new t.constructor(t.length);return t.copy(e),e}function et(t){var n=new t.constructor(t.byteLength);return new Un(n).set(new Un(t)),n}function rt(t,n){var e=n?et(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}function ot(t,n,e){return a(n?e(p(t),!0):p(t),r,new t.constructor)}function it(t){var n=new t.constructor(t.source,dn.exec(t));return n.lastIndex=t.lastIndex,n}function ct(t,n,e){return a(n?e(v(t),!0):v(t),o,new t.constructor)}function ut(t){return ae?Object(ae.call(t)):{}}function at(t,n){var e=n?et(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function st(t,n){var e=-1,r=t.length;for(n||(n=Array(r));++e<r;)n[e]=t[e];return n}function ft(t,n,e,r){e||(e={});for(var o=-1,i=n.length;++o<i;){var c=n[o],u=r?r(e[c],t[c],c,e,t):void 0;U(e,c,void 0===u?t[c]:u)}return e}function lt(t,n){return ft(t,se(t),n)}function pt(t){return q(t,Rt,se)}function ht(t,n){var e=t.__data__;return bt(n)?e["string"==typeof n?"string":"hash"]:e.map}function vt(t,n){var e=f(t,n);return K(e)?e:void 0}function dt(t){var n=t.length,e=t.constructor(n);return n&&"string"==typeof t[0]&&In.call(t,"index")&&(e.index=t.index,e.input=t.input),e}function yt(t){return"function"!=typeof t.constructor||xt(t)?{}:H(Vn(t))}function mt(t,n,e,r){var o=t.constructor;switch(n){case en:return et(t);case $t:case Ht:return new o(+t);case rn:return rt(t,r);case on:case cn:case un:case an:case sn:case fn:case ln:case pn:case hn:return at(t,r);case Kt:return ot(t,r,e);case Yt:case Zt:return new o(t);case Qt:return it(t);case Xt:return ct(t,r,e);case tn:return ut(t)}}function _t(t,n){return!!(n=null==n?Vt:n)&&("number"==typeof t||mn.test(t))&&t>-1&&t%1==0&&t<n}function gt(t,n,e){if(!Mt(e))return!1;var r=typeof n;return!!("number"==r?St(e)&&_t(n,e.length):"string"==r&&n in e)&&Lt(e[n],t)}function bt(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}function wt(t){return!!Cn&&Cn in t}function xt(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||An)}function jt(t,n,e,r,o,i){return Mt(t)&&Mt(n)&&(i.set(n,t),X(t,n,void 0,jt,i),i.delete(n)),t}function Ot(t){var n=[];if(null!=t)for(var e in Object(t))n.push(e);return n}function Et(t){if(null!=t){try{return Nn.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Lt(t,n){return t===n||t!==t&&n!==n}function kt(t){return Pt(t)&&In.call(t,"callee")&&(!$n.call(t,"callee")||Fn.call(t)==Wt)}function St(t){return null!=t&&At(t.length)&&!Tt(t)}function Pt(t){return Ct(t)&&St(t)}function Tt(t){var n=Mt(t)?Fn.call(t):"";return n==qt||n==zt}function At(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Vt}function Mt(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function Ct(t){return!!t&&"object"==typeof t}function Nt(t){if(!Ct(t)||Fn.call(t)!=Jt||l(t))return!1;var n=Vn(t);if(null===n)return!0;var e=In.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&Nn.call(e)==Rn}function It(t){return ft(t,Ft(t))}function Rt(t){return St(t)?B(t):J(t)}function Ft(t){return St(t)?B(t,!0):Q(t)}function Dt(){return[]}function Bt(){return!1}var Gt=200,Ut="__lodash_hash_undefined__",Vt=9007199254740991,Wt="[object Arguments]",$t="[object Boolean]",Ht="[object Date]",qt="[object Function]",zt="[object GeneratorFunction]",Kt="[object Map]",Yt="[object Number]",Jt="[object Object]",Qt="[object RegExp]",Xt="[object Set]",Zt="[object String]",tn="[object Symbol]",nn="[object WeakMap]",en="[object ArrayBuffer]",rn="[object DataView]",on="[object Float32Array]",cn="[object Float64Array]",un="[object Int8Array]",an="[object Int16Array]",sn="[object Int32Array]",fn="[object Uint8Array]",ln="[object Uint8ClampedArray]",pn="[object Uint16Array]",hn="[object Uint32Array]",vn=/[\\^$.*+?()[\]{}|]/g,dn=/\w*$/,yn=/^\[object .+?Constructor\]$/,mn=/^(?:0|[1-9]\d*)$/,_n={};_n[on]=_n[cn]=_n[un]=_n[an]=_n[sn]=_n[fn]=_n[ln]=_n[pn]=_n[hn]=!0,_n[Wt]=_n["[object Array]"]=_n[en]=_n[$t]=_n[rn]=_n[Ht]=_n["[object Error]"]=_n[qt]=_n[Kt]=_n[Yt]=_n[Jt]=_n[Qt]=_n[Xt]=_n[Zt]=_n[nn]=!1;var gn={};gn[Wt]=gn["[object Array]"]=gn[en]=gn[rn]=gn[$t]=gn[Ht]=gn[on]=gn[cn]=gn[un]=gn[an]=gn[sn]=gn[Kt]=gn[Yt]=gn[Jt]=gn[Qt]=gn[Xt]=gn[Zt]=gn[tn]=gn[fn]=gn[ln]=gn[pn]=gn[hn]=!0,gn["[object Error]"]=gn[qt]=gn[nn]=!1;var bn="object"==typeof t&&t&&t.Object===Object&&t,wn="object"==typeof self&&self&&self.Object===Object&&self,xn=bn||wn||Function("return this")(),jn="object"==typeof n&&n&&!n.nodeType&&n,On=jn&&"object"==typeof e&&e&&!e.nodeType&&e,En=On&&On.exports===jn,Ln=En&&bn.process,kn=function(){try{return Ln&&Ln.binding("util")}catch(t){}}(),Sn=kn&&kn.isTypedArray,Pn=Array.prototype,Tn=Function.prototype,An=Object.prototype,Mn=xn["__core-js_shared__"],Cn=function(){var t=/[^.]+$/.exec(Mn&&Mn.keys&&Mn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Nn=Tn.toString,In=An.hasOwnProperty,Rn=Nn.call(Object),Fn=An.toString,Dn=RegExp("^"+Nn.call(In).replace(vn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bn=En?xn.Buffer:void 0,Gn=xn.Symbol,Un=xn.Uint8Array,Vn=h(Object.getPrototypeOf,Object),Wn=Object.create,$n=An.propertyIsEnumerable,Hn=Pn.splice,qn=Object.getOwnPropertySymbols,zn=Bn?Bn.isBuffer:void 0,Kn=h(Object.keys,Object),Yn=Math.max,Jn=vt(xn,"DataView"),Qn=vt(xn,"Map"),Xn=vt(xn,"Promise"),Zn=vt(xn,"Set"),te=vt(xn,"WeakMap"),ne=vt(Object,"create"),ee=Et(Jn),re=Et(Qn),oe=Et(Xn),ie=Et(Zn),ce=Et(te),ue=Gn?Gn.prototype:void 0,ae=ue?ue.valueOf:void 0;d.prototype.clear=y,d.prototype.delete=m,d.prototype.get=_,d.prototype.has=g,d.prototype.set=b,w.prototype.clear=x,w.prototype.delete=j,w.prototype.get=O,w.prototype.has=E,w.prototype.set=L,k.prototype.clear=S,k.prototype.delete=P,k.prototype.get=T,k.prototype.has=A,k.prototype.set=M,C.prototype.clear=N,C.prototype.delete=I,C.prototype.get=R,C.prototype.has=F,C.prototype.set=D;var se=qn?h(qn,Object):Dt,fe=z;(Jn&&fe(new Jn(new ArrayBuffer(1)))!=rn||Qn&&fe(new Qn)!=Kt||Xn&&"[object Promise]"!=fe(Xn.resolve())||Zn&&fe(new Zn)!=Xt||te&&fe(new te)!=nn)&&(fe=function(t){var n=Fn.call(t),e=n==Jt?t.constructor:void 0,r=e?Et(e):void 0;if(r)switch(r){case ee:return rn;case re:return Kt;case oe:return"[object Promise]";case ie:return Xt;case ce:return nn}return n});var le=Array.isArray,pe=zn||Bt,he=Sn?function(t){return function(n){return t(n)}}(Sn):Y,ve=tt(function(t){return t.push(void 0,jt),i(de,void 0,t)}),de=function(t){return tt(function(n,e){var r=-1,o=e.length,i=o>1?e[o-1]:void 0,c=o>2?e[2]:void 0;for(i=t.length>3&&"function"==typeof i?(o--,i):void 0,c&&gt(e[0],e[1],c)&&(i=o<3?void 0:i,o=1),n=Object(n);++r<o;){var u=e[r];u&&t(n,u,r,i)}return n})}(function(t,n,e,r){X(t,n,e,r)});e.exports=ve}).call(n,e(87),e(88)(t))},function(t,n){var e;e=function(){return this}();try{e=e||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,n,e){"use strict";var r=e(42),o=e.n(r),i=e(43),c=e.n(i),u=function(){function t(n,e){o()(this,t),this.callback=n,this.remaining=e,this.resume()}return c()(t,[{key:"pause",value:function(){window.clearTimeout(this.timerId),this.remaining-=new Date-this.start}},{key:"resume",value:function(){var t=this;this.start=new Date,window.clearTimeout(this.timerId),this.timerId=window.setTimeout(function(){window.clearTimeout(t.timerId),t.callback()},this.remaining)}}]),t}();n.a=u}])});
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.AWN=n():t.AWN=n()}("undefined"!=typeof self?self:this,function(){return function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var e={};return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},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,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=66)}([function(t,n){var e=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=e)},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n,e){var r=e(35)("wks"),o=e(21),i=e(1).Symbol,u="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=u&&i[t]||(u?i:o)("Symbol."+t))}).store=r},function(t,n,e){var r=e(1),o=e(0),i=e(10),u=e(8),c=function(t,n,e){var s,a,f,l=t&c.F,p=t&c.G,d=t&c.S,h=t&c.P,v=t&c.B,y=t&c.W,m=p?o:o[n]||(o[n]={}),_=m.prototype,b=p?r:d?r[n]:(r[n]||{}).prototype;p&&(e=n);for(s in e)(a=!l&&b&&void 0!==b[s])&&s in m||(f=a?b[s]:e[s],m[s]=p&&"function"!=typeof b[s]?e[s]:v&&a?i(f,r):y&&b[s]==f?function(t){var n=function(n,e,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e)}return new t(n,e,r)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(f):h&&"function"==typeof f?i(Function.call,f):f,h&&((m.virtual||(m.virtual={}))[s]=f,t&c.R&&_&&!_[s]&&u(_,s,f)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,n,e){var r=e(5),o=e(43),i=e(31),u=Object.defineProperty;n.f=e(7)?Object.defineProperty:function(t,n,e){if(r(t),n=i(n,!0),r(e),o)try{return u(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(6);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,e){t.exports=!e(11)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(4),o=e(15);t.exports=e(7)?function(t,n,e){return r.f(t,n,o(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){var r=e(19);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,e){var r=e(46),o=e(29);t.exports=function(t){return r(o(t))}},function(t,n,e){"use strict";n.__esModule=!0,n.default=function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}},function(t,n,e){"use strict";n.__esModule=!0;var r=e(87),o=function(t){return t&&t.__esModule?t:{default:t}}(r);n.default=function(){function t(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,o.default)(t,r.key,r)}}return function(n,e,r){return e&&t(n.prototype,e),r&&t(n,r),n}}()},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n){t.exports={}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n){t.exports=!0},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,e){var r=e(45),o=e(36);t.exports=Object.keys||function(t){return r(t,o)}},function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},function(t,n,e){var r=e(4).f,o=e(9),i=e(2)("toStringTag");t.exports=function(t,n,e){t&&!o(t=e?t:t.prototype,i)&&r(t,i,{configurable:!0,value:n})}},function(t,n,e){var r=e(29);t.exports=function(t){return Object(r(t))}},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={modal:"awn-modal",toast:"awn-toast",btn:"awn-btn",confirm:"awn-confirm"};n.tConsts={prefix:r.toast,klass:{label:r.toast+"-label",content:r.toast+"-content",icon:r.toast+"-icon",progressBar:r.toast+"-progress-bar",progressBarPause:r.toast+"-progress-bar-paused"},ids:{container:r.toast+"-container"}},n.mConsts={prefix:r.modal,klass:{buttons:"awn-buttons",button:r.btn,successBtn:r.btn+"-success",cancelBtn:r.btn+"-cancel",title:r.modal+"-title",body:r.modal+"-body",content:r.modal+"-content",dotAnimation:r.modal+"-loading-dots"},ids:{wrapper:r.modal+"-wrapper",confirmOk:r.confirm+"-ok",confirmCancel:r.confirm+"-cancel"}},n.eConsts={klass:{hiding:"awn-hiding"},lib:"awn"}},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var o=e(68),i=r(o),u=e(78),c=r(u),s="function"==typeof c.default&&"symbol"==typeof i.default?function(t){return typeof t}:function(t){return t&&"function"==typeof c.default&&t.constructor===c.default&&t!==c.default.prototype?"symbol":typeof t};n.default="function"==typeof c.default&&"symbol"===s(i.default)?function(t){return void 0===t?"undefined":s(t)}:function(t){return t&&"function"==typeof c.default&&t.constructor===c.default&&t!==c.default.prototype?"symbol":void 0===t?"undefined":s(t)}},function(t,n,e){"use strict";var r=e(70)(!0);e(42)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,n=this._t,e=this._i;return e>=n.length?{value:void 0,done:!0}:(t=r(n,e),this._i+=t.length,{value:t,done:!1})})},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,e){var r=e(6),o=e(1).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n,e){var r=e(6);t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n,e){var r=e(5),o=e(72),i=e(36),u=e(34)("IE_PROTO"),c=function(){},s=function(){var t,n=e(30)("iframe"),r=i.length;for(n.style.display="none",e(47).appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),s=t.F;r--;)delete s.prototype[i[r]];return s()};t.exports=Object.create||function(t,n){var e;return null!==t?(c.prototype=r(t),e=new c,c.prototype=null,e[u]=t):e=s(),void 0===n?e:o(e,n)}},function(t,n,e){var r=e(28),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,n,e){var r=e(35)("keys"),o=e(21);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,n,e){var r=e(1),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,e){n.f=e(2)},function(t,n,e){var r=e(1),o=e(0),i=e(18),u=e(37),c=e(4).f;t.exports=function(t){var n=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in n||c(n,t,{value:u.f(t)})}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(n,"__esModule",{value:!0});var o=e(61),i=r(o),u=e(13),c=r(u),s=e(14),a=r(s),f=e(25),l=function(){function t(n,e,r,o,i){var u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"div";(0,c.default)(this,t),this.newNode=document.createElement(u),e&&(this.newNode.id=e),r&&(this.newNode.className=r),i&&(this.newNode.innerHTML=i),o&&(this.newNode.style.cssText=o),this.parent=n,this.options={}}return(0,a.default)(t,[{key:"fire",value:function(t){return t?t.replace(this.newNode,this.type):this.insert()}},{key:"beforeInsert",value:function(){}},{key:"insert",value:function(){this.beforeInsert(),this.el=this.parent.appendChild(this.newNode),this.afterInsert()}},{key:"replace",value:function(t,n){var e=this;if(this.getElement())return this.beforeDelete().then(function(){e.type=n,e.parent.replaceChild(t,e.el),e.el=document.getElementById(t.id),e.afterInsert()})}},{key:"afterInsert",value:function(){}},{key:"beforeDelete",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el;return new i.default(function(e,r){n.classList.add(f.eConsts.klass.hiding),setTimeout(e,t.options.animationDuration||300)})}},{key:"delete",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el;return this.getElement(n)?this.beforeDelete(n).then(function(){return t.parent.removeChild(n)}):null}},{key:"getElement",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el;return document.getElementById(t.id)}},{key:"addEvent",value:function(t,n){this.el.addEventListener(t,n)}},{key:"addClass",value:function(t){this.el.classList.add(t)}},{key:"removeClass",value:function(t){this.el.classList.remove(t)}}]),t}();n.default=l},function(t,n,e){"use strict";function r(t){var n,e;this.promise=new t(function(t,r){if(void 0!==n||void 0!==e)throw TypeError("Bad Promise constructor");n=t,e=r}),this.resolve=o(n),this.reject=o(e)}var o=e(19);t.exports.f=function(t){return new r(t)}},function(t,n,e){"use strict";var r=e(18),o=e(3),i=e(44),u=e(8),c=e(9),s=e(16),a=e(71),f=e(22),l=e(48),p=e(2)("iterator"),d=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,n,e,v,y,m,_){a(e,n,v);var b,g,w,x=function(t){if(!d&&t in S)return S[t];switch(t){case"keys":case"values":return function(){return new e(this,t)}}return function(){return new e(this,t)}},j=n+" Iterator",O="values"==y,k=!1,S=t.prototype,P=S[p]||S["@@iterator"]||y&&S[y],M=!d&&P||x(y),C=y?O?x("entries"):M:void 0,E="Array"==n?S.entries||P:P;if(E&&(w=l(E.call(new t)))!==Object.prototype&&w.next&&(f(w,j,!0),r||c(w,p)||u(w,p,h)),O&&P&&"values"!==P.name&&(k=!0,M=function(){return P.call(this)}),r&&!_||!d&&!k&&S[p]||u(S,p,M),s[n]=M,s[j]=h,y)if(b={values:O?M:x("values"),keys:m?M:x("keys"),entries:C},_)for(g in b)g in S||i(S,g,b[g]);else o(o.P+o.F*(d||k),n,b);return b}},function(t,n,e){t.exports=!e(7)&&!e(11)(function(){return 7!=Object.defineProperty(e(30)("div"),"a",{get:function(){return 7}}).a})},function(t,n,e){t.exports=e(8)},function(t,n,e){var r=e(9),o=e(12),i=e(73)(!1),u=e(34)("IE_PROTO");t.exports=function(t,n){var e,c=o(t),s=0,a=[];for(e in c)e!=u&&r(c,e)&&a.push(e);for(;n.length>s;)r(c,e=n[s++])&&(~i(a,e)||a.push(e));return a}},function(t,n,e){var r=e(17);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n,e){var r=e(1).document;t.exports=r&&r.documentElement},function(t,n,e){var r=e(9),o=e(23),i=e(34)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n,e){e(75);for(var r=e(1),o=e(8),i=e(16),u=e(2)("toStringTag"),c="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),s=0;s<c.length;s++){var a=c[s],f=r[a],l=f&&f.prototype;l&&!l[u]&&o(l,u,a),i[a]=i.Array}},function(t,n,e){var r=e(45),o=e(36).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,n,e){var r=e(24),o=e(15),i=e(12),u=e(31),c=e(9),s=e(43),a=Object.getOwnPropertyDescriptor;n.f=e(7)?a:function(t,n){if(t=i(t),n=u(n,!0),s)try{return a(t,n)}catch(t){}if(c(t,n))return o(!r.f.call(t,n),t[n])}},function(t,n){},function(t,n,e){var r=e(5);t.exports=function(t,n,e,o){try{return o?n(r(e)[0],e[1]):n(e)}catch(n){var i=t.return;throw void 0!==i&&r(i.call(t)),n}}},function(t,n,e){var r=e(16),o=e(2)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,n,e){var r=e(56),o=e(2)("iterator"),i=e(16);t.exports=e(0).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,n,e){var r=e(17),o=e(2)("toStringTag"),i="Arguments"==r(function(){return arguments}()),u=function(t,n){try{return t[n]}catch(t){}};t.exports=function(t){var n,e,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=u(n=Object(t),o))?e:i?r(n):"Object"==(c=r(n))&&"function"==typeof n.callee?"Arguments":c}},function(t,n,e){var r=e(2)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,n){if(!n&&!o)return!1;var e=!1;try{var i=[7],u=i[r]();u.next=function(){return{done:e=!0}},i[r]=function(){return u},t(i)}catch(t){}return e}},function(t,n,e){t.exports={default:e(103),__esModule:!0}},function(t,n,e){"use strict";n.__esModule=!0;var r=e(26),o=function(t){return t&&t.__esModule?t:{default:t}}(r);n.default=function(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!==(void 0===n?"undefined":(0,o.default)(n))&&"function"!=typeof n?t:n}},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var o=e(106),i=r(o),u=e(110),c=r(u),s=e(26),a=r(s);n.default=function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+(void 0===n?"undefined":(0,a.default)(n)));t.prototype=(0,c.default)(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(i.default?(0,i.default)(t,n):t.__proto__=n)}},function(t,n,e){t.exports={default:e(113),__esModule:!0}},function(t,n,e){var r=e(5),o=e(19),i=e(2)("species");t.exports=function(t,n){var e,u=r(t).constructor;return void 0===u||void 0==(e=r(u)[i])?n:o(e)}},function(t,n,e){var r,o,i,u=e(10),c=e(117),s=e(47),a=e(30),f=e(1),l=f.process,p=f.setImmediate,d=f.clearImmediate,h=f.MessageChannel,v=f.Dispatch,y=0,m={},_=function(){var t=+this;if(m.hasOwnProperty(t)){var n=m[t];delete m[t],n()}},b=function(t){_.call(t.data)};p&&d||(p=function(t){for(var n=[],e=1;arguments.length>e;)n.push(arguments[e++]);return m[++y]=function(){c("function"==typeof t?t:Function(t),n)},r(y),y},d=function(t){delete m[t]},"process"==e(17)(l)?r=function(t){l.nextTick(u(_,t,1))}:v&&v.now?r=function(t){v.now(u(_,t,1))}:h?(o=new h,i=o.port2,o.port1.onmessage=b,r=u(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",b,!1)):r="onreadystatechange"in a("script")?function(t){s.appendChild(a("script")).onreadystatechange=function(){s.removeChild(this),_.call(t)}}:function(t){setTimeout(u(_,t,1),0)}),t.exports={set:p,clear:d}},function(t,n){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,n,e){var r=e(5),o=e(6),i=e(41);t.exports=function(t,n){if(r(t),o(n)&&n.constructor===t)return n;var e=i.f(t);return(0,e.resolve)(n),e.promise}},function(t,n,e){t.exports=e(67)},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(n,"__esModule",{value:!0});var o=e(26),i=r(o),u=e(13),c=r(u),s=e(14),a=r(s),f=e(90),l=r(f),p=e(98),d=r(p),h=e(124),v=r(h),y=e(40),m=r(y),_=e(25),b=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,c.default)(this,t),this.options=new l.default(n)}return(0,a.default)(t,[{key:"_err",value:function(t){throw Error(t)}},{key:"tip",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._err("missing 'html' parameter");this.notify(t,"tip")}},{key:"info",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._err("missing 'html' parameter");this.notify(t,"info")}},{key:"success",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._err("missing 'html' parameter");this.notify(t,"success")}},{key:"warning",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._err("missing 'html' parameter");this.notify(t,"warning")}},{key:"alert",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._err("missing 'html' parameter");this.notify(t,"alert")}},{key:"async",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._err("missing 'promise' parameter"),n=arguments[1],e=this,r=arguments[2],o=arguments[3],i=this.notify(o,"async");return t.then(function(t){return e._runFunction(!0,n,t,i)},function(t){return e._runFunction(!1,r,t,i)})}},{key:"notify",value:function(t,n,e){var r=new d.default(t,n,this.options,this._getContainer());return r.fire(e),r}},{key:"confirm",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._err("missing 'html' parameter"),n=this,e=arguments[1],r=arguments[2],o=new v.default(t,"confirm",this.options);o.addEvent("click",function(t){if("BUTTON"!==t.target.nodeName)return!1;switch(o.delete(),t.target.id){case _.mConsts.ids.confirmOk:return n._runFunction(!0,e);case _.mConsts.ids.confirmCancel:return n._runFunction(!0,r)}})}},{key:"asyncBlock",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._err("missing 'promise' parameter"),n=arguments[1],e=this,r=arguments[2],o=arguments[3],i=new v.default(o,"async-block",this.options),u=Date.now();return t.then(function(t){i.hideAsync(u).then(function(){return e._runFunction(!0,n,t)})},function(t){i.hideAsync(u).then(function(){return e._runFunction(!1,r,t)})})}},{key:"modal",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._err("missing 'html' parameter"),n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._err("missing className parameter"),e=new v.default(t,n,this.options);e.addEvent("click",function(t){t.target.id===e.el.id&&e.delete()})}},{key:"_getContainer",value:function(){return this.container||(this.container=document.getElementById(_.tConsts.ids.container)||this._createContainer()),this.container}},{key:"_createContainer",value:function(){var t=this.options.position.split("-"),n="top"===t[0]?_.eConsts.lib+"-top":"";"left"===t[1]&&(n=n+" "+_.eConsts.lib+"-left");var e=new m.default(document.body,_.tConsts.ids.container,n);return e.insert(),e.el}},{key:"_runFunction",value:function(t,n,e,r){switch(void 0===n?"undefined":(0,i.default)(n)){case"function":return func(e);case"string":return t?this.notify(n,"success",r):n,e}t||this.notify(e,"alert",r)}}]),t}();n.default=b},function(t,n,e){t.exports={default:e(69),__esModule:!0}},function(t,n,e){e(27),e(49),t.exports=e(37).f("iterator")},function(t,n,e){var r=e(28),o=e(29);t.exports=function(t){return function(n,e){var i,u,c=String(o(n)),s=r(e),a=c.length;return s<0||s>=a?t?"":void 0:(i=c.charCodeAt(s),i<55296||i>56319||s+1===a||(u=c.charCodeAt(s+1))<56320||u>57343?t?c.charAt(s):i:t?c.slice(s,s+2):u-56320+(i-55296<<10)+65536)}}},function(t,n,e){"use strict";var r=e(32),o=e(15),i=e(22),u={};e(8)(u,e(2)("iterator"),function(){return this}),t.exports=function(t,n,e){t.prototype=r(u,{next:o(1,e)}),i(t,n+" Iterator")}},function(t,n,e){var r=e(4),o=e(5),i=e(20);t.exports=e(7)?Object.defineProperties:function(t,n){o(t);for(var e,u=i(n),c=u.length,s=0;c>s;)r.f(t,e=u[s++],n[e]);return t}},function(t,n,e){var r=e(12),o=e(33),i=e(74);t.exports=function(t){return function(n,e,u){var c,s=r(n),a=o(s.length),f=i(u,a);if(t&&e!=e){for(;a>f;)if((c=s[f++])!=c)return!0}else for(;a>f;f++)if((t||f in s)&&s[f]===e)return t||f||0;return!t&&-1}}},function(t,n,e){var r=e(28),o=Math.max,i=Math.min;t.exports=function(t,n){return t=r(t),t<0?o(t+n,0):i(t,n)}},function(t,n,e){"use strict";var r=e(76),o=e(77),i=e(16),u=e(12);t.exports=e(42)(Array,"Array",function(t,n){this._t=u(t),this._i=0,this._k=n},function(){var t=this._t,n=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,o(1)):"keys"==n?o(0,e):"values"==n?o(0,t[e]):o(0,[e,t[e]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,n){t.exports=function(){}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,e){t.exports={default:e(79),__esModule:!0}},function(t,n,e){e(80),e(52),e(85),e(86),t.exports=e(0).Symbol},function(t,n,e){"use strict";var r=e(1),o=e(9),i=e(7),u=e(3),c=e(44),s=e(81).KEY,a=e(11),f=e(35),l=e(22),p=e(21),d=e(2),h=e(37),v=e(38),y=e(82),m=e(83),_=e(5),b=e(6),g=e(12),w=e(31),x=e(15),j=e(32),O=e(84),k=e(51),S=e(4),P=e(20),M=k.f,C=S.f,E=O.f,A=r.Symbol,T=r.JSON,L=T&&T.stringify,I=d("_hidden"),F=d("toPrimitive"),N={}.propertyIsEnumerable,D=f("symbol-registry"),B=f("symbols"),R=f("op-symbols"),W=Object.prototype,H="function"==typeof A,G=r.QObject,U=!G||!G.prototype||!G.prototype.findChild,V=i&&a(function(){return 7!=j(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a})?function(t,n,e){var r=M(W,n);r&&delete W[n],C(t,n,e),r&&t!==W&&C(W,n,r)}:C,$=function(t){var n=B[t]=j(A.prototype);return n._k=t,n},K=H&&"symbol"==typeof A.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof A},q=function(t,n,e){return t===W&&q(R,n,e),_(t),n=w(n,!0),_(e),o(B,n)?(e.enumerable?(o(t,I)&&t[I][n]&&(t[I][n]=!1),e=j(e,{enumerable:x(0,!1)})):(o(t,I)||C(t,I,x(1,{})),t[I][n]=!0),V(t,n,e)):C(t,n,e)},z=function(t,n){_(t);for(var e,r=y(n=g(n)),o=0,i=r.length;i>o;)q(t,e=r[o++],n[e]);return t},J=function(t,n){return void 0===n?j(t):z(j(t),n)},Y=function(t){var n=N.call(this,t=w(t,!0));return!(this===W&&o(B,t)&&!o(R,t))&&(!(n||!o(this,t)||!o(B,t)||o(this,I)&&this[I][t])||n)},Q=function(t,n){if(t=g(t),n=w(n,!0),t!==W||!o(B,n)||o(R,n)){var e=M(t,n);return!e||!o(B,n)||o(t,I)&&t[I][n]||(e.enumerable=!0),e}},X=function(t){for(var n,e=E(g(t)),r=[],i=0;e.length>i;)o(B,n=e[i++])||n==I||n==s||r.push(n);return r},Z=function(t){for(var n,e=t===W,r=E(e?R:g(t)),i=[],u=0;r.length>u;)!o(B,n=r[u++])||e&&!o(W,n)||i.push(B[n]);return i};H||(A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),n=function(e){this===W&&n.call(R,e),o(this,I)&&o(this[I],t)&&(this[I][t]=!1),V(this,t,x(1,e))};return i&&U&&V(W,t,{configurable:!0,set:n}),$(t)},c(A.prototype,"toString",function(){return this._k}),k.f=Q,S.f=q,e(50).f=O.f=X,e(24).f=Y,e(39).f=Z,i&&!e(18)&&c(W,"propertyIsEnumerable",Y,!0),h.f=function(t){return $(d(t))}),u(u.G+u.W+u.F*!H,{Symbol:A});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;tt.length>nt;)d(tt[nt++]);for(var et=P(d.store),rt=0;et.length>rt;)v(et[rt++]);u(u.S+u.F*!H,"Symbol",{for:function(t){return o(D,t+="")?D[t]:D[t]=A(t)},keyFor:function(t){if(!K(t))throw TypeError(t+" is not a symbol!");for(var n in D)if(D[n]===t)return n},useSetter:function(){U=!0},useSimple:function(){U=!1}}),u(u.S+u.F*!H,"Object",{create:J,defineProperty:q,defineProperties:z,getOwnPropertyDescriptor:Q,getOwnPropertyNames:X,getOwnPropertySymbols:Z}),T&&u(u.S+u.F*(!H||a(function(){var t=A();return"[null]"!=L([t])||"{}"!=L({a:t})||"{}"!=L(Object(t))})),"JSON",{stringify:function(t){for(var n,e,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(e=n=r[1],(b(n)||void 0!==t)&&!K(t))return m(n)||(n=function(t,n){if("function"==typeof e&&(n=e.call(this,t,n)),!K(n))return n}),r[1]=n,L.apply(T,r)}}),A.prototype[F]||e(8)(A.prototype,F,A.prototype.valueOf),l(A,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,n,e){var r=e(21)("meta"),o=e(6),i=e(9),u=e(4).f,c=0,s=Object.isExtensible||function(){return!0},a=!e(11)(function(){return s(Object.preventExtensions({}))}),f=function(t){u(t,r,{value:{i:"O"+ ++c,w:{}}})},l=function(t,n){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!s(t))return"F";if(!n)return"E";f(t)}return t[r].i},p=function(t,n){if(!i(t,r)){if(!s(t))return!0;if(!n)return!1;f(t)}return t[r].w},d=function(t){return a&&h.NEED&&s(t)&&!i(t,r)&&f(t),t},h=t.exports={KEY:r,NEED:!1,fastKey:l,getWeak:p,onFreeze:d}},function(t,n,e){var r=e(20),o=e(39),i=e(24);t.exports=function(t){var n=r(t),e=o.f;if(e)for(var u,c=e(t),s=i.f,a=0;c.length>a;)s.call(t,u=c[a++])&&n.push(u);return n}},function(t,n,e){var r=e(17);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n,e){var r=e(12),o=e(50).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return o(t)}catch(t){return u.slice()}};t.exports.f=function(t){return u&&"[object Window]"==i.call(t)?c(t):o(r(t))}},function(t,n,e){e(38)("asyncIterator")},function(t,n,e){e(38)("observable")},function(t,n,e){t.exports={default:e(88),__esModule:!0}},function(t,n,e){e(89);var r=e(0).Object;t.exports=function(t,n,e){return r.defineProperty(t,n,e)}},function(t,n,e){var r=e(3);r(r.S+r.F*!e(7),"Object",{defineProperty:e(4).f})},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(n,"__esModule",{value:!0});var o=e(91),i=r(o),u=e(13),c=r(u),s=e(14),a=r(s),f=e(95),l=r(f),p={labels:{tip:"Tip",info:"Info",success:"Success",warning:"Attention",alert:"Error",async:"Loading",confirm:"Confirmation required"},icons:{tip:"question-circle",info:"info-circle",success:"check-circle",warning:"exclamation-circle",alert:"warning",async:"cog fa-spin",confirm:"warning",prefix:"<i class='fa fa-fw fa-",suffix:"'></i>",enabled:!0},replacements:{tip:"",info:"",success:"",warning:"",alert:"",async:"","async-block":"",modal:"",confirm:"",general:{"<script>":"","<\/script>":""}},modal:{okLabel:"OK",cancelLabel:"Cancel",maxWidth:"500px"},messages:{async:"Please, wait...","async-block":"Loading"},maxNotifications:10,animationDuration:300,asyncBlockMinDuration:500,position:"bottom-right",duration:5e3},d=function(){function t(n){(0,c.default)(this,t),(0,i.default)(this,(0,l.default)(n,p))}return(0,a.default)(t,[{key:"icon",value:function(t){return this.icons.enabled?this.icons.prefix+this.icons[t]+this.icons.suffix:""}},{key:"label",value:function(t){return this.labels[t]}},{key:"getSecs",value:function(t){return this[t]/1e3+"s"}},{key:"applyReplacements",value:function(t,n){if(!t)return this.messages[n]||"";for(var e in this.replacements.general)t=t.replace(e,this.replacements.general[e]);if(this.replacements[n])for(var r in this.replacements[n])t=t.replace(r,this.replacements[n][r]);return t}}]),t}();n.default=d},function(t,n,e){t.exports={default:e(92),__esModule:!0}},function(t,n,e){e(93),t.exports=e(0).Object.assign},function(t,n,e){var r=e(3);r(r.S+r.F,"Object",{assign:e(94)})},function(t,n,e){"use strict";var r=e(20),o=e(39),i=e(24),u=e(23),c=e(46),s=Object.assign;t.exports=!s||e(11)(function(){var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach(function(t){n[t]=t}),7!=s({},t)[e]||Object.keys(s({},n)).join("")!=r})?function(t,n){for(var e=u(t),s=arguments.length,a=1,f=o.f,l=i.f;s>a;)for(var p,d=c(arguments[a++]),h=f?r(d).concat(f(d)):r(d),v=h.length,y=0;v>y;)l.call(d,p=h[y++])&&(e[p]=d[p]);return e}:s},function(t,n,e){(function(t,e){function r(t,n){return t.set(n[0],n[1]),t}function o(t,n){return t.add(n),t}function i(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function u(t,n){for(var e=-1,r=t?t.length:0;++e<r&&!1!==n(t[e],e,t););return t}function c(t,n){for(var e=-1,r=n.length,o=t.length;++e<r;)t[o+e]=n[e];return t}function s(t,n,e,r){var o=-1,i=t?t.length:0;for(r&&i&&(e=t[++o]);++o<i;)e=n(e,t[o],o,t);return e}function a(t,n){for(var e=-1,r=Array(t);++e<t;)r[e]=n(e);return r}function f(t,n){return null==t?void 0:t[n]}function l(t){var n=!1;if(null!=t&&"function"!=typeof t.toString)try{n=!!(t+"")}catch(t){}return n}function p(t){var n=-1,e=Array(t.size);return t.forEach(function(t,r){e[++n]=[r,t]}),e}function d(t,n){return function(e){return t(n(e))}}function h(t){var n=-1,e=Array(t.size);return t.forEach(function(t){e[++n]=t}),e}function v(t){var n=-1,e=t?t.length:0;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function y(){this.__data__=ne?ne(null):{}}function m(t){return this.has(t)&&delete this.__data__[t]}function _(t){var n=this.__data__;if(ne){var e=n[t];return e===Ht?void 0:e}return Fn.call(n,t)?n[t]:void 0}function b(t){var n=this.__data__;return ne?void 0!==n[t]:Fn.call(n,t)}function g(t,n){return this.__data__[t]=ne&&void 0===n?Ht:n,this}function w(t){var n=-1,e=t?t.length:0;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function x(){this.__data__=[]}function j(t){var n=this.__data__,e=G(n,t);return!(e<0)&&(e==n.length-1?n.pop():$n.call(n,e,1),!0)}function O(t){var n=this.__data__,e=G(n,t);return e<0?void 0:n[e][1]}function k(t){return G(this.__data__,t)>-1}function S(t,n){var e=this.__data__,r=G(e,t);return r<0?e.push([t,n]):e[r][1]=n,this}function P(t){var n=-1,e=t?t.length:0;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function M(){this.__data__={hash:new v,map:new(Qn||w),string:new v}}function C(t){return dt(this,t).delete(t)}function E(t){return dt(this,t).get(t)}function A(t){return dt(this,t).has(t)}function T(t,n){return dt(this,t).set(t,n),this}function L(t){this.__data__=new w(t)}function I(){this.__data__=new w}function F(t){return this.__data__.delete(t)}function N(t){return this.__data__.get(t)}function D(t){return this.__data__.has(t)}function B(t,n){var e=this.__data__;if(e instanceof w){var r=e.__data__;if(!Qn||r.length<Wt-1)return r.push([t,n]),this;e=this.__data__=new P(r)}return e.set(t,n),this}function R(t,n){var e=le(t)||Pt(t)?a(t.length,String):[],r=e.length,o=!!r;for(var i in t)!n&&!Fn.call(t,i)||o&&("length"==i||_t(i,r))||e.push(i);return e}function W(t,n,e){(void 0===e||St(t[n],e))&&("number"!=typeof n||void 0!==e||n in t)||(t[n]=e)}function H(t,n,e){var r=t[n];Fn.call(t,n)&&St(r,e)&&(void 0!==e||n in t)||(t[n]=e)}function G(t,n){for(var e=t.length;e--;)if(St(t[e][0],n))return e;return-1}function U(t,n){return t&&ft(n,Nt(n),t)}function V(t,n,e,r,o,i,c){var s;if(r&&(s=i?r(t,o,i,c):r(t)),void 0!==s)return s;if(!Tt(t))return t;var a=le(t);if(a){if(s=vt(t),!n)return at(t,s)}else{var f=fe(t),p=f==Kt||f==qt;if(pe(t))return nt(t,n);if(f==Yt||f==Ut||p&&!i){if(l(t))return i?t:{};if(s=yt(p?{}:t),!n)return lt(t,U(s,t))}else{if(!bn[f])return i?t:{};s=mt(t,f,V,n)}}c||(c=new L);var d=c.get(t);if(d)return d;if(c.set(t,s),!a)var h=e?pt(t):Nt(t);return u(h||t,function(o,i){h&&(i=o,o=t[i]),H(s,i,V(o,n,e,r,i,t,c))}),s}function $(t){return Tt(t)?Un(t):{}}function K(t,n,e){var r=n(t);return le(t)?r:c(r,e(t))}function q(t){return Dn.call(t)}function z(t){return!(!Tt(t)||wt(t))&&(Et(t)||l(t)?Bn:yn).test(kt(t))}function J(t){return Lt(t)&&At(t.length)&&!!_n[Dn.call(t)]}function Y(t){if(!xt(t))return zn(t);var n=[];for(var e in Object(t))Fn.call(t,e)&&"constructor"!=e&&n.push(e);return n}function Q(t){if(!Tt(t))return Ot(t);var n=xt(t),e=[];for(var r in t)("constructor"!=r||!n&&Fn.call(t,r))&&e.push(r);return e}function X(t,n,e,r,o){if(t!==n){if(!le(n)&&!de(n))var i=Q(n);u(i||n,function(u,c){if(i&&(c=u,u=n[c]),Tt(u))o||(o=new L),Z(t,n,c,e,X,r,o);else{var s=r?r(t[c],u,c+"",t,n,o):void 0;void 0===s&&(s=u),W(t,c,s)}})}}function Z(t,n,e,r,o,i,u){var c=t[e],s=n[e],a=u.get(s);if(a)return void W(t,e,a);var f=i?i(c,s,e+"",t,n,u):void 0,l=void 0===f;l&&(f=s,le(s)||de(s)?le(c)?f=c:Ct(c)?f=at(c):(l=!1,f=V(s,!0)):It(s)||Pt(s)?Pt(c)?f=Ft(c):!Tt(c)||r&&Et(c)?(l=!1,f=V(s,!0)):f=c:l=!1),l&&(u.set(s,f),o(f,s,r,i,u),u.delete(s)),W(t,e,f)}function tt(t,n){return n=Jn(void 0===n?t.length-1:n,0),function(){for(var e=arguments,r=-1,o=Jn(e.length-n,0),u=Array(o);++r<o;)u[r]=e[n+r];r=-1;for(var c=Array(n+1);++r<n;)c[r]=e[r];return c[n]=u,i(t,this,c)}}function nt(t,n){if(n)return t.slice();var e=new t.constructor(t.length);return t.copy(e),e}function et(t){var n=new t.constructor(t.byteLength);return new Hn(n).set(new Hn(t)),n}function rt(t,n){var e=n?et(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}function ot(t,n,e){return s(n?e(p(t),!0):p(t),r,new t.constructor)}function it(t){var n=new t.constructor(t.source,vn.exec(t));return n.lastIndex=t.lastIndex,n}function ut(t,n,e){return s(n?e(h(t),!0):h(t),o,new t.constructor)}function ct(t){return se?Object(se.call(t)):{}}function st(t,n){var e=n?et(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function at(t,n){var e=-1,r=t.length;for(n||(n=Array(r));++e<r;)n[e]=t[e];return n}function ft(t,n,e,r){e||(e={});for(var o=-1,i=n.length;++o<i;){var u=n[o],c=r?r(e[u],t[u],u,e,t):void 0;H(e,u,void 0===c?t[u]:c)}return e}function lt(t,n){return ft(t,ae(t),n)}function pt(t){return K(t,Nt,ae)}function dt(t,n){var e=t.__data__;return gt(n)?e["string"==typeof n?"string":"hash"]:e.map}function ht(t,n){var e=f(t,n);return z(e)?e:void 0}function vt(t){var n=t.length,e=t.constructor(n);return n&&"string"==typeof t[0]&&Fn.call(t,"index")&&(e.index=t.index,e.input=t.input),e}function yt(t){return"function"!=typeof t.constructor||xt(t)?{}:$(Gn(t))}function mt(t,n,e,r){var o=t.constructor;switch(n){case en:return et(t);case Vt:case $t:return new o(+t);case rn:return rt(t,r);case on:case un:case cn:case sn:case an:case fn:case ln:case pn:case dn:return st(t,r);case zt:return ot(t,r,e);case Jt:case Zt:return new o(t);case Qt:return it(t);case Xt:return ut(t,r,e);case tn:return ct(t)}}function _t(t,n){return!!(n=null==n?Gt:n)&&("number"==typeof t||mn.test(t))&&t>-1&&t%1==0&&t<n}function bt(t,n,e){if(!Tt(e))return!1;var r=typeof n;return!!("number"==r?Mt(e)&&_t(n,e.length):"string"==r&&n in e)&&St(e[n],t)}function gt(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}function wt(t){return!!Ln&&Ln in t}function xt(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||An)}function jt(t,n,e,r,o,i){return Tt(t)&&Tt(n)&&(i.set(n,t),X(t,n,void 0,jt,i),i.delete(n)),t}function Ot(t){var n=[];if(null!=t)for(var e in Object(t))n.push(e);return n}function kt(t){if(null!=t){try{return In.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function St(t,n){return t===n||t!==t&&n!==n}function Pt(t){return Ct(t)&&Fn.call(t,"callee")&&(!Vn.call(t,"callee")||Dn.call(t)==Ut)}function Mt(t){return null!=t&&At(t.length)&&!Et(t)}function Ct(t){return Lt(t)&&Mt(t)}function Et(t){var n=Tt(t)?Dn.call(t):"";return n==Kt||n==qt}function At(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Gt}function Tt(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function Lt(t){return!!t&&"object"==typeof t}function It(t){if(!Lt(t)||Dn.call(t)!=Yt||l(t))return!1;var n=Gn(t);if(null===n)return!0;var e=Fn.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&In.call(e)==Nn}function Ft(t){return ft(t,Dt(t))}function Nt(t){return Mt(t)?R(t):Y(t)}function Dt(t){return Mt(t)?R(t,!0):Q(t)}function Bt(){return[]}function Rt(){return!1}var Wt=200,Ht="__lodash_hash_undefined__",Gt=9007199254740991,Ut="[object Arguments]",Vt="[object Boolean]",$t="[object Date]",Kt="[object Function]",qt="[object GeneratorFunction]",zt="[object Map]",Jt="[object Number]",Yt="[object Object]",Qt="[object RegExp]",Xt="[object Set]",Zt="[object String]",tn="[object Symbol]",nn="[object WeakMap]",en="[object ArrayBuffer]",rn="[object DataView]",on="[object Float32Array]",un="[object Float64Array]",cn="[object Int8Array]",sn="[object Int16Array]",an="[object Int32Array]",fn="[object Uint8Array]",ln="[object Uint8ClampedArray]",pn="[object Uint16Array]",dn="[object Uint32Array]",hn=/[\\^$.*+?()[\]{}|]/g,vn=/\w*$/,yn=/^\[object .+?Constructor\]$/,mn=/^(?:0|[1-9]\d*)$/,_n={};_n[on]=_n[un]=_n[cn]=_n[sn]=_n[an]=_n[fn]=_n[ln]=_n[pn]=_n[dn]=!0,_n[Ut]=_n["[object Array]"]=_n[en]=_n[Vt]=_n[rn]=_n[$t]=_n["[object Error]"]=_n[Kt]=_n[zt]=_n[Jt]=_n[Yt]=_n[Qt]=_n[Xt]=_n[Zt]=_n[nn]=!1;var bn={};bn[Ut]=bn["[object Array]"]=bn[en]=bn[rn]=bn[Vt]=bn[$t]=bn[on]=bn[un]=bn[cn]=bn[sn]=bn[an]=bn[zt]=bn[Jt]=bn[Yt]=bn[Qt]=bn[Xt]=bn[Zt]=bn[tn]=bn[fn]=bn[ln]=bn[pn]=bn[dn]=!0,bn["[object Error]"]=bn[Kt]=bn[nn]=!1;var gn="object"==typeof t&&t&&t.Object===Object&&t,wn="object"==typeof self&&self&&self.Object===Object&&self,xn=gn||wn||Function("return this")(),jn="object"==typeof n&&n&&!n.nodeType&&n,On=jn&&"object"==typeof e&&e&&!e.nodeType&&e,kn=On&&On.exports===jn,Sn=kn&&gn.process,Pn=function(){try{return Sn&&Sn.binding("util")}catch(t){}}(),Mn=Pn&&Pn.isTypedArray,Cn=Array.prototype,En=Function.prototype,An=Object.prototype,Tn=xn["__core-js_shared__"],Ln=function(){var t=/[^.]+$/.exec(Tn&&Tn.keys&&Tn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),In=En.toString,Fn=An.hasOwnProperty,Nn=In.call(Object),Dn=An.toString,Bn=RegExp("^"+In.call(Fn).replace(hn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rn=kn?xn.Buffer:void 0,Wn=xn.Symbol,Hn=xn.Uint8Array,Gn=d(Object.getPrototypeOf,Object),Un=Object.create,Vn=An.propertyIsEnumerable,$n=Cn.splice,Kn=Object.getOwnPropertySymbols,qn=Rn?Rn.isBuffer:void 0,zn=d(Object.keys,Object),Jn=Math.max,Yn=ht(xn,"DataView"),Qn=ht(xn,"Map"),Xn=ht(xn,"Promise"),Zn=ht(xn,"Set"),te=ht(xn,"WeakMap"),ne=ht(Object,"create"),ee=kt(Yn),re=kt(Qn),oe=kt(Xn),ie=kt(Zn),ue=kt(te),ce=Wn?Wn.prototype:void 0,se=ce?ce.valueOf:void 0;v.prototype.clear=y,v.prototype.delete=m,v.prototype.get=_,v.prototype.has=b,v.prototype.set=g,w.prototype.clear=x,w.prototype.delete=j,w.prototype.get=O,w.prototype.has=k,w.prototype.set=S,P.prototype.clear=M,P.prototype.delete=C,P.prototype.get=E,P.prototype.has=A,P.prototype.set=T,L.prototype.clear=I,L.prototype.delete=F,L.prototype.get=N,L.prototype.has=D,L.prototype.set=B;var ae=Kn?d(Kn,Object):Bt,fe=q;(Yn&&fe(new Yn(new ArrayBuffer(1)))!=rn||Qn&&fe(new Qn)!=zt||Xn&&"[object Promise]"!=fe(Xn.resolve())||Zn&&fe(new Zn)!=Xt||te&&fe(new te)!=nn)&&(fe=function(t){var n=Dn.call(t),e=n==Yt?t.constructor:void 0,r=e?kt(e):void 0;if(r)switch(r){case ee:return rn;case re:return zt;case oe:return"[object Promise]";case ie:return Xt;case ue:return nn}return n});var le=Array.isArray,pe=qn||Rt,de=Mn?function(t){return function(n){return t(n)}}(Mn):J,he=tt(function(t){return t.push(void 0,jt),i(ve,void 0,t)}),ve=function(t){return tt(function(n,e){var r=-1,o=e.length,i=o>1?e[o-1]:void 0,u=o>2?e[2]:void 0;for(i=t.length>3&&"function"==typeof i?(o--,i):void 0,u&&bt(e[0],e[1],u)&&(i=o<3?void 0:i,o=1),n=Object(n);++r<o;){var c=e[r];c&&t(n,c,r,i)}return n})}(function(t,n,e,r){X(t,n,e,r)});e.exports=he}).call(n,e(96),e(97)(t))},function(t,n){var e;e=function(){return this}();try{e=e||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(n,"__esModule",{value:!0});var o=e(99),i=r(o),u=e(58),c=r(u),s=e(13),a=r(s),f=e(14),l=r(f),p=e(59),d=r(p),h=e(60),v=r(h),y=e(40),m=r(y),_=e(123),b=r(_),g=e(25),w=function(t){function n(t,e,r,o){(0,a.default)(this,n);var i=(0,d.default)(this,(n.__proto__||(0,c.default)(n)).call(this,o,g.tConsts.prefix+"-"+Math.floor(Date.now()-100*Math.random()),g.tConsts.prefix+" "+g.tConsts.prefix+"-"+e,"animation-duration: "+r.getSecs("animationDuration")+";"));return i.options=r,i.type=e,i.setInnerHtml(t),i}return(0,v.default)(n,t),(0,l.default)(n,[{key:"setInnerHtml",value:function(t){t=this.options.applyReplacements(t,this.type);var n="";"async"!==this.type&&(n="<div class='"+g.tConsts.klass.progressBar+"' style=\"animation-duration:"+this.options.getSecs("duration")+';"></div>'),this.newNode.innerHTML="\n "+n+"\n "+this.getLabel()+'\n <div class="'+g.tConsts.klass.content+'">'+t+'</div>\n <span class="'+g.tConsts.klass.icon+'">'+this.options.icon(this.type)+"</span>\n "}},{key:"beforeInsert",value:function(){var t=this;if(this.parent.childElementCount>=this.options.maxNotifications){var n=(0,i.default)(this.parent.getElementsByClassName(g.tConsts.prefix));this.delete(n.find(function(n){return!t.isDeleted(n)}))}}},{key:"afterInsert",value:function(){var t=this;"async"!=this.type&&(this.timer=new b.default(function(){return t.delete()},this.options.duration),this.addEvent("click",function(){return t.delete()}),this.addEvent("mouseenter",function(){t.isDeleted()||(t.addClass(g.tConsts.klass.progressBarPause),t.timer.pause())}),this.addEvent("mouseleave",function(){t.isDeleted()||(t.removeClass(g.tConsts.klass.progressBarPause),t.timer.resume())}))}},{key:"isDeleted",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el).classList.contains(g.eConsts.klass.hiding)}},{key:"getLabel",value:function(){return'<b class="'+g.tConsts.klass.label+'">'+this.options.label(this.type)+"</b>"}}]),n}(m.default);n.default=w},function(t,n,e){t.exports={default:e(100),__esModule:!0}},function(t,n,e){e(27),e(101),t.exports=e(0).Array.from},function(t,n,e){"use strict";var r=e(10),o=e(3),i=e(23),u=e(53),c=e(54),s=e(33),a=e(102),f=e(55);o(o.S+o.F*!e(57)(function(t){Array.from(t)}),"Array",{from:function(t){var n,e,o,l,p=i(t),d="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,y=void 0!==v,m=0,_=f(p);if(y&&(v=r(v,h>2?arguments[2]:void 0,2)),void 0==_||d==Array&&c(_))for(n=s(p.length),e=new d(n);n>m;m++)a(e,m,y?v(p[m],m):p[m]);else for(l=_.call(p),e=new d;!(o=l.next()).done;m++)a(e,m,y?u(l,v,[o.value,m],!0):o.value);return e.length=m,e}})},function(t,n,e){"use strict";var r=e(4),o=e(15);t.exports=function(t,n,e){n in t?r.f(t,n,o(0,e)):t[n]=e}},function(t,n,e){e(104),t.exports=e(0).Object.getPrototypeOf},function(t,n,e){var r=e(23),o=e(48);e(105)("getPrototypeOf",function(){return function(t){return o(r(t))}})},function(t,n,e){var r=e(3),o=e(0),i=e(11);t.exports=function(t,n){var e=(o.Object||{})[t]||Object[t],u={};u[t]=n(e),r(r.S+r.F*i(function(){e(1)}),"Object",u)}},function(t,n,e){t.exports={default:e(107),__esModule:!0}},function(t,n,e){e(108),t.exports=e(0).Object.setPrototypeOf},function(t,n,e){var r=e(3);r(r.S,"Object",{setPrototypeOf:e(109).set})},function(t,n,e){var r=e(6),o=e(5),i=function(t,n){if(o(t),!r(n)&&null!==n)throw TypeError(n+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{r=e(10)(Function.call,e(51).f(Object.prototype,"__proto__").set,2),r(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,e){return i(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:i}},function(t,n,e){t.exports={default:e(111),__esModule:!0}},function(t,n,e){e(112);var r=e(0).Object;t.exports=function(t,n){return r.create(t,n)}},function(t,n,e){var r=e(3);r(r.S,"Object",{create:e(32)})},function(t,n,e){e(52),e(27),e(49),e(114),e(121),e(122),t.exports=e(0).Promise},function(t,n,e){"use strict";var r,o,i,u,c=e(18),s=e(1),a=e(10),f=e(56),l=e(3),p=e(6),d=e(19),h=e(115),v=e(116),y=e(62),m=e(63).set,_=e(118)(),b=e(41),g=e(64),w=e(65),x=s.TypeError,j=s.process,O=s.Promise,k="process"==f(j),S=function(){},P=o=b.f,M=!!function(){try{var t=O.resolve(1),n=(t.constructor={})[e(2)("species")]=function(t){t(S,S)};return(k||"function"==typeof PromiseRejectionEvent)&&t.then(S)instanceof n}catch(t){}}(),C=function(t){var n;return!(!p(t)||"function"!=typeof(n=t.then))&&n},E=function(t,n){if(!t._n){t._n=!0;var e=t._c;_(function(){for(var r=t._v,o=1==t._s,i=0;e.length>i;)!function(n){var e,i,u=o?n.ok:n.fail,c=n.resolve,s=n.reject,a=n.domain;try{u?(o||(2==t._h&&L(t),t._h=1),!0===u?e=r:(a&&a.enter(),e=u(r),a&&a.exit()),e===n.promise?s(x("Promise-chain cycle")):(i=C(e))?i.call(e,c,s):c(e)):s(r)}catch(t){s(t)}}(e[i++]);t._c=[],t._n=!1,n&&!t._h&&A(t)})}},A=function(t){m.call(s,function(){var n,e,r,o=t._v,i=T(t);if(i&&(n=g(function(){k?j.emit("unhandledRejection",o,t):(e=s.onunhandledrejection)?e({promise:t,reason:o}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=k||T(t)?2:1),t._a=void 0,i&&n.e)throw n.v})},T=function(t){return 1!==t._h&&0===(t._a||t._c).length},L=function(t){m.call(s,function(){var n;k?j.emit("rejectionHandled",t):(n=s.onrejectionhandled)&&n({promise:t,reason:t._v})})},I=function(t){var n=this;n._d||(n._d=!0,n=n._w||n,n._v=t,n._s=2,n._a||(n._a=n._c.slice()),E(n,!0))},F=function(t){var n,e=this;if(!e._d){e._d=!0,e=e._w||e;try{if(e===t)throw x("Promise can't be resolved itself");(n=C(t))?_(function(){var r={_w:e,_d:!1};try{n.call(t,a(F,r,1),a(I,r,1))}catch(t){I.call(r,t)}}):(e._v=t,e._s=1,E(e,!1))}catch(t){I.call({_w:e,_d:!1},t)}}};M||(O=function(t){h(this,O,"Promise","_h"),d(t),r.call(this);try{t(a(F,this,1),a(I,this,1))}catch(t){I.call(this,t)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=e(119)(O.prototype,{then:function(t,n){var e=P(y(this,O));return e.ok="function"!=typeof t||t,e.fail="function"==typeof n&&n,e.domain=k?j.domain:void 0,this._c.push(e),this._a&&this._a.push(e),this._s&&E(this,!1),e.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=a(F,t,1),this.reject=a(I,t,1)},b.f=P=function(t){return t===O||t===u?new i(t):o(t)}),l(l.G+l.W+l.F*!M,{Promise:O}),e(22)(O,"Promise"),e(120)("Promise"),u=e(0).Promise,l(l.S+l.F*!M,"Promise",{reject:function(t){var n=P(this);return(0,n.reject)(t),n.promise}}),l(l.S+l.F*(c||!M),"Promise",{resolve:function(t){return w(c&&this===u?O:this,t)}}),l(l.S+l.F*!(M&&e(57)(function(t){O.all(t).catch(S)})),"Promise",{all:function(t){var n=this,e=P(n),r=e.resolve,o=e.reject,i=g(function(){var e=[],i=0,u=1;v(t,!1,function(t){var c=i++,s=!1;e.push(void 0),u++,n.resolve(t).then(function(t){s||(s=!0,e[c]=t,--u||r(e))},o)}),--u||r(e)});return i.e&&o(i.v),e.promise},race:function(t){var n=this,e=P(n),r=e.reject,o=g(function(){v(t,!1,function(t){n.resolve(t).then(e.resolve,r)})});return o.e&&r(o.v),e.promise}})},function(t,n){t.exports=function(t,n,e,r){if(!(t instanceof n)||void 0!==r&&r in t)throw TypeError(e+": incorrect invocation!");return t}},function(t,n,e){var r=e(10),o=e(53),i=e(54),u=e(5),c=e(33),s=e(55),a={},f={},n=t.exports=function(t,n,e,l,p){var d,h,v,y,m=p?function(){return t}:s(t),_=r(e,l,n?2:1),b=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(i(m)){for(d=c(t.length);d>b;b++)if((y=n?_(u(h=t[b])[0],h[1]):_(t[b]))===a||y===f)return y}else for(v=m.call(t);!(h=v.next()).done;)if((y=o(v,_,h.value,n))===a||y===f)return y};n.BREAK=a,n.RETURN=f},function(t,n){t.exports=function(t,n,e){var r=void 0===e;switch(n.length){case 0:return r?t():t.call(e);case 1:return r?t(n[0]):t.call(e,n[0]);case 2:return r?t(n[0],n[1]):t.call(e,n[0],n[1]);case 3:return r?t(n[0],n[1],n[2]):t.call(e,n[0],n[1],n[2]);case 4:return r?t(n[0],n[1],n[2],n[3]):t.call(e,n[0],n[1],n[2],n[3])}return t.apply(e,n)}},function(t,n,e){var r=e(1),o=e(63).set,i=r.MutationObserver||r.WebKitMutationObserver,u=r.process,c=r.Promise,s="process"==e(17)(u);t.exports=function(){var t,n,e,a=function(){var r,o;for(s&&(r=u.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?e():n=void 0,r}}n=void 0,r&&r.enter()};if(s)e=function(){u.nextTick(a)};else if(!i||r.navigator&&r.navigator.standalone)if(c&&c.resolve){var f=c.resolve();e=function(){f.then(a)}}else e=function(){o.call(r,a)};else{var l=!0,p=document.createTextNode("");new i(a).observe(p,{characterData:!0}),e=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};n&&(n.next=o),t||(t=o,e()),n=o}}},function(t,n,e){var r=e(8);t.exports=function(t,n,e){for(var o in n)e&&t[o]?t[o]=n[o]:r(t,o,n[o]);return t}},function(t,n,e){"use strict";var r=e(1),o=e(0),i=e(4),u=e(7),c=e(2)("species");t.exports=function(t){var n="function"==typeof o[t]?o[t]:r[t];u&&n&&!n[c]&&i.f(n,c,{configurable:!0,get:function(){return this}})}},function(t,n,e){"use strict";var r=e(3),o=e(0),i=e(1),u=e(62),c=e(65);r(r.P+r.R,"Promise",{finally:function(t){var n=u(this,o.Promise||i.Promise),e="function"==typeof t;return this.then(e?function(e){return c(n,t()).then(function(){return e})}:t,e?function(e){return c(n,t()).then(function(){throw e})}:t)}})},function(t,n,e){"use strict";var r=e(3),o=e(41),i=e(64);r(r.S,"Promise",{try:function(t){var n=o.f(this),e=i(t);return(e.e?n.reject:n.resolve)(e.v),n.promise}})},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(n,"__esModule",{value:!0});var o=e(13),i=r(o),u=e(14),c=r(u),s=function(){function t(n,e){(0,i.default)(this,t),this.callback=n,this.remaining=e,this.resume()}return(0,c.default)(t,[{key:"pause",value:function(){window.clearTimeout(this.timerId),this.remaining-=new Date-this.start}},{key:"resume",value:function(){var t=this;this.start=new Date,window.clearTimeout(this.timerId),this.timerId=window.setTimeout(function(){window.clearTimeout(t.timerId),t.callback()},this.remaining)}}]),t}();n.default=s},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(n,"__esModule",{value:!0});var o=e(61),i=r(o),u=e(58),c=r(u),s=e(13),a=r(s),f=e(14),l=r(f),p=e(59),d=r(p),h=e(60),v=r(h),y=e(40),m=r(y),_=e(25),b=function(t){function n(t,e,r){(0,a.default)(this,n);var o=(0,d.default)(this,(n.__proto__||(0,c.default)(n)).call(this,document.body,_.mConsts.ids.wrapper,null,"animation-duration: "+r.getSecs("animationDuration")+";"));return o.options=r,o.type=e,o.setInnerHtml(t),o.insert(),o}return(0,v.default)(n,t),(0,l.default)(n,[{key:"setInnerHtml",value:function(t){var n=this.options.applyReplacements(t,this.type);switch(this.type){case"confirm":n="\n "+this.options.icon(this.type)+"\n <div class='"+_.mConsts.klass.title+"'>\n "+this.options.label(this.type)+'\n </div>\n <div class="'+_.mConsts.klass.content+'">'+n+"</div>\n <div class='"+_.mConsts.klass.buttons+"'>\n <button class='"+_.mConsts.klass.button+" "+_.mConsts.klass.successBtn+"' id='"+_.mConsts.ids.confirmOk+"'>"+this.options.modal.okLabel+"</button>\n <button class='"+_.mConsts.klass.button+" "+_.mConsts.klass.cancelBtn+"' id='"+_.mConsts.ids.confirmCancel+"'>"+this.options.modal.cancelLabel+"</button>\n </div>\n ";break;case"async-block":n=n+'<div class="'+_.mConsts.klass.dotAnimation+'"></div>'}this.newNode.innerHTML='\n <div class="'+_.mConsts.klass.body+" "+_.mConsts.prefix+"-"+this.type+'" style="max-width: '+this.options.modal.maxWidth+';">\n '+n+"\n </div>\n "}},{key:"hideAsync",value:function(t){var n=this,e=Date.now()-t;return new i.default(function(t,r){e>=n.options.asyncBlockMinDuration?(n.delete(),t()):setTimeout(function(){n.delete(),t()},n.options.asyncBlockMinDuration-e)})}}]),n}(m.default);n.default=b}])});
{
"name": "awesome-notifications",
"version": "1.1.1",
"version": "2.0.0",
"description": "Lightweight library for beautifull and smooth notifications",

@@ -8,3 +8,4 @@ "main": "dist/index.js",

"build": "rimraf dist/* && cross-env NODE_ENV=production webpack --progress --hide-modules && rimraf dist/style.js",
"buildDev": "rimraf dist/* && cross-env NODE_ENV=production webpack --progress --hide-modules && rimraf dist/style.js && rimraf docs/dist/* && cpx dist/*.{js,css} docs/dist"
"buildDev": "rimraf dist/* && cross-env NODE_ENV=production webpack --progress --hide-modules && rimraf dist/style.js && rimraf docs/dist/* && cpx dist/*.{js,css} docs/dist",
"test": "mocha --require babel-register || true"
},

@@ -32,2 +33,5 @@ "repository": {

"babel-preset-env": "^1.6.1",
"babel-preset-es2015": "^6.24.1",
"babel-register": "^6.26.0",
"chai": "^4.1.2",
"cpx": "^1.5.0",

@@ -37,3 +41,6 @@ "cross-env": "^5.1.3",

"extract-text-webpack-plugin": "^3.0.2",
"jsdom": "11.5.1",
"jsdom-global": "3.0.2",
"lodash.defaultsdeep": "^4.6.0",
"mocha": "^5.0.0",
"node-sass": "^4.7.2",

@@ -40,0 +47,0 @@ "rimraf": "^2.6.2",

@@ -54,13 +54,15 @@ # Awesome Notifications

All `msg` params support HTML.
You can pass any valid HTML to `html` functions params.
| Function | Params | Description | Example |
| ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `tip(msg)` | _msg_ - `String`, required | shows a gray box with specified `msg` | `tip('First line text<br>Second line text')` |
| `info(msg)` | _msg_ - `String`, required | shows a blue box with specified `msg` | `info('<b>You can put any HTML here</b>')` |
| `success(msg)` | _msg_ - `String`, required | shows a green box with specified `msg` | `success('Simple none-HTML message')` |
| `warning(msg)` | _msg_ - `String`, required | shows an orange box with specified `msg` | `warning('Simple none HTML message')` |
| `alert(msg)` | _msg_ - `String`, required | shows a red box with specified `msg` | `alert('Simple none HTML message')` |
| `async(promise, onResolve, onReject, msg, successMsg)` | _promise_ - `Promise`, required; <br/> _onResolve_ - `Function`, optional; <br/> _onReject_ - `Function`, optional; <br/> _msg_ - `String`, optional, msg for loading box <br/> _successMsg_ - `String`, optional, if specified will shown as success box on promise resolve | shows a loading gray box with specified `msg` <br/><br/> On promise resolve will run `onResolve` function and show success box if `successMsg` was specified <br/><br/> On promise reject will run `onReject` function and show alert box, where `msg` is a value of promise `reject()` | `alert(somePromise, runIfResolvedFunc, runIfRejectedFunc, 'Custom loading msg', 'Async event successfully finished message')` |
| `confirm(msg, okFunc, cancelFunc)` | _msg_ - `String`, required <br/> _okFunc_ - `Function`, optional <br/> _cancelFunc_ - `Function`, optional | shows a modal dialog, which is waiting for users confirmation <br/><br/> If user pressed 'OK' button, `okFunc` will be executed <br/><br/> If user pressed 'Cancel' button, `cancelFunc` will be executed. <br/><br/> Both buttons on press will close modal dialog | `confirm('Are you sure?', runIfOkClicked, runIfCancelClicked)` |
| Function | Params | Description | Example |
| ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `tip(html)` | _html_ - `String`, required | shows a gray toast with specified `html` | `tip('First line text<br>Second line text')` |
| `info(html)` | _html_ - `String`, required | shows a blue toast with specified `html` | `info('<b>You can put any HTML here</b>')` |
| `success(html)` | _html_ - `String`, required | shows a green toast with specified `html` | `success('Simple none-HTML message')` |
| `warning(html)` | _html_ - `String`, required | shows an orange toast with specified `html` | `warning('Simple none HTML message')` |
| `alert(html)` | _html_ - `String`, required | shows a red toast with specified `html` | `alert('Simple none HTML message')` |
| `async(promise, onResolve, onReject, html)` | _promise_ - `Promise`, required; <br/> _onResolve_ - `Function`, `String`, optional, either callback or `html` for success toast; <br/> _onReject_ - `Function`, `String`, optional, either callback or `html` for alert toast; <br/> _html_ - `String`, optional, html for async toast | shows an async gray toast with specified `html` <br/><br/> On promise resolve will run `onResolve` if it's function, and show success toast if `onResolve` is a stirng<br/><br/> On promise reject will run `onReject` function and show alert toast, where `msg` is a promise error or `onReject`, if it's a `String` | `async(somePromise, 'show me a green toast', 'custom message for alert toast' , 'Custom async msg')` |
| `asyncBlock(promise, onResolve, onReject, html)` | _promise_ - `Promise`, required; <br/> _onResolve_ - `Function`, `String`, optional, either callback or `html` for success toast; <br/> _onReject_ - `Function`, `String`, optional, either callback or `html` for alert toast; <br/> _html_ - `String`, optional, html for async toast | blocks the screen untill `promise` will be completed <br/><br/> On promise resolve will run `onResolve` if it's function, and show success toast if `onResolve` is a stirng<br/><br/> On promise reject will run `onReject` function and show alert toast, where `msg` is a promise error or `onReject`, if it's a `String` | `asyncBlock(somePromise, 'show me a green toast', 'custom message for alert toast' , 'Custom async msg')` |
| `confirm(html, okFunc, cancelFunc)` | _html_ - `String`, required <br/> _okFunc_ - `Function`, optional <br/> _cancelFunc_ - `Function`, optional | shows a modal dialog, which is waiting for users confirmation <br/><br/> If user pressed 'OK' button, `okFunc` will be executed <br/><br/> If user pressed 'Cancel' button, `cancelFunc` will be executed. <br/><br/> Both buttons on press will close modal dialog | `confirm('Are you sure?', runIfOkClicked, runIfCancelClicked)` |
| `modal(html, className)` | _html_ - `String`, required <br/> _className_ - `String`, required | shows a custom modal dialog which contains **only** value of `html` <br/> You can add styles for your custom modal by class `awn-modal-${className}`, <br/> where `className` is a param which was passed to the function | `modal('<h2>Your custom title</h2><p>Your custom text</p>', 'custom-class-name')` |

@@ -86,41 +88,46 @@ ## Customization

| Name | Type | Default | Description |
| ------------------------- | --------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| position | `String` | "bottom-right" | position of notifications |
| duration | `Number` | 5000 | determines how long notification exists, ms |
| animationDuration | `Number` | 300 | determines speed of animation, ms |
| maxNotifications | `Number` | 10 | max amount of notifications |
| asyncDefaultMessage | `String` | "Please, wait..." | default loading box message, supports HTML |
| labels | `Object` | _See properties bellow_ | default labels for notifications |
| _labels.tip_ | `String` | "Tip" | default label for tip box |
| _labels.info_ | `String` | "Info" | default label for info box |
| _labels.success_ | `String` | "Success" | default label for success box |
| _labels.warning_ | `String` | "Attention" | default label for warning box |
| _labels.alert_ | `String` | "Error" | default label for alert box |
| _labels.async_ | `String` | "Loading" | default label for async box |
| _labels.confirm_ | `String` | "Confirmation required" | confrim window title |
| icons | `Object` | _See properties bellow_ | default Font Awesome icons for notifications |
| _icons.tip_ | `String` | "question-circle" | FontAwesome icon classes for tip box, first should be without `fa-` |
| _icons.info_ | `String` | "info-circle" | FontAwesome icon classes for info box, first should be without `fa-` |
| _icons.success_ | `String` | "check-circle" | FontAwesome icon classes for success box, first should be without `fa-` |
| _icons.warning_ | `String` | "exclamation-circle" | FontAwesome icon classes for warning box, first should be without `fa-` |
| _icons.alert_ | `String` | "warning" | FontAwesome icon classes for alert box, first should be without `fa-` |
| _icons.async_ | `String` | "cof fa-spin" | FontAwesome icon classes for async box, first should be without `fa-` |
| _icons.confirm_ | `String` | "warning" | FontAwesome icon classes for confirm window, first should be without `fa-` |
| _icons.enabled_ | `Boolean` | True | Determines icons existence |
| _icons.template_ | `Object` | _See properties bellow_ | Determines icons template |
| _icons.template.prefix_ | `String` | `"<span><i class='fa fa-fw fa"` | HTML before any `icons[value]` (e.g. `icons.tip`) |
| _icons.template.suffix_ | `String` | `"'></i></span>"` | HTML after any `icons[value]` (e.g. `icons.tip`) |
| confirm | `Object` | _See properties bellow_ | confirmation window settings |
| _confirm.successBtnLabel_ | `String` | "OK" | confirm window success button label |
| _confirm.cancelBtnLabel_ | `String` | "Cancel" | confirm window cancel button label |
| replacements | `Object` | _See properties bellow_ | contains rules of replacement for `msg`<br/>each rule is `Object`<br>where **keys** are first param for [replace function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)<br/>and **values** are second param. |
| _replacements.general_ | `Object` | `{ "<script>": "", "</script>": "" }` | rules for all event types |
| _replacements.tip_ | `Object` | `null` | rules for tip events |
| _replacements.info_ | `Object` | `null` | rules for info events |
| _replacements.success_ | `Object` | `null` | rules for success events |
| _replacements.warning_ | `Object` | `null` | rules for warning events |
| _replacements.alert_ | `Object` | `null` | rules for alert events |
| _replacements.async_ | `Object` | `null` | rules for async events |
| _replacements.confirm_ | `Object` | `null` | rules for confirm window |
| Name | Type | Default | Description |
| ------------------------- | --------- | ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| position | `String` | "bottom-right" | position of notifications |
| duration | `Number` | 5000 | determines how long notification exists, ms |
| animationDuration | `Number` | 300 | determines speed of animation, ms |
| asyncBlockMinDuration | `Number` | 500 | minimal time to show asyncBlock modal window, prevents blinking, when async function completes too fast |
| maxNotifications | `Number` | 10 | max amount of notifications |
| labels | `Object` | _See properties bellow_ | default labels for notifications |
| _labels.tip_ | `String` | "Tip" | default label for tip toast |
| _labels.info_ | `String` | "Info" | default label for info toast |
| _labels.success_ | `String` | "Success" | default label for success toast |
| _labels.warning_ | `String` | "Attention" | default label for warning toast |
| _labels.alert_ | `String` | "Error" | default label for alert toast |
| _labels.async_ | `String` | "Loading" | default label for async toast |
| _labels.confirm_ | `String` | "Confirmation required" | confrim window title |
| icons | `Object` | _See properties bellow_ | default Font Awesome icons for notifications |
| _icons.tip_ | `String` | "question-circle" | FontAwesome icon classes for tip toast, first should be without `fa-` |
| _icons.info_ | `String` | "info-circle" | FontAwesome icon classes for info toast, first should be without `fa-` |
| _icons.success_ | `String` | "check-circle" | FontAwesome icon classes for success toast, first should be without `fa-` |
| _icons.warning_ | `String` | "exclamation-circle" | FontAwesome icon classes for warning toast, first should be without `fa-` |
| _icons.alert_ | `String` | "warning" | FontAwesome icon classes for alert toast, first should be without `fa-` |
| _icons.async_ | `String` | "cof fa-spin" | FontAwesome icon classes for async toast, first should be without `fa-` |
| _icons.confirm_ | `String` | "warning" | FontAwesome icon classes for confirm window, first should be without `fa-` |
| _icons.enabled_ | `Boolean` | True | Determines icons existence |
| _icons.prefix_ | `String` | `"<i class='fa fa-fw fa"` | HTML before any `icons[value]` (e.g. `icons.tip`) |
| _icons.suffix_ | `String` | `"'></i>"` | HTML after any `icons[value]` (e.g. `icons.tip`) |
| modal | `Object` | _See properties bellow_ | modal windows settings |
| _modal.okLabel_ | `String` | "OK" | confirm window success button label |
| _modal.cancelLabel_ | `String` | "Cancel" | confirm window cancel button label |
| _modal.maxWidth_ | `String` | "500px" | confirm window max-width CSS property |
| messages | `Object` | _See properties bellow_ | default messages |
| _messages.async_ | `String` | "Please, wait..." | default async toast message, supports HTML |
| _messages["async-block"]_ | `String` | "Loading" | default asyncBlock modal message, supports HTML |
| replacements | `Object` | _See properties bellow_ | contains rules of replacement for `html`<br/>each rule is `Object`<br>where **keys** are first param for [replace function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)<br/>and **values** are second param. |
| _replacements.general_ | `Object` | `{ "<script>": "", "</script>": "" }` | rules for all event types |
| _replacements.tip_ | `Object` | `""` | rules for tip events |
| _replacements.info_ | `Object` | `""` | rules for info events |
| _replacements.success_ | `Object` | `""` | rules for success events |
| _replacements.warning_ | `Object` | `""` | rules for warning events |
| _replacements.alert_ | `Object` | `""` | rules for alert events |
| _replacements.async_ | `Object` | `""` | rules for async events |
| _replacements.asyncBlock_ | `Object` | `""` | rules for asyncBlock modal window |
| _replacements.modal_ | `Object` | `""` | rules for custom modal window |
| _replacements.confirm_ | `Object` | `""` | rules for confirm window |

@@ -127,0 +134,0 @@ **Styles**

import defaultsDeep from "lodash.defaultsdeep"
const defaults = {

@@ -21,30 +20,66 @@ labels: {

confirm: "warning",
template: {
prefix: "<span><i class='fa fa-fw fa-",
suffix: "'></i></span>"
},
prefix: "<i class='fa fa-fw fa-",
suffix: "'></i>",
enabled: true
},
replacements: {
tip: null,
info: null,
success: null,
warning: null,
alert: null,
async: null,
confirm: null,
tip: "",
info: "",
success: "",
warning: "",
alert: "",
async: "",
"async-block": "",
modal: "",
confirm: "",
general: { "<script>": "", "</script>": "" }
},
confirm: {
successBtnLabel: "OK",
cancelBtnLabel: "Cancel"
modal: {
okLabel: "OK",
cancelLabel: "Cancel",
maxWidth: "500px"
},
messages: {
async: "Please, wait...",
"async-block": "Loading"
},
maxNotifications: 10,
asyncDefaultMessage: "Please, wait...",
animationDuration: 300,
asyncBlockMinDuration: 500,
position: "bottom-right",
duration: 5000
}
export default function(options) {
return defaultsDeep(options, defaults)
export default class {
constructor(options) {
Object.assign(this, defaultsDeep(options, defaults))
}
icon(type) {
if (this.icons.enabled) {
return this.icons.prefix + this.icons[type] + this.icons.suffix
}
return ""
}
label(type) {
return this.labels[type]
}
getSecs(name) {
return `${this[name] / 1000}s`
}
applyReplacements(str, type) {
if (!str) {
return this.messages[type] || ""
}
for (const k in this.replacements.general) {
str = str.replace(k, this.replacements.general[k])
}
if (this.replacements[type]) {
for (const k in this.replacements[type]) {
str = str.replace(k, this.replacements[type][k])
}
}
return str
}
}

@@ -1,279 +0,133 @@

import setDefaults from "./defaults"
import Timer from "./timer"
import Options from "./defaults"
import Toast from "./toast"
import Modal from "./modal"
import Elem from "./elem"
import { mConsts, eConsts, tConsts } from "./constants"
export default class Notifier {
constructor(options = {}) {
this.options = setDefaults(options)
this.labels = this.options.labels
this.icons = this.options.icons
this.replacements = this.options.replacements
this.maxNotifications = this.options.maxNotifications
this.timers = {}
this.deleted = {}
this.options = new Options(options)
}
_err(msg) {
throw Error(msg)
}
tip(html = this._err("missing 'html' parameter")) {
this.notify(html, "tip")
}
tip(msg) {
this.notify(msg, "tip")
info(html = this._err("missing 'html' parameter")) {
this.notify(html, "info")
}
info(msg) {
this.notify(msg, "info")
success(html = this._err("missing 'html' parameter")) {
this.notify(html, "success")
}
success(msg) {
this.notify(msg, "success")
warning(html = this._err("missing 'html' parameter")) {
this.notify(html, "warning")
}
warning(msg) {
this.notify(msg, "warning")
alert(html = this._err("missing 'html' parameter")) {
this.notify(html, "alert")
}
alert(msg) {
this.notify(msg, "alert")
}
notify(msg, type) {
msg = this._applyReplacements(msg, type)
this._addNotification(msg, type)
}
async(promise, onResolve, onReject, msg, successMsg) {
msg = msg || this.options.asyncDefaultMessage
msg = this._applyReplacements(msg)
return this._addAsyncNotification(
promise,
onResolve,
onReject,
msg,
successMsg
async(
promise = this._err("missing 'promise' parameter"),
onResolve,
onReject,
html
) {
let async = this.notify(html, "async")
return promise.then(
result => this._runFunction(true, onResolve, result, async),
err => this._runFunction(false, onReject, err, async)
)
}
_applyReplacements(str, type) {
for (const k in this.replacements.general) {
str = str.replace(k, this.replacements.general[k])
}
if (this.replacements[type]) {
for (const k in this.replacements[type]) {
str = str.replace(k, this.replacements[type][k])
}
}
return str
notify(html, type, oldEl) {
let newEl = new Toast(html, type, this.options, this._getContainer())
newEl.fire(oldEl)
return newEl
}
confirm(msg, okFunc, cancelFunc) {
msg = this._applyReplacements(msg)
this._showConfirm(msg, okFunc, cancelFunc)
}
_showConfirm(msg, okFunc, cancelFunc) {
let newEl = document.createElement("div")
newEl.id = "awn-confirm"
newEl.style.animationDuration = this._msToS(this.options.animationDuration)
let icon = this._getIcon(this.icons["confirm"])
newEl.innerHTML = `
<div class='awn-confirm-body'>
${icon}
<div class='awn-confirm-title'>
${this.labels.confirm}
</div>
${msg}
<div class='awn-buttons'>
<button class='awn-btn awn-btn-success' id='awn-btn-success'>${
this.options.confirm.successBtnLabel
}</button>
<button class='awn-btn awn-btn-cancel' id='awn-btn-cancel'>${
this.options.confirm.cancelBtnLabel
}</button>
</div>
</div>
`
newEl = document.body.appendChild(newEl)
document.getElementById("awn-btn-success").addEventListener("click", () => {
this._deleteConfirm(newEl)
if (typeof okFunc === "function") {
okFunc()
confirm(html = this._err("missing 'html' parameter"), onOk, onCancel) {
let confirm = new Modal(html, "confirm", this.options)
confirm.addEvent("click", e => {
if (e.target.nodeName !== "BUTTON") return false
confirm.delete()
switch (e.target.id) {
case mConsts.ids.confirmOk:
return this._runFunction(true, onOk)
case mConsts.ids.confirmCancel:
return this._runFunction(true, onCancel)
}
})
document.getElementById("awn-btn-cancel").addEventListener("click", () => {
this._deleteConfirm(newEl)
if (typeof cancelFunc === "function") {
cancelFunc()
}
})
}
_deleteConfirm(el) {
this._beforeDelete(el).then(() => {
document.body.removeChild(el)
})
}
async _addAsyncNotification(promise, onResolve, onReject, msg, successMsg) {
let asyncEl = await this._insertEl(msg, "async")
asyncBlock(
promise = this._err("missing 'promise' parameter"),
onResolve,
onReject,
html
) {
let asyncBlock = new Modal(html, "async-block", this.options)
let start = Date.now()
return promise.then(
result => {
if (successMsg) {
successMsg = this._applyReplacements(successMsg, "success")
this._addNotification(successMsg, "success", asyncEl)
} else {
this._deleteEl(asyncEl)
}
if (typeof onResolve === "function") {
return onResolve(result)
}
asyncBlock
.hideAsync(start)
.then(() => this._runFunction(true, onResolve, result))
},
err => {
this._addNotification(err, "alert", asyncEl)
if (typeof onReject === "function") {
return onReject(err)
}
asyncBlock
.hideAsync(start)
.then(() => this._runFunction(false, onReject, err))
}
)
}
_addNotification(msg, type, oldEl) {
// _addNotification depending on the presense of oldEl, adds new or replaces existent notification
if (oldEl) {
this._replaceEl(msg, type, oldEl).then(newEl => {
this._addListeners(newEl)
})
} else {
this._insertEl(msg, type).then(newEl => {
this._addListeners(newEl)
})
}
}
_addListeners(el) {
// _addListeners adds event listeners and set a timer for self-destruction for the element.
this.timers[el.id] = new Timer(() => {
this._deleteEl(el)
}, this.options.duration)
el.addEventListener("click", () => {
this._deleteEl(el)
modal(
html = this._err("missing 'html' parameter"),
className = this._err("missing className parameter")
) {
let modal = new Modal(html, className, this.options)
modal.addEvent("click", e => {
if (e.target.id === modal.el.id) modal.delete()
})
el.addEventListener("mouseenter", () => {
if (!this.deleted[el.id]) {
el.classList.add("awn-progress-bar-paused")
this.timers[el.id].pause()
}
})
el.addEventListener("mouseleave", () => {
if (!this.deleted[el.id]) {
el.classList.remove("awn-progress-bar-paused")
this.timers[el.id].resume()
}
})
}
_beforeInsert() {
if (this._getContainer().childElementCount >= this.maxNotifications) {
let elements = Array.from(
this._getContainer().getElementsByClassName("awn-event")
)
let el = elements.find(e => {
return !this.deleted[e.id]
})
if (el) {
this._deleteEl(el)
}
}
}
_insertEl(msg, type) {
// _insertEl creates and puts an element into the DOM.
return new Promise((resolve, reject) => {
this._beforeInsert()
resolve(this._getContainer().appendChild(this._newEl(msg, type)))
})
}
_replaceEl(msg, type, oldEl) {
// _replaceEl creates element and put it in place of specified old element.
return new Promise((resolve, reject) => {
if (!document.getElementById(oldEl.id)) return
let newEl = this._newEl(msg, type)
this._beforeDelete(oldEl).then(() => {
this._getContainer().replaceChild(newEl, oldEl)
resolve(document.getElementById(newEl.id))
})
})
}
_newEl(msg, type) {
// _newEl creates a new element with specified message and type. It doesn't put element into the DOM.
const id = `awn-${Math.floor(Date.now() - Math.random() * 100)}`
let progressBar =
type === "async"
? ""
: `<div class='awn-progress-bar' style="animation-duration:${this._msToS(
this.options.duration
)};"></div>`
let icon = this._getIcon(this.icons[type])
let newEl = document.createElement("div")
newEl.className = `awn-event awn-${type}`
newEl.id = id
newEl.style.animationDuration = this._msToS(this.options.animationDuration)
newEl.innerHTML = `${progressBar}<b>${this.labels[type]}</b>${msg}${icon}`
return newEl
}
_beforeDelete(el) {
// _beforeDelete makes a delay before removing element from the DOM. It's needed for proper animation.
return new Promise((resolve, reject) => {
el.classList.add("awn-hiding")
setTimeout(resolve, this.options.animationDuration)
})
}
_clearTimers(el) {
if (this.timers[el.id]) {
this.timers[el.id].pause()
this.timers[el.id] = null
}
}
_deleteEl(el) {
if (!el.parentNode) return
this._clearTimers(el)
this.deleted[el.id] = true
this._beforeDelete(el).then(() => {
el.parentNode.removeChild(el)
this.deleted[el.id] = null
})
}
// Tools
_getContainer() {
if (!this.container) {
let container = document.getElementById("awn-container")
if (container) {
this.container = container
} else {
this.container = this._createContainer(this.options.position)
}
this.container =
document.getElementById(tConsts.ids.container) ||
this._createContainer()
}
return this.container
}
_createContainer(position) {
let container = document.createElement("div")
container.id = "awn-container"
switch (position) {
case "top-left":
container.className = "awn-left awn-top"
break
case "bottom-left":
container.className = "awn-left"
break
case "top-right":
container.className = "awn-top"
_createContainer() {
let positions = this.options.position.split("-")
let klass = positions[0] === "top" ? `${eConsts.lib}-top` : ``
if (positions[1] === "left") {
klass = `${klass} ${eConsts.lib}-left`
}
return document.body.appendChild(container)
let container = new Elem(document.body, tConsts.ids.container, klass)
container.insert()
return container.el
}
_getIcon(value) {
return this.options.icons.enabled
? this.options.icons.template.prefix +
value +
this.options.icons.template.suffix
: ""
_runFunction(success, arg, param, oldEl) {
let alertMsg = param
switch (typeof arg) {
case "function":
return func(param)
case "string":
if (!success) {
alertMsg = arg
} else {
this.notify(arg, "success", oldEl)
}
return param
}
if (!success) this.notify(param, "alert", oldEl)
}
_msToS(ms) {
return `${ms / 1000}s`
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc