text: /*
   * The MIT License (MIT)
   *
   * Copyright (c) 2015 - Studionet
   *
   * Permission is hereby granted, free of charge, to any person obtaining a copy
   * of this software and associated documentation files (the "Software"), to deal
   * in the Software without restriction, including without limitation the rights
   * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   * copies of the Software, and to permit persons to whom the Software is
   * furnished to do so, subject to the following conditions:
   *
   * The above copyright notice and this permission notice shall be included in
   * all copies or substantial portions of the Software.
   *
   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   * THE SOFTWARE.
   */
  (function(){var t;window.Toast=t=function(){function t(n,i){t.container||this.createContainer(),this.notify(n,i)}return t.prototype.notify=null,t.prototype.options=null,t.container=null,t.options={timelife:!0,delay:7,onShow:"spaceInDown",onHide:"spaceOutUp"},t.configureOptions=function(n){var i,o,e;if(o=t.options,"object"!=typeof n)return o;for(i in n){if(e=n[i],void 0===o[i])throw"`"+i+"` option doesn't exist";o[i]=e}return o},t.prototype.getOption=function(n){return t.options[n]},t.prototype.setClasses=function(t){var n,i,o,e,s,a,r;{if(!(t instanceof Object)){for(a=t.split(" "),r=[],o=0,s=a.length;s>o;o++)n=a[o],r.push(this.notify.classList.add(n));return r}for(i=0,e=t.length;e>i;i++)n=t[i],this.notify.classList.add(n)}},t.prototype.notify=function(n,i){var o,e,s;this.notify=document.createElement("li"),this.notify.classList.add("toasts-notify"),this.notify.classList.add("magictime"),this.notify.classList.add(this.getOption("onShow")),this.notify.innerHTML=i,this.setClasses(n),this.getOption("timelife")&&(e=document.createElement("div"),e.classList.add("toasts-timelife"),this.notify.appendChild(e)),s=new Date,s.setSeconds(s.getSeconds()+this.getOption("delay")),this.notify.timer=s;try{t.container.insertBefore(this.notify,t.container.firstChild)}catch(a){o=a,t.container.appendChild(this.notify)}return this.remove()},t.prototype.remove=function(){var t,n;return n=this,t=!1,setTimeout(function(){var t,i,o,e;return t=new Date,t>=n.notify.timer?(n.notify.classList.contains("ondeHide")||(n.notify.classList.remove(n.getOption("onShow")),n.notify.classList.add(n.getOption("onHide"))),void n.notify.addEventListener(n.checkAnimations(),function(t){return t.animationName===n.getOption("onHide")?n.notify.remove():void 0})):(n.getOption("timelife")&&(o=n.notify.querySelector(".toasts-timelife"),e=o.clientWidth,i=t-n.notify.timer,i=Math.abs(i),i/=1e3,i=Math.round(i),e-=e/i,o.style.width=e+"px"),n.remove())},1e3)},t.prototype.checkAnimations=function(){var t,n,i;n={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(i in n)if(t=n[i],void 0!==this.notify.style[i])return t},t.prototype.createContainer=function(){var n;return n=document.createElement("ul"),n.classList.add("toasts-container"),document.body.appendChild(n),t.container=n},t.guess=function(n,i){var o,e,s,a,r;for(n.classList.add("hide"),a=n.childNodes,r=[],o=0,e=a.length;e>o;o++)s=a[o],3!==s.nodeType&&r.push(new t(s.classList,s.innerHTML,i));return r},t.setOptions=function(n){return t.options=t.configureOptions(n)},t}()}).call(this);