!function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("vue")):"function"===typeof define&&define.amd?define("$toast",["vue"],e):"object"===typeof exports?exports.$toast=e(require("vue")):t.$toast=e(t.Vue)}("undefined"!==typeof self?self:this,(function(t){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s="ux2C")}({Nkoo:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(o){"object"===typeof window&&(n=window)}t.exports=n},g8md:function(t,e,n){"use strict";(function(t){e.a=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",o=null;"undefined"!==typeof window?o=window.Vue:"undefined"!==typeof t&&(o=t.Vue),o&&("directive"===n?o.directive(e.name,e):o.use(e))}}).call(this,n("Nkoo"))},"i7/w":function(e,n){e.exports=t},ux2C:function(t,e,n){"use strict";n.r(e),n.d(e,"useToast",(function(){return w}));var o=n("i7/w"),i=n.n(o),r=n("g8md"),s=/(?:^\[object\s(.*?)\]$)/,u=function(t){return Object.prototype.toString.call(t).replace(s,"$1").toLowerCase()};function c(t,e){var n=Object.assign({},t);return"string"===u(e)?n.message="".concat(e):"object"===u(e)&&(n=Object.assign({},n,e)),n}var a,d,f,p={MIN:2e3,MAX:3500,DEFAULTS:2750},l={TOP:"top",BOTTOM:"bottom",CENTER:"center"},m={className:"",timeoutMs:p.DEFAULTS,message:"",position:l.BOTTOM,debug:!1},h=m;function b(){return document.querySelector(".mdc-toast")}function v(t){return new i.a({el:document.createElement("div"),name:"Toast",data:function(){return{open:!1,opening:!0,opened:!1,options:t}},computed:{positionClassName:function(){return["top","center"].includes(this.options.position)?"mdc-toast--".concat(this.options.position):""},className:function(){return["mdc-snackbar","mdc-toast",this.positionClassName,this.options.className,{"mdc-snackbar--opening":this.opening,"mdc-snackbar--open":this.opened}]}},watch:{open:function(t){var e=this;t?setTimeout((function(){e.opened=!0,setTimeout((function(){e.opening=!1}),150)}),150):(this.opening=!0,this.opened=!1)}},mounted:function(){this.render(t)},methods:{hide:function(){var t=this;this.open=!1,this.options.debug||(f=setTimeout((function(){try{e=t.$el,document.body.removeChild(e),a=null}catch(n){}var e}),this.options.timeoutMs))},show:function(){var t=this;this.open=!0,d=setTimeout((function(){t.hide()}),this.options.timeoutMs)},render:function(t){if(!(t.timeoutMs<=p.MAX&&t.timeoutMs>=p.MIN))throw new Error("[$toast]: The 'timeoutMs' param must be between ".concat(p.MIN," and ").concat(p.MAX));var e;this.options=t,b()||(e=this.$el,document.body.appendChild(e)),this.show()}},template:'<div :class="className">\n  <div class="mdc-snackbar__surface">\n    <div class="mdc-snackbar__label">\n      {{ options.message }}\n    </div>\n  </div>\n</div>'})}function y(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=c(h,t);b()?(clearTimeout(d),clearTimeout(f),a.render(e)):a=v(e)}var g={install:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h=Object.assign({},m,e),t.prototype.$toast=y}},w=function(){return y};Object(r.a)(g);e.default=g}})}));